Transaction traffic limiting method and related device

By setting the current limiting function and multiple current limiting gears in the transaction processing system, and performing current limiting operations based on transaction volume and frequency standards, the problem of system performance degradation and crash caused by the surge in transaction request volume has been solved, and the stability of system resources has been achieved. Management and performance assurance.

CN118822706APending Publication Date: 2024-10-22BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410893013.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

As the number of users increases, the surge in transaction requests reduces the performance of the transaction processing system and may even cause a system crash. How to limit transaction flow to relieve system pressure has become an urgent problem that needs to be solved.

Method used

Provide a transaction current limiting method. By receiving the client's transaction request, it determines whether the transaction is in the preset current limiting configuration. If so, determines the current open level of the target current limiting function, and determines the transaction volume based on the current limiting level. Perform current limiting operations according to the number of times to prevent excessive occupation of system resources.

Benefits of technology

The current limiting function effectively controls the transaction volume that consumes a large amount of system resources, prevents excessive system pressure, ensures stable operation of the system, and avoids performance degradation and crashes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118822706A_ABST
    Figure CN118822706A_ABST
Patent Text Reader

Abstract

The invention discloses a transaction traffic limiting method and a related device, which can be applied to the field of big data or finance. A transaction request sent to the transaction interface by a client is received, when a target transaction corresponding to the transaction request is a transaction in a preset current limiting configuration, under the condition that a target current limiting function corresponding to the target transaction is opened, a target current limiting gear of a current limiting function opened at the current moment is determined, and the target current limiting function comprises a plurality of current limiting gears; and setting a current-limiting transaction volume and a transaction frequency limit value for each current-limiting gear, and if the target transaction meets the transaction current-limiting standard corresponding to the target current-limiting gear, executing a current-limiting operation on the target transaction. According to the invention, the flow limiting function is set for the transaction, and a plurality of flow limiting gears are set in the flow limiting function, so that transaction flow limiting based on the transaction volume level by level is realized, the transaction volume corresponding to the transaction occupying a large number of system resources is effectively controlled, the transaction of the type is prevented from occupying a large number of system resources, the system pressure is relieved, and the stable operation of the system is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology, and in particular to a transaction flow limiting method and related devices. Background Art

[0002] As the number of users increases, the number of transaction requests sent by users to the transaction interface also shows a surge. Given the limitations of the server's physical and software resources, the surge in transaction requests can easily lead to reduced performance of the transaction processing system, and even trigger a chain reaction that causes the entire system to crash.

[0003] Therefore, how to limit transaction flow and alleviate system pressure has become a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0004] In view of the above problems, this application provides a transaction flow limiting method and related devices to achieve transaction flow limiting and alleviate system pressure. The specific scheme is as follows:

[0005] A transaction flow limiting method, comprising:

[0006] Receive transaction requests sent by the client to the transaction interface;

[0007] Determine whether the target transaction corresponding to the transaction request is a transaction in a preset current limiting configuration;

[0008] If yes, determine whether the target flow limiting function corresponding to the target transaction is turned on, wherein the target flow limiting function includes multiple flow limiting gears, and each flow limiting gear sets a flow limiting transaction volume and transaction number limit;

[0009] If yes, determining the target current limiting gear for the current limiting function to be enabled at the current moment;

[0010] Determine whether the target transaction meets the transaction flow limit standard corresponding to the target flow limit gear;

[0011] If yes, a flow limiting operation is performed on the target transaction.

[0012] Optionally, judging whether the target transaction meets the transaction flow limiting standard corresponding to the target flow limiting gear includes:

[0013] Add one to the number of transactions corresponding to the target current limiting gear to obtain the current number of transactions;

[0014] Determine whether the current number of transactions exceeds the target number of transactions limit corresponding to the target flow limiting gear;

[0015] If not, it is determined whether the transaction concurrency volume currently being processed by the target transaction reaches the target flow-limiting transaction volume corresponding to the target flow-limiting gear, so as to determine whether the target transaction meets the transaction flow-limiting standard.

[0016] Optionally, different transaction types in the preset current limiting configuration correspond to different current limiting functions, and each of the current limiting functions corresponds to multiple current limiting gears.

[0017] Optionally, the process of determining the plurality of current limiting gears includes:

[0018] The maximum transaction volume that the system can carry per unit time is determined as the flow-limited transaction volume of the highest flow-limiting gear;

[0019] The minimum transaction volume accepted by a single transaction business is determined as the flow-limited transaction volume of the lowest flow-limiting level;

[0020] Based on the flow-limiting transaction volume of the highest flow-limiting gear and the flow-limiting transaction volume of the lowest flow-limiting gear, the flow-limiting transaction volume of each flow-limiting gear between the highest flow-limiting gear and the lowest flow-limiting gear is configured according to a preset gradient;

[0021] The transaction number limits corresponding to the different current limiting gears are determined based on the transaction type corresponding to the current limiting function.

[0022] Optionally, performing a flow limiting operation on the target transaction includes:

[0023] terminating the target transaction;

[0024] Output transaction limit prompt information.

