Message processing method and device, electronic equipment and storage medium

By defining a finite state machine in the trading system, the order status is automatically determined and synchronized with the foreign exchange trading center, the problem of order status out of synchronization caused by messy messages is solved, and the stability and timeliness of the trading system are improved.

CN120111060APending Publication Date: 2025-06-06中国邮政储蓄银行股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510289699.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

During the interaction between the foreign exchange trading system and the foreign exchange trading center, the out-of-order message caused by network jitter or transmission may cause the problem of order status being out of synchronization.

Method used

By defining a finite state machine in the trading system, push messages based on the received traffic notification messages and order status changes, the order status is automatically determined and synchronized with the foreign exchange trading center to avoid reordering out-of-order messages.

Benefits of technology

It effectively solves the problem of order status out-of-synchronization caused by messy messages, simplifies the judgment of status changes, reduces additional processing processes, and improves the stability and timeliness of the transaction system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120111060A_ABST
    Figure CN120111060A_ABST
Patent Text Reader

Abstract

The invention discloses a message processing method and device, electronic equipment and a storage medium, and the method comprises the steps: sending an order transaction request, and obtaining the message data of an order; and determining an order state according to the message data so as to synchronize the order state with the foreign exchange transaction center. According to the invention, order state change judgment can be simplified, and reordering of disordered messages is avoided. According to the method and the device, the order state and the foreign exchange transaction center can be synchronized without being influenced by the out-of-order IMIX message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of foreign exchange transactions, and in particular to a message processing method, device, electronic device, and storage medium. Background Art

[0002] As the foreign exchange trading center CFETS (China Foreign Exchange Trade System) opens trading channel APIs for various types of transactions, institutions choose to use self-built trading system programs to interact with the trading center through trading channels. During the interaction process, the trading system and the trading center use IMIX messages (IMIX, the full name is the Interbank Market Business Data Exchange Protocol, which is an electronic communication protocol used to realize real-time transmission of financial information in interbank market trading activities (including the trading, issuance, confirmation and settlement of various products such as RMB, foreign exchange and derivatives)) to issue trading instructions and receive order information.

[0003] The typical interaction scenario between the foreign exchange trading center and the trading system is as follows: after the trading channel connection is established, the trading system sends an order instruction message to the foreign exchange trading center, and the foreign exchange trading center sends a confirmation message to the trading system. When the transaction is completed, the foreign exchange trading center sends a transaction notification message to the trading system. Usually, in the scenario where an order is placed and the transaction is completed, the interval between downlink messages is very short. If there is network jitter or other transmission reasons, the messages may arrive at the trading system out of order, resulting in abnormal message processing in the trading system or loss of synchronization between order information and the trading center. Summary of the invention

[0004] The embodiments of the present application provide a message processing method, device, electronic device, and storage medium to simplify the judgment of order status changes and avoid reordering out-of-order messages.

[0005] The present application embodiment adopts the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a message processing method, which is applied to a trading system, wherein the trading system interacts with a foreign exchange trading center, and the method includes:

[0007] Send an order transaction request and obtain the order message data;

[0008] The order status is determined according to the message data, so as to synchronize the order status with the foreign exchange transaction center.

[0009] In some embodiments, the obtaining of order message data includes:

[0010] The message data of the order obtained includes at least the transaction notification message and the order status change push message;

[0011] Determining the order status according to the message data includes:

[0012] If the message data of the order is a transaction notification message, then determining whether the transaction amount of the order meets the preset conditions;

[0013] If the order status in the message data of the order pushes a message, it is determined which state the current order is in.

[0014] In some embodiments, if the order status in the message data of the order changes and the message is pushed, determining which state the current order is in includes:

[0015] If the order status change push message is an order creation, determine that the current order is in a pending submission state;

[0016] If the order status change push message is submitted to the transaction center, determine that the current order is in the submitting state;

[0017] If the order status change push message is a feedback message returned by the trading center regarding order submission, it is determined that the current order is in a state of being accepted by the exchange;

[0018] If the order status change push message is a message received from a trading center about order status change, it is determined that the current order is in a valid state.

