CN110460584A - Access request processing method, device, electronic equipment and computer-readable medium - Google Patents
Access request processing method, device, electronic equipment and computer-readable medium Download PDFInfo
- Publication number
- CN110460584A CN110460584A CN201910642535.1A CN201910642535A CN110460584A CN 110460584 A CN110460584 A CN 110460584A CN 201910642535 A CN201910642535 A CN 201910642535A CN 110460584 A CN110460584 A CN 110460584A
- Authority
- CN
- China
- Prior art keywords
- access request
- access
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/562—Brokering proxy services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling 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 present application discloses access request processing method, device, electronic equipment and computer-readable medium.The embodiment of this method includes: to receive application server to the access request of target third-party server, wherein application server is the server being supported to micro services;Determine in access request whether include the identification information for being used to indicate the source of access request, wherein identification information includes access parameter;If so, being verified to access parameter;In response to determining that access parameter by verification, forwards access request to target third-party server.The embodiment can be monitored access request, improve the efficiency in the source of positioning access request.
Description
Technical field
The invention relates to field of computer technology, and in particular to access request processing method, device, electronic equipment
And computer-readable medium.
Background technique
With the development of computer technology, more and more applications (Application, APP) use micro services framework.In
Under micro services framework, it is made of using can be considered one or more micro services.Each micro services can be disposed independently, and independent
It is run in process.
Existing mode, for each micro services of application, when needing to call third party's service, usually by being to be somebody's turn to do
Micro services provide the application server supported and directly send access request to third-party server.However, this mode can not be right
The access request of each micro services is monitored, thus, it, can not be rapidly to this when requiring to look up the source of some access request
Source is positioned.
Summary of the invention
The embodiment of the present application proposes access request processing method, device, electronic equipment and computer-readable medium, with solution
Certainly the positioning to the source of access request is caused to be imitated due to that can not be monitored to the access request of each micro services in the prior art
The lower technical problem of rate.
In a first aspect, the embodiment of the present application provides a kind of access request processing method, it is applied to destination server, target
Server provides gateway service, and gateway service is used to manage the access request to third-party server, answer this method comprises: receiving
With server to the access request of target third-party server, wherein application server is the service being supported to micro services
Device;Determine in access request whether include the identification information for indicating the source of access request, wherein identification information includes access ginseng
Number;If so, being verified to access parameter;In response to determining that access parameter by verification, is forwarded to target third-party server
Access request.
In some embodiments, access parameter includes target query rate per second;And access parameter is verified, it wraps
It includes: obtaining the current query rate per second of application server;Determine whether target query rate per second is less than or equal to currently per second look into
Inquiry rate;If so, determining that access parameter passes through verification;If it is not, determining that access parameter is unverified.
In some embodiments, the current query rate per second of application server is obtained, comprising: inquire from cache database
The current query rate per second of application server;Wherein, the current query rate per second of application server store as follows to
In cache database: creating the corresponding access log of the access request, the title is recorded to the access log;In real time
The received corresponding access log of each access request is sent to message-oriented middleware;It is handled in the message-oriented middleware in real time
Access log, and be based on the title, the current query rate per second of application server described in real-time statistics;It will apply in real time
The current query rate per second of server is stored to cache database.
In some embodiments, after determining that access parameter is unverified, this method further include: look into target is per second
Inquiry rate is updated to current query rate per second, forwards updated access request to target third-party server.
Second aspect, the embodiment of the present application provide a kind of access request processing unit, are applied to server, and server mentions
For gateway service, gateway service is used to manage the access request to third-party server, which includes: receiving unit, is matched
It is set to and receives application server to the access request of target third-party server, wherein application server is to carry out to micro services
The server of support;Whether determination unit, being configured to determine in access request includes the mark for indicating the source of access request
Information, wherein identification information includes access parameter;Verification unit is configured to unit, is configured to if so, to access parameter
It is verified;First retransmission unit is configured in response to determine that access parameter by verification, turns to target third-party server
Send out access request.
In some embodiments, access parameter includes target query rate per second;And verification unit, it is further configured
At: obtain the current query rate per second of application server;Determine whether target query rate per second is less than or equal to currently per second look into
Inquiry rate;If so, determining that access parameter passes through verification;If it is not, determining that access parameter is unverified.
In some embodiments, verification unit is further configured to: application server is inquired from cache database
Current query rate per second;Wherein, the current query rate per second of application server is stored into cache database as follows:
The corresponding access log of the access request is created, the title is recorded to the access log;It in real time will be received
The corresponding access log of each access request is sent to message-oriented middleware;The access log in the message-oriented middleware is handled in real time,
And it is based on the title, the current query rate per second of application server described in real-time statistics;Working as application server in real time
Preceding query rate per second is stored to cache database.
In some embodiments, device further include: the second retransmission unit is configured to update target query rate per second
For current query rate per second, updated access request is forwarded to target third-party server.
The third aspect, the embodiment of the present application provide a kind of server, comprising: one or more processors;Storage device,
One or more programs are stored thereon with, when one or more programs are executed by one or more processors, so that one or more
A processor realizes the method such as any embodiment in above-mentioned first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable medium, are stored thereon with computer program, should
The method such as any embodiment in above-mentioned first aspect is realized when program is executed by processor.
Access request processing method, device, electronic equipment and computer-readable medium provided by the embodiments of the present application, pass through
It receives for micro services to be provided with access request that the application server supported is sent, to target third-party server, then
After the identification information in the source comprising instruction access request in determining access request, the access parameter in identification information is carried out
Verification, finally, forwarding access request to target third-party server after determining access parameter by verification.Thereby, it is possible to logical
The server for crossing offer gateway service is monitored access request.Since in the process, the source of each access request is
Know, thus, when requiring to look up the source of some access request, rapidly and accurately the source can be positioned.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other
Feature, objects and advantages will become more apparent upon:
Fig. 1 is that one embodiment of the application can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the access request processing method of the application;
Fig. 3 is the flow chart according to another embodiment of the access request processing method of the application;
Fig. 4 is the structural schematic diagram according to one embodiment of the access request processing unit of the application;
Fig. 5 is adapted for the structural schematic diagram for the computer system for realizing the server of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the access request processing method of the application or the exemplary system of access request processing unit
System framework 100.
As shown in Figure 1, system architecture 100 may include application server 101,102,103, the service of gateway service is provided
Device 104, third-party server 105,106,107.Net can be passed through between application server 101,102,103 and server 104
Network communication connection.Server 104, third-party server 105,106,107 can also be connected by network communication.It may include each
Kind connection type, such as wired, wireless communication link or fiber optic cables etc..
Application server 101,102,103 can be used for respectively being supported different micro services.Micro services can be by
It is divided according to business, different application servers can be used for providing support to different micro services.For example, for some sound
Video Applications can be related to recommendation business, TV play business, film business etc..Application server 101 can be to recommendation business
It provides and supports, application server 102 can provide support to TV play business, and application server 103 can mention film business
For support etc..
Server 104 can provide gateway service, and above-mentioned gateway service can be used for managing the visit to third-party server
Ask request.Server 104 can execute the operation such as parsing, inspection, forwarding to access request.
Server 105,106,107 can be to provide the server of different third-party server respectively.For example, server
105 can be to provide the server of payment services, and server 106 can be to provide the server etc. of video sharing business, service
Device 107 can be to provide server of searching service etc..
It should be noted that application server 101,102,103, provides the server 104 of gateway service, third party's service
Device 105,106,107 can be hardware, be also possible to software.For some server, when the server is hardware, Ke Yishi
The distributed server cluster of ready-made multiple server compositions, also may be implemented into individual server.When giant server is soft
When part, multiple softwares or software module (such as providing Distributed Services) may be implemented into, also may be implemented into single soft
Part or software module.It is not specifically limited herein.
It should be noted that access request processing method provided by the embodiment of the present application is generally executed by server 104,
Correspondingly, access request processing unit is generally positioned in server 104.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need
It wants, can have any number of application server, the server and third-party server of gateway service are provided.
Referring to FIG. 2, it illustrates the processes 200 according to one embodiment of the access request processing method of the application.
The access request processing method, comprising the following steps:
Step 201, application server is received to the access request of target third-party server.
In the present embodiment, the executing subject (server 104 as shown in Figure 1) of access request processing method can be first
Application server (any application server in application server 101,102,103 as shown in Figure 1) is received to target third
The access request of square server (any third-party server in third-party server 105,106,107 as shown in Figure 1).
Step 202, determine in access request whether include the identification information for indicating the source of access request, wherein mark
Information includes access parameter.
In the present embodiment, whether above-mentioned executing subject can determine in access request comprising indicating above-mentioned access request
The identification information (such as token) in source.In practice, identification information may include multinomial content, such as access parameter, using clothes
IP (Internet Protocol, Internet protocol) address of device, timestamp be engaged in (for characterizing the transmission of above-mentioned access request
Time) etc..Wherein, above-mentioned access parameter can serve to indicate that the requirements for access to target third-party server.For example, can be with
Including inquiry total amount, IP address of target third-party server etc..
In some optional implementations of the present embodiment, above-mentioned access parameter may include the above-mentioned target third of access
Required target query rate per second to be achieved when square server.In practice, query rate per second (Queries Per Second,
It QPS is) to a specific query service device how many measurement standard of handled flow at the appointed time.It needs to illustrate
It is that it is required per second in access target third-party server that target query rate per second can be above-mentioned query service device
Query rate, the specific value of target query rate per second, which can according to need, to be preset.
In some optional implementations of the present embodiment, since application server is for being supported micro services,
Thus, it can also include the title of above-mentioned micro services and responsible person's information of above-mentioned micro services in identification information.At this point, optional
, above-mentioned identification information can generate as follows:
Firstly, by-title of microserver, responsible person's information of micro services and above-mentioned access parameter splice.For example,
This three can be connected into a character string by underscore (or other symbols).
Then, which is subjected to URL (Uniform Resource Locator, uniform resource locator) coding.
In practice, which can be input to the function (such as urlencode function) for being used to carry out URL coding, to be somebody's turn to do
The URL of character string is encoded.
Finally, the URL can be encoded to the identification information for being determined as the access request.
In some optional implementations of the present embodiment, above-mentioned executing subject can also create above-mentioned access request pair
The access log answered, and by the hair of above-mentioned access request, the Internet protocol address of above-mentioned application server, above-mentioned access request
It send in time, above-mentioned target query rate per second, the title of above-mentioned micro services and above-mentioned responsible person's information record access log, and
Afterwards, which is stored, in order to which the access information of application server is inquired.
In some optional implementations of the present embodiment, above-mentioned executing subject can also with search server (such as
It is deployed with the server of ElasticSearce) communication connection.At this point, above-mentioned executing subject can be by received each access
Corresponding access log is requested to be sent to search server.It is thus possible to be convenient for subsequent progress positioning problems and inquiry.
In some optional implementations of the present embodiment, do not include above-mentioned identification information in response to determining, it is above-mentioned to hold
Row main body can return to the prompt information for being used to indicate the above-mentioned third-party server of denied access to above-mentioned application server.
Step 203, if so, being verified to access parameter.
In the present embodiment, in response to including identification information (such as token), above-mentioned execution in the above-mentioned access request of determination
Main body can be verified to the access parameter in information is indicated.It herein, can be based on the content in above-mentioned access parameter, to visit
Ask that parameter is verified.For example, when access in parameter include the IP address of target third-party server when, can will to the IP
Location is verified, and judges whether it is effective IP address.
In some optional implementations of the present embodiment, the above-mentioned target of access the may include in above-mentioned access parameter
When tripartite's server in the case where required target query rate per second to be achieved, school can be carried out to target query rate per second
Test, with determine the application server requirements for access whether be more than the application server inquiry flow restriction.Due to per second
Query rate is to a specific query service device how many measurement standard of handled flow at the appointed time.Thus, it is possible to
The current limliting of the inquiry operation of application server is realized, to guarantee the stability of total system.
Step 204, in response to determining that access parameter by verification, forwards access request to target third-party server.
In the present embodiment, in response to determining access parameter by verification, above-mentioned executing subject can be to target third party
Server forwards access request.To which above-mentioned application server can call clothes provided by above-mentioned target third-party server
Business.
The method provided by the above embodiment of the application, by receiving for providing the application server supported to micro services
Access request send, to target third-party server, then comprising indicating above-mentioned access in determining above-mentioned access request
After the identification information in the source of request, the access parameter in identification information is verified, finally, when determining that accessing parameter passes through
After verification, Xiang Shangshu target third-party server forwards above-mentioned access request.Thereby, it is possible to by providing the service of gateway service
Device is monitored access request.Due in the process, the source of each access request be it is known, thus, when requiring to look up
When the source of some access request, rapidly and accurately the source can be positioned.
With further reference to Fig. 3, it illustrates the processes 300 of another embodiment of access request processing method.The access
The process 300 of request processing method, comprising the following steps:
Step 301, application server is received to the access request of target third-party server.
The step 301 of the present embodiment can be found in the step 101 of embodiment illustrated in fig. 1, and details are not described herein again.
Step 302, determine in access request whether include the identification information for indicating the source of access request.
In the present embodiment, it may include the titles of above-mentioned micro services in above-mentioned identification information, above-mentioned micro services are responsible for
The contents such as people's information, access parameter, the Internet protocol address of above-mentioned application server, the sending time of above-mentioned access request.
Wherein, it is every to may include required target to be achieved when accessing above-mentioned target third-party server for above-mentioned access parameter
Second query rate.
In the present embodiment, above-mentioned executing subject (such as can also be deployed with ElasticSearce's with search server
Server) communication connection.At this point, above-mentioned executing subject can send the received corresponding access log of each access request
To above-mentioned search server.It is thus possible to be convenient for subsequent progress positioning problems and inquiry.
Step 303, do not include identification information in response to determining, be used to indicate denied access third to application server return
The prompt information of square server.
Step 304, in response to determining to include identification information, the current query rate per second of application server is obtained.
In the present embodiment, the query rate per second that respectively different micro services provide each application server supported can be with
By real-time storage.Above-mentioned executing subject can inquire the current query rate per second for obtaining above-mentioned application server.
In some optional implementations of the present embodiment, the query rate per second of each application server can be real-time
Ground is stored in cache server (such as redis).Above-mentioned executing subject can inquire any application clothes from cache database
The current query rate per second of business device.
Wherein, for the application server for sending above-mentioned access request, the current query rate per second of the application server is logical
Under type such as is crossed to store into above-mentioned cache database:
Firstly, creating the corresponding access log of above-mentioned access request, and the title of above-mentioned micro services is recorded to above-mentioned visit
Ask log.To be inquired by the title of micro services access log.
It should be noted that other information can also be stored in above-mentioned access log, for example, can include but is not limited to answer
With the IP address of server, the sending time of access request, target query rate per second, responsible person's information of micro services etc..Herein,
Storage much information be can according to need to access log, be not construed as limiting herein.
Then, in real time by the received corresponding access log of each access request be sent to message-oriented middleware (such as
kafka).Wherein, above-mentioned middleware can be individually deployed in an independent server.
Later, the access log in above-mentioned message-oriented middleware, and the title based on above-mentioned micro services are handled in real time, are united in real time
Count the current query rate per second of the application server.In practice, it can be carried out using by Stream Processing engine (such as flink)
The real-time processing of access log, and the polymerizable functional that can be provided by above-mentioned Stream Processing engine (such as flink), according to micro-
The title of service, polymerize access log.It is thus possible to calculate micro services that the application server is supported certain for the moment
Between access times in section.By the access times divided by the duration of the period, the current every of the application server can be obtained
Second query rate.
Later, the current query rate per second of the application server can be stored to 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 above-mentioned steps.On
The current query rate per second of each application server can be inquired from above-mentioned cache database by stating executing subject.
Step 305, determine whether target query rate per second is less than or equal to current query rate per second.
In the present embodiment, it is less than or equal to above-mentioned current inquiry per second in response to the above-mentioned target of determination query rate per second
Rate can execute following steps 306- step 307.It is greater than above-mentioned current per second look into response to the above-mentioned target of determination query rate per second
Inquiry rate can execute following steps 308- step 309.
Step 306, in response to determining that target query rate per second is less than or equal to current query rate per second, access parameter is determined
Pass through verification.
It should be noted that when whether target query rate per second is less than or equal to current query rate per second, it is meant that answer
It is less than current inquiry times of the application server within the unit time with inquiry times required in the server unit time.By
Other services (such as any third party's service) can be accessed in application server with current query rate per second, thus, necessarily may be used
To use the target query rate access target third party's service per second for being less than current query rate per second.At this point it is possible to determine access
Parameter passes through verification.
Step 307, access request is forwarded to target third-party server.
In the present embodiment, in response to the above-mentioned access parameter of determination by verification, above-mentioned executing subject can be to target the
Tripartite's server forwards access request.To which above-mentioned application server can call above-mentioned target third-party server to be provided
Service.
Step 308, in response to determining that target query rate per second is greater than current query rate per second, determine that access parameter does not pass through
Verification.
Step 309, target query rate per second is updated to current query rate per second, more to the forwarding of target third-party server
Access request after new.
In the present embodiment, unverified in response to the above-mentioned access parameter of determination, above-mentioned executing subject can will be above-mentioned
Target query rate per second is updated to above-mentioned current query rate per second, forwards updated access to ask to target third-party server
It asks.For example, current query rate per second is 60 times/second if target query rate per second is 100 times/second, then it can be to every more than current
The inquiry denied access of second query rate, so that application server accesses above-mentioned target third according to the query rate per second of 60 times/second
Square server.
From figure 3, it can be seen that compared with the corresponding embodiment of Fig. 1, access request processing method in the present embodiment
Process 300 relates to the step of verification object query rate per second.Since query rate per second is to a specific query service device
The how many measurement standard of handled flow at the appointed time, access request may be implemented in the scheme of the present embodiment description as a result,
Current limliting, to guarantee the stability of total system.
With further reference to Fig. 4, as the realization to method shown in above-mentioned each figure, this application provides at a kind of access request
One embodiment of device is managed, the Installation practice is corresponding with embodiment of the method shown in FIG. 1, which can specifically apply
In server.The server can provide gateway service.Above-mentioned gateway service can be for managing to third-party server
Access request service.
As shown in figure 4, access request processing unit 400 described in the present embodiment includes: receiving unit, it is configured to receive
Access request of the application server to target third-party server, wherein above-mentioned application server is to be supported to micro services
Server;Whether determination unit is configured to determine in above-mentioned access request comprising being used to indicate coming for above-mentioned access request
The identification information in source, wherein above-mentioned identification information includes access parameter;Verification unit is configured to unit, if being configured to
It is to be verified to above-mentioned access parameter;First retransmission unit is configured in response to determine that above-mentioned access parameter passes through school
It tests, Xiang Shangshu target third-party server forwards above-mentioned access request.
In some optional implementations of the present embodiment, above-mentioned access parameter includes target query rate per second;And
Above-mentioned verification unit, is further configured to: obtaining the current query rate per second of above-mentioned application server;Determine that above-mentioned target is every
Whether second query rate is less than or equal to above-mentioned current query rate per second;If so, determining that above-mentioned access parameter passes through verification;If it is not,
Determine that above-mentioned access parameter is unverified.
In some optional implementations of the present embodiment, above-mentioned verification unit is further configured to: from caching number
According to the current query rate per second for inquiring above-mentioned application server in library;Wherein, the current query rate per second of above-mentioned application server
It is stored as follows into above-mentioned cache database: creating the corresponding access log of above-mentioned access request, by above-mentioned title
It records to above-mentioned access log;The received corresponding access log of each access request is sent to message-oriented middleware in real time;
The access log in above-mentioned message-oriented middleware is handled in real time, and is based on above-mentioned title, and the above-mentioned application server of real-time statistics is worked as
Preceding query rate per second;The current query rate per second of above-mentioned application server is stored to cache database.
In some optional implementations of the present embodiment, the device further include: the second retransmission unit, be configured to by
Target query rate per second is updated to current query rate per second, forwards updated access request to target third-party server.
The device provided by the above embodiment of the application, by receiving for providing the application server supported to micro services
Access request send, to target third-party server, then comprising indicating above-mentioned access in determining above-mentioned access request
After the identification information in the source of request, the access parameter in identification information is verified, finally, when determining that accessing parameter passes through
After verification, Xiang Shangshu target third-party server forwards above-mentioned access request.Thereby, it is possible to by providing the service of gateway service
Device is monitored access request.Due in the process, the source of each access request be it is known, thus, when requiring to look up
When the source of some access request, rapidly and accurately the source can be positioned.
Below with reference to Fig. 5, it illustrates the computer systems 500 for the server for being suitable for being used to realize the embodiment of the present application
Structural schematic diagram.Server shown in Fig. 5 is only an example, should not function and use scope to the embodiment of the present application
Bring any restrictions.
As shown in figure 5, computer system 500 includes central processing unit (CPU) 501, it can be read-only according to being stored in
Program in memory (ROM) 502 or be loaded into the program in random access storage device (RAM) 503 from storage section 508 and
Execute various movements appropriate and processing.In RAM 503, also it is stored with system 500 and operates required various programs and data.
CPU501, ROM 502 and RAM 503 is connected with each other by bus 504.Input/output (I/O) interface 505 is also connected to always
Line 504.
I/O interface 505 is connected to lower component: the importation 506 including keyboard, mouse etc.;Including such as liquid crystal
Show the output par, c 507 of device (LCD) etc. and loudspeaker etc.;Storage section 508 including hard disk etc.;And including such as LAN
The communications portion 509 of the network interface card of card, modem etc..Communications portion 509 is executed via the network of such as internet
Communication process.Driver 510 is also connected to I/O interface 505 as needed.Detachable media 511, such as disk, CD, magneto-optic
Disk, semiconductor memory etc. are mounted on as needed on driver 510, in order to from the computer program root read thereon
According to needing to be mounted into storage section 508.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communications portion 509, and/or from detachable media
511 are mounted.When the computer program is executed by central processing unit (CPU) 501, limited in execution the present processes
Above-mentioned function.It should be noted that computer-readable medium described herein can be computer-readable signal media or
Computer readable storage medium either the two any combination.Computer readable storage medium for example can be --- but
Be not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.
The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires electrical connection,
Portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only deposit
Reservoir (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory
Part or above-mentioned any appropriate combination.In this application, computer readable storage medium, which can be, any include or stores
The tangible medium of program, the program can be commanded execution system, device or device use or in connection.And
In the application, computer-readable signal media may include in a base band or the data as the propagation of carrier wave a part are believed
Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not
It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer
Any computer-readable medium other than readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use
In by the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc., Huo Zheshang
Any appropriate combination stated.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse
Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding
The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard
The mode of part is realized.Described unit also can be set in the processor, wherein the title of these units is in certain situation
Under do not constitute restriction to the unit itself.
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be
Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating
Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should
Device: application server is received to the access request of target third-party server, wherein application server is to carry out to micro services
The server of support;Determine in access request whether include the identification information for being used to indicate the source of access request, wherein mark
Information includes access parameter;If so, being verified to access parameter;In response to determining access parameter by verification, to target the
Tripartite's server forwards access request.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein
Can technical characteristic replaced mutually and the technical solution that is formed.
Claims (10)
1. a kind of access request processing method, which is characterized in that be applied to server, the server provides gateway service, institute
Gateway service is stated for managing the access request to third-party server, which comprises
Application server is received to the access request of target third-party server, wherein the application server is to micro services
The server being supported;
Determine in the access request whether include the identification information for being used to indicate the source of the access request, wherein described
Identification information includes access parameter;
If so, being verified to the access parameter;
In response to the determination access parameter by verification, Xiang Suoshu target third-party server forwards the access request.
2. access request processing method according to claim 1, which is characterized in that the access parameter includes that target is per second
Query rate;And
It is described that the access parameter is verified, comprising:
Obtain the current query rate per second of the application server;
Determine whether 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 through verification;
If it is not, determining that the access parameter is unverified.
3. access request processing method according to claim 2, which is characterized in that the identification information further includes described micro-
The title of service;And
The current query rate per second for obtaining the application server, comprising:
The current query rate per second of the application server is inquired from cache database;
Wherein, the current query rate per second of the application server is stored as follows into the cache database:
The corresponding access log of the access request is created, the title is recorded to the access log;
The received corresponding access log of each access request is sent to message-oriented middleware in real time;
The access log in the message-oriented middleware is handled in real time, and is based on the title, application server described in real-time statistics
Current query rate per second;
The current query rate per second of the application server is stored to cache database in real time.
4. access request processing method according to claim 2, which is characterized in that the determination access parameter not
After verification, the method also includes:
Target query rate per second is updated to the current query rate per second, Xiang Suoshu target third-party server forwards more
Access request after new.
5. a kind of access request processing unit, which is characterized in that be applied to server, the server provides gateway service, institute
Gateway service, which is stated, for managing the access request to third-party server, described device includes:
Receiving unit is configured to receive application server to the access request of target third-party server, wherein the application
Server is the server being supported to micro services;
Whether determination unit, being configured to determine in the access request includes the mark for being used to indicate the source of the access request
Know information, wherein the identification information includes access parameter;
Verification unit is configured to unit, is configured to if so, verifying to the access parameter;
First retransmission unit is configured in response to determine that the access parameter passes through verification, Xiang Suoshu target third party's service
Device forwards the access request.
6. access request processing unit according to claim 5, which is characterized in that the access parameter includes that target is per second
Query rate;And
The verification unit, is further configured to:
Obtain the current query rate per second of the application server;
Determine whether 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 through verification;
If it is not, determining that the access parameter is unverified.
7. access request processing unit according to claim 6, which is characterized in that the verification unit is further matched
It is set to:
The current query rate per second of the application server is inquired from cache database;
Wherein, the current query rate per second of the application server is stored as follows into the cache database:
The corresponding access log of the access request is created, the title is recorded to the access log;
The received corresponding access log of each access request is sent to message-oriented middleware in real time;
The access log in the message-oriented middleware, and application service described in real-time statistics are handled in real time by Stream Processing engine
The current query rate per second of device;
The current query rate per second of the application server is stored to cache database in real time.
8. access request processing unit according to claim 6, which is characterized in that described device further include:
Second retransmission unit is configured to for target query rate per second being updated to the current query rate per second, Xiang Suoshu
Target third-party server forwards updated access request.
9. a kind of server characterized by comprising
One or more processors;
Storage device is stored thereon with one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
The now method as described in any in claim 1-4.
10. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that the program is executed by processor
Method of the Shi Shixian as described in any in claim 1-4.
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 true CN110460584A (en) | 2019-11-15 |
CN110460584B 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) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111198804A (en) * | 2019-12-30 | 2020-05-26 | 中电工业互联网有限公司 | Gateway-based industrial internet platform third-party micro-service monitoring and early warning method |
CN111274150A (en) * | 2020-02-07 | 2020-06-12 | 北京字节跳动网络技术有限公司 | 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 |
WO2023185545A1 (en) * | 2022-03-28 | 2023-10-05 | 华为技术有限公司 | Method for acquiring region of interest, and related device |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107426302A (en) * | 2017-06-26 | 2017-12-01 | 腾讯科技(深圳)有限公司 | Access scheduling method, apparatus, system, terminal, server and storage medium |
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 |
CN108427581A (en) * | 2018-02-07 | 2018-08-21 | 平安普惠企业管理有限公司 | System micro services method and terminal device |
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 |
CN109857755A (en) * | 2019-01-08 | 2019-06-07 | 中国联合网络通信集团有限公司 | A kind of rule method of calibration and device |
-
2019
- 2019-07-16 CN CN201910642535.1A patent/CN110460584B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107426302A (en) * | 2017-06-26 | 2017-12-01 | 腾讯科技(深圳)有限公司 | Access scheduling method, apparatus, system, terminal, server and storage medium |
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 |
CN108427581A (en) * | 2018-02-07 | 2018-08-21 | 平安普惠企业管理有限公司 | System micro services method and terminal device |
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 |
CN109857755A (en) * | 2019-01-08 | 2019-06-07 | 中国联合网络通信集团有限公司 | A kind of rule method of calibration and device |
CN109831504A (en) * | 2019-01-31 | 2019-05-31 | 泰康保险集团股份有限公司 | Micro services request processing method, device and equipment |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111198804A (en) * | 2019-12-30 | 2020-05-26 | 中电工业互联网有限公司 | Gateway-based industrial internet platform third-party micro-service monitoring and early warning method |
CN111198804B (en) * | 2019-12-30 | 2023-09-05 | 中电工业互联网有限公司 | Gateway-based industrial Internet platform third-party micro-service monitoring and early warning method |
CN111274150A (en) * | 2020-02-07 | 2020-06-12 | 北京字节跳动网络技术有限公司 | Service instance access method and device and electronic equipment |
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 |
WO2023185545A1 (en) * | 2022-03-28 | 2023-10-05 | 华为技术有限公司 | Method for acquiring region of interest, and related device |
Also Published As
Publication number | Publication date |
---|---|
CN110460584B (en) | 2022-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110460584A (en) | Access request processing method, device, electronic equipment and computer-readable medium | |
CN109981750A (en) | Business process system, business data processing method and device | |
CN111259545B (en) | Intelligent driving virtual simulation cloud platform | |
CN108494860B (en) | WEB access system, WEB access method and device for client | |
CN109684408A (en) | Data managing method, device, medium and the electronic equipment of block catenary system | |
CN109241181A (en) | Database operation method and device | |
CN109697118A (en) | Streaming computing task management method, device, electronic equipment and storage medium | |
CN108282529A (en) | Publication and system, the method and apparatus for subscribing to data | |
CN109189857A (en) | Data-sharing systems, method and apparatus based on block chain | |
CN110519379A (en) | Request processing method and equipment based on micro services | |
CN110493350A (en) | File uploading method and device, electronic equipment and computer-readable medium | |
CN108733720A (en) | The on-line testing method and check system of the SQL query of multiple database type | |
CN110198248A (en) | The method and apparatus for detecting IP address | |
CN109388626A (en) | Method and apparatus for being numbered to traffic assignments | |
CN108933695A (en) | Method and apparatus for handling information | |
CN109241722A (en) | For obtaining method, electronic equipment and the computer-readable medium of information | |
CN110069911A (en) | Access control method, device, system, electronic equipment and readable storage medium storing program for executing | |
CN109766708A (en) | Access method, system, computer system and the storage medium of data resource | |
CN109640176A (en) | Method and apparatus for generating information | |
US11632411B2 (en) | Method and apparatus for cascaded multi-input content preparation templates for 5G networks | |
CN109005208A (en) | Method and apparatus for pushed information | |
CN109656799A (en) | Test method and device | |
CN108880923A (en) | The method and apparatus that policer operation applied to application server is requested | |
CN109918146A (en) | Page generation method and device | |
CN107315672B (en) | Method and device for monitoring server |
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 |