[0025] Optionally, the transactions in the preset current limiting configuration are transactions that occupy a proportion of system resources exceeding a preset proportion.

[0026] A transaction current limiting device, comprising:

[0027] A receiving unit, used to receive a transaction request sent by a client to the transaction interface;

[0028] A first judgment unit, configured to judge whether a target transaction corresponding to the transaction request is a transaction in a preset current limiting configuration;

[0029] A second judgment unit is used to judge whether the target flow limiting function corresponding to the target transaction is turned on when the first judgment unit judges that it is yes, wherein the target flow limiting function includes multiple flow limiting gears, and each of the flow limiting gears is set with a flow limiting transaction amount and a transaction number limit;

[0030] A third judgment unit is used to determine a target current limiting gear for the current limiting function to be turned on at the current moment when the second judgment unit judges that the current limiting function is turned on at the current moment;

[0031] A fourth judgment unit, used to judge whether the target transaction meets the transaction flow limiting standard corresponding to the target flow limiting gear;

[0032] The current limiting unit is used to perform a current limiting operation on the target transaction when the fourth judgment unit determines that the target transaction is yes.

[0033] A computer program product includes computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the transaction flow limiting method described above.

[0034] An electronic device comprises at least one processor and a memory connected to the processor, wherein:

[0035] The memory is used to store computer programs;

[0036] The processor is used to execute the computer program so that the electronic device can implement the transaction flow limiting method described above.

[0037] A computer storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the transaction flow limiting method described above.

[0038] From the above technical scheme, it can be known that a transaction flow limiting method and related device disclosed in the present invention receive a transaction request sent by a client to a transaction interface. When the target transaction corresponding to the transaction request is a transaction in a preset flow limiting configuration, when the target flow limiting function corresponding to the target transaction is turned on, the target flow limiting gear at which the flow limiting function is turned on at the current moment is determined. The target flow limiting function includes multiple flow limiting gears, each flow limiting gear is set with a flow limiting transaction volume and a transaction number limit. If the target transaction meets the transaction flow limiting standard corresponding to the target flow limiting gear, the flow limiting operation is performed on the target transaction. The present invention sets a flow limiting function for transactions, and sets multiple flow limiting gears in the flow limiting function to achieve transaction flow limiting based on transaction volume, thereby effectively controlling the transaction volume corresponding to transactions that occupy a large amount of system resources, preventing this type of transaction from occupying a large amount of system resources, thereby alleviating system pressure and ensuring the stable operation of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0040] Figure 1A schematic diagram of a system architecture provided for this application;

[0041] Figure 2 A schematic diagram of an optional hardware structure of a terminal 100 provided in this application;

[0042] Figure 3 A schematic diagram of the structure of a server 200 provided in this application;

[0043] Figure 4 A flowchart of a transaction flow limiting method provided in an embodiment of the present application;

[0044] Figure 5 A flow chart of a method for determining whether a target transaction meets the transaction flow limiting standard corresponding to the target flow limiting gear provided in an embodiment of the present application;

[0045] Figure 6 A flow chart of a method for determining multiple current limiting gears provided in an embodiment of the present application;

[0046] Figure 7 A schematic diagram of the structure of a transaction current limiting device provided in an embodiment of the present application;

[0047] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] It should be noted that the transaction flow limiting method and related devices provided by the present invention can be used in the field of big data or finance. The above is only an example and does not limit the application field of the transaction flow limiting method and related devices provided by the present invention.

[0049] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0050] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0051] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0052] See also Figure 1 , Figure 1 A schematic diagram of a system architecture is shown. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers ( Figure 1 In the example, a server is included, and the server 200 can provide the method provided in the embodiment of the present application for one or more terminals.

[0053] Among them, an application corresponding to the third-party system can be installed on the terminal 100. The above application and web page can provide an interface. The terminal 100 can receive relevant parameters entered by the user on the interface and send the above parameters to the server 200. The server 200 can obtain processing results based on the received parameters and return the processing results to the terminal 100.

[0054] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters by itself without the cooperation of the server, and the embodiments of the present application are not limited to this.

[0055] Next describe Figure 1 The product form of the mid-terminal 100;

[0056] The terminal 100 in the embodiment of the present application can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., and the embodiment of the present application does not impose any limitation on this.

[0057] Figure 2 An optional hardware structure diagram of the terminal 100 is shown.

[0058] refer to Figure 2 As shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), an earphone jack 163 (optional), a processor 170, an external interface 180, a power supply 190 and other components. Those skilled in the art will appreciate that Figure 2 These are merely examples of terminals or multi-function devices and do not constitute limitations on the terminals or multi-function devices, which may include more or fewer components than those shown in the figures, or combinations of certain components, or different components.

[0059] The input unit 130 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the portable multifunctional device. Specifically, the input unit 130 may include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can collect the user's touch operations on or near it (such as the user's operation on or near the touch screen using any suitable object such as fingers, joints, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch screen can detect the user's touch action on the touch screen, convert the touch action into a touch signal and send it to the processor 170, and can receive and execute the command sent by the processor 170; the touch signal at least includes the touch point coordinate information. The touch screen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, the touch screen can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch screen 131, the input unit 130 can also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.

