Business transaction method, distributed transaction system, and program product
By coordinating the data adaptation components and transaction engine instances, the problem of high resource consumption in distributed transaction frameworks is solved, enabling parallel processing and resource sharing of multiple business types and reducing hardware resource consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-04-14
AI Technical Summary
Existing distributed transaction frameworks consume high resources when handling various business types, requiring the simultaneous deployment of multiple independent systems, resulting in redundant occupation of hardware resources.
The raw data is processed in a unified manner by data adaptation components, and the transaction engine instance operates based on the identifier of the order request, so as to realize parallel processing and resource sharing of multiple business types in the same distributed system environment, thereby reducing the number of system deployments.
It enables parallel processing and resource sharing of multiple business types in the same distributed system environment, reducing hardware resource consumption and the number of system deployments.
Smart Images

Figure CN121210154B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to business transaction methods, distributed transaction systems, and program products. Background Technology
[0002] In today's digital age, distributed systems are widely used in various fields, especially in the financial securities trading field, where they play a crucial role. A distributed system refers to a software system in which software programs deployed on multiple hosts work together to achieve specific functions. In securities trading scenarios, different trading businesses, such as spot trading and margin trading, need to be carried out on different trading engine instances.
[0003] The existing trading framework can only distribute one set of account data at a time, and can only load one set of data at a time when the trading engine starts. This means that if a client wants to conduct spot and margin trading simultaneously, two independent systems must be deployed. In a real trading environment, to achieve local order placement and reduce trading latency, each system needs to be deployed on two different stock exchange nodes in different cities. This deployment method leads to redundant resource consumption and high resource consumption of the trading framework.
[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a business transaction method, a distributed transaction system, and a program product, which aims to solve the technical problem of high resource consumption in the current distributed transaction framework.
[0006] To achieve the above objectives, this application proposes a business transaction method applied to a distributed transaction system, the distributed transaction system including a data adaptation component and a transaction engine instance, the business transaction method comprising:
[0007] The data adaptation component processes the raw data to obtain standardized data, and stores the standardized data into their respective business databases based on the data type of each standardized data. The raw data includes spot business data from the spot trading system, business data from the margin trading system, and exchange parameter files.
[0008] The data adaptation component retrieves stored data from each of the business databases, generates business files based on the stored data, and sends them to the transaction engine instance.
[0009] The transaction engine instance receives order requests sent by clients, performs business transactions based on the order requests and the business files corresponding to the request business type of the order requests to obtain transaction flow data, and sends the transaction flow data to the data adaptation component.
[0010] The data adaptation component generates a clearing file based on the transaction flow data and imports the clearing file into the clearing center corresponding to the requested business type.
[0011] In one embodiment, the data adaptation component includes a data cleaning module and a dynamic routing module;
[0012] The step of processing business data from various business account systems using the data adaptation component to obtain standardized data, and storing the standardized data into their respective business databases according to the data type of each standardized data, includes:
[0013] The data cleaning module converts the business data of each business account system into standardized data in a preset format.
[0014] The dynamic routing module stores the standardized data into their respective business databases based on the data type of each standardized data item.
[0015] In one embodiment, the step of receiving an order request sent by a client through a transaction engine instance, and obtaining transaction flow data by performing a business transaction based on the order request and a business file corresponding to the request business type of the order request, includes:
[0016] The transaction engine instance receives order requests sent by clients, subscribes to corresponding message topics based on the business type identifier carried in the order request, and obtains updated business files based on the message topics.
[0017] The transaction engine instance performs compliance verification on the order request based on the exchange parameter file in the updated business file. After the verification is successful, the business type identifier is added to the header of the order request to obtain the target request. The target request is then submitted to the exchange gateway, whereby the exchange gateway submits the target request to the corresponding exchange to conduct the transaction based on the requested business type, generating transaction flow data.
[0018] In one embodiment, the data adaptation component further includes a file generation module and a distribution engine;
[0019] The step of generating a clearing file based on the transaction flow data using the data adaptation component and importing the clearing file into the clearing center corresponding to the requested business type includes:
[0020] The file generation module extracts the field content of the preset settlement field from the transaction flow data, and generates a settlement file based on the field content and the requested business type;
[0021] The distribution engine sends the liquidation file to the liquidation center corresponding to the requested business type, so that the liquidation center can perform the liquidation operation corresponding to the requested business type.
[0022] In one embodiment, the distributed transaction system further includes an operation and maintenance support system, which includes a data acquisition module and an alarm engine;
[0023] The business transaction methods also include:
[0024] The data acquisition module collects log data from the business database and the transaction engine instance.
[0025] The alarm engine performs anomaly detection based on the log data and preset alarm rules, and pushes the anomaly detection results to the business management department.
[0026] In one embodiment, the distributed transaction system further includes a business expansion component;
[0027] The business transaction methods also include:
[0028] When a new service type is detected, the data conversion rule corresponding to the new service type is obtained through the service extension component, and the data conversion rule is sent to the data adaptation component.
[0029] The business extension component adds a data table corresponding to the new business type to the business database and adds a message topic corresponding to the new business type to the transaction engine instance.
[0030] In addition, to achieve the above objectives, this application also proposes a distributed trading system, which includes a data adaptation component and a trading engine instance;
[0031] The data adaptation component is used to process the raw data to obtain standardized data, and to store the standardized data into their respective business databases based on the data type of each standardized data; wherein, the raw data includes spot business data from the spot business system, business data from the margin trading business system, and exchange parameter files;
[0032] The data adaptation component is also used to obtain stored data from each of the business databases, generate business files based on the stored data, and send them to the transaction engine instance.
[0033] The transaction engine instance is used to receive order requests sent by the client, and to perform business transactions based on the order requests and the business files corresponding to the request business type of the order requests to obtain transaction flow data, and to send the transaction flow data to the data adaptation component;
[0034] The data adaptation component is also used to generate a clearing file based on the transaction flow data and import the clearing file into the clearing center corresponding to the requested business type.
[0035] In one embodiment, the distributed transaction system further includes an operation and maintenance support system, which includes a data acquisition module and an alarm engine;
[0036] The data acquisition module is used to collect log data from the business database and the transaction engine instance;
[0037] The alarm engine is used to perform anomaly detection based on the log data and preset alarm rules, and push the anomaly detection results to the business management department.
[0038] In one embodiment, the distributed transaction system further includes a business expansion component;
[0039] The business extension component is used to obtain the data conversion rule corresponding to the new business type when a new business type is detected, and send the data conversion rule to the data adaptation component;
[0040] The business extension component is used to add a data table corresponding to the new business type to the business database, and to add a message topic corresponding to the new business type to the transaction engine instance.
[0041] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the business transaction method described above.
[0042] In this application, the data adaptation component processes the raw data to obtain standardized data, and stores the standardized data in their respective business databases based on the data types of each standardized data. The raw data includes spot business data from the spot trading system, business data from the margin trading system, and exchange parameter files. The data adaptation component retrieves stored data from each of the business databases, generates business files based on the stored data, and sends them to the trading engine instance. The trading engine instance receives order requests from clients, performs business transactions based on the order requests and the business files corresponding to the request business type, obtains transaction flow data, and sends the transaction flow data to the data adaptation component. The data adaptation component generates clearing files based on the transaction flow data and imports the clearing files into the clearing center corresponding to the request business type.
[0043] The distributed trading system architecture proposed in this application unifies data processing through data adaptation components and allows trading engine instances to operate based on order request identifiers. This enables the trading engine instances to accurately identify various business types, such as spot trading and margin trading, throughout the entire trading cycle and achieve intelligent routing. This allows for parallel processing and resource sharing of multiple business types within the same distributed system environment, eliminating the need to deploy multiple independent systems for different businesses and exchanges. Consequently, the number of system deployments is reduced, and hardware resource consumption is lowered. Attached Figure Description
[0044] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0045] To more clearly illustrate the technical solutions in the embodiments of 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, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a flowchart illustrating the first embodiment of the business transaction method in this application.
[0047] Figure 2 This is a flowchart illustrating the second embodiment of the business transaction method in this application.
[0048] Figure 3 This is a schematic diagram of the interaction flow of the business transaction method provided in Embodiment 2 of this application;
[0049] Figure 4This is a schematic diagram illustrating a business transaction method as described in an embodiment of this application.
[0050] Figure 5 This is a schematic diagram of the structure of a distributed transaction system according to an embodiment of this application.
[0051] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0052] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0053] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0054] The existing trading framework can only distribute one set of account data at a time, and can only load one set of data at a time when the trading engine starts. This means that if a client wants to conduct spot and margin trading simultaneously, two independent systems must be deployed. In a real trading environment, to achieve local order placement and reduce trading latency, each system needs to be deployed on two different stock exchange nodes in different cities. This deployment method leads to redundant resource consumption and high resource consumption of the trading framework.
[0055] This application proposes a business transaction method applied to a distributed trading system. The distributed trading system includes a data adaptation component and a trading engine instance. The business transaction method includes: processing raw data through the data adaptation component to obtain standardized data, and storing the standardized data in their respective corresponding business databases based on the data type of each standardized data; wherein the raw data includes spot business data from a spot trading system, business data from a margin trading system, and exchange parameter files; obtaining stored data from each of the business databases through the data adaptation component, generating business files based on the stored data, and sending them to the trading engine instance; receiving order requests from clients through the trading engine instance, and performing business transactions based on the order requests and the business files corresponding to the request business type to obtain transaction flow data, and sending the transaction flow data to the data adaptation component; generating clearing files based on the transaction flow data through the data adaptation component, and importing the clearing files into the clearing center corresponding to the request business type.
[0056] The distributed trading system architecture proposed in this application unifies data processing through data adaptation components and allows trading engine instances to operate based on order request identifiers. This enables the trading engine instances to accurately identify various business types, such as spot trading and margin trading, throughout the entire trading cycle and achieve intelligent routing. This allows for parallel processing and resource sharing of multiple business types within the same distributed system environment, eliminating the need to deploy multiple independent systems for different businesses and exchanges. Consequently, the number of system deployments is reduced, and hardware resource consumption is lowered.
[0057] Based on this, this application provides a business transaction method, which is applied to a distributed transaction system. The distributed transaction system includes a data adaptation component and a transaction engine instance. (Refer to...) Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the business transaction method of this application.
[0058] In this embodiment, the business transaction method includes steps S10 to S40:
[0059] Step S10: The original data is processed by the data adaptation component to obtain standardized data, and the standardized data is stored in its respective business database based on the data type of each standardized data; wherein, the original data includes spot business data of the spot business system, business data of the margin trading business system, and exchange parameter files;
[0060] The data adaptation component is responsible for data processing and coordination in a distributed trading system. Its function is to process data from different sources and in different formats into standardized data that the system can use uniformly. The business database is used to store data for specific business types; different businesses correspond to different databases, such as a spot trading database and a margin trading database. Raw data is unprocessed data obtained from the spot trading system, the margin trading system, and exchange parameter files; these data may have inconsistent formats and standards. Standardized data is data that has been processed by the data adaptation component to conform to the system's preset formats and standards, facilitating subsequent storage and use. Data types are identifiers used to distinguish different standardized data characteristics and can be determined based on the business type and data source corresponding to the raw data.
[0061] In this embodiment, the data adaptation component obtains business data from the spot trading system and the margin trading system, and reads the exchange parameter file from a designated location to obtain raw data. The raw data may have inconsistent formats and standards, requiring data processing to convert it into a unified format for subsequent use. The data adaptation component performs cleaning and transformation operations on the raw data to obtain standardized data. The specific data processing procedure is not limited here and can be set according to actual needs. The data adaptation component analyzes the business type of the standardized data, determines its business type, and stores the standardized data into the corresponding business database based on the business type.
[0062] Understandably, by processing raw data from different sources and in different formats into standardized data, and then classifying and storing it in the corresponding business database according to business type, a standardized and orderly data foundation can be provided for subsequent business operations.
[0063] Step S20: Obtain stored data from each of the business databases through the data adaptation component, generate a business file based on the stored data, and send it to the transaction engine instance;
[0064] The transaction engine instance is a program instance responsible for processing client order requests and conducting business transactions based on business files. In this embodiment, the data adaptation component reads stored data from various business databases according to preset query conditions, verifies the completeness and accuracy of the acquired data to ensure its usability, and then formats the acquired data according to a preset business file format to generate a business file. The business file is a file containing business-related information generated based on the stored data in the business database, and its format may be CSV, XML, JSON, etc. The data adaptation component sends the generated business file to the transaction engine instance.
[0065] Step S30: Receive the order request sent by the client through the transaction engine instance, and perform a business transaction based on the order request and the business file corresponding to the request business type of the order request to obtain transaction flow data, and send the transaction flow data to the data adaptation component;
[0066] An order request is a transaction request sent by the client to the transaction engine instance, containing transaction-related information such as business type, transaction amount, and transaction object. In this embodiment, the transaction engine instance receives the order request from the client's network request, locates the corresponding business file based on the business type in the order request, and generates transaction log data according to the rules in the order request and the business file. The transaction log data is data generated during the business transaction process that records detailed transaction information, such as transaction time, transaction amount, and transaction status. The transaction log data is encapsulated into a specific format and sent to the data adaptation component.
[0067] Step S40: Generate a clearing file based on the transaction flow data using the data adaptation component, and import the clearing file into the clearing center corresponding to the requested business type.
[0068] The data adaptation component extracts preset clearing fields from transaction flow data and generates clearing files according to the clearing file format. The clearing file is generated based on the transaction flow data and contains the information required for transaction clearing. It is used for clearing operations in the clearing center. The data adaptation component verifies the completeness and accuracy of the generated clearing file and imports it into the clearing center corresponding to the business type. The clearing center is responsible for clearing business transactions and calculating the profit and loss, transaction fees, etc., based on the clearing file.
[0069] It is understood that this embodiment unifies data processing through data adaptation components and allows the trading engine instance to operate based on the identifier of order requests. This enables the trading engine instance to accurately identify various business types such as spot trading and margin trading throughout the entire trading cycle and to achieve intelligent routing. This enables parallel processing and resource sharing of multiple business types in the same distributed system environment, eliminating the need to deploy multiple independent systems for different businesses and exchanges. This reduces the number of system deployments and lowers the consumption of hardware resources.
[0070] In one feasible embodiment, the data adaptation component includes a data cleaning module and a dynamic routing module; step S10, which involves processing the business data of each business account system using the data adaptation component to obtain standardized data, and storing the standardized data into their respective business databases according to the data type of each standardized data, includes:
[0071] Step S101: The data cleaning module converts the business data of each business account system into a preset format to obtain standardized data.
[0072] The data cleaning module is a submodule of the data adaptation component. It is primarily used to clean and transform business data, removing noisy data and standardizing data formats. In this embodiment, the data cleaning module reads business data from various business account systems, then performs data processing such as removing duplicate data, handling missing values, and correcting erroneous data. It then transforms the processed data according to a preset format, such as date format conversion and data type conversion. The preset format is a predefined data format, such as specific data types, field order, and encoding methods, used to standardize data representation. The specific format can be set according to actual needs and is not limited here.
[0073] For example, the initial data structure is an array containing three fields: "SendorderBJSE", "SendorderSHSE", and "SendorderSZSE", with each field set to "0". These fields might be used to record information such as the status or count of orders sent to stock exchanges A (BJSE), B (SHSE), and C (SZSE). For instance, it might indicate that no orders have been sent to these exchanges yet, hence the value of "0". In actual financial trading, different business scenarios or system modules have different requirements for data organization and representation. For example, when processing spot trading (cash-related business) and margin trading (margin-related business), it may be necessary to more finely divide and manage order sending status. The original simple data structure cannot meet these diverse business needs, so it needs to be transformed. During the conversion process, two objects, "cash" and "margin," were introduced. These objects can be seen as abstract classifications of business types. The "cash" object is used specifically to handle business logic related to spot trading, while the "margin" object focuses on business scenarios involving margin trading, such as securities lending. The original three fields, "SendorderBJSE," "SendorderSHSE," and "SendorderSZSE," were copied to the two new objects, "cash" and "margin," respectively. Under each new object, the order sending status to various exchanges is recorded. The values of these three fields under each new object are also set to "0," indicating that in the initial state after the conversion, neither spot trading nor margin trading has sent orders to the corresponding exchanges. This conversion separates the order sending information for spot trading and margin trading. Different business modules can directly access the fields under the corresponding object without being interfered with by data from other business types. For example, the module responsible for spot trading can focus on the fields under the "cash" object, while the margin trading module focuses on the fields under the "margin" object, improving the efficiency and accuracy of business processing.
[0074] Step S102: The dynamic routing module stores the standardized data into their respective business databases according to the data type of each standardized data.
[0075] The dynamic routing module dynamically routes standardized data to the corresponding business database based on the data's business type. Specifically, the module analyzes the business type identifiers within the standardized data to determine its business type, locates the corresponding business database based on that type, and stores the standardized data in the appropriate database. In essence, the dynamic routing module accurately stores standardized data in the appropriate business database according to its business type, achieving categorized storage and management of the data.
[0076] In one feasible embodiment, step S30, which involves receiving an order request sent by a client through a transaction engine instance and performing a business transaction based on the order request and a business file corresponding to the request business type of the order request to obtain transaction flow data, includes:
[0077] Step S301: Receive an order request sent by the client through the transaction engine instance, subscribe to the corresponding message topic based on the business type identifier carried in the order request, and obtain the updated business file based on the message topic;
[0078] A message topic is an identifier used in the message middleware to distinguish different message types. The transaction engine instance can subscribe to the corresponding message topic based on the business type identifier to obtain relevant business file update information. In this embodiment, the transaction engine instance receives the client's order request, parses the business type within the order request, establishes a connection with the message middleware to subscribe to the corresponding message topic based on the business type, obtains updated business file information from the subscribed message topic, and downloads the updated business file based on the information. It can be understood that by subscribing to message topics based on the business type in the client's order request and obtaining updated business files, the transaction engine instance ensures that the business files used are up-to-date, improving transaction accuracy.
[0079] Step S302: The transaction engine instance performs compliance verification on the order request based on the exchange parameter file in the updated business file. After the verification is passed, the business type identifier is added to the header of the order request to obtain the target request. The target request is then submitted to the exchange gateway. The exchange gateway submits the target request to the corresponding exchange to conduct the transaction based on the requested business type and generate transaction flow data.
[0080] The exchange parameter file, a part of the business file, contains parameters such as the exchange's trading rules, fee rates, and trading hours, used for compliance verification of order requests. In this embodiment, the trading engine instance uses the updated exchange parameter file from the business file to perform compliance verification on the order request. For example, the compliance verification process may involve checking whether the order request meets trading requirements based on the rules in the exchange parameter file, such as whether the transaction amount is within the allowed range and whether the trading object is legal. If the verification passes, the business type identifier is added to the order request header to obtain the target request. The business type identifier identifies the business type of the order, facilitating processing by the exchange gateway and the exchange. The trading engine instance sends the target request to the exchange gateway, which submits the target request to the corresponding exchange. The exchange then processes the transaction based on the business type identifier, generating transaction log data.
[0081] It is understood that this embodiment ensures the legality and accuracy of transactions by performing compliance verification on order requests, ensuring that transactions comply with exchange rules, adding the business type identifier, and submitting the transaction to the exchange to generate transaction flow data.
[0082] In one feasible embodiment, the data adaptation component further includes a file generation module and a distribution engine; step S40, which involves generating a clearing file based on the transaction flow data using the data adaptation component and importing the clearing file into the clearing center corresponding to the requested business type, includes:
[0083] Step S401: Extract the field content of the preset clearing field from the transaction flow data through the file generation module, and generate a clearing file based on the field content and the request business type;
[0084] The file generation module is a submodule of the data adaptation component, responsible for generating settlement files based on transaction flow data. Predefined settlement fields are predefined fields used for settlement, such as transaction amount, handling fees, and taxes. These fields are extracted from the transaction flow data to generate the settlement files; specific restrictions are not specified here.
[0085] In this embodiment, the document generation module extracts the content of preset clearing fields from the transaction flow data, summarizes and calculates the extracted field content, such as calculating the total transaction amount and total handling fees, and then generates a clearing document from the summarized data according to the business type and the preset clearing document format. It is understood that generating clearing documents according to the preset format facilitates unified processing by the clearing center, and the automated document generation process improves the efficiency of clearing document generation and reduces errors from manual operation.
[0086] Step S402: The clearing file is sent to the clearing center corresponding to the requested service type through the distribution engine, so that the clearing center can perform the clearing operation corresponding to the requested service type.
[0087] The distribution engine is a submodule of the data adaptation component, responsible for sending settlement files to the corresponding clearing center. In this embodiment, the distribution engine sends the settlement files to the clearing center corresponding to the business type via a network protocol. After receiving the settlement files, the clearing center performs settlement operations according to the clearing rules corresponding to the business type, such as calculating profits and losses and deducting handling fees, to obtain the settlement result.
[0088] Understandably, the distribution engine accurately sends the clearing documents to the corresponding clearing center, which then performs the clearing operation, completing the financial settlement process for the business transaction, ensuring the timeliness of the clearing operation, and improving the efficiency of fund turnover.
[0089] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description and will not be repeated hereafter. In addition, the distributed transaction system further includes an operation and maintenance support system, which includes a data acquisition module and an alarm engine. Please refer to... Figure 2 Before step S10, the business transaction method further includes steps S50-S60:
[0090] Step S50: Collect log data from the business database and the transaction engine instance through the data acquisition module;
[0091] The data aggregation module is a submodule within the operations and maintenance support system. It is responsible for collecting log data from the business database and transaction engine instance, and centrally managing the scattered log data. Log data consists of records generated by the business database and transaction engine instance during operation, including system operations, error messages, transaction records, etc., used for system monitoring and troubleshooting.
[0092] In this embodiment, the data acquisition module presets the log types to be collected, collection frequency, storage location, etc. Then, the data acquisition module uses a log collection tool to collect log data from the business database and transaction engine instance. It can be understood that the data acquisition module collects log data from the business database and transaction engine instance, centrally collects and manages the scattered log data, which facilitates comprehensive monitoring and analysis of the system and helps to locate and solve system problems in the future.
[0093] Step S60: The alarm engine performs anomaly detection based on the log data and preset alarm rules, and pushes the anomaly detection results to the business management department.
[0094] The alarm engine is a submodule of the operations and maintenance support system. It is responsible for detecting anomalies based on log data and preset alarm rules, and issuing alarm information in a timely manner. Preset alarm rules are predefined rules used to determine whether the system has anomalies, such as the appearance of specific error messages in the logs or key indicators exceeding thresholds. The specific rules can be set according to actual needs.
[0095] In this embodiment, the alarm engine loads preset alarm rules, performs real-time analysis on the collected log data, determines whether there are any abnormalities based on the alarm rules, obtains anomaly detection results, and pushes the anomaly detection results to the business management department corresponding to the business type of the log data. Furthermore, if an anomaly is detected, the alarm engine encapsulates the anomaly detection results into alarm information and pushes it to the business management department so that the business management department can promptly discover potential problems in the system, reduce the operational risks of the system, and ensure the stable operation of the business.
[0096] In one feasible embodiment, the distributed transaction system further includes a business extension component; the business transaction method further includes:
[0097] Step S70: When a new service type is detected, the data conversion rule corresponding to the new service type is obtained through the service extension component, and the data conversion rule is sent to the data adaptation component.
[0098] The business extension component is a component in the distributed transaction system used to process new business types. It is responsible for obtaining relevant rules and configuration information for new business types. Data transformation rules are used to convert the raw data of new business types into standardized data, including data format conversion and field mapping. In this embodiment, the business extension component continuously monitors changes in business types in the system. When a new business type is detected, it interacts with the business rule management system or relevant departments to obtain the data transformation rules corresponding to the new business type. The obtained data transformation rules are then sent to the data adaptation component via a network interface, enabling the data adaptation component to process the data of the new business type.
[0099] Understandably, business extension components can quickly adapt to new business types without requiring large-scale modifications to the existing system, thus improving the system's flexibility and scalability, reducing the workload of developing dedicated data processing modules for new business types, and lowering the system's development costs.
[0100] Step S80: Add a data table corresponding to the new business type to the business database through the business extension component, and add a message topic corresponding to the new business type to the transaction engine instance.
[0101] The business extension component creates corresponding new data tables in the business database based on the requirements of the new business types. It designs the table structure, including field names, data types, and constraints, and then executes the creation operation. Within the transaction engine instance, the business extension component interacts with the message middleware to add message topics corresponding to the new business types and configure relevant parameters such as message storage strategies and subscription rules. Essentially, the business extension component updates the configuration in both the business database and the transaction engine instance, enabling the system to support the storage and processing of new business types. This achieves smooth support for new business types and minimizes the impact on existing business operations.
[0102] In this embodiment, when a new business type is detected, the business extension component can obtain the corresponding data conversion rules and send them to the data adaptation component. It can also add a data table corresponding to the new business type to the business database and add a corresponding message topic to the transaction engine instance. This allows the new business type to work collaboratively with existing business types in the same distributed transaction system, reducing the time and cost of developing and deploying new systems and improving the flexibility and adaptability of the system.
[0103] For example, to help understand the implementation flow of the business transaction method obtained by combining this embodiment with the above embodiment one, please refer to... Figure 3 , Figure 3 A schematic diagram of the interaction process of a business transaction method is provided, specifically:
[0104] The client executes customer data upload, loading the data into the trading node (that is, processing the original data through the data adaptation component to obtain standardized data, and storing the standardized data into their respective business databases based on the data type of each standardized data; wherein, the original data includes spot business data from the spot business system, business data from the margin trading business system, and exchange parameter files; the data adaptation component obtains stored data from each of the business databases, generates business files based on the stored data, and distributes them to the trading engine instance). Specifically, please refer to... Figure 4 The illustrated data center scenario shows that transaction nodes may be deployed on core servers or non-core component servers in a data center located in City B or City D. For example, customer data may be loaded onto a core server in the City B data center or a server in the City D data center. These servers provide the physical location for the initial storage and processing of the data. Figure 4As shown, a data center in City B can be configured with core servers (primary and hot standby) and non-core component servers (primary and standby). When a server fails, the hot standby or backup server can take over the tasks in a timely manner, ensuring that the data processing flow is not interrupted. For example, if the core server (primary) of the data center in City B fails, its core server (hot standby) can immediately take over the data loading and related processing tasks, ensuring that the client's data processing requests can continue to be responded to, maintaining the normal operation of the entire system's data processing flow. The surrounding supporting systems include the City B order gateway, which is responsible for the City B trading order related operations, with primary and cold standby ensuring reliability; the strategy order system, used to formulate and execute trading strategy orders; and the market data system, including the quantitative strategy system and City B L1 market data, providing market data and supporting quantitative trading strategies. Similarly, a data center in City D is configured with core servers (primary and hot standby) and non-core component servers (primary and standby), and the surrounding supporting systems include the City C order gateway, the strategy order system, and the market data system.
[0105] The operations and maintenance support system queries processes and node configurations to obtain the nodes associated with the processes and the servers deployed under those nodes. Different servers within the data center, such as the core server (hot standby) in a data center in City B and the non-core component server (primary) in a data center in City D, have their own functions and configuration information. The operations and maintenance support system needs to obtain relevant configurations from these physically deployed servers to determine the specific execution path of the data processing process and the server instances involved. For example, the operations and maintenance support system might query a specific instance associated with a particular business process on a non-core component server (primary) in a data center in City D (i.e., receiving order requests sent by clients through the transaction engine instance, performing business transactions based on the order requests and the business files corresponding to the request business type of the order requests to obtain transaction flow data, and sending the transaction flow data to the data adaptation component).
[0106] When the operations and maintenance support system executes operations and maintenance steps and instructs the data adaptation component to process the data, the data adaptation component begins processing and sends files to serverInfo (Server Information). In the data center architecture shown in the first diagram, the server corresponding to the target serverInfo of the file sent by the data adaptation component is the server within the data center that actually carries the business operations. For example, this could be the B City reporting gateway (primary / cold / backup) server in the peripheral supporting system of a data center in B City, or the policy order system server in a data center in D City. After receiving the file, the server performs the corresponding business processing to complete the specific tasks in the data processing flow.
[0107] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the business transaction methods of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0108] This application also provides a distributed trading system; please refer to [reference needed]. Figure 5 The distributed trading system includes a data adaptation component and a trading engine instance;
[0109] The data adaptation component is used to process the raw data to obtain standardized data, and to store the standardized data into their respective business databases based on the data type of each standardized data; wherein, the raw data includes spot business data from the spot business system, business data from the margin trading business system, and exchange parameter files;
[0110] The data adaptation component is also used to obtain stored data from each of the business databases, generate business files based on the stored data, and send them to the transaction engine instance.
[0111] The transaction engine instance is used to receive order requests sent by the client, and to perform business transactions based on the order requests and the business files corresponding to the request business type of the order requests to obtain transaction flow data, and to send the transaction flow data to the data adaptation component;
[0112] The data adaptation component is also used to generate a clearing file based on the transaction flow data and import the clearing file into the clearing center corresponding to the requested business type.
[0113] In one feasible embodiment, the data adaptation component includes a data cleaning module and a dynamic routing module;
[0114] The data cleaning module is used to convert the business data of each business account system into standardized data in a preset format.
[0115] The dynamic routing module is used to store the standardized data into their respective business databases according to the data type of each standardized data.
[0116] In one feasible embodiment, the transaction engine instance is also used to receive order requests sent by clients, subscribe to corresponding message topics based on the business type identifier carried in the order request, and obtain updated business files based on the message topics;
[0117] The transaction engine instance is also used to perform compliance verification on the order request based on the exchange parameter file in the updated business file, and after the verification is passed, add the business type identifier to the header of the order request to obtain the target request, and submit the target request to the exchange gateway. The exchange gateway submits the target request to the corresponding exchange to conduct the transaction based on the request business type and generate transaction flow data.
[0118] In one feasible embodiment, the data adaptation component further includes a file generation module and a distribution engine;
[0119] The file generation module is used to extract the field content of the preset settlement field from the transaction flow data, and generate a settlement file based on the field content and the requested business type;
[0120] The distribution engine is used to send the liquidation file to the liquidation center corresponding to the requested business type, so that the liquidation center can perform the liquidation operation corresponding to the requested business type.
[0121] In one feasible embodiment, the distributed transaction system further includes an operation and maintenance support system, which includes a data acquisition module and an alarm engine;
[0122] The data acquisition module is used to collect log data from the business database and the transaction engine instance;
[0123] The alarm engine is used to perform anomaly detection based on the log data and preset alarm rules, and push the anomaly detection results to the business management department.
[0124] In one feasible embodiment, the distributed transaction system further includes a business expansion component;
[0125] The business extension component is used to obtain the data conversion rule corresponding to the new business type when a new business type is detected, and send the data conversion rule to the data adaptation component;
[0126] The business extension component is used to add a data table corresponding to the new business type to the business database, and to add a message topic corresponding to the new business type to the transaction engine instance.
[0127] The distributed trading system provided in this application, employing the business trading method described in the above embodiments, can solve the technical problem of high resource consumption in current distributed trading frameworks. Compared with the prior art, the beneficial effects of the distributed trading system provided in this application are the same as those of the business trading method provided in the above embodiments, and other technical features of the distributed trading system are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0128] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the business transaction methods described in the above embodiments.
[0129] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM, in this embodiment, e.g., e.g., read-only memory or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0130] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the distributed transaction system, enable the distributed transaction system to implement the business transaction methods of the above embodiments.
[0131] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0132] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0133] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0134] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for executing the above-described business transaction methods, thereby solving the technical problem of high resource consumption in current distributed transaction frameworks. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the business transaction methods provided in the above embodiments, and will not be repeated here.
[0135] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the business transaction method described above.
[0136] The computer program product provided in this application can solve the technical problem of high resource consumption in current distributed transaction frameworks. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the business transaction method provided in the above embodiments, and will not be repeated here.
[0137] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A business transaction method, characterized in that, The method is applied to a distributed trading system, which includes a data adaptation component and a trading engine instance. The adaptation component includes a file generation module and a distribution engine. The business transaction method includes: The data adaptation component processes the raw data to obtain standardized data, and stores the standardized data into their respective business databases based on the data type of each standardized data. The raw data includes spot business data from the spot business system, business data from the margin trading business system, and exchange parameter files. The data adaptation component retrieves stored data from each of the business databases, generates business files based on the stored data, and sends them to the transaction engine instance. The transaction engine instance receives order requests sent by clients, subscribes to the corresponding message topic based on the business type identifier carried in the order request, obtains the updated business file based on the message topic, and uses the exchange parameter file in the updated business file to perform compliance verification on the order request. After the verification is passed, the order request is submitted to the exchange gateway to generate transaction flow data. The file generation module extracts the content of preset clearing fields from the transaction flow data and generates a clearing file based on the field content and the requested business type. The distribution engine then pushes the clearing file to the clearing center corresponding to the requested business type to complete the clearing operation.
2. The business transaction method as described in claim 1, characterized in that, The data adaptation component includes a data cleaning module and a dynamic routing module; The step of processing the original data using the data adaptation component to obtain standardized data, and storing the standardized data into their respective business databases based on the data type of each standardized data, includes: The data cleaning module converts the raw data into a preset format to obtain standardized data. The dynamic routing module stores the standardized data into their respective business databases based on the data type of each standardized data item.
3. The business transaction method as described in claim 1, characterized in that, The distributed transaction system also includes an operation and maintenance support system, which includes a data acquisition module and an alarm engine. The business transaction methods also include: The data acquisition module collects log data from the business database and the transaction engine instance. The alarm engine performs anomaly detection based on the log data and preset alarm rules, and pushes the anomaly detection results to the business management department.
4. The business transaction method as described in any one of claims 1 to 3, characterized in that, The distributed transaction system also includes business expansion components; The business transaction methods also include: When a new service type is detected, the data conversion rule corresponding to the new service type is obtained through the service extension component, and the data conversion rule is sent to the data adaptation component. The business extension component adds a data table corresponding to the new business type to the business database and adds a message topic corresponding to the new business type to the transaction engine instance.
5. A distributed trading system, characterized in that, The distributed trading system includes a data adaptation component and a trading engine instance; the adaptation component includes a file generation module and a distribution engine. The data adaptation component is used to process the raw data to obtain standardized data, and store the standardized data into their respective business databases based on the data type of each standardized data; wherein, the raw data includes spot business data from the spot business system, business data from the margin trading business system, and exchange parameter files; The data adaptation component is also used to obtain stored data from each of the business databases, generate business files based on the stored data, and send them to the transaction engine instance. The transaction engine instance is used to receive order requests sent by clients, subscribe to the corresponding message topic based on the business type identifier carried in the order request, obtain the updated business file based on the message topic, and use the exchange parameter file in the updated business file to perform compliance verification on the order request. After the verification is passed, the order request is submitted to the exchange gateway to generate transaction flow data. The file generation module is used to extract the field content of the preset settlement field from the transaction flow data, and generate a settlement file based on the field content and the request business type; The distribution engine is used to push the liquidation file to the liquidation center corresponding to the requested business type to complete the liquidation operation.
6. The distributed transaction system as described in claim 5, characterized in that, The distributed transaction system also includes an operation and maintenance support system, which includes a data acquisition module and an alarm engine. The data acquisition module is used to collect log data from the business database and the transaction engine instance; The alarm engine is used to perform anomaly detection based on the log data and preset alarm rules, and push the anomaly detection results to the business management department.
7. The distributed trading system as described in any one of claims 5 to 6, characterized in that, The distributed transaction system also includes business expansion components; The business extension component is used to obtain the data conversion rule corresponding to the new business type when a new business type is detected, and send the data conversion rule to the data adaptation component; The business extension component is used to add a data table corresponding to the new business type to the business database, and to add a message topic corresponding to the new business type to the transaction engine instance.
8. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the business transaction method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Data mining method and platform, computer equipment and storage medium
CN111221793A