Customer risk portrait generation method and system based on large language model

By combining large language models with multi-source MCP tools, a structured risk indicator system and public opinion screening mechanism are constructed, which solves the problems of unstructured input, weak dynamic perception capability and uncontrollable output in customer risk profiling, and realizes a financial risk control solution with high accuracy and interpretability.

CN122155833APending Publication Date: 2026-06-05HEFEI UNIV OF TECH +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HEFEI UNIV OF TECH
Filing Date
2026-01-23
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies for customer risk profiling suffer from problems such as unstructured inputs, weak dynamic perception capabilities, uncontrollable outputs, and insufficient interpretability, making it difficult to achieve high accuracy, interpretability, and auditability in financial risk control scenarios.

Method used

By employing a large language model and multi-source MCP tools in synergy, a 15-item structured risk indicator system for the futures industry is constructed. This system integrates document parsing, public opinion screening, and rule calculation, introduces a risk keyword-driven public opinion screening mechanism, and uses LoRA fine-tuning to ensure that the model outputs a structured risk assessment report.

Benefits of technology

It achieves comprehensive and forward-looking risk identification, and the output results have high accuracy, strong consistency and complete evidence chain, meeting the interpretability and compliance requirements of financial risk control, and providing a reusable technical paradigm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122155833A_ABST
    Figure CN122155833A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence and financial risk control, in particular to a customer risk portrait generation method and system based on a large language model. The method first acquires multiple structured customer indicators of a customer, calls an MCP tool chain to read user data files and external public opinions after filtering keywords, and generates a four-dimensional initial score through self-developed risk calculation MCP; then, a prompt word containing reasoning steps is constructed and input into a large language model fine-tuned by LoRA, and a structured report containing a risk level (C1-C4), four-dimensional score details, a key evidence chain and management suggestions is output; finally, the result is stored in an encrypted manner and an audit log is recorded. The application realizes high accuracy, strong interpretability and full-process traceability of risk assessment, and effectively supports the intelligent risk control and compliance supervision needs of financial institutions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and financial risk control technology, and more specifically, to a method and system for generating customer risk profiles based on large language models. Background Technology

[0002] In the financial sectors such as securities and futures, customer risk profiling, as a core component of the risk control system, has long relied on rule engines or traditional machine learning models for assessment. Traditional rule engines typically make static judgments based on preset thresholds (such as "≥3 forced liquidations are considered high risk"). While interpretable, they struggle to integrate the correlations between multidimensional indicators and have limited ability to identify customers with "normal trading behavior but hidden risks" (such as deteriorating public opinion or related-party transactions). Supervised learning models, such as logistic regression and XGBoost, can handle high-dimensional features and improve accuracy, but their outputs are black-box probabilities or scores, lacking explanations of the decision-making basis and failing to meet the financial regulatory requirements for "explainability, auditability, and traceability."

[0003] In recent years, large language models (LLMs) have been explored for application in financial intelligence analysis due to their powerful semantic understanding and generation capabilities. However, general-purpose large language models still face three major bottlenecks in customer risk profiling tasks: (1) Unstructured input: If raw transaction logs or free text are directly input, the model may ignore key risk indicators, leading to evaluation bias; (2) Lack of dynamic perception capability: unable to integrate external risk signals (such as regulatory penalties, rumors of market manipulation, and other public opinion information) in real time, making it difficult to respond to sudden risk events; (3) Uncontrollable output: The generated content has a free format and loose logic, often lacking scoring basis or evidence chain, and cannot be directly used for automated risk control decision-making or regulatory reporting.

[0004] Although existing research has proposed extending the capabilities of large models through tool invocation (such as Model Calling Protocol, MCP), most existing solutions focus on general tasks (such as search and computation) and have not designed domain-specific structured input systems, dynamic public opinion screening mechanisms and standardized output templates for financial risk control scenarios, resulting in insufficient practicality and reliability. Summary of the Invention

[0005] To overcome the problems of unstructured input, weak dynamic perception, uncontrollable output, and insufficient interpretability in the existing technologies for customer risk profiling, this invention provides a customer risk profiling generation method based on a large language model. This method deeply integrates internal structured data, external dynamic public opinion, and rule calculation results, and guides the large language model to generate a risk profile with high accuracy, strong interpretability, and full-process auditability, thus breaking through the application bottleneck of MCP technology in complex financial scenarios.

