Automatic collection and risk early warning method and system for financial multi-source heterogeneous data

By collecting and structuring multi-source heterogeneous data, a risk bearing capacity model is constructed. By introducing nonlinear coupling terms, the problems of single data collection, fixed early warning thresholds and information redundancy in existing technologies are solved, and the quantitative capture and dynamic risk assessment of multi-factor coupling effects are realized.

CN123140653APending Publication Date: 2026-11-20SHANGHAI FANXI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611344716.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Under the current futures MOM management model, the data collection type is limited and it is difficult to cover unstructured information. Risk warning ignores the coupling effect between factors, and the fixed warning threshold leads to misjudgment or omission. The text information deduplication method is rudimentary and information redundancy is serious.

Method used

By collecting account transaction data, text information, rule announcements, and market data through a multi-source heterogeneous data acquisition engine, and using structured event tuple matching for deduplication, a risk tolerance model is constructed. Nonlinear coupling terms are introduced to dynamically assess risk and generate structured early warning reports.

Benefits of technology

It has achieved automated collection and fusion of multi-source heterogeneous data, captured the multi-factor coupling amplification effect, dynamically adjusted the early warning threshold, and improved the accuracy and adaptability of risk early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123140653A_ABST
    Figure CN123140653A_ABST
Patent Text Reader

Abstract

The application discloses a method and system for automatic collection and risk early warning of financial multi-source heterogeneous data, and relates to the technical field of financial data processing and risk monitoring. The method comprises the following steps: collecting four types of data of account transaction and holding, text information, rule announcement and market quotation and respectively de-duplicating; standardizing and aggregating the de-duplicated data, and establishing an account product consultant mapping relationship; calculating risk bearing capacity according to account equity, margin and floating profit and loss; calculating external pressure according to sentiment net bias, news cumulative impact intensity, rule change, volatility rate abnormality and basis difference deviation, and introducing a nonlinear coupling term to obtain external total pressure; calculating an environmental transmission coefficient, and taking the ratio of the external total pressure after environmental amplification and the risk bearing capacity as a comprehensive risk score; and triggering an early warning when the comprehensive risk score exceeds a threshold. The application realizes the automatic collection and fusion of multi-source heterogeneous data, and can dynamically evaluate risks according to account status and market environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of financial data processing and risk monitoring technology, specifically to a method and system for automatic collection and risk warning of multi-source heterogeneous financial data. Background Technology

[0002] In the futures MOM (Manager of Managers) management model, the manager needs to simultaneously monitor the trading behavior, position structure, and market risk of multiple investment advisory accounts in real time. This model requires the system to have the ability to collect data from multiple external data sources in parallel and to integrate and process the collected data for risk monitoring.

[0003] The shortcomings of existing technologies are mainly reflected in the following aspects: the data collection type is limited, mainly to account transaction data, and it is difficult to cover unstructured information such as policy, industry chain and macro events; risk warnings mostly adopt multi-factor weighted summation, ignoring the coupling effect between factors. In the actual market, when multiple risk factors occur at the same time, their superimposed harm often far exceeds the sum of the individual effects of each factor; warning thresholds are mostly fixed values ​​and cannot be automatically adjusted according to changes in account equity, which can easily lead to misjudgment or omission; the text information deduplication method is rudimentary, making it difficult to accurately identify different reports of the same event, resulting in information redundancy.

[0004] Therefore, there is a need for a risk warning method that can automatically collect and fuse multi-source heterogeneous data, capture the multi-factor coupling amplification effect, and dynamically assess risks based on the account's own status and market environment. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to address the shortcomings of the existing technology by providing an automatic collection and risk warning method and system for multi-source heterogeneous financial data.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: An automatic data collection and risk warning method for multi-source heterogeneous financial data includes the following steps: Step S1: Collect multi-source heterogeneous data through a multi-source heterogeneous data acquisition engine. The multi-source heterogeneous data includes at least account transaction and position data, text information data, rule announcement data, and market conditions and industry chain data. Step S2: Deduplicate the account transaction and position data using a unique order number or transaction number as the database primary key; deduplicate the rule announcement data using a composite primary key consisting of the product code, announcement type, and effective date; deduplicate the text information data using structured event tuple matching; and deduplicate the market data and industry chain data using a composite primary key consisting of the product code and data date. Step S3: Perform data standardization and aggregation on the deduplicated multi-source heterogeneous data, and convert the account transaction and position data and the market and industry chain data into a unified standard precision and unified time format, and establish a three-layer mapping relationship table for account products and investment advisory; aggregate the text information data by product dimension, and calculate the set of news events for each product within a preset time window; Step S4: For each instrument, calculate the risk tolerance of that instrument based on the current dynamic equity of the account, the total margin held on that instrument, and the total floating loss on that instrument; the risk tolerance represents the account's ability to withstand additional adverse fluctuations. Step S5: For each instrument, calculate the external pressure based on the net sentiment bias, cumulative news impact intensity, margin increase, limit up / down change, volatility anomaly index, and absolute value of basis deviation. Calculate the nonlinear coupling term based on each pressure sub-factor, and add the external pressure to the nonlinear coupling term to obtain the total external pressure for the instrument. Step S6: For each commodity, calculate the environmental transmission coefficient based on the deviation of the bid-ask spread from the current price to the average price of the past preset trading days. Multiply the total external pressure by the environmental transmission coefficient and divide by the risk tolerance to obtain the comprehensive risk score of the commodity. Step S7: When the comprehensive risk score is greater than or equal to the preset physical boundary threshold, a comprehensive risk warning is triggered. When any of the following indicators—account risk level, intraday drawdown, or net asset value decline—exceeds the corresponding preset threshold, an independent position warning is triggered. When the same product triggers both the independent position warning and the comprehensive risk warning, a compound emergency warning is triggered. After the warning is triggered, a structured warning report is generated and pushed to the manager.

