CN116781621A - Transaction flow limiting method, device, equipment and computer storage medium - Google Patents

Transaction flow limiting method, device, equipment and computer storage medium Download PDF

Info

Publication number
CN116781621A
CN116781621A CN202310685567.6A CN202310685567A CN116781621A CN 116781621 A CN116781621 A CN 116781621A CN 202310685567 A CN202310685567 A CN 202310685567A CN 116781621 A CN116781621 A CN 116781621A
Authority
CN
China
Prior art keywords
transaction
transaction request
request messages
target
messages
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.)
Pending
Application number
CN202310685567.6A
Other languages
Chinese (zh)
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202310685567.6A priority Critical patent/CN116781621A/en
Publication of CN116781621A publication Critical patent/CN116781621A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The application discloses a transaction flow limiting method, a transaction flow limiting device, transaction flow limiting equipment and a computer storage medium. Relates to the technical field of big data, and the method comprises the following steps: receiving N transaction request messages sent by terminal equipment through a plurality of interfaces; controlling to open a transaction flow limit switch under the condition that the number of the transaction request messages is larger than a target value and/or the time for responding to the transaction request messages is larger than a preset duration; under the condition that the N transaction request messages comprise K first transaction request messages, generating first transaction information of the K first transaction request messages; and sending the first transaction information of the K first transaction request messages to the terminal equipment. Therefore, the problem that the processing efficiency of transaction requests is low because processes are blocked and all transactions need to wait is solved, and the use experience of users is enhanced.

Description