[0006] This invention proposes a method for generating customer risk profiles based on a large language model, comprising the following steps: The system calls the File Parsing MCP to parse the user data file in conjunction with the user prompt template, and obtains the parsing results of the structured customer indicators defined in the user prompt template, which is recorded as customer indicator parsing; it calls the Risk Preliminary Assessment MCP to perform a preliminary score in conjunction with the customer indicator parsing and outputs the preliminary assessment results; and it calls the Public Opinion Screening MCP to filter relevant public opinion results from the raw news data stream. Based on the provided template, the customer indicator analysis, public opinion results, and preliminary assessment results are assembled and structured. Then, they are input into a large language model to obtain a structured risk assessment report, which includes risk level assessment and differentiated management recommendations.

[0007] Preferred structured client metrics include: average daily ending equity over the past six months, cumulative interest contribution over the past six months, cumulative total transaction fees over the past six months, number of times the post-settlement difference in transaction funds exceeds 100,000, number of forced liquidations, number of disputes and complaints regarding reasonable forced liquidation handling, number of abnormal trading behaviors, number of times low margin requirements are increased, average daily transaction risk, profit / loss ratio over the past month, win rate over the past year, number of open positions, client tenure, and client attributes.

[0008] Preferably, the public opinion screening MCP obtains news texts related to the customer from external public opinion sources, and filters the news texts based on a preset risk keyword set to extract highly relevant public opinion segments containing negative risk signals. The preset risk keyword set includes "punishment", "manipulation", "forced liquidation", "litigation", "abnormal transaction", "finance" and "risk". The screening criteria for highly relevant public opinion segments containing negative risk signals are: the news text contains at least one risk keyword, the sentiment is negative or neutral to negative, and the entity identification result matches the customer name.

[0009] Preferably, a mapping relationship between risk level and comprehensive score range is defined; the initial risk assessment MCP calculates the customer's sub-scores and bonus scores in four dimensions—contribution ability, risk control ability, risk preference, and profitability—according to the structured customer indicators and preset scoring rules, and sums all scores to generate a final comprehensive score. The risk level is initially assessed based on the comprehensive score range in which the final comprehensive score falls; the bonus scores are calculated based on customer attributes, number of holdings, and customer tenure, with bonus points awarded when the customer is a bank custodian account; the structured risk assessment report output by the large language model includes detailed scores for the four dimensions, key evidence chains corresponding to each score, the final risk level, and differentiated management recommendations.

[0010] Preferred customer contribution capability score Score for equity-interest portfolio A With transaction fee score S B The higher of the; ; ; Where E is the average daily ending equity over the past six months (unit: RMB 10,000), I is the cumulative interest contribution over the past six months (unit: RMB 10,000), and F is the cumulative total handling fee over the past six months (unit: RMB 10,000); G1, G2, and G3 are the judgment thresholds for the average daily ending equity E, cumulative interest contribution I, and cumulative total handling fee F of related customers over the past six months, respectively; min indicates taking the smaller value.

[0011] Preferred customer risk control capability score The calculation formula is: ; in, This refers to the number of times the settled funds exceed the set amount required by the exchange. This refers to the number of times the funds after settlement fall below the required set amount. For the number of forced liquidations, The number of times disputes or complaints have been raised regarding forced eviction proceedings. The number of abnormal transaction behaviors. The maximum value indicates the number of times the margin requirement is increased due to low margin.

[0012] Preferred, customer risk preference score The calculation formula is: ; Where R represents the average daily exchange risk level, and max indicates taking a larger value.

[0013] Preferred customer profitability score The calculation formula is: ; Where: P is the profit / loss ratio in the past month, W is the winning rate in the past year, min indicates taking the smaller value, and max indicates taking the larger value.

[0014] Preferably, customer metric analysis, public opinion results, and preliminary evaluation results are input into a large language model fine-tuned by LoRA via an AI Agent for processing.

