CN112767160A - Online transaction processing method and device based on memory - Google Patents

Online transaction processing method and device based on memory Download PDF

Info

Publication number
CN112767160A
CN112767160A CN202110079937.2A CN202110079937A CN112767160A CN 112767160 A CN112767160 A CN 112767160A CN 202110079937 A CN202110079937 A CN 202110079937A CN 112767160 A CN112767160 A CN 112767160A
Authority
CN
China
Prior art keywords
online transaction
memory queue
memory
transaction request
online
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
CN202110079937.2A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110079937.2A priority Critical patent/CN112767160A/en
Publication of CN112767160A publication Critical patent/CN112767160A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides an online transaction processing method and device based on a memory, which can be used in the financial field or other technical fields. The method comprises the following steps: receiving an online transaction request and writing the online transaction request into a memory queue; obtaining a memory queue parameter based on the online transaction request in the memory queue; and if the memory queue parameters do not meet the online transaction execution rule, refusing to receive the online transaction request and closing the memory queue. The device is used for executing the method. The online transaction processing method and device based on the memory provided by the embodiment of the invention ensure the stability of online transaction processing of the middle background application system.

Description

Online transaction processing method and device based on memory
Technical Field
The invention relates to the technical field of computers, in particular to an online transaction processing method and device based on a memory.
Background
With the popularization of the internet, customers can handle financial services on line in modes of internet banking, mobile banking and the like.
In order to realize online transaction of financial services, interaction scenes between a background application system (hereinafter referred to as a middle background application system) and foreground application systems (hereinafter referred to as foreground application systems) of all partner companies in the banking services are rapidly increased, due to different transaction flows of the foreground application system and the middle background application system, the middle background application system can impact the transaction flow during the peak period of the online services after being connected with the foreground application system, and in order to enable the middle background application system to stably process transaction requests in the face of the impact of the transaction flow, a database-level asynchronous framework is often configured for the middle background application system, so that the high availability of the middle background application system in the face of the peak period of the online services is guaranteed. However, as proved by the online practice of a large number of service systems, the transaction amount of most online systems does not reach the transaction flow preset at the initial stage of system construction, so that the utilization rate of the middle background application system is often insufficient after the middle background application system falls to the ground of the database-level asynchronous frame, and system resources are wasted.
Disclosure of Invention
To solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for processing an online transaction based on a memory, which can at least partially solve the problems in the prior art.
In one aspect, the present invention provides an online transaction processing method based on a memory, including:
receiving an online transaction request and writing the online transaction request into a memory queue;
obtaining a memory queue parameter based on the online transaction request in the memory queue;
and if the memory queue parameters do not meet the online transaction execution rule, refusing to receive the online transaction request and closing the memory queue.
In another aspect, the present invention provides an online transaction processing device based on memory, including:
the receiving unit is used for receiving the online transaction request and writing the online transaction request into a memory queue;
the obtaining unit is used for obtaining the memory queue parameters based on the online transaction requests in the memory queue;
and the closing unit is used for refusing to receive the online transaction request and closing the memory queue after the memory queue parameters do not meet the online transaction execution rule.
In another aspect, the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the memory-based online transaction processing method according to any of the above embodiments.
In yet another aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing the steps of the memory-based online transaction processing method according to any of the above embodiments.
The online transaction processing method and device based on the memory provided by the embodiment of the invention can receive the online transaction request and write the online transaction request into the memory queue, obtain the memory queue parameters based on the online transaction request in the memory queue, refuse to receive the online transaction request and seal the memory queue if the memory queue parameters do not meet the online transaction execution rules, can avoid the impact of the online transaction request on a middle-background application system during the service peak, and ensure the stability of online transaction processing of the middle-background application system.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a schematic structural diagram of a memory-based online transaction processing system according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating a memory-based online transaction processing method according to an embodiment of the present invention.
Fig. 3 is a flowchart illustrating a memory-based online transaction processing method according to another embodiment of the invention.
Fig. 4 is a flowchart illustrating a memory-based online transaction processing method according to another embodiment of the invention.
Fig. 5 is a schematic structural diagram of an online transaction processing device based on memory according to an embodiment of the present invention.
Fig. 6 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
Fig. 1 is a schematic structural diagram of an online transaction processing system based on a memory according to an embodiment of the present invention, and as shown in fig. 1, the online transaction processing system based on a memory according to the embodiment of the present invention includes a foreground application system, a transit server 2, and a middle background application system, where:
the foreground application system comprises at least one foreground terminal 1, and the middle-background application system comprises at least one application server 3. The relay server 2 is in communication connection with each foreground terminal 1, and the relay server 2 is in communication connection with each application server 3. The foreground terminal 1 includes, but is not limited to, a desktop computer, a notebook computer, a server, and the like.
Each foreground terminal 1 may send an online transaction request to the relay server 2, and the relay server 2 executes the online transaction processing method based on the memory provided by the embodiment of the present invention. The transit server 2 may send the online transaction request to the application server 3 for processing.
Fig. 2 is a schematic flow chart of a memory-based online transaction processing method according to an embodiment of the present invention, and as shown in fig. 2, the memory-based online transaction processing method according to the embodiment of the present invention includes:
201. receiving an online transaction request and writing the online transaction request into a memory queue;
specifically, a foreground terminal of a foreground application system sends an online transaction request to a transit server, and the transit server receives each online transaction request and writes each online transaction request into a memory queue one by one. Wherein the online transaction request includes but is not limited to an online bank login request, a balance inquiry request, a transfer request, a payment request, and the like.
S202, obtaining a memory queue parameter based on the online transaction request in the memory queue;
specifically, after writing the online transaction request into the memory queue, the transit server obtains a memory queue parameter based on the online transaction request in the memory queue. The memory queue parameters include, but are not limited to, an average number of online transaction requests, a transaction amount per unit time, and an average response time, and are set according to actual needs.
For example, the memory queue parameters include at least one of an average number of online transaction requests, a transaction amount per unit time, and an average response time.
S203, if the memory queue parameters do not meet the online transaction execution rules, refusing to receive the online transaction request and closing the memory queue.
Specifically, after obtaining the memory queue parameter, the transfer server may determine whether the memory queue parameter satisfies an online transaction execution rule, and if the memory queue parameter satisfies the online transaction execution rule, the transfer server may send an online transaction request to an application server of a middle-background application system for processing. If the memory queue parameter does not meet the online transaction execution rule, the transfer server refuses to receive the online transaction request and seals the memory queue, namely, the subsequent online transaction request can not be received. The online transaction execution rule is preset and is set according to actual needs, and the embodiment of the invention is not limited.
For example, if the memory queue parameter includes a parameter a, the online transaction execution rule includes an online transaction execution condition corresponding to the parameter a, and if the parameter a does not satisfy the corresponding online transaction execution condition, the memory queue parameter does not satisfy the online transaction execution rule. And if the parameter A meets the corresponding online transaction execution condition, the memory queue parameter meets the online transaction execution rule.
For example, the memory queue parameters include two parameters: the online transaction executing rule comprises an online transaction executing condition corresponding to the parameter B and an online transaction executing condition corresponding to the parameter C. And if the parameter B does not meet the corresponding online transaction execution condition or the parameter C does not meet the corresponding online transaction execution condition, the memory queue parameter does not meet the online transaction execution rule. If the parameter B meets the corresponding online transaction execution condition and the parameter C meets the corresponding online transaction execution condition, the memory queue parameter meets the online transaction execution rule.
For example, the memory queue parameters include three parameters: the online transaction executing rule comprises an online transaction executing condition corresponding to the parameter D, an online transaction executing condition corresponding to the parameter E and an online transaction executing condition corresponding to the parameter F. And if any one of the parameters D, E and F does not meet the corresponding online transaction execution condition, the memory queue parameter does not meet the online transaction execution rule. And if the parameters D, E and F respectively meet the corresponding online transaction execution conditions, the memory queue parameters meet the online transaction execution rules.
The online transaction processing method based on the memory provided by the embodiment of the invention can receive the online transaction request and write the online transaction request into the memory queue, obtain the memory queue parameters based on the online transaction request in the memory queue, refuse to receive the online transaction request and seal the memory queue if the memory queue parameters do not meet the online transaction execution rules, avoid the impact of the online transaction request on a middle-background application system during the service peak, and ensure the stability of the online transaction processing of the middle-background application system. In addition, a database-level asynchronous framework does not need to be configured for the middle and background application systems, and cost is saved.
On the basis of the foregoing embodiments, further, the memory queue parameter includes at least one of an average number of online transaction requests, a transaction amount per unit time, and an average response time.
Specifically, the memory queue parameter includes at least one of an average number of online transaction requests, a transaction amount per unit time, and an average response time, that is, the memory queue parameter may include any one of the average number of online transaction requests, the transaction amount per unit time, and the average response time, the memory queue parameter may include any two of the average number of online transaction requests, the transaction amount per unit time, and the average response time, and the memory queue parameter may include the average number of online transaction requests, the transaction amount per unit time, and the average response time.
The average number of the online transaction requests is obtained by calculating an average value of the number of the online transaction requests in the memory queue within a first preset time period. For example, the number of online transaction requests in the memory queue is obtained every N seconds within a first preset time period, and if the number of m online transaction requests is obtained within the first preset time period, the average number of online transaction requests is obtained
Figure BDA0002908796970000051
Wherein Q isiThe number of the online transaction requests acquired at the ith time is represented, i is a positive integer and is less than or equal to m. The first preset time period is set according to actual needs, and the embodiment of the invention is not limited.
The unit time transaction amount of the online transaction requests is obtained by calculating the average processing amount of the online transaction requests in the memory queue in a second preset time period. For example, the transit server counts up within a second preset time period Δ t, and the transit server sends x online transaction requests to the application serviceThen the transaction amount per unit time p of the online transaction request2X/Δ t. The second preset time period is set according to actual needs, and the embodiment of the invention is not limited.
The average response time of the online transaction requests is obtained by calculating an average value of the response time of each online transaction request entering and exiting the memory queue within a third preset time period. For example, the transit server records that n online transaction requests enter the memory queue and leave the memory queue within a third preset time period, that is, n online transaction requests are sent to the application server by the transit server, so that the average response time of the online transaction requests is shortened
Figure BDA0002908796970000052
Wherein, tjRepresenting the response time, t, of the jth online transaction request entering and exiting the memory queue within a third predetermined time periodj=tj2-tj1j,tj2For the time when the jth online transaction request entering or exiting the memory queue leaves the memory queue, tj1And j is a positive integer and is less than or equal to n at the moment when the j online transaction request entering and exiting the memory queue enters the memory queue. The third preset time period is set according to actual needs, and the embodiment of the invention is not limited.
On the basis of the foregoing embodiments, further, the online transaction execution rule includes an online transaction execution condition corresponding to the average number of online transaction requests:
the average number of the online transaction requests is less than or equal to a memory queue threshold.
Specifically, the transit server compares the average number of the online transaction requests with a memory queue threshold, and if the average number of the online transaction requests is greater than the memory queue threshold, it may be determined that the average number of the online transaction requests does not satisfy the corresponding online transaction execution condition. If the average number of the online transaction requests is less than or equal to the memory queue threshold, it may be determined that the average number of the online transaction requests satisfies a corresponding online transaction execution condition. The memory queue threshold is set according to practical experience, and the embodiment of the present invention is not limited.
On the basis of the foregoing embodiments, further, the online transaction execution rule includes an online transaction execution condition corresponding to a unit time transaction amount of the online transaction request:
the transaction amount per unit time of the online transaction request is less than or equal to a transaction amount threshold.
Specifically, the transfer server compares the transaction amount per unit time of the online transaction request with a transaction amount threshold, and if the transaction amount per unit time of the online transaction request is greater than the transaction amount threshold, it may be determined that the transaction amount per unit time of the online transaction request does not satisfy the corresponding online transaction execution condition. If the transaction amount per unit time of the online transaction request is less than or equal to the transaction amount threshold, it may be determined that the transaction amount per unit time of the online transaction request satisfies a corresponding online transaction execution condition. The transaction amount threshold is set according to practical experience, and the embodiment of the invention is not limited.
On the basis of the foregoing embodiments, further, the online transaction execution rule includes an online transaction execution condition corresponding to an average response time of the online transaction request:
the average response time of the online transaction request is less than or equal to a response time threshold.
Specifically, the transit server compares the average response time of the online transaction request with a response time threshold, and if the average response time of the online transaction request is greater than the response time threshold, it may be determined that the average response time of the online transaction request does not satisfy the corresponding online transaction execution condition. If the average response time of the online transaction request is less than or equal to the response time threshold, it may be determined that the average response time of the online transaction request satisfies a corresponding online transaction execution condition. The response time threshold is set according to practical experience, and the embodiment of the present invention is not limited.
Fig. 3 is a schematic flow chart of a memory-based online transaction processing method according to another embodiment of the present invention, and as shown in fig. 3, on the basis of the foregoing embodiments, further, the memory-based online transaction processing method according to the embodiment of the present invention further includes:
s301, obtaining memory queue parameters again based on the online transaction requests in the memory queue every fourth preset segment;
specifically, after the memory queue is closed, the transit server obtains the memory queue parameters again every fourth preset segment based on the online transaction request in the memory queue. The specific process of recalculating the memory queue parameters is similar to the process of calculating the memory queue parameters in step S202, and is not described herein again. The fourth preset segment is set according to actual experience, and the embodiment of the present invention is not limited.
S302, if the recalculated memory queue parameters meet the online transaction receiving rules, the online transaction request is received again; wherein the online transaction receiving rule is preset.
Specifically, after recalculating the memory queue parameters, the transit server may determine whether the recalculated memory queue parameters satisfy an online transaction receiving rule, and if the memory queue parameters satisfy the online transaction receiving rule, open the memory queue and re-receive the connection transaction request. Wherein the online transaction receiving rule is preset.
For example, if the memory queue parameter includes a parameter a, the online transaction reception rule includes an online transaction reception condition corresponding to the parameter a, and if the parameter a does not satisfy the corresponding online transaction reception condition, the memory queue parameter does not satisfy the online transaction reception rule. And if the parameter A meets the corresponding online transaction receiving condition, the memory queue parameter meets the online transaction receiving rule.
For example, the memory queue parameters include two parameters: the online transaction receiving rule comprises an online transaction receiving condition corresponding to the parameter B and an online transaction receiving condition corresponding to the parameter C. And if the parameter B does not meet the corresponding online transaction receiving condition or the parameter C does not meet the corresponding online transaction receiving condition, the memory queue parameter does not meet the online transaction receiving rule. If the parameter B meets the corresponding online transaction receiving condition and the parameter C meets the corresponding online transaction receiving condition, the memory queue parameter meets the online transaction receiving rule.
For example, the memory queue parameters include three parameters: the online transaction receiving rule comprises an online transaction receiving condition corresponding to the parameter D, an online transaction receiving condition corresponding to the parameter E and an online transaction receiving condition corresponding to the parameter F. And if any one of the parameters D, E and F does not meet the corresponding online transaction receiving condition, the memory queue parameter does not meet the online transaction receiving rule. And if the parameters D, E and F respectively meet the corresponding online transaction receiving conditions, the memory queue parameters meet the online transaction receiving rules.
For example, the online transaction receiving rule includes at least one of an online transaction receiving condition corresponding to an average number of the online transaction requests, an online transaction receiving condition corresponding to a unit time transaction amount of the online transaction requests, and an online transaction receiving condition corresponding to an average response time of the online transaction requests. The online transaction receiving conditions corresponding to the average number of the online transaction requests are as follows: the average number of online transaction requests is less than a first threshold; the online transaction receiving condition corresponding to the unit time transaction amount of the online transaction request is as follows: the transaction amount per unit time of the online transaction request is less than a second threshold value; the online transaction receiving condition corresponding to the average response time of the online transaction request is as follows: the average response time of the online transaction request is less than a third threshold. The first threshold, the second threshold, and the third threshold are set according to actual needs, which is not limited in the embodiments of the present invention. For example, the first threshold is set to be half of the memory queue threshold, the second threshold is set to be half of the response time threshold, and the third threshold is set to be half of the response time threshold.
On the basis of the foregoing embodiments, further, the online transaction processing method based on a memory according to an embodiment of the present invention further includes:
and if the memory queue parameters meet the online transaction execution rules, pushing the online transaction request to an application server for processing according to a first-in first-out principle.
Specifically, after obtaining the memory queue parameters, the transit server may determine whether the memory queue parameters satisfy an online transaction execution rule, and if the memory queue parameters satisfy the online transaction execution rule, the transit server may push an online transaction request to an application server for processing according to a first-in first-out principle, that is, send the online transaction request to the application server for processing according to a time sequence written into the memory queue.
The online transaction processing method based on the memory provided by the embodiment of the invention avoids the impact of online service peak when the middle and background application systems are in butt joint with the foreground application system, ensures the stable operation of the middle and background systems, and improves the reliability of online transaction processing. Meanwhile, the development cost is reduced because the asynchronous framework which is relatively invasive to the application and has relatively large expense is not needed.
Fig. 4 is a schematic flow chart of a memory-based online transaction processing method according to another embodiment of the present invention, and as shown in fig. 4, the memory-based online transaction processing method according to the embodiment of the present invention is implemented as follows:
firstly, reading configuration information. After the transfer server is started, the configuration information is read, the memory queue parameters and the online transaction execution rules which need to be calculated are obtained through analysis from the configuration information, the memory is written in, and the memory queue is initialized. The configuration information is preset, and what memory queue parameters and online transaction execution rules are set in the configuration information.
And secondly, receiving an online transaction request. The transfer server receives the online transaction requests sent by the foreground terminals and writes the online transaction requests into the memory queue according to the receiving sequence.
And thirdly, obtaining memory queue parameters. The transfer server calculates and obtains the memory queue parameters based on the online transaction requests in the memory queue.
And fourthly, judging whether the online transaction execution rule is satisfied. The transfer server judges whether the memory queue parameter meets the online transaction execution rule, if the memory queue parameter meets the online transaction execution rule, the fifth step is carried out; and if the memory queue parameters are judged not to meet the online transaction execution rules, entering the sixth step.
And step five, pushing the online transaction request. The transfer server pushes the online transaction request to the application server for processing according to the first-in first-out principle.
And sixthly, rejecting the online transaction request. The transfer server rejects the online transaction request, namely rejects the last online transaction request in the memory queue out of the memory queue, and returns transaction failure information to the foreground terminal corresponding to the online transaction request from which the memory queue is rejected.
Fig. 5 is a schematic structural diagram of an online transaction processing device based on a memory according to an embodiment of the present invention, and as shown in fig. 5, the online transaction processing device based on a memory according to an embodiment of the present invention includes a receiving unit 501, an obtaining unit 502, and a sealing unit 503, where:
the receiving unit 501 is configured to receive an online transaction request and write the online transaction request into a memory queue; the obtaining unit 502 is configured to obtain a memory queue parameter based on the online transaction request in the memory queue; the closing unit 503 is configured to refuse to receive the online transaction request and close the memory queue after the memory queue parameter does not satisfy the online transaction execution rule.
Specifically, the foreground terminal of the foreground application system sends the online transaction request to the receiving unit 501, and the receiving unit 501 receives each online transaction request and then writes each online transaction request into the memory queue one by one. Wherein the online transaction request includes but is not limited to an online bank login request, a balance inquiry request, a transfer request, a payment request, and the like.
After writing the online transaction request into the memory queue, the obtaining unit 502 obtains the memory queue parameters based on the online transaction request in the memory queue. The memory queue parameters include, but are not limited to, an average number of online transaction requests, a transaction amount per unit time, and an average response time, and are set according to actual needs.
After obtaining the memory queue parameter, the closing unit 503 may determine whether the memory queue parameter satisfies an online transaction execution rule, and if the memory queue parameter satisfies the online transaction execution rule, the closing unit 503 may send the online transaction request to an application server of the middle background application system for processing. If the memory queue parameter does not satisfy the online transaction execution rule, the closing unit 503 will refuse to receive the online transaction request, and close the memory queue, i.e. will not receive the subsequent online transaction request. The online transaction execution rule is preset and is set according to actual needs, and the embodiment of the invention is not limited.
The online transaction processing device based on the memory provided by the embodiment of the invention can receive the online transaction request and write the online transaction request into the memory queue, obtain the memory queue parameters based on the online transaction request in the memory queue, refuse to receive the online transaction request and seal the memory queue if the memory queue parameters do not meet the online transaction execution rule, so that the impact of the online transaction request on a middle-background application system during a business peak can be avoided, and the stability of online transaction processing of the middle-background application system is ensured. In addition, a database-level asynchronous framework does not need to be configured for the middle and background application systems, and cost is saved.
The embodiment of the apparatus provided in the embodiment of the present invention may be specifically configured to execute the processing flows of the above method embodiments, and the functions of the apparatus are not described herein again, and refer to the detailed description of the above method embodiments.
It should be noted that the memory-based online transaction processing method and apparatus provided in the embodiment of the present invention may be used in the financial field, and may also be used in any technical field other than the financial field.
Fig. 6 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 6, the electronic device may include: a processor (processor)601, a communication Interface (Communications Interface)602, a memory (memory)603 and a communication bus 604, wherein the processor 601, the communication Interface 602 and the memory 603 complete communication with each other through the communication bus 604. The processor 601 may call logic instructions in the memory 603 to perform the following method: receiving an online transaction request and writing the online transaction request into a memory queue; obtaining a memory queue parameter based on the online transaction request in the memory queue; and if the memory queue parameters do not meet the online transaction execution rule, refusing to receive the online transaction request and closing the memory queue.
In addition, the logic instructions in the memory 603 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: receiving an online transaction request and writing the online transaction request into a memory queue; obtaining a memory queue parameter based on the online transaction request in the memory queue; and if the memory queue parameters do not meet the online transaction execution rule, refusing to receive the online transaction request and closing the memory queue.
The present embodiment provides a computer-readable storage medium, which stores a computer program, where the computer program causes the computer to execute the method provided by the above method embodiments, for example, the method includes: receiving an online transaction request and writing the online transaction request into a memory queue; obtaining a memory queue parameter based on the online transaction request in the memory queue; and if the memory queue parameters do not meet the online transaction execution rule, refusing to receive the online transaction request and closing the memory queue.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the description herein, reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A memory-based online transaction processing method, comprising:
receiving an online transaction request and writing the online transaction request into a memory queue;
obtaining a memory queue parameter based on the online transaction request in the memory queue;
and if the memory queue parameters do not meet the online transaction execution rule, refusing to receive the online transaction request and closing the memory queue.
2. The method of claim 1, wherein the memory queue parameters comprise at least one of an average number of online transaction requests, a transaction amount per unit time, and an average response time.
3. The method of claim 2, wherein the online transaction performance rules include online transaction performance conditions corresponding to an average number of the online transaction requests:
the average number of the online transaction requests is less than or equal to a memory queue threshold.
4. The method of claim 2, wherein the online transaction execution rule includes an online transaction execution condition corresponding to a unit time transaction amount of the online transaction request:
the transaction amount per unit time of the online transaction request is less than or equal to a transaction amount threshold.
5. The method of claim 2, wherein the online transaction execution rules include online transaction execution conditions corresponding to average response times of the online transaction requests:
the average response time of the online transaction request is less than or equal to a response time threshold.
6. The method of claim 1, further comprising:
obtaining memory queue parameters again every fourth preset segment based on the online transaction requests in the memory queue;
if the recalculated memory queue parameters meet the online transaction receiving rules, the online transaction request is received again; wherein the online transaction receiving rule is preset.
7. The method of any of claims 1 to 6, further comprising:
and if the memory queue parameters meet the online transaction execution rules, pushing the online transaction request to an application server for processing according to a first-in first-out principle.
8. A memory-based online transaction processing device, comprising:
the receiving unit is used for receiving the online transaction request and writing the online transaction request into a memory queue;
the obtaining unit is used for obtaining the memory queue parameters based on the online transaction requests in the memory queue;
and the closing unit is used for refusing to receive the online transaction request and closing the memory queue after the memory queue parameters do not meet the online transaction execution rule.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110079937.2A 2021-01-21 2021-01-21 Online transaction processing method and device based on memory Pending CN112767160A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110079937.2A CN112767160A (en) 2021-01-21 2021-01-21 Online transaction processing method and device based on memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110079937.2A CN112767160A (en) 2021-01-21 2021-01-21 Online transaction processing method and device based on memory