[0007] Further, in step S1, the account transaction and position data are collected by connecting to an external investment advisory management platform via a REST API and directly connecting to the futures exchange via the CTP native protocol. This data includes at least dynamic equity, margin usage, floating profit and loss, account risk level, transaction records, order records, and deposit / withdrawal records. The text information data is collected through public API interfaces and RSS subscription sources. This data includes at least policy news, tariff adjustment news, industry news, and geopolitical event texts. The rule announcement data is automatically collected through the exchange's official website. This data includes at least announcements regarding adjustments to exchange margin ratios, changes to price limits, and changes to position limits. The market data and industry chain data are collected through the CTP interface and third-party data APIs. This data includes at least the best bid price, best ask price, latest price, spot price, and historical market data.

[0008] Further, in step S2, text information data is deduplicated through structured event tuple matching. Specifically, for each news text, structured event tuples are extracted using a named entity recognition model and a text classification model. These structured event tuples include the event subject, event type, set of related product codes, and publication time. For any two news articles, a structured similarity is calculated. This structured similarity is a weighted sum of the subject matching function value, type matching function value, product matching function value, and time matching function value. The subject matching function value is determined by the event subject of the two news articles. The value is 1 when the events are completely identical, and 0 otherwise; the type matching function value is 1 when the event types of the two news articles are completely identical, and 0 otherwise; the variety matching function value is the ratio of the intersection to the union of the variety codes of the two news articles; the time matching function value is an exponential decay function with a preset time constant as the decay factor, and the smaller the difference in publication time, the larger the time matching function value; when the structured similarity is greater than or equal to the preset duplicate determination threshold, the two news articles are determined to be duplicate events, and only the one with the earliest publication time is retained in the database.

[0009] Further, in step S4, the risk tolerance is calculated as follows: the current account dynamic equity is divided by the total margin to obtain the first factor; the total floating loss is divided by the current account dynamic equity to obtain the floating loss ratio, and then the floating loss ratio is subtracted by one to obtain the second factor; the first factor and the second factor are multiplied to obtain the risk tolerance; the total floating loss is the sum of the loss portion of all investment advisors' floating profits and losses on this product, and the profit portion is not included in the total floating loss.

[0010] Further, in step S5, the net sentiment bias is calculated as follows: for each commodity, all news related to that commodity are obtained within the preset time window; for each news item, the sentiment polarity value output by a pre-trained sentiment analysis model in the financial field is obtained, and the correlation coefficient between the news item and the commodity is obtained; the product of the sentiment polarity value and the correlation coefficient of each news item is accumulated, and divided by the sum of the correlation coefficients of all news items and the sum of the preset minimum positive number to obtain the net sentiment bias; The cumulative impact intensity of the news is calculated as follows: For each type of news, all news related to that type of news are obtained within the preset time window; for each news item, the absolute value of the sentiment polarity, the correlation coefficient, the event type weight, and the exponential decay factor are obtained; the absolute value of the sentiment polarity, the correlation coefficient, the event type weight, and the exponential decay factor are multiplied together and summed to obtain the cumulative impact intensity of the news; the exponential decay factor uses the number of minutes between the news release time and the current time as the independent variable and the half-life of the news type as the decay constant, and the exponential decay factor is larger the closer the news release time is; the event type weight is obtained by mapping the event type of the news, and different event types correspond to different weight values; the smaller value between the cumulative impact intensity of the news divided by the preset maximum impact tolerance value and one is taken to obtain the normalized value of the cumulative impact intensity of the news.

[0011] Further, in step S5, the external pressure is calculated as follows: the product of the absolute value of the net sentiment bias and the normalized value of the cumulative impact intensity of the news is taken as the information pressure sub-item; the sum of the normalized value of the margin increase and the normalized value of the price limit change is taken as the rule pressure sub-item; the sum of the volatility anomaly indicator and the absolute value of the basis deviation is taken as the market pressure sub-item; the information pressure sub-item, the rule pressure sub-item, and the market pressure sub-item are added together to obtain the external pressure. The calculation of the nonlinear coupling term specifically includes the following steps: setting each pressure sub-factor, which includes the absolute value of the net sentiment bias, the normalized value of the cumulative impact intensity of news, the regular pressure sub-term, the volatility anomaly index, and the absolute value of the basis deviation; for each pressure sub-factor, calculating its historical quantile threshold; when two pressure sub-factors simultaneously exceed their respective historical quantile thresholds, dividing the product of the two pressure sub-factors by a preset scaling parameter and inputting it into a hyperbolic tangent function for nonlinear saturation compression, then multiplying by a preset coupling amplification coefficient to obtain the coupling contribution value between the two pressure sub-factors; summing the coupling contribution values ​​between each pair of pressure sub-factors to obtain the nonlinear coupling term.

[0012] Further, in step S6, the environmental transmission coefficient is calculated as follows: using one as the base, adding the bid-ask spread rate, and adding the deviation of the current price relative to the average price of the past preset trading days; the deviation is the absolute value of the difference between the current price and the average price of the past preset trading days divided by the average price of the past preset trading days; the bid-ask spread rate is the difference between the best ask price and the best bid price divided by the average of the best ask price and the best bid price; the comprehensive risk score is calculated as follows: multiplying the total external pressure by the environmental transmission coefficient to obtain the numerator, adding the risk tolerance to a preset minimum positive number to obtain the denominator, and dividing the numerator by the denominator to obtain the comprehensive risk score; the preset physical boundary threshold is one; when the comprehensive risk score is greater than or equal to the preset physical boundary threshold, it indicates that the external pressure has reached or exceeded the risk tolerance.

[0013] Further, in step S7, the structured early warning report includes an account equity snapshot, risk three-factor decomposition information, nonlinear coupling trigger details, high-risk position details, related information summary, and rule change prompts; the risk three-factor decomposition information includes the current values ​​of risk tolerance, total external pressure, and environmental transmission coefficient; the nonlinear coupling trigger details mark the factor pairings that produce a coupling amplification effect when the ratio of the nonlinear coupling term to the total external pressure exceeds a preset ratio threshold.