[0060] Among them, the input device 132 can receive input data and the like.

[0061] The display unit 140 may be used to display information input by a user or information provided to a user, various menus of the terminal 100, an interactive interface, file display, and / or playback of any multimedia file.

[0062] The memory 120 can be used to store instructions and data. The memory 120 can mainly include an instruction storage area and a data storage area. The data storage area can store various data, such as multimedia files, texts, etc.; the instruction storage area can store software units such as operating systems, applications, instructions required for at least one function, or their subsets and extensions. It can also include a non-volatile random access memory; provide the processor 170 with hardware, software and data resources including management of computing and processing equipment, and support control software and applications. It is also used for the storage of multimedia files, and the storage of running programs and applications.

[0063] The processor 170 is the control center of the terminal 100. It uses various interfaces and lines to connect various parts of the entire terminal 100. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it executes various functions of the terminal 100 and processes data, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 170. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on separate chips. The processor 170 may also be used to generate corresponding operation control signals, send them to corresponding components of the computing and processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that each functional module therein performs corresponding functions, thereby controlling the corresponding components to act according to the requirements of the instructions.

[0064] The memory 120 may be used to store relevant software codes, the processor 170 may execute the steps of the relevant method, and may also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to implement corresponding functions.

[0065] The radio frequency unit 110 (optional) can be used for receiving and sending information or receiving and sending signals during a call, for example, after receiving the downlink information of the base station, it is sent to the processor 170 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the radio frequency unit 110 can also communicate with network devices and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.

[0066] In this embodiment of the present application, the RF unit 110 can send data to the server 200 and receive processing results sent by the server 200.

[0067] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.

[0068] The terminal 100 also includes a power supply 190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.

[0069] The terminal 100 further includes an external interface 180 , which may be a standard Micro USB interface or a multi-pin connector, and may be used to connect the terminal 100 to communicate with other devices, or to connect a charger to charge the terminal 100 .

[0070] Although not shown, the terminal 100 may also include a flashlight, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which are not described in detail here. Some or all of the methods described below may be applied in the following embodiments. Figure 2 In the terminal 100 shown.

[0071] Next describe Figure 1 The product form of the server 200;

[0072] Figure 3 A schematic diagram of the structure of a server 200 is provided, such as Figure 3 As shown, the server 200 includes a bus 201, a processor 202, a communication interface 203, and a memory 204. The processor 202, the memory 204, and the communication interface 203 communicate with each other via the bus 201.

[0073] The bus 201 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0074] The processor 202 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0075] The memory 204 may include a volatile memory, such as a random access memory (RAM). The memory 204 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard drive (HDD), or a solid state drive (SSD).

[0076] The memory 204 may be used to store relevant software codes, the processor 202 may execute steps of relevant chip methods, and may also schedule other units to implement corresponding functions.

