CN109614255A - Processing method, device, medium and the electronic equipment of transaction request - Google Patents

Processing method, device, medium and the electronic equipment of transaction request Download PDF

Info

Publication number
CN109614255A
CN109614255A CN201811237299.7A CN201811237299A CN109614255A CN 109614255 A CN109614255 A CN 109614255A CN 201811237299 A CN201811237299 A CN 201811237299A CN 109614255 A CN109614255 A CN 109614255A
Authority
CN
China
Prior art keywords
request
hit rate
transaction request
transaction
request mechanism
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
Application number
CN201811237299.7A
Other languages
Chinese (zh)
Other versions
CN109614255B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811237299.7A priority Critical patent/CN109614255B/en
Publication of CN109614255A publication Critical patent/CN109614255A/en
Application granted granted Critical
Publication of CN109614255B publication Critical patent/CN109614255B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/004Error avoidance
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the present invention is applied to technical field of data processing, provide processing method, device, medium and the electronic equipment of a kind of transaction request, this method comprises: obtaining the transaction request from each request mechanism, judge whether the request mechanism is provided with hit rate control;If there is hit rate control in the request mechanism, according to the transaction request of the hit rate control processing request mechanism of the request mechanism;If the request mechanism is controlled without hit rate, the transaction request according to the request mechanism is that hit rate control is arranged in the request mechanism, according to the transaction request of the hit rate of the setting control processing request mechanism.In the case that the technical solution of the embodiment of the present invention can pour in a short time a large amount of transaction requests, system Intelligent Dynamic is made to identify Session loads, open fuse protection, can effectively controlled brush library behavior, improve the transaction request treatment effeciency of system.

Description

