CN113347665B - Method and device for controlling real-time transaction amount in gateway system - Google Patents

Method and device for controlling real-time transaction amount in gateway system Download PDF

Info

Publication number
CN113347665B
CN113347665B CN202110605429.3A CN202110605429A CN113347665B CN 113347665 B CN113347665 B CN 113347665B CN 202110605429 A CN202110605429 A CN 202110605429A CN 113347665 B CN113347665 B CN 113347665B
Authority
CN
China
Prior art keywords
token
time
gateway system
mobile phone
real
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
CN202110605429.3A
Other languages
Chinese (zh)
Other versions
CN113347665A (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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202110605429.3A priority Critical patent/CN113347665B/en
Publication of CN113347665A publication Critical patent/CN113347665A/en
Application granted granted Critical
Publication of CN113347665B publication Critical patent/CN113347665B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0231Traffic management, e.g. flow control or congestion control based on communication conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/325Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices using wireless networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/16Gateway arrangements

Abstract

The invention discloses a method and a device for controlling real-time transaction amount in a gateway system, which relate to the field of network security, wherein the method comprises the following steps: acquiring limit capability of a gateway system for providing transactions, and determining the maximum token number which can be provided by the gateway system according to the limit capability; acquiring historical transaction data of a gateway system, and determining the real-time token provision number and the longest time for holding a token by a mobile phone app, which can be provided by the gateway system, according to the historical transaction data; and controlling the real-time transaction amount in the gateway system according to the maximum token number, the real-time token providing number and the maximum time for which the mobile phone app holds the token. The invention can maximally utilize the resources of the gateway, and simultaneously cannot cause the system breakdown, and maximally utilize the resources of the gateway system, and simultaneously cannot cause the system breakdown.

Description

Method and device for controlling real-time transaction amount in gateway system
Technical Field
The invention relates to the technical field of network security, in particular to a method and a device for controlling real-time transaction amount in a gateway system.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
The gateway system is a message processing system between an external system and an internal Dubbo (which is a high-performance and lightweight open source Java service framework) micro-service, and is mainly used for analyzing and converting request requests sent by the external system, then referencing the internal Dubbo micro-service, and converting processing results of the internal Dubbo micro-service into response responses required by the external system. In gateway systems, controlling the connection of apps is very important for stable operation of the system. The setting of the connection condition is too strict, and the performance of the system can not be effectively exerted to provide service for clients; the connection condition is set to be loose, so that when the burst transaction amount is large, the system breakdown can be caused.
Disclosure of Invention
The embodiment of the invention provides a real-time transaction amount control method in a gateway system, which is used for solving the problem that the connection condition is set strictly in the prior art, and the performance of the system cannot be effectively exerted to provide services for clients; the connection condition is set to be loose, so that when the burst transaction amount is larger, the technical problem of system breakdown can be possibly caused, and the method comprises the following steps:
acquiring limit capability of a gateway system for providing transactions, and determining the maximum token number which can be provided by the gateway system according to the limit capability;
acquiring historical transaction data of a gateway system, and determining the real-time token provision number and the longest time for holding a token by a mobile phone app, which can be provided by the gateway system, according to the historical transaction data;
and controlling the real-time transaction amount in the gateway system according to the maximum token number, the real-time token providing number and the maximum time for which the mobile phone app holds the token.
The embodiment of the invention also provides a real-time transaction amount control device in the gateway system, which is used for solving the problem that the connection condition is set strictly in the prior art, and the performance of the system cannot be effectively exerted to provide services for clients; the connection condition is set to be loose, and when the burst transaction amount is larger, the technical problem of system breakdown is possibly caused, and the device comprises:
the parameter setting module is used for acquiring the limit capacity of the gateway system for providing transactions and determining the maximum token number which can be provided by the gateway system according to the limit capacity; acquiring historical transaction data of a gateway system, and determining the real-time token provision number and the longest time for holding a token by a mobile phone app, which can be provided by the gateway system, according to the historical transaction data;
and the monitoring module is used for controlling the real-time transaction amount in the gateway system according to the maximum token number, the real-time token providing number and the maximum time for the mobile phone app to hold the token.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the real-time transaction amount control method in the gateway system when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the steps of the method for controlling real-time transaction amount in the gateway system.
In the embodiment of the invention, the setting of the connection condition is too strict compared with that in the prior art, and the performance of the system can not be effectively exerted to provide service for clients; the connection condition is set to be loose, when the burst transaction amount is larger, compared with the technical scheme that the system breakdown is possibly caused, the limit capacity of the gateway system for providing the transaction is obtained, and the maximum token number which can be provided by the gateway system is determined according to the limit capacity; acquiring historical transaction data of a gateway system, and determining the real-time token provision number and the longest time for holding a token by a mobile phone app, which can be provided by the gateway system, according to the historical transaction data; and controlling the real-time transaction amount in the gateway system according to the maximum token number, the real-time token providing number and the maximum time for which the mobile phone app holds the token, and acquiring related parameters of the system by testing based on historical transaction data and pressure. And further controlling the allocation and release of gateway resources based on the current limiting and fusing model. Therefore, the resources of the gateway can be utilized to the maximum limit, the system breakdown is not caused, and the resources of the gateway system can be utilized to the maximum limit, and the system breakdown is not caused.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a flowchart of a method for controlling real-time transaction amount in a gateway system according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for controlling real-time transaction amount in a gateway system according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for controlling real-time transaction amount in a gateway system according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for controlling real-time transaction amount in a gateway system according to an embodiment of the present invention;
fig. 5 is a block diagram of a real-time transaction amount control device in a gateway system according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings. The exemplary embodiments of the present invention and their descriptions herein are for the purpose of explaining the present invention, but are not to be construed as limiting the invention.
Fig. 1 is a flowchart (a) of a method for controlling real-time transaction amount in a gateway system according to an embodiment of the present invention, where, as shown in fig. 1, the method for controlling real-time transaction amount in the gateway system includes:
step 101: acquiring limit capability of a gateway system for providing transactions, and determining the maximum token number which can be provided by the gateway system according to the limit capability;
step 102: acquiring historical transaction data of a gateway system, and determining the real-time token provision number and the longest time for holding a token by a mobile phone app, which can be provided by the gateway system, according to the historical transaction data;
step 103: and controlling the real-time transaction amount in the gateway system according to the maximum token number, the real-time token providing number and the maximum time for which the mobile phone app holds the token.
Specifically, the maximum number of tokens that the system can provide, i.e., the maximum number of connections that the system can support in real-time, is set.
Token: representing the resources of the gateway system, the gateway system can process the request message of the mobile app when the app owns the resources. That is, when an app of a handset holds a token issued to it by a gateway, this indicates that the app and gateway system are connected successfully.
A transaction is a request by a customer, such as a query, modification of information, payment, transfer, etc. Historical transaction data: a client number (corresponding to identity information of each client) to which each app is connected, a transaction (such as a query, modification information, payment, etc.), a time (a point in time of each action of the client, and a time length), a token id (each token corresponds to a unique one id), etc.
The present invention can assume a token pool as a model of a reservoir that can store the maximum amount of water that is the maximum number of tokens that the present invention can pass through the limit capability. Meanwhile, the input of the water reservoir is the number of tokens generated in unit time, the data is obtained by calculation from historical transaction data, such as 12 am in one day, the data belongs to the service peak period, the number of apps connected with the gateway system is relatively large, such as data corresponding to the number of connections at 30 time points in one month and 30 days, the average value of the 30 data can be used as a predicted value to generate the number of tokens, and the allocation of the apps is the output of the water reservoir.
A further problem is that the amount of transactions is positively correlated with the number of tokens required. The greater the amount of real-time transactions by the gateway system, the greater the number of tokens supporting so many transactions. The information for each transaction is stored in a database of the gateway system. That is, the transaction amount is an index that can be obtained by querying the database and can be used as a quantitative index for measuring the demand of the real-time token.
In an embodiment of the present invention, step 101 obtains the limit capability of the gateway system for providing transactions, including:
obtaining the limit capability of the gateway system for providing transactions through a pressure test;
determining a maximum number of tokens that can be provided by the gateway system based on the limiting capabilities, comprising:
obtaining the corresponding relation between the maximum transaction amount and the maximum token number according to the pressure test;
predicting the amount of transactions (i.e., the number of transactions, such as logging in, modifying customer information, paying, querying, etc.) by the gateway system in a fixed time or unit of time;
and setting the maximum token number of the current time according to the corresponding relation between the maximum transaction amount and the maximum token number, the predicted obtained transaction amount and the minimum token number provided by the gateway system.
In an embodiment of the present invention, step 102 of determining, according to the historical transaction data, a real-time token provision number that can be provided by the gateway system includes:
determining the number of mobile phone app application tokens in the historical transaction data;
and determining an average value of the number of application tokens of the mobile phone app as the number of real-time token provision which can be provided by the gateway system.
Specifically, the average value of the app average application token number of the system can be set. If 30 days of data are available, 30 application token number samples are corresponding at 12 noon, and the application token number at 12 noon in the future day can be predicted by summing and averaging.
In the embodiment of the present invention, step 102 determines, according to the historical transaction data, the longest time for which the mobile app holds the token, including:
determining a latency in the historical transaction data;
and determining the longest time for the mobile phone app to hold the token according to the waiting time.
In the embodiment of the present invention, step 102 determines, according to the waiting time, the longest time for which the mobile app holds the token, including:
acquiring time data of historical business handling of a client corresponding to a mobile phone app;
if the proportion of the history transacted business of the mobile phone app is far greater than the proportion of the failure, determining the longest time for holding the token of the mobile phone app based on the time data of the history transacted business of the success.
Specifically, the time data (i.e. waiting time) of the mobile app corresponding to the historical transaction service of the client is obtained, and if it is determined that the proportion of the historical transaction service of the mobile app is far greater than the failed data, the time of the longest holding token of the mobile app is determined based on the waiting time in the successful data.
If the client does not have history to transact business, the average value of the transacting time of other clients is set.
The maximum time to hold tokens may of course be set based on the data of all clients of a set, and set as the maximum time to hold tokens for all clients of the set, as opposed to the individual setting of different maximum times for holding tokens for a single client as described above, where the data of each client of the set is insufficient, but the data of the set is much more sufficient.
Modifications are made to clients with particularly long holding token times: and (3) acquiring time data sets of all clients holding tokens, drawing a data curve, setting the time corresponding to a point with a certain fixed proportion of the curve as the longest time for holding the tokens, for example, setting a time axis to be 0 to 1, and then setting the time corresponding to a point with a large position of 0.95.
Specifically, the latency is the time that the app can connect to the gateway system. If the latency is set too short, then transactions for many customers are not processed, but beyond the latency, should be broken, so that the transactions fail, i.e., the transaction success rate of the gateway system is reduced; however, if this latency is too long, it may cause some apps to occupy resources for a long period of time, so that other apps may not obtain the resources, and thus the resource utilization of the gateway system may be reduced.
The waiting time may be set to a certain time value such that the ratio of the number of successful transactions less than the time value to the total data amount is greater than or equal to a certain statistical index, such as 95%.
This step means that based on the history data, a suitable time is set so that the transaction success rate is greater than a certain value, and at the same time, certain resources are not occupied by an app for a long period of time.
The above step is a statistical sample-based data analysis, such as 100 samples of data, where the time required for each sample of data to succeed in a transaction is 1 fixed time value, so that there is a sample set of 100 time points. The time is set to be a certain value, for example, so that 95 pieces of data in the 100 pieces of sample data are smaller than or equal to the certain value, and thus, the success rate of the transaction is 95%. At the same time, app connections exceeding this value are interrupted, ensuring that resources are not occupied by a single app for a long period of time.
In the embodiment of the present invention, as shown in fig. 2, step 103 controls the real-time transaction amount in the gateway system according to the maximum token number, the real-time token provision number and the maximum time for which the mobile app holds the token, and includes:
step 201: generating the number of tokens in each unit time according to the real-time token supply number, and putting the number of tokens in each unit time into a token pool;
step 202: when a token application proposed by the mobile phone app is received, acquiring a token from the token pool and distributing the token to the mobile phone app;
step 203: and monitoring the duration of the holding of the token by the mobile phone app, and when the duration of the holding of the token by the mobile phone app exceeds the maximum time of the holding of the token by the mobile phone app, recovering the corresponding token and putting the corresponding token into a token pool to disconnect the mobile phone app.
Specifically, for example, 100 tokens are generated per second Zhong Shishi, and the 100 tokens are put into a token pool.
The token pool can be thought of as a reservoir, the real-time token number is the unit input of the reservoir, and the allocation to the app is the output of the reservoir. In one case, the number of connected apps is particularly large, far exceeding the unit input, and other tokens already in the reservoir need to be allocated to the apps, when the total number of tokens allocated to the apps is exactly equal to the maximum number of tokens, which means that the number of app connections has reached the limit connection capability of the gateway system. If there are other apps applying for access, their access applications should be directly denied.
In the embodiment of the present invention, as shown in fig. 3, step 103 controls the real-time transaction amount in the gateway system according to the maximum token number, the real-time token provision number and the maximum time for the mobile app to hold the token, and further includes:
step 301: and returning a service timeout notification to the mobile app when the duration of the mobile app holding the token exceeds the maximum time of the mobile app holding the token.
In the embodiment of the present invention, as shown in fig. 4, step 103 controls the real-time transaction amount in the gateway system according to the maximum token number, the real-time token provision number and the maximum time for the mobile app to hold the token, and further includes:
step 401: and monitoring the token pool in real time, and rejecting the token application proposed by the mobile phone app when the token pool is empty.
The embodiment of the invention also provides a device for controlling the real-time transaction amount in the gateway system, as described in the following embodiment. Because the principle of the device for solving the problem is similar to that of the real-time transaction amount control method in the gateway system, the implementation of the device can be referred to the implementation of the real-time transaction amount control method in the gateway system, and the repetition is not repeated.
Fig. 5 is a block diagram of a real-time transaction amount control device in a gateway system according to an embodiment of the present invention, where, as shown in fig. 5, the device includes:
the parameter setting module 02 is used for obtaining the limit capability of the gateway system for providing transactions, and determining the maximum token number which can be provided by the gateway system according to the limit capability; acquiring historical transaction data of a gateway system, and determining the real-time token provision number and the longest time for holding a token by a mobile phone app, which can be provided by the gateway system, according to the historical transaction data;
and the monitoring module 04 is used for controlling the real-time transaction amount in the gateway system according to the maximum token number, the real-time token providing number and the maximum time for which the mobile phone app holds the token.
In the embodiment of the present invention, the parameter setting module 02 is specifically configured to:
obtaining the limit capability of the gateway system for providing transactions through a pressure test;
obtaining the corresponding relation between the maximum transaction amount and the maximum token number according to the pressure test;
predicting the transaction amount of the gateway system in fixed time or unit time;
and setting the maximum token number of the current time according to the corresponding relation between the maximum transaction amount and the maximum token number, the predicted obtained transaction amount and the minimum token number provided by the gateway system.
In the embodiment of the present invention, the parameter setting module 02 is specifically configured to:
determining the number of mobile phone app application tokens in the historical transaction data;
and determining an average value of the number of application tokens of the mobile phone app as the number of real-time token provision which can be provided by the gateway system.
In the embodiment of the present invention, the parameter setting module 02 is specifically configured to:
determining a latency in the historical transaction data;
and determining the longest time for the mobile phone app to hold the token according to the waiting time.
In the embodiment of the present invention, the parameter setting module 02 is specifically configured to:
acquiring time data of historical business handling of a client corresponding to a mobile phone app;
if the proportion of the history transacted business of the mobile phone app is far greater than the proportion of the failure, determining the longest time for holding the token of the mobile phone app based on the time data of the history transacted business of the success.
In the embodiment of the present invention, the monitoring module 04 is specifically configured to:
generating the number of tokens in each unit time according to the real-time token supply number, and putting the number of tokens in each unit time into a token pool;
when a token application proposed by the mobile phone app is received, acquiring a token from the token pool and distributing the token to the mobile phone app;
and monitoring the duration of the holding of the token by the mobile phone app, and when the duration of the holding of the token by the mobile phone app exceeds the maximum time of the holding of the token by the mobile phone app, recovering the corresponding token and putting the corresponding token into a token pool to disconnect the mobile phone app.
In the embodiment of the present invention, the monitoring module 04 is specifically configured to:
and returning a service timeout notification to the mobile app when the duration of the mobile app holding the token exceeds the maximum time of the mobile app holding the token.
In the embodiment of the present invention, the monitoring module 04 is specifically configured to:
and monitoring the token pool in real time, and rejecting the token application proposed by the mobile phone app when the token pool is empty.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the real-time transaction amount control method in the gateway system when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the steps of the method for controlling real-time transaction amount in the gateway system.
In the embodiment of the invention, the setting of the connection condition is too strict compared with that in the prior art, and the performance of the system can not be effectively exerted to provide service for clients; the connection condition is set to be loose, when the burst transaction amount is larger, compared with the technical scheme that the system breakdown is possibly caused, the limit capacity of the gateway system for providing the transaction is obtained, and the maximum token number which can be provided by the gateway system is determined according to the limit capacity; acquiring historical transaction data of a gateway system, and determining the real-time token provision number and the longest time for holding a token by a mobile phone app, which can be provided by the gateway system, according to the historical transaction data; and controlling the real-time transaction amount in the gateway system according to the maximum token number, the real-time token providing number and the maximum time for which the mobile phone app holds the token, and acquiring related parameters of the system by testing based on historical transaction data and pressure. And further controlling the allocation and release of gateway resources based on the current limiting and fusing model. Therefore, the resources of the gateway can be utilized to the maximum limit, the system breakdown is not caused, and the resources of the gateway system can be utilized to the maximum limit, and the system breakdown is not caused.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (10)

1. A method for controlling real-time transaction amount in a gateway system, comprising:
acquiring limit capacity of a gateway system for providing transactions, and determining the maximum token number which can be provided by the gateway system according to the limit capacity; the gateway system is a message processing system positioned between an external system and an internal Dubbo micro service;
acquiring historical transaction data of a gateway system, and determining the real-time token providing number and the longest time for holding a token by a mobile phone app, which can be provided by the gateway system, according to the historical transaction data;
controlling the real-time transaction amount in the gateway system according to the maximum token number, the real-time token providing number and the maximum time for holding the token by the mobile phone app;
determining the longest time for which the mobile phone app holds the token according to the historical transaction data, wherein the method comprises the following steps:
determining a latency in the historical transaction data;
determining the longest time for the mobile phone app to hold the token according to the waiting time;
the determining the longest time for the mobile phone app to hold the token according to the waiting time comprises the following steps:
acquiring time data of historical business handling of a client corresponding to a mobile phone app; the time data is waiting time;
if the proportion of the mobile phone app corresponding to the history business transaction success of the client is far greater than the proportion of the failure, determining the longest time for the mobile phone app to hold the token based on the time data of the history business transaction success;
if the client does not have the history handling business, setting the average value of handling time of other clients;
the acquisition gateway system provides transaction limiting capabilities including:
obtaining the limit capability of the gateway system for providing transactions through a pressure test;
determining the maximum number of tokens which can be provided by the gateway system according to the limit capability, wherein the maximum number of tokens comprises:
obtaining the corresponding relation between the maximum transaction amount and the maximum token number according to the pressure test;
predicting the transaction amount of the gateway system in fixed time or unit time;
setting the maximum token number of the current time according to the corresponding relation between the maximum transaction amount and the maximum token number, the predicted obtained transaction amount and the minimum token number provided by the gateway system;
the controlling the real-time transaction amount in the gateway system according to the maximum token number, the real-time token providing number and the maximum time for the mobile phone app to hold the token comprises the following steps:
generating the number of tokens in each unit time according to the real-time token supply number, and putting the number of tokens in each unit time into a token pool;
when a token application proposed by the mobile phone app is received, acquiring a token from the token pool and distributing the token to the mobile phone app;
and monitoring the duration of the holding of the token by the mobile phone app, and when the duration of the holding of the token by the mobile phone app exceeds the maximum time of the holding of the token by the mobile phone app, recovering the corresponding token and putting the corresponding token into a token pool to disconnect the mobile phone app.
2. The method for controlling real-time transaction amount in a gateway system according to claim 1, wherein determining the number of real-time token offerings that can be provided by the gateway system based on the historical transaction data comprises:
determining the number of mobile phone app application tokens in the historical transaction data;
and determining an average value of the number of application tokens of the mobile phone app as the number of real-time token provision which can be provided by the gateway system.
3. The method for controlling real-time transaction amount in gateway system according to claim 1, wherein the real-time transaction amount in gateway system is controlled according to the maximum number of tokens, the real-time token provision number and the maximum time for which the mobile app holds the token, further comprising:
and returning a service timeout notification to the mobile app when the duration of the mobile app holding the token exceeds the maximum time of the mobile app holding the token.
4. The method for controlling real-time transaction amount in gateway system according to claim 1, wherein the real-time transaction amount in gateway system is controlled according to the maximum number of tokens, the real-time token provision number and the maximum time for which the mobile app holds the token, further comprising:
and monitoring the token pool in real time, and rejecting the token application proposed by the mobile phone app when the token pool is empty.
5. A real-time transaction amount control device in a gateway system, comprising:
the parameter setting module is used for acquiring the limit capacity of the gateway system for providing transactions and determining the maximum token number which can be provided by the gateway system according to the limit capacity; acquiring historical transaction data of a gateway system, and determining the real-time token providing number and the longest time for holding a token by a mobile phone app, which can be provided by the gateway system, according to the historical transaction data; the gateway system is a message processing system positioned between an external system and an internal Dubbo micro service;
the monitoring module is used for controlling the real-time transaction amount in the gateway system according to the maximum token number, the real-time token providing number and the maximum time for the mobile phone app to hold the token;
the parameter setting module is specifically used for:
determining a latency in the historical transaction data;
determining the longest time for the mobile phone app to hold the token according to the waiting time;
the determining the longest time for the mobile phone app to hold the token according to the waiting time comprises the following steps: acquiring time data of historical business handling of a client corresponding to a mobile phone app; the time data is waiting time;
if the proportion of the mobile phone app corresponding to the history business transaction success of the client is far greater than the proportion of the failure, determining the longest time for the mobile phone app to hold the token based on the time data of the history business transaction success;
if the client does not have the history handling business, setting the average value of handling time of other clients;
the parameter setting module is specifically configured to:
obtaining the limit capability of the gateway system for providing transactions through a pressure test;
obtaining the corresponding relation between the maximum transaction amount and the maximum token number according to the pressure test;
predicting the transaction amount of the gateway system in fixed time or unit time;
setting the maximum token number of the current time according to the corresponding relation between the maximum transaction amount and the maximum token number, the predicted obtained transaction amount and the minimum token number provided by the gateway system;
the monitoring module is specifically used for:
generating the number of tokens in each unit time according to the real-time token supply number, and putting the number of tokens in each unit time into a token pool;
when a token application proposed by the mobile phone app is received, acquiring a token from the token pool and distributing the token to the mobile phone app;
and monitoring the duration of the holding of the token by the mobile phone app, and when the duration of the holding of the token by the mobile phone app exceeds the maximum time of the holding of the token by the mobile phone app, recovering the corresponding token and putting the corresponding token into a token pool to disconnect the mobile phone app.
6. The device for controlling real-time transaction amount in gateway system according to claim 5, wherein the parameter setting module is specifically configured to:
determining the number of mobile phone app application tokens in the historical transaction data;
and determining an average value of the number of application tokens of the mobile phone app as the number of real-time token provision which can be provided by the gateway system.
7. The device for controlling real-time transaction amount in gateway system according to claim 5, wherein the monitoring module is specifically configured to:
and returning a service timeout notification to the mobile app when the duration of the mobile app holding the token exceeds the maximum time of the mobile app holding the token.
8. The device for controlling real-time transaction amount in gateway system according to claim 5, wherein the monitoring module is specifically configured to:
and monitoring the token pool in real time, and rejecting the token application proposed by the mobile phone app when the token pool is empty.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of controlling real-time traffic in a gateway system according to any one of claims 1 to 4 when executing the computer program.
10. A computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor realizes the steps of the method for controlling real-time traffic in a gateway system according to any one of claims 1 to 4.
CN202110605429.3A 2021-05-31 2021-05-31 Method and device for controlling real-time transaction amount in gateway system Active CN113347665B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110605429.3A CN113347665B (en) 2021-05-31 2021-05-31 Method and device for controlling real-time transaction amount in gateway system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110605429.3A CN113347665B (en) 2021-05-31 2021-05-31 Method and device for controlling real-time transaction amount in gateway system

Publications (2)

Publication Number Publication Date
CN113347665A CN113347665A (en) 2021-09-03
CN113347665B true CN113347665B (en) 2023-12-19

Family

ID=77473650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110605429.3A Active CN113347665B (en) 2021-05-31 2021-05-31 Method and device for controlling real-time transaction amount in gateway system

Country Status (1)

Country Link
CN (1) CN113347665B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1681247A (en) * 2004-06-30 2005-10-12 中国银行股份有限公司 System of bank on-line inquiring system
KR20130023970A (en) * 2011-08-30 2013-03-08 티스트림 주식회사 Traffic control gateway and traffic control method using the same
CN105580038A (en) * 2013-07-24 2016-05-11 维萨国际服务协会 Systems and methods for interoperable network token processing
CN106911587A (en) * 2017-03-16 2017-06-30 恒生电子股份有限公司 Trading volume control method and device
CN108011840A (en) * 2017-12-07 2018-05-08 中国银行股份有限公司 Control method, server and the system of transaction request

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102004046400B4 (en) * 2004-09-24 2008-08-28 Nokia Siemens Networks Gmbh & Co.Kg Method for network load shaping in a mobile radio network
US11687929B2 (en) * 2018-03-23 2023-06-27 American Express Travel Related Services Co., Inc. Authenticated secure online and offline transactions

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1681247A (en) * 2004-06-30 2005-10-12 中国银行股份有限公司 System of bank on-line inquiring system
KR20130023970A (en) * 2011-08-30 2013-03-08 티스트림 주식회사 Traffic control gateway and traffic control method using the same
CN105580038A (en) * 2013-07-24 2016-05-11 维萨国际服务协会 Systems and methods for interoperable network token processing
CN106911587A (en) * 2017-03-16 2017-06-30 恒生电子股份有限公司 Trading volume control method and device
CN108011840A (en) * 2017-12-07 2018-05-08 中国银行股份有限公司 Control method, server and the system of transaction request

Also Published As

Publication number Publication date
CN113347665A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
US10104169B1 (en) Optimizing a load balancer configuration
CN107707488A (en) Pay on-line transaction flow control methods, current limliting service end and client
WO2019015550A1 (en) Payment processing method and apparatus, and electronic device
CN109636304B (en) Business system publishing method and device, storage medium and electronic device
CN105577958B (en) For adjusting distributing strategy and shunting the method, apparatus and system of user's request
CN111967785A (en) Optimization processing method and device for business handling of bank outlets
CN106612263B (en) Method and equipment for processing application access request
CN107147610B (en) Resource processing method and device
CN113347665B (en) Method and device for controlling real-time transaction amount in gateway system
EP3479606A1 (en) A method of enabling improved efficiency in a first communications network, network entity, network device, computer programs and computer program products
CN112350950A (en) Request message control method and device
CN106845926B (en) Distributed data stream processing method and system for third-party payment supervision system
CN110689442A (en) Method and system for underwriting
US10445136B1 (en) Randomized subrequest selection using request-specific nonce
US9537742B2 (en) Automatic adjustment of application launch endpoints
CN115239450A (en) Financial data processing method and device, computer equipment and storage medium
CN112417349B (en) Programming device and network state monitoring method
CN113469668A (en) Block chain-based method and device for limiting public customer transaction
CN114465974B (en) Push message processing method and device, processor and electronic equipment
CN112866296A (en) Application online verification method, device, equipment and storage medium
US20180123866A1 (en) Method and apparatus for determining event level of monitoring result
CN112767159B (en) Online transaction processing method and device
CN112994894B (en) Gateway-based single-thread request processing method and information verification AGENT
CN102394940B (en) Adaptive data transmission quantity control system and method thereof
CN115333871B (en) Firewall operation and maintenance method and device, electronic equipment and readable 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