[0077] It should be understood that the above-mentioned terminal 100 and server 200 can be centralized or distributed devices, and the processors in the above-mentioned terminal 100 and server 200 (such as processor 170 and processor 202) can be hardware circuits (such as application specific integrated circuit (ASIC), field-programmable gate array (FPGA), general-purpose processor, digital signal processor (DSP), microprocessor or microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.

[0078] The present application embodiment provides a transaction flow limiting method. The transaction flow limiting method provided by the present application embodiment is described in detail below in conjunction with the accompanying drawings.

[0079] Reference Figure 4 , Figure 4 A flow chart of a transaction flow limiting method provided in an embodiment of the present application, the method comprising:

[0080] Step S401: Receive a transaction request sent by a client to a transaction interface.

[0081] In the financial field, when a user requests to perform a bank transaction (eg, bank statement inquiry, loan inquiry, etc.), the bank's transaction processing system receives the transaction request sent by the user to the transaction interface through the client.

[0082] In this embodiment, the transaction processing system may have a front-end page to facilitate maintenance by technical personnel.

[0083] It should be noted that, in order to facilitate the subsequent processing of the transaction request, the transaction processing system needs to pre-process the transaction request after receiving the transaction request, such as requesting data conversion.

[0084] Step S402: Determine whether the target transaction corresponding to the transaction request is a transaction in the preset current limiting configuration. If yes, execute step S403.

[0085] It should be noted that, in this embodiment, the transaction request carries a transaction identifier representing the transaction type, and the target transaction corresponding to the transaction request can be determined based on the transaction identifier.

[0086] In this embodiment, the transactions in the preset current limiting configuration are transactions that occupy a proportion of system resources exceeding a preset proportion.

[0087] In actual applications, performance testing can be used to determine transactions that occupy more system resources in the transaction processing system, and wildcards can be configured for these transactions.

[0088] Wildcards are special statements, mainly asterisks (*) and question marks (?), used to fuzzy search files. When searching for folders, you can use them to replace one or more real characters; when you don't know the real characters or are too lazy to enter the full name, you often use wildcards to replace one or more real characters.

[0089] The value of the preset ratio is determined according to actual needs and is not limited in the present invention.

[0090] When the target transaction is not a transaction in the preset flow limiting configuration, it indicates that the proportion of system resources occupied by the target transaction does not exceed the preset proportion, that is, the data transaction volume of the target transaction is small. At this time, the transaction flow limiting operation is not performed on the target transaction.

[0091] Step S403: determine whether the target flow limiting function corresponding to the target transaction is turned on. If yes, execute step S404.

[0092] Among them, the target flow limiting function includes multiple flow limiting gears, and each of the flow limiting gears is set with a limited flow transaction volume and transaction number limit.

[0093] Among them, the number of flow limiting gears included in the target flow limiting function is determined according to actual needs. For example, the target flow limiting function includes six flow limiting gears, each of which is set with corresponding flow limiting transaction volume and transaction number limits. The flow limiting transaction volume and transaction number limits corresponding to different flow limiting gears may be different.

[0094] When the target flow limiting function corresponding to the target transaction is not turned on, a prompt message indicating that the target flow limiting function is not turned on may be output so that the technical personnel can turn on the target flow limiting function corresponding to the target transaction.

[0095] Alternatively, when the target flow limiting function corresponding to the target transaction is not enabled, the flow limiting operation on the target transaction is suspended.

[0096] Step S404: determining the target current limiting gear for the current limiting function to be enabled at the current moment.

[0097] It should be noted that the current limiting level of the same current limiting function may be different when it is enabled at different time periods, and the specific activation period of each current limiting level is related to the peak business period.

[0098] When the amount of business transaction data is relatively large, a higher current limiting gear can be enabled; conversely, when the amount of business transaction data is relatively small, a lower current limiting gear can be enabled.

[0099] Among them, the higher the flow limit level, the higher the corresponding flow limit transaction volume.

[0100] Step S405: determine whether the target transaction meets the transaction flow limiting standard corresponding to the target flow limiting gear. If yes, execute step S406.

[0101] Step S406: Perform a flow limiting operation on the target transaction.

[0102] In summary, the present invention discloses a transaction current limiting method, receiving a transaction request sent by a client to a transaction interface, when the target transaction corresponding to the transaction request is a transaction in a preset current limiting configuration, when the target current limiting function corresponding to the target transaction is turned on, the target current limiting gear at which the current limiting function is turned on at the current moment is determined, and the target current limiting function includes multiple current limiting gears, each current limiting gear sets a limited current transaction volume and a transaction number limit, and if the target transaction meets the transaction current limiting standard corresponding to the target current limiting gear, the current limiting operation is performed on the target transaction. The present invention sets a current limiting function for transactions, and sets multiple current limiting gears in the current limiting function, so as to realize transaction current limiting based on the transaction volume, thereby effectively controlling the transaction volume corresponding to transactions that occupy a large amount of system resources, preventing this type of transaction from occupying a large amount of system resources, thereby alleviating system pressure and ensuring the stable operation of the system.

[0103] To further optimize the above embodiment, see Figure 5 , a flow chart of a method for determining whether a target transaction meets a transaction flow limiting standard corresponding to a target flow limiting gear disclosed in an embodiment of the present invention, the method comprising:

[0104] Step S501, adding one to the number of transactions corresponding to the target current limiting gear to obtain the current number of transactions;

[0105] In actual applications, when the target flow limiting function corresponding to the target transaction is not turned on, the number of transactions corresponding to the target flow limiting level will not be counted.

[0106] It should be noted that when the transaction is completed or an exception occurs in the transaction, the transaction number corresponding to the transaction will be reduced by one.

[0107] Step S502, determining whether the current number of transactions exceeds the target number of transactions corresponding to the target flow-limiting gear, if not, executing step S503, if yes, executing step S504;

[0108] The present invention sets transaction number limits for different current limiting gears of the same transaction type. Different current limiting gears have different corresponding transaction number limits, thereby effectively avoiding the reduction of transaction processing system performance due to excessive transaction requests.

[0109] The transaction flow limiting standard in this embodiment includes: a target transaction number limit and a target flow limiting transaction volume corresponding to the target flow limiting gear.

[0110] By judging whether the current number of transactions exceeds the target transaction number limit corresponding to the target flow limiting gear, transaction flow limiting is performed, thereby effectively avoiding the impact of excessive transaction requests on the performance of the transaction processing system.

[0111] Among them, if the current number of transactions exceeds the target transaction number limit corresponding to the target flow limiting gear, it is determined that the target transaction meets the transaction flow limiting standard corresponding to the target flow limiting gear. At this time, the flow limiting operation can be directly performed on the target transaction.

[0112] Step S503, determine whether the concurrent transaction volume of the target transaction currently being processed reaches the target flow-limiting transaction volume corresponding to the target flow-limiting gear. If yes, execute step S504; if not, execute step S505.

[0113] The present invention sets a flow-limiting transaction volume for different flow-limiting gears of the same transaction type. The values ​​of the corresponding flow-limiting transaction volumes are different for different flow-limiting gears, thereby effectively avoiding the reduction of transaction processing system performance due to excessive transaction requests.

[0114] By judging whether the concurrent transaction volume of the target transaction currently being processed has reached the target flow-limiting transaction volume corresponding to the target flow-limiting gear, transaction flow limiting is performed, thereby effectively avoiding the impact of excessive transaction requests on the performance of the transaction processing system.

[0115] Transaction concurrency: The number of transaction requests processed by the system at the same time. It is usually measured by the number of requests or transactions that can be processed per second.

[0116] In this application, transaction concurrency refers to the number of transactions of a certain type processed by the system.

[0117] Among them, when the transaction concurrency volume currently being processed by the target transaction does not reach the target flow-limited transaction volume corresponding to the target flow-limited gear, it is determined that the target transaction does not meet the transaction flow-limited standard.

[0118] Step S504: Determine whether the target transaction meets the transaction flow limit standard.

[0119] Step S505: Determine whether the target transaction does not meet the transaction flow limiting standard.

[0120] In summary, the target current limiting function in the present invention includes multiple current limiting gears, each current limiting gear is set with a limited current transaction volume and a transaction number limit. When the current transaction number corresponding to the target current limiting gear exceeds the target transaction number limit corresponding to the target current limiting gear, it is determined that the target transaction meets the transaction current limiting standard; or the current transaction number corresponding to the target current limiting gear does not exceed the target transaction number limit corresponding to the target current limiting gear, and the transaction concurrency currently being processed by the target transaction reaches the target current limiting transaction volume corresponding to the target current limiting gear, then it is determined that the target transaction meets the transaction current limiting standard, and the current limiting operation can be performed on the target transaction. The present invention sets a current limiting function for transactions, and sets multiple current limiting gears in the current limiting function to achieve transaction current limiting based on the transaction volume, so that the transaction volume corresponding to the transaction that occupies a large amount of system resources can be effectively controlled, and this type of transaction is prevented from occupying a large amount of system resources, thereby alleviating system pressure and ensuring the stable operation of the system.

[0121] It should be noted that different transaction types in the preset current limiting configuration in the present invention correspond to different current limiting functions, and each current limiting function corresponds to multiple current limiting gears.

[0122] To further optimize the above embodiment, see Figure 6 , a flow chart of a method for determining multiple current limiting gears disclosed in an embodiment of the present invention, the method comprising:

[0123] Step S601: determine the maximum transaction volume carried by the system per unit time as the flow-limiting transaction volume of the highest flow-limiting gear;

[0124] In practical applications, the maximum transaction volume that the system can carry per unit time (for example, per second) can be estimated, and the estimated maximum transaction volume that the system can carry per unit time is determined as the flow-limited transaction volume at the highest flow-limiting level.

[0125] Step S602: determine the minimum transaction volume accepted by a single transaction service as the flow-limited transaction volume of the lowest flow-limiting gear;

[0126] In this embodiment, the minimum transaction volume that can be accepted by the transaction business corresponding to this transaction type in actual application is determined, and the minimum transaction volume is determined as the flow-limiting transaction volume of the lowest flow-limiting gear.

[0127] Among them, the lowest current limit gear in this embodiment is gear 1. In practical applications, gear 1 has the most stringent limit on transaction volume, and allows the least number of concurrent requests for this type of transaction.

[0128] Step S603: Based on the flow-limiting transaction volume of the highest flow-limiting gear and the flow-limiting transaction volume of the lowest flow-limiting gear, configure the flow-limiting transaction volume of each flow-limiting gear between the highest flow-limiting gear and the lowest flow-limiting gear according to a preset gradient;

[0129] Assuming that the highest flow-limiting gear is level six and the lowest flow-limiting gear is level one, based on the flow-limiting trading volume of level six and the flow-limiting trading volume of level one, the flow-limiting trading volumes of levels two, three, four and five are configured between level one and level six according to a preset gradient.

[0130] Among them, when dividing the current limiting gear, the query method can be used. The query method is a function in the Python pandas library that allows users to filter data using Boolean expressions. The main advantage of this method is that it can complete the filtering operation in one line of code without using loops or other conditional statements.

[0131] Step S604: Determine the transaction number limits corresponding to the different current limiting gears based on the transaction types corresponding to the current limiting function.

[0132] Among them, the transaction number limits corresponding to each flow limiting level for different transaction types are different, and the value of each transaction number is related to the transaction type and the flow limiting level.

[0133] For examples, see Table 1.

[0134] Table 1

[0135]

[0136] To further optimize the above embodiment, step S406 may specifically include:

[0137] Termination of the target transaction;

[0138] Output transaction limit prompt information.

[0139] In this embodiment, when it is determined that the target transaction meets the transaction flow limiting standard corresponding to the target flow limiting gear, the target transaction is limited by terminating the target transaction, so that the transaction volume corresponding to the transaction that occupies a large amount of system resources can be effectively controlled to prevent this type of transaction from occupying a large amount of system resources, thereby alleviating system pressure and ensuring the stable operation of the system. By outputting the transaction flow limiting prompt information, the relevant technical personnel are reminded that the target transaction meets the transaction flow limiting standard corresponding to the target flow limiting gear and corresponding flow limiting measures need to be taken.

[0140] Among them, when the target transaction does not meet the transaction flow limit standard corresponding to the target flow limit gear, the target transaction is processed normally.

[0141] A transaction flow limiting method provided in an embodiment of the present application is introduced above, and a device for executing the transaction flow limiting method is introduced below.

[0142] See also Figure 7 , Figure 7A schematic diagram of the structure of a transaction current limiting device provided in an embodiment of the present application, the device comprising:

[0143] The receiving unit 701 is used to receive a transaction request sent by the client to the transaction interface;

[0144] In the financial field, when a user requests to perform a bank transaction (eg, bank statement inquiry, loan inquiry, etc.), the bank's transaction processing system receives the transaction request sent by the user to the transaction interface through the client.

[0145] In this embodiment, the transaction processing system may have a front-end page to facilitate maintenance by technical personnel.

[0146] It should be noted that, in order to facilitate the subsequent processing of the transaction request, the transaction processing system needs to pre-process the transaction request after receiving the transaction request, such as requesting data conversion.

[0147] The first judgment unit 702 is used to judge whether the target transaction corresponding to the transaction request is a transaction in a preset current limiting configuration;

[0148] It should be noted that, in this embodiment, the transaction request carries a transaction identifier representing the transaction type, and the target transaction corresponding to the transaction request can be determined based on the transaction identifier.

[0149] In this embodiment, the transactions in the preset current limiting configuration are transactions that occupy a proportion of system resources exceeding a preset proportion.

[0150] In actual applications, performance testing can be used to determine transactions that occupy more system resources in the transaction processing system, and wildcards can be configured for these transactions.

[0151] Wildcards are special statements, mainly asterisks (*) and question marks (?), used to fuzzy search files. When searching for folders, you can use them to replace one or more real characters; when you don't know the real characters or are too lazy to enter the full name, you often use wildcards to replace one or more real characters.

[0152] The value of the preset ratio is determined according to actual needs and is not limited in the present invention.

[0153] When the target transaction is not a transaction in the preset flow limiting configuration, it indicates that the proportion of system resources occupied by the target transaction does not exceed the preset proportion, that is, the data transaction volume of the target transaction is small. At this time, the transaction flow limiting operation is not performed on the target transaction.

[0154] The second judgment unit 703 is used to judge whether the target flow limiting function corresponding to the target transaction is turned on when the first judgment unit judges that the target transaction is yes;

[0155] Among them, the target flow limiting function includes multiple flow limiting gears, and each of the flow limiting gears is set with a limited flow transaction volume and transaction number limit.

[0156] Among them, the number of flow limiting gears included in the target flow limiting function is determined according to actual needs. For example, the target flow limiting function includes six flow limiting gears, each of which is set with corresponding flow limiting transaction volume and transaction number limits. The flow limiting transaction volume and transaction number limits corresponding to different flow limiting gears may be different.

[0157] When the target flow limiting function corresponding to the target transaction is not turned on, a prompt message indicating that the target flow limiting function is not turned on may be output so that the technical personnel can turn on the target flow limiting function corresponding to the target transaction.

[0158] Alternatively, when the target flow limiting function corresponding to the target transaction is not enabled, the flow limiting operation on the target transaction is suspended.

[0159] The third judgment unit 704 is used to determine the target current limiting gear of the current limiting function at the current moment when the second judgment unit judges that the current limiting function is enabled;

[0160] It should be noted that the current limiting level of the same current limiting function may be different when it is enabled at different time periods, and the specific activation period of each current limiting level is related to the peak business period.

[0161] When the amount of business transaction data is relatively large, a higher current limiting gear can be enabled; conversely, when the amount of business transaction data is relatively small, a lower current limiting gear can be enabled.

[0162] Among them, the higher the flow limit level, the higher the corresponding flow limit transaction volume.

[0163] The fourth judgment unit 705 is used to judge whether the target transaction meets the transaction flow limiting standard corresponding to the target flow limiting gear;

[0164] The current limiting unit 706 is used to perform a current limiting operation on the target transaction when the fourth judgment unit determines that the result is yes.

[0165] In summary, the present invention discloses a transaction current limiting device, which receives a transaction request sent by a client to a transaction interface. When the target transaction corresponding to the transaction request is a transaction in a preset current limiting configuration, and when the target current limiting function corresponding to the target transaction is turned on, the target current limiting gear at which the current limiting function is turned on at the current moment is determined. The target current limiting function includes multiple current limiting gears, and each current limiting gear is set with a limited current transaction volume and a transaction number limit. If the target transaction meets the transaction current limiting standard corresponding to the target current limiting gear, the current limiting operation is performed on the target transaction. The present invention sets a current limiting function for transactions, and sets multiple current limiting gears in the current limiting function, so as to implement transaction current limiting based on the transaction volume. This can effectively control the transaction volume corresponding to transactions that occupy a large amount of system resources, prevent this type of transaction from occupying a large amount of system resources, and thus alleviate system pressure and ensure stable operation of the system.

[0166] To further optimize the above embodiment, the fourth determination unit 705 may be specifically used for:

[0167] Add one to the number of transactions corresponding to the target current limiting gear to obtain the current number of transactions;

[0168] Determine whether the current number of transactions exceeds the target number of transactions limit corresponding to the target flow limiting gear;

[0169] If not, it is determined whether the transaction concurrency volume currently being processed by the target transaction reaches the target flow-limiting transaction volume corresponding to the target flow-limiting gear, so as to determine whether the target transaction meets the transaction flow-limiting standard.

[0170] In actual applications, when the target flow limiting function corresponding to the target transaction is not turned on, the number of transactions corresponding to the target flow limiting level will not be counted.

[0171] It should be noted that when the transaction is completed or an exception occurs in the transaction, the transaction number corresponding to the transaction will be reduced by one.

[0172] The present invention sets a flow-limiting transaction volume for different flow-limiting gears of the same transaction type. The values ​​of the corresponding flow-limiting transaction volumes are different for different flow-limiting gears, thereby effectively avoiding the reduction of transaction processing system performance due to excessive transaction requests.

[0173] By judging whether the concurrent transaction volume of the target transaction currently being processed has reached the target flow-limiting transaction volume corresponding to the target flow-limiting gear, transaction flow limiting is performed, thereby effectively avoiding the impact of excessive transaction requests on the performance of the transaction processing system.

[0174] Transaction concurrency: The number of transaction requests processed by the system at the same time. It is usually measured by the number of requests or transactions that can be processed per second.

[0175] In summary, the target current limiting function in the present invention includes multiple current limiting gears, each current limiting gear is set with a limited current transaction volume and a transaction number limit. When the current transaction number corresponding to the target current limiting gear exceeds the target transaction number limit corresponding to the target current limiting gear, it is determined that the target transaction meets the transaction current limiting standard; or the current transaction number corresponding to the target current limiting gear does not exceed the target transaction number limit corresponding to the target current limiting gear, and the transaction concurrency currently being processed by the target transaction reaches the target current limiting transaction volume corresponding to the target current limiting gear, then it is determined that the target transaction meets the transaction current limiting standard, and the current limiting operation can be performed on the target transaction. The present invention sets a current limiting function for transactions, and sets multiple current limiting gears in the current limiting function to achieve transaction current limiting based on the transaction volume, so that the transaction volume corresponding to the transaction that occupies a large amount of system resources can be effectively controlled, and this type of transaction is prevented from occupying a large amount of system resources, thereby alleviating system pressure and ensuring the stable operation of the system.

[0176] It should be noted that different transaction types in the preset current limiting configuration in the present invention correspond to different current limiting functions, and each current limiting function corresponds to multiple current limiting gears.

[0177] Therefore, in order to further optimize the above embodiment, the transaction current limiting device may further include: a gear determination unit;

[0178] The gear position determination unit is used to determine multiple current limiting gear positions.

[0179] The gear determination unit can be specifically used for:

[0180] (1) The maximum transaction volume that the system can carry per unit time is determined as the flow-limited transaction volume of the highest flow-limiting level.

[0181] In practical applications, the maximum transaction volume that the system can carry per unit time (for example, per second) can be estimated, and the estimated maximum transaction volume that the system can carry per unit time is determined as the flow-limited transaction volume at the highest flow-limiting level.

[0182] (2) The minimum transaction volume accepted by a single transaction business is determined as the flow-limited transaction volume of the lowest flow-limiting level.

[0183] In this embodiment, the minimum transaction volume that can be accepted by the transaction business corresponding to this transaction type in actual application is determined, and the minimum transaction volume is determined as the flow-limiting transaction volume of the lowest flow-limiting gear.

[0184] Among them, the lowest current limit gear in this embodiment is gear 1. In practical applications, gear 1 has the most stringent limit on transaction volume, and allows the least number of concurrent requests for this type of transaction.

[0185] (3) Based on the flow-limiting transaction volume of the highest flow-limiting gear and the flow-limiting transaction volume of the lowest flow-limiting gear, the flow-limiting transaction volume of each flow-limiting gear between the highest flow-limiting gear and the lowest flow-limiting gear is configured according to a preset gradient.

[0186] Assuming that the highest flow-limiting gear is level six and the lowest flow-limiting gear is level one, based on the flow-limiting trading volume of level six and the flow-limiting trading volume of level one, the flow-limiting trading volumes of levels two, three, four and five are configured between level one and level six according to a preset gradient.

[0187] Among them, when dividing the current limiting gear, the query method can be used. The query method is a function in the Python pandas library that allows users to filter data using Boolean expressions. The main advantage of this method is that it can complete the filtering operation in one line of code without using loops or other conditional statements.

[0188] (4) Determine the transaction number limit corresponding to the different current limiting gears based on the transaction type corresponding to the current limiting function.

[0189] Among them, the transaction number limits corresponding to each flow limiting level for different transaction types are different, and the value of each transaction number is related to the transaction type and the flow limiting level.

[0190] To further optimize the above embodiment, the current limiting unit 706 can be specifically used for

[0191] Termination of the target transaction;

[0192] Output transaction limit prompt information.

[0193] In this embodiment, when it is determined that the target transaction meets the transaction flow limiting standard corresponding to the target flow limiting gear, the target transaction is limited by terminating the target transaction, so that the transaction volume corresponding to the transaction that occupies a large amount of system resources can be effectively controlled to prevent this type of transaction from occupying a large amount of system resources, thereby alleviating system pressure and ensuring the stable operation of the system. By outputting the transaction flow limiting prompt information, the relevant technical personnel are reminded that the target transaction meets the transaction flow limiting standard corresponding to the target flow limiting gear and corresponding flow limiting measures need to be taken.

[0194] Among them, when the target transaction does not meet the transaction flow limit standard corresponding to the target flow limit gear, the target transaction is processed normally.

[0195] The present application also provides an electronic device in an embodiment. Figure 8As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic device in the embodiments of the present application may include but is not limited to fixed terminals such as mobile phones, notebook computers, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 8 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0196] like Figure 8 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 to a random access memory (RAM) 803. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0197] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a memory card, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0198] Also provided in an embodiment of the present application is a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any transaction flow limiting method provided in an embodiment of the present application.