Transaction flow limiting method, device, equipment and computer storage medium
Technical Field
The application belongs to the technical field of big data, and particularly relates to a transaction flow limiting method, a transaction flow limiting device, transaction flow limiting equipment and a computer storage medium.
Background
With the continuous development of the internet financial industry and the increase of platform transactions, a transaction server receives a large number of transaction requests, the transaction server cannot process the transaction requests, so that the transaction process is blocked, all transactions are waiting to be processed, and thus the conditions of failure or overtime of the requests occur, the processing efficiency of the transaction requests is too low, the transaction process of a user is influenced, and the user experience is influenced.
Disclosure of Invention
The embodiment of the application provides a transaction flow limiting method, a device, equipment and a computer storage medium, which can solve the problem of low processing efficiency of transaction requests caused by the fact that processes are blocked and all transactions need to wait, can not influence the processing process of request messages without marked flow limiting marks, and enhance the use experience of users.
In a first aspect, an embodiment of the present application provides a transaction flow limiting method, including:
receiving N transaction request messages sent by terminal equipment through a plurality of interfaces;
controlling to open a transaction flow limit switch under the condition that the number of the transaction request messages is larger than a target value and/or the time for responding to the transaction request messages is larger than a preset duration;
under the condition that K first transaction request messages are included in N transaction request messages, generating first transaction information of the K first transaction request messages, wherein the first transaction request messages comprise a current limiting identifier which is an identifier marked by M target interfaces, and the interfaces comprise M target interfaces, wherein N and K are positive integers which are larger than 0, and N is larger than K;
and sending the first transaction information of the K first transaction request messages to the terminal equipment.
In one possible embodiment, after the first transaction information of the K first transaction request messages is sent to the terminal device, the method further includes:
under the condition that the number of the second transaction request messages is larger than a target value and/or the time for responding to the second transaction request messages is larger than a preset duration, distributing weights to the second transaction request messages according to the types of the second transaction request messages based on weight distribution rules, wherein the second transaction request messages are transaction request messages except K first transaction request messages in N transaction request messages;
generating first transaction information of a target transaction request message in the second transaction request message according to the weight of the second transaction request message;
and sending the first transaction information of the target transaction request message to the terminal equipment.
In one possible implementation embodiment, after sending the first transaction information of the target transaction request message to the terminal device, the method further includes:
and controlling to close the transaction current limiting switch.
In one possible implementation embodiment, the method further includes:
under the condition that the number of the transaction request messages is smaller than a target value and the time for responding to the transaction request messages is smaller than a preset duration, carrying out service processing on the N transaction request messages one by one to generate transaction response messages;
and sending a transaction response message to the terminal equipment.
In one possible implementation embodiment, the method further includes:
under the condition that the number of the second transaction request messages is smaller than the target value and the time for responding to the second transaction request messages is smaller than the preset time length, carrying out business processing on the second transaction request messages one by one to generate transaction response messages;
and sending a transaction response message of the second transaction request message to the terminal equipment.
In one possible implementation embodiment, the method further includes:
under the condition that all the N transaction request messages do not comprise the flow limiting identification, distributing weights for the transaction request messages according to the types of the transaction request messages based on weight distribution rules;
generating first transaction information of target transaction request messages in N transaction request messages according to the weight of the transaction request messages;
and sending the first transaction information of the target transaction request message to the terminal equipment.
In one possible embodiment, generating first transaction information of a target transaction request message in N transaction request messages according to weights of the transaction request messages includes:
sorting the N transaction request messages according to the weights of the transaction request messages to obtain the priorities of the N transaction request messages;
and generating first transaction information of target transaction request messages in the N transaction request messages according to the priority.
In one possible implementation embodiment, the method further includes:
business processing is carried out on the transaction request messages except the target transaction request message in the N transaction request messages one by one according to the priority, and a transaction response message is generated;
and sending transaction response messages of the transaction request messages except the target transaction request message in the N transaction request messages to the terminal equipment.
In one possible implementation embodiment, the method further includes:
under the condition that all the N transaction request messages comprise the current limiting identification, generating first transaction information of the N transaction request messages;
and sending the first transaction information of the N transaction request messages to the terminal equipment.
In a second aspect, an embodiment of the present application provides a transaction flow restricting device, including:
the receiving module is used for receiving N transaction request messages sent by the terminal equipment through a plurality of interfaces;
the control module is used for controlling the switching-on of the transaction current limiting switch under the condition that the number of the transaction request messages is larger than a target value and/or the time for responding to the transaction request messages is larger than a preset duration;
the generating module is used for generating first transaction information of K first transaction request messages under the condition that the N transaction request messages comprise K first transaction request messages, wherein the first transaction request messages comprise a current limiting identifier which is an identifier marked by M target interfaces, and the interfaces comprise M target interfaces, N and K are positive integers which are larger than 0, and N is larger than K;
and the sending module is used for sending the first transaction information of the K first transaction request messages to the terminal equipment.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements any of the above methods of limiting current in transactions.
In a fourth aspect, embodiments of the present application provide a computer storage medium having stored thereon computer program instructions which, when executed by a processor, implement a transaction throttling method of any of the above.
In a fifth aspect, an embodiment of the present application provides a computer program product, where instructions in the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the transaction flow restriction method of any one of the above.
The transaction flow limiting method, the device, the equipment and the computer storage medium provided by the embodiment of the application are used for receiving N transaction request messages sent by the terminal equipment through a plurality of interfaces; controlling to open a transaction flow limit switch under the condition that the number of the transaction request messages is larger than a target value and/or the time for responding to the transaction request messages is larger than a preset duration; under the condition that the N transaction request messages comprise K first transaction request messages, generating first transaction information of the K first transaction request messages; and sending the first transaction information of the K first transaction request messages to the terminal equipment. Therefore, when the transaction server receives the transaction request message sent by the target interface, whether the transaction request message comprises the current limiting identification is judged, a part of the transaction request message is filtered, and the transaction failure information is returned to the user, so that the problem that the processing efficiency of the transaction request message is low because all transactions need to wait due to blocked processes is solved, the processing process of the request message without the current limiting identification is not influenced, and the use experience of the user is enhanced.
Drawings
In order to more clearly illustrate the technical solution of the embodiments of the present application, the drawings that are needed to be used in the embodiments of the present application will be briefly described, and it is possible for a person skilled in the art to obtain other drawings according to these drawings without inventive effort.
FIG. 1 is a flow chart of a transaction throttling method according to an embodiment of the application;
FIG. 2 is a flow chart illustrating a transaction throttling method according to another embodiment of the present application
FIG. 3 is a schematic diagram of a transaction flow restrictor according to another embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to still another embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application will be described in detail below, and in order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail below with reference to the accompanying drawings and the detailed embodiments. It should be understood that the particular embodiments described herein are meant to be illustrative of the application only and not limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the application by showing examples of the application.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It should be noted that, in the embodiment of the present application, the data acquisition, storage, use, processing, etc. all conform to the relevant regulations of the national laws and regulations.
With the continuous development of the internet financial industry and the increase of platform transactions, a transaction server receives a large number of transaction requests, the transaction server cannot process the transaction requests, so that the transaction process is blocked, all transactions are waiting to be processed, and thus the conditions of failure or overtime of the requests occur, the processing efficiency of the transaction requests is too low, the transaction process of a user is influenced, and the user experience is influenced.
In order to solve the problems in the prior art, embodiments of the present application provide a transaction flow limiting method, a device, and a computer storage medium, where the method can be applied to a point of sale (POS) management system. The transaction flow limiting method provided by the embodiment of the application is first described below.
Fig. 1 is a flow chart illustrating a transaction flow restriction method according to an embodiment of the application.
As shown in fig. 1, the transaction flow limiting method provided in the embodiment of the application includes S110 to S140.
S110, receiving N transaction request messages sent by the terminal equipment through a plurality of interfaces.
In some embodiments, the server may receive a transaction request message of at least one terminal device, where the terminal device may send the at least one transaction request message. The transaction request message can be sent to the server through a plurality of interfaces, and one interface can transmit different transaction request messages. As one example, the server may be a transaction server.
And S120, controlling to open the transaction current limit switch under the condition that the number of the transaction request messages is larger than the target value and/or the time for responding to the transaction request messages is longer than the preset duration.
In some embodiments, in the event that the number of transaction requests received by the server is excessive, the processing pressure at the server may increase. And under the condition that the number of the transaction request messages is larger than the target value and/or the time for responding to the transaction request messages is longer than the preset time, the processing capacity of the service end is insufficient to bear the current pressure, and the transaction current limiting switch is controlled to be opened so that the service end is in a current limiting state.
In some embodiments, the transaction limit switch may be controlled to be turned on by setting a target value and/or a preset duration, where the target value and the preset duration are preset values that are input to the server in advance by the user according to the processing capability of the server.
S130, under the condition that K first transaction request messages are included in N transaction request messages, generating first transaction information of the K first transaction request messages, wherein the first transaction request messages comprise a current limiting identifier which is an identifier marked by M target interfaces, and the interfaces comprise M target interfaces, wherein N and K are positive integers which are larger than 0, and N is larger than K.
In some embodiments, the N transaction request messages may include a transaction request message marked with a current limit identifier and a transaction request message without a current limit identifier, where whether the transaction message has a marked current limit identifier is determined according to an interface transmitting the transaction request message, and a request message sent through a target interface is marked with the current limit identifier.
In some embodiments, the current limit identifier in the transaction request message is identified, and the K first transaction request messages are identified to include the current limit identifier. In the case that the N transaction request messages include K first transaction request messages, first transaction information of the K first transaction request messages is generated, for example, the first transaction information may be "transaction failure" or "transaction timeout".
In some embodiments, transaction request messages without a current limit identifier may be processed preferentially.
S140, first transaction information of K first transaction request messages is sent to the terminal equipment.
In some embodiments, first transaction information of the K first transaction request messages is sent to the terminal device for the terminal device to display the first transaction information.
Therefore, when the transaction server receives the transaction request message sent by the target interface, whether the transaction request message comprises the current limiting identification is judged, a part of the transaction request message is filtered, and the transaction failure information is returned to the user, so that the problem that the processing efficiency of the transaction request is too low because all transactions need to wait due to blocked processes is solved, the processing process of the request message without the current limiting identification is not influenced, and the use experience of the user is enhanced.
Based on this, in some embodiments, as shown in fig. 2, after S140 described above, the method may further include S150 to S170.
And S150, distributing weights to the second transaction request messages according to the types of the second transaction request messages based on weight distribution rules under the condition that the number of the second transaction request messages is larger than a target value and/or the time for responding to the second transaction request messages is longer than a preset duration, wherein the second transaction request messages are transaction request messages except K first transaction request messages in N transaction request messages.
In some embodiments, after filtering the transaction request messages including the current limit identifier, determining whether the number of the second transaction request messages is greater than a target value, responding to whether the time of the second transaction request messages is greater than a preset duration, and if the number of the second transaction request messages is greater than the target value and/or responding to the time of the second transaction request messages is greater than the preset duration, distributing weights to the second transaction request messages according to the type of the second transaction request messages based on the weight distribution rule, and preferentially processing the second transaction request messages with high weights.
In some embodiments, the weight allocation rule is a rule set in advance, including a correspondence between a type of the transaction request message and a weight.
S160, generating first transaction information of a target transaction request message in the second transaction request message according to the weight of the second transaction request message.
In some embodiments, for the target transaction request message with lower weight, the first transaction information of the target transaction request message is generated, for example, the first transaction information may be "transaction failure" or "transaction timeout".
In some embodiments, the second transaction request message includes at least one target transaction request message.
S170, sending first transaction information of a target transaction request message to the terminal equipment.
In some embodiments, the first transaction information of the target transaction request message is sent to the terminal device for the terminal device to display the first transaction information of the target transaction request message.
Therefore, the transaction request message is filtered again through the transaction type, the number of the transaction request messages which the transaction server needs to respond to is reduced, the problem that the processing efficiency of the transaction request is low because the process is blocked and all transactions need to wait is solved, the weight of the transaction request message is distributed according to the transaction type, so that urgent transactions can be processed preferentially, for general non-urgent transactions, users can send requests again in a non-current limiting period, the transaction process of the users is not influenced, normal progress of certain types of transactions is guaranteed, and the use experience of the users is enhanced.
Based on this, in some embodiments, after S170 above, the method may further include:
and controlling to close the transaction current limiting switch.
In some embodiments, after filtering out a portion of the transaction request message, control closes the transaction limit switch.
In some embodiments, after the transaction flow limit switch is controlled to be turned off, whether the number of the received transaction request messages is greater than a target value and whether the response time is greater than a preset duration can be further determined, and if not, the transaction flow limit switch is kept turned off, so that the server is in an unlimited state.
Thus, all transaction request messages are normally processed in the unrestricted flow state.
Based on this, in some embodiments, the method may further comprise: under the condition that the number of the transaction request messages is smaller than a target value and the time for responding to the transaction request messages is smaller than a preset duration, carrying out service processing on the N transaction request messages one by one to generate transaction response messages;
and sending a transaction response message to the terminal equipment.
In some embodiments, when the number of transaction request messages is less than the target value and the time for responding to the transaction request messages is less than the preset time length, the transaction limit switch is kept in a closed state, and the N transaction request messages are processed one by one to generate transaction response messages.
Thus, under the condition that the number of the transaction requests is not large and the server side can normally process all the transaction request messages, the service side can normally process all the transaction request messages.
Based on this, in some embodiments, the method may further comprise:
under the condition that the number of the second transaction request messages is smaller than the target value and the time for responding to the second transaction request messages is smaller than the preset time length, carrying out business processing on the second transaction request messages one by one to generate transaction response messages;
and sending a transaction response message of the second transaction request message to the terminal equipment.
In some embodiments, after filtering the transaction request messages including the current limit identifier, determining whether the number of the second transaction request messages is greater than a target value, and if the time for responding to the second transaction request messages is greater than a preset duration, and under the condition that the number of the second transaction request messages is less than the target value and the time for responding to the second transaction request messages is less than the preset duration, performing service processing on the second transaction request messages one by one, so as to generate a transaction response message.
Thus, for the transaction request message without the current limiting mark, under the condition that the service end can normally process the transaction request message without the current limiting mark, the service end normally processes all the transaction request messages without the current limiting mark.
Based on this, in some embodiments, the method may further comprise:
under the condition that all the N transaction request messages do not comprise the flow limiting identification, distributing weights for the transaction request messages according to the types of the transaction request messages based on weight distribution rules;
generating first transaction information of target transaction request messages in N transaction request messages according to the weight of the transaction request messages;
and sending the first transaction information of the target transaction request message to the terminal equipment.
In some embodiments, if all of the N transaction request messages do not include the current limit identifier, a weight may be allocated to each transaction request message according to a type of the transaction request message, and the first transaction information of the target transaction request message in the N transaction request messages may be generated according to the weight of the transaction request message. In this way, a processing mode is set for the extreme case, and under the condition that all of the N transaction request messages do not include the current limit identifier, the processing mode can also be processed according to the type of the transaction request message.
Based on this, in some embodiments, generating first transaction information of a target transaction request message of the N transaction request messages according to weights of the transaction request messages includes:
sorting the N transaction request messages according to the weights of the transaction request messages to obtain the priorities of the N transaction request messages;
and generating first transaction information of target transaction request messages in the N transaction request messages according to the priority.
In some embodiments, the order of the transaction request messages received by the server is not fixed, and may be arranged in various manners, or may be arranged randomly, after the weight is allocated to the transaction request messages, the weights of the transaction request messages are not equal, and the N transaction request messages are ordered according to the weights of the transaction request messages, so that the priority of the N transaction request messages may be obtained.
Thus, by setting the priority, it is possible to clearly determine whether or not to process the transaction request message, and the order of processing, the priority being higher, and the first transaction information being returned later than the priority.
Based on this, in some embodiments, the method may further comprise:
business processing is carried out on the transaction request messages except the target transaction request message in the N transaction request messages one by one according to the priority, and a transaction response message is generated;
and sending transaction response messages of the transaction request messages except the target transaction request message in the N transaction request messages to the terminal equipment.
In some embodiments, the transaction request message is processed from top to bottom according to the priority, and the transaction response message is generated according to the priority.
Thus, emergency transactions can be processed preferentially through the priority setting, and the user experience is enhanced.
Based on this, in some embodiments, the method may further comprise:
under the condition that all the N transaction request messages comprise the current limiting identification, generating first transaction information of the N transaction request messages;
and sending the first transaction information of the N transaction request messages to the terminal equipment.
Therefore, when the server side is in the current limiting state, all transaction request messages comprise the current limiting identification, the first transaction information is returned completely, and paralysis of the server side caused by overlarge processing pressure is avoided.
Based on the transaction flow limiting method provided by the embodiment, correspondingly, the application further provides a specific implementation mode of the transaction flow limiting device. Please refer to the following examples.
Referring first to fig. 3, a transaction flow restrictor 300 according to an embodiment of the present application includes:
a receiving module 310, configured to receive N transaction request messages sent by a terminal device through multiple interfaces;
the control module 320 is configured to control to open the transaction current limit switch when the number of transaction request messages is greater than a target value and/or the time for responding to the transaction request messages is greater than a preset duration;
the generating module 330 is configured to generate, when the N transaction request messages include K first transaction request messages, first transaction information of the K first transaction request messages, where the first transaction request messages include a current limit identifier, the current limit identifier is an identifier marked by M target interfaces, and the multiple interfaces include M target interfaces, where N and K are positive integers greater than 0, and N > K;
the sending module 340 is configured to send first transaction information of K first transaction request messages to a terminal device.
Based on this, in some embodiments, the apparatus 300 may further include:
the distribution module is used for distributing weights to the second transaction request messages according to the types of the second transaction request messages based on weight distribution rules under the condition that the number of the second transaction request messages is larger than a target value and/or the time for responding to the second transaction request messages is longer than a preset duration after the first transaction information of the K first transaction request messages is sent to the terminal equipment, and the second transaction request messages are transaction request messages except the K first transaction request messages in the N transaction request messages;
the generating module 330 is further configured to generate first transaction information of a target transaction request packet in the second transaction request packet according to the weight of the second transaction request packet;
the sending module 340 is further configured to send the first transaction information of the target transaction request packet to the terminal device.
Based on this, in some embodiments, the apparatus 300 may further include:
the control module 320 is further configured to control to close the transaction limiting switch after sending the first transaction information of the target transaction request message to the terminal device.
Based on this, in some embodiments, the apparatus 300 may further include:
the generating module 330 is further configured to perform service processing on the N transaction request messages one by one, and generate a transaction response message when the number of the transaction request messages is less than the target value and the time for responding to the transaction request messages is less than the preset duration;
the sending module 340 is further configured to send a transaction response message to the terminal device.
Based on this, in some embodiments, the apparatus 300 may further include:
the generating module 330 is further configured to perform service processing on the second transaction request messages one by one, and generate a transaction response message when the number of the second transaction request messages is less than the target value and the time for responding to the second transaction request messages is less than the preset duration;
the sending module 340 is further configured to send a transaction response message of the second transaction request message to the terminal device.
Based on this, in some embodiments, the apparatus 300 may further include:
the distribution module is further used for distributing weights to the transaction request messages according to the types of the transaction request messages based on weight distribution rules under the condition that all the N transaction request messages do not comprise the flow limiting identifiers;
the generating module 330 is further configured to generate first transaction information of a target transaction request message in the N transaction request messages according to the weight of the transaction request messages;
the sending module 340 is further configured to send the first transaction information of the target transaction request packet to the terminal device.
Based on this, in some embodiments, the generation module 330 may include:
the ordering unit is used for ordering the N transaction request messages according to the weights of the transaction request messages to obtain the priorities of the N transaction request messages;
and the generating unit is used for generating first transaction information of target transaction request messages in the N transaction request messages according to the priority.
Based on this, in some embodiments, the apparatus 300 may further include:
the generating module 330 is further configured to perform service processing on the transaction request messages except for the target transaction request message in the N transaction request messages one by one according to the priority, so as to generate a transaction response message;
the sending module 340 is further configured to send a transaction response message of the transaction request messages except the target transaction request message in the N transaction request messages to the terminal device.
Based on this, in some embodiments, the apparatus 300 may further include:
the generating module 330 is further configured to generate first transaction information of the N transaction request messages when all of the N transaction request messages include the current limit identifier;
the sending module 340 is further configured to send first transaction information of the N transaction request messages to the terminal device.
The modules of the transaction flow limiting device provided in the embodiment of the present application can realize the functions of each step of the transaction flow limiting method provided in fig. 1, and can achieve the corresponding technical effects thereof, and for brevity description, no further description is provided herein.
Based on the same inventive concept, the embodiment of the application also provides electronic equipment.
Fig. 4 shows a schematic hardware structure of an electronic device according to an embodiment of the present application.
A processor 401 may be included in an electronic device as well as a memory 402 in which computer program instructions are stored.
In particular, the processor 401 described above may include a central processing unit (Central Processing Unit, CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured as one or more integrated circuits implementing embodiments of the present application.
Memory 402 may include mass storage for data or instructions. By way of example, and not limitation, memory 402 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. Memory 402 may include removable or non-removable (or fixed) media, where appropriate. Memory 402 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 402 is a non-volatile solid state memory.
The Memory may include Read Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk storage media devices, optical storage media devices, flash Memory devices, electrical, optical, or other physical/tangible Memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors) it is operable to perform the operations described with reference to methods in accordance with aspects of the present disclosure.
Processor 401 implements any of the transaction throttling methods of the above embodiments by reading and executing computer program instructions stored in memory 402.
In one example, the electronic device may also include a communication interface 403 and a bus 410. As shown in fig. 4, the processor 401, the memory 402, and the communication interface 403 are connected by a bus 410 and perform communication with each other.
The communication interface 403 is mainly used to implement communication between each module, device, unit and/or apparatus in the embodiment of the present application.
Bus 410 includes hardware, software, or both, coupling components of the electronic device to one another. By way of example, and not limitation, the buses may include an accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics Bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) Bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (Industry Standard Architecture, ISA) Bus, an Infiniband interconnect, a low pin count (Linear Predictive Coding, LPC) Bus, a memory Bus, a micro channel architecture (MicroChannel Architecture, MCa) Bus, a peripheral component interconnect (Peripheral Component Interconnect, PCI) Bus, a PCI-Express (Peripheral Component Interconnect-X, PCI-X) Bus, a serial advanced technology attachment (Serial Advanced Technology Attachment, SATA) Bus, a video electronics standards association Local Bus (VLB) Bus, or other suitable Bus, or a combination of two or more of these. Bus 410 may include one or more buses, where appropriate. Although embodiments of the application have been described and illustrated with respect to a particular bus, the application contemplates any suitable bus or interconnect. The electronic device can execute the transaction flow limiting method in the embodiment of the application, thereby realizing the transaction flow limiting method described in fig. 1 and 2.
In addition, in combination with the transaction flow limiting method in the above embodiment, the embodiment of the application may be implemented by providing a computer storage medium. The computer storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the transaction throttling methods of the above embodiments.
The application also provides a computer program product, instructions in which, when executed by a processor of an electronic device, cause the electronic device to perform various processes for implementing any of the transaction throttling method embodiments described above.
It should be understood that the application is not limited to the particular arrangements and instrumentality described above and shown in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between steps, after appreciating the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transfer information. Examples of machine-readable media include electronic circuitry, semiconductor Memory devices, read-Only Memory (ROM), flash Memory, erasable Read-Only Memory (Erasable Read Only Memory, EROM), floppy disks, compact discs (Compact Disc Read-Only Memory, CD-ROM), optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and the like. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this disclosure describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, or may be performed in a different order from the order in the embodiments, or several steps may be performed simultaneously.
Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of 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, 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, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to being, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware which performs the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the foregoing, only the specific embodiments of the present application are described, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein. It should be understood that the scope of the present application is not limited thereto, and any equivalent modifications or substitutions can be easily made by those skilled in the art within the technical scope of the present application, and they should be included in the scope of the present application.