[0019] In some embodiments, if the message data of the order is a transaction notification message, determining whether the transaction amount of the order meets a preset condition includes:

[0020] If the transaction amount of the order is judged to be lower than the order amount, the order status is valid;

[0021] If the transaction amount of the order is determined to be equal to the order amount, the order status is fully completed.

[0022] In some embodiments, the method further comprises:

[0023] If an order cancellation is initiated to the trading center, the order status is canceled, and when the order cancellation message from the trading center is received, the transaction amount is determined;

[0024] If the executed amount of the order is not zero, the order status is partially executed and partially cancelled;

[0025] If the executed amount of the order is determined to be zero, the order status is All Orders Cancelled.

[0026] In some embodiments, synchronizing the order status with the foreign exchange trading center includes:

[0027] When the order status changes from being submitted to being valid, a message trigger is pushed according to the change of the order status;

[0028] And / or, triggered by the process of an order submission feedback message and an order status change push message.

[0029] In some embodiments, determining the order status according to the message data to synchronize the order status with the foreign exchange trading center includes:

[0030] The order status is re-determined when the status in the received message data is updated, and the current order status is synchronized with the foreign exchange transaction center.

[0031] In a second aspect, an embodiment of the present application further provides a message processing device, which is applied to a trading system, wherein the trading system interacts with a foreign exchange trading center, and the device includes:

[0032] The acquisition module is used to send order transaction requests and obtain order message data;

[0033] The determination module is used to determine the order status according to the message data, so as to synchronize the order status with the foreign exchange transaction center.

[0034] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to perform the above method.

[0035] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes the above method.

[0036] At least one of the above technical solutions adopted in the embodiment of the present application can achieve the following beneficial effects: in the scenario of interaction between the trading system and the foreign exchange trading center, the trading system sends an order transaction request to obtain the message data of the order; and determines the order status according to the message data to synchronize the order status with the foreign exchange trading center. Through the above method, by managing the order status, the problem of order status asynchrony caused by the out-of-order arrival of the IMIX messages of the trading channel of the foreign exchange trading center at the trading system is solved, and additional processing procedures are reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0038] Figure 1 A schematic diagram of the system structure of the message processing method in the embodiment of the present application;

[0039] Figure 2 This is a schematic diagram of the process method of the message processing method in the embodiment of the present application;

[0040] Figure 3 This is a structural diagram of a message processing device in an embodiment of the present application;

[0041] Figure 4 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0043] In the interactive scenario between the trading system and the foreign exchange trading center, the IMIX message cache waiting solution is adopted in the relevant technology. Specifically, this solution checks and processes the IMIX messages with sequential processing requirements, does not process the message when the second message enters the system before the first message, and puts the message content and transaction number as the key into the key-value cache. In addition, after the first message arrives, the first message is processed normally, and the cache is checked after the processing is completed. If there is a second message, it is taken out and continued to be processed; if not, it is deemed that the second message has not arrived yet, and the message processing process ends.

[0044] For the above IMIX message cache waiting scheme, all received messages need to be judged whether they are out of order, or check whether there are subsequent messages that have arrived in the cache first. There is an additional judgment logic for processing transaction messages. This method can still be applied in scenarios where trading orders are not frequent, but in high-frequency trading scenarios, such judgments and checks will affect the timeliness of message processing. At the same time, if the IMIX messages received out of order are not processed before being stored in the cache, in the scenario of network fluctuations, if the previous message is lost, the message processing in the cache cannot be triggered, which will cause the trading system and the foreign exchange trading center to lose synchronization.

[0045] In view of the problem that the time interval between the order submission feedback message and the first order status change push message in the related technology is extremely short, and they may arrive at the trading system out of order when the network fluctuates. If they are only processed in the normal message processing order, the order status cannot be synchronized with the trading center. In the embodiment of the present application, a message processing method is provided, which analyzes the order status flow process, defines the flow process as a finite state machine, updates the order information and status through the message, simplifies the state change judgment, and effectively avoids reordering the disordered messages and blocking the processing flow.