[0199] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any transaction flow limiting method provided in the embodiment of the present application.

[0200] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0201] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0202] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0203] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A transaction flow limiting method, It is characterized in that include: Receive transaction requests sent by the client to the transaction interface; Determine whether the target transaction corresponding to the transaction request is a transaction in a preset current limiting configuration; If yes, determine whether the target flow limiting function corresponding to the target transaction is turned on, wherein the target flow limiting function includes multiple flow limiting gears, and each flow limiting gear sets a flow limiting transaction volume and transaction number limit; If yes, determining the target current limiting gear for the current limiting function to be enabled at the current moment; Determine whether the target transaction meets the transaction flow limit standard corresponding to the target flow limit gear; If yes, a flow limiting operation is performed on the target transaction.

2. The transaction flow limiting method according to claim 1, It is characterized in that Determining whether the target transaction meets the transaction flow limiting standard corresponding to the target flow limiting gear includes: Add one to the number of transactions corresponding to the target current limiting gear to obtain the current number of transactions; Determine whether the current number of transactions exceeds the target number of transactions limit corresponding to the target flow limiting gear; If not, it is determined whether the transaction concurrency volume currently being processed by the target transaction reaches the target flow-limiting transaction volume corresponding to the target flow-limiting gear, so as to determine whether the target transaction meets the transaction flow-limiting standard.

