Financial real-time data processing method and system
By building an N-level computing server operation group and a centralized data management server in financial real-time data processing, we ensure the atomicity and consistency of data processing, and introduce risk control and strategy modules to solve the problem of data consistency and response in financial real-time data processing. The issue of speed enables efficient real-time financial data processing.
Patent Information
- Application Number
- CN202410790874.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-09-06
AI Technical Summary
In financial scenarios, the calculation and processing of real-time financial data is complex, making it difficult to ensure data consistency between computing servers, and the communication relationships are complex, resulting in delays in data transmission and making it difficult to share calculation results in real time.
By building a computing group composed of N-level computing servers, each level of computing server subscribes to source data for computing processing, and receives and distributes calculation result data through the data centralized management server to ensure the atomicity and consistency of data processing and introduce risk control. Server and policy modules for faster response times.
It achieves the reliability and consistency of real-time financial data processing, reduces the computing load of a single computing server, speeds up business response, and improves the utilization rate and data processing capabilities of the computing server.
Smart Images

Figure CN118612224A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of financial transaction systems, and in particular to a method and system for processing financial real-time data. Background Art
[0002] In the financial scenario, financial real-time data has the characteristics of real-time, diversity, complexity, etc., and also has great research and application value. For example, the corresponding calculation results can be obtained by performing calculation analysis based on the acquired real-time data, and the corresponding business processes can be driven in real time based on the calculation results.
[0003] In addition, the calculation and processing process of financial real-time data is relatively complex, and multiple computing servers are usually set up to reduce the computing load of a single computing server. During the data processing process, each computing server synchronously accesses the real-time database to obtain the same real-time data, and then jointly participates in the calculation of the real-time data. However, since each computing server is independent of each other, it is difficult to ensure the consistency of the real-time data obtained by each; and in order to cope with complex calculation processing, there will be multi-level calculation relationships between computing servers. The upper-level computing server needs to refer to the calculation results obtained by the lower-level computing server. The communication relationship between each computing server is complex, and data transmission is prone to delays, making it difficult to achieve real-time sharing of calculation results. Summary of the invention
[0004] To solve the above problems, the first aspect of the present application provides a method for processing financial real-time data, comprising the following steps:
[0005] S1. Building a computing group consisting of N-level computing servers, each of which subscribes to a source data and is set to perform computing processing based on the source data to obtain a corresponding computing result data;
[0006] S2 establishes a data centralized management server, the data centralized management server is connected to each level of the computing server and receives all the calculation result data;
[0007] S3. The primary computing server in the computing group receives the real-time financial data to be processed as source data, and the secondary and higher computing servers subscribe to the calculation result data of the upper computing server from the data center management server as source data;
[0008] S4. The computing group references the computing result data level by level and obtains the target computing result data through computing on the Nth level computing server.
[0009] The present application establishes a computing group to perform distributed computing on financial real-time data, thereby reducing the computing load of a single computing server and improving the reliability of data processing results. At the same time, a data concentration management server is established to receive the calculation result data of computing servers at all levels. The first-level computing server in the computing group receives the financial real-time data to be processed, converts it into calculation result data after computing processing and pushes it to the data concentration management server. The subsequent computing servers at all levels perform step-by-step computing by subscribing to relevant calculation result data from the data concentration management server, which can ensure that in a financial real-time data processing process, there is always only one data transmission path, effectively ensuring the atomicity and consistency of data processing.
[0010] In some embodiments, the data processing method further comprises the following steps:
[0011] S5. Establish a risk control server, and communicate with the risk control server and the data centralized management server;
[0012] S6. The risk control server subscribes to the target calculation result data from the data centralized management server, and corrects the target calculation result data according to a predetermined risk control standard, obtains the target correction result data and pushes it to the data centralized management server.
[0013] This application establishes a risk control server, which is used to correct the target calculation result data according to the predetermined risk control standard to obtain the target correction result data, enhance the operability of the target result data, and speed up the response speed to the real-time financial data.
[0014] In some embodiments, the data processing method further comprises the following steps:
[0015] S7. Establish a policy module, communicating with the policy module and the data centralized management server;
[0016] S8. The data center management server pushes the target correction result data to the strategy module;
[0017] S9. The strategy module responds to the target correction result data and starts the business execution process.
[0018] The data center management server of this application accurately and quickly pushes the target correction result data to the strategy module, so that the strategy module can start the relevant business execution process in real time, speed up the response speed of subsequent business to financial real-time data, and ensure the timeliness of business operations.
[0019] In some embodiments, building the operation group includes the following steps:
[0020] S11. Determine the target calculation result based on the real-time financial data to be processed;
[0021] S12. Designing N-level data calculation program for the target calculation results;
[0022] S13. Establish a computing server corresponding to each level of the data computing program.
[0023] This application first determines the target calculation results and designs N-level data calculation programs, and then sets up computing servers one by one to execute each level of data calculation programs. Each computing server runs relatively independently, has strong reliability, good scalability, and is convenient for function superposition and optimization.
[0024] In some embodiments, the computing groups are several groups, each of which corresponds to a target computing result, and the computing servers executing the same data computing program in each computing group are merged into one computing server, and all computing result data are shared between the computing groups through the data centralized management server. The present application reduces the redundancy of computing servers and computing result data, improves the utilization of computing servers, releases storage space of the data centralized management server, and shares resources between computing groups to reduce computing load by merging computing servers executing the same data computing program in each computing group.
[0025] In some implementations, the data centralized management server is a cluster server composed of several interconnected nodes, and data is shared between the nodes. This application uses a cluster server composed of several interconnected nodes as a data centralized management server, synchronizes the calculation result data of each computing server through node distribution, balances the load, and improves the data processing capacity; and the data sharing between nodes facilitates data scheduling and improves the response speed of the computing server subscribing to the upper-level calculation result data.
[0026] In some embodiments, the nodes collaborate based on the Raft protocol to receive and push the calculation result data, the target calculation result data, and the target correction result data. The nodes of the present application collaborate based on the Raft protocol to ensure that at any time point, only one node in the data concentration management server receives and pushes data, thereby ensuring the order and consistency of data transmission operations.
[0027] In some implementations, an Actor model is also built on the data concentration management server, and an Actor instance is created on each of the nodes. The Actor instances share data between the nodes through message queues. The data concentration management server in this application combines a cluster server with an Actor model. Actor instances share data across nodes through message queues. Multiple Actor instances can execute data transfer in parallel without interfering with each other, thereby improving the transmission efficiency of the calculation result data.
[0028] In some implementations, the data transmission between the data center management server and the computing server, the risk control server or the policy module includes the following steps:
[0029] S01. At the data sending end, the Protobuffer compiler is used to serialize the data to be transmitted, redefine the structure of the data to be transmitted and form a data packet;
[0030] S02. The data packet is transmitted to the data receiving end via the TCP protocol;
[0031] S03. The data receiving end uses a Protobuffer compiler to decode the received data packet and synchronize the data;
[0032] The data sending end is one of the data centralized management server, the computing server and the risk control server; the data receiving end is one of the data centralized management server, the computing server, the risk control server and the strategy module, and the data to be transmitted includes the calculation result data, the target calculation result data and the target correction result data.
[0033] This application uses the TCP protocol to carry out a communication channel to achieve real-time communication between the data center management server and the computing server. At the same time, the Protobuffer compiler serializes the data to be transmitted and compresses it into data packets with smaller data volume and faster parsing speed, which facilitates rapid transmission between servers and reduces network latency.
[0034] A second aspect of the present application provides a financial real-time data processing system for executing the above-mentioned financial real-time data processing method.
[0035] Based on the above data processing method, the data processing system in the present application has the characteristics of strong reliability of data processing results, good atomicity and consistency of data processing, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0037] Figure 1 It is a schematic diagram of a financial real-time data processing method provided by the present application;
[0038] Figure 2It is a flow chart of a financial real-time data processing method provided by this application;
[0039] Figure 3 It is a flow chart of a financial real-time data processing method provided by this application;
[0040] Figure 4 This is a flowchart of building a calculation group in a financial real-time data processing method provided by this application;
[0041] Figure 5 It is a flow chart of the transmission of data to be transmitted between a data sending end and a data receiving end in a financial real-time data processing method provided by the present application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] It should be noted that the terms "including" and "having" and any variations of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or inherent to these processes or methods.
[0044] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The word "exemplary" used herein means "used as an example, embodiment or illustrative". Any embodiment described herein as "exemplary" is not necessarily to be interpreted as being superior or better than other embodiments.
[0045] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the specific embodiments below. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods and means well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present disclosure.
[0046] See also Figure 1 The first aspect of the present application provides a method for processing financial real-time data, comprising the following steps:
[0047] S1. Building a computing group consisting of N-level computing servers, each of which subscribes to a source data and is set to perform computing processing based on the source data to obtain a corresponding computing result data;
[0048] S2 establishes a data centralized management server, the data centralized management server is connected to each level of the computing server and receives all the calculation result data;
[0049] S3. The primary computing server in the computing group receives the real-time financial data to be processed as source data, and the secondary and higher computing servers subscribe to the calculation result data of the upper computing server from the data center management server as source data;
[0050] S4. The computing group references the computing result data level by level and obtains the target computing result data through computing on the Nth level computing server.
[0051] The present application establishes a computing group to perform distributed computing on financial real-time data. The computing group may include N levels of computing servers. It can be understood that N is an integer greater than or equal to 2. Each computing server operates relatively independently and converts the subscribed source data into computing result data according to the built-in computing program. Among them, the first-level computing server subscribes to the financial real-time data to be processed, and the second-level and above computing servers subscribe to the calculation result data of the previous-level computing server step by step and generate a new level of calculation result data accordingly, until the target calculation result data is calculated by the highest-level computing server. Compared with a single computing server directly running all the computing programs, distributed computing has a small computing load on each computing server, which effectively improves the reliability of the data processing results.
[0052] The present application also establishes a data concentration management server for receiving the calculation result data of the calculation servers at all levels. The second-level and above calculation servers subscribe to the previous level calculation result data from the data concentration management server. The data concentration management server only receives and distributes each data, which can ensure that in a financial real-time data processing process, there is always only one data transmission path, effectively ensuring the atomicity and consistency of data processing.
[0053] In some embodiments, building the operation group includes the following steps:
[0054] S11. Determine the target calculation result based on the real-time financial data to be processed;
[0055] S12. Designing N-level data calculation program for the target calculation results;
[0056] S13. Establish a computing server corresponding to each level of the data computing program.
[0057] The operation groups are several groups, each of which corresponds to a target calculation result. The calculation servers executing the same data calculation program in each operation group are merged into one calculation server, and all calculation result data are shared between the operation groups through the data centralized management server.
[0058] In the specific implementation process, the target calculation result can be a scheduled statistical task set in the financial system or a real-time request sent by the terminal, and it is understandable that there may be more than one target calculation result corresponding to a piece of financial real-time data. Therefore, multiple target calculation results of the same financial real-time data to be processed need to be designed for calculation programs separately, and the overlapping parts between multiple calculation programs should be deduplicated as much as possible. In this context, when two or two computing groups have computing servers that execute the same data calculation program, they need to be merged into one computing server. Specifically, one of the computing servers that execute the same data calculation program is retained and its corresponding calculation result data is shared with the next-level computing server of all computing servers that execute the same data calculation program, reducing the redundancy of computing servers and calculation result data, improving the utilization rate of computing servers and releasing the storage space of the data centralized management server, sharing resources between computing groups, and reducing the computing load.
[0059] In some embodiments, see Figure 2 , the data processing method further comprises the following steps:
[0060] S5. Establish a risk control server, and communicate with the risk control server and the data centralized management server;
[0061] S6. The risk control server subscribes to the target calculation result data from the data centralized management server, and corrects the target calculation result data according to a predetermined risk control standard, obtains the target correction result data and pushes it to the data centralized management server.
[0062] This application establishes a risk control server, which is used to correct the target calculation result data according to the predetermined risk control standard to obtain the target correction result data, enhance the operability of the target result data, and speed up the response speed to the real-time financial data. In the specific implementation process, the target calculation result may be used to drive the specific business execution. Taking the execution of position transactions as an example, the risk control server uses the contract position information as the risk control standard to perform position risk control on the target calculation result. When the order volume of the target calculation result will cause the contract to exceed the maximum position in the contract position information, the risk control server will adjust the order volume in the target calculation result so that the order volume in the target correction calculation result does not exceed the maximum position in the contract position information. While improving transaction efficiency, it effectively avoids touching transaction restrictions and ensures the validity of transactions.
[0063] In some embodiments, see Figure 3 , the data processing method further comprises the following steps:
[0064] S7. Establish a policy module, communicating with the policy module and the data centralized management server;
[0065] S8. The data center management server pushes the target correction result data to the strategy module;
[0066] S9. The strategy module responds to the target correction result data and starts the business execution process.
[0067] The data center management server of this application accurately and quickly pushes the target correction result data to the strategy module, so that the strategy module can start the relevant business execution process in real time, speed up the response speed of subsequent business to financial real-time data, and ensure the timeliness of business operations.
[0068] In some embodiments, the data concentration management server is a cluster server composed of several interconnected nodes, and the nodes cooperate based on the Raft protocol to receive and push the calculation result data, the target calculation result data, and the target correction result data. This application uses a cluster server composed of several interconnected nodes as a data concentration management server, and synchronizes the calculation result data of each calculation server through node distribution, balances the load, and improves the data processing capacity; the nodes cooperate based on the Raft protocol to ensure that at any time point, there is only one node in the data concentration management server to receive and push data, and ensure the order and consistency of data transmission operations.
[0069] In some implementations, an Actor model is also built on the data concentration management server, and an Actor instance is created on each of the nodes. The Actor instances share data between the nodes through message queues. The data concentration management server in this application combines a cluster server with an Actor model. Actor instances share data across nodes through message queues. Multiple Actor instances can execute data transfer in parallel without interfering with each other, thereby improving the transmission efficiency of the calculation result data.
[0070] In some embodiments, see Figure 5 The data transmission between the data center management server and the computing server, the risk control server or the policy module includes the following steps:
[0071] S01. At the data sending end, the Protobuffer compiler is used to serialize the data to be transmitted, redefine the structure of the data to be transmitted and form a data packet;
[0072] S02. The data packet is transmitted to the data receiving end via the TCP protocol;
[0073] S03. The data receiving end uses a Protobuffer compiler to decode the received data packet and synchronize the data;
[0074] The data sending end is one of the data centralized management server, the computing server and the risk control server; the data receiving end is one of the data centralized management server, the computing server, the risk control server and the strategy module, and the data to be transmitted includes the calculation result data, the target calculation result data and the target correction result data.
[0075] This application uses the TCP protocol to carry out a communication channel to achieve real-time communication between the data center management server and the computing server. At the same time, the Protobuffer compiler serializes the data to be transmitted and compresses it into data packets with smaller data volume and faster parsing speed, which facilitates rapid transmission between servers and reduces network latency.
[0076] The second aspect of the present application provides a financial real-time data processing system for executing the above data processing method. Based on the above data processing method, the financial real-time data processing system in the present application has the characteristics of strong reliability of data processing results, good atomicity and consistency of data processing, etc.
[0077] In the description of this specification, the description with reference to the terms "some embodiments", "for example", or "example" means that the specific features or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present embodiment. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0078] Although the present embodiment has been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and alterations may be made without departing from the principles and spirit of the present embodiment, the scope of which is defined by the claims and their equivalents.
Claims
1. A method for processing financial real-time data, It is characterized in that The following steps are involved: S1. Building a computing group consisting of N-level computing servers, each of which subscribes to a source data and is set to perform computing processing based on the source data to obtain a corresponding computing result data; S2 establishes a data centralized management server, the data centralized management server communicates with each level of the computing server and receives all the calculation result data; S3. The primary computing server in the computing group receives the real-time financial data to be processed as source data, and the secondary and higher computing servers subscribe to the calculation result data of the upper computing server from the data center management server as source data; S4. The computing group references the computing result data level by level and the Nth level computing server computes and obtains the target computing result data.
2. The financial real-time data processing method according to claim 1, It is characterized in that The data processing method further comprises the following steps: S5. Establish a risk control server, and communicate with the risk control server and the data centralized management server; S6. The risk control server subscribes to the target calculation result data from the data centralized management server, and corrects the target calculation result data according to a predetermined risk control standard, obtains the target correction result data and pushes it to the data centralized management server.
3. The financial real-time data processing method according to claim 2, It is characterized in that The data processing method further comprises the following steps: S7. Establish a policy module, communicating with the policy module and the data centralized management server; S8. The data center management server pushes the target correction result data to the strategy module; S9. The strategy module responds to the target correction result data and starts the business execution process.
4. The financial real-time data processing method according to any one of claims 1 to 3, It is characterized in that Building the operation group includes the following steps: S11. Determine the target calculation result based on the real-time financial data to be processed; S12. Designing N-level data calculation program for the target calculation results; S13. Establish a computing server corresponding to each level of the data computing program.
5. The financial real-time data processing method according to claim 4, It is characterized in that The operation groups are several groups, each of which corresponds to a target calculation result. The calculation servers executing the same data calculation program in each operation group are merged into one calculation server, and all calculation result data are shared between the operation groups through the data centralized management server.
6. The financial real-time data processing method according to claim 3, It is characterized in that The data concentration management server is a cluster server composed of a number of interconnected nodes, and data is shared between the nodes.
7. The financial real-time data processing method according to claim 6, It is characterized in that The nodes cooperate with each other based on the Raft protocol to receive and push the calculation result data, the target calculation result data and the target correction result data.
8. The financial real-time data processing method according to claim 6, It is characterized in that An Actor model is also built on the data concentration management server, and an Actor instance is created on each of the nodes. The Actor instances share data between the nodes through message queues.
9. The financial real-time data processing method according to claim 3, It is characterized in that The data transmission between the data concentration management server and the computing server, the risk control server or the policy module includes the following steps: S01. At the data sending end, the Protobuffer compiler is used to serialize the data to be transmitted, redefine the structure of the data to be transmitted and form a data packet; S02. The data packet is transmitted to the data receiving end via the TCP protocol; S03. The data receiving end uses a Protobuffer compiler to decode the received data packet and synchronize the data; The data sending end is one of the data centralized management server, the computing server and the risk control server; the data receiving end is one of the data centralized management server, the computing server, the risk control server and the strategy module, and the data to be transmitted includes the calculation result data, the target calculation result data and the target correction result data.
10. A financial real-time data processing system, It is characterized in that The system is used to execute the financial real-time data processing method according to any one of claims 1-9.
