CN114338811B - Transaction flow limiting method, device, server, storage medium and product - Google Patents

Transaction flow limiting method, device, server, storage medium and product Download PDF

Info

Publication number
CN114338811B
CN114338811B CN202111667857.5A CN202111667857A CN114338811B CN 114338811 B CN114338811 B CN 114338811B CN 202111667857 A CN202111667857 A CN 202111667857A CN 114338811 B CN114338811 B CN 114338811B
Authority
CN
China
Prior art keywords
transaction
server
current
preset
current limiting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111667857.5A
Other languages
Chinese (zh)
Other versions
CN114338811A (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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202111667857.5A priority Critical patent/CN114338811B/en
Publication of CN114338811A publication Critical patent/CN114338811A/en
Application granted granted Critical
Publication of CN114338811B publication Critical patent/CN114338811B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

  • Telephonic Communication Services (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a transaction flow limiting method, a transaction flow limiting device, a server, a storage medium and a product. The method comprises the following steps: receiving a transaction request sent by a user terminal, and determining a transaction server corresponding to the transaction request; acquiring a current service timeout rate corresponding to the transaction server, and determining a current limiting grade corresponding to the transaction server according to the current service timeout rate corresponding to the transaction server; determining whether to limit the flow of the transaction request according to the corresponding flow limit level of the transaction server; if not, the transaction request is sent to the transaction server; if yes, intercepting the transaction request. According to the method, the current server timeout rate is used for determining the current limiting level of the server, so that whether the transaction request is forwarded to the server is determined according to the current limiting level, the current limiting mode is more reasonable, the transaction efficiency can be effectively improved, and the fact that the load of the server is not overrun can be ensured.

Description

Transaction flow limiting method, device, server, storage medium and product
Technical Field
The present disclosure relates to the field of information processing technologies, and in particular, to a transaction flow limiting method, device, server, storage medium, and product.
Background
With the continuous development and scale expansion of the internet financial industry, the explosive development of internet financial services such as online shopping, online financing, online loan and the like, the relation of the mutual calling of the information systems of the financial transactions is also gradually complicated. Banking information systems generally face large-scale request transactions, if a preceding node in the system cannot detect service acceptance capability of a subsequent service node in a synchronous mode, and further cannot limit transaction flow to be forwarded to the subsequent service node, a great deal of occupation of progress and thread resources of the preceding node can be caused when the response time of the subsequent service node is abnormally increased, and chain reaction occurs when serious response occurs, so that the system is paralyzed.
The current flow limiting mode is to limit the flow by the request quantity of the requesting party, mainly to place the request transaction in a container first, and if the request quantity waiting for processing is too large, the container overflows, thereby indirectly achieving the effect of rejecting part of the transaction, and further limiting the flow.
However, the number of requests that the container can carry is preset, and cannot be dynamically adjusted according to the actual conditions of the transaction, and if the number of requests is improperly set, flow restriction cannot be effectively performed.
Disclosure of Invention
The application provides a transaction flow limiting method, a device, a server, a storage medium and a product, which are used for solving the problem that the current transaction flow limiting mode cannot effectively limit flow.
In a first aspect, the present application provides a transaction throttling method, comprising:
receiving a transaction request sent by a user terminal, and determining a transaction server corresponding to the transaction request;
acquiring a current service timeout rate corresponding to the transaction server, and determining a current limiting grade corresponding to the transaction server according to the current service timeout rate corresponding to the transaction server;
determining whether to limit the flow of the transaction request according to the corresponding flow limit level of the transaction server;
if not, forwarding the transaction request to the transaction server;
and if not, intercepting the transaction request.
In a second aspect, the present application provides a transaction flow restricting device comprising:
the receiving unit is used for receiving the transaction request sent by the user terminal and determining a transaction server corresponding to the transaction request;
the determining unit is used for obtaining the current service timeout rate corresponding to the transaction server and determining the current limiting grade corresponding to the transaction server according to the current service timeout rate corresponding to the transaction server;
the determining unit is further used for determining whether to limit the flow of the transaction request according to the corresponding flow limit level of the transaction server;
a forwarding unit, configured to forward the transaction request to the transaction server if not;
and the interception unit is used for intercepting the transaction request if not.
In a third aspect, the present invention provides a server comprising: a processor, a memory, and a transceiver;
a processor, memory, and transceiver circuitry interconnect;
a transceiver for transceiving data and requests;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to cause the processor to perform the method as described in the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored therein computer-executable instructions for performing the method according to the first aspect when executed by a processor.
In a fifth aspect, the invention provides a computer program product comprising a computer program which, when executed by a processor, implements the method of the first aspect.
The transaction flow limiting method, the device, the server, the storage medium and the product provided by the application determine a transaction server corresponding to a transaction request by receiving the transaction request sent by a user terminal; acquiring a current service timeout rate corresponding to the transaction server, and determining a current limiting grade corresponding to the transaction server according to the current service timeout rate corresponding to the transaction server; determining whether to limit the flow of the transaction request according to the corresponding flow limit level of the transaction server; if not, forwarding the transaction request to the transaction server; if not, intercepting the transaction request, and determining the current limiting grade through the current service timeout rate, so that whether the transaction request is forwarded or not is determined according to the current limiting grade, and compared with the existing method for limiting the current transaction amount, the method is more reasonable, the transaction can be effectively limited, and the load of a server can be ensured not to exceed the limit.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a schematic diagram of a network architecture of a transaction throttling method according to the present invention;
FIG. 2 is a flow chart of a transaction flow restriction method according to an embodiment of the invention;
FIG. 3 is a flow chart of a transaction flow restriction method according to a second embodiment of the present invention;
FIG. 4 is a flow chart of a transaction flow restriction method according to a fifth embodiment of the present invention;
FIG. 5 is a schematic diagram of a transaction flow restrictor according to an embodiment of the present invention;
FIG. 6 is a block diagram of a server used to implement a transaction throttling method of an embodiment of the invention.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
For a clear understanding of the technical solutions of the present application, the prior art solutions will be described in detail first.
With the continuous development and scale expansion of the internet financial industry, the explosive development of internet financial services such as online shopping, online financing, online loan and the like, the relation of the mutual calling of the information systems of the financial transactions is also gradually complicated. Banking information systems generally face large-scale request transactions, if a preceding node in the system cannot detect service acceptance capability of a subsequent service node in a synchronous mode, and further cannot limit transaction flow to be forwarded to the subsequent service node, a great deal of occupation of progress and thread resources of the preceding node can be caused when the response time of the subsequent service node is abnormally increased, and chain reaction occurs when serious response occurs, so that the system is paralyzed.
Currently, traffic is limited by the number of requesters requesting, for example: the request transaction is firstly placed in the container, if the request waiting to be processed is overlarge, the container overflows, and the effect of rejecting part of the transaction is indirectly achieved, so that the flow is limited. Currently Google provides a token bucket algorithm based throttling tool to implement the throttling function, the principle of the token bucket algorithm is that the system puts tokens into the bucket at a constant speed, and if a request needs to be processed, a token needs to be acquired from the bucket first, and when no token is advisable in the bucket, service is refused.
However, the number of requests that the container can carry is preset, and cannot be dynamically adjusted according to the actual conditions of the transaction, and if the number of requests is improperly set, the flow cannot be effectively limited. The current-limiting tool performs too single function and lacks flexibility.
Therefore, the inventor finds in the research that the current transaction flow limiting mode cannot effectively limit the flow, further determines a corresponding transaction server according to the transaction request sent by the user terminal, acquires the current service timeout rate corresponding to the transaction server, and determines a corresponding flow limiting grade according to the current service timeout rate, so that whether the transaction request is limited according to the flow limiting grade is determined, if so, the transaction request is intercepted, the transaction request is not forwarded to the transaction server, and if not, the transaction request is forwarded to the transaction server. The current service timeout rate is used for determining the current limit level, so that whether the transaction request is forwarded is determined according to the current limit level, and compared with the existing current mode of limiting the current transaction amount, the current limit method is more reasonable, the current limit method can effectively limit the transaction amount, and the load of a server can be ensured not to exceed the limit.
The inventor proposes the technical scheme of the embodiment of the invention based on the creative discovery. The network architecture and application scenario of the transaction flow limiting method provided by the embodiment of the invention are described below.
As shown in fig. 1, the network architecture corresponding to the transaction flow limiting method provided in the embodiment of the present invention includes: a user terminal 1, a local server 2 and a transaction server 3. The local server 2 is communicatively connected to the user terminal 1 and the transaction server 3, respectively. If the user needs to verify the transaction password during transaction operation, for example, online shopping, the user can perform transaction operation through the user terminal 1, and the user triggers a transaction request through the user terminal 1. The local server 2 receives the transaction request sent by the user terminal 1 and determines a transaction server 3 corresponding to the transaction request; acquiring the current service timeout rate corresponding to the transaction server 3, and determining the current limiting grade corresponding to the transaction server 3 according to the current service timeout rate corresponding to the transaction server 3; determining whether to limit the flow of the transaction request according to the corresponding flow limit level of the transaction server 3; if not, forwarding the transaction request to the transaction server 3; if not, intercepting the transaction request, generating the current limiting prompt information and forwarding the current limiting prompt information to the user terminal 1. The transaction server 3 receives the transaction request and performs a corresponding transaction operation, such as verifying the transaction password, according to the transaction request. The current service timeout rate is used for determining the current limit level, so that whether the transaction request is forwarded is determined according to the current limit level, and compared with the existing current mode of limiting the current transaction amount, the current limit method is more reasonable, the current limit method can effectively limit the transaction amount, and the load of a server can be ensured not to exceed the limit.
Example 1
Fig. 2 is a flow chart of a transaction flow limiting method according to an embodiment of the present invention, as shown in fig. 2, an execution subject of the transaction flow limiting method according to the embodiment is a transaction flow limiting device, and the transaction flow limiting device is located in a server, and the transaction flow limiting method according to the embodiment includes the following steps:
step 101, receiving a transaction request sent by a user terminal, and determining a transaction server corresponding to the transaction request.
In this embodiment, a transaction request sent by a user through a user terminal is received, a server corresponding to the transaction request is determined according to the transaction request, specifically, the transaction request is parsed to obtain corresponding identification information, and local preset identification information and a mapping relationship of the transaction server are obtained, wherein the identification information can be a partner identification, the transaction server can be a server corresponding to the partner, the corresponding identification information is matched with preset identification information in the mapping relationship, and the transaction server corresponding to the matched preset identification information is determined to be the transaction server corresponding to the transaction request.
Step 102, obtaining the current service timeout rate corresponding to the transaction server, and determining the current limit level corresponding to the transaction server according to the current service timeout rate corresponding to the transaction server.
In this embodiment, a current service timeout rate corresponding to the transaction server is obtained, where the current service timeout rate is calculated according to a total number of services corresponding to the latest historical transaction request and a service timeout number corresponding to the latest historical transaction request. And further determining the current limiting grade corresponding to the transaction server according to the current service timeout rate corresponding to the transaction server.
Step 103, determining whether to limit the flow of the transaction request according to the corresponding flow limit level of the transaction server.
In this embodiment, a preset current limit level is obtained, the current limit level corresponding to the transaction server is compared with the preset current limit level, and whether to limit the current of the transaction request is determined according to the comparison result.
Step 104, if not, forwarding the transaction request to the transaction server.
In this embodiment, if it is determined that the transaction request does not need to be limited, the transaction request is not intercepted at this time, and the transaction request is forwarded to the corresponding transaction server, and the transaction server performs related transaction operations according to the transaction request.
And step 105, if yes, intercepting the transaction request.
In this embodiment, if it is determined that the transaction request needs to be limited, at this time, the transaction request needs to be intercepted, and is not forwarded to the corresponding transaction server, the corresponding limitation prompting information is generated according to the transaction request, and the limitation prompting information is sent to the user terminal, so as to prompt the user to limit the transaction, and then try the transaction later.
In this embodiment, a corresponding transaction server is further determined according to a transaction request sent by a user terminal, a current service timeout rate corresponding to the transaction server is obtained, and a corresponding current limiting level is determined according to the current service timeout rate, so that whether to limit the current limit of the transaction request is determined according to the current limiting level, if yes, the transaction request is intercepted, the transaction request is not forwarded to the transaction server, and if not, the transaction request is forwarded to the transaction server. The current service timeout rate is used for determining the current limit level, so that whether the transaction request is forwarded is determined according to the current limit level, and compared with the existing current mode of limiting the current transaction amount, the current limit method is more reasonable, the current limit method can effectively limit the transaction amount, and the load of a server can be ensured not to exceed the limit.
Example two
Fig. 3 is a flow chart of a transaction flow limiting method according to a second embodiment of the present invention, as shown in fig. 3, based on the transaction flow limiting method according to the first embodiment of the present invention, step 102 is further refined, and specifically includes the following steps:
step 102a, matching the current service timeout rate corresponding to the transaction server with a preset service timeout rate range.
In this embodiment, the preset service timeout rate range includes a plurality of preset service timeout rate ranges, each preset service timeout rate range has a corresponding current limit level, and the current service timeout rate corresponding to the transaction server is matched with each preset service timeout rate range, for example, the preset service timeout rate range includes a first preset service timeout rate range [0%,9% ], and a second preset service timeout rate range [10%,100% ], where the current limit level corresponding to the first preset service timeout rate range is a first level, the first level is no current limit, and the current limit level corresponding to the second preset service timeout rate range is a second level, and the second level is current limit.
Step 102b, obtaining the current limit level corresponding to the matched preset service timeout rate range, and determining the current limit level corresponding to the matched preset service timeout rate range as the current limit level corresponding to the transaction server.
In this embodiment, the current limit level corresponding to the matched preset service timeout rate range is obtained, the current limit level is determined as the current limit level corresponding to the transaction server, for example, if the current service timeout rate corresponding to the transaction server is 50%, the 50% belongs to the second preset service timeout rate range, that is, the current service timeout rate corresponding to the transaction server is matched with the second preset service timeout rate range, the current limit level corresponding to the second preset service timeout rate range is obtained, and the current limit level corresponding to the second preset service timeout rate range is determined as the current limit level corresponding to the transaction server.
It should be noted that the preset service timeout rate range may be set according to practical situations, and is not limited to the above values, but may be other suitable values.
Example III
On the basis of the data processing method provided in the first embodiment of the present invention, step 103 is further refined, and specifically includes the following steps:
step 1031, comparing the current limit level corresponding to the transaction server with a preset current limit level, wherein the preset current limit level includes a first preset current limit level and a second preset current limit level.
In this embodiment, a preset current limiting level is obtained, where the preset current limiting level includes a first preset current limiting level and a second preset current limiting level, the preset current limiting level may be a preset current limiting level corresponding to the transaction server, the current limiting level corresponding to the transaction server is compared with the first preset current limiting level and the second preset current limiting level, and whether to perform current limiting on the transaction request is determined according to a comparison result.
Step 1032, if the current limit level corresponding to the transaction server is the first preset current limit level, determining that the transaction request is not limited.
In this embodiment, if the current limit level corresponding to the transaction server is a first preset current limit level, where the first preset current limit level may be set to be one level, that is, the current limit level corresponding to the transaction server is one level, and the one level is not current limit, it is determined that the transaction request is not current limited.
Step 1033, determining to limit the transaction request if the corresponding limit level of the transaction server is the second preset limit level.
In this embodiment, if the current limit level corresponding to the transaction server is a second preset current limit level, the second preset current limit level may be set to be a second level, that is, the current limit level corresponding to the transaction server is not the second level, and the second level is the current limit, then determining to limit the transaction request.
Example IV
On the basis of the data processing method provided in the first embodiment of the present invention, before intercepting the transaction request, step 105 further includes the following steps:
step 105a, obtain the timestamp corresponding to the transaction request, and obtain the current limiting confirmation parameter corresponding to the transaction server according to the timestamp and the current limiting level corresponding to the transaction server.
In this embodiment, a timestamp corresponding to a transaction request is obtained, a current limiting confirmation parameter corresponding to a transaction server is obtained through calculation according to the timestamp and a current limiting level corresponding to the transaction server, the timestamp is taken as a dividend, the square of the current limiting level is taken as a divisor, the current limiting level comprises 1 level, 2 level, 3 level, 4 level, 5 level, 6 level, 7 level, 8 level and 9 level, the timeout rate corresponding to each current limiting level is shown in table 1-current limiting level and timeout rate mapping table, a corresponding quotient and remainder are obtained through calculation according to the timestamp and the current limiting level, and the remainder is determined as the current limiting confirmation parameter.For example, the service timeout rate of the transaction server is 25%, the class of throttling corresponding to 25% is 2, the time corresponding to the transaction request is 9 hours 21 minutes 16 seconds 239 milliseconds, the time corresponding to the transaction request is converted into a timestamp, the timestamp corresponding to the transaction request is 092116239, 092116239 is taken as a dividend, and 2 2 As a divisor, a corresponding quotient is calculated as 23029059, a corresponding remainder is 3, and 3 is determined as the current limit confirmation parameter. For another example, the service timeout rate of the transaction server is 25%, the class of throttling corresponding to 25% is 2, the time corresponding to the transaction request is 10 hours 0 minutes 0 seconds 000 milliseconds, the time corresponding to the transaction request is converted into a time stamp, the time stamp corresponding to the transaction request is 100000000, 100000000 is taken as the dividend, 2 2 As a divisor, a corresponding quotient is calculated as 25000000, a corresponding remainder is 0, and 0 is determined as the current limit confirmation parameter. Comparing the confirmation parameter with a preset parameter.
Table 1 mapping table
Current limiting level Time out rate
1 [0,19]
2 [20,29]
3 [30,39]
4 [40,49]
5 [50,59]
6 [60,69]
7 [70,79]
8 [80,89]
9 [90,100]
It should be noted that, the level 1 is no current limitation, the level 2-9 is current limitation, the first preset current limitation level mentioned in the second embodiment may be level 1 in table 1, and the second current limitation level may be level 2 in table 1.
Step 105b, determining whether the current limit confirmation parameter is a preset parameter. If not, step 105 is performed.
In this embodiment, it is determined whether the current limit confirmation parameter corresponding to the transaction server is a preset parameter, where the preset parameter may be set to 0, and if it is determined that the current limit confirmation parameter is the preset parameter, that is, the current limit confirmation parameter is 0, the transaction request is not intercepted, and the transaction request is forwarded to the corresponding transaction server. If the current limit confirmation parameter is not the preset parameter, that is, the current limit confirmation parameter is not 0, intercepting the transaction request, not forwarding the transaction request to the corresponding transaction server, generating corresponding current limit prompt information according to the transaction request, and sending the current limit prompt information to the user terminal to prompt the user to trade the current limit, and then attempting the trade later.
In this embodiment, whether to limit the flow of the transaction request can be determined again, and if the condition is satisfied, the transaction request is intercepted; if the condition is not satisfied, forwarding the transaction request to a transaction server. The current limiting confirmation parameter is determined according to the time stamp, and whether the current limiting confirmation parameter is a preset parameter is further determined, so that the current limiting is carried out on the transaction request, the forwarding quantity of the transaction request is effectively controlled, the transaction requirements of most users can be met, the transaction congestion cannot be caused, the transaction efficiency can be effectively improved, and the fact that the load of a server is not overrun can be ensured.
Example five
Fig. 4 is a flow chart of a transaction flow limiting method according to a fifth embodiment of the present invention, as shown in fig. 4, based on the transaction flow limiting method according to the first embodiment of the present invention, before step 102, the method further includes the following steps:
step 1021, obtaining the total number of service times corresponding to the latest historical transaction request in a preset time range corresponding to the transaction server, and determining the service timeout number corresponding to the latest historical transaction request.
In this embodiment, a historical transaction request corresponding to a transaction server is collected in advance, a total number of services corresponding to a latest historical transaction request in a preset time range corresponding to the transaction server is obtained from the historical transaction request corresponding to the transaction server, and a service timeout number corresponding to the latest historical transaction request is further determined, where the service timeout is a time that a service response time exceeds a set time, and the service response time is a time taken by a local server to forward the transaction request to the transaction server until a response fed back by the transaction server is received.
Step 1022, determining the current service timeout rate corresponding to the transaction server according to the total service times corresponding to the latest historical transaction request and the service timeout times corresponding to the latest historical transaction request.
In this embodiment, the total number of service times corresponding to the latest historical transaction request is divided by the service timeout number corresponding to the latest historical transaction request to obtain the timeout rate, the timeout rate is determined to be the current service timeout rate corresponding to the transaction server, and the transaction server identifier and the current service timeout rate corresponding to the transaction server are associated and stored.
Example six
Based on the transaction flow limiting method provided in the fifth embodiment of the present invention, the service timeout times corresponding to the latest historical transaction request determined in step 1021 are further refined, and specifically include the following steps:
step 1021a, obtaining a preset service response time corresponding to the transaction server, and comparing each historical service response time corresponding to the total number of services corresponding to the latest historical transaction request with the preset service response time.
In this embodiment, a preset service response time corresponding to the transaction server is obtained, where the service response time refers to time spent by the local server sending the transaction request to the transaction server until receiving a response fed back by the transaction server, and the preset service response time is compared with each historical service response time corresponding to the total number of services corresponding to the latest historical transaction request.
And step 1021b, determining the service times of which the historical service response time is not the preset service response time in the total service times corresponding to the latest historical transaction request as the service timeout times corresponding to the latest historical transaction request.
In this embodiment, if the historical service response time is greater than the preset service response time, this service timeout is indicated, and the service time number of which the historical service response time is greater than the preset service response time in the total service time number corresponding to the latest historical transaction request is further used as the service timeout time number corresponding to the latest historical transaction request. If the historical service response time is smaller than or equal to the preset service response time, the service is not overtime.
Fig. 5 is a schematic structural diagram of a transaction flow restrictor according to an embodiment of the present invention, as shown in fig. 5, the transaction flow restrictor 200 according to the present embodiment includes a receiving unit 201, a determining unit 202, a forwarding unit 203, and an intercepting unit 204.
The receiving unit 201 is configured to receive a transaction request sent by a user terminal, and determine a transaction server corresponding to the transaction request. The determining unit 202 is configured to obtain a current service timeout rate corresponding to the transaction server, and determine a current limit level corresponding to the transaction server according to the current service timeout rate corresponding to the transaction server. The determining unit 202 is further configured to determine whether to limit the transaction request according to the limit level corresponding to the transaction server. And the forwarding unit 203 is configured to forward the transaction request to the transaction server if not. And the interception unit 204 is configured to intercept the transaction request if yes.
Optionally, the determining unit is further configured to match a current service timeout rate corresponding to the transaction server with a preset service timeout rate range; and acquiring the current limiting grade corresponding to the matched preset service timeout rate range, and determining the current limiting grade corresponding to the matched preset service timeout rate range as the current limiting grade corresponding to the transaction server.
Optionally, the determining unit is further configured to compare the current limit level corresponding to the transaction server with a preset current limit level, where the preset current limit level includes a first preset current limit level and a second preset current limit level; if the corresponding current limit level of the transaction server is a first preset current limit level, determining that the transaction request is not limited; and if the corresponding current limit level of the transaction server is the second preset current limit level, determining to limit the current of the transaction request.
Optionally, the determining unit is further configured to obtain a timestamp corresponding to the transaction request, and obtain a current limiting confirmation parameter corresponding to the transaction server according to the timestamp and a current limiting level corresponding to the transaction server; determining whether the current limiting confirmation parameter is a preset parameter; and the interception unit is used for intercepting the transaction request if not.
Optionally, the determining unit is further configured to obtain a total number of services corresponding to the latest historical transaction request in a preset time range corresponding to the transaction server, and determine a service timeout number corresponding to the latest historical transaction request according to the total number of services corresponding to the latest historical transaction request; and determining the current service timeout rate corresponding to the transaction server according to the total service times corresponding to the latest historical transaction request and the service timeout times corresponding to the latest historical transaction request.
Optionally, the determining unit is further configured to obtain a preset service response time corresponding to the transaction server, and compare each historical service response time corresponding to the total number of services corresponding to the latest historical transaction request with the preset service response time; and determining the service times with the historical service response time larger than the preset service response time in the total service times corresponding to the latest historical transaction request as the service timeout times corresponding to the latest historical transaction request.
Fig. 6 is a block diagram of a server for implementing the transaction throttling method according to the embodiment of the present invention, and as shown in fig. 6, the server 300 includes: 300 includes: memory 301, processor 302, and transceiver 403.
Processor 302, memory 301, and transceiver 403 are electrically interconnected;
a transceiver 403 for transceiving data and requests;
memory 301 stores computer-executable instructions;
processor 302 executes computer-executable instructions stored in memory 301, causing the processor to perform the methods provided by any of the embodiments described above.
In an exemplary embodiment, there is also provided a computer-readable storage medium having stored therein computer-executable instructions for performing the method of any one of the above embodiments by a processor.
In an exemplary embodiment, a computer program product is also provided, comprising a computer program for executing the method of any of the above embodiments by a processor.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (7)

1. A transaction throttling method, applied to a transaction throttling device in a server, comprising:
receiving a transaction request sent by a user terminal, and determining a transaction server corresponding to the transaction request;
acquiring a current service timeout rate corresponding to the transaction server, and determining a current limiting grade corresponding to the transaction server according to the current service timeout rate corresponding to the transaction server;
comparing the corresponding current limiting level of the transaction server with a preset current limiting level, wherein the preset current limiting level comprises a first preset current limiting level and a second preset current limiting level;
if the corresponding current limit level of the transaction server is a first preset current limit level, determining that the transaction request is not limited;
if the corresponding current limiting level of the transaction server is a second preset current limiting level, determining to limit the current of the transaction request;
acquiring a timestamp corresponding to a transaction request, and acquiring a current limiting confirmation parameter corresponding to the transaction server according to the timestamp and a current limiting grade corresponding to the transaction server;
determining whether the current limiting confirmation parameter is a preset parameter;
if yes, forwarding the transaction request to the transaction server;
if not, intercepting the transaction request.
2. The method of claim 1, wherein said determining the current limit level corresponding to the transaction server based on the current service timeout rate corresponding to the transaction server comprises:
matching the current service timeout rate corresponding to the transaction server with a preset service timeout rate range;
and acquiring the current limiting grade corresponding to the matched preset service timeout rate range, and determining the current limiting grade corresponding to the matched preset service timeout rate range as the current limiting grade corresponding to the transaction server.
3. The method of claim 1, wherein prior to obtaining the current service timeout rate corresponding to the transaction server, comprising:
acquiring service total times corresponding to the latest historical transaction requests in a preset time range corresponding to the transaction server, and determining service timeout times corresponding to the latest historical transaction requests;
and determining the current service timeout rate corresponding to the transaction server according to the total service times corresponding to the latest historical transaction request and the service timeout times corresponding to the latest historical transaction request.
4. A method according to claim 3, wherein said determining the number of service timeouts corresponding to the latest historical transaction requests comprises:
acquiring preset service response time corresponding to the transaction server, and comparing each historical service response time corresponding to the total number of services corresponding to the latest historical transaction request with the preset service response time;
and determining the service times with the historical service response time larger than the preset service response time in the total service times corresponding to the latest historical transaction request as the service timeout times corresponding to the latest historical transaction request.
5. A transaction restrictor device, the transaction restrictor device being located at a server, the device comprising:
the receiving unit is used for receiving the transaction request sent by the user terminal and determining a transaction server corresponding to the transaction request;
the determining unit is used for obtaining the current service timeout rate corresponding to the transaction server and determining the current limiting grade corresponding to the transaction server according to the current service timeout rate corresponding to the transaction server;
a determining unit for also
Comparing the corresponding current limiting level of the transaction server with a preset current limiting level, wherein the preset current limiting level comprises a first preset current limiting level and a second preset current limiting level;
if the corresponding current limit level of the transaction server is a first preset current limit level, determining that the transaction request is not limited;
if the corresponding current limiting level of the transaction server is a second preset current limiting level, determining to limit the current of the transaction request;
acquiring a timestamp corresponding to a transaction request, and acquiring a current limiting confirmation parameter corresponding to the transaction server according to the timestamp and a current limiting grade corresponding to the transaction server;
determining whether the current limiting confirmation parameter is a preset parameter; the forwarding unit is used for forwarding the transaction request to the transaction server if yes;
and the interception unit is used for intercepting the transaction request if not.
6. A server, comprising: a processor, a memory, and a transceiver;
a processor, memory, and transceiver circuitry interconnect;
a transceiver for transceiving data and requests;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the method of any one of claims 1 to 4.
7. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1 to 4.
CN202111667857.5A 2021-12-30 2021-12-30 Transaction flow limiting method, device, server, storage medium and product Active CN114338811B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111667857.5A CN114338811B (en) 2021-12-30 2021-12-30 Transaction flow limiting method, device, server, storage medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111667857.5A CN114338811B (en) 2021-12-30 2021-12-30 Transaction flow limiting method, device, server, storage medium and product

Publications (2)

Publication Number Publication Date
CN114338811A CN114338811A (en) 2022-04-12
CN114338811B true CN114338811B (en) 2024-01-30

Family

ID=81021141

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111667857.5A Active CN114338811B (en) 2021-12-30 2021-12-30 Transaction flow limiting method, device, server, storage medium and product

Country Status (1)

Country Link
CN (1) CN114338811B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114430396B (en) * 2022-04-06 2022-07-05 中国光大银行股份有限公司 Transaction frequency control method and device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109792446A (en) * 2016-10-03 2019-05-21 斯特拉图斯数字系统公司 Transient state trading server
CN110413416A (en) * 2019-07-31 2019-11-05 中国工商银行股份有限公司 A kind of current-limiting method and device of distributed server
CN111796958A (en) * 2020-06-30 2020-10-20 中国工商银行股份有限公司 Transaction anti-hanging method and device under Dubbo frame
CN112702321A (en) * 2020-12-15 2021-04-23 深圳市快付通金融网络科技服务有限公司 Distributed transaction current limiting method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109792446A (en) * 2016-10-03 2019-05-21 斯特拉图斯数字系统公司 Transient state trading server
CN110413416A (en) * 2019-07-31 2019-11-05 中国工商银行股份有限公司 A kind of current-limiting method and device of distributed server
CN111796958A (en) * 2020-06-30 2020-10-20 中国工商银行股份有限公司 Transaction anti-hanging method and device under Dubbo frame
CN112702321A (en) * 2020-12-15 2021-04-23 深圳市快付通金融网络科技服务有限公司 Distributed transaction current limiting method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于区块链的制造服务可信交易方法;王强;刘长春;周保茹;;计算机集成制造系统(第12期);全文 *

Also Published As

Publication number Publication date
CN114338811A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
US11966916B2 (en) Resource transfer method and apparatus, storage medium, and computer device
US11128603B2 (en) Method and system for providing a transaction forwarding service in blockchain implementations
CN108600315B (en) Block link route processing method, device and storage medium
CN109447791B (en) Block chain-based fund transaction method and device
CN108416665B (en) Data interaction method and device, computer equipment and storage medium
CN112367268A (en) Current limiting method and device for micro-service
CN114338811B (en) Transaction flow limiting method, device, server, storage medium and product
CN111507714B (en) Verification method, verification device, server and storage medium
CN106612263B (en) Method and equipment for processing application access request
CN111400283B (en) Data processing method, system, electronic equipment and storage medium
CN111553668A (en) Big data-based cash withdrawal method and device, electronic equipment and medium
CN110728504A (en) Data processing method, device and equipment of block chain and readable storage medium
US11520802B2 (en) Systems and methods for data format conversion
CN114090604A (en) Request processing method and device
CN110457116B (en) Method and device for processing transaction request
CN114666411A (en) Request processing method, device, server, storage medium and product
CN113177052A (en) Method and device for processing service data consistency of distributed system
CN111541619A (en) Self-adaptive active load adjusting method and device of enterprise information networking checking system
US10298575B2 (en) Multicomputer processing of an event authentication request with centralized event orchestration
CN111861252B (en) Electronic resource transmission method, device and server
CN113326153A (en) Service request processing method and device
CN111626849B (en) Counter transaction authorization method, device and system
CN115086434B (en) Bank business handling method and device based on blockchain
CN113973084A (en) Flow control method and device
CN116629885A (en) Security authentication method, device, equipment and storage medium

Legal Events

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