[0046] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0047] like Figure 1 As shown, the foreign exchange trading center is the place where interbank money market business occurs. The foreign exchange trading center has opened trading channel APIs for various types of transactions. Institutions can choose to use self-built trading system programs to interact with the trading center through trading channels. The foreign exchange trading center can access multiple trading systems, such as trading systems 1, 2, and 3. The trading system refers to the electronic trading system developed by the relevant financial institutions, which interacts with the trading center through trading channels. In the following embodiments, pledged repurchase transactions are used as an example for detailed explanation. Pledged repurchase transactions are one of the trading varieties opened by the foreign exchange trading center. Institutional members refer to financial institutions that are eligible to trade in the foreign exchange trading center.

[0048] The present application embodiment provides a message processing method, such as Figure 2 As shown, a flow chart of a message processing method in an embodiment of the present application is provided, which is applied to a trading system, wherein the trading system interacts with a foreign exchange trading center, and the method at least includes the following steps S210 to S220:

[0049] Step S210, sending an order transaction request to obtain order message data.

[0050] By sending an order transaction request to the foreign exchange trading center, you will get the message data of the order returned by the foreign exchange trading center.

[0051] Take the normal interaction process of IMIX messages in the anonymous click trading mode (a trading mode where financial institutions can only see the price but not the trading parties) of the pledged repo trading product of the foreign exchange trading center as an example:

[0052] When the institutional members in the trading system send an order submission message to the foreign exchange trading center, the foreign exchange trading center returns the order submission feedback message to the institutional members, and then sends an order status change push message to the trading system. If the current transaction is matched and executed, the trading system will receive a transaction notification message. Before all transactions are completed, the trading system will continue to receive order status change push messages and transaction notification messages.

[0053] It can be understood that when the order submission message is sent upstream, it contains the client reference number generated by the trading system. The order submission feedback message sent downstream by the trading center and the first order status change push message contain the same client reference number. This number is used by the trading system to identify the association between the upstream order and the downstream order information.

[0054] Step S220, determining the order status according to the message data, so as to synchronize the order status with the foreign exchange trading center.

[0055] The trading system can determine the order status based on the message data, and the order status can be synchronized with the foreign exchange trading center because the order status is divided into finite state machines. It does not need to distinguish whether it is disordered or normal, but only needs to determine the state of the order to synchronize with the foreign exchange trading center.

[0056] Since the transaction flow can be simplified into a finite state machine by analyzing the order status: transaction notification message and order status change push message, the order status can be synchronized with the foreign exchange trading center without being affected by out-of-order IMIX messages.

[0057] Through the above method, a finite state machine model is used to simplify the order status flow, so that after the order status is determined, the order status can be synchronized with the foreign exchange trading center to avoid reordering out-of-order messages.

[0058] Through the above method, on the trading system side, order information and status are updated through messages, which simplifies the judgment of status changes and avoids message blocking.

[0059] Different from the related art, if network jitter or other transmission reasons occur, messages may arrive at the trading system out of order, thus causing abnormal message processing in the trading system or loss of synchronization between order information and the trading center. The above method can solve the problem of messages arriving at the trading system out of order due to network jitter or other transmission reasons, obtain order message data in the trading system, determine the order status based on the message data, and synchronize the order status with the foreign exchange trading center.

[0060] Different from the related art, the IMIX message cache waiting solution needs to determine whether the received message is out of order, or check whether there is a subsequent message that arrives first in the cache, which has the deficiency of additional judgment logic for processing transaction messages. Through the above method, it is not necessary to judge whether the message is out of order or in order, but the flow process is defined as a finite state machine, and the order information and status are updated through the message, which simplifies the state change judgment and avoids the reordering of out-of-order messages.

[0061] In one embodiment of the present application, the acquiring of the message data of an order includes: acquiring the message data of an order includes at least a transaction notification message and an order status change push message; determining the order status based on the message data includes: if the message data of the order contains a transaction notification message, determining whether the transaction amount of the order meets a preset condition; if the message data of the order contains an order status change push message, determining which state the current order is in.

[0062] Get the message data of the order and define the order flow process as a finite state machine, which includes the transaction notification message and the order status change push message.

[0063] Furthermore, the two trigger states of the finite state machine need to be processed:

[0064] If the message data of the order obtained is a transaction notification message, it is necessary to determine whether the transaction amount of the order meets the preset conditions. In other words, if it is a transaction notification message, it is necessary to determine whether the transaction amount of the transaction notification message meets the transaction conditions.

[0065] If the order status change push message in the message data of the order obtained, it is necessary to determine which state the current order is in. In other words, if it is an order status change push message, it is also necessary to determine which state the current message specifically handles.

[0066] It can be understood that a finite state machine (FSM finite state machine or FSA finite state automaton) is a computational model abstracted for studying computational processes with limited memory and certain language classes. A finite state automaton has a finite number of states, each state can migrate to zero or more states, and the input string determines which state to migrate to.

[0067] In one embodiment of the present application, if an order status change push message is received in the message data of the order, it is determined which state the current order is in, including if the order status change push message is for order creation, determining that the current order is in a pending submission state; if the order status change push message is for submission to the trading center, determining that the current order is in a submitting state; if the order status change push message is for the trading center to return an order submission feedback message, determining that the current order is in an exchange accepted state; if the order status change push message is for receiving an order status change push message from the trading center, determining that the current order is in a valid state.

[0068] The push messages for order status changes include but are not limited to: when an order is created, it is in the pending submission state, and when it is submitted to the trading center, it is in the submitting state. It should be noted that the "pending submission state" and "submitting state" are unknown to the foreign exchange trading center, but are presented in the trading system, such as the draft information before the trading order is placed.

[0069] The order status change push message also includes the exchange accepted status when the trading center returns the order submission feedback message and the valid status when the order status change push message is received from the trading center. It should be noted that the "exchange accepted status" and "valid status" are returned to the trading system by the foreign exchange trading center through the trading channel.

[0070] In one embodiment of the present application, if the message data of the order contains a transaction notification message, it is determined whether the transaction amount of the order meets preset conditions, including if it is determined that the transaction amount of the order is lower than the order amount, the order status is valid; if it is determined that the transaction amount of the order is equal to the order amount, the order status is fully completed.

[0071] When receiving a transaction notification message, the transaction amount must be determined. The specific method for determining the transaction amount when receiving a transaction notification message is: if the order transaction amount is lower than the order amount, the status is valid; if the order transaction amount is equal to the order amount, the order status is fully completed.

[0072] "Order Transaction Amount" is the actual transaction amount, and "Order Amount" is the amount of the transaction.

[0073] In one embodiment of the present application, the method also includes: if an order cancellation is initiated to the trading center, the order status is canceled, and when the order cancellation message from the trading center is received, the executed amount is judged; if it is judged that the executed amount of the order is not zero, the order status is partially executed and partially canceled; if it is judged that the executed amount of the order is zero, the order status is completely canceled.

[0074] When the trading center initiates order cancellation, the order status is canceled, and when the order cancellation message from the trading center is received, the transaction amount needs to be specifically determined.

[0075] If the executed amount is equal to the order amount, the order status is fully executed. When the order cancellation is initiated to the trading center, the status is canceled. If an order cancellation message is received from the trading center to determine the executed amount, if the executed amount is not zero, the order status is partially executed and partially canceled. If the executed amount is zero, the order status is canceled.

[0076] For example, a transaction order is posted at a price of A and a quantity of N. If the transaction order of a message is N / 2, then there are N / 2 left, and the current transaction amount is updated through the message. In addition, the order of arrival of foreign text is not restricted.

[0077] In one embodiment of the present application, synchronizing the order status with the foreign exchange trading center includes: when the order status changes from being submitted to valid, a message push trigger is triggered according to the change of the order status; and / or, triggered by a process of an order submission feedback message and an order status change push message.

[0078] When the order status changes from being submitted to being valid, it can be triggered by the normal process of an order submission feedback message and an order status change push message. Of course, it can also be directly triggered by an order status change push message in the scenario of disordered messages, and the order submission feedback message that arrives later will not affect the status flow. In other words, when the order status changes, it is usually triggered by an order submission feedback message and an order status change push message; in the scenario of disordered messages, it is directly triggered by an order status change push message.

[0079] In one embodiment of the present application, determining the order status based on the message data to synchronize the order status with the foreign exchange trading center includes: redetermining the order status when updating the message based on the status in the received message data, and synchronizing the current order status with the foreign exchange trading center.

[0080] Specifically, when the trading system receives the status update message, the order status on the trading system page will be updated synchronously, so that the traders in the trading system can know whether the order is successfully issued, thereby synchronizing the current order status with the foreign exchange trading center.

[0081] The embodiment of the present application also provides a message processing device 300, which is applied to a trading system, wherein the trading system interacts with a foreign exchange trading center, such as Figure 3As shown, a schematic diagram of the structure of a message processing device in an embodiment of the present application is provided, wherein the message processing device 300 at least includes: an acquisition module 310 and a determination module 320, wherein:

[0082] In one embodiment of the present application, the acquisition module 310 is specifically used to: send an order transaction request and acquire order message data.

[0083] By sending an order transaction request to the foreign exchange trading center, you will get the message data of the order returned by the foreign exchange trading center.

[0084] Take the normal interaction process of IMIX messages in the anonymous click trading mode (a trading mode where financial institutions can only see the price but not the trading party) of the pledged repo trading product of the foreign exchange trading center as an example:

[0085] When the institutional members in the trading system send an order submission message to the foreign exchange trading center, the foreign exchange trading center returns the order submission feedback message to the institutional members, and then sends an order status change push message to the trading system. If the current transaction is matched and executed, the trading system will receive a transaction notification message. Before all transactions are completed, the trading system will continue to receive order status change push messages and transaction notification messages.

[0086] It can be understood that when the order submission message is sent upstream, it contains the client reference number generated by the trading system. The order submission feedback message sent downstream by the trading center and the first order status change push message contain the same client reference number. This number is used by the trading system to identify the association between the upstream order and the downstream order information.

[0087] In one embodiment of the present application, the determination module 320 is specifically used to: determine the order status according to the message data, so as to synchronize the order status with the foreign exchange trading center.

[0088] The trading system can determine the order status based on the message data, and the order status can be synchronized with the foreign exchange trading center because the order status is divided into finite state machines. It does not need to distinguish whether it is disordered or normal, but only needs to determine the state of the order to synchronize with the foreign exchange trading center.

[0089] Since the transaction flow can be simplified into a finite state machine by analyzing the order status: transaction notification message and order status change push message, the order status can be synchronized with the foreign exchange trading center without being affected by out-of-order IMIX messages.

[0090] It can be understood that the above-mentioned message processing device can implement each step of the message processing method provided in the above-mentioned embodiment, and the relevant explanations about the message processing method are applicable to the message processing device and will not be repeated here.

[0091] In one embodiment of the present application, the acquisition module 310 is further used to:

[0092] The message data of the order obtained includes at least the transaction notification message and the order status change push message;

[0093] Determining the order status according to the message data includes:

[0094] If the message data of the order is a transaction notification message, then determining whether the transaction amount of the order meets the preset conditions;

[0095] If the order status in the message data of the order pushes a message, it is determined which state the current order is in.

[0096] In one embodiment of the present application, the acquisition module 310 is further used to:

[0097] If the order status change push message is an order creation, determine that the current order is in a pending submission state;

[0098] If the order status change push message is submitted to the transaction center, determine that the current order is in the submitting state;

[0099] If the order status change push message is a feedback message returned by the trading center regarding order submission, it is determined that the current order is in a state of being accepted by the exchange;

[0100] If the order status change push message is a message received from a trading center about order status change, it is determined that the current order is in a valid state.

[0101] In one embodiment of the present application, the acquisition module 310 is further used to:

[0102] If the transaction amount of the order is judged to be lower than the order amount, the order status is valid;

[0103] If the transaction amount of the order is determined to be equal to the order amount, the order status is fully completed.

[0104] In one embodiment of the present application, the method further includes:

[0105] If an order cancellation is initiated to the trading center, the order status is canceled, and when the order cancellation message from the trading center is received, the transaction amount is determined;

[0106] If the executed amount of the order is not zero, the order status is partially executed and partially cancelled;

[0107] If the executed amount of the order is determined to be zero, the order status is All Orders Cancelled.

[0108] In one embodiment of the present application, the determining module 320 is further configured to:

[0109] When the order status changes from being submitted to being valid, a message trigger is pushed according to the change of the order status;

[0110] And / or, triggered by the process of an order submission feedback message and an order status change push message.

[0111] In one embodiment of the present application, the determining module 320 is further configured to:

[0112] The order status is re-determined when the status in the received message data is updated, and the current order status is synchronized with the foreign exchange transaction center.

[0113] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 4 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.

[0114] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0115] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0116] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a message processing device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:

[0117] Send an order transaction request and obtain the order message data;

[0118] The order status is determined according to the message data, so as to synchronize the order status with the foreign exchange transaction center.

[0119] The above application Figure 2 The method performed by the message processing device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0120] The electronic device may also perform Figure 2 The method is executed by the message processing device in Figure 2 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.

[0121] The present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to execute Figure 2 The method performed by the message processing device in the illustrated embodiment is specifically used to perform:

[0122] Send an order transaction request and obtain the order message data;

[0123] The order status is determined according to the message data, so as to synchronize the order status with the foreign exchange transaction center.

[0124] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0125] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0126] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0127] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0128] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0129] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0130] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0131] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0132] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0133] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A message processing method, wherein: Applied to a trading system, the trading system interacts with a foreign exchange trading center, and the method includes: Send an order transaction request and obtain the order message data; The order status is determined according to the message data, so as to synchronize the order status with the foreign exchange transaction center.

2. The method of claim 1, wherein: The message data of obtaining the order includes: The message data of the order obtained includes at least the transaction notification message and the order status change push message; Determining the order status according to the message data includes: If the message data of the order is a transaction notification message, then determining whether the transaction amount of the order meets the preset conditions; If the order status change message in the message data of the order is pushed, it is determined which state the current order is in.

3. The method of claim 2, wherein: If the order status in the message data of the order changes, the message is pushed, and the current order status is determined, including If the order status change push message is an order creation, determine that the current order is in a pending submission state; If the order status change push message is submitted to the transaction center, determine that the current order is in the submitting state; If the order status change push message is a feedback message returned by the trading center regarding order submission, it is determined that the current order is in a state of being accepted by the exchange; If the order status change push message is a message received from a trading center about order status change, it is determined that the current order is in a valid state.

4. The method of claim 2, wherein: If the message data of the order is a transaction notification message, then judging whether the transaction amount of the order meets the preset conditions includes: If the transaction amount of the order is judged to be lower than the order amount, the order status is valid; If the transaction amount of the order is determined to be equal to the order amount, the order status is fully completed.

5. The method according to claim 4, further comprising: If an order cancellation is initiated to the trading center, the order status is canceled, and when the order cancellation message from the trading center is received, the transaction amount is determined; If the executed amount of the order is not zero, the order status is partially executed and partially cancelled; If the executed amount of the order is determined to be zero, the order status is All Orders Cancelled.

6. The method of claim 1, wherein: The step of synchronizing the order status with the foreign exchange trading center includes: When the order status changes from being submitted to being valid, a message trigger is pushed according to the change of the order status; And / or, triggered by the process of an order submission feedback message and an order status change push message.

7. The method according to any one of claims 1 to 6, wherein: Determining the order status according to the message data to synchronize the order status with the foreign exchange trading center includes: The order status is re-determined when the status in the received message data is updated, and the current order status is synchronized with the foreign exchange transaction center.

8. A message processing device, wherein: Applied to a trading system, the trading system interacts with a foreign exchange trading center, and the device includes: The acquisition module is used to send order transaction requests and obtain order message data; The determination module is used to determine the order status according to the message data, so as to synchronize the order status with the foreign exchange transaction center.

9. An electronic device, comprising: processor; as well as A memory arranged to store computer executable instructions, which when executed cause the processor to perform the method of any one of claims 1 to 7.

10. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, causes the electronic device to execute any one of the methods of claims 1 to 7.