Processing method, device, medium and the electronic equipment of transaction request
Technical field
The present invention relates to technical field of data processing, in particular to a kind of processing method of transaction request, device, Medium and electronic equipment.
Background technique
Universal and netizen's quantity with mobile Internet increases sharply, and etching system transaction request amount increases severely when a certain When, it often will cause the case where system card even collapses, cause transaction request processed in time.Such as: double 11 is mad When joyous shopping website collapse or certain score query system certain time period because inquiry number leads to user too much can not be into Enter.These can all cause the case where a degree of transaction request delay process.
In the prior art, when pouring in a large amount of transaction requests in the short time, system can receive all transaction requests and It successively gives a response, system is caused to be easy to appear avalanche effect, the timeliness of transaction request processing is poor.
Therefore, the efficiency of the processing method for the transaction request that the prior art provides is to be improved.
It should be noted that information is only used for reinforcing the reason to background of the invention disclosed in above-mentioned background technology part Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
The processing method for being designed to provide a kind of transaction request, device, medium and the electronic equipment of the embodiment of the present invention, And then the defect for overcoming the processing method efficiency of the transaction request provided in the prior art to be improved at least to a certain extent.
Other characteristics and advantages of the invention will be apparent from by the following detailed description, or partially by the present invention Practice and acquistion.
According to a first aspect of the embodiments of the present invention, a kind of processing method of transaction request is provided, comprising: acquisition comes from The transaction request of each request mechanism, judges whether the request mechanism is provided with hit rate control;If the request mechanism has Hit rate control, then according to the transaction request of the hit rate control processing request mechanism of the request mechanism;If described ask It asks mechanism to control without hit rate, is then that hit rate control is arranged in the request mechanism according to the transaction request of the request mechanism, According to the transaction request of the hit rate of the setting control processing request mechanism.
In some embodiments of the invention, aforementioned schemes, the corresponding interface of each request mechanism are based on;Described in judgement Whether request mechanism is provided with hit rate control, comprising: judges this by the way that whether each interface of acquisition includes hit rate control Whether the corresponding request mechanism of interface is provided with hit rate control.
In some embodiments of the invention, aforementioned schemes are based on, are handled according to the hit rate control of the request mechanism The transaction request of the request mechanism, comprising: by the hit rate of the corresponding interface of inquiry request mechanism, to control request mechanism Transaction request success rate.
In some embodiments of the invention, aforementioned schemes are based on, the hit of the corresponding interface of inquiry request mechanism is passed through Rate, to control the success rate for the transaction request for requesting mechanism, comprising: determined according to the hit rate of the request mechanism inquired It is successfully processed the probability of the transaction request of the request mechanism;For not being successfully processed in the transaction request of the request mechanism Transaction request, it is unified to return to miss results.
In some embodiments of the invention, aforementioned schemes are based on, if the request mechanism is controlled without hit rate, basis The transaction request of the request mechanism is that hit rate control is arranged in the request mechanism, comprising: if it is corresponding to determine request mechanism Interface without hit rate control when, record the transaction request from destination request mechanism request time be more than preset time threshold Request number of times then open fuse protection when request number of times reaches preset times threshold value, and set for the destination request mechanism Set hit rate control.
In some embodiments of the invention, aforementioned schemes are based on, unlatching fuse protection includes: will be for destination request machine The request time of the transaction request of structure is more than that the transaction request of preset time threshold is cached in Redis.
In some embodiments of the invention, aforementioned schemes are based on, hit rate is set for the destination request mechanism and is controlled, Include: database is initialised to DML script or by page setup by way of to be set as the destination request mechanism corresponding Interface be arranged hit rate, to control the transaction request of the destination request mechanism.
According to a second aspect of the embodiments of the present invention, a kind of processing unit of transaction request is provided, comprising: obtain mould Block judges whether the request mechanism is provided with hit rate control for obtaining the transaction request from each request mechanism;The One processing module is handled if having hit rate control for the request mechanism according to the hit rate control of the request mechanism The transaction request of the request mechanism;Second processing module, if being controlled for the request mechanism without hit rate, according to The transaction request for requesting mechanism is that hit rate control is arranged in the request mechanism, according to described in the hit rate control of setting processing Request the transaction request of mechanism.
According to a third aspect of the embodiments of the present invention, a kind of computer-readable medium is provided, computer is stored thereon with Program realizes the processing side of the transaction request as described in first aspect in above-described embodiment when described program is executed by processor Method.
According to a fourth aspect of the embodiments of the present invention, a kind of electronic equipment is provided, comprising: one or more processors; Storage device, for storing one or more programs, when one or more of programs are held by one or more of processors When row, so that one or more of processors realize the processing side of the transaction request as described in first aspect in above-described embodiment Method.
Technical solution provided in an embodiment of the present invention can include the following benefits:
In the technical solution provided by some embodiments of the present invention, on the one hand, come from each request machine by obtaining The transaction request of structure, and then judge whether the request mechanism is provided with hit rate control, it enables the system in batches to friendship Easily request is handled, to effectively improve the processing speed of system.On the other hand, if there is hit rate control in the request mechanism System avoids transaction request and exists then according to the transaction request of the hit rate control processing request mechanism of the request mechanism Bulk deposition in short time.Further, if the request mechanism is controlled without hit rate, according to the friendship of the request mechanism Easily request is that hit rate control is arranged in the request mechanism, according to the friendship of the hit rate of the setting control processing request mechanism Easily request.By the way that the hit rate control is arranged, when pouring in a large amount of requests in a short time, system being capable of Intelligent Dynamic identification Session loads open fuse protection, also protect up-stream system while ensuring this system stability, can effectively control Library behavior is brushed, the transaction request treatment effeciency of system is improved.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.It should be evident that the accompanying drawings in the following description is only the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.In the accompanying drawings:
Fig. 1 diagrammatically illustrates the processing method flow chart of the transaction request of embodiment according to the present invention;
Fig. 2 diagrammatically illustrates the processing method flow chart of transaction request according to another embodiment of the present invention;
Fig. 3 diagrammatically illustrates the processing unit block diagram of the transaction request of embodiment according to the present invention;
Fig. 4 shows the structural schematic diagram for being suitable for the computer system for the electronic equipment for being used to realize the embodiment of the present invention.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the present invention will more Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner In example.In the following description, many details are provided to provide and fully understand to the embodiment of the present invention.However, It will be appreciated by persons skilled in the art that technical solution of the present invention can be practiced without one or more in specific detail, Or it can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side Method, device, realization or operation are to avoid fuzzy each aspect of the present invention.
Block diagram shown in the drawings is only functional entity, not necessarily must be corresponding with physically separate entity. I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all content and operation/step, It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close And or part merge, therefore the sequence actually executed is possible to change according to the actual situation.
In the prior art, when pouring in a large amount of transaction requests in the short time, system receive all transaction requests and according to It is secondary to give a response, cause system avalanche effect easily occur, be deteriorated to the timeliness that downstream request is responded, sacrifices downstream experience; Meanwhile lacking intelligent fusing mechanism in the prior art, lack brush library behavior controls means.Thus, use is in the prior art Method can not be effectively treated transaction request, and treatment effeciency and processing quality are to be improved.
In the present embodiment, a kind of processing method of transaction request is provided firstly, is overcome at least to a certain extent existing The defect for having the processing method efficiency of the transaction request provided in technology to be improved.
Fig. 1 diagrammatically illustrates the processing method flow chart of transaction request according to an embodiment of the invention, at this The executing subject of reason method can be the processing server of transaction request.
With reference to Fig. 1, the processing method of transaction request according to an embodiment of the invention the following steps are included:
Step S101 obtains the transaction request from each request mechanism, judges whether the request mechanism is provided with life Middle rate control;
Step S102, if there is hit rate control in the request mechanism, at the hit rate control according to the request mechanism Manage the transaction request of the request mechanism;
Step S103, if the request mechanism is controlled without hit rate, the transaction request according to the request mechanism is institute It states request mechanism setting hit rate to control, according to the transaction request of the hit rate of the setting control processing request mechanism.
In technical solution provided by embodiment shown in Fig. 1, on the one hand, by obtaining the friendship from each request mechanism Easily request, and then judge whether the request mechanism is provided with hit rate control, it enables the system in batches to transaction request It is handled, to effectively improve the processing speed of system.On the other hand, it if there is hit rate control in the request mechanism, presses According to the transaction request of the hit rate control processing request mechanism of the request mechanism, transaction request is avoided in a short time Bulk deposition.Further, if the request mechanism is controlled without hit rate, the transaction request according to the request mechanism is The request mechanism setting hit rate controls, according to the transaction request of the hit rate of the setting control processing request mechanism. By the way that hit rate control is arranged, when pouring in a large amount of requests in a short time, system can Intelligent Dynamic identification transaction it is negative It carries, opens fuse protection, also protect up-stream system while ensuring this system stability, can effectively control brush library row To improve the transaction request treatment effeciency of system.
The specific implementation process of each step in Fig. 1 is described in detail below:
In the exemplary embodiment, in step s101, the transaction request from each request mechanism is obtained, judges institute State whether request mechanism is provided with hit rate control.
In the exemplary embodiment, the corresponding interface of each request mechanism, corresponding one, each interface fixed mutual Networking protocol address (Internet Protocol Address, referred to as: IP address), system can be by IP address to difference Interface identified, in turn, by interface obtain from it is each request mechanism transaction request.If the interface packet got It is controlled containing hit rate, then may determine that the corresponding request mechanism of the interface is controlled comprising hit rate.Such as: request mechanism a is logical It crosses interface A and sends transaction request to system, and interface A is provided with the hit rate that hit rate is s% and controls, then system is to request machine The hit rate of structure a setting is s%, i.e., has s% normally to be handled by system in the transaction request that request mechanism a is issued by interface A And acquire data source;Miss part in transaction request for requesting mechanism a, then system uniformly returns to miss results, I.e. for the transaction request of miss, mechanism is requested not acquire data source, so that malice be avoided to brush library.
In the exemplary embodiment, in step s 102, if there is hit rate control in the request mechanism, according to described Request the transaction request of the hit rate control processing request mechanism of mechanism.
In the exemplary embodiment, it if the corresponding interface of request mechanism is controlled comprising hit rate, may determine that The request mechanism is controlled comprising hit rate.Successfully locate firstly, it is necessary to be determined according to the hit rate of the request mechanism inquired The probability for managing the transaction request of the request mechanism determines success by the hit rate of the corresponding interface of inquiry request mechanism The probability of the transaction request of processing request mechanism.At this point, transaction request will appear hit part and miss part, for request The part handled not successfully in the transaction request of mechanism, system can be unified to return to miss results.Such as: request mechanism is corresponding Hit rate is 50%, and the quantity of transaction request is 20, then, the probability for being successfully processed the transaction request is 50%, i.e., 10 Transaction request is successfully processed.For other 10 transaction requests, system can be unified to return to miss results, and echo plex mode can To be text, voice, either statically or dynamically one or more of image, such as: " the interface hit rate has expired, and please don't repeat to send out It send!".At this point, can also have other modes for returning to miss results, as: system according to transmission interface respectively to miss Interface sends miss results and miss prompt.
In the exemplary embodiment, in step s 103, if the request mechanism is controlled without hit rate, according to The transaction request for requesting mechanism is that hit rate control is arranged in the request mechanism, according to described in the hit rate control of setting processing Request the transaction request of mechanism.
Fig. 2 diagrammatically illustrates the processing method flow chart of transaction request according to another embodiment of the present invention;With reference to The specific implementation process of Fig. 2, step S201-S203 are with step S101- step S102, and details are not described herein.
In the exemplary embodiment, if determine the corresponding interface of request mechanism without hit rate control, the present embodiment Following steps are also provided:
In step S204, the request time of transaction request of the record from destination request mechanism is more than preset time threshold Request number of times.
In the exemplary embodiment, if the corresponding interface of request mechanism is controlled not comprising hit rate, then it is assumed that this is asked It asks mechanism to control without hit rate, and thinks that this request mechanism is destination request structure.At this point, system is to from the request mechanism It can be embedded in a script before transaction request number is recorded, in system, time threshold is set in content for script, when described Between threshold value be destination request mechanism the corresponding transaction request of interface request time set by threshold value, for recording destination request The request time of the corresponding transaction request of the interface of mechanism is greater than the number of the time threshold.Such as: it is set in content for script Setting time threshold is 20 seconds, then the request time for recording the transaction request that the interface B of destination request mechanism b is sent out is greater than 20 seconds Request number of times.Meanwhile content for script also sets up frequency threshold value, the frequency threshold value is that the interface of destination request mechanism is corresponding The request time of transaction request is greater than the request number of times of above-mentioned time threshold, and use is to determine whether need to the target transaction machine The corresponding interface of structure opens fuse protection.Such as: it is 10 times that frequency threshold value is arranged in content for script, then destination request mechanism b The request time of transaction request that sends out of interface B when being greater than the request number of times of time threshold and being greater than 10 times, then need to institute It states the corresponding interface B of target transaction mechanism b and opens fuse protection.
In the exemplary embodiment, when the request time of the interface B of the destination request mechanism b transaction request sent out is big When the request number of times of time threshold is not up to preset times threshold value, system normally handles the transaction request received.To protect The timely processing for the normal transaction request that card request mechanism b is sent out.For example, system can call corresponding processing unit processes The transaction request.
In step S205, when request number of times reaches preset times threshold value, then fuse protection is opened, and be the target Mechanism setting hit rate is requested to control.
In the exemplary embodiment, the request time of the transaction request for destination request mechanism is more than default by system The transaction request of time threshold is cached in Redis.Wherein, Redis is being write, supported using ANSI C language for an open source Network, it is memory-based also can persistence log type Key-Value database.
In the exemplary embodiment, when the request time of the interface B of the destination request mechanism b transaction request sent out is big When the request time of time threshold is greater than and reaches preset times threshold value, then system is opened fusing to the interface B of destination request machine b and is protected Shield.To one or more the case where requesting mechanisms volume business request simultaneously, if being handled and can be made by traditional queue mode When at handling the bad problem of timeliness, and use the fuse protection mechanism in the present embodiment, it can ensure to each interface Handle timeliness.
In the exemplary embodiment, preset times threshold value can be set to 10 times, then the interface pair of destination request mechanism When the request number of times that the request time for the transaction request answered is greater than time threshold is greater than 10 times, then need to the target transaction machine The corresponding interface of structure opens fuse protection, i.e., disconnects to the corresponding transaction request of overage, no longer receive its transaction and ask It asks.
In the exemplary embodiment, when system can also be more than the request time of the transaction request of destination request mechanism Between the transaction request of threshold value be cached in other databases.Illustratively, if for personal or medium-sized and small enterprises, Ke Yixuan MySQL is selected, MySQL is that open source is free, can substantially reduce cost, and server is fast and reliable, and software is more to be easy to use. If more can choose SQL Server for storing data on Web, it passes through Web (global wide area network or Wan Wei Net) to the light safe access of data, there is the application program management based on Web and shirtsleeve operation interface, be convenient for user It uses.If laying particular emphasis on the safety and reliability of protection data, Oracle can choose, it has complete data management function Can, it can guarantee reliability, a large amount of property and persistence that data save.In addition to this it is possible to select other databases Management system all belongs to the scope of protection of the present invention.
In the exemplary embodiment, while opening fuse protection mechanism for destination request mechanism, DML can also be passed through Script is initialised to database or the hit rate of the corresponding interface of destination request mechanism is arranged by way of page setup, thus The transaction request of destination request mechanism is controlled.Referring to above-mentioned steps, can also be received within a preset time according to system The transaction request quantity from each interface arrived requests mechanism that corresponding hit rate control is arranged for it.Such as: system was at 1 minute Inside receiving the transaction request quantity from interface is 20, and preset times threshold value is 10, then it can be arranged accordingly The hit rate for requesting mechanism is 50%.Can also have other set-up modes is destination request mechanism setting hit rate score, It belongs to the scope of protection of the present invention.
In the exemplary embodiment, after hit rate being arranged to target transaction mechanism, system is restored to receive transaction request And the request that the destination request mechanism is sent is handled according to the hit rate of setting.The request of system processing can be other ask The new transaction request for asking mechanism to send, can also after the preset lime, and system is transmitted across before detecting from database The non-duplicate hit rate interface of transaction request, first handles the transaction request of these interfaces, then receives new transaction again Request.It can guarantee that system can be handled orderly in the case where a large amount of requests in this way, avoid the collapse of Caton and system, Improve treatment effeciency.Moreover, detecting by the hit rate of distinct interface, can be avoided brush library behavior, ensure that certain platforms or Person APP carries out the movable fairness such as vote.
The device of the invention embodiment introduced below can be used for executing the processing side of the above-mentioned transaction request of the present invention Method.
Fig. 3 diagrammatically illustrates the processing unit block diagram of transaction request according to an embodiment of the invention, the processing Device can be set in the server of transaction request processing.
Referring to shown in Fig. 3, transaction request processing unit block diagram 300 according to an embodiment of the invention, including it is as follows Module: module 301, first processing module 302 and Second processing module 303 are obtained, is illustrated in detailed below:
Module 301 is obtained, for obtaining the transaction request from each request mechanism, judges whether the request mechanism sets It is equipped with hit rate control.
In the exemplary embodiment, the corresponding interface of each request mechanism, the corresponding corresponding request machine of each interface Structure.If the interface got is controlled comprising hit rate, it may determine that the corresponding request mechanism of the interface includes hit rate Control.Such as: request mechanism a sends transaction request to system by interface A, and interface A is provided with the hit that hit rate is s% Rate control, then system is s% to the hit rate of request mechanism a setting.
First processing module 302, if having hit rate control for the request mechanism, according to the life of the request mechanism The transaction request of the middle rate control processing request mechanism.
In the exemplary embodiment, if request mechanism include hit rate control, first processing module according to The hit rate of the request mechanism inquired determines the probability for being successfully processed the transaction request of the request mechanism.For request mechanism Miss part in transaction request, first processing module can be unified to return to miss results.Such as: the corresponding life of request mechanism Middle rate is 50%, and the quantity of transaction request is 20, then, the probability for being successfully processed the transaction request is also 50%, i.e., should The successful quantity of transaction request is 10, and for other 10 transaction requests, first processing module can be unified to return to miss knot Fruit, echo plex mode can be text, voice, either statically or dynamically one or more of image, such as: " the interface hit rate is It is full, it please don't repeat to send!".At this point, can also have other modes for returning to miss results, such as: first processing module is according to hair Interface is sent to send miss results and miss prompt to the interface of miss respectively.
Second processing module 303, if being controlled for the request mechanism without hit rate, according to the friendship of the request mechanism Easily request is that hit rate control is arranged in the request mechanism, according to the friendship of the hit rate of the setting control processing request mechanism Easily request.
In the exemplary embodiment, if the request mechanism is controlled without hit rate, Second processing module is automatically recorded The time of transaction request from request mechanism is more than that the number of certain designated value is in turn described according to the transaction request number Mechanism setting hit rate is requested to control.Meanwhile database can be initialised to DML script or by page setup by way of The hit rate of each interface is set, to control the transaction request of each interface.
Since each functional module of the processing unit of the transaction request of example embodiments of the present invention is asked with above-mentioned transaction The step of example embodiment for the processing method asked, is corresponding, therefore for undisclosed details in apparatus of the present invention embodiment, asks Referring to the embodiment of the processing method of the above-mentioned transaction request of the present invention.
Below with reference to Fig. 4, it illustrates the computer systems 400 for the electronic equipment for being suitable for being used to realize the embodiment of the present invention Structural schematic diagram.The computer system 400 of electronic equipment shown in Fig. 4 is only an example, should not be to the embodiment of the present invention Function and use scope bring any restrictions.
As shown in figure 4, computer system 400 includes central processing unit (CPU) 401, it can be read-only according to being stored in Program in memory (ROM) 402 or be loaded into the program in random access storage device (RAM) 403 from storage section 408 and Execute various movements appropriate and processing.In RAM 403, it is also stored with various programs and data needed for system operatio.CPU 401, ROM 402 and RAM 403 is connected with each other by bus 404.Input/output (I/O) interface 405 is also connected to bus 404。
I/O interface 405 is connected to lower component: the importation 406 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 407 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 408 including hard disk etc.; And the communications portion 409 of the network interface card including LAN card, modem etc..Communications portion 409 via such as because The network of spy's net executes communication process.Driver 410 is also connected to I/O interface 405 as needed.Detachable media 411, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 410, in order to read from thereon Computer program be mounted into storage section 408 as needed.
Particularly, according to an embodiment of the invention, may be implemented as computer above with reference to the process of flow chart description Software program.For example, the embodiment of the present invention 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 409, and/or from detachable media 411 are mounted.When the computer program is executed by central processing unit (CPU) 401, executes and limited in the system of the application Above-mentioned function.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium can be for example but not limited to Electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.It is computer-readable The more specific example of storage medium can include but is not limited to: have electrical connection, the portable computing of one or more conducting wires Machine disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM Or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned Any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage program it is tangible Medium, the program can be commanded execution system, device or device use or in connection.And in the present invention, Computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated, wherein carrying Computer-readable program code.The data-signal of this propagation can take various forms, and including but not limited to electromagnetism is believed Number, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable storage medium Any computer-readable medium other than matter, the computer-readable medium can be sent, propagated or transmitted for being held by instruction Row system, device or device use or program in connection.The program code for including on computer-readable medium It can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. or above-mentioned any conjunction Suitable combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, 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 above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On 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 wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in unit involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part realizes that 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 electronic equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying electronic equipment. Above-mentioned computer-readable medium carries one or more program, when the electronics is set by one for said one or multiple programs When standby execution, so that the electronic equipment realizes the processing method such as above-mentioned transaction request as described in the examples.
For example, the electronic equipment may be implemented as shown in Figure 1: step S101 is obtained and is come from each request machine The transaction request of structure, judges whether the request mechanism is provided with hit rate control;Step S102, if there is life in the request mechanism Middle rate control, then according to the transaction request of the hit rate control processing request mechanism of the request mechanism;Step S103, if The request mechanism is controlled without hit rate, then is that hit rate is arranged in the request mechanism according to the transaction request of the request mechanism Control, according to the transaction request of the hit rate of the setting control processing request mechanism.For another example, the electronic equipment can be with Realize each step as shown in Figure 2.
It should be noted that although being referred to several modules or list for acting the equipment executed in the above detailed description Member, but this division is not enforceable.In fact, embodiment according to the present invention, it is above-described two or more Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould The feature and function of block or unit can be to be embodied by multiple modules or unit with further division.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server, touch control terminal or network equipment etc.) executes embodiment according to the present invention Method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of processing method of transaction request characterized by comprising
The transaction request from each request mechanism is obtained, judges whether the request mechanism is provided with hit rate control;
If there is hit rate control in the request mechanism, the request mechanism is handled according to the hit rate control of the request mechanism Transaction request;
If the request mechanism is controlled without hit rate, the transaction request according to the request mechanism is request mechanism setting Hit rate control, according to the transaction request of the hit rate of the setting control processing request mechanism.
2. the method according to claim 1, wherein each request mechanism corresponds to an interface;
Judge whether the request mechanism is provided with hit rate control, comprising:
Judge whether the corresponding request mechanism of this interface is provided with life by the way that whether each interface of acquisition includes hit rate control Middle rate control.
3. according to the method described in claim 2, it is characterized in that, according to described in the hit rate control processing for requesting mechanism Request the transaction request of mechanism, comprising:
By the hit rate of the corresponding interface of inquiry request mechanism, to control the success rate for the transaction request for requesting mechanism.
4. according to the method described in claim 3, it is characterized in that, by the hit rate of the corresponding interface of inquiry request mechanism, To control the success rate for the transaction request for requesting mechanism, comprising:
The probability for being successfully processed the transaction request of the request mechanism is determined according to the hit rate of the request mechanism inquired;
It is unified to return to miss results for the transaction request not being successfully processed in the transaction request of the request mechanism.
5. the method according to claim 1, wherein if the request mechanism is controlled without hit rate, according to institute The transaction request for stating request mechanism is that hit rate control is arranged in the request mechanism, comprising:
If determine the corresponding interface of request mechanism without hit rate control, transaction request of the record from destination request mechanism Request time is more than the request number of times of preset time threshold;
When request number of times reaches preset times threshold value, then fuse protection is opened, and is destination request mechanism setting hit Rate control.
6. according to the method described in claim 5, it is characterized in that, unlatching fuse protection includes:
The transaction request that the request time of transaction request for destination request mechanism is more than preset time threshold is cached in In Redis.
7. according to the method described in claim 5, being controlled it is characterized in that, hit rate is arranged for the destination request mechanism, packet It includes:
Be initialised to database DML script or by page setup by way of to be set as the destination request mechanism corresponding Hit rate is arranged in interface, to control the transaction request of the destination request mechanism.
8. a kind of processing unit of transaction request characterized by comprising
Module is obtained, for obtaining the transaction request from each request mechanism, judges whether the request mechanism is provided with life Middle rate control;
First processing module, if having hit rate control for the request mechanism, according to the hit rate control of the request mechanism The transaction request of the system processing request mechanism;
Second processing module, if being controlled for the request mechanism without hit rate, according to the transaction request of the request mechanism Hit rate is arranged for the request mechanism to control.
9. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is executed by processor The processing method of transaction request of the Shi Shixian as described in any one of claims 1 to 7.
10. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing When device executes, so that one or more of processors realize the place of the transaction request as described in any one of claims 1 to 7 Reason method.
CN201811237299.7A 2018-10-23 2018-10-23 Transaction request processing method, device, medium and electronic equipment Active CN109614255B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811237299.7A CN109614255B (en) 2018-10-23 2018-10-23 Transaction request processing method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811237299.7A CN109614255B (en) 2018-10-23 2018-10-23 Transaction request processing method, device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN109614255A true CN109614255A (en) 2019-04-12
CN109614255B CN109614255B (en) 2023-04-07

