Method and apparatus for controlling futures trading process
Patent Information
- Application Number
- CN202211551347.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-05
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2042-12-05
AI Technical Summary
[0002]期货交易所在非交易时间内通常会做一些交易测试,而在交易测试阶段,期货交易系统可能保持有与期货交易所的长连接,这导致期货交易系统在期货交易所的交易测试阶段,可能获取到错误的交易数据,导致对期货交易的结算结果不准确
[0011]本申请实施例提供的期货交易进程的控制方法,通过时间表中指定的期货交易时段,来确定交易进程开启时间点,以在当前时间点到达交易进程开启时间点时,开启期货的各交易进程,并在各交易进程的开启阶段,对从数据源获取到的期货的交易数据进行数据结算,直至确定各交易进程的运行时间超过期货交易时段时,则停止从数据源接收交易数据,并将数据结算得到的结算数据存储至数据库,从而在交易进程开启时间点时才开启各交易进程来接收数据进行数据结算,并在期货交易时段结束时停止接收数据,从而可确保进行分析的数据均为实际交易过程中产生的数据,避免从期货交易所中获取到错误的交易数据,提高获取到的交易数据的有效性。
Smart Images

Figure CN115951981B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of system operation and maintenance technology, specifically to a method and apparatus for controlling the futures trading process. Background Technology
[0002] Futures exchanges typically conduct trading tests during non-trading hours. During these tests, the futures trading system may maintain a persistent connection with the exchange. This can lead to the futures trading system receiving erroneous trading data during these tests, resulting in inaccurate settlement results. Therefore, preventing the acquisition of erroneous trading data from futures exchanges is a pressing technical problem that needs to be addressed. Summary of the Invention
[0003] This application aims to address at least one of the technical problems existing in related technologies. To this end, this application proposes a method for controlling the futures trading process, which can avoid obtaining erroneous trading data from futures exchanges and improve the effectiveness of the obtained trading data.
[0004] This application also proposes a control device for the futures trading process.
[0005] This application also proposes an electronic device.
[0006] This application also proposes a computer-readable storage medium.
[0007] The method for controlling the futures trading process according to the first aspect of this application includes:
[0008] Based on the futures trading hours in the preset schedule, determine the start time of the trading process, so that when the current time is the start time of the trading process, start each futures trading process;
[0009] During the initiation phase of each of the aforementioned trading processes, data settlement is performed on the futures trading data obtained from the data source to obtain settlement data;
[0010] Once the futures trading session has ended, the receipt of trading data from the data source is stopped, and the settlement data is stored in the database.
[0011] The futures trading process control method provided in this application determines the start time of the trading process by specifying the futures trading period in the timetable. When the current time point reaches the start time of the trading process, each futures trading process is started. During the start phase of each trading process, the trading data of the futures obtained from the data source is settled. When it is determined that the running time of each trading process exceeds the futures trading period, the receipt of trading data from the data source is stopped, and the settlement data obtained from the data settlement is stored in the database. Thus, each trading process is started to receive data and perform data settlement only at the start time of the trading process, and the receipt of data is stopped at the end of the futures trading period. This ensures that the data analyzed is all data generated in the actual trading process, avoids obtaining erroneous trading data from the futures exchange, and improves the effectiveness of the obtained trading data.
[0012] According to one embodiment of this application, it also includes:
[0013] The current time point is determined as the start time point of the transaction process, and the data transmission link with the data source is started.
[0014] According to one embodiment of this application, during the initiation phase of each of the aforementioned trading processes, data settlement is performed on the futures trading data obtained from the data source, including:
[0015] During the initiation phase of each transaction process, process detection is performed on each transaction process;
[0016] Determine the viability of each transaction process, perform data settlement on the futures transaction data obtained from the data source, and obtain settlement data.
[0017] According to one embodiment of this application, during the initiation phase of each transaction process, process detection is performed on each transaction process, including:
[0018] During the initiation phase of each of the aforementioned transaction processes, each of the aforementioned transaction processes is added to the process list;
[0019] Each transaction process in the process list is detected.
[0020] According to one embodiment of this application, it also includes:
[0021] If any of the transaction processes is determined to be not alive, the not alive transaction processes are restarted multiple times until the number of restart failures of the not alive transaction processes reaches a preset number, then all the transaction processes are shut down and an alarm message is generated.
[0022] According to one embodiment of this application, it also includes:
[0023] Once the futures trading session has ended, all trading processes are closed, and the trading data is cleared after each trading process is closed.
[0024] According to one embodiment of this application, determining the end of the futures trading session and ceasing the receipt of trading data from the data source includes:
[0025] Once the futures trading session has ended, the data transmission link with the data source is disconnected to stop receiving trading data from the data source.
[0026] A control device for a futures trading process according to a second aspect embodiment of this application includes:
[0027] The trading process initiation module is used to determine the trading process initiation time point according to the futures trading period in the preset time schedule, so as to initiate each futures trading process when the current time point is the trading process initiation time point;
[0028] The settlement data acquisition module is used to perform data settlement on the futures trading data obtained from the data source during the opening phase of each of the trading processes, and to acquire settlement data.
[0029] The trading thread shutdown module is used to determine the end of the futures trading session, stop receiving the trading data from the data source, and store the settlement data in the database.
[0030] An electronic device according to a third aspect of this application includes a processor and a memory storing a computer program, wherein the processor executes the computer program to implement the control method for the futures trading process described in any of the above embodiments.
[0031] A computer-readable storage medium according to a fourth aspect of this application stores a computer program thereon, which, when executed by a processor, implements the control method for the futures trading process described in any of the above embodiments.
[0032] A computer program product according to a fifth aspect of this application includes: when the computer program is executed by a processor, it implements a control method for a futures trading process as described in any of the above embodiments.
[0033] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects:
[0034] By using the futures trading sessions specified in the schedule, the start time of each trading process is determined. When the current time reaches the start time, each futures trading process begins. During the start phase of each process, the trading data obtained from the data source is settled. This process continues until the running time of each trading process exceeds the futures trading session. At this point, receiving trading data from the data source stops, and the settlement data is stored in the database. This ensures that the data analyzed is generated during actual trading, avoiding the acquisition of erroneous trading data from the futures exchange and improving the effectiveness of the acquired trading data.
[0035] Furthermore, by establishing the data transmission link with the data source only when the current time point is determined as the start time point for the trading process, it ensures that trading data from data sources such as futures exchanges can be obtained during the futures trading session. At the same time, it avoids obtaining trading data before the start time point for the trading process, thereby reducing the possibility of obtaining erroneous trading data for testing purposes from the data source.
[0036] Furthermore, by performing process detection on each trading process at the start stage, and only after confirming that each trading process is alive, the futures trading data obtained from the data source is settled, thereby ensuring that the settlement data obtained is the settlement data obtained when the futures trading process is normal, and improving the accuracy of the obtained settlement data. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart illustrating the method for controlling the futures trading process provided in an embodiment of this application;
[0039] Figure 2 This is an embodiment of the present application. Figure 1 A flowchart further detailing the data settlement process for controlling the futures trading process;
[0040] Figure 3 This is a schematic diagram of the structure of the control device for the futures trading process provided in the embodiments of this application;
[0041] Figure 4This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0043] The following will provide a detailed description and explanation of the control method and apparatus for the futures trading process provided in this application through several specific embodiments.
[0044] In one embodiment, a method for controlling the futures trading process is provided. This method is applied to a server to control the trading process of a futures trading system that has established a long-term connection with a futures exchange. The server can be a standalone server or a server cluster consisting of multiple servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence sampling point devices.
[0045] like Figure 1 As shown in the figure, the method for controlling the futures trading process provided in this embodiment includes:
[0046] Step 101: Determine the start time of the trading process according to the futures trading hours in the preset time schedule, so as to start each futures trading process when the current time is the start time of the trading process.
[0047] Step 102: During the initiation phase of each transaction process, the transaction data of the futures obtained from the data source is settled to obtain settlement data;
[0048] Step 103: Determine that the futures trading session has ended, stop receiving the trading data from the data source, and store the settlement data in the database.
[0049] By using the futures trading sessions specified in the schedule, the start time of each trading process is determined. When the current time reaches the start time, each futures trading process begins. During the start phase of each process, the trading data obtained from the data source is settled. This process continues until the running time of each trading process exceeds the futures trading session. At this point, receiving trading data from the data source stops, and the settlement data is stored in the database. This ensures that the data analyzed is generated during actual trading, avoiding the acquisition of erroneous trading data from the futures exchange and improving the effectiveness of the acquired trading data.
[0050] In one embodiment, the server pre-stores a preset schedule, which records all futures trading sessions available for futures trading at the futures exchange. Each futures trading session in this preset schedule can be obtained synchronously from the futures exchange, such as by synchronizing the futures exchange's trading hours to the preset schedule in real time, thereby ensuring the accuracy of the futures trading sessions in the preset schedule. After obtaining a specific futures trading session from the preset schedule, the start time of the trading process can be determined based on that futures trading session. The start time of the trading process refers to the time when each trading process of the trading system is initiated. Specifically, determining the start time of the trading process based on the futures trading session could involve directly setting the futures trading session as the start time of the trading process. However, considering that the trading testing phase of the futures exchange typically lasts for the first few days of trading, and that the entire trading process needs to be tested and verified when initiating the trading process of the trading system, it is not possible to immediately obtain futures trading data from the data source, such as the futures exchange. If the futures trading session is directly set as the start time of the trading process, it may result in the inability to obtain futures trading data from the futures exchange in a timely manner, causing information lag. Therefore, the start time of the trading process can be one day or N hours before the futures trading session. For example, if the futures trading session is from 9:00 to 16:00 on day T, then the start time of the trading process is 7:00 on day T-1 or day T, so as to control the futures trading system to start each trading process with the flow at 7:00 on day T-1 or day T.
[0051] After determining the start time of the trading process, the current time is detected, and when the current time is detected as the start time of the trading process, all futures trading processes in the trading system are started. To avoid subsequent settlement errors, in one embodiment, when the current time is detected as the start time of the trading process, it can first be checked whether the futures trading system has completed the settlement of the trading data from the previous futures trading session. If it has, all trading processes of the futures trading system are started directly; if not, the trading data from the previous futures trading session is settled first, and the start of each trading process is paused until the settlement of the trading data from the previous futures trading session is completed, and then the trading processes of the futures trading system are started again. If the settlement of the trading data from the previous futures trading session fails, or if the settlement of the previous trading data is not completed within a specified time period, such as 10 minutes, it indicates that there is an anomaly in the data settlement processing of the futures trading system. In this case, the start of each trading process can be stopped, and a prompt message indicating the data settlement anomaly is generated and sent to the target terminal used by the back-end staff to prompt the back-end staff to handle the anomaly.
[0052] To ensure the acquisition of trading data from data sources such as futures exchanges, in one embodiment, when the current time point is determined as the start time point of the trading process, the data transmission link with the data source also needs to be detected. If the data transmission link with the data source is detected to be not open, then the data transmission link with the data source is opened. This data transmission link is a long-lived connection. Furthermore, to prevent abnormal data transmission links from affecting the transmission of trading data, the data transmission link can be monitored in real time during the start phase of each trading process. If the data transmission link is detected to be disconnected, multiple attempts are made to re-establish the data transmission link. If multiple attempts to re-establish the data transmission link fail, it indicates that futures trading data cannot be obtained from the data source. At this point, each trading process is closed, and a prompt message indicating an abnormal data transmission link is generated and sent to the target terminal used by the back-end staff.
[0053] By establishing the data transmission link with the data source only when the current time point is determined as the start time point for the trading process, it ensures that trading data from data sources such as futures exchanges can be obtained during futures trading hours. At the same time, it avoids obtaining trading data before the start time point for the trading process, thereby reducing the possibility of obtaining erroneous trading data for testing purposes from the data source.
[0054] Once the data transmission link with the data source is successfully established, and the trading system detects that the settlement of trading data from the previous futures trading session has been completed, each trading thread can be activated, entering the initiation phase of each trading process. During this phase, each futures trading thread can process futures transactions, generating futures trading data within the futures exchange. Then, the futures trading data is retrieved from the futures exchange and other data sources, and data settlement is performed to obtain the futures settlement data. The trading data can include completed order information, pending order information, etc. The settlement data can include the trading trend and profit / loss trends during that futures trading session.
[0055] In order to ensure the stability of the futures trading process during the initiation phase of each trading process, in one embodiment, such as... Figure 2 As shown, during the initiation phase of each of the aforementioned trading processes, data settlement is performed on the futures trading data obtained from the data source, including:
[0056] Step 201: During the initiation phase of each transaction process, process detection is performed on each transaction process.
[0057] Step 202: Determine the survival of each transaction process, perform data settlement on the futures transaction data obtained from the data source, and obtain settlement data.
[0058] To prevent futures trading errors caused by one trading process being forcibly closed by another or unexpectedly terminated during the initiation phase of each trading process, in one embodiment, the process name and execution path of each trading process can be pre-added to the process configuration file. During the initiation phase of each trading process, the server reads this configuration file and monitors each trading process in the configuration file to detect whether each trading process is alive. If all trading processes are detected to be alive, it indicates that each trading process is normal. At this time, trading data can be obtained from the data source, and data settlement can be performed on the futures trading data obtained from the data source.
[0059] By performing process detection on each trading process at the start stage and settling the futures trading data obtained from the data source only after confirming that each trading process is alive, the settlement data obtained is ensured to be the settlement data obtained when the futures trading process is normal, thereby improving the accuracy of the obtained settlement data.
[0060] Considering that the configuration file of a process usually includes other configuration information, which makes it time-consuming to call the configuration file, in one embodiment, the server can pre-store a process list. During the start-up phase of each transaction process, each transaction process can be added to the process list, and then the transaction process can be monitored through the process list, so that the configuration file does not need to be modified.
[0061] During the monitoring of each trading process, to determine whether a particular trading process is alive, a heartbeat check can be performed on that process at a preset time interval to ensure the accuracy of the results. The preset time interval can be set according to actual conditions. For example, assuming the process list includes processes 1, 2, ..., n, and the preset time interval is 30 seconds, then starting with process 1, a heartbeat check is performed on the next process every 30 seconds. That is, first a heartbeat check is performed on process 1, then on process 2 after 30 seconds, and so on, until a heartbeat check is performed on process n. Then a new cycle begins, with a heartbeat check on process 1 again after 30 seconds, and so on. When performing heartbeat checks on trading processes, the liveness of a trading thread can be determined by detecting its heartbeat packets. If a heartbeat packet from the trading thread is received within a preset time period, such as within 5 seconds, the trading thread is considered alive; if no heartbeat packet is received within the preset time period, the trading thread is considered not alive.
[0062] In one embodiment, if a trading process is detected as not alive, it indicates an anomaly in futures trading. The dead trading process can be restarted multiple times. If the number of failed restarts reaches a preset number, the trading process can no longer be started. At this point, all trading processes are shut down, data acquisition from the data source is stopped, and data settlement is halted. An alarm message including the process name of the dead process is generated and sent to the target terminal to prompt backend staff to handle the anomaly. If a restart within the preset number of attempts is successful, the trading process is alive, and restarting is stopped. Once all trading processes are detected as alive, futures trading data can be received from the data source. Since this trading data is generated during the futures trading session, it is accurate, ensuring sufficient accuracy in the settlement data. After obtaining the settlement data, it can be mapped to the futures trading session. When the end of a futures trading session is determined, such as when the futures trading session is from 9:00 to 16:00 on day t, the end of the futures trading session is determined when 16:00 on day t is reached at the current time. At this time, the receipt of trading data from data sources such as futures exchanges will stop, and the settlement data obtained after settlement will be used as the settlement result of the futures trading session and stored in the database.
[0063] After the settlement data is stored, to ensure that the settlement data obtained in the next futures transaction is not affected by the current settlement data, in one embodiment, when the futures trading session ends, all trading processes are closed, and then all currently recorded trading data is cleared after the trading processes are closed. Thus, in the next futures transaction, since there is no trading data from the current futures transaction, only the trading data obtained in the next futures transaction exists, the data settlement for the next futures transaction will not be affected by the trading data obtained in the current futures transaction.
[0064] To further ensure that erroneous transaction data is not obtained from the data source, in one embodiment, when the futures trading session ends, the data transmission link with the data source can be disconnected, that is, the long connection with the data source can be broken, thereby ensuring that the receipt of transaction data from the data source can be stopped, and thus ensuring that erroneous transaction data is not obtained from the data source.
[0065] The control device for the futures trading process provided in this application is described below. The control device for the futures trading process described below can be referred to in correspondence with the control method for the futures trading process described above.
[0066] In one embodiment, such as Figure 3 As shown, a control device for a futures trading process is provided, comprising:
[0067] The trading process initiation module 210 is used to determine the trading process initiation time point according to the futures trading period in the preset time schedule, so as to initiate each futures trading process when the current time point is the trading process initiation time point;
[0068] The settlement data acquisition module 220 is used to perform data settlement on the futures trading data obtained from the data source during the opening phase of each of the trading processes, and to acquire settlement data.
[0069] The trading thread shutdown module 230 is used to determine the end of the futures trading session, stop receiving the trading data from the data source, and store the settlement data in the database.
[0070] By using the futures trading sessions specified in the schedule, the start time of each trading process is determined. When the current time reaches the start time, each futures trading process begins. During the start phase of each process, the trading data obtained from the data source is settled. This process continues until the running time of each trading process exceeds the futures trading session. At this point, receiving trading data from the data source stops, and the settlement data is stored in the database. This ensures that the data analyzed is generated during actual trading, avoiding the acquisition of erroneous trading data from the futures exchange and improving the effectiveness of the acquired trading data.
[0071] In one embodiment, the transaction process initiation module 210 is further configured to:
[0072] Determine the current time point as the start time point of the transaction process, and start the data transmission link with the data source.
[0073] In one embodiment, the settlement data acquisition module 220 is specifically used for:
[0074] During the initiation phase of each transaction process, process detection is performed on each transaction process;
[0075] Determine the viability of each transaction process, perform data settlement on the futures transaction data obtained from the data source, and obtain settlement data.
[0076] In one embodiment, the settlement data acquisition module 220 is specifically used for:
[0077] During the initiation phase of each of the aforementioned transaction processes, each of the aforementioned transaction processes is added to the process list;
[0078] Each transaction process in the process list is detected.
[0079] In one embodiment, the settlement data acquisition module 220 is further configured to:
[0080] If any of the transaction processes is determined to be not alive, the not alive transaction processes are restarted multiple times until the number of restart failures of the not alive transaction processes reaches a preset number, then all the transaction processes are shut down and an alarm message is generated.
[0081] In one embodiment, the transaction thread shutdown module 230 is further configured to:
[0082] Once the futures trading session has ended, all trading processes are closed, and the trading data is cleared after each trading process is closed.
[0083] In one embodiment, the transaction thread shutdown module 230 is specifically used for:
[0084] Once the futures trading session has ended, the data transmission link with the data source is disconnected to stop receiving trading data from the data source.
[0085] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 can call computer programs stored in the memory 830 to execute control methods for the futures trading process, such as including:
[0086] Based on the futures trading hours in the preset schedule, determine the start time of the trading process, so that when the current time is the start time of the trading process, start each futures trading process;
[0087] During the initiation phase of each of the aforementioned trading processes, data settlement is performed on the futures trading data obtained from the data source to obtain settlement data;
[0088] Once the futures trading session has ended, the receipt of trading data from the data source is stopped, and the settlement data is stored in the database.
[0089] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0090] On the other hand, embodiments of this application also provide a storage medium, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the control methods for the futures trading process provided in the above embodiments, such as including:
[0091] Based on the futures trading hours in the preset schedule, determine the start time of the trading process, so that when the current time is the start time of the trading process, start each futures trading process;
[0092] During the initiation phase of each of the aforementioned trading processes, data settlement is performed on the futures trading data obtained from the data source to obtain settlement data;
[0093] Once the futures trading session has ended, the receipt of trading data from the data source is stopped, and the settlement data is stored in the database.
[0094] On the other hand, embodiments of this application also provide a processor-readable storage medium storing a computer program for causing a processor to execute the methods provided in the above embodiments, such as including:
[0095] Based on the futures trading hours in the preset schedule, determine the start time of the trading process, so that when the current time is the start time of the trading process, start each futures trading process;
[0096] During the initiation phase of each of the aforementioned trading processes, data settlement is performed on the futures trading data obtained from the data source to obtain settlement data;
[0097] Once the futures trading session has ended, the receipt of trading data from the data source is stopped, and the settlement data is stored in the database.
[0098] Processor-readable storage media can be any available medium or data storage device that the processor can access, including but not limited to magnetic storage (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MOs), etc.), optical storage (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs)).
[0099] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0100] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for controlling the futures trading process, characterized in that, include: Based on the futures trading hours in the preset schedule, determine the start time of the trading process, so that when the current time is the start time of the trading process, start each futures trading process; During the initiation phase of each of the aforementioned trading processes, data settlement is performed on the futures trading data obtained from the data source to obtain settlement data; Once the futures trading session has ended, the receipt of trading data from the data source is stopped, and the settlement data is stored in the database; When the current time point is the start time point for the aforementioned trading process, initiate each of the futures trading processes, including: When the current time point is the start time point of the trading process, check whether the trading data of the previous futures trading session has been settled; If it is determined that the transaction data of the previous futures trading session has not been settled, the transaction data of the previous futures trading session is settled, and the initiation of each futures trading process is suspended until the transaction data of the previous futures trading session is settled, at which point the trading processes of the futures are resumed.
2. The method for controlling the futures trading process according to claim 1, characterized in that, Also includes: The current time point is determined as the start time point of the transaction process, and the data transmission link with the data source is started.
3. The method for controlling the futures trading process according to claim 1, characterized in that, During the initiation phase of each of the aforementioned trading processes, data settlement is performed on the futures trading data obtained from the data source, including: During the initiation phase of each transaction process, process detection is performed on each transaction process; Determine the viability of each transaction process, perform data settlement on the futures transaction data obtained from the data source, and obtain settlement data.
4. The method for controlling the futures trading process according to claim 3, characterized in that, During the initiation phase of each transaction process, process detection is performed on each transaction process, including: During the initiation phase of each of the aforementioned transaction processes, each of the aforementioned transaction processes is added to the process list; Each transaction process in the process list is detected.
5. The method for controlling the futures trading process according to claim 3 or 4, characterized in that, Also includes: If any of the transaction processes is determined to be not alive, the not alive transaction processes are restarted multiple times until the number of restart failures of the not alive transaction processes reaches a preset number, then all the transaction processes are shut down and an alarm message is generated.
6. The method for controlling the futures trading process according to claim 1, characterized in that, Also includes: Once the futures trading session has ended, all trading processes are closed, and the trading data is cleared after each trading process is closed.
7. The method for controlling the futures trading process according to claim 1, characterized in that, Determining the end of the futures trading session and ceasing the receipt of trading data from the data source includes: Once the futures trading session has ended, the data transmission link with the data source is disconnected to stop receiving trading data from the data source.
8. A control device for a futures trading process, characterized in that, include: The trading process initiation module is used to determine the trading process initiation time point according to the futures trading period in the preset time schedule, so as to initiate each futures trading process when the current time point is the trading process initiation time point; The settlement data acquisition module is used to perform data settlement on the futures trading data obtained from the data source during the opening phase of each of the trading processes, and to acquire settlement data. The trading thread shutdown module is used to determine the end of the futures trading session, stop receiving the trading data from the data source, and store the settlement data in the database; The transaction process initiation module is specifically used for: When the current time point is the start time point of the trading process, check whether the trading data of the previous futures trading session has been settled; If it is determined that the transaction data of the previous futures trading session has not been settled, the transaction data of the previous futures trading session is settled, and the initiation of each futures trading process is suspended until the transaction data of the previous futures trading session is settled, at which point the trading processes of the futures are resumed.
9. An electronic device comprising a processor and a memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the control method for the futures trading process as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the control method for the futures trading process as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Data updating method and device
CN106485583A
Monitoring method and device for process in container, storage medium and computer equipment
CN111324423A
Data acquisition method based on time scheduling
CN112131280A
Method and device for resource processing system, resource processing system and computer readable storage medium
CN115311092A