[0014] An automatic data acquisition and risk warning system for multi-source heterogeneous financial data, used to implement any of the methods described above for automatic data acquisition and risk warning for multi-source heterogeneous financial data, including: The multi-source heterogeneous data acquisition module is used to collect multi-source heterogeneous data, including at least account transaction and position data, text information data, rule announcement data, and market and industry chain data. The multi-source heterogeneous data deduplication module is used to perform deduplication processing on the collected multi-source heterogeneous data respectively: the account transaction and position data are deduplicated using a unique order number or transaction number as the database primary key; the rule announcement data is deduplicated using a composite primary key composed of product code, announcement type, and effective date; the text information data is deduplicated using structured event tuple matching; and the market information and industry chain data are deduplicated using a composite primary key composed of product code and data date. The data standardization and aggregation module is used to convert the deduplicated account transaction and position data, as well as the market data and industry chain data, into a unified standard precision and time format, and to establish a three-layer mapping relationship table for account products and investment advisory services; it also aggregates the text information data by product dimension and calculates the set of news events for each product within a preset time window. The risk tolerance calculation module is used to calculate the risk tolerance of each instrument based on the current dynamic equity of the account, the total margin held in the instrument, and the total floating loss in the instrument. The external total pressure calculation module is used to calculate the external pressure of each product based on the net sentiment bias, the intensity of the cumulative impact of news, the margin increase, the change of the price limit, the volatility anomaly index, and the absolute value of the basis deviation. It also calculates nonlinear coupling terms based on each pressure sub-factor and adds the external pressure to the nonlinear coupling terms to obtain the external total pressure of the product. The comprehensive risk score calculation module is used to calculate the environmental transmission coefficient for each product based on the deviation of the bid-ask spread from the current price to the average price of the past preset trading days. The comprehensive risk score for the product is obtained by multiplying the total external pressure by the environmental transmission coefficient and then dividing by the risk tolerance. The early warning judgment and push module is used to trigger a comprehensive risk warning when the comprehensive risk score is greater than or equal to a preset physical boundary threshold, and to trigger an independent position warning when any of the following indicators exceeds the corresponding preset threshold: account risk level, intraday drawdown, or net value decline. When the same product triggers both the independent position warning and the comprehensive risk warning, a compound emergency warning is triggered. After the warning is triggered, a structured warning report is generated and pushed to the manager.

[0015] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the processor performs any of the methods described above for automatic acquisition and risk warning of multi-source heterogeneous financial data.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention uses a multi-source heterogeneous data acquisition engine to collect four types of heterogeneous data in parallel: account transaction data, text information data, rule announcement data, and market conditions and industry chain data. This breaks the limitation of existing systems that only collect transaction data and realizes the comprehensive and automated collection and fusion of multi-source heterogeneous data.

[0017] 2. This invention transforms unstructured news text into structured event tuples containing four dimensions: event subject, event type, related categories, and publication time. After assigning weights to these four fields, the overall matching degree is calculated, thereby achieving deduplication of text information data.

[0018] 3. This invention constructs a ratio-based risk scoring model, defining the risk score as the external pressure borne by each unit of bearing capacity, so that the score has a clear physical meaning and is comparable between different accounts and varieties.

[0019] 4. This invention introduces a threshold-activated nonlinear coupling term. When multiple pressure sub-factors exceed their respective thresholds simultaneously, an additional penalty is automatically generated, thereby incorporating the multi-factor interaction effect into the risk score and realizing the quantitative capture of the coupling amplification effect.

[0020] 5. This invention defines risk tolerance as a function of dynamic equity, margin usage, and floating losses, so that the tolerance automatically decreases as the account's floating losses increase and automatically increases as equity increases, thus achieving automatic adaptation of the early warning threshold.

[0021] 6. This invention incorporates the bid-ask spread and price deviation into the risk transmission path through the environmental transmission coefficient, thereby quantifying the risk transmission efficiency of the impact on market liquidity and enabling the same amount of external pressure to generate different risk scores under different liquidity conditions. Attached Figure Description

[0022] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart illustrating an embodiment of the present invention; Figure 2 This is a schematic diagram of the system modules in an embodiment of the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0024] like Figure 1 As shown, the method for automatic collection and risk warning of multi-source heterogeneous financial data includes the following steps: Step S1: Collect multi-source heterogeneous data through a multi-source heterogeneous data acquisition engine. The multi-source heterogeneous data includes at least account transaction and position data, text information data, rule announcement data, and market conditions and industry chain data. Step S2: Deduplicate the account transaction and position data using a unique order number or transaction number as the database primary key; deduplicate the rule announcement data using a composite primary key consisting of the product code, announcement type, and effective date; deduplicate the text information data using structured event tuple matching; and deduplicate the market data and industry chain data using a composite primary key consisting of the product code and data date. Step S3: Perform data standardization and aggregation on the deduplicated multi-source heterogeneous data, and convert the account transaction and position data and the market and industry chain data into a unified standard precision and unified time format, and establish a three-layer mapping relationship table for account products and investment advisory; aggregate the text information data by product dimension, and calculate the set of news events for each product within a preset time window; Step S4: For each instrument, calculate the risk tolerance of that instrument based on the current dynamic equity of the account, the total margin held on that instrument, and the total floating loss on that instrument; the risk tolerance represents the account's ability to withstand additional adverse fluctuations. Step S5: For each instrument, calculate the external pressure based on the net sentiment bias, cumulative news impact intensity, margin increase, limit up / down change, volatility anomaly index, and absolute value of basis deviation. Calculate the nonlinear coupling term based on each pressure sub-factor, and add the external pressure to the nonlinear coupling term to obtain the total external pressure for the instrument. Step S6: For each commodity, calculate the environmental transmission coefficient based on the deviation of the bid-ask spread from the current price to the average price of the past preset trading days. Multiply the total external pressure by the environmental transmission coefficient and divide by the risk tolerance to obtain the comprehensive risk score of the commodity. Step S7: When the comprehensive risk score is greater than or equal to the preset physical boundary threshold, a comprehensive risk warning is triggered. When any of the following indicators—account risk level, intraday drawdown, or net asset value decline—exceeds the corresponding preset threshold, an independent position warning is triggered. When the same product triggers both the independent position warning and the comprehensive risk warning, a compound emergency warning is triggered. After the warning is triggered, a structured warning report is generated and pushed to the manager.

[0025] The specific implementation of each step is explained in detail below: First, four types of data are collected using a multi-source heterogeneous data acquisition engine: Account transaction and position data are connected to external investment advisory management platforms via REST API and collected directly from futures exchanges via the CTP native protocol. The collected data includes at least dynamic equity, margin usage for each product, floating profit and loss, account risk level, transaction records, order records, and deposit and withdrawal records.

[0026] Text-based information data is collected through public API interfaces and RSS subscription sources, and includes at least policy news, tariff adjustment news, industry news, and geopolitical event texts.

[0027] The data for the rules and announcements is collected automatically through the exchange's official website, and includes at least announcements on adjustments to margin ratios, changes to price limits, and changes to position limits.

[0028] Market data and supply chain information are collected through CTP interface and third-party data API, including at least the best bid price, best ask price, latest price, spot price and historical market data.

[0029] Account transaction and position data are accompanied by a unique order number or transaction number. The system uses this field as the database primary key. When new data is inserted, if there is a primary key conflict, it will be automatically ignored, thus achieving accurate deduplication.

[0030] Text-based information data requires complex deduplication processing. For each news text, structured event tuples are extracted using a named entity recognition model and a text classification model. The specific formula is as follows:

[0031] in, This represents a structured event tuple for news item j. The entity representing the event, such as the name of a country, institution, or company, is extracted by the named entity recognition model. The event type is indicated by a single category output by the text classification model from preset categories. The preset categories include eight categories: tariff adjustments, geopolitical / military conflicts, monetary policy, production / supply reports, inventory / demand reports, macroeconomic data, weather / natural disasters, and routine news. This represents the set of variety codes involved, identified jointly by variety dictionary matching and named entity recognition. Indicates the time of the news release; For any two news articles j and k, the structured similarity is defined as the weighted sum of the matching function values ​​of each field, with the specific formula as follows:

[0032] in, This represents the structured similarity between two news articles, with values ​​ranging from [0, 1]. The closer the value is to 1, the higher the likelihood that the two news articles describe the same event. These represent the numbers of any two news articles, and they are not equal. This represents the set of fields participating in the matching, including four fields: event subject, event type, involved varieties, and publication time. Indicates field index, This indicates the matching weight of field d. This represents the matching function value of two news articles on field d; where, when That is, when the subject of the event is... , The value is 1 if the main events in the two news articles are exactly the same, otherwise it is 0; when That is, when it comes to event types, , The value is 1 if the two news articles have exactly the same event type, otherwise it is 0; When it comes to varieties, , The ratio of the intersection to the union of the sets of product codes involved in two news articles; when That is, at the time of publication, , The exponential decay function is defined by a preset time constant as the decay factor, and the specific formula is as follows:

[0033] in, This indicates the release time of news item j. This indicates the publication time of news item k. This represents the preset time constant, which is 1440 minutes, or 24 hours. The smaller the time difference between releases, the closer the function value is to 1. News reports on the same event are usually concentrated within a shorter time window. When the structural similarity of two news articles exceeds the preset duplication threshold, the two news articles are judged as duplicate events, and only the one published earlier is retained in the database. The preset duplication threshold is 0.7. Even if the titles and body texts of the two news articles are completely different, as long as the subject of the event, the type of event, and the types of products involved are highly consistent, they can be accurately identified as duplicates and deduplicated.

[0034] The rule announcement data has a fixed format and includes clearly structured fields such as variety code, adjustment type, values ​​before and after adjustment, and effective date. The system removes duplicates based on the composite primary key composed of variety code, announcement type, and effective date, and records with the same primary key are automatically overwritten and the latest one is retained.

[0035] Market data and industry chain data are deduplicated using a composite primary key consisting of the product code and the data date. For the same product on the same day, only the latest record is retained.

[0036] The account transaction and position data, market data and industry chain data are uniformly converted into Decimal precision and UTC+8 time format. A three-level mapping relationship table of account product investment advisor is established to record which product each account belongs to and which investment advisors are included in each product, so as to provide a data foundation for subsequent risk aggregation by product dimension. After deduplicating text information data, the system aggregates this data by category to obtain a set of news events for each category within a preset 24-hour time window, which serves as the data basis for subsequent information-related calculations.

[0037] Risk tolerance measures an account's ability to withstand additional adverse volatility in its current state. Existing solutions typically define tolerance solely as the equity-to-margin ratio, neglecting the impact of floating profits and losses. For instance, when an account incurs floating losses, some equity buffers are depleted, and the actual resilience is often significantly lower than the theoretical value indicated by the equity / margin ratio. Therefore, this application defines tolerance as the product of the equity buffer corresponding to a unit of margin and the percentage of equity not eroded by floating losses. The specific formula is as follows:

[0038] in, This indicates the risk tolerance of product C; a higher value indicates a stronger ability of the account to withstand additional adverse volatility. Index representing futures contracts, This indicates the current dynamic equity of the account, derived from account transaction and holding data. This represents the total margin held by all investment advisors on product c. This represents the floating profit or loss of investment advisor v on product c, with a positive value indicating profit and a negative value indicating loss. This indicates the total number of investment advisors. The index represents the investment advisor. The max function takes the absolute value of the loss portion of the floating profit and loss, excluding the profit portion, and reflects the actual consumed equity buffer. The first term in the formula reflects the equity buffer thickness corresponding to each unit of margin. The larger this ratio is, the more sufficient the equity support is under the same margin level. The second term represents the proportion of current equity that has not yet been eroded by floating losses. Multiplying them together gives the account's true resilience.

[0039] Net sentiment bias measures the overall sentiment direction of recent information towards a specific commodity. For each commodity, the system collects all relevant news within a preset 24-hour time window and then calculates the net sentiment bias using the following formula:

[0040] in, This represents the net sentiment bias for product c, ranging from -1 to 1. Negative values ​​indicate generally bearish recent news, while positive values ​​indicate generally bullish news. The closer the absolute value is to 1, the clearer the sentiment direction. This represents the collection of all news related to variety c in the past 24 hours, provided by the aggregation results by variety in Part Three. The sentiment polarity value of news item j is represented, ranging from [-1, 1]. It is obtained by joint inference of the news headline and body text using the FinBERT pre-trained sentiment analysis model in the financial field. Negative values ​​indicate negative news, and positive values ​​indicate positive news. Let represent the correlation coefficient between news item j and variety c, with a value range of [0, 1]. This coefficient is determined by the variety matching degree in the structured event tuples extracted in Part Two. A higher matching degree indicates a greater relevance between the news and the variety. If the news explicitly mentions the variety, then... Take 1.0. If the news mentions the sector to which variety C belongs, but does not include the specific variety code, then take 1.0. A moderate value, such as 0.5, is considered if the news does not mention the variety or its sector. The value is 0. It represents extremely small positive numbers, usually taken as 10⁻⁸, to prevent the denominator from being zero; The cumulative news impact intensity is used to quantify the total information impact of recent news on a specific commodity. For each commodity, the specific formula for the cumulative news impact intensity within a preset time window of 24 hours is as follows:

[0041] in, This indicates the cumulative impact of news on variety c, reflecting the total information impact of recent news on that variety. This represents the absolute value of the news sentiment polarity, measuring the degree of extremity of the news, without distinguishing between positive or negative trends. This represents the weight of event type, mapped from the event types identified by the text classification model. Different types of events have varying degrees of impact and duration on futures prices. This indicates the number of minutes since the news release. This represents the half-life of the news impact for product C, i.e., the time required for the news impact to decay to half of its initial value. Different values ​​are assigned to different products due to differences in market attention and information response speed. Examples of mapping relationships in the event type weights of this embodiment include: tariff adjustments 0.95, geopolitical / military conflicts 0.85, monetary policy 0.70, production / supply reports 0.65, inventory / demand reports 0.65, macroeconomic data 0.50, weather / natural disasters 0.55, and routine news 0.30. Specific examples of news impact half-life include: non-ferrous metals 120 minutes, agricultural products 240 minutes, precious metals 60 minutes, and ferrous metals 180 minutes. The specific formula for the normalized value of the cumulative impact of news is:

[0042] in, The normalized value representing the cumulative impact of news. This represents the preset maximum impact tolerance value, which is 5.0 in this embodiment. When this tolerance value is exceeded, the min function will truncate the normalized value to 1.

[0043] External pressure is used to comprehensively describe the total intensity of the adverse forces exerted by the current market environment on the held positions. This indicator is formed by superimposing three components: information pressure, regulatory pressure, and market pressure, and the specific formula is:

[0044] wherein, represents the external pressure of the variety c, which is dimensionless; a larger value indicates that the market environment is more unfavorable to the held position, represents the absolute value of the net sentiment bias, reflecting the overall directional intensity of information. Regardless of whether it is positive or negative, intense information directionality itself constitutes pressure, represents the normalized value of the margin increase amplitude, that is, the positive deviation amplitude of the current margin ratio relative to the average value of the past 30 days, represents the normalized value of the price limit change, that is, the absolute value of the relative change of the current price limit amplitude relative to the reference amplitude, represents the volatility anomaly indicator, that is, the positive deviation amplitude of the current day's realized volatility (calculated by obtaining the standard deviation from the intraday 5-minute return series) relative to the average volatility of the past 20 trading days, represents the absolute value of basis deviation, that is, calculate the spot price minus the futures price, then take the proportion of the absolute value of this value in the futures price to obtain the relative deviation rate; In the real market, when multiple pressure factors appear simultaneously, a resonance effect will occur, and the risk will be amplified non-linearly. Therefore, a non-linear coupling term is introduced to capture this synergistic amplification effect when multiple factors simultaneously exceed the threshold, and the specific formula is:

[0045] wherein, represents the non-linear coupling term of the variety c, which only generates a positive value when multiple pressure sub-factors exceed their respective thresholds at the same time, represents the total number of pressure sub-factors, with a value of 5. The five pressure sub-factors respectively correspond to the sentiment intensity , the news impact intensity , the regulatory pressure sub-item , the volatility anomaly , and the basis deviation , represents the index of the pressure sub-factor, the value ranges of p and q are both from 1 to m, and p<q, which is used to traverse all pairwise factor combinations, represents the value of the p-th pressure sub-factor, represents the value of the q-th pressure sub-factor, represents the coupling amplification coefficient of factor p and factor q. Usually, only 5 groups of non-zero coupling pairs are preset: the coupling between information and regulation is set to 0.8, the coupling between information and market volatility Taking 0.7, the coupling of information and market basis Taking 0.7, the coupling between rules and market volatility Taking 0.6, the coupling of rules and market basis The amplification factor is set to 0.6, while the coupling amplification factor for the remaining paired components is typically set to 0. This represents the scaling parameter, which controls the saturation threshold; the default value is 0.5. This represents the historical 80th quantile threshold of the p-th pressure sub-factor. This represents the historical 80th quantile threshold of the q-th pressure sub-factor. This indicates an indicator function that takes a value of 1 when the pressure sub-factor exceeds its historical 80th percentile threshold, and 0 otherwise. When multiple stress factors are at high levels simultaneously, the risk is not only equal to the sum of the components, but also includes the resonance component represented by the product of the components. The total external pressure is the sum of the linear external pressure and the nonlinear coupling term, as shown in the following formula:

[0046] in, This represents the total external pressure on variety c. The coupling term is not introduced to replace linear pressure, but rather to add an additional positive increment on top of linear pressure when multiple pressure sub-factors exceed their respective thresholds, in order to simulate the additional risks brought about by multi-factor resonance.

[0047] Before external pressure is applied to an account, it must be transmitted through the market environment. The same external pressure has a limited impact in a market with ample liquidity, but it can trigger a severe shock when liquidity is scarce. Therefore, an environmental transmission coefficient is defined to quantify this effect. The specific formula is as follows:

[0048] in, The environmental transmission coefficient for variety c is dimensionless and ranges from [1, ∞). A value closer to 1 indicates a favorable market environment with minimal transmission of external pressure, while a larger value indicates a harsh market environment with amplified transmission of external pressure. This indicates the bid-ask spread. This indicates the current latest price of variety C. This represents the average price of commodity C over the past 20 trading days; The comprehensive risk score of a product is defined as the ratio of the total external pressure amplified by the environment to the risk carrying capacity. The specific formula is as follows:

[0049] in, The comprehensive risk score for product C represents the external pressure borne by each unit of bearing capacity. It is the final risk assessment basis of this invention and is essentially a pressure / bearing capacity ratio model that enables the account status to achieve dynamic self-adaptation. When the account is profitable and equity increases, the bearing capacity increases accordingly, and the comprehensive risk score automatically decreases. When the account is losing money and floating losses increase, the bearing capacity decreases, and the comprehensive risk score automatically increases. When external pressure, amplified by the environment, exactly equals the account's capacity, the comprehensive risk score... The value is set to 1.0. In this state, any additional, even minor, adverse fluctuations will theoretically cause account instability. Therefore, this application defines three risk ranges: when... A value less than 0.5 indicates a safe range, meaning the bearing capacity is much greater than the pressure; when 0.5 ≤ A value less than 1.0 indicates a critical range, suggesting that the pressure is approaching the bearing capacity; when... A value of ≥1.0 indicates a warning range, signifying that the pressure has reached or exceeded the bearing capacity, and corresponding risk control measures must be taken.

[0050] The warnings are divided into the following three types: 1. Comprehensive risk warning, which is triggered when the comprehensive risk score of a product reaches or exceeds 1.0. At this time, the external pressure is equal to or exceeds the bearing capacity and has a clear physical boundary; 2. Independent position warning, which is triggered when the account risk level exceeds 80%, the intraday drawdown exceeds 5%, or the net value falls by more than 3%; 3. Compound emergency warning, which is triggered when the same product triggers both the independent position warning and the comprehensive risk warning. The warning has the highest priority. In actual delivery, the comprehensive risk warning is further divided into three sub-types based on the different triggering factors: text information warning, rule change warning, and coupled trigger warning.

[0051] Once an alert is triggered, the system automatically generates a structured alert report, which includes a snapshot of account equity, alert type and triggering reason, risk three-factor decomposition information, details of non-linear coupling triggers, details of high-risk holdings, a summary of related information, and rule change notifications. The alert is delivered to the administrator in real time via both WeChat Work and Lark, employing a trading day deduplication strategy; alerts of the same type and dimension are only pushed once per trading day.

[0052] It should be noted that the emotion referred to in this invention is a standard term in the field of natural language processing, referring to the quantitative analysis of the positive or negative tendencies expressed in news texts, rather than an emotion indicator in the sense of psychology or behavioral finance.

[0053] like Figure 2 As shown, an automatic data acquisition and risk warning system for multi-source heterogeneous financial data is used to implement any of the methods described above for automatic data acquisition and risk warning for multi-source heterogeneous financial data, including: The multi-source heterogeneous data acquisition module is used to collect multi-source heterogeneous data, including at least account transaction and position data, text information data, rule announcement data, and market and industry chain data. The multi-source heterogeneous data deduplication module is used to perform deduplication processing on the collected multi-source heterogeneous data respectively: the account transaction and position data are deduplicated using a unique order number or transaction number as the database primary key; the rule announcement data is deduplicated using a composite primary key composed of product code, announcement type, and effective date; the text information data is deduplicated using structured event tuple matching; and the market information and industry chain data are deduplicated using a composite primary key composed of product code and data date. The data standardization and aggregation module is used to convert the deduplicated account transaction and position data, as well as the market data and industry chain data, into a unified standard precision and time format, and to establish a three-layer mapping relationship table for account products and investment advisory services; it also aggregates the text information data by product dimension and calculates the set of news events for each product within a preset time window. The risk tolerance calculation module is used to calculate the risk tolerance of each instrument based on the current dynamic equity of the account, the total margin held in the instrument, and the total floating loss in the instrument. The external total pressure calculation module is used to calculate the external pressure of each product based on the net sentiment bias, the intensity of the cumulative impact of news, the margin increase, the change of the price limit, the volatility anomaly index, and the absolute value of the basis deviation. It also calculates nonlinear coupling terms based on each pressure sub-factor and adds the external pressure to the nonlinear coupling terms to obtain the external total pressure of the product. The comprehensive risk score calculation module is used to calculate the environmental transmission coefficient for each product based on the deviation of the bid-ask spread from the current price to the average price of the past preset trading days. The comprehensive risk score for the product is obtained by multiplying the total external pressure by the environmental transmission coefficient and then dividing by the risk tolerance. The early warning judgment and push module is used to trigger a comprehensive risk warning when the comprehensive risk score is greater than or equal to a preset physical boundary threshold, and to trigger an independent position warning when any of the following indicators exceeds the corresponding preset threshold: account risk level, intraday drawdown, or net value decline. When the same product triggers both the independent position warning and the comprehensive risk warning, a compound emergency warning is triggered. After the warning is triggered, a structured warning report is generated and pushed to the manager.