[0015] The present invention proposes a customer risk profile generation system, comprising: a user data layer, an MCP tool scheduling layer, and a large language model inference layer; The user data layer includes internal business systems and an external public opinion platform. The internal business systems are used to output user data files containing structured customer metrics, while the external public opinion platform is used to crawl information from external networks and provide raw news data streams. The MCP tool scheduling layer includes various MCP tools, including: the file parsing MCP, which combines user prompt templates to parse user data files and obtain the parsing results of structured customer indicators defined in the user prompt templates, denoted as customer indicator parsing; the risk assessment MCP, which combines customer indicator parsing to perform preliminary scoring and output preliminary assessment results; and the public opinion screening MCP, which filters relevant public opinion results from the raw news data stream. The large language model inference layer combines system prompts and standardized input to obtain output results; the output results are parsed into standardized JSON objects and saved; the standardized input is obtained by structurally encapsulating the customer indicator analysis, public opinion results and preliminary evaluation results output by the MCP tool scheduling layer according to the prompt template.

[0016] The advantages of this invention are: (1) The customer risk profile generation method based on the big language model proposed in this invention is based on the collaboration of the big language model and multi-source MCP tools. By constructing a structured risk indicator system of 15 items for the futures industry and integrating three types of MCP tools, namely document parsing, public opinion screening and rule calculation, it realizes the deep integration of internal behavioral data, external dynamic signals and domain knowledge rules, which significantly improves the comprehensiveness and foresight of risk identification.

[0017] (2) In the process of model reasoning, this invention introduces a risk keyword-driven public opinion screening mechanism and prompt template, and combines a manually constructed dataset to perform LoRA adaptation on the large language model, effectively guiding the model to reason step by step according to the preset logic, ensuring that the output results have high accuracy, strong consistency and complete evidence chain, and solving the core problem of uncontrollable output and unfounded conclusions of general large models in financial scenarios.

[0018] (3) This invention defines a standardized output structure that includes four-dimensional scoring (contribution capability, risk control capability, risk preference, profitability), key evidence chain, risk level (C1–C4) and management recommendations. It not only meets the actual business needs of front-line risk control personnel for understandable results, verifiable logic and actionable recommendations, but also fully supports regulatory audit and compliance traceability. It provides a reusable technical paradigm for financial institutions to implement explainable AI and has good scalability, adaptability and wide promotion value.

[0019] (4) In summary, this invention defines and applies 15 structured customer risk indicators for the futures industry, constructs a three-stage MCP tool call process, adopts LoRA fine-tuning, and forces the model to output a structured risk assessment report. By constructing a domain-specific structured data input system, designing an MCP (Model Calling Protocol) toolchain collaboration mechanism, introducing a public opinion keyword screening strategy, and defining a standardized four-dimensional interpretable output template, it provides technical support and implementation path for financial institutions to achieve precise risk control, compliant supervision, and intelligent decision-making. Attached Figure Description

[0020] Figure 1 This is a structural diagram of the customer risk profile generation method proposed in this invention using a large language model. Figure 2 This is a flowchart of the customer risk profile generation process proposed in this invention using a large language model. The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] This embodiment proposes a customer risk profile generation system based on a large language model. It generates a structured risk assessment report of the customer risk profile based on the input user prompt template and user data file, which summarizes the user's comprehensive score, interpretation and analysis, and differentiated management suggestions.

[0022] Reference Figure 1 The customer risk profile generation system based on the big language model includes: a user data layer, an MCP tool scheduling layer, and a big language model inference layer.

[0023] The user data layer includes internal business systems and an external public opinion platform. The internal business systems are used to output user data files containing 15 structured customer metrics, while the external public opinion platform is used to crawl information from external networks and provide raw news data streams.

[0024] The MCP tool scheduling layer consists of MCPs and an AI Agent. User prompt templates are first passed to the AI ​​Agent. The AI ​​Agent receives instructions through its interface with the large language model and sequentially calls each MCP according to these instructions. Specifically, the AI ​​Agent calls the file parsing MCP to parse the user data file to obtain the parsing results of structured customer metrics (referred to as customer metric parsing), calls the public opinion filtering MCP to filter relevant public opinion results from the raw news data stream, calls the risk preliminary assessment MCP to combine the structured customer metric parsing results (referred to as customer metric parsing) to perform a preliminary score and output the preliminary assessment result, and finally, the AI ​​Agent summarizes the information (including structured customer metrics, public opinion results, and preliminary assessment results) to generate the standardized input for the large language model.

[0025] Specifically, the user prompt template directly defines structured customer metrics. The file parsing MCP obtains the parsing results of each structured customer metric by parsing the user data file and fills them into the user prompt template, thereby obtaining the corresponding values ​​of each structured customer metric, which is referred to as customer metric parsing.

[0026] The large language model inference layer includes a prompt word constructor, a structured parser, and a secure storage area. The prompt word constructor generates system prompt words by aggregating information collected by the AI ​​Agent and passes them to the large language model. The large language model combines the system prompt words with the standardized input to obtain the output. The structured parser parses the output of the large language model into a standardized JSON object for easy storage. The secure storage area records all MCP and large language model call information.

[0027] Reference Figure 2 The generation process of the customer risk profile generation system based on a large language model proposed in this embodiment includes the following steps: S1. Obtain the user data file and extract the file parsing results of the customer structured indicators, i.e., the values ​​of each customer structured indicator (referred to as customer indicator parsing): The user data file contains the customer's name, account number, and customer structured indicators. Specifically, the customer structured indicators may include 15 predefined risk indicators extracted from the internal business system. These 15 indicators are structured data elements specifically designed for risk assessment of futures and securities customers. Some indicator definitions and business uses are as follows: 1) Average daily equity at the end of the period over the past six months: The average account equity of the customer after daily settlement over the past six months (unit: RMB 10,000), used to measure the customer's financial strength and as the core basis for contribution capacity scoring; 2) Cumulative interest contribution and total transaction fees in the past six months: These reflect the customer's overall contribution level in terms of interest and transaction fees, respectively. The higher the value, the higher the contribution ability score. 3) Number of times the difference in exchange funds after settlement exceeds 100,000 (long / short): This indicates the frequency with which the client maintains a high margin buffer in both long and short positions, reflecting their risk resistance capability; 4) Number of forced liquidations and the number of disputes and complaints regarding reasonable forced liquidation handling: This directly reflects the forced liquidation events caused by the client's poor margin management and their subsequent disputes. The more times there are, the lower the risk control capability score. 5) Number of abnormal trading activities and number of times the margin was increased due to low margin requirements: Compliance risk signals identified by the internal risk control system, used to assess the compliance of customer operations; 6) Daily average exchange risk level: This is the daily average value of the ratio of open position value to margin, divided into high, relatively high, medium and low levels according to the range, used to quantify the client's risk preference; 7) Profit / loss ratio in the past month and win rate in the past year: Assess the client's profitability from the perspectives of short-term profit performance and long-term trading win rate respectively; 8) Number of contracts held: The number of different contracts held or traded by the client, reflecting the degree of investment diversification; 9) Customer duration: The length of time a customer has been active since the account was opened. A longer duration usually indicates a higher level of customer maturity. 10) Customer attributes: including ordinary natural persons, legal persons, asset management accounts, bank custody accounts, etc.; S2. The system calls the multi-source MCP toolchain to integrate internal and external information and complete the data preparation required for risk profiling while ensuring data security.

[0028] Specifically, the multi-source MCP toolchain includes a file parsing MCP, a TrendRadar public opinion MCP, and a self-developed risk assessment MCP module.

[0029] Step S2 first calls the File Parsing MCP to read the user data file (such as CSV or Excel format). Before accessing the user data file, the File Parsing MCP tool has irreversibly masked or hashed direct identifiers such as customer names and account numbers. Only the de-identified structured fields (such as average daily equity, historical liquidation records, etc.) are extracted as the file parsing results of customer structured indicators (customer indicator parsing), ensuring that the customer indicator parsing input to the large language model does not contain personally identifiable information. All data access operations of the File Parsing MCP are subject to role-based access control and are limited to the established business purpose of risk assessment, complying with the principles of data minimization and purpose limitation. Data minimization means that users only have access to the minimum amount of data, and purpose limitation means that the collection of data must have a clear, legal, and specific purpose, and subsequent data processing activities must not exceed this specific purpose. The specific purpose is set manually.

[0030] TrendRadar's Media Sentiment Platform (MCP) is used to retrieve news events related to a client's name, legal representative, or held assets within a specified period (e.g., the past 30 days) from external financial sentiment platforms. Before retrieval, client identification information is anonymized to meet third-party data security requirements. The raw sentiment returned by TrendRadar's MCP is filtered using a set of keywords (including "penalty," "manipulation," "forced liquidation," "litigation," "abnormal transactions," "finance," and "risk"), retaining only highly relevant segments with a negative or neutral-to-negative sentiment and a successful match with the entity (e.g., client name, legal representative, or held assets). This process follows a data classification and grading management strategy, incorporating sentiment results as auxiliary features in the evaluation but excluding original personal identification information, ensuring the output inherently possesses privacy protection attributes.

[0031] The initial risk assessment MCP module uses 15 structured customer indicators and a four-dimensional risk evaluation system to calculate customer contribution capability (weight w1∈[0.40,0.60]), risk control capability (w2∈[0.20,0.40]), risk appetite (w3∈[0.05,0.15]), and profitability (w4∈[0.05,0.15]). The scores for each dimension are generated based on preset thresholds and deduction rules (e.g., 5 points deducted for each forced liquidation, and points deducted at the discretion of the authorities for a daily average risk level ≥55%). Combined with bonus items (5 points for customer attributes such as bank custody accounts, 5 points for customer duration ≥5 years, etc.), a preliminary total score and risk level (C1–C4, with C4 being the optimal level) are obtained. All calculation logic is encapsulated in an internal PyPI package, which allows institutions to dynamically adjust the weight configuration according to business needs, and the sum of the weights is always 1.

[0032] In one specific embodiment of the present invention, the comprehensive score of the customer risk profile consists of four basic dimensions and one bonus item, and the calculation formula for each dimension is as follows: (1) Customer contribution capability score This dimension reflects the economic value that customers bring to the platform, and its score is calculated as the "equity-interest combination score S". A "and "commission score S" B The higher of the values ​​in the list is used to highlight the primary source of contribution. ; ; ; Where E is the average daily ending equity over the past six months (unit: RMB 10,000), I is the cumulative interest contribution over the past six months (unit: RMB 10,000), and F is the cumulative total handling fee over the past six months (unit: RMB 10,000).

[0033] As can be seen, a customer's contribution ability is related to the customer's average daily ending equity, cumulative interest contribution, and cumulative total handling fees over the past six months. The thresholds for judging the highest contributing customers are G1=300, G2=1, and G3=150,000 yuan, respectively. If the threshold is not reached, it will be converted proportionally. The main focus is on the average daily ending equity and cumulative total handling fees, with a total score of 0-50 points.

[0034] (2) Customer risk control capability score This dimension quantifies the client's operational compliance and margin management capabilities, assigning different deduction weights to various risk events according to their severity: ; in, This refers to the number of times the settled funds exceed the exchange's set amount (e.g., 100,000). This refers to the number of times the settled funds fall below a set amount (e.g., 100,000). For the number of forced liquidations, The number of times disputes or complaints have been raised regarding forced eviction proceedings. The number of abnormal transaction behaviors. The number of times the margin requirement was increased due to low margin requirements.

[0035] As can be seen, a client's risk control capability includes the difference between the settlement and the exchange funds, the number of forced liquidations, the number of disputes and complaints regarding reasonable forced liquidation, the occurrence of abnormal trading behavior, and the number of times the margin was increased due to low margin. Any of the above behaviors will result in a deduction of points, with a total score ranging from 0 to 30 points.

[0036] (3) Customer risk preference score This dimension measures a customer's level of leverage usage; the higher the risk level, the lower the score. ; Where R is the average daily exchange risk level (expressed as a decimal, such as 0.39 representing 39%). As can be seen, the customer's risk preference includes the customer's average daily transaction risk level. Points will be deducted as appropriate if it exceeds 55%, and the total score is between 0 and 10.

[0037] (4) Customer profitability score This dimension combines short-term returns with long-term win rate to comprehensively evaluate the effectiveness of a trade: ; Where: P is the profit / loss ratio in the past month (e.g., 0.33), and W is the win rate in the past year (e.g., 0.55 represents 55%). A client's profitability is assessed based on their profit / loss ratio over the past month and their win rate over the past year, with a total score ranging from 0 to 10.

[0038] (5) Bonus points This score is used to identify high-potential or high-credit clients. It does not participate in the base score but only serves as an auxiliary adjustment. For special users, such as those holding 4 or more different instruments, clients who are legal entities, special legal entities, asset management accounts, or have a client tenure of 5 or more, 5 points are added. The value is 5 in all cases and 0 in others. Bonus points for clients are additional points, including the number of stocks a client holds, client attributes, and length of service with the client. Points will be awarded at the discretion of the evaluator. For long-term clients, the threshold is 5 years or more, and only 5 points will be awarded, with a maximum of 15 points.

[0039] (6) The final overall score is: ;

[0040] In a specific embodiment, based on the final comprehensive score Customer risk levels are classified as follows: The rating is C1, indicating that the customer has the highest risk. The grade is C2; The grade is C3; The rating is C4, indicating the highest customer quality.

[0041] S3. The customer metric analysis, public opinion results, and preliminary assessment results are processed using a "template-based assembly + structured encapsulation" method to generate standardized input for submission to the large language model. The model then outputs a structured risk assessment report, which includes risk level assessment and differentiated management recommendations. The preliminary assessment results include the four-dimensional score (customer contribution capability score) output by the risk preliminary assessment MCP module. Customer risk control capability score Customer risk preference score Customer profitability score ) and final overall score .

[0042] Specifically, in step S3, information is filled into the prompt template and then structured and encapsulated to generate standardized input. The prompt text portion of the prompt template clearly defines the task instructions, scoring dimensions, and output format requirements, while the data portion embeds structured features in JSON format, following the logical order of "task instructions → input data → output requirements".

[0043] Standardized input is submitted to a large language model fine-tuned by LoRA. The large language model performs reasoning in a non-conversational, task-driven mode and outputs a structured risk assessment report. This report is strictly limited to risk level, four-dimensional score details, attribution basis for each score, and differentiated management recommendations to ensure that the results are business-usable and compliant and secure.

[0044] S4. Convert the structured risk assessment report output by the large language model into encrypted JSON format and store it in an isolated storage area. The encryption strategy is dynamically set according to the data classification results. At the same time, record a complete operation log, including the call sequence of each MCP tool (such as filesystem:read_text_file, trendradar:search_news, risk_judge, etc.), snapshots of input parameters (i.e., user data files), model version number and response timestamp, for integrity verification and anti-tampering verification. All logs are retained for no less than 6 months, supporting full-link backtracking to ensure that any assessment conclusion can be verified for its data source, calculation process and reasoning basis, meeting the mandatory requirements of financial supervision for the interpretability and auditability of AI applications.

[0045] Of course, those skilled in the art will recognize that the present invention is not limited to the details of the exemplary embodiments described above, but also includes the same or similar structures that can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0046] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

[0047] The technologies, shapes, and structures not described in detail in this invention are all known technologies.

Claims

1. A method for generating customer risk profiles based on a large language model, characterized in that, Includes the following steps: The file parsing MCP is called to parse the user data file in conjunction with the user prompt template, and the parsing results of the structured customer indicators defined in the user prompt template are obtained, which is recorded as customer indicator parsing; the risk assessment MCP is called to perform a preliminary score in conjunction with the customer indicator parsing and output the preliminary assessment results; The MCP (Multi-Channel Programming) is invoked to filter relevant public opinion results from the raw news data stream; Based on the provided template, the customer indicator analysis, public opinion results, and preliminary assessment results are assembled and structured. Then, they are input into a large language model to obtain a structured risk assessment report, which includes risk level assessment and differentiated management recommendations.

2. The customer risk profile generation method based on a large language model as described in claim 1, characterized in that, Structured client metrics include: average daily ending equity over the past six months, cumulative interest contribution over the past six months, cumulative total transaction fees over the past six months, number of times the post-settlement difference in exchange funds exceeds 100,000, number of forced liquidations, number of disputes and complaints regarding reasonable forced liquidation handling, number of abnormal trading behaviors, number of times low margin requirements are increased, average daily exchange risk, profit / loss ratio over the past month, win rate over the past year, number of open positions, client tenure, and client attributes.

3. The customer risk profile generation method based on a large language model as described in claim 1, characterized in that, The MCP (Multi-Channel Platform) for public opinion screening obtains news texts related to customers from external public opinion sources and filters the news texts based on a preset risk keyword set to extract highly relevant public opinion segments containing negative risk signals. The preset risk keyword set includes "punishment", "manipulation", "forced liquidation", "litigation", "abnormal transactions", "finance", and "risk". The screening criteria for highly relevant public opinion segments containing negative risk signals are: the news text contains at least one risk keyword, the sentiment is negative or neutral to negative, and the entity identification result matches the customer name.

4. The customer risk profile generation method based on a large language model as described in claim 1, characterized in that, Define the mapping relationship between risk level and comprehensive score range; The initial risk assessment by MCP calculates the client's sub-scores and bonus scores in four dimensions—contribution capability, risk control capability, risk appetite, and profitability—based on structured client indicators and preset scoring rules. All scores are summed to generate a final comprehensive score. The risk level is initially assessed based on the comprehensive score range within which the final comprehensive score falls. The bonus scores are calculated based on client attributes, the number of holdings, and the client's tenure. Bonus points are awarded when the client is a bank custodian account. The structured risk assessment report output by the large language model includes detailed scores for four dimensions, key evidence chains for each score, final risk level, and differentiated management recommendations.

5. The customer risk profile generation method based on a large language model as described in claim 4, characterized in that, Customer contribution capability score Score for equity-interest portfolio A With transaction fee score S B The higher of the; Where E is the average daily ending equity over the past six months (unit: RMB 10,000), I is the cumulative interest contribution over the past six months (unit: RMB 10,000), and F is the cumulative total handling fee over the past six months (unit: RMB 10,000); G1, G2, and G3 are the judgment thresholds for the average daily ending equity E, cumulative interest contribution I, and cumulative total handling fee F of related customers over the past six months, respectively; min indicates taking the smaller value.

6. The customer risk profile generation method based on a large language model as described in claim 4, characterized in that, Customer risk control capability score The calculation formula is: in, This refers to the number of times the funds after settlement exceed the set amount required by the exchange. This refers to the number of times the funds after settlement fall below the required set amount. For the number of forced liquidations, The number of times disputes or complaints have been raised regarding forced eviction proceedings. The number of abnormal transaction behaviors. The maximum value indicates the number of times the margin requirement is increased due to low margin.

7. The customer risk profile generation method based on a large language model as described in claim 4, characterized in that, Customer risk preference score The calculation formula is: Where R represents the average daily exchange risk level, and max indicates taking a larger value.

8. The customer risk profile generation method based on a large language model as described in claim 4, characterized in that, Customer profitability score The calculation formula is: Where: P is the profit / loss ratio in the past month, W is the winning rate in the past year, min indicates taking the smaller value, and max indicates taking the larger value.

9. The customer risk profile generation method based on a large language model as described in claim 1, characterized in that, Customer metrics analysis, public opinion results, and preliminary evaluation results are input into a large language model fine-tuned by LoRA via an AI Agent for processing.

10. A customer risk profile generation system that implements the customer risk profile generation method based on a large language model as described in any one of claims 1-9, characterized in that, include: User data layer, MCP tool scheduling layer, and large language model inference layer; The user data layer includes internal business systems and an external public opinion platform. The internal business systems are used to output user data files containing structured customer metrics, while the external public opinion platform is used to crawl information from external networks and provide raw news data streams. The MCP tool scheduling layer includes various MCP tools, including: the file parsing MCP, which combines user prompt templates to parse user data files and obtain the parsing results of structured customer indicators defined in the user prompt templates, denoted as customer indicator parsing; the risk assessment MCP, which combines customer indicator parsing to perform preliminary scoring and output preliminary assessment results; and the public opinion screening MCP, which filters relevant public opinion results from the raw news data stream. The large language model inference layer combines system prompts and standardized input to obtain output results; the output results are parsed into standardized JSON objects and saved; the standardized input is obtained by structurally encapsulating the customer indicator analysis, public opinion results and preliminary evaluation results output by the MCP tool scheduling layer according to the prompt template.