Claims (13)

1. A transaction throttling method, comprising:
receiving N transaction request messages sent by terminal equipment through a plurality of interfaces;
controlling to open a transaction current limit switch under the condition that the number of the transaction request messages is larger than a target value and/or the time for responding to the transaction request messages is larger than a preset duration;
generating first transaction information of K first transaction request messages under the condition that the N transaction request messages comprise K first transaction request messages, wherein the first transaction request messages comprise a current limiting identifier which is an identifier marked by M target interfaces, and the interfaces comprise the M target interfaces, N and K are positive integers which are larger than 0, and N > K;
and sending first transaction information of the K first transaction request messages to the terminal equipment.
2. The transaction throttling method of claim 1, wherein after sending the first transaction information of the K first transaction request messages to the terminal device, the method further comprises:
under the condition that the number of the second transaction request messages is larger than a target value and/or the time for responding to the second transaction request messages is longer than a preset duration, distributing weights to the second transaction request messages according to the types of the second transaction request messages based on weight distribution rules, wherein the second transaction request messages are transaction request messages except the K first transaction request messages in the N transaction request messages;
generating first transaction information of a target transaction request message in the second transaction request message according to the weight of the second transaction request message;
and sending first transaction information of the target transaction request message to the terminal equipment.
3. The transaction throttling method of claim 2, wherein after sending the first transaction information of the target transaction request message to the terminal device, the method further comprises:
and controlling to close the transaction current limiting switch.
4. The transaction throttling method of claim 1, further comprising:
under the condition that the number of the transaction request messages is smaller than a target value and the time for responding to the transaction request messages is smaller than a preset duration, carrying out business processing on the N transaction request messages one by one to generate transaction response messages;
and sending the transaction response message to the terminal equipment.
5. The transaction throttling method of claim 2, further comprising:
under the condition that the number of the second transaction request messages is smaller than a target value and the time for responding to the second transaction request messages is smaller than a preset duration, carrying out service processing on the second transaction request messages one by one to generate transaction response messages;
and sending a transaction response message of the second transaction request message to the terminal equipment.
6. The transaction throttling method of claim 1, further comprising:
under the condition that all the N transaction request messages do not comprise the current limiting identification, distributing weights for the transaction request messages according to the types of the transaction request messages based on weight distribution rules;
generating first transaction information of target transaction request messages in the N transaction request messages according to the weight of the transaction request messages;
and sending first transaction information of the target transaction request message to the terminal equipment.
7. The method for limiting transaction flow according to claim 6, wherein said generating first transaction information of a target transaction request message of said N transaction request messages according to weights of said transaction request messages includes:
sorting the N transaction request messages according to the weights of the transaction request messages to obtain the priorities of the N transaction request messages;
and generating first transaction information of target transaction request messages in the N transaction request messages according to the priority.
8. The transaction throttling method of claim 7, further comprising:
business processing is carried out on the transaction request messages except the target transaction request message in the N transaction request messages one by one according to the priority, and a transaction response message is generated;
and sending transaction response messages of the transaction request messages except the target transaction request message in the N transaction request messages to the terminal equipment.
9. The transaction throttling method of claim 1, further comprising:
generating first transaction information of the N transaction request messages under the condition that all the N transaction request messages comprise the current limiting identification;
and sending first transaction information of the N transaction request messages to the terminal equipment.
10. A transaction flow restricting device, the device comprising:
the receiving module is used for receiving N transaction request messages sent by the terminal equipment through a plurality of interfaces;
the control module is used for controlling the switching-on of the transaction current limiting switch under the condition that the number of the transaction request messages is larger than a target value and/or the time for responding to the transaction request messages is larger than a preset duration;
the generating module is used for generating first transaction information of K first transaction request messages under the condition that the N transaction request messages comprise K first transaction request messages, wherein the first transaction request messages comprise current limiting identifiers which are marked through M target interfaces, and the interfaces comprise the M target interfaces, N and K are positive integers which are larger than 0, and N is larger than K;
and the sending module is used for sending the first transaction information of the K first transaction request messages to the terminal equipment.
11. An electronic device, the device comprising: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the transaction throttling method of any of claims 1-9.
12. A computer readable storage medium having stored thereon computer program instructions which when executed by a processor implement the transaction flow restriction method according to any of claims 1-9.
13. A computer program product, characterized in that instructions in the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the transaction flow restriction method according to any one of claims 1-9.
CN202310685567.6A 2023-06-09 2023-06-09 Transaction flow limiting method, device, equipment and computer storage medium Pending CN116781621A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310685567.6A CN116781621A (en) 2023-06-09 2023-06-09 Transaction flow limiting method, device, equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310685567.6A CN116781621A (en) 2023-06-09 2023-06-09 Transaction flow limiting method, device, equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN116781621A true CN116781621A (en) 2023-09-19