Publications (1)

Publication Number Publication Date
CN112767160A true CN112767160A (en) 2021-05-07

Family

ID=75702127

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110079937.2A Pending CN112767160A (en) 2021-01-21 2021-01-21 Online transaction processing method and device based on memory

Country Status (1)

Country Link
CN (1) CN112767160A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110310192A (en) * 2019-05-23 2019-10-08 平安银行股份有限公司 Transaction processing method, device, equipment and storage medium based on data analysis
CN111612464A (en) * 2020-05-27 2020-09-01 北银金融科技有限责任公司 Mass online transaction processing method
CN111626841A (en) * 2020-04-10 2020-09-04 中国建设银行股份有限公司 Method, system and related equipment for monitoring online transaction

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110310192A (en) * 2019-05-23 2019-10-08 平安银行股份有限公司 Transaction processing method, device, equipment and storage medium based on data analysis
CN111626841A (en) * 2020-04-10 2020-09-04 中国建设银行股份有限公司 Method, system and related equipment for monitoring online transaction
CN111612464A (en) * 2020-05-27 2020-09-01 北银金融科技有限责任公司 Mass online transaction processing method

Similar Documents

Publication Publication Date Title
CN110413416B (en) Current limiting method and device for distributed server
JP2018517976A (en) Dialog data processing method and apparatus
US20140258119A1 (en) Fraud Decision Processing System and Method
CN104965844A (en) Information processing method and apparatus
CN110458572B (en) User risk determining method and target risk recognition model establishing method
CN105389488A (en) Identity authentication method and apparatus
CN108572970A (en) A kind of processing method and distributed processing system(DPS) of structural data
CN111784354A (en) Data processing method, server, terminal and system for assisting unfreezing of frozen account
CN108492109B (en) Electronic device, dynamic code request processing method and storage medium
CN110913354A (en) Short message classification method and device and electronic equipment
CN111161071A (en) Data processing method, device, equipment and storage medium based on block chain
CN114282011B (en) Knowledge graph construction method and device, and graph calculation method and device
CN108694664A (en) Checking method and device, the electronic equipment of operation system
US20200402061A1 (en) Cryptocurrency transaction pattern based threat intelligence
CN110782310B (en) Method, device and system for asynchronously acquiring user attribute information from third-party platform
CN112767160A (en) Online transaction processing method and device based on memory
CN112750038A (en) Transaction risk determination method and device and server
CN111046102A (en) High-performance block chain service system based on ether house
CN114363268B (en) Message delay consumption method and related product
CN112767159B (en) Online transaction processing method and device
US20210383469A1 (en) Currency trading method based on blockchain and electronic device
CN114253957A (en) Data processing method, related device, storage medium and computer program product
CN115695587A (en) Service data processing system, method, device and storage medium
CN109712011B (en) Community discovery method and device
CN111985979A (en) Method and device for processing invalid traffic information in advertisement service

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