Family

ID=66002041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811237299.7A Active CN109614255B (en) 2018-10-23 2018-10-23 Transaction request processing method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109614255B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408088A (en) * 2014-11-11 2015-03-11 北京奇虎科技有限公司 Control method and device for concurrent requests
CN105282047A (en) * 2015-09-25 2016-01-27 小米科技有限责任公司 Access request processing method and device
CN107172171A (en) * 2017-05-27 2017-09-15 腾讯科技(深圳)有限公司 A kind of service request processing method, device and computer-readable recording medium
CN107609976A (en) * 2017-09-25 2018-01-19 中国银行股份有限公司 The current-limiting method and device of a kind of transaction interface
CN108306859A (en) * 2017-12-27 2018-07-20 五八有限公司 Method, equipment and the computer readable storage medium of limiting server visit capacity
CN108540468A (en) * 2018-04-02 2018-09-14 携程旅游信息技术(上海)有限公司 The control of request and method for routing and its system, storage medium, electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408088A (en) * 2014-11-11 2015-03-11 北京奇虎科技有限公司 Control method and device for concurrent requests
CN105282047A (en) * 2015-09-25 2016-01-27 小米科技有限责任公司 Access request processing method and device
CN107172171A (en) * 2017-05-27 2017-09-15 腾讯科技(深圳)有限公司 A kind of service request processing method, device and computer-readable recording medium
CN107609976A (en) * 2017-09-25 2018-01-19 中国银行股份有限公司 The current-limiting method and device of a kind of transaction interface
CN108306859A (en) * 2017-12-27 2018-07-20 五八有限公司 Method, equipment and the computer readable storage medium of limiting server visit capacity
CN108540468A (en) * 2018-04-02 2018-09-14 携程旅游信息技术(上海)有限公司 The control of request and method for routing and its system, storage medium, electronic equipment