Family

ID=88010778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310685567.6A Pending CN116781621A (en) 2023-06-09 2023-06-09 Transaction flow limiting method, device, equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN116781621A (en)

Similar Documents

Publication Publication Date Title
CN104767716A (en) Service request processing method and device
CN104424555A (en) Control method and equipment used in publication/subscription system
CN116781621A (en) Transaction flow limiting method, device, equipment and computer storage medium
CN113485831A (en) Service current limiting method, computing device and storage medium
CN110971697B (en) Redis single instance protection processing method and device, computer equipment and storage medium
CN110782143B (en) Data processing method and device
CN114710450B (en) Flow control method, device, equipment and computer storage medium
CN115543594A (en) Storage resource allocation method, device, equipment and storage medium
KR20150141871A (en) Apparatus and method for processing card information
CN116151887A (en) Information pushing method, device, equipment and computer storage medium
CN106470414B (en) Method and device for accessing SIM card
CN117216113A (en) User determination method, device, equipment and computer storage medium
CN116775110A (en) Data synchronization method, device, equipment, medium and product
CN116938733A (en) Service function chain deployment method, device, equipment, medium and product
CN117196784A (en) Information processing method, device, equipment, medium and product
CN114710403B (en) Data scheduling method, device, equipment, medium and program product
CN116962524A (en) Data processing method, device, equipment and computer storage medium
CN115514820A (en) Data calling method, device, equipment, storage medium and program product
CN114219627A (en) Data processing method, device, equipment, computer storage medium and program product
CN117035898A (en) Method, device, equipment and storage medium for checking order
CN117172769A (en) Resource transfer method, device, equipment and storage medium
CN114693417A (en) Automatic data processing method, device and equipment for interest bearing and computer storage medium
CN109429376B (en) Resource release method and device
CN116629794A (en) Business approval method, device, equipment and computer storage medium
CN114662065A (en) Electronic seal using method, device, equipment, medium and product

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