[0054] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the processor performs any of the methods described above for automatic acquisition and risk warning of multi-source heterogeneous financial data.

[0055] The embodiments described herein are merely preferred embodiments of the invention and are not intended to limit the concept and scope of the invention. Any modifications and improvements made by those skilled in the art to the technical solutions of the invention without departing from the design concept of the invention should fall within the protection scope of the invention.

Claims

1. A method for automatic collection and risk warning of multi-source heterogeneous financial data, characterized in that, Includes the following steps: Step S1: Collect multi-source heterogeneous data through a multi-source heterogeneous data acquisition engine. The multi-source heterogeneous data includes at least account transaction and position data, text information data, rule announcement data, and market conditions and industry chain data. Step S2: Deduplicate the account transaction and position data by using a unique order number or transaction number as the database primary key; The rule announcement data is deduplicated using a composite primary key consisting of the variety code, announcement type, and effective date; text information data is deduplicated using structured event tuple matching; and market data and industry chain data are deduplicated using a composite primary key consisting of the variety code and data date. Step S3: Perform data standardization and aggregation on the deduplicated multi-source heterogeneous data, and convert the account transaction and position data and the market and industry chain data into a unified standard precision and unified time format, and establish a three-layer mapping relationship table for account products and investment advisory; aggregate the text information data by product dimension, and calculate the set of news events for each product within a preset time window; Step S4: For each instrument, calculate the risk tolerance of that instrument based on the current dynamic equity of the account, the total margin held on that instrument, and the total floating loss on that instrument; the risk tolerance represents the account's ability to withstand additional adverse fluctuations. Step S5: For each instrument, calculate the external pressure based on the net sentiment bias, cumulative news impact intensity, margin increase, limit up / down change, volatility anomaly index, and absolute value of basis deviation. Calculate the nonlinear coupling term based on each pressure sub-factor, and add the external pressure to the nonlinear coupling term to obtain the total external pressure for the instrument. Step S6: For each commodity, calculate the environmental transmission coefficient based on the deviation of the bid-ask spread from the current price to the average price of the past preset trading days. Multiply the total external pressure by the environmental transmission coefficient and divide by the risk tolerance to obtain the comprehensive risk score of the commodity. Step S7: When the comprehensive risk score is greater than or equal to the preset physical boundary threshold, a comprehensive risk warning is triggered. When any of the indicators of account risk level, intraday drawdown or net value decline exceeds the corresponding preset threshold, an independent position warning is triggered. When the same product triggers both the independent position warning and the comprehensive risk warning, a compound emergency warning is triggered. Once an alert is triggered, a structured alert report is generated and pushed to the administrator.

2. The method according to claim 1, characterized in that, In step S1, the account transaction and position data are collected by connecting to an external investment advisory management platform via a REST API and directly connecting to the futures exchange via the CTP native protocol. This data includes at least dynamic equity, margin usage, floating profit and loss, account risk level, transaction records, order records, and deposit / withdrawal records. The text information data is collected through public API interfaces and RSS subscription sources, including at least policy news, tariff adjustment news, industry news, and geopolitical event texts. The rule announcement data is automatically collected from the exchange's official website, including at least announcements regarding margin ratio adjustments, changes to price limits, and changes in position limits. The market and industry chain data are collected through CTP interfaces and third-party data APIs, including at least the best bid price, best ask price, latest price, spot price, and historical market data.

3. The method according to claim 1, characterized in that, In step S2, text information data is deduplicated through structured event tuple matching. Specifically, for each news text, structured event tuples are extracted using a named entity recognition model and a text classification model. These structured event tuples include the event subject, event type, set of related product codes, and publication time. For any two news articles, a structured similarity is calculated. This structured similarity is a weighted sum of the subject matching function value, type matching function value, product matching function value, and time matching function value. The subject matching function value is calculated when the event subjects of the two news articles are completely identical. The value is 1 if the events are identical, otherwise it is 0; the type matching function value is 1 if the event types of the two news articles are completely identical, otherwise it is 0; the variety matching function value is the ratio of the intersection to the union of the variety codes of the two news articles; the time matching function value is an exponential decay function with a preset time constant as the decay factor, and the smaller the difference in publication time, the larger the time matching function value; when the structured similarity is greater than or equal to the preset duplicate determination threshold, the two news articles are determined to be duplicate events, and only the one with the earliest publication time is retained in the database.

4. The method according to claim 1, characterized in that, In step S4, the risk tolerance is calculated as follows: the current account dynamic equity is divided by the total margin to obtain the first factor; the total floating loss is divided by the current account dynamic equity to obtain the floating loss ratio, and then the floating loss ratio is subtracted by one to obtain the second factor; the first factor and the second factor are multiplied to obtain the risk tolerance; the total floating loss is the sum of the loss portion of the floating profit and loss of all investment advisors on this product, and the profit portion is not included in the total floating loss.

5. The method according to claim 4, characterized in that, In step S5, the net sentiment bias is calculated as follows: For each commodity, all news related to that commodity are obtained within the preset time window; for each news item, the sentiment polarity value output by a pre-trained sentiment analysis model in the financial field is obtained, and the correlation coefficient between the news item and the commodity is obtained; the product of the sentiment polarity value and the correlation coefficient of each news item is accumulated, and divided by the sum of the correlation coefficients of all news items and the sum of the preset minimum positive number to obtain the net sentiment bias; The cumulative impact intensity of the news is calculated as follows: for each type, all news related to that type are obtained within the preset time window; for each news item, the absolute value of the sentiment polarity value, the correlation coefficient, the event type weight, and the exponential decay factor are obtained. The cumulative impact intensity of the news is obtained by multiplying and summing the absolute value of the sentiment polarity value, the correlation coefficient, the event type weight, and the exponential decay factor. The exponential decay factor uses the number of minutes between the news release time and the current time as the independent variable and the half-life of the product as the decay constant. The more recent the news release time, the larger the exponential decay factor. The event type weight is obtained by mapping the event type of the news, and different event types correspond to different weight values. The normalized value of the cumulative impact intensity of the news is obtained by taking the smaller value between the cumulative impact intensity of the news divided by the preset maximum impact tolerance value and one.

6. The method according to claim 5, characterized in that, In step S5, the external pressure is calculated as follows: the product of the absolute value of the net sentiment bias and the normalized value of the cumulative impact intensity of the news is taken as the information pressure sub-item; the sum of the normalized value of the margin increase and the normalized value of the price limit change is taken as the rule pressure sub-item. The sum of volatility anomaly indicators and the absolute value of basis deviation is used as the market pressure sub-item; The external pressure is obtained by adding the information pressure sub-item, the rule pressure sub-item, and the market pressure sub-item. The calculation of the nonlinear coupling term specifically includes the following steps: setting each pressure sub-factor, which includes the absolute value of the net sentiment bias, the normalized value of the cumulative impact intensity of news, the regular pressure sub-term, the volatility anomaly index, and the absolute value of the basis deviation; for each pressure sub-factor, calculating its historical quantile threshold; when two pressure sub-factors simultaneously exceed their respective historical quantile thresholds, dividing the product of the two pressure sub-factors by a preset scaling parameter and inputting it into a hyperbolic tangent function for nonlinear saturation compression, then multiplying by a preset coupling amplification coefficient to obtain the coupling contribution value between the two pressure sub-factors; summing the coupling contribution values ​​between each pair of pressure sub-factors to obtain the nonlinear coupling term.

7. The method according to claim 6, characterized in that, In step S6, the environmental transmission coefficient is calculated as follows: using one as the base, adding the bid-ask spread rate, and adding the deviation of the current price relative to the average price of the past preset trading days; the deviation is the absolute value of the difference between the current price and the average price of the past preset trading days divided by the average price of the past preset trading days; the bid-ask spread rate is the difference between the best ask price and the best bid price divided by the average of the best ask price and the best bid price; the comprehensive risk score is calculated as follows: multiplying the total external pressure by the environmental transmission coefficient to obtain the numerator, adding the risk tolerance to a preset minimum positive number to obtain the denominator, and dividing the numerator by the denominator to obtain the comprehensive risk score; the preset physical boundary threshold is one; when the comprehensive risk score is greater than or equal to the preset physical boundary threshold, it indicates that the external pressure has reached or exceeded the risk tolerance.

8. The method according to claim 7, characterized in that, In step S7, the structured early warning report includes an account equity snapshot, risk three-factor decomposition information, nonlinear coupling trigger details, high-risk position details, related information summary, and rule change prompts; the risk three-factor decomposition information includes the current values ​​of risk tolerance, total external pressure, and environmental transmission coefficient; the nonlinear coupling trigger details mark the factor pairings that produce a coupling amplification effect when the ratio of the nonlinear coupling term to the total external pressure exceeds a preset ratio threshold.

9. An automatic data acquisition and risk warning system for multi-source heterogeneous financial data, used to implement the automatic data acquisition and risk warning method for multi-source heterogeneous financial data as described in any one of claims 1-8, characterized in that, include: The multi-source heterogeneous data acquisition module is used to collect multi-source heterogeneous data, including at least account transaction and position data, text information data, rule announcement data, and market and industry chain data. The multi-source heterogeneous data deduplication module is used to perform deduplication processing on the collected multi-source heterogeneous data respectively: the account transaction and position data are deduplicated using a unique order number or transaction number as the database primary key; the rule announcement data is deduplicated using a composite primary key composed of product code, announcement type, and effective date; the text information data is deduplicated using structured event tuple matching; and the market information and industry chain data are deduplicated using a composite primary key composed of product code and data date. The data standardization and aggregation module is used to convert the deduplicated account transaction and position data, as well as the market data and industry chain data, into a unified standard precision and time format, and to establish a three-layer mapping relationship table for account products and investment advisory services; it also aggregates the text information data by product dimension and calculates the set of news events for each product within a preset time window. The risk tolerance calculation module is used to calculate the risk tolerance of each instrument based on the current dynamic equity of the account, the total margin held in the instrument, and the total floating loss in the instrument. The external total pressure calculation module is used to calculate the external pressure of each product based on the net sentiment bias, the intensity of the cumulative impact of news, the margin increase, the change of the price limit, the volatility anomaly index, and the absolute value of the basis deviation. It also calculates nonlinear coupling terms based on each pressure sub-factor and adds the external pressure to the nonlinear coupling terms to obtain the external total pressure of the product. The comprehensive risk score calculation module is used to calculate the environmental transmission coefficient for each product based on the deviation of the bid-ask spread from the current price to the average price of the past preset trading days. The comprehensive risk score for the product is obtained by multiplying the total external pressure by the environmental transmission coefficient and then dividing by the risk tolerance. The early warning judgment and push module is used to trigger a comprehensive risk warning when the comprehensive risk score is greater than or equal to a preset physical boundary threshold, to trigger an independent position warning when any of the indicators of account risk level, intraday drawdown or net value decline exceeds the corresponding preset threshold, and to trigger a compound emergency warning when the same product triggers both the independent position warning and the comprehensive risk warning. Once an alert is triggered, a structured alert report is generated and pushed to the administrator.

10. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the processor performs the automatic acquisition and risk warning method for multi-source heterogeneous financial data as described in any one of claims 1 to 8.