Also Published As

Publication number Publication date
CN109614255B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
US10574545B2 (en) Techniques for analytics-driven hybrid concurrency control in clouds
US10217053B2 (en) Provisioning service requests in a computer system
CN107395665A (en) A kind of block chain service handling and business common recognition method and device
CN110443695A (en) Data processing method and its device, electronic equipment and medium
KR101588932B1 (en) Security through metadata orchestrators
CN109684358A (en) The method and apparatus of data query
CN109743392A (en) A kind of load-balancing method, device, electronic equipment and storage medium
US20140006657A1 (en) Optimizing an operating system i/o operation that pertains to a specific program and file
US20090049450A1 (en) Method and system for component load balancing
CN109299348A (en) A kind of data query method, apparatus, electronic equipment and storage medium
US9852071B2 (en) Granting exclusive cache access using locality cache coherency state
CN109710615A (en) Access management method, system, electronic equipment and the storage medium of database
CN109685295A (en) Cargo, which is pulled, receives dispatching method and device, storage medium, electronic equipment
CN108921712A (en) Data processing method, device, medium and electronic equipment
CN109344142A (en) Data processing method, device, electronic equipment and storage medium
CN109218356A (en) The method and apparatus of stateful application in management server
CN110019263A (en) Information storage means and device
CN109933422A (en) Method, apparatus, medium and the electronic equipment of processing task
CN103294556A (en) Method and system for host system admission control
CN109597810A (en) A kind of task cutting method, device, medium and electronic equipment
CN109583873A (en) Transaction communications method, server, POS machine and electronic equipment
CN109344152A (en) Data processing method, device, electronic equipment and storage medium
CN108763517A (en) A kind of method and relevant device for deleting metadata
CN110020271A (en) Method and system for cache management
CN109683942A (en) Script management method, device, medium and electronic equipment

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