CN110473097B - Transaction monitoring method, terminal and computer readable storage medium - Google Patents
Transaction monitoring method, terminal and computer readable storage medium Download PDFInfo
- Publication number
- CN110473097B CN110473097B CN201910729069.0A CN201910729069A CN110473097B CN 110473097 B CN110473097 B CN 110473097B CN 201910729069 A CN201910729069 A CN 201910729069A CN 110473097 B CN110473097 B CN 110473097B
- Authority
- CN
- China
- Prior art keywords
- request information
- monitoring
- order request
- information
- storage area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0633—Lists, e.g. purchase orders, compilation or processing
- G06Q30/0635—Processing of requisition or of purchase orders
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Marketing (AREA)
- Economics (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Development Economics (AREA)
- Theoretical Computer Science (AREA)
- Technology Law (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a transaction monitoring method, which comprises the following steps: when monitoring response information of the monitoring unit is received, acquiring a storage area associated with order request information corresponding to the monitoring response information; storing the monitoring response information into the storage area; after all monitoring response information of the first order request information is stored in a storage area of the first order request information, the monitoring response information of the first order request is output, the first order request information is deleted in the message queue, and the first order request information is the order request information of the first queue of the message queue in the storage area. The invention also discloses a terminal and a computer readable storage medium. The invention fully utilizes the monitoring unit, improves the order processing efficiency, arranges the order request information according to the sequence when receiving the order request information by arranging the message queue, and outputs the monitoring response information according to the order receiving sequence, thereby avoiding the situation of misjudgment of monitoring and improving the performance of the transaction system.
Description
Technical Field
The present invention relates to the field of transaction asset monitoring, and in particular, to a transaction monitoring method, a terminal, and a computer-readable storage medium.
Background
In a securities trading system, it is desirable to monitor the user's shares or funds in order to manage the user's account. In the transaction monitoring process, the cooperation problem between order receiving and monitoring needs to be considered, the basic flow is that after an order is received, monitoring requests are sent to different monitoring units according to the requirement of the order, and then the monitoring units respond to the monitoring requests to decide to receive or reject the order requests. Based on the different content of each order, in the transaction monitoring process, the received order needs to respond to the monitoring processing result of the order, otherwise, the monitoring processing result of the order is inconsistent with the original order, so that the condition of monitoring errors is caused.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a transaction monitoring method, a terminal and a computer readable storage medium, which aim to solve the technical problems of monitoring resource waste and poor performance of a transaction monitoring system in the existing transaction monitoring mode.
In order to achieve the above object, the present invention provides a transaction monitoring method, including the steps of:
when monitoring response information of the monitoring unit is received, acquiring a storage area associated with order request information corresponding to the monitoring response information;
storing the monitoring response information into the storage area;
after all monitoring response information of the first order request information is stored in a storage area of the first order request information, the monitoring response information of the first order request is output, the first order request information is deleted in the message queue, and the first order request information is the order request information of the first queue of the message queue in the storage area.
Optionally, the step of acquiring the storage area associated with the order request information corresponding to the monitoring response information includes:
Acquiring identification information of the monitoring response information, wherein the identification information comprises an order identifier;
determining a storage area corresponding to the matched order request information according to the identification information;
and taking the storage area as a storage area corresponding to the monitoring response information.
Optionally, the step of determining the storage area corresponding to the matched order request information according to the identification information includes:
determining a message group according to the identification information;
searching order request information matched with the identification information from the message group;
and acquiring a storage area corresponding to the matched order request.
Optionally, the step of searching the message group for order request information matching the identification information includes:
searching a message sub-queue corresponding to a monitoring unit identifier from the message group, wherein the identification information further comprises the monitoring unit identifier, and the monitoring unit identifier corresponds to a monitoring unit for transmitting the monitoring response information;
and taking the order request information of the head of the message sub-queue as the order request information matched with the identification information.
Optionally, the transaction monitoring method further includes:
When order request information is received, a storage area of the order request information is allocated, and the order request information is added to a message queue;
and sending monitoring request information corresponding to the order request information to a monitoring unit so that the monitoring unit returns monitoring response information according to the order request information.
Optionally, the step of sending the monitoring request information corresponding to the order request information to the monitoring unit includes:
splitting the order request information into at least one order request information according to the request content of the order request information;
adding the split order request information into a corresponding message group, wherein the storage area corresponding to each split order request information is the same as the storage area of the order request information before splitting;
and sending the monitoring request information corresponding to the split order request information to a corresponding monitoring unit.
Optionally, the step of sending the monitoring request information corresponding to the split order request information to the corresponding monitoring unit includes:
determining message sub-queues in the message group according to preset identifiers corresponding to request contents of the split order request information;
And sending the monitoring request information corresponding to the split order request information to a monitoring unit corresponding to the message sub-queue.
Optionally, the transaction monitoring method further includes:
detecting whether the request content of monitoring request information meets preset conditions or not when monitoring request information corresponding to order request information is received;
if yes, returning monitoring response information corresponding to successful monitoring;
if not, returning monitoring response information corresponding to the monitoring failure.
In order to achieve the above object, the present invention also provides a terminal including: the system comprises a memory, a processor and a transaction monitoring program stored on the memory and capable of running on the processor, wherein the transaction monitoring program realizes the steps of the transaction monitoring method when being executed by the processor.
The present invention also provides a computer-readable storage medium having stored thereon a transaction monitoring program which, when executed by a processor, implements the steps of the transaction monitoring method as described above.
According to the transaction monitoring method, the terminal and the computer readable storage medium provided by the embodiment of the invention, a plurality of order request information is processed through a plurality of monitoring units, the monitoring units are fully utilized, the order processing efficiency is improved, the order request information is arranged in sequence when being received through the message queue, the monitoring response information is also output according to the order receiving sequence, the situation of misjudgment in monitoring is avoided, and the performance of the transaction system is improved.
Drawings
FIG. 1 is a schematic diagram of a terminal structure of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a transaction monitoring system according to the present invention;
FIG. 3 is a flow chart of a first embodiment of the transaction monitoring method of the present invention;
FIGS. 4 a-d are schematic diagrams illustrating a monitoring process according to a first embodiment of the transaction monitoring method of the present invention;
FIG. 5 is a schematic flow chart further detailing step S10 in FIG. 3;
FIG. 6 is a flow chart of a second embodiment of the transaction monitoring method of the present invention;
FIG. 7 is a diagram of a message queue and message group according to the present invention;
FIG. 8 is a flow chart of a third embodiment of the transaction monitoring method of the present invention;
FIG. 9 is a flow chart of a fourth embodiment of the transaction monitoring method of the present invention;
FIG. 10 is a diagram of a message queue and a message sub-queue according to the present invention;
fig. 11 is a flowchart of a fifth embodiment of the transaction monitoring method according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The main solutions of the embodiments of the present invention are: when monitoring response information of the monitoring unit is received, acquiring a storage area associated with order request information corresponding to the monitoring response information; storing the monitoring response information into the storage area; after all monitoring response information of the first order request information is stored in a storage area of the first order request information, the monitoring response information of the first order request is output, the first order request information is deleted in the message queue, and the first order request information is the order request information of the first queue of the message queue in the storage area.
As shown in fig. 1, fig. 1 is a schematic diagram of a terminal structure of a hardware running environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a PC, terminal equipment such as a smart phone, a tablet personal computer and the like, and can also be a computer-readable medium such as a U disk, a cloud disk and the like for storing a transaction monitoring program.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Optionally, the terminal may further include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, a positioning module, and the like. Among other sensors, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and the direction when the mobile terminal is stationary, and the mobile terminal can be used for recognizing the gesture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; the positioning module is a GPS module or a Beidou positioning module and the like; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, which are not described herein.
It will be appreciated by those skilled in the art that the terminal structure shown in fig. 1 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As further shown with reference to FIG. 1, an operating system, a network communication module, a user interface module, and a transaction monitoring program may be included in memory 1005, which is a type of computer storage medium.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call a transaction monitor stored in the memory 1005 and perform the following operations:
when monitoring response information of the monitoring unit is received, acquiring a storage area associated with order request information corresponding to the monitoring response information;
storing the monitoring response information into the storage area;
after all monitoring response information of the first order request information is stored in a storage area of the first order request information, the monitoring response information of the first order request is output, the first order request information is deleted in the message queue, and the first order request information is the order request information of the first queue of the message queue in the storage area.
Further, the processor 1001 may call a transaction monitor program stored in the memory 1005, and further perform the following operations:
acquiring identification information of the monitoring response information, wherein the identification information comprises an order identifier;
determining a storage area corresponding to the matched order request information according to the identification information;
and taking the storage area as a storage area corresponding to the monitoring response information.
Further, the processor 1001 may call a transaction monitor program stored in the memory 1005, and further perform the following operations:
determining a message group according to the identification information;
searching order request information matched with the identification information from the message group;
and acquiring a storage area corresponding to the matched order request.
Further, the processor 1001 may call a transaction monitor program stored in the memory 1005, and further perform the following operations:
searching a message sub-queue corresponding to a monitoring unit identifier from the message group, wherein the identification information further comprises the monitoring unit identifier, and the monitoring unit identifier corresponds to a monitoring unit for transmitting the monitoring response information;
and taking the order request information of the head of the message sub-queue as the order request information matched with the identification information.
Further, the processor 1001 may call a transaction monitor program stored in the memory 1005, and further perform the following operations:
when order request information is received, a storage area of the order request information is allocated, and the order request information is added to a message queue;
and sending monitoring request information corresponding to the order request information to a monitoring unit so that the monitoring unit returns monitoring response information according to the order request information.
Further, the processor 1001 may call a transaction monitor program stored in the memory 1005, and further perform the following operations:
splitting the order request information into at least one order request information according to the request content of the order request information;
adding the split order request information into a corresponding message group, wherein the storage area corresponding to each split order request information is the same as the storage area of the order request information before splitting;
and sending the monitoring request information corresponding to the split order request information to a corresponding monitoring unit.
Further, the processor 1001 may call a transaction monitor program stored in the memory 1005, and further perform the following operations:
Determining message sub-queues in the message group according to preset identifiers corresponding to request contents of the split order request information;
and sending the monitoring request information corresponding to the split order request information to a monitoring unit corresponding to the message sub-queue.
Further, the processor 1001 may call a transaction monitor program stored in the memory 1005, and further perform the following operations:
detecting whether the request content of monitoring request information meets preset conditions or not when monitoring request information corresponding to order request information is received;
if yes, returning monitoring response information corresponding to successful monitoring;
if not, returning monitoring response information corresponding to the monitoring failure.
Referring to fig. 2, fig. 2 is a schematic diagram of a trade monitoring system, where the trade monitoring system 1 is applied to stock trade monitoring, such as stock or funds trade monitoring, and the trade monitoring system 1 includes an order receiving unit 10 and a monitoring unit 20 connected to the order receiving unit 10, where the order receiving unit 10 may be a single terminal, and the trade monitoring procedure on the order receiving unit 10 is executed by the processor to implement the trade monitoring process of the present invention; the order receiving unit 10 may also be one of the units of the terminal, and the transaction monitoring procedure of the present invention is implemented when the transaction monitoring program is executed by the processor.
Further, in order to improve the monitoring efficiency, a plurality of monitoring units 20 may be provided, the order receiving unit 10 may be connected to a plurality of monitoring units 20, the plurality of monitoring units 20 may monitor the same type of financial items, or may monitor different types of financial items, such as a share monitoring unit for monitoring a share transaction condition, or a fund monitoring unit for monitoring a fund condition, the order receiving unit 10 may send an order request to any one of the monitoring units 20, and the monitoring unit 10 may also return monitoring response information to the order receiving unit 10.
The transaction monitoring system 1 is connected with the transaction processing system 1, after receiving the order request information, the validity of the order request is monitored through the transaction monitoring system 1, if the order request information is legal, the transaction monitoring system 1 is judged to monitor the success of the order request information, and then response information of the order request is sent to the transaction processing system 2 for the transaction processing system 2 to process the order request information, wherein the response information can comprise the order request information, and the transaction processing system 2 performs transaction processing according to the order request information in the response information.
Referring to fig. 3, the present invention provides a first embodiment of a transaction monitoring method for use in a securities trading system for monitoring securities trades, such as for share and/or funds trade monitoring. The stock or fund monitoring refers to checking whether the stock is sold or not and whether the fund is full or not for an order submitted by a user, if the stock is sold or the fund is insufficient, the response to the current order request fails, and the transaction processing system does not conduct transaction processing on the order request information, so that the order request which does not meet the requirement is filtered out through the transaction monitoring system, and the processing efficiency and the performance of the transaction processing system are improved. Otherwise, if the shares are not sold or the funds are sufficient, the corresponding current order request is successfully monitored, and the transaction processing system processes the order request information.
In this embodiment, the order receiving unit for receiving the order request information is independently separated from the monitoring unit for monitoring the order request information, so that functions are independent, and thus the order receiving unit and the monitoring unit can process simultaneously, and processing efficiency is provided. Because the order receiving unit receives the order and the monitoring unit monitors the order differently, the time difference is generated, if the time required for monitoring is long, the order receiving unit needs to wait for the monitoring unit to respond before receiving the next order, and thus the meaning of independent functions of the order receiving unit and the monitoring unit is lost.
In order to achieve the above object, the transaction monitoring method in this embodiment includes the steps of:
step S10, when monitoring response information of a monitoring unit is received, a storage area associated with order request information corresponding to the monitoring response information is obtained;
step S20, the monitoring response information is stored in the storage area;
step S30, after all monitoring response information of the first order request information is stored in the storage area of the first order request information, the monitoring response information of the first order request is output, the first order request information is deleted in the message queue, and the first order request information is the order request information of the first queue of the message queue in the storage area.
The embodiment can be operated on a PC, a terminal device such as a smart phone and a tablet computer, or a server. If the system is operated on the PC side, order receiving, order monitoring and the like can be performed in the terminal system. If the system runs on the smart phone or the tablet computer, a user can initiate an order request based on the smart phone or the tablet computer, and the transaction monitoring system monitors the order according to the order request initiated by the user. For example, the server can monitor the transaction based on the order request sent by the smart phone and tablet computer of the user.
Because the transaction monitoring system realizes automation without human intervention, the order requests and the transaction monitoring results are required to be in one-to-one correspondence, otherwise, the situation of monitoring misjudgment is easy to occur, and based on the situation, the monitoring results corresponding to the received order requests are responded first. In this embodiment, the plurality of monitoring units may monitor and process the plurality of order request information at the same time, and the monitoring contents required by different list request information are different, so as to avoid that when the monitoring process corresponding to the later received order request is completed first, the monitoring process result is output first, so that the monitoring process result does not correspond to the order request, and in this embodiment, a message queue is set, and with continued reference to fig. 3, the transaction monitoring method further includes:
step S40, when order request information is received, a storage area of the order request information is allocated, and the order request information is added to a message queue;
step S50, monitoring request information corresponding to the order request information is sent to a monitoring unit, so that the monitoring unit returns monitoring response information according to the order request information.
In a transaction monitoring system, a plurality of storage areas are arranged in a message queue, after order receiving units receive order request information, the storage areas are distributed according to the order request information receiving sequence, so that the order request information is arranged in the message queue, monitoring request information is generated according to the order request information, and further the monitoring request information corresponding to the order request information is sent to a monitoring unit so that the monitoring unit can return monitoring response information according to the order request information, wherein the monitoring request information comprises at least one of order content and monitoring content.
When monitoring response information fed back by the monitoring unit is received, the monitoring response information is not output to the transaction processing system, the monitoring response information is stored in a storage area of corresponding order request information, and when all the monitoring response information corresponding to the first order request information is received in the storage area corresponding to the first order request information of the message queue, all the monitoring response information of the first order request information is output so that the transaction processing system can process the order request information according to the monitoring response information. Therefore, the condition that the monitoring response information does not correspond to the order request information is avoided.
The specific implementation process of this embodiment is shown as a in fig. 4: a message queue is arranged in the monitoring system, when no order request information is in the current message queue, if the order request information A is received, the order request information A is arranged at the head of the message queue, and the order request information A is sent to the monitoring units, wherein when the monitoring content corresponding to the order request information A comprises a plurality of monitoring contents, the plurality of monitoring contents are respectively sent to each monitoring unit; before the monitoring unit does not return the monitoring response information of the order request information A, if the order receiving unit receives the order request information B at the moment, determining a storage area in the message queue, such as a storage area behind the order request information B, adding the order request information B into the message queue, locating at the rear position of the order request information A, and sending the order request information B to the monitoring unit for the monitoring unit to process the order request information.
When the terminal receives monitoring response information of the monitoring unit, searching order request information corresponding to the monitoring response information from each order request information in the message queue, storing the response information into a storage area associated with the order request information when the order request information corresponding to the monitoring response information is searched, storing the monitoring response information A into the storage area corresponding to the order request information A when the monitoring unit feeds back the monitoring response information A of the order request information A as shown in B in fig. 4, and storing the monitoring response information B into the storage area corresponding to the order request information B when the monitoring unit feeds back the monitoring response information B of the order request information B.
In order to ensure the quick output of the monitoring response information, when the terminal receives the monitoring response information, judging whether the monitoring response information stored in the storage area associated with the first order request information at the head of the queue is all monitoring response information corresponding to the first order request information in the message queue, if not, waiting for all the monitoring response information corresponding to the first order request information to return, as shown in c in fig. 4, wherein at this time, since all the monitoring response information is not received by the order request information A arranged at the head of the message queue, the monitoring response information of the order request information A is not output first. If yes, judging that the monitoring response information of the first order request information in the message queue is received, outputting the monitoring response of the first order request to a transaction processing system, and deleting the first order request information in the message queue to complete the transaction monitoring of the first order request information. As shown in d of fig. 4, all monitoring response information corresponding to the order request information a arranged at the head of the message queue at this time is stored in the storage area of the order request information a, the monitoring response information of the order request information a is output, the order request information a is deleted, and the completion of the order request information a is transaction monitoring, in addition, since the monitoring response information B of the order request information B is also returned all the time, after the monitoring response information of the order request information a is output, the monitoring response information of the order request information B is output, and the order request information B is deleted.
It may be appreciated that, in other embodiments, in order to save the determining process, the storage area associated with the order request information is set to automatically feed back the storage condition of the monitoring response information, where the transaction monitoring method further includes: and after the monitoring response information is stored in the storage area, marking the monitoring response information storage times in the storage area, and judging that all the monitoring corresponding information of the first order request information is stored in the storage area of the first order request information when the monitoring response information storage times of the storage area of the first order request information are monitored to be equal to the number of the monitoring contents corresponding to the first order request information. After deleting the first order request information in the message queue, clearing the mark on the storage area corresponding to the first order request information, and marking the storage times according to the next first order request information.
In this embodiment, the first order request information is the first order request information stored in the message queue, and when the first order request information is deleted, the order request information located at the last position of the first order request information becomes new first order request information.
Further, referring to fig. 5, the step of obtaining the storage area associated with the order request information corresponding to the monitoring response information includes:
step S11, acquiring identification information of the monitoring response information, wherein the identification information comprises an order identifier;
step S12, determining a storage area corresponding to the matched order request information according to the identification information;
and step S13, taking the storage area as a storage area corresponding to the monitoring response information.
When monitoring processing is carried out on the order request information, the monitoring processing unit generates different identification information according to different order request information, and feeds back the different identification information and the monitoring response information together when feeding back the monitoring response information, so that corresponding order request information can be conveniently searched according to the identification information. The identification information comprises an order identification, wherein the order identification can be a specific label on the order, an address identification on the order and the like.
After the identification information of the monitoring response information is obtained, searching order request information matched with the identification information in a message queue in a traversing mode, and further determining a storage area corresponding to the order request information so as to store the monitoring response information in the storage area. This way it is ensured that the monitoring response information is accurately stored in the corresponding storage area.
According to the method, the plurality of order request information is processed through the plurality of monitoring units, the monitoring units are fully utilized, order processing efficiency is improved, the message queues are set to enable order request information to be arranged in sequence when being received, monitoring response information is output according to order receiving sequence, the situation of misjudgment during monitoring is avoided, and transaction system performance is improved.
Referring to fig. 6, the present invention provides a second embodiment of a transaction monitoring method, based on all the above embodiments, the step of sending monitoring request information corresponding to the order request information to a monitoring unit includes:
step S51, splitting the order request information into at least one order request information according to the request content of the order request information;
step S52, adding the split order request information into a corresponding message group, wherein the storage area corresponding to each split order request information is the same as the storage area of the order request information before splitting;
step S53, the monitoring request information corresponding to the split order request information is sent to the corresponding monitoring unit.
In order to realize simultaneous monitoring of the stock exchange and the fund exchange, the monitoring units are provided with a plurality of monitoring units, the monitoring units comprise a stock monitoring unit for stock monitoring and a fund monitoring unit for fund monitoring, the monitoring contents and the monitoring units can be set in one-to-one correspondence, such as a division message group, different message groups correspond to monitoring requests for storing different monitoring contents, when order request information is received, the request content of the order request information is split according to the request content of the order request information, if the request content of the order request information comprises a stock exchange request, the order request information is added to a group corresponding to the order request monitoring unit, if the request content of the order request information comprises a trade request, the stock request information is split into a group corresponding to the order request information, and the fund request information is split according to the request content of the request of the order request, and the fund request is split into a group corresponding to the order request information, and the fund request information is split after the request information is split.
Specifically, the embodiment sets at least two message groups, each message group corresponds to one monitoring unit, or a plurality of monitoring units for monitoring the same monitoring content, and the message groups are communicated with the corresponding monitoring units. As shown in fig. 7, when the order request information is to monitor shares and funds simultaneously, the order request information corresponding to the shares and the order request information corresponding to the funds are split according to the request content of the order request information, the split order request information corresponding to the shares is added to the message group 1 corresponding to the share monitoring unit, and the split order request information corresponding to the funds is added to the message group 2 corresponding to the funds monitoring unit. The order request information in different message groups is sent to different monitoring units so as to realize that a plurality of monitoring units process the order request information simultaneously, and meanwhile, when the monitoring units are arranged to return monitoring response information, the group sending the order request information is directly returned, so that the terminal can directly inquire the order request information corresponding to the monitoring response information through the message groups.
It can be understood that the message group is provided with a plurality of storage areas, the storage areas are used for storing the split order request information, the split order request information can be stored in any storage area of the message group, when the monitoring response information is received, after the message group corresponding to the monitoring response information is determined, each order request information is traversed in the message group to query the order request information matched with the monitoring response information, and in the embodiment, the order request information is traversed from the message group, so that the speed is faster and the efficiency is higher compared with the speed of traversing the original order request information.
The message group can also be a queue group, the split order request information is sequentially arranged in the message group according to the sequence, each queue group corresponds to a monitoring unit, when the monitoring unit corresponding to the queue group returns monitoring response information, the monitoring response information is determined to be the monitoring response information corresponding to the order request information positioned at the head of the queue in the queue group, and all the split order request information does not need to be traversed and inquired in the message group, so that the efficiency is higher, and the system performance is further improved.
It will be appreciated that the message group has an association with a message queue, and in particular, a pointer to a storage area in the message queue is stored in the message group. Specifically, when order request information is received, the order request information is stored in a storage area and added to a message queue, a pointer pointing to the storage area is generated, after the split order request information is added to a corresponding message group, the pointer is stored in the message group, so that monitoring response information returned by a monitoring unit can be conveniently used for determining the storage area related to the order request information according to the pointer.
Further, referring to fig. 8, the present invention provides a third embodiment of a transaction monitoring method, based on the first embodiment or the second embodiment, the step of determining, according to the identification information, a storage area corresponding to the matched order request information includes:
step S121, determining a message group according to the identification information;
step S122, searching order request information matched with the identification information from the message group;
step S123, a storage area corresponding to the matched order request is obtained.
If the amount of the order request information is large, the storage area corresponding to the order request information matched with the monitoring corresponding information is obtained by traversing all the order request information, so that the overall efficiency of the system is reduced, and the transaction monitoring system according to the embodiment comprises a plurality of monitoring units, wherein the monitoring units are divided into monitoring units for monitoring the content according to different monitoring contents of the monitoring units, such as a share monitoring unit for monitoring shares, a fund monitoring unit for monitoring funds, the share monitoring unit only receives the share request content in the order request information, and the fund monitoring unit only receives the fund request content in the order request information, so that the message group is set according to different monitoring contents of the monitoring units, the message group corresponds to the monitoring units one by one, as shown in fig. 7, the message group 1 corresponds to the share monitoring unit, the message group 2 corresponds to the fund monitoring unit, the message group 1 directly sends the order request information to the fund monitoring unit, and the message group 2 directly sends the order request information to the monitoring unit and the message group 2 also only returns the response information to the monitoring unit.
In the embodiment, the message group is set to be in one-to-one correspondence with the monitoring unit, order request information corresponding to the monitoring response information can be searched from the message group, and the response speed is improved compared with traversing inquiry from the original order request information.
Specifically, when monitoring response information is received, a corresponding message group can be determined according to identification information of the monitoring response information, wherein the identification information can be address information of the monitoring response unit or a specific identifier of the monitoring response unit, a terminal can determine the monitoring response unit for sending the monitoring response information according to the identification information of the monitoring response information, determine the message group corresponding to the monitoring response information according to the monitoring response unit, and then search order request information matched with the identification information from the message group, and acquire a storage area corresponding to the matched order request from the message group.
It will be appreciated that the message group has an association with a message queue, and in particular, a pointer to a storage area in the message queue is stored in the message group. Specifically, when order request information is received, the order request information is stored in a storage area and added to a message queue, a pointer pointing to the storage area is generated, after the split order request information is added to a corresponding message group, the pointer is stored in the message group, after monitoring response information returned by a monitoring unit is determined according to the monitoring response information, the message group is searched for order request information matched with the identification information from the message group, and a storage area associated with the order request information is determined based on the pointer corresponding to the order request information, so that after the monitoring response information is stored in the storage area, the monitoring response information is correspondingly stored in the storage area of the message queue, and in order to prevent the order request information which has received the monitoring response information from occupying the space of the message group, after the monitoring response information is received by the order request information, the order request information and the pointer corresponding to the order request information are deleted from the message group.
Referring to fig. 9, the present invention provides a fourth embodiment of a transaction monitoring method, based on the second embodiment or the third embodiment, in order to increase the monitoring processing rate of order request information in a message group, reduce the queuing time of order request information, especially when the amount of order request information in the message group is large, it is necessary to set the order request information in the message group in separate queues, where each separate queue corresponds to at least one monitoring unit, and monitor the order request information by using multiple monitoring units, so as to realize efficient monitoring of the order request information.
Specifically, the step of sending the monitoring request information corresponding to the split order request information to the corresponding monitoring unit includes:
step S531, determining message sub-queues in the message group according to preset identifiers corresponding to request contents of the split order request information;
step S532, the monitoring request information corresponding to the split order request information is sent to the monitoring unit corresponding to the message sub-queue.
The corresponding relation between the message sub-queues in each message group and the preset mark is preset to form a corresponding relation table, each message sub-queue is correspondingly associated with a monitoring unit, and the monitoring unit processes order request information corresponding to the message sub-queues.
When receiving order request information, determining a message group corresponding to the split order request information, determining a message sub-queue corresponding to the order request information according to a preset identifier on the split order request information, generating monitoring request information according to the split order request information, further sending the monitoring request information corresponding to the split order request information to a monitoring unit corresponding to the message sub-queue, after processing the order request information, feeding back monitoring response information to the message sub-queue by the monitoring unit, and based on each message sub-queue corresponding to one monitoring response unit, generally processing the monitoring request of the first received order request information, so that the returned monitoring response information is the monitoring response information corresponding to the order request information of the first queue of the message sub-queue, and when the monitoring response information is returned by the monitoring unit, the monitoring response information can be directly determined to be the monitoring response information corresponding to the order request information of the first queue of the message sub-queue, and can be directly stored to the monitoring response information corresponding to the storage area of the first queue of the order request information, thereby improving the performance of the monitoring system.
As shown in fig. 10, the order request information a includes two request contents, after the order request information a is split into two order request information, one order request information is added to the message group 1, another order request information is added to the message group 2, a corresponding message sub-queue in the message group is determined according to the split order request information a, for example, the split order request information a is on a first message sub-queue in the message group, the split order request information a is added to the first message sub-queue, the split order request information a is on the first message sub-queue in the message group 2, the split order request information a is added to the first message sub-queue, and then the order request information is sent to a monitoring unit corresponding to each message sub-queue.
It can be understood that the message sub-queues have an association relationship with the message queues, and specifically pointers pointing to storage areas in the message queues are stored in the message sub-queues, where the pointers in the message sub-queues are stored according to the sequence of the received split order request information.
Referring to fig. 11, the present invention provides a fifth embodiment of a transaction monitoring method, based on the third embodiment or the fourth embodiment, the step of searching the message group for order request information matching the identification information includes:
Step S1221, searching a message sub-queue corresponding to a monitoring unit identifier from the message group, wherein the identification information further comprises a monitoring unit identifier, and the monitoring unit identifier corresponds to a monitoring unit which sends the monitoring response information;
step S1222, taking the order request information of the head of the message sub-queue as the order request information matched with the identification information.
In order to improve the monitoring processing rate of the order request information in the message group and reduce the queuing time of the order request information, particularly when the amount of the order request information in the message group is large, the order request information in the message group needs to be set in a sub-queue mode, each sub-queue corresponds to at least one monitoring unit, and a plurality of monitoring units are used for monitoring the order request information, so that efficient monitoring of the order request information is realized.
The method comprises the steps of presetting a mapping relation between each message sub-queue and a monitoring unit, determining the monitoring unit according to monitoring response information fed back by the monitoring unit when the monitoring response information is received, and further searching the corresponding message sub-queues from a message group according to marking information of the monitoring unit, wherein the marking can be characteristic marking of the monitoring unit or address information of the monitoring unit, and the marking is marking information for uniquely identifying the monitoring unit.
Because each message sub-queue corresponds to a monitoring unit, the monitoring response unit generally processes the monitoring request of the first received order request information, so that the returned monitoring response information is the monitoring response information corresponding to the order request information of the head of the message sub-queue, each time the monitoring unit returns the monitoring response information, the monitoring response information can be directly determined to be the monitoring response information corresponding to the order request information of the head of the message sub-queue, the monitoring response information is directly stored in a storage area associated with the order request information of the head of the queue, and the inquiry of the order request information corresponding to the monitoring response information in the message group can be omitted, thereby further improving the monitoring efficiency and the monitoring system performance.
In other embodiments, the transaction monitoring method further includes a monitoring process, specifically, the transaction monitoring method further includes detecting, when monitoring request information corresponding to the order request information is received, whether request content of the monitoring request information meets a preset condition, if yes, returning monitoring response information corresponding to successful monitoring to the order request receiving unit, and if not, returning monitoring response information corresponding to failure monitoring to the order request receiving unit.
The monitoring unit monitors whether the user account corresponding to the order request information has shares or not when the received order request information is the selling shares according to different monitoring modes corresponding to different monitoring contents, if not, the request content of the order request information is judged to not meet preset conditions, and monitoring failure information is output; if yes, judging that the request content of the order request information meets the preset condition, outputting the success information at the moment, and selling the shares of the user by the transaction system. Similarly, if the funds are monitored, if the received order request information is a purchase share or other securities are purchased, whether the user account corresponding to the order request information has sufficient funds is monitored, if so, the request content of the order request information is judged to meet the preset condition, successful information is output, the transaction processing system processes the order request information of the user, if not, the request content of the order request information is judged to not meet the preset condition, the output monitoring is carried out, and the transaction processing system does not process the order request information.
The invention also provides a terminal, which comprises: the system comprises a memory, a processor and a transaction monitoring program stored on the memory and capable of running on the processor, wherein the transaction monitoring program realizes the steps of the transaction monitoring method when being executed by the processor.
The present invention also provides a computer-readable storage medium having stored thereon a transaction monitoring program which, when executed by a processor, implements the steps of the transaction monitoring method as described above.
The foregoing description of the invention and the accompanying drawings is only illustrative, and is not intended to limit the scope of the invention, but rather is to be construed in any way in view of the following description, the accompanying drawings and the like.
Claims (10)
1. A transaction monitoring method, characterized in that the transaction monitoring method comprises the steps of:
generating monitoring request information according to order request information in a message queue, and sending the monitoring request information corresponding to the order request information to each corresponding monitoring unit, wherein when new order request information exists in the message queue, the monitoring request information is generated according to the new order request information, the monitoring request information corresponding to the new order request information is sent to each corresponding monitoring unit, so that monitoring processing is carried out on a plurality of order request information at the same time, and the order request information in the message queue is sequentially stored according to the receiving time of the order request information;
When monitoring response information of the monitoring unit is received, acquiring a storage area associated with order request information corresponding to the monitoring response information;
storing the monitoring response information into the storage area;
after all monitoring response information corresponding to the first order request information is stored in a storage area of the first order request information, outputting monitoring response information of the first order request, deleting the first order request information in the message queue, taking the order request information positioned at the back of the first order request information as new first order request information, and processing the first order request by a transaction processing system according to the monitoring response information, wherein the first order request information is the order request information of the first queue of the message queue, a mode of determining that all monitoring response information corresponding to the first order request information is stored in the storage area of the first order request information comprises marking monitoring response information storage times in the storage area, and determining that all monitoring corresponding information of the first order request information is stored in the storage area of the first order request information when the monitoring response information storage times of the storage area of the first order request information is equal to the quantity of monitoring content corresponding to the first order request information.
2. The transaction monitoring method according to claim 1, wherein the step of acquiring the storage area associated with the order request information corresponding to the monitoring response information includes:
acquiring identification information of the monitoring response information, wherein the identification information comprises an order identifier;
determining a storage area corresponding to the matched order request information according to the identification information;
and taking the storage area as a storage area corresponding to the monitoring response information.
3. The transaction monitoring method according to claim 2, wherein the step of determining a storage area corresponding to the matched order request information based on the identification information includes:
determining a message group according to the identification information;
searching order request information matched with the identification information from the message group;
and acquiring a storage area corresponding to the matched order request.
4. A transaction monitoring method according to claim 3, wherein the step of locating order request information from the message group that matches the identification information includes:
searching a message sub-queue corresponding to a monitoring unit identifier from the message group, wherein the identification information further comprises the monitoring unit identifier, and the monitoring unit identifier corresponds to a monitoring unit for transmitting the monitoring response information;
And taking the order request information of the head of the message sub-queue as the order request information matched with the identification information.
5. The transaction monitoring method according to claim 1, wherein before the step of generating monitoring request information from order request information in the message queue, further comprising:
and when receiving order request information, distributing a storage area of the order request information, and adding the order request information to a message queue.
6. The transaction monitoring method according to claim 1, wherein the step of transmitting the monitoring request information corresponding to the order request information to the corresponding respective monitoring units includes:
splitting the order request information into at least one order request information according to the request content of the order request information;
adding the split order request information into a corresponding message group, wherein the storage area corresponding to each split order request information is the same as the storage area of the order request information before splitting;
and sending the monitoring request information corresponding to the split order request information to a corresponding monitoring unit.
7. The transaction monitoring method according to claim 6, wherein the step of transmitting the monitoring request information corresponding to the split order request information to the corresponding monitoring unit includes:
Determining message sub-queues in the message group according to preset identifiers corresponding to request contents of the split order request information;
and sending the monitoring request information corresponding to the split order request information to a monitoring unit corresponding to the message sub-queue.
8. A transaction monitoring method according to any of claims 1 to 7, wherein the transaction monitoring method further comprises:
detecting whether the request content of monitoring request information meets preset conditions or not when monitoring request information corresponding to order request information is received;
if yes, returning monitoring response information corresponding to successful monitoring;
if not, returning monitoring response information corresponding to the monitoring failure.
9. A terminal, the terminal comprising: memory, a processor and a transaction monitoring program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the transaction monitoring method according to any of claims 1 to 8.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a transaction monitoring program which, when executed by a processor, implements the steps of the transaction monitoring method according to any of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910729069.0A CN110473097B (en) | 2019-08-06 | 2019-08-06 | Transaction monitoring method, terminal and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910729069.0A CN110473097B (en) | 2019-08-06 | 2019-08-06 | Transaction monitoring method, terminal and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110473097A CN110473097A (en) | 2019-11-19 |
CN110473097B true CN110473097B (en) | 2023-05-02 |
Family
ID=68511572
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910729069.0A Active CN110473097B (en) | 2019-08-06 | 2019-08-06 | Transaction monitoring method, terminal and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110473097B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI821592B (en) * | 2020-08-28 | 2023-11-11 | 致茂電子股份有限公司 | System and method for managing transaction risk |
CN114118650B (en) * | 2020-08-28 | 2024-10-01 | 致茂电子(苏州)有限公司 | Transaction risk control and management system and transaction risk control and management method |
CN112529705A (en) * | 2020-12-04 | 2021-03-19 | 深圳市富途网络科技有限公司 | Method for processing orders of port stocks and related products |
CN113393288B (en) * | 2021-05-26 | 2023-11-03 | 北京京东振世信息技术有限公司 | Order processing information generation method, device, equipment and computer readable medium |
TWI836300B (en) * | 2021-12-06 | 2024-03-21 | 致茂電子股份有限公司 | System and method for financial commodity transaction |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104836701A (en) * | 2015-05-04 | 2015-08-12 | 北京京东尚科信息技术有限公司 | Order monitoring method and monitoring apparatus |
CN105160570A (en) * | 2015-09-15 | 2015-12-16 | 浪潮软件股份有限公司 | Concurrent online transaction processing method capable of being horizontally expanded |
CN107979477A (en) * | 2016-10-21 | 2018-05-01 | 苏宁云商集团股份有限公司 | A kind of method and system of business monitoring |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002297900A (en) * | 2001-03-30 | 2002-10-11 | Ibm Japan Ltd | Control system for reception by businesses, user side terminal device, reception side terminal device, management server queue monitoring device, method of allocating reception side terminals, and storage medium |
CN105096174A (en) * | 2014-04-16 | 2015-11-25 | 阿里巴巴集团控股有限公司 | Transaction matching method and transaction matching system |
CN105574624A (en) * | 2014-10-09 | 2016-05-11 | 阿里巴巴集团控股有限公司 | Abnormal data processing method and device and monitoring system |
CN106204000A (en) * | 2016-07-05 | 2016-12-07 | 康存乐付保数据科技(上海)有限公司 | A kind of service consumption method for processing payment information and system |
CN107679931A (en) * | 2017-08-17 | 2018-02-09 | 平安科技(深圳)有限公司 | Method, apparatus, storage medium and the terminal of order asynchronous process |
CN109584078A (en) * | 2018-10-22 | 2019-04-05 | 中国平安人寿保险股份有限公司 | Fund applies to purchase management method, device, computer readable storage medium and server |
-
2019
- 2019-08-06 CN CN201910729069.0A patent/CN110473097B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104836701A (en) * | 2015-05-04 | 2015-08-12 | 北京京东尚科信息技术有限公司 | Order monitoring method and monitoring apparatus |
CN105160570A (en) * | 2015-09-15 | 2015-12-16 | 浪潮软件股份有限公司 | Concurrent online transaction processing method capable of being horizontally expanded |
CN107979477A (en) * | 2016-10-21 | 2018-05-01 | 苏宁云商集团股份有限公司 | A kind of method and system of business monitoring |
Non-Patent Citations (2)
Title |
---|
Andrey Brito等."Speculative out-of-order event processing with software transaction memory".《DEBS‘08:Proceedings of the second international conference on Distributed event-based systems》.2008,第265-275页. * |
高丹."中国银联互联网支付业务系统设计与实现".《中国优秀硕士学位论文全文数据库 信息科技辑》.2013,(第S1期),I138-271页. * |
Also Published As
Publication number | Publication date |
---|---|
CN110473097A (en) | 2019-11-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110473097B (en) | Transaction monitoring method, terminal and computer readable storage medium | |
CN107464162B (en) | Commodity association method and device and computer-readable storage medium | |
CN107818433B (en) | Pickup method, logistics information processing method, device and system | |
CN106294308B (en) | Named entity identification method and device | |
CN111340587B (en) | Virtual commodity management method and related device | |
US20200286100A1 (en) | Payment complaint method, device, server and readable storage medium | |
CN103905526A (en) | Dispatching method and server | |
CN105303427A (en) | Article exchange method and article exchange device | |
CN107798135B (en) | Paging query method and device and electronic equipment | |
CA3154763A1 (en) | Data operation method, device and system | |
WO2021056955A1 (en) | Data processing method and apparatus, and readable storage medium and electronic device | |
CN111737564A (en) | Information query method, device, equipment and medium | |
CN110267215B (en) | Data detection method, equipment and storage medium | |
CN110134869B (en) | Information pushing method, device, equipment and storage medium | |
CN112862397A (en) | Information interaction method and device, storage medium and electronic equipment | |
US20240013266A1 (en) | Estimation apparatus, estimation system, and estimation method | |
CN110532231B (en) | File query method, file query device and terminal equipment | |
US20220222680A1 (en) | Product Return Task Generating Method, Apparatus, and Device, and Storage Medium | |
CN106375551B (en) | Information interaction method, device and terminal | |
CN111784376B (en) | Method and device for processing information | |
CN110837991A (en) | Method, device and system for improving express delivery efficiency | |
CN113507507A (en) | Method and device for solving supply and demand relationship based on electronic commerce and electronic equipment | |
CN107809449B (en) | Transaction control method and device | |
CN108121815B (en) | Automobile part query method, device and system, electronic equipment and medium | |
CN114298633B (en) | Information processing method and device, electronic equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |