Message processing server, program and message processing method
The message processing server addresses network delay-induced order reversals by sorting and processing messages based on their transmission time using timestamps and reception periods, ensuring fairness and reducing congestion.
Patent Information
- Application Number
- JP2022532170
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-06-25
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2040-06-25
AI Technical Summary
Financial transactions, particularly in high-frequency trading, are affected by network delays causing order reversals and unfairness due to the order of message arrival times, rather than the intended order time, necessitating a solution to process messages based on their transmission time.
A message processing server that utilizes timestamps to sort and process messages based on their transmission time by setting a reception period considering the minimum and maximum transfer delay times, ensuring messages are processed in the order they were sent.
Ensures fairness in message processing by ordering transactions based on their intended time of transmission, reducing network distance dependencies and minimizing traffic congestion.
Smart Images

Figure 0007597113000001 
Figure 0007597113000002 
Figure 0007597113000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a message processing server, a program, and a message processing method for processing a message to which a time stamp is attached. [Background technology]
[0002] One method of distributing and using highly accurate and reliable time (time information) is a time stamp issued by a trusted third party, a time stamp authority (see Non-Patent Documents 1 and 2). This time stamp includes a hash value of an electronic document, time information, and a signature of the time stamp authority on a combination of the hash value and time information. By verifying the signature, it is possible to prove the existence of the electronic document at the time indicated by the time information and that the document has not been altered since that time. For example, if the electronic document is a contract, a time stamp issued by a trusted third party, a time stamp authority, guarantees the existence of the contract on the date of the time stamp and that the contract has not been altered since that date.
[0003] Another use of highly accurate and reliable time is to use it for records / logs and transactions. When multiple devices in a system are acquiring logs, the time (timestamp) in the log must be synchronized between devices and be accurate as a record of the system. Also, in transactions involving multiple participants, such as financial transactions, where the order of transactions is determined according to the order placement, an accurate order placement time (order time) is required. [Prior art documents] [Non-patent literature]
[0004] [Non-Patent Document 1] How time stamps work, [online], Time Business Certification Center, [Searched June 10, 2020], Internet<URL:https: / / www.dekyo.or.jp / tb / contents / summary / system_2.html> [Non-Patent Document 2] Exporting Japan's time stamp system to the world, NICT NEWS, [online], National Institute of Information and Communications Technology, [Retrieved June 10, 2020], Internet<URL:https: / / www.nict.go.jp / publication / NICT-News / 1007 / 01.html> Summary of the Invention [Problem to be solved by the invention]
[0005] Financial transactions, including stocks, are processed in the order message arrival order at the exchange's server. For this reason, locations that are physically close to the exchange and close to the server on the network are advantageous. Users (market participants) who are far from the server may place orders early, but their order messages may arrive at the server later than users who are closer to the server due to network delays, resulting in a reversal of the order order order order sequence. In recent years, high-frequency trading has become common in stock trading, and time differences of less than a millisecond can affect profits. It is desirable to determine the order order according to the order order order sequence (order order time, order time) rather than the order order / order / processing request message arrival order sequence at the server (arrival time), ensuring fairness among users in terms of the network environment. In addition, exchanges with such a mechanism are expected to be supported by users (market participants) and gain more users.
[0006] The present invention has been made in view of the above background, and an object of the present invention is to enable processing to be performed in accordance with the order / time sequence in which processing request messages were sent. [Means for solving the problem]
[0007] In order to solve the above-mentioned problems, the message processing server according to the present invention is a message processing server that stores a time stamp, which is a transmission time, attached to a processing request message to be processed. It is a period includinga processing order determination unit that rearranges processing request messages, the timestamps of which are included in a transmission period among processing request messages received during a predetermined reception period corresponding to the transmission period, in the order of the timestamps; and a processing execution unit that processes the processing request messages in the rearranged order. a start time of the transmission period is a minimum transfer delay time of the processing request message before a start time of the predetermined receiving period, and an end time of the transmission period is a maximum transfer delay time of the processing request message before an end time of the predetermined receiving period. . Effect of the Invention
[0008] According to the present invention, it is possible to perform processing in accordance with the order / time sequence in which processing request messages are sent. [Brief description of the drawings]
[0009] [Figure 1] 2 is a functional configuration diagram of a transaction server and a transaction terminal according to the present embodiment. FIG. [Diagram 2] FIG. 2 is a diagram showing the configuration of a message spooler and a transaction processing spooler according to the embodiment of the present invention. [Diagram 3] FIG. 11 is a diagram for explaining a transfer delay time in the present embodiment. [Figure 4] 4 is a graph for explaining the relationship between an acceptance period and a reception period in the present embodiment. [Diagram 5] 11 is a graph illustrating a temporal relationship between a plurality of acceptance periods and a reception period in the present embodiment. [Figure 6] 11 is a flowchart of the entire process executed by a trading server according to the present embodiment. [Figure 7] 11 is a flowchart of a message receiving process according to the embodiment. [Figure 8] 4 is a flowchart of a transaction process according to the embodiment. [Figure 9] 11 is a flowchart of a window size determination process according to the embodiment. [Figure 10] FIG. 2 is a hardware configuration diagram showing an example of a computer that realizes the functions of a transaction server according to the present embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] The trading server (message processing server) in the form (embodiment) for carrying out the present invention will be described below. The trading server receives order messages (processing request messages) from trading terminals and processes them in the order of timestamps (order time, transmission time) that the trading terminals have assigned to the order messages. In detail, the trading server extracts order messages that have been assigned a timestamp that falls within a specified acceptance period (period during which the order message was sent) from among the order messages received during a specified reception period, and processes the extracted order messages in the order of the earliest timestamp.
[0011] The reception period is later than the reception period. The length of the reception period and the reception period is determined according to the transfer time (transfer delay time) of the order message from the trading terminal to the trading server. As a result, the order message sent from the trading terminal during the reception period and having a timestamp within the reception period is received by the trading server by the end of the reception period. This allows the trading server to process the order messages in the order of their transmission time (order time, time of timestamp), which in turn ensures fairness among users in the network environment. In addition, since there is no longer a need for the concentration of trading terminals near the trading server and they are distributed across the network, delay differences in order messages occur, which also makes it possible to reduce the load of traffic that is concentrated in the short term.
[0012] <Overall composition> Fig. 1 is a functional configuration diagram of a trading server 100 and a trading terminal 200 according to the present embodiment. The trading server 100 and the trading terminal 200 can communicate with each other via a network 800. Although two trading terminals 200 are illustrated in Fig. 1, more trading terminals 200 may be connected to the trading server 100. A time distribution server 300 is further connected to the network 800, and distributes time to the trading server 100 and the trading terminal 200 (performs time synchronization) using protocols such as NTP (Network Time Protocol) and PTP (Precision Time Protocol).
[0013] <<Configuration of trading terminal>> The trading terminal 200 is a computer and includes a control unit (not shown), a memory unit (not shown), a clock 260, a communication unit 270, and a user interface 280 (described as UI (User Interface) in FIG. 1). The communication unit 270 transmits and receives communication data with the trading server 100 and the time distribution server 300. The user interface 280 includes a display, a keyboard, and the like, and displays information related to orders from users of the trading terminal 200 and accepts order operations. The control unit is composed of a CPU (Central Processing Unit) and includes a message generation unit 211, a time stamp stamping unit 212, and a time synchronization unit 213.
[0014] The time synchronization unit 213 uses NTP, PTP, or the like to synchronize the clock of the time distribution server 300 with the clock 260, and sets the clock 260 to the correct time. The message generator 211 receives a transaction order from a user and generates an order message including the order details. The time stamping unit 212 refers to the clock 260 and assigns the current time as the order time to the order message. The time stamping unit 212 may further assign the signature of the trading terminal 200 or the user to the order message. The order message with the time stamp (order time) assigned is transmitted to the trading server 100 by the communication unit 270. The time stamping unit 212 may assign an expected transmission time as the time stamp instead of the current time.
[0015] <Trade Server Configuration> The trading server 100 is a computer, and includes a control unit 110, a storage unit 120, a clock 160, and a communication unit 170. The communication unit 170 transmits and receives communication data to and from the trading terminal 200 and the time distribution server 300. The storage unit 120 is composed of a ROM (Read Only Memory), a RAM (Random Access Memory), a HDD (Hard Disk Drive), an SSD (Solid State Drive), etc. The storage unit 120 stores a program 121, a message spooler 130, a transaction processing spooler 140, etc.
[0016] The program 121 controls the trading server 100, which is a computer, and includes the procedures for message reception processing, trading processing, and window size determination processing, which are described later in FIGS. The message spooler 130 (see FIG. 2 described later) stores the order message received by the communication unit 170 in association with the time of receipt. Among the order messages stored in the message spooler 130, order messages whose timestamps are within a predetermined acceptance period are moved to the transaction processing spooler 140, where they are processed and deleted in the order of their timestamps (order times).
[0017] Fig. 2 is a diagram showing the configuration of the message spooler 130 and the transaction processing spooler 140 according to this embodiment. The message spooler 130 stores order messages 501-506 in association with the reception time of the order messages (arrival time at the transaction server 100). In Fig. 2, a timestamp (order time) is written in each of the order messages 501-506. For example, the timestamp of the order message 503 is "12:43" (12 minutes 43 seconds), and the reception time is "12:45" (12 minutes 45 seconds).
[0018] In the following description, the minimum unit of time is the second, and the time is expressed in minutes and seconds. This is for ease of explanation, and the minimum unit of time may be, for example, milliseconds or 50 microseconds.
[0019] Order messages 501-506 stored in message spooler 130 and whose timestamps are within the acceptance period are moved to transaction processing spooler 140. In Fig. 2, the acceptance period is from 12:42 to 12:43, and order messages 502, 504, 501, and 503 have been moved. Note that the moved order messages are deleted from message spooler 130, but for convenience of explanation, Fig. 2 shows them as if they were stored in message spooler 130.
[0020] <Configuration of the control unit of the trading server> Returning to FIG. 1, the control unit 110 is composed of a CPU, and includes a delay measurement unit 111, a message receiving unit 112, a window size determination unit 113, a transaction order determination unit 114, a transaction processing unit 115, and a time synchronization unit . The delay measurement unit 111 measures the transfer time (transfer delay time) of an order message from the trading terminal 200 to the trading server 100. The delay measurement unit 111 may take half the round trip time of a communication packet between the trading terminal 200 and the trading server 100 as the transfer delay time, or may measure the transfer delay time by using a message used in NTP or PTP. In the following, the delay measurement unit 111 measures the round trip time of a communication packet with the trading terminal 200 multiple times, and determines half the average value as the transfer delay time of the trading terminal 200.
[0021] The message receiving unit 112 assigns a reception time to the order message received by the communication unit 170 from the trading terminal 200, and stores the message in the message spooler 130 (see FIG. 2). The window size determination unit 113 determines the length of the acceptance period and the reception period. The window size determination unit 113 determines the reception period length (window size) based on the difference between the minimum transfer delay time and the maximum transfer delay time among the transfer delay times of the trading terminal 200. The relationship between the transfer delay time, the acceptance period, and the reception period will be described later with reference to Figs. 3 and 4.
[0022] Transaction order determination unit 114 moves order messages stored in message spooler 130 whose timestamps are within the acceptance period to transaction processing spooler 140 and sorts them in order of timestamp (from earlier to later timestamps). Transaction processing unit 115 processes the order messages stored in transaction processing spooler 140 in the order of their timestamps, in the order of their timestamps, and executes transactions according to the order details contained in the order messages. The time synchronization unit 116 uses NTP, PTP, or the like to synchronize the clock of the time distribution server 300 with the clock 160, and sets the clock 160 to the correct time.
[0023] <Relationship between transfer delay time, acceptance period, and reception period> 3 is a diagram for explaining the transfer delay time according to the present embodiment. The transfer delay time, which is the time from when the trading terminals 200A, 200B, and 200C send the order messages 510A, 510B, and 510C (shown as order M in FIG. 3) until the trading server 100 receives them, is 1 second, 2 seconds, and 3 seconds, respectively.
[0024] FIG. 4 is a graph 410 for explaining the relationship between the acceptance period and the reception period according to this embodiment. An arrow 411 indicates that an order message sent by the trading terminal 200A (see FIG. 3) closest to the trading server 100 at time T1 arrives at the trading server 100 at time T2. An arrow 412 indicates that an order message sent by the trading terminal 200C (see FIG. 3) farthest from the trading server 100 at time T1 arrives at the trading server 100 at time T4. An arrow 413 indicates that an order message sent by the trading terminal 200A closest to the trading server 100 at time T3 arrives at the trading server 100 at time T4. An arrow 414 indicates that an order message sent by the trading terminal 200C farthest from the trading server 100 at time T3 arrives at the trading server 100 at time T5.
[0025] If the period (transmission period) of the timestamps (transmission times) of the order message acceptance period is from time T1 to time T3, it can be seen that the corresponding order message will arrive at the trading server 100 between time T2 and time T5. In other words, to process an order message with a timestamp from time T1 to time T3, it is sufficient to select and process the order message with that timestamp from among the order messages with reception times from time T2 to time T5. For this reason, the window size determination unit 113 sets the reception period to be from time T2 to time T5.
[0026] The difference between time T1, which is the start time of the acceptance period, and time T2, which is the start time of the reception period, is the transfer delay time of the trading terminal 200A, which is closest to the trading server 100. The difference between time T3, which is the end time of the acceptance period, and time T5, which is the end time of the reception period, is the transfer delay time of the trading terminal 200C, which is the farthest from the trading server 100. In addition, the difference between the length of the reception period (reception period length) and the length of the acceptance period (acceptance period length) is the difference between the maximum and minimum values of the transfer delay time. The reception period length (window size) is equal to or greater than the difference between the maximum and minimum values of the transfer delay time.
[0027] This window size is the difference between the reception times (arrival times) of the trading server 100 when the trading terminal 200A, which is the closest to the trading server 100, and the trading terminal 200C, which is the furthest, transmit order messages within the reception period. In other words, if the window size time is waited after receiving the order message 510A, which is the earliest transmitted from the nearest trading terminal 200A within the reception period, the order message 510C, which is the latest transmitted from the furthest trading terminal 200C within the reception period, will arrive at the trading server 100.
[0028] FIG. 5 is a graph 410 for explaining the temporal relationship between a plurality of acceptance periods and a reception period according to this embodiment. The transaction order determination unit 114 divides the timestamps of the order messages processed by the transaction processing unit 115 into acceptance period 1, acceptance period 2, and acceptance period 3 in order. The transaction order determination unit 114 moves the order messages stored in the message spooler 130 that have arrived in the reception period 1 corresponding to the acceptance period 1 and whose timestamps are included in the acceptance period 1 to the transaction processing spooler 140 and rearranges them in the order of the timestamps. The transaction processing unit 115 processes the order messages stored in the transaction processing spooler 140 in the rearranged order. The transaction order determination unit 114 and the transaction processing unit 115 repeat the above process in the order of acceptance period 1, acceptance period 2, and acceptance period 3.
[0029] <Processing Procedure> 6 is a flowchart of the overall process executed by the trading server 100 according to this embodiment. The control unit 110 of the trading server 100 simultaneously processes the message receiving process in step S10 (see FIG. 7 described later), the transaction process in step S20 (see FIG. 8 described later), and the window size determination process in step S30 (see FIG. 9 described later) in parallel. In the following description, it is assumed that the acceptance period length is preset.
[0030] 7 is a flowchart of the message receiving process (see step S10 in FIG. 6) according to this embodiment. The message receiving process is a process in which steps S11 and S12 are repeated. In step S11, the message receiving unit 112 receives the order message output by the communication unit 170 from the trading terminal 200. In step S12, the message receiving unit 112 adds a reception time to the order message received in step S11 and stores it in the message spooler 130.
[0031] 8 is a flowchart of the transaction process (see step S20 in FIG. 6) according to this embodiment. The transaction process is a process in which steps S22 to S24 are repeated for each acceptance period. In step S21, the control unit 110 starts the process of repeating steps S22 to S24 for each acceptance period. In detail, the control unit 110 executes steps S22 to S24 when a reception period (see FIG. 5) corresponding to the acceptance period has elapsed. In step S22, transaction order determination unit 114 moves to transaction processing spooler 140 order messages stored in message spooler 130 and whose timestamps are within the acceptance period.
[0032] In step S23, transaction order determination unit 114 rearranges the order messages stored in transaction processing spooler 140 in order of time stamps (from earliest to latest order time stamps). In step S24, transaction processor 115 processes the order messages stored in transaction processing spooler 140 in the order sorted in step S23.
[0033] 9 is a flowchart of the window size determination process (see step S30 in FIG. 6) according to this embodiment. The window size determination process is a process of repeating steps S31 and S32. In step S31, the delay measurement unit 111 measures the transfer delay time for each trading terminal 200. In step S32, the window size determination unit 113 sets the reception period length to the acceptance period length plus the difference between the maximum transfer delay time and the minimum transfer delay time among the transfer delay times measured in step S31.
[0034] <Features of the trading server> The trading server 100 collects, for each acceptance period, order messages whose timestamps are within the acceptance period among the received order messages, and processes them in order of timestamp. The length of the acceptance period of the order message to be processed is set based on the difference between the maximum and minimum values of the order message transfer delay time from the trading terminal. In detail, the length of the acceptance period is the length obtained by adding the difference between the maximum and minimum values of the order message transfer delay time to the acceptance period length. The trading server 100 starts processing after the maximum transfer delay time from the end time of the acceptance period. Therefore, all the trading terminals 200, including the trading terminal 200 with the maximum transfer delay time, can start processing after receiving all the order messages sent by the acceptance period. As a result, the trading server 100 can process all the order messages whose timestamps are within the acceptance period in order. Therefore, the trading server 100 can process the order messages in the order of the time of order, regardless of the network distance of the trading terminals 200. In addition, since the need for the trading terminals 200 to be concentrated near the trading server 100 is eliminated and the order messages are distributed on the network, delay differences in the order messages occur, and the traffic load that is concentrated in a short period of time can be reduced.
[0035] <<Variation: Reception Period>> The end time of the reception period is the time obtained by adding the maximum transfer delay time to the end time of the acceptance period. The window size determination unit 113 may determine the end time of the reception period (reception period length) by taking into account fluctuations in the transfer delay time. The transfer delay time is set to half the average of the round-trip time of the communication packets measured multiple times, but a predetermined time may be added to it. Alternatively, a constant multiple of the variance in half the round-trip time (the degree of change in the transfer delay time) may be added. As a result, the reception period length becomes longer. By doing this, even if network congestion temporarily occurs, causing a large transfer delay time, and an order message arrives after the reception period that does not take fluctuations into account, the order message can be processed in the order of the timestamp.
[0036] <<Variation: Application Period>> In step S21, the trading order determination unit 114 processes order messages whose timestamps are within the acceptance period, but it may also process order messages whose timestamps are before the acceptance period. By processing in this manner, even if an order message arrives at the trading server 100 with an unexpectedly large delay and is not processed within the original acceptance period, it can still be processed, albeit late.
[0037] <Variation: Length of application period> In the above embodiment, the length of the acceptance period is preset. The shorter the acceptance period, the shorter the time from receipt of the order message to processing. In other words, the shorter the acceptance period, the shorter the reception period, and the sooner the order message is processed after it is sent. In particular, in transactions where high-speed processing is desired, a shorter acceptance period is desirable.
[0038] <<Modification: Measurement of transfer delay time>> In the above embodiment, the delay measurement unit 111 measures the transfer delay time for all trading terminals 200. The delay measurement unit 111 may exclude a trading terminal 200 that has not transmitted an order message during a predetermined period from the measurement of the transfer delay time. In particular, if the transfer delay time of a trading terminal 200 excluded from the measurement target is longer than that of the other trading terminals 200, the reception period length becomes shorter, and the order message will be processed earlier after transmission.
[0039] <<Variation: Dealing with Invalid Timestamps>> If the arrival time of the order message at the trading server 100 is too early compared to the timestamp, the timestamp is suspected to be fraudulent. More specifically, the difference between the arrival time of the order message and the timestamp is the transfer delay time of the order message. If this transfer delay time is significantly shorter than the transfer delay time measured by the delay measurement unit 111, the timestamp (trading terminal 200) is suspected to be fraudulent.
[0040] The message receiving unit 112 may discard order messages whose transfer delay time is smaller than a predetermined value. The predetermined value is a value obtained by subtracting a fixed value from the transfer delay time measured by the delay measuring unit 111. Alternatively, the predetermined value may be a value obtained by subtracting a constant multiple of the variance from the average transfer delay time measured by the delay measuring unit 111. Note that instead of the message receiving unit 112, the transaction order determining unit 114 may discard order messages suspected of being fraudulent.
[0041] Other Modifications Although several embodiments of the present invention have been described above, these embodiments are merely illustrative and do not limit the technical scope of the present invention. For example, the trading server 100 moves order messages stored in the message spooler 130 whose timestamps are within the acceptance period to the transaction processing spooler 140. In response to this, the trading server 100 may process order messages whose timestamps are within the acceptance period without moving them. In addition, the trading server 100 processes order messages whose timestamps are within the acceptance period after sorting them in order of timestamps, but it is also possible to process them in order of timestamps without sorting them.
[0042] In the embodiment described above, the order message is created and time-stamped in the trading terminal 200. Alternatively, the trading terminal may create the order message and send it to the gateway, which may then time-stamp and send it to the trading server. A market participant having multiple trading terminals, such as a securities firm, may aggregate the time-stamping function in the gateway. In the above embodiment, the trading server 100 executes the order message sorting process and the trading process, but a plurality of servers may perform the processes. In the above embodiment, a trading server is described that processes order messages in the order of sending time / order time using transactions as an example, but processing other than transactions may also be processed in the order of sending time / request time of processing request messages.
[0043] The present invention can take various other embodiments, and furthermore, various modifications such as omissions and substitutions can be made without departing from the gist of the present invention. These embodiments and modifications are included in the scope and gist of the invention described in this specification, etc., and are included in the scope of the invention described in the claims and their equivalents.
[0044] <Hardware Configuration> Fig. 10 is a hardware configuration diagram showing an example of a computer 900 that realizes the functions of the trading server 100 according to the present embodiment. The trading server 100 according to the present embodiment is realized by a computer 900 having a configuration as shown in Fig. 10, for example. The computer 900 includes a CPU 901, a ROM 902, a RAM 903, a hard disk 904 (referred to as HDD in Fig. 10), an input / output interface 905 (referred to as input / output I / F (Interface) in Fig. 10), a communication interface 906 (referred to as communication I / F in Fig. 10), and a media interface 907 (referred to as media I / F in Fig. 10).
[0045] The CPU 901 operates based on a program stored in the ROM 902 or the hard disk 904, and performs control by the control unit 110 in Fig. 1. The ROM 902 stores a boot program executed by the CPU 901 when the computer 900 is started up, programs related to the hardware of the computer 900, and the like. The CPU 901 controls an input device 910 such as a mouse or a keyboard, and an output device 911 such as a display or a printer, via an input / output interface 905. The CPU 901 acquires data from the input device 910 via the input / output interface 905, and outputs generated data to the output device 911.
[0046] The hard disk 904 stores programs executed by the CPU 901 and data used by the programs. The communication interface 906 receives data from other devices (not shown) (e.g., the trading terminal 200 and the time distribution server 300) via a communication network, outputs the data to the CPU 901, and also transmits data generated by the CPU 901 to other devices via the communication network. The media interface 907 reads a program or data stored in the recording medium 912 and outputs it to the CPU 901 via the RAM 903. The CPU 901 loads the program from the recording medium 912 onto the RAM 903 via the media interface 907, and executes the loaded program. The recording medium 912 is an optical recording medium such as a DVD (Digital Versatile Disk), a magneto-optical recording medium such as an MO (Magneto Optical disk), a magnetic recording medium, a conductive memory tape medium, a semiconductor memory, or the like.
[0047] For example, when the computer 900 functions as the trading server 100 according to this embodiment, the CPU 901 of the computer 900 executes the program 121 (see FIG. 1) loaded onto the RAM 903, thereby realizing the functions of the trading server 100. The CPU 901 reads the program from a recording medium 912 and executes it. Alternatively, the CPU 901 may read the program from another device via a communication network, or may install the program 121 from the recording medium 912 onto the hard disk 904 and execute it.
[0048] Effect The effects of the trading server 100 (message processing server) will be described below.
[0049] The message processing server (trading server 100) according to this embodiment is characterized by having a processing order determination unit (trading order determination unit 114) that rearranges processing request messages with timestamps for a specified acceptance period among timestamped processing request messages (order messages) received during a specified reception period in chronological order of the timestamps, and a processing execution unit (trading processing unit 115) that processes the processing request messages in the rearranged order.
[0050] Such a message processing server makes it possible to process processing request messages (order messages) in the order of their timestamps (time of sending, time of order). Regardless of the transfer delay time (network distance) from the sender (trading terminal 200) to the message processing server, the processing request messages are processed in the order of their sending times, thereby ensuring fairness.
[0051] The message processing server is further characterized by comprising a delay measurement unit 111 that measures the transfer delay time from when a processing request message is sent until when the message processing server receives it, for each sender of the processing request message, and a receiving period length determination unit (window size determination unit 113) that sets the length of the receiving period in accordance with the difference between the maximum and minimum values of the transfer delay time.
[0052] By setting the length of the receiving period for processing request messages (receiving period length) in this manner, the message processing server can receive all processing request messages sent during the acceptance period, regardless of whether the processing request message has a long transfer delay from a sender far from the message processing server, or a short transfer delay from a sender close to the message processing server, and can process them in the order of their timestamps.
[0053] The reception period length determination unit is characterized in that it sets the length of the reception period in accordance with the rate of change of the transfer delay time.
[0054] If the reception period length for processing request messages is set in this manner, even if the transfer delay time of the processing request message becomes longer than usual due to network congestion or the like, the message processing server can receive the processing request message transmitted during the reception period and process it in the order of the timestamps.
[0055] The processing order determination unit is characterized in that it excludes from processing any processing request message in which the difference between the timestamp of the processing request message and the time of receipt is smaller than a value obtained by subtracting a predetermined value from the transfer delay time of the sender of the processing request message.
[0056] By excluding processing request messages in this manner, it is possible to prevent processing of processing request messages with incorrect time stamps, thereby ensuring fairness.
[0057] The delay measurement unit 111 is characterized in that it does not measure the transfer delay time for a source that has not transmitted a processing request message for a predetermined period of time.
[0058] By thus reducing the number of senders for which the transfer delay time of a processing request message is measured, it may be possible to shorten the length of the reception period of the processing request message, so that the processing request message is processed earlier after being sent. [Explanation of symbols]
[0059] 100 trading servers (message processing servers) 111 Delay measurement unit 112 Message Receiving Unit 113 Window size determination unit (reception period length determination unit) 114 Transaction order determination unit (processing order determination unit) 115 Transaction processing unit (processing execution unit) 116 Time Synchronization Unit 130 Message Spooler 140 Transaction Processing Spooler 200 Transaction terminal (sender, sender of processing request message) 501~506, 510A, 510B, 510C Order message (processing request message)
Claims
1. a processing order determination unit that rearranges processing request messages, which are received during a predetermined reception period corresponding to a transmission period that includes a timestamp that is a transmission time given to a processing request message to be processed, in the order of time of the timestamp; a processing execution unit that processes the processing request messages in the sorted order, the start time of the sending period is a minimum transfer delay time of the processing request message before the start time of the predetermined receiving period; The end time of the sending period is before the end time of the predetermined receiving period by the maximum transfer delay time of the processing request message. A message processing server comprising:
2. a delay measurement unit that measures a transfer delay time from when the processing request message is transmitted until when the message processing server receives the processing request message for each source of the processing request message; a reception period length determination unit that sets the length of the reception period according to a difference between a maximum value and a minimum value of the transfer delay time.
2. The message processing server according to claim 1.
3. The reception period length determination unit sets the length of the reception period in accordance with a degree of change in the transfer delay time.
3. The message processing server according to claim 2.
4. The processing order determination unit excludes from processing targets processing request messages in which the difference between the timestamp of the processing request message and the reception time is smaller than a value obtained by subtracting a predetermined value from a transfer delay time of a transmission source of the processing request message.
3. The message processing server according to claim 2.
5. The delay measurement unit does not measure the transfer delay time for a transmission source that has not transmitted the processing request message for a predetermined period of time.
3. The message processing server according to claim 2.
6. a processing order determination unit that rearranges processing request messages with time stamps that are within a predetermined acceptance period among processing request messages with time stamps that are received within a predetermined reception period in the order of time of the time stamps; a processing execution unit that processes the processing request messages in the sorted order; a delay measurement unit that measures a transfer delay time from when the processing request message is transmitted until when the processing request message is received for each transmission source of the processing request message; a reception period length determination unit that sets the length of the reception period according to a difference between a maximum value and a minimum value of the transfer delay time, The processing order determination unit excludes from processing targets processing request messages in which the difference between the timestamp of the processing request message and the reception time is smaller than a value obtained by subtracting a predetermined value from a transfer delay time of a transmission source of the processing request message. A message processing server comprising:
7. A program for causing a computer to function as the message processing server according to any one of claims 1 to 6.
8. A message processing method for a message processing server, comprising: The message processing server a step of sorting, among processing request messages received during a predetermined reception period corresponding to a transmission period that is a period including a time stamp that is a transmission time given to a processing request message to be processed, processing request messages whose time stamp is included in the transmission period in chronological order of the time stamp; processing the processing request messages in the sorted order; the start time of the sending period is a minimum transfer delay time of the processing request message before the start time of the predetermined receiving period; The end time of the sending period is before the end time of the predetermined receiving period by the maximum transfer delay time of the processing request message.
13. A method for processing a message comprising:
Citation Information
Patent Citations
Safe and reliable communication method based on group authentication in smart home environment
CN111092717A
Event order correction method
JP1997244984A
Event sequence correction method
JP1998283276A
Data processing system and data order guarantee method
JP2012129857A
In-Order Processing of Transactions
US20200034929A1