3. The transaction flow limiting method according to claim 1, It is characterized in that Different transaction types in the preset current limiting configuration correspond to different current limiting functions, and each of the current limiting functions corresponds to multiple current limiting gears.

4. The transaction flow limiting method according to claim 3, It is characterized in that The process of determining the plurality of current limiting gears includes: The maximum transaction volume that the system can carry per unit time is determined as the flow-limited transaction volume of the highest flow-limiting gear; The minimum transaction volume accepted by a single transaction business is determined as the flow-limited transaction volume of the lowest flow-limiting level; Based on the flow-limiting transaction volume of the highest flow-limiting gear and the flow-limiting transaction volume of the lowest flow-limiting gear, the flow-limiting transaction volume of each flow-limiting gear between the highest flow-limiting gear and the lowest flow-limiting gear is configured according to a preset gradient; The transaction number limits corresponding to the different current limiting gears are determined based on the transaction type corresponding to the current limiting function.

5. The transaction flow limiting method according to claim 1, It is characterized in that Performing a flow limiting operation on the target transaction includes: terminating the target transaction; Output transaction limit prompt information.

6. The transaction flow limiting method according to any one of claims 1 to 5, It is characterized in that The transactions in the preset current limiting configuration are transactions that occupy a proportion of system resources exceeding a preset proportion.

7. A transaction current limiting device, It is characterized in that include: A receiving unit, used to receive a transaction request sent by a client to the transaction interface; A first judgment unit, configured to judge whether a target transaction corresponding to the transaction request is a transaction in a preset current limiting configuration; A second judgment unit is used to judge whether the target flow limiting function corresponding to the target transaction is turned on when the first judgment unit judges that it is yes, wherein the target flow limiting function includes multiple flow limiting gears, and each of the flow limiting gears is set with a flow limiting transaction amount and a transaction number limit; A third judgment unit is used to determine a target current limiting gear for the current limiting function to be turned on at the current moment when the second judgment unit judges that the current limiting function is turned on at the current moment; A fourth judgment unit, used to judge whether the target transaction meets the transaction flow limiting standard corresponding to the target flow limiting gear; A current limiting unit is used to perform a current limiting operation on the target transaction when the fourth judgment unit determines that the target transaction is yes.

8. A computer program product, It is characterized in that It includes computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the transaction flow limiting method as described in any one of claims 1 to 6.

9. An electronic device, It is characterized in that The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the transaction flow limiting method as described in any one of claims 1 to 6.

10. A computer storage medium, It is characterized in that The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the transaction flow limiting method as described in any one of claims 1 to 6.