Financial futures market intelligent analysis and early warning method based on Dores warehouse counting and multi-agent cooperation
By employing the Doris data warehouse and multi-agent collaborative intelligent analysis method, and utilizing the temporal causal Transformer model and multi-agent architecture, the system addresses the issues of data governance and single analytical dimensions in financial futures market analysis systems. This enables accurate causal discovery and interpretable early warnings, thereby improving analytical efficiency and foresight.
Patent Information
- Application Number
- CN202511836936.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-02-27
AI Technical Summary
Existing financial futures market analysis systems suffer from weak data governance, limited analytical dimensions, and poor system coordination, resulting in low analytical efficiency, poor accuracy, and insufficient foresight.
We employ an intelligent analysis method based on Doris data warehouse and multi-agent collaboration. Through the temporal causal Transformer model, we perform data preprocessing, causal attention calculation, causal strength aggregation, and counterfactual reasoning to construct a closed-loop analysis system, realize causal discovery and anomaly scoring, and combine it with a multi-agent collaborative architecture for in-depth analysis.
It achieves a leap from simple correlation to causal discovery, provides accurate analysis of deep market dynamics, improves the accuracy and interpretability of early warnings, and overcomes the problems of low analytical efficiency and insufficient foresight of existing systems.
Smart Images

Figure CN121582005A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of intelligent analysis, and in particular to a financial futures market trend intelligent analysis and early warning method based on Doris data warehouse and multi-agent cooperation. BACKGROUND
[0002] The existing financial futures market trend analysis system on the market has the following defects: The existing system usually adopts a traditional data warehouse and isolated analysis modules, and its implementation principle is to directly perform simple threshold judgment and index calculation on the original market trend data. Its shortcomings include: 1. Weak data governance: the original market trend data is complex and of varying quality, lacks a unified and efficient data governance system, and is difficult to support complex AI analysis requirements, resulting in low analysis efficiency and poor accuracy.
[0003] 2. Single analysis dimension: the existing system is mostly based on simple technical indicators and threshold judgments, lacks the ability to understand the deep dynamics of the market (such as causal relationships, group behavior, and trading intentions), and the accuracy and forward-looking nature of the early warning are insufficient.
[0004] 3. Poor system collaboration: each analysis module runs in isolation, lacks a unified multi-agent collaboration mechanism, resulting in low resource utilization, broken analysis processes, and poor overall system robustness. SUMMARY
[0005] The purpose of the present application is to provide a financial futures market trend intelligent analysis and early warning method based on Doris data warehouse and multi-agent cooperation to overcome the problem of single analysis dimension of the existing system and make the early warning more accurate and interpretable.
[0006] The purpose of the present application can be achieved by the following technical solutions: Compared with the prior art, the present application has the following beneficial effects: In the entire reasoning process of the price analysis engine, the price analysis engine realizes the leap from simple correlation to causal discovery. The time series causal Transformer model is adopted to construct a closed-loop analysis system of data preprocessing-causal attention calculation-causal strength aggregation-counterfactual reasoning-anomaly score generation through rigorous multi-step reasoning: it first normalizes the price sequences of multiple varieties and multiple cycles to eliminate dimensional interference, then uses the multi-head causal attention mechanism combined with the causal mask to force the model to only focus on the historical data before the current time step, accurately quantifies the causal influence strength between different time and different varieties, and avoids the defects of traditional correlation analysis that confuses the causal direction and misjudges the two-way correlation; then, through counterfactual reasoning, the scenario where a specific event does not occur is simulated, and the actual and counterfactual results are compared to quantify the real impact of the event, making up for the short board of the existing system that cannot evaluate the causal strength; finally, the causal influence strength matrix and the event impact score are fused to generate an anomaly score, and an interpretable price transmission path is output, which not only breaks through the single analysis dimension of traditional systems that rely only on technical indicators and threshold values, but also quantifies the causal matrix, clearly defines the impact path, and traces the reasoning process, so that the early warning not only accurately captures the deep-seated dynamic characteristics of the market, but also has clear interpretability, completely overcoming the problems of low analysis efficiency and lack of forward-looking of existing systems. BRIEF DESCRIPTION OF DRAWINGS
[0007] Figure 1 is a schematic diagram of each layer of the system structure of the present application; Figure 2 is an agent workflow diagram of the present application; Figure 3 is an analysis engine structure diagram of the present application. DETAILED DESCRIPTION
[0008] The present application will be described in detail below in conjunction with the drawings and specific embodiments. The present embodiment is implemented on the basis of the technical solution of the present application, and gives a detailed implementation method and specific operation process, but the protection scope of the present application is not limited to the following embodiments.
[0009] Figure 1 is a schematic diagram of each layer of the system structure of the present application; Figure 2 is an agent workflow diagram of the present application; Figure 3 is an analysis engine structure diagram of the present application.
[0010] Nomenclature: 1. Apache Doris: A modern MPP (Massively Parallel Processing) analytical database, used in this invention as the core data warehouse for efficient storage and querying of massive financial market data.
[0011] 2. Agent: In the field of artificial intelligence, it refers to an entity that can perceive the environment and act autonomously. In this invention, it refers to software modules with specific functions (such as coordination, planning, analysis) in the system.
[0012] 3. Model Context Protocol (MCP): A communication protocol used in this invention to unify the implementation of data service interfaces, enabling efficient and standardized data exchange between agents and data layers.
[0013] 4. Materialized View: A database object that contains a pre-computed copy of query results. In this invention, it is used to implement real-time data conversion and aggregation from the ODS layer to the DWD layer, and from the DWD layer to the DWS layer, greatly improving query performance.
[0014] 5. Transformer / GNN / Reinforcement Learning: All are cutting-edge artificial intelligence technologies. Transformer is good at processing sequential data, GNN (Graph Neural Network) is good at processing graph structure data, and Reinforcement Learning is good at decision optimization. They are used in this invention for price causal analysis, volume warehouse relationship analysis, and market depth intention reasoning, respectively.
[0015] The present invention proposes a financial futures market data intelligent analysis and early warning method based on Doris data warehouse and multi-agent collaboration, which comprises the following steps: Obtain the original financial futures market data, and encapsulate the data; The encapsulated data is input into the analyst agent and the researcher agent; The coordinator agent transmits the parsed task instructions to the planner agent; The planner agent transmits the analysis tool call sequence to the analyst agent and the researcher agent; The analyst agent and the researcher agent obtain structured results based on engine analysis and send them to the reporter agent; The engine includes a price analysis engine; the price analysis engine outputs an abnormal score based on a time series causal Transformer model.
[0016] The corresponding system of the present invention constructs a four-layer collaborative architecture, as shown in the attachedFigure 1 As shown.
[0017] (1) Data layer: contains Apache Doris data warehouse, which internally processes raw ODS (Operational Data Store) layer data in real time through materialized view technology to generate DWD (Data Warehouse Detail) layer (cleaned, verified, and standardized data) and DWS (Data Warehouse Service) layer (aggregated and calculated feature data such as K-line and technical indicators).
[0018] (2) Service layer: This layer provides standardized and high-performance data access services to the upper layer through a unified data service interface (MCPServer) based on the Model Context Protocol (MCP), and is the core bridge connecting the data layer and the intelligent layer.
[0019] (3) Intelligent layer: contains a multi-agent collaboration architecture, which consists of coordinator agent, planner agent, analyst agent, reporter agent, researcher agent and browser agent working together through dynamic workflow engine to complete complex analysis tasks.
[0020] (4) Guarantee layer: Intelligent decorator system, including semantic-level deduplication decorator, cognitive retry decorator and full-link tracking decorator, encapsulating various tool calls to ensure system stability and efficiency.
[0021] For the implementation of the method steps, including: (1) The functional module "Doris data warehouse cluster" realizes the layered processing and storage of raw market data. The specific processing inside this module is as follows: by creating a materialized view, defining data conversion rules, and cleaning (filtering invalid values), verifying (checking data reasonableness), and standardizing (unifying contract codes, timestamps, etc.) the raw data in the ODS layer in real time, high-quality DWD detail layer data is generated. On this basis, the DWD layer data is again processed through a materialized view for AI-oriented feature engineering, pre-computing and storing K-line data (open, high, low, close, volume) of multiple time granularities (such as seconds, minutes, days), forming the DWS service layer.
[0022] (2) The function module "Unified Data Service Interface (MCP Server)" realizes the provision of standardized data access to the upper layer application. The specific processing inside this module is: as an MCP server, it receives structured query requests from the upper layer agent in accordance with the model context protocol. After parsing the request, the interface intelligently routes to the DWD layer of Doris data warehouse (when detailed data is needed) or the DWS layer (when aggregated features are needed), executes the query and returns the result in a standard format, achieving millisecond-level response.
[0023] (3) The function module "Coordinator Agent" realizes task scheduling and resource management. The specific processing inside this module is: receiving natural language requests from users or internal monitoring signals, analyzing the intent of the task, identifying the task type (such as market query, abnormality analysis, risk warning), and according to the system load, assigning the task to the appropriate downstream agent.
[0024] (4) The function module "Planner Agent" realizes the dynamic formulation of analysis plans. The specific processing inside this module is: based on the task target analyzed by the coordinator agent, using reinforcement learning algorithm, dynamically planning the optimal analysis tool calling sequence and execution path required to complete the task. For example, for a task of "analyzing the reasons for stock index futures abnormality", it may plan a sequence process from querying price data to analyzing quantity and warehouse relationship, then checking related markets, and finally generating a report.
[0025] (5) The function module "Analyst Agent" realizes the core intelligent analysis function. The specific processing inside this module is: integrating three major advanced analysis engines (price, quantity and warehouse, market depth) inside, according to the instruction sequence issued by the planner agent, calling one or more corresponding analysis engines, executing deep data analysis, and returning structured intermediate results.
[0026] (6) The function module "Researcher Agent" realizes complex research tasks that require deep computation. The specific processing inside this module is: responsible for executing complex analysis tasks assigned by the planner agent that exceed the regular capabilities of the analyst agent, such as historical backtesting, building complex statistical models, or performing multi-round iterative reasoning analysis.
[0027] (7) The function module "Reporter Agent" realizes the synthesis and output of analysis results. The specific processing inside this module is: receiving structured analysis results from the analyst agent and the researcher agent, integrating, refining and formatting these results, and generating the final user-oriented, structured and easy-to-understand warning report or analysis conclusion.
[0028] (8) The functional module "price analysis engine" realizes deep price analysis based on causal relationship. The specific processing inside this module is as follows: using a time-series causal Transformer model, the following detailed steps are performed to execute causal discovery and counterfactual reasoning, and finally output the causal impact strength matrix, price transmission path and abnormal score. The detailed description of the steps is as follows: Step 1: Obtain input parameters Obtain multi-variety, multi-period price sequence data, represented as input matrix , where T is the number of time steps, and N is the number of varieties. The matrix element represents the price of variety i at time t. At the same time, obtain the time mask vector , which is used to identify the time point when a specific event occurs (for example, 1 when the event occurs , otherwise 0).
[0029] Step 2: Perform data preprocessing Standardize the input price sequence to eliminate the influence of dimension. Calculate the mean and standard deviation of each variety: The element of the standardized price sequence is calculated as: Get the standardized matrix Step 3: Perform causal attention calculation: Input the standardized matrix into the time-series causal Transformer model. The model contains multi-head causal attention layers, where each attention head calculates the query (Query), key (Key) and value (Value) vectors: where is a learnable parameter matrix, and d is the hidden dimension.
[0030] Calculate the attention score matrix : where and are the query and key vectors of time and , respectively.
[0031] Apply causal mask to ensure that each time step can only focus on past time steps: when ; otherwise, .
[0032] Compute attention weight matrix by Softmax function : Attention weight Represents the degree of causal influence on time t.
[0033] In this step, traditional methods (such as correlation coefficient or Granger causality) can only detect linear or lag correlation, and cannot distinguish the true causal direction. This step uses the causal attention mechanism, which forces the model to only pay attention to the past time steps, consistent with the principle of time series causality (cause must precede effect). The attention weight directly quantifies the influence strength on time t, and captures multiple varieties of interaction through the multi-head mechanism. For example, in the financial market, the price change of variety A may precede that of variety B, but traditional correlation will misjudge it as a two-way association. This step ensures that only the time sequence is considered through the causal mask, thereby identifying the true causal direction (such as A→B) and improving early warning accuracy.
[0034] Step 4 Extract causal influence strength matrix Aggregate causal influence between varieties from the attention weight matrix . Define the causal influence strength matrix , where element represents the average causal influence strength of variety j on variety i: where is an indicator function that takes the value 1 when the attention head maps to varieties i and j, and 0 otherwise (associated through model parameters).
[0035] At the same time, based on C, derive the price transmission path: identify the main influence path through graph algorithms (such as shortest path analysis).
[0036] Step 5 Perform counterfactual reasoning Modify the input sequence to simulate the situation where a specific event does not occur. Define the counterfactual input matrix , where the prices at event-related time points are replaced with expected values (e.g., predicted values using an ARIMA model): when , ; otherwise, .
[0037] Input the time series causal Transformer model, repeat steps 3-4, and obtain the counterfactual causal influence strength matrix and counterfactual price forecasts .
[0038] Calculate the difference between the actual and counterfactual facts to obtain the event impact score. in, To predict prices using counterfactual methods.
[0039] In this step, existing systems lack counterfactual reasoning capabilities and cannot assess the true impact of specific events. This step simulates scenarios where the event has not occurred by modifying the input sequence and uses a trained temporal causal Transformer for prediction. The difference between the actual and counterfactual outputs is compared to quantify the event's impact (e.g., the price disturbance caused by policy announcements). This provides interpretable insights; for example, a large difference between the counterfactual and actual prices indicates a significant event impact, helping users understand market drivers. Compared to traditional methods, this step not only identifies causality but also assesses the strength of causality, enhancing the foresight of early warnings.
[0040] Step 6: Generate anomaly scores Combining the causal influence strength matrix And the event impact score E, calculate the anomaly score for each variety. : in, and These are weighted hyperparameters, adjusted through training.
[0041] Step 7 Output parameters The final output includes the causal influence strength matrix C, the price transmission path (derived from C), and anomaly scores. .
[0042] The above outlines the entire reasoning process of the price analysis engine. Through these steps, the engine progresses from simple correlation to causal discovery. The formulaic steps ensure reproducibility and accuracy, while intermediate variables (such as...) This is fully utilized in subsequent steps to form a closed-loop analysis. The final output provides a quantitative causal matrix and anomaly scores, making early warnings more accurate and interpretable, overcoming the problem of existing systems having only one analytical dimension.
[0043] (9) The functional module "Volume and Position Analysis Engine" implements volume and position behavior analysis based on a graph structure. The specific processing within this module involves using a spatiotemporal graph neural network. First, a dynamic "contract relationship network" is constructed, where the nodes are different futures contracts, and the edges represent the linkages between contracts in terms of changes in trading volume and open interest (calculated through dynamic correlation). Then, using spatiotemporal convolution technology, this network can simultaneously capture the spatial patterns of risk propagation among contracts (which contract affects which contract) and the temporal evolution patterns (how risk spreads over time). By analyzing the evolution of this network, highly synchronized contract clusters can be identified, and the contagion of risk can be warned. Finally, a behavioral contagion risk map and a market structure stability index are output.
[0044] (10) The functional module "Market Deep Analysis Engine" realizes a deep understanding of the order book's intent. The specific processing within this module involves multimodal fusion and cognitive reasoning techniques. First, visual-numerical multimodal fusion is performed: the order book's ten-level buy / sell data are not only processed as a numerical sequence but also converted into a "market microstructure image" (e.g., using a heatmap to represent the order volume at different price levels). Visual Transformer is then used to extract image features, which are then fused with numerical features. Next, through hierarchical reinforcement learning, higher-level strategies determine the focus of analysis (e.g., whether to focus on buy or sell orders), while lower-level strategies perform specific pattern recognition. Finally, neural symbolic reasoning is used to combine the patterns identified by deep learning with preset trading logic rules to generate an interpretable trading intent reasoning chain. The final output is a liquidity cognitive map (showing liquidity distribution) and a strategy intent probability distribution.
[0045] Data transmission between data modules is as follows: the unified data service interface transmits standardized market data query results to analyst agents and researcher agents through the MCP protocol.
[0046] The coordinator agent transmits the parsed task instructions to the planner agent.
[0047] The planner agent transmits the sequence of analysis tool calls to the analyst agent and researcher agent.
[0048] The analyst and researcher agents transmit the structured results of the engine analysis to the reporting agent.
[0049] The intelligent decorator system encapsulates, monitors, and manages the invocation process when the analyst agent invokes any internal or external tool.
[0050] This invention relates to a layered data processing system for DWD / DWS based on Doris materialized views and a unified data service interface based on MCP. Through materialized views, real-time and efficient data preprocessing is achieved, providing high-quality, readily available feature data for upper-layer AI analysis. The MCP protocol enables standardized, high-performance communication between the agent and the data layer, ensuring the efficiency and quality of analysis from the data source.
[0051] This invention features a complete multi-agent collaborative architecture (coordinator, planner, analyst, reporter, researcher, and browser) and a dynamic workflow engine. Through the professional division of labor and collaboration among agents, simple queries are upgraded into automated, multi-step deep analysis task flows, realizing intelligent scheduling, parallel execution, and result fusion of system tasks, which greatly improves the overall intelligence level and complex task processing capabilities of the system.
[0052] This invention integrates three cutting-edge analysis engines within the analyst agent.
[0053] The price analysis engine based on time-series causal Transformer: Its technical effect is to break through the traditional correlation analysis, realize true causal discovery and counterfactual reasoning, accurately identify the core driving factors of the market, and provide more accurate and interpretable price warnings.
[0054] The volume and position analysis engine based on spatiotemporal GNN: The technical effect is to treat the market as a dynamic network, accurately grasp the spatiotemporal transmission path and evolution law of risks and behaviors in the contract network, and realize the leap from isolated data points to global structural insights.
[0055] A market depth analysis engine based on multimodal fusion and cognitive reasoning: The technical effect is to integrate image and numerical information and combine symbolic reasoning to achieve a fundamental improvement from shallow pattern recognition to deep understanding of trading strategy intentions, and to deeply interpret the market microstructure.
[0056] The intelligent decorator system (semantic-level deduplication, cognitive retries, and end-to-end tracing) significantly reduces redundant query pressure on the data warehouse through semantic-level deduplication; enhances system fault tolerance through cognitive retries; and ensures maintainability through end-to-end tracing. Overall, it improves the system's robustness, efficiency, and resource utilization.
[0057] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for intelligent analysis and early warning of financial futures market data based on Doris data warehouse and multi-agent collaboration, characterized in that, The method includes the following steps: Obtain raw market data for financial futures and encapsulate the data; The encapsulated data is input into the analyst agent and the researcher agent; The coordinator agent transmits the parsed task instructions to the planner agent. The planner agent transmits the sequence of analytical tool calls to the analyst and researcher agents; The analyst and researcher agents obtain structured results based on engine analysis and send them to the reporting agent; The engine includes a price analysis engine; The price analysis engine outputs anomaly scores based on a time-series causal Transformer model.
2. The intelligent analysis and early warning method for financial futures market data based on Doris data warehouse and multi-agent collaboration as described in claim 1, characterized in that, The specific steps for the price analysis engine to output anomaly scores are as follows: Acquire price series data and time mask vectors for multiple commodities and multiple periods; Calculate the standardized matrix of the price series; Compute causal attention using a time-series causal Transformer model with a standardized matrix input; Extracting the causal influence strength matrix based on causal attention; Based on the time mask vector, a counterfactual input matrix is defined, the difference between the actual and counterfactual events is calculated, and the event impact score is obtained. Anomaly scores for each variety were obtained based on the causal influence strength matrix and event influence scores.
3. The intelligent analysis and early warning method for financial futures market data based on Doris data warehouse and multi-agent collaboration as described in claim 2, characterized in that, The specific steps for calculating the standardized price series matrix are as follows: calculate the mean and standard deviation of each commodity, and standardize the multi-commodity, multi-period price series data based on the mean and standard deviation of each commodity to obtain the standardized price series matrix.
4. The intelligent analysis and early warning method for financial futures market data based on Doris data warehouse and multi-agent collaboration as described in claim 3, characterized in that, The calculation process for causal attention is as follows: Standardize the price series matrix Input a temporal causal Transformer model, and use the attention head to compute the query, key, and value vectors; Calculate the attention score matrix; Applying causal masks to adjust the attention score matrix; The attention weight matrix is calculated based on the adjusted attention score matrix as causal attention.
5. The intelligent analysis and early warning method for financial futures market data based on Doris data warehouse and multi-agent collaboration as described in claim 4, characterized in that, The causal influence strength matrix is as follows: in For indicator functions, This refers to causal attention.
6. The intelligent analysis and early warning method for financial futures market data based on Doris data warehouse and multi-agent collaboration as described in claim 5, characterized in that, The impact rating of the event is: in, This is the actual price. To predict prices using counterfactual methods.
7. The intelligent analysis and early warning method for financial futures market data based on Doris data warehouse and multi-agent collaboration as described in claim 6, characterized in that, The calculation process for counterfactual price prediction is as follows: The counterfactual input matrix is input into the time-series causal Transformer model to obtain the counterfactual causal influence strength matrix, and counterfactual price prediction is obtained based on the counterfactual causal influence strength matrix.
8. The intelligent analysis and early warning method for financial futures market data based on Doris data warehouse and multi-agent collaboration as described in claim 7, characterized in that, The anomaly score is: in, and These are weighted hyperparameters.
9. A financial futures market intelligent analysis and early warning device based on Doris data warehouse and multi-agent collaboration, comprising a memory, a processor, and a program stored in the memory, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-8.
10. A storage medium having a program stored thereon, characterized in that, When the program is executed, it implements the method as described in any one of claims 1-8.