An enterprise risk assessment method, device and medium based on heterogeneous data fusion
By integrating structured data with a large language model and using a logistic regression model to obtain baseline parameters, this approach addresses the shortcomings of traditional risk assessment methods in handling unstructured data, enabling highly reliable enterprise risk assessment, suppressing the illusion bias of large language models, and outputting interpretable risk assessment results.
Patent Information
- Application Number
- CN202611637618.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-22
- Publication Date
- 2026-11-20
AI Technical Summary
Traditional enterprise risk assessment methods rely on structured data and cannot effectively process unstructured text data, resulting in inaccurate risk assessment results. Large language models suffer from illusion problems in application, with output results deviating from actual financial data and posing uncontrollable reliability risks.
By integrating structured numerical data with a large language model in multiple dimensions, using a logistic regression model to obtain baseline parameters, and combining risk data cleaning and standardization, heterogeneous data fusion is performed to detect and correct the illusion bias of the large language model, outputting highly reliable risk assessment results.
It achieves deep integration of structured and unstructured data, suppresses the illusion bias of large language models, outputs objective, reliable and interpretable enterprise risk assessment results, and retains the semantic understanding advantages of large language models.
Smart Images

Figure CN123140679A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of text analysis and processing technology, and in particular to a method, device and medium for enterprise risk assessment based on heterogeneous data fusion. Background Technology
[0002] In scenarios such as corporate investment decisions and supply chain risk management, accurate risk assessment of target companies is a core element for financial institutions and commercial entities to mitigate credit risk. Traditional corporate risk assessment methods primarily rely on structured numerical information such as financial indicators and operating data, using interpretable models such as logistic regression and scoring cards for quantitative analysis. However, these methods can only utilize structured data and cannot effectively process and analyze the risk signals contained in unstructured textual data such as public announcements and records of operational anomalies, resulting in inaccurate risk assessment results.
[0003] In recent years, large language models, with their powerful semantic understanding capabilities, have been gradually introduced into the field of enterprise risk assessment to extract risk factors from unstructured text and output risk assessment conclusions. However, large language models have an inherent illusion problem in practical applications. The risk levels and attribution logic they output may deviate significantly from the actual financial data of enterprises, and may even produce judgments that violate common sense in risk control business. Directly using them for risk assessment poses an uncontrollable reliability risk.
[0004] Therefore, there is an urgent need to provide a business risk assessment method that can deeply integrate structured numerical information with large language models and effectively suppress the illusion bias of large language models. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a method, device, and medium for enterprise risk assessment based on heterogeneous data fusion. By using structured numerical benchmarks to perform multi-dimensional illusion detection and graded correction on the output of a large language model, it achieves deep fusion of heterogeneous data, effectively suppresses the illusion bias of the large language model, and outputs highly reliable enterprise risk assessment results.
[0006] According to a first aspect of the present invention, a method for enterprise risk assessment based on heterogeneous data fusion is provided, comprising the following steps:
[0007] S1: Obtain structured risk numerical data and unstructured risk text data from the target company's multi-source dataset, perform data cleaning and standardization processing, and form risk dataset and text fragment set respectively.
[0008] S2, based on the values of each preset risk indicator in the risk dataset, calculate the preset risk derivative variables corresponding to each preset risk indicator to form an initial risk feature set, input it into the pre-trained logistic regression model, and obtain the output benchmark parameter set; the preset risk derivative variables are used to characterize at least one of the enterprise's current risk level, risk deterioration degree, and operational volatility disorder; the benchmark parameter set includes the first risk probability and model weights.
[0009] S3 embeds a set of text fragments into a pre-built standardized prompt template, inputs it into a large language model for semantic risk reasoning, obtains the initial risk level and confidence level of the output, and maps it to a second risk probability at the same scale as the first risk probability.
[0010] S4. Based on the benchmark parameter set, perform the deviation calculation between the second risk probability and the first risk probability, the comparison of the attribution direction of risk influencing factors, and the judgment of the preset risk assessment rule set. Comprehensively determine the illusion level of the large language model and perform hierarchical correction on the second risk probability. Output the corrected fusion risk probability as the risk assessment result.
[0011] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the above-described enterprise risk assessment method based on heterogeneous data fusion.
[0012] According to a third aspect of the present invention, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0013] The present invention has at least the following beneficial effects:
[0014] This invention provides a method for enterprise risk assessment based on heterogeneous data fusion. First, it acquires structured risk numerical data and unstructured risk text data from multi-source datasets of the target enterprise, forming a risk dataset and a text fragment set, respectively. By simultaneously acquiring both structured and unstructured heterogeneous data sources, it overcomes the problem of traditional risk control relying on only a single type of data, leading to a lack of information dimensions. Then, based on the values of each preset risk indicator in the risk dataset, it calculates the preset risk derived variables corresponding to each preset risk indicator to form an initial risk feature set. This set is input into a logistic regression model to obtain the first risk probability and model weights. By constructing risk derived variables with clear business meaning and training the logistic regression model, the output first risk probability is obtained. The rate and model weights are more objective and reliable. Then, the text fragment set is embedded in the prompt template and input into the large language model for risk reasoning to obtain the initial risk level and confidence level of the second risk probability. This achieves the unification of the dimensions of the unstructured text reasoning results and the structured output of the logistic regression model. Finally, a multi-dimensional judgment is performed on the risk, and the illusion level of the large language model is comprehensively determined. The second risk probability is then graded and corrected, and the corrected fused risk probability is output as the risk assessment result. By using the structured model parameters as a benchmark to perform illusion detection and graded error correction on the output of the large language model, the semantic understanding advantage of the large language model is preserved, and its illusion bias is suppressed by the structured benchmark, thereby enabling the output of highly credible enterprise risk assessment results. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 A flowchart of an enterprise risk assessment method based on heterogeneous data fusion provided in an embodiment of the present invention. Detailed Implementation
[0017] 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.
[0018] This invention provides a method for enterprise risk assessment based on heterogeneous data fusion, such as... Figure 1 As shown, the method includes the following steps:
[0019] S1 involves acquiring structured risk numerical data and unstructured risk text data from the target company's multi-source dataset, performing data cleaning and standardization to form a risk dataset and a text fragment set, respectively. This can be understood as follows: the risk dataset includes the values of various preset risk indicators extracted from several standardized risk numerical data sets. Data cleaning refers to processes such as deduplication, missing value imputation, outlier detection and correction to eliminate noise and inconsistencies in the original data. Standardization refers to converting data of different dimensions and orders of magnitude into a comparable standardized format, including normalizing structured data, unifying encoding of unstructured text, and semantic segmentation to ensure the comparability of different types of data in subsequent processes.
[0020] Specifically, the structured risk numerical data includes at least two of the target company's revenue growth rate, net profit growth rate, current ratio, quick ratio, accounts receivable turnover, inventory turnover, and trend value of debt-to-equity ratio; the unstructured risk text data includes at least two of the target company's abnormal operation information, penalty records, litigation information, and public announcements. In practice, the structured risk numerical data can be obtained from the company's publicly available financial statements, while the unstructured risk text data is extracted after semantic understanding using a large language model.
[0021] The structured risk numerical data covers dimensions such as corporate profitability and operational capabilities, while the unstructured risk text data makes up for the sudden events and soft risk information that structured data cannot capture. By simultaneously acquiring both structured and unstructured heterogeneous data sources, the problem of missing information dimensions caused by traditional risk control relying on only a single type of data is overcome, laying a data foundation for subsequent multi-source information fusion assessment.
[0022] S2, based on the values of each preset risk indicator in the risk dataset, calculates the preset risk derived variables corresponding to each preset risk indicator to form an initial risk feature set, inputs it into the pre-trained logistic regression model, and obtains the output benchmark parameter set; it can be understood that: the value of the preset risk indicator is the value obtained after the structured risk numerical data has been cleaned and standardized.
[0023] Specifically, the preset risk-derived variables are used to characterize at least one of the enterprise's current risk level, the degree of risk deterioration, and the degree of operational volatility and disorder.
[0024] Furthermore, the benchmark parameter set includes a first risk probability and model weights; this can be understood as follows: the first risk probability is the sum of the first risk probabilities for the logistic regression model Y = w1·x1 + w2·x2 + ... + w n ·x nThe Y value output by +b is obtained after mapping through the Sigmoid function, that is, compressing the Y value to between 0 and 1, where w1 to w n All are weighting coefficients, x1 to x n , where are the values of each initial risk feature, and b is the model bias adjustment parameter.
[0025] Specifically, model weights refer to the weight vectors that contain the weight coefficients corresponding to each initial risk feature in the logistic regression model. They are obtained after training and are extracted and output in this step.
[0026] This step, by constructing risk-derived variables with clear business implications and training a logistic regression model, can output interpretable and traceable structured risk probabilities and model weights, providing an objective and reliable quantitative benchmark for the subsequent output verification of large language models.
[0027] Specifically, the calculation of the preset risk derived variables corresponding to each preset risk indicator to form an initial risk feature set includes the following steps:
[0028] S201, performs equal-frequency percentile mapping on the raw time-series data of each preset risk indicator, uniformly converting the raw time-series data of each preset risk indicator into a standardized time-series sequence of fixed length. In this process, traditional zero-padding and truncation preprocessing methods are abandoned. Based on the data distribution, equal-frequency elastic mapping is used to uniformly map the dimensions of the raw time-series data of a single preset risk indicator, conforming to the following formula:
[0029] A k =ζ(D0,k / (K+1)),k=1,2,…,K, where, A k Let ζ(·) be the k-th anchor value of the original time series data for a single preset risk indicator, D0 be the original time series data for a single preset risk indicator, k represent the anchor number, and K be the preset fixed normalization dimension, i.e., the length of the unified sequence, which is usually set to 5 to 10. For example, when K=5, the values corresponding to the 16.7%, 33.3%, 50%, 66.7%, and 83.3% percentiles of the original time series data are taken respectively to form a standardized sequence of 5 anchor points. This mapping method preserves the overall distribution of the original time series data and avoids the data distortion caused by traditional zero-padding or truncation methods.
[0030] S202, based on the standardized time series, calculate the first risk derivative variable, the second risk derivative variable, and the third risk derivative variable among the preset risk derivative variables; wherein, the first risk derivative variable is calculated based on the deviation of the terminal value of the standardized time series from the corresponding full series average value; the second risk derivative variable is calculated based on the overall change slope of the standardized time series and the jump amplitude between adjacent time points; the third risk derivative variable is calculated based on the disorder of adjacent fluctuation distribution of the standardized time series and combined with the length of the original time series data.
[0031] Specifically, the first risk-derived variable is the risk potential R1, which characterizes the company's current risk level. The calculation formula is as follows:
[0032] , where A K A is the last anchor value of the raw time series data for a single preset risk indicator. i For the i-th anchor point value of the original time series data of a single preset risk indicator, It is the average of all anchor values of the original time series data for a single preset risk indicator.
[0033] The second risk-derived variable is risk momentum R2, which is used to characterize the degree of risk deterioration in a firm. The calculation formula is as follows:
[0034] Where MAD is the median absolute deviation of the standardized time series, I(·) is the indicator function, and σ is the preset fluctuation threshold coefficient.
[0035] The third risk-derived variable is risk momentum R3, which is used to characterize the degree of volatility and disorder in a firm's operations. The calculation formula is as follows:
[0036] ,in, ε represents the fluctuation difference between adjacent anchor points, ε is the preset minimum value, and ln(L) represents the penalty factor corresponding to the length L of the original time series data.
[0037] S203, based on each preset risk indicator and each preset risk derivative variable, an initial risk feature set is constructed; this can be understood as: each preset risk indicator corresponds to three preset risk derivative variables, and the number of initial risk features in the initial risk feature set is the product of the number of preset risk indicators and the number of preset risk derivative variables.
[0038] The above-mentioned method solves the problem of multi-source heterogeneous time series data being unable to be directly aligned for modeling due to different recording periods by performing equal-frequency percentile mapping on the original time series data of each preset risk indicator. Based on this, three types of derived variables are calculated respectively, and the enterprise risk evolution characteristics are comprehensively quantified from three dimensions: static level, dynamic trend and volatility stability. This provides high-quality feature inputs with clear business meaning and high interpretability for the logistic regression model.
[0039] Furthermore, the training of the logistic regression model and the output of the baseline parameter set include the following steps:
[0040] S210: Obtain risk dataset samples and corresponding risk labels for multiple historical enterprise samples. Calculate the corresponding preset risk derived variables for each historical enterprise sample based on preset risk indicators, forming a historical risk feature set for each historical enterprise sample. This can be understood as follows: the historical risk feature set is obtained in the same way as the initial risk feature set of the target enterprise, and will not be elaborated further here. The risk labels include low-risk labels and high-risk labels, represented by 0 and 1 respectively.
[0041] S220, for each historical risk feature in the historical risk feature set, quantitative scoring is performed from multiple dimensions, and a specific feature subset is selected based on the score ranking; the multiple dimensions include risk discrimination ability, compliance of change direction, data stability, and data completeness. The specific feature subset includes a preset number of historical risk features with the highest scores.
[0042] Specifically, the formula for calculating the quantitative score Q of any initial risk characteristic is as follows:
[0043] Q = AUC·Sign(M1-M0) / (V+λ·E), where AUC is the area under the ROC curve plotted based on the initial risk features and risk labels, representing the risk discrimination ability, with a value ranging from 0 to 1; M1 is the median of all values corresponding to the initial risk features in high-risk samples; M0 is the median of all values corresponding to the initial risk features in low-risk samples; Sign(·) is the sign function, taking values of -1, 0, or 1 to ensure business logic compliance; V is the coefficient of variation of the initial risk features, i.e., the ratio of the standard deviation to the mean of the initial risk features, representing data stability; λ is the preset sparsity penalty coefficient; and E is the zero norm of the initial risk features, representing data completeness. It is important to understand that the area under the ROC curve is an important indicator for evaluating classifier performance, often used to compare different classification models, reflecting the ability of the initial risk features to distinguish between low-risk and high-risk samples. Those skilled in the art are familiar with the specific method of plotting ROC curves, which will not be elaborated here.
[0044] S230, a logistic regression model is trained based on the specific feature subset and its corresponding risk labels; wherein, during the iterative training of the logistic regression model, a sign constraint is applied to the weights corresponding to each risk feature in the specific feature subset, so that the weights of positive risk features are constrained to non-negative values and the weights of negative risk features are constrained to non-positive values. In specific implementation, a projective gradient descent algorithm is used for iterative training. Specifically: in each iteration, based on the loss function J of the logistic regression model and the preset learning rate α, the basic gradient update formula is used. Calculate the initial weight update values for each feature weight, where W j The weight corresponding to the j-th risk feature in a specific feature subset. Let W be the gradient component of this weight on the loss function. After completing the basic gradient update, a projection correction is performed according to the risk control business logic. For positive risk features, i.e., indicators where a larger feature value represents a higher risk, such as the debt-to-asset ratio and the number of overdue payments, their weights are constrained to non-negative values, denoted as W. j =max(0,min( ,W0)), where W0 is the preset weight upper limit; for negative risk characteristics, W j =min(0, The updated weights obtained will be used as the starting values for the next iteration, which will not be elaborated here.
[0045] S240, after iterative training is completed, a pre-trained logistic regression model is obtained.
[0046] The above-mentioned method uses multi-dimensional quantitative scoring to select specific feature subsets to improve the model's prediction accuracy, and applies symbolic constraints to the weights during iterative training to ensure that the direction of risk change is consistent with the output direction of the large language model. This fundamentally avoids abnormal weights that contradict business logic and provides an objective and reliable data foundation for subsequent hallucination detection.
[0047] S3 embeds a set of text fragments into a pre-built standardized prompt template, inputs it into a large language model for semantic risk inference, obtains the initial risk level and confidence level of the output, and maps it to a second risk probability at the same scale as the first risk probability. This can be understood as: the large language model outputs an initial risk level and confidence level for each text fragment, and then maps it to a unified second risk probability output. The large language model is an LLM model.
[0048] Specifically, mapping the initial risk level and confidence level to a second risk probability on the same scale as the first risk probability includes the following steps:
[0049] S301, based on the initial risk level and corresponding confidence level of each text segment output by the large language model, a piecewise linear mapping method is used to transform the initial risk level of each text segment into an intermediate risk probability at the same scale as the first risk probability. For example, if the initial risk level is low risk, medium risk, or high risk, the corresponding piecewise linear mapping formula is:
[0050] Where P is the intermediate risk probability obtained after mapping, P0 represents the initial risk level, and c is the preset confidence interval, with a value range of [0, 1].
[0051] S302, using the confidence level corresponding to each text segment as the weight, the intermediate risk probability corresponding to all text segments is weighted and averaged to obtain the second risk probability, which is on the same scale as the first risk probability.
[0052] As described above, by using standardized prompt templates to guide the large language model to perform semantic risk reasoning on unstructured text, and mapping discrete risk levels to continuous probability values, unstructured information is transformed into numerical values with the same scale as structured risk probabilities. This achieves dimensional unification between the unstructured text reasoning results and the structured output of the logistic regression model, providing a computable standardized probability input for subsequent bias calculation and hallucination detection.
[0053] S4. Based on the benchmark parameter set, perform the deviation calculation between the second risk probability and the first risk probability, the comparison of the attribution direction of risk influencing factors, and the judgment of the preset risk assessment rule set. Comprehensively determine the illusion level of the large language model and perform hierarchical correction on the second risk probability. Output the corrected fusion risk probability as the risk assessment result.
[0054] Specifically, the deviation between the second risk probability and the first risk probability is the absolute difference between the second risk probability and the first risk probability.
[0055] This step employs a triple verification mechanism of bias calculation, attribution comparison, and rule set judgment. Using structured model parameters as a benchmark, it performs illusion detection and graded error correction on the output of the large language model. This preserves the semantic understanding advantages of the large language model while suppressing its illusion bias through the structured benchmark, ultimately outputting an interpretable and highly reliable fusion risk assessment result.
[0056] Specifically, the attribution direction comparison of the risk influencing factors includes the following steps:
[0057] S401, based on the model weights and the values of each preset risk indicator, calculate the contribution of each preset risk indicator to the first risk probability, and select several preset risk indicators with the highest contribution as core risk impact indicators.
[0058] Specifically, the contribution of the preset risk indicator to the first risk probability is the product of the weight of the preset risk indicator in the logistic regression model and the value of the preset risk indicator.
[0059] S403, extract the risk attribution description output by the large language model, compare the risk direction indicated by the risk attribution description with the risk orientation direction of the core risk impact indicator, and if the two directions are opposite, it is determined that attribution illusion exists.
[0060] Specifically, risk attribution description refers to the reasoning or evidence provided by the large language model in its output of risk assessment results, indicating the level of risk. For example, for the same company mentioned above, the risk attribution description output by the large language model might be: "The company's debt-to-asset ratio is as high as 85%, and it has had multiple overdue payment records in the past six months, resulting in significant short-term debt repayment pressure. Therefore, it is assessed as high-risk." The attribution keywords "high debt-to-asset ratio" and "multiple overdue payment records" are extracted and are completely consistent with the selected core risk impact indicators such as debt-to-asset ratio, number of overdue payments, and risk direction. This means they all positively push up the risk, indicating that the attribution logic of the large language model matches the attribution logic direction of the logistic regression model, and there is no attribution illusion. However, if the large language model outputs: "The company's revenue growth is negative, profitability is insufficient, and it is assessed as high-risk," then the attribution description points to a decline in revenue growth rate, which does not match the core risk impact indicators such as debt-to-asset ratio and number of overdue payments, indicating the presence of attribution illusion.
[0061] The above-mentioned method compares the contribution ranking of each risk indicator in the logistic regression model with the risk attribution description of the large language model to accurately identify whether the attribution logic of the large language model is consistent with the structured data benchmark. This can effectively detect attribution illusions in the large language model at the level of risk causes, ensure that the attribution chain of the final risk assessment result is traceable, and thus improve the accuracy of the assessment result.
[0062] Furthermore, the determination of the preset risk assessment rule set includes the following steps:
[0063] S402, obtain several pre-built risk assessment rules; each risk assessment rule includes a condition determination part and a corresponding correction operation part, and each risk assessment rule has a preset rule weight. For example, rule one is: if the debt-to-asset ratio is greater than 80%, the risk level is upgraded to at least medium risk, with a preset rule weight of 0.8; rule two is: if the net cash flow from operating activities is negative for three consecutive quarters, the risk level is upgraded by one level, with a preset rule weight of 0.6.
[0064] S404 compares the values of each preset risk indicator in the risk dataset with the triggering conditions of each risk assessment rule, accumulates the triggered risk assessment rules according to their corresponding preset rule weights, obtains the rule verification score, and uses the rule verification score as the quantified illusion risk value of the large language model.
[0065] The above-mentioned method compares the values of each preset risk indicator of the enterprise with the pre-built risk assessment rules one by one and adds them up in weight to obtain the rule verification score. This quantifies the implicit conflict between the output of the large language model and business common sense into an explicit illusion risk value, providing a reasonable and reliable business logic verification basis for the determination of the illusion level.
[0066] In a preferred embodiment, a dynamic rule update mechanism is also introduced, enabling the rule set to always adapt to the current business environment and be used for post-processing verification of large language models, specifically:
[0067] For any given risk assessment rule, calculate the assessment accuracy of that rule.
[0068] Specifically, TP t TN represents the number of samples where the risk assessment rule is triggered at time t and the large language model determines that hallucinations exist. t For the number of samples where the risk assessment rule is not triggered at time t and the large language model determines there is no hallucination, FP t For the number of samples where the risk assessment rule is triggered at time t but the large language model determines there is no hallucination, FN t This represents the number of samples for which the risk assessment rule was not triggered at time t, but the large language model determined that there was an illusion.
[0069] Based on the accuracy of the risk assessment rules, the preset rule weights of the risk assessment rules are updated.
[0070] Specifically, the updated weights Among them, W t Here, η represents the preset rule weights for the risk assessment rules at time t, and η is the preset weight update learning rate, for example, 0.1. Let be the average accuracy of all risk assessment rules at time t.
[0071] Preferably, every preset period, historical data of a preset risk indicator at a certain number of recent moments are retrieved, and a new threshold is calculated based on a preset percentile coefficient. This new threshold is then used to replace the original rule trigger threshold. When the value of the preset risk indicator exceeds the new threshold, the corresponding rule is triggered.
[0072] Furthermore, the process of comprehensively determining the hallucination level of the large language model and performing a graded correction on the second risk probability includes the following steps:
[0073] S410, obtain the initial judgment result based on the attribution direction comparison result; wherein, if the attribution directions are inconsistent, the hallucination level is directly determined to be no less than the second hallucination level, and if the attribution directions are consistent, the hallucination level is directly determined to be the first hallucination level.
[0074] S420, determine the baseline hallucination level based on the hallucination risk value of the large language model, and correct the baseline hallucination level based on the deviation between the calculated second risk probability and the first risk probability to obtain the corrected hallucination level.
[0075] Specifically, determining the baseline hallucination level based on the hallucination risk value of the large language model means that if the hallucination risk value is lower than or equal to a first threshold, the baseline hallucination level is the first hallucination level; if the hallucination risk value is higher than the first threshold but lower than or equal to a second threshold, the baseline hallucination level is the second hallucination level; and if the hallucination risk value is higher than the second threshold, the baseline hallucination level is the third hallucination level. Those skilled in the art can set the first and second thresholds according to actual needs, which will not be elaborated upon here.
[0076] Furthermore, the baseline hallucination level is adjusted based on the deviation value. Specifically: if the deviation value exceeds a preset large deviation threshold, the hallucination level increases by one level from the baseline hallucination level, for example, the second hallucination level increases to the third hallucination level; if the deviation value is lower than a preset small deviation threshold, the hallucination level decreases by one level from the baseline hallucination level; if the deviation value is between the two, the baseline level remains unchanged. If the baseline level is already at the lowest level, it will not be lowered further; if it is already at the highest level, it will not be raised further.
[0077] S430, the higher of the initial judgment result and the corrected hallucination level is taken as the final hallucination level.
[0078] S440, if the final hallucination level is the first hallucination level, then the second risk probability is directly used as the fusion risk probability; if the final hallucination level is the second hallucination level, then the second risk probability and the first risk probability are weighted and averaged using the preset fusion weights, and the weighted average result is used as the fusion risk probability; if it is the third hallucination level, then the large language model is triggered to re-infer, and the re-inferring result is used as the fusion risk probability.
[0079] Specifically, the formula for calculating the weighted average of the second risk probability and the first risk probability using preset fusion weights is as follows:
[0080] F = β·F2 + (1-β)·F1, where F2 is the second risk probability, F1 is the first risk probability, and β is the preset fusion weight.
[0081] Furthermore, Where β0 is the preset basic fusion weight, e is the natural constant, γ is the preset adjustment coefficient, and d is the sample decision boundary distance corresponding to the logistic regression model.
[0082] The above-mentioned comprehensive judgment mechanism, which is based on a three-level progressive approach of attribution direction comparison, rule verification score and deviation value, prioritizes attribution consistency as a prerequisite for verification, then uses the degree of rule conflict as a quantitative benchmark and the deviation value as a correction basis, and finally takes the higher hallucination level in the judgment results of each dimension to perform graded correction, so as to ensure the comprehensiveness and rigor of hallucination detection and avoid the risk of missed detection caused by misjudgment of a single dimension.
[0083] In another embodiment, for outputs indicating a third level of hallucination, the output is deemed questionable. A second verification is performed using CoVe chained validation. Finally, the original confidence level and bias value of the large language model are fused with the CoVe verification pass rate to generate the final confidence result Z, i.e., Z = Z0·(1-G)·T, where Z0 is the average confidence level of each text segment output by the large language model, G is the normalized hallucination risk value, and T is the CoVe verification pass rate. Through a multi-round self-verification mechanism, the output undergoes a second verification until a credibility standard is reached or a preset maximum number of retries is reached.
[0084] Embodiments of the present invention also provide a non-transitory computer-readable storage medium that can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a method in the method embodiments, wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiments.
[0085] Embodiments of the present invention also provide an electronic device, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0086] While specific embodiments of the invention have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. It should also be understood that various modifications can be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.
Claims
1. A method for enterprise risk assessment based on heterogeneous data fusion, characterized in that, The method includes the following steps: S1. Obtain structured risk numerical data and unstructured risk text data from the target company's multi-source dataset, perform data cleaning and standardization processing, and form risk dataset and text fragment set respectively. S2, based on the values of each preset risk indicator in the risk dataset, calculate the preset risk derived variables corresponding to each preset risk indicator to form an initial risk feature set, input it into the pre-trained logistic regression model, and obtain the output benchmark parameter set; The preset risk-derived variables are used to characterize at least one of the enterprise’s current risk level, risk deterioration degree, and operational volatility and disorder. The benchmark parameter set includes the first risk probability and model weights; S3 embeds the set of text fragments into a pre-built standardized prompt template, inputs it into a large language model for semantic risk reasoning, obtains the initial risk level and confidence level of the output and maps it to a second risk probability at the same scale as the first risk probability; S4. Based on the benchmark parameter set, perform the deviation calculation between the second risk probability and the first risk probability, the comparison of the attribution direction of risk influencing factors, and the judgment of the preset risk assessment rule set. Comprehensively determine the illusion level of the large language model and perform hierarchical correction on the second risk probability. Output the corrected fusion risk probability as the risk assessment result.
2. The enterprise risk assessment method based on heterogeneous data fusion according to claim 1, characterized in that, The structured risk numerical data includes at least two of the target company's operating revenue growth rate, net profit growth rate, current ratio, quick ratio, accounts receivable turnover, inventory turnover, and trend value of debt-to-equity ratio; the unstructured risk text data includes at least two of the target company's abnormal operation information, penalty records, litigation information, and announcement disclosure texts.
3. The enterprise risk assessment method based on heterogeneous data fusion according to claim 1, characterized in that, In step S2, the calculation of the preset risk derived variables corresponding to each preset risk indicator to form an initial risk feature set includes the following steps: S201, perform equal-frequency percentile mapping on the original time series data of each preset risk indicator, and uniformly convert the original time series data of each preset risk indicator into a standardized time series sequence of fixed length. S202, based on the standardized time series, calculate the first risk derivative variable, the second risk derivative variable, and the third risk derivative variable among the preset risk derivative variables; wherein, the first risk derivative variable is calculated based on the deviation of the terminal value of the standardized time series from the corresponding full series average value; the second risk derivative variable is calculated based on the overall change slope of the standardized time series and the jump amplitude between adjacent time points; the third risk derivative variable is calculated based on the disorder of adjacent fluctuation distribution of the standardized time series and combined with the length of the original time series data; S203, based on each preset risk indicator and each preset risk derivative variable, construct an initial risk feature set.
4. The enterprise risk assessment method based on heterogeneous data fusion according to claim 1, characterized in that, In step S2, the pre-trained logistic regression model is pre-trained in the following manner: S210: Obtain risk dataset samples and corresponding risk labels for multiple historical enterprise samples; calculate the corresponding preset risk derived variables for the preset risk indicators of each historical enterprise sample to form the historical risk feature set of each historical enterprise sample. S220, for each historical risk feature in the historical risk feature set, quantitative scoring is performed from multiple dimensions, and a specific feature subset is selected according to the score ranking; The multi-dimensional aspects include risk differentiation capability, compliance with change direction, data stability, and data completeness; the specific feature subset includes a preset number of historical risk features with the highest scores. S230, a logistic regression model is trained based on the specific feature subset and the corresponding risk labels; wherein, during the iterative training of the logistic regression model, a sign constraint is applied to the weights corresponding to each risk feature in the specific feature subset, so that the weight constraints of positive risk features are non-negative and the weight constraints of negative risk features are non-positive. S240, after iterative training is completed, a pre-trained logistic regression model is obtained.
5. The enterprise risk assessment method based on heterogeneous data fusion according to claim 1, characterized in that, In step S3, the initial risk level and confidence level are mapped to a second risk probability on the same scale as the first risk probability, including the following steps: S301, based on the initial risk level and corresponding confidence level of each text segment output by the large language model, the initial risk level of each text segment is transformed into an intermediate risk probability at the same scale as the first risk probability using a piecewise linear mapping method. S302, using the confidence level corresponding to each text segment as the weight, the intermediate risk probability corresponding to all text segments is weighted and averaged to obtain the second risk probability, which is on the same scale as the first risk probability.
6. The enterprise risk assessment method based on heterogeneous data fusion according to claim 1, characterized in that, Step S4, the comparison of the attribution directions of the risk influencing factors, includes the following steps: S401, Based on the model weights and the values of each preset risk indicator, calculate the contribution of each preset risk indicator to the first risk probability, and select several preset risk indicators with the highest contribution as core risk impact indicators. S403, extract the risk attribution description output by the large language model, compare the risk direction indicated by the risk attribution description with the risk orientation direction of the core risk impact indicator, and if the two directions are opposite, it is determined that attribution illusion exists.
7. The enterprise risk assessment method based on heterogeneous data fusion according to claim 1, characterized in that, In step S4, the determination of the preset risk assessment rule set includes the following steps: S402, Obtain several pre-built risk assessment rules; each risk assessment rule includes a condition determination part and a corresponding correction operation part, and each risk assessment rule has a preset rule weight. S404 compares the values of each preset risk indicator in the risk dataset with the triggering conditions of each risk assessment rule, accumulates the triggered risk assessment rules according to their corresponding preset rule weights, obtains the rule verification score, and uses the rule verification score as the quantified illusion risk value of the large language model.
8. The enterprise risk assessment method based on heterogeneous data fusion according to claim 7, characterized in that, In step S4, the process of comprehensively determining the hallucination level of the large language model and performing a graded correction on the second risk probability includes the following steps: S410, obtain an initial judgment result based on the attribution direction comparison result; wherein, if the attribution directions are inconsistent, directly determine that the hallucination level is not lower than the second hallucination level, and if the attribution directions are consistent, directly determine that the hallucination level is the first hallucination level. S420, determine the baseline hallucination level based on the hallucination risk value of the large language model, and correct the baseline hallucination level based on the deviation between the calculated second risk probability and the first risk probability to obtain the corrected hallucination level; S430, take the higher of the initial judgment result and the corrected hallucination level as the final hallucination level; S440, if the final hallucination level is the first hallucination level, then the second risk probability is directly used as the fusion risk probability; if the final hallucination level is the second hallucination level, then the second risk probability and the first risk probability are weighted and averaged using the preset fusion weights, and the weighted average result is used as the fusion risk probability; if it is the third hallucination level, then the large language model is triggered to re-infer, and the re-inferring result is used as the fusion risk probability.
9. A non-transitory computer-readable storage medium, wherein the storage medium stores at least one instruction or at least one program segment, characterized in that, The at least one instruction or the at least one program segment is loaded and executed by the processor to implement the enterprise risk assessment method based on heterogeneous data fusion as described in any one of claims 1-8.
10. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 9.
