A risk indicator backtracking simulation method and device, a storage medium and an electronic device
By using an automated risk indicator backtracking simulation method, which utilizes indicator data source tables and metadata information, the problem of low efficiency in manual processing is solved, achieving efficient and accurate risk indicator simulation and backtracking, and improving the credibility of risk rule assessment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING ANT CONSUMER FINANCE CO LTD
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-23
AI Technical Summary
In existing technologies, risk indicator data processing relies on manual processing, which is inefficient and prone to data distortion, affecting the effectiveness and credibility of risk rule assessment.
By using an automated risk indicator backtracking simulation method, and utilizing indicator data source tables and metadata information, the simulation and backtracking of indicators are automated. This includes sampling processing, analysis and statistics, merging of structured query statements, and scheduling processing, to generate accurate simulation and backtracking results.
It improves the response efficiency and data accuracy of risk indicator simulation and backtracking, reduces computing resource consumption, and ensures data consistency and accuracy.
Smart Images

Figure CN121901230B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a risk indicator backtracking simulation method, apparatus, storage medium, and electronic device in the field of computer technology. Background Technology
[0002] Risk indicators are core input elements of a risk control rule system and key data for assessing the credit risk level of individuals or groups. In application scenarios such as grouped comparative testing analysis, new rule simulation verification, and historical backtesting, high requirements are placed on the consistency and completeness of historical snapshots of indicator data and the indicator reproduction accuracy of test data. Current technologies primarily employ manual processing of indicator data, extracting historical snapshots manually from the risk indicator data source to complete indicator simulation and backtesting. However, manual data processing is inefficient and prone to data distortion due to subjective bias, thus affecting the effectiveness and credibility of risk rule assessments. Therefore, a more efficient and accurate method for indicator simulation and backtesting is needed. Summary of the Invention
[0003] This application provides a risk indicator backtracking simulation method, apparatus, storage medium, and electronic device. The method can automate the execution of indicator simulation and backtracking based on an indicator data source table, thereby improving the response efficiency and data accuracy of risk indicator simulation and backtracking.
[0004] In a first aspect, embodiments of this application provide a risk indicator backtracking simulation method, the method comprising:
[0005] Determine the indicator data source table and indicator metadata information for the risk indicators;
[0006] If an indicator simulation request is received, simulation processing is performed on the analysis snapshot results of the indicator data source table to obtain the simulation result data corresponding to the indicator simulation request.
[0007] If a backtracking request for an indicator is received, all structured query statements corresponding to the backtracking request for the indicator are merged into a single table to obtain a merged structured query statement.
[0008] The merged structured query statement is used to schedule the data source table of the indicator to obtain the backtracking output result table corresponding to the indicator backtracking request.
[0009] The above technical solution enables automated execution of indicator simulation and indicator backtracking based on indicator data source tables, improving the response efficiency and data accuracy of risk indicator simulation and backtracking.
[0010] In conjunction with the first aspect, in some possible implementations, before performing simulation processing on the analysis snapshot results of the indicator data source table to obtain the simulation result data corresponding to the indicator simulation request upon receiving an indicator simulation request, the method further includes:
[0011] The sampling data source table of the indicator is processed to obtain an intermediate table of sampling results;
[0012] The intermediate table of the sampling results is analyzed and statistically processed to obtain the analysis snapshot results.
[0013] The above technical solution enables sampling of the indicator data source table and generation of analysis snapshot results, eliminating the need for real-time access to the indicator data source table when responding to subsequent automated indicator simulation requests, thus improving the efficiency of indicator simulation.
[0014] In conjunction with the first aspect, in some possible implementations, the step of sampling the indicator data source table to obtain a sampling result intermediate table includes:
[0015] Determine the data type corresponding to the indicator data source table, perform offline binning based on the data type, and obtain the binning result;
[0016] Based on the binning results, stratified sampling processing is performed to obtain an intermediate table of sampling results.
[0017] The above technical solution enables stratified sampling based on binning results, avoiding the omission of sparse data or boundary values caused by random sampling, and ensuring the consistency of data distribution between the intermediate table of sampling results and the data source table of indicators.
[0018] In conjunction with the first aspect, in some possible implementations, the step of performing analytical and statistical processing on the intermediate table of the sampling results to obtain analytical snapshot results includes:
[0019] The intermediate table of the sampling results is subjected to value range distribution statistical processing to obtain the probability distribution characteristics of the risk index;
[0020] Boundary value determination processing is performed on the intermediate table of the sampling results to obtain the value range of the risk indicator;
[0021] Threshold sampling processing is performed on the intermediate table of the sampling results to obtain the key numerical points of the risk indicator;
[0022] Based on the probability distribution characteristics, the value range, and the key numerical points, an analysis snapshot result is generated.
[0023] The above technical solution can generate analysis snapshot results based on value range distribution statistics, boundary value determination and threshold sampling processing. This allows the analysis snapshot results to reflect the data distribution of the real indicator data source table, so that accurate simulation result data can be obtained without accessing the actual indicator data source table when making an indicator simulation request.
[0024] In conjunction with the first aspect, in some possible implementations, if an indicator backtracking request is received, all structured query statements corresponding to the indicator backtracking request are merged into a single table to obtain a merged structured query statement, including:
[0025] If a metric backtracking request is received, the backtracking metric corresponding to the metric backtracking request is determined;
[0026] Based on the indicator metadata information, query statements are generated for the backtracking indicator to obtain all structured query statements corresponding to the indicator backtracking request.
[0027] All the structured query statements are merged into a single table to obtain merged structured query statements.
[0028] The above technical solution can automatically generate structured query statements and perform table merging, which improves the efficiency and accuracy of SQL generation, avoids subsequent duplicate data reading, and reduces the consumption of computing resources.
[0029] In conjunction with the first aspect, in some possible implementations, the step of using the merged structured query statement to perform scheduling processing on the indicator data source table to obtain the backtracking output result table corresponding to the indicator backtracking request includes:
[0030] The merged structured query statement is used to schedule and process the indicator data source table to obtain an intermediate result table;
[0031] The intermediate result table is transposed to obtain the backtracking output result table corresponding to the indicator backtracking request.
[0032] The above technical solution can be used to transpose the intermediate result table to obtain a backtracking output result table with a unified structure, eliminating the differences in result tables caused by the differences in backtracking indicators each time, thereby realizing the universalization of indicator backtracking capability.
[0033] In conjunction with the first aspect, in some possible implementations, the step of using the merged structured query statement to perform scheduling processing on the indicator data source table to obtain an intermediate result table includes:
[0034] The merged structured query statement is then subjected to template rendering.
[0035] Based on the aforementioned indicator data source table, the merged structured query statement, after templated rendering processing, is executed asynchronously to obtain an intermediate result table.
[0036] The above technical solution enables dynamic parameter filling of SQL logical results, realizing the reuse of merged structured query statements.
[0037] Secondly, embodiments of this application provide a risk indicator backtracking simulation device, the device comprising:
[0038] The risk indicator determination unit is used to determine the indicator data source table and indicator metadata information of the risk indicators;
[0039] The indicator simulation unit is used to perform simulation processing on the analysis snapshot results of the indicator data source table if an indicator simulation request is received, and to obtain the simulation result data corresponding to the indicator simulation request.
[0040] The statement merging unit is used to merge all structured query statements corresponding to the indicator backtracking request into the same table if an indicator backtracking request is received, so as to obtain a merged structured query statement.
[0041] The indicator backtracking unit is used to perform scheduling processing on the indicator data source table using the merged structured query statement to obtain the backtracking output result table corresponding to the indicator backtracking request.
[0042] Thirdly, embodiments of this application provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the above-described method steps.
[0043] Fourthly, embodiments of this application provide a computer program product that stores multiple instructions adapted for loading by a processor and executing the above-described method steps.
[0044] Fifthly, embodiments of this application provide an electronic device that may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the above-described method steps.
[0045] In one or more embodiments of this application, a risk indicator data source table and indicator metadata information are determined. If an indicator simulation request is received, simulation processing is performed on the analysis snapshot results of the indicator data source table to obtain simulation result data corresponding to the indicator simulation request. If an indicator backtracking request is received, all structured query statements corresponding to the indicator backtracking request are merged into a single table to obtain a merged structured query statement. The merged structured query statement is then used to schedule processing on the indicator data source table to obtain a backtracking output result table corresponding to the indicator backtracking request. By using the indicator data source table as a basis, the automated execution of indicator simulation and indicator backtracking is achieved, improving the response efficiency and data accuracy of risk indicator simulation and backtracking. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a system architecture diagram of a risk indicator backtracking simulation provided in an embodiment of this application;
[0048] Figure 2 This is a flowchart illustrating a risk indicator backtracking simulation method provided in an embodiment of this application;
[0049] Figure 3 This is a schematic diagram of a process for obtaining analysis snapshot results provided in an embodiment of this application;
[0050] Figure 4 This is a schematic diagram of a hierarchical sampling process provided in an embodiment of this application;
[0051] Figure 5 This is a schematic diagram of an analysis and statistical processing flowchart provided in an embodiment of this application;
[0052] Figure 6 This is a schematic diagram of a process for generating merged structured query statements provided in an embodiment of this application;
[0053] Figure 7 This is a schematic flowchart of a column-row transpose processing method provided in an embodiment of this application;
[0054] Figure 8 This is a schematic diagram illustrating an example of column-row transposition processing provided in an embodiment of this application;
[0055] Figure 9This is a schematic diagram of a templated rendering process provided in an embodiment of this application;
[0056] Figure 10 This is a schematic diagram of the structure of a risk indicator backtracking simulation device provided in an embodiment of this application;
[0057] Figure 11 This is a schematic diagram of another risk indicator backtracking simulation device provided in the embodiments of this application;
[0058] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0059] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0060] Risk indicators are key data fields used in financial risk control, credit assessment, and other fields to quantify the credit risk level of individuals or groups. They typically include multi-dimensional information such as user behavior, transaction records, repayment performance, and external data sources. They serve as core inputs for risk control strategies, scoring models, and decision engines, playing a crucial role in risk identification, early warning, classification, and strategic intervention. Existing technologies rely on manually constructed test indicator datasets. The process of manually identifying and cleaning historical indicator data is complex and time-consuming, making it difficult to quickly construct indicator snapshots that conform to the rule change timeline. Furthermore, manually constructed datasets often lack accurate reproduction of the distribution characteristics of real online data, leading to discrepancies between simulation verification results and actual online performance, affecting the effectiveness and credibility of risk rule assessment. This application provides a risk indicator backtracking simulation device that, based on real risk indicator-related data, automates the indicator simulation and backtracking processes for user indicator simulation and backtracking requests. The risk indicator backtracking simulation method provided in this application can be implemented using a computer program and can run on a risk indicator backtracking simulation device based on the von Neumann architecture. This computer program can be integrated into applications or run as a standalone utility application.
[0061] Please see also Figure 1This application provides a system architecture diagram for risk indicator backtracking simulation, which may include basic data, service components, and basic dependencies. It can serve risk indicator-related application scenarios such as strategy simulation backtracking, online rule verification, and strategy A / B experiment analysis. The basic data may include indicator data source tables and indicator metadata information. The indicator data source tables can be stored using ODPS files or Holo accelerated storage to provide full transaction raw data. The indicator metadata information can be stored in an online source database and may include the definition, configuration, and version information of the risk indicators. The basic data provides data support for the related functions of the service components. The service components may include an indicator simulation module, an indicator backtracking module, and an aggregation service module. The indicator simulation module provides indicator simulation services, which can simulate and generate the characteristics of risk indicators using statistical modeling methods based on existing risk indicator metadata and historical data distribution. This constructs a test dataset that conforms to transaction logic and real data characteristics, providing high-fidelity, configurable data support for offline verification and experimental analysis of strategy rules. It also provides a unified indicator metadata view and simulation data service interface, supporting indicator consumption and verification needs in different scenarios. The indicator backtracking module provides indicator backtracking services, enabling snapshot retrieval and integration of historical risk indicator data based on a time dimension. Indicators are typically stored in time slices to reflect the risk status at a specific point in time. Through time version control and data snapshot management, the indicator backtracking mechanism supports restoring historical indicator data at user-specified time points or time segments, providing data consistency guarantees for scenarios such as comparing the effects before and after policy rule changes, simulation verification, and A / B testing, ensuring the accuracy and traceability of rule evaluations over time. The aggregation service module provides standardized indicator service capabilities across various application scenarios, namely indicator simulation services and indicator backtracking services.
[0062] The basic dependencies provide fundamental technical support for service components, including scheduling components, algorithm platforms, and big data computing platforms. The scheduling components can be periodic task scheduling frameworks that enable automated operation and maintenance and resource coordination. The algorithm platform can be a computing platform that provides data analysis and machine learning algorithm capabilities, providing binning algorithms, distributed modeling, and sampling algorithms required for subsequent steps. The big data computing platform can be a big data storage and computing engine, thereby enabling automated processing of large amounts of risk indicator data, automated execution of indicator simulation and indicator backtracking, and improving the response efficiency and data accuracy of risk indicator simulation and backtracking.
[0063] The risk indicator backtracking simulation method provided in this application will be described in detail below with reference to specific embodiments.
[0064] Please see Figure 2 This document provides a flowchart illustrating a risk indicator backtracking simulation method as described in an embodiment of this application. Figure 2 As shown, the method described in this application embodiment may include the following steps S102-S108.
[0065] S102, determine the indicator data source table and indicator metadata information of the risk indicators.
[0066] Specifically, it can obtain the indicator data source table and indicator metadata information for all risk indicators. The indicator data source table can be a database table storing the raw data of risk indicators, serving as the underlying data foundation for indicator simulation and backtracking. It can contain numerical values such as user identifier fields, time fields, and dimension attribute fields. The indicator metadata information can include the definition, configuration, calculation logic information, and version information of the risk indicators, which can guide indicator simulation generation and indicator backtracking queries.
[0067] S104. If an indicator simulation request is received, the analysis snapshot results of the indicator data source table are processed for simulation to obtain the simulation result data corresponding to the indicator simulation request.
[0068] Specifically, the risk indicator backtracking simulation device can perform analytical and statistical processing based on the indicator data source table to obtain analytical snapshot results. These snapshot results are structured data sets describing the characteristics of risk indicators, obtained through periodic offline pre-calculation of the indicator data source table. They can be persistently stored in time-sharded chunks to support subsequent indicator simulations. When a user has an indicator simulation requirement, they can send an indicator simulation request to the risk indicator backtracking simulation device. If the device receives the request, it can determine the corresponding analytical snapshot result and perform simulation processing based on that result to obtain the simulation result data. This simulation result data is a test dataset generated based on the risk indicator characteristics in the analytical snapshot result, and can be displayed to the user who issued the simulation request.
[0069] Optionally, the indicator simulation request can include the risk indicator to be simulated, the number of samples, and the time version. The corresponding analysis snapshot results can be found based on the risk indicator to be simulated, the number of samples, and the time version.
[0070] S106. If an indicator backtracking request is received, all structured query statements corresponding to the indicator backtracking request are merged into a single table to obtain a merged structured query statement.
[0071] Specifically, when a user has a backtracking request for an indicator, they can send the request to the risk indicator backtracking simulation device. If the device receives the request, it can retrieve all the corresponding Structured Query Language (SQL) statements. SQL is a standard language used to manipulate databases and retrieve the data required for indicator backtracking. Then, all the required SQL statements are merged into a single table to obtain a merged structured query statement.
[0072] S108 uses a merged structured query statement to schedule the indicator data source table and obtains the backtracking output result table corresponding to the indicator backtracking request.
[0073] Specifically, a merged structured query statement is used to schedule and process the indicator data source table, obtain the risk indicator data requested in the indicator backtracking request, and save it to the backtracking output result table. The backtracking output table can be displayed to the user who issued the indicator backtracking request.
[0074] In this embodiment, the indicator data source table and indicator metadata information of the risk indicators are determined. If an indicator simulation request is received, simulation processing is performed on the analysis snapshot results of the indicator data source table to obtain the simulation result data corresponding to the indicator simulation request. If an indicator backtracking request is received, all structured query statements corresponding to the indicator backtracking request are merged into a single table to obtain a merged structured query statement. The merged structured query statement is then used to schedule the indicator data source table to obtain the backtracking output result table corresponding to the indicator backtracking request. By using the indicator data source table as a basis, the automated execution of indicator simulation and indicator backtracking is achieved, improving the response efficiency and data accuracy of risk indicator simulation and backtracking.
[0075] Please see Figure 3 This document provides a flowchart illustrating the process of obtaining snapshot analysis results in an embodiment of this application. Figure 3 As shown, in one or more embodiments of this application, the following steps S202-S204 may be included before step 104.
[0076] S202, sample the indicator data source table to obtain the intermediate table of sampling results.
[0077] Specifically, since the original data volume of risk indicators in the indicator data source table is huge, the indicator data source table can be sampled to obtain representative data that can reflect the characteristics of risk indicator data and store it in the sampling result intermediate table. This reduces the amount of data that needs to be processed, thereby reducing the computational resource consumption of subsequent analysis and statistical processing and improving computational efficiency.
[0078] S204: Perform statistical analysis on the intermediate table of sampling results to obtain the analysis snapshot results.
[0079] Specifically, the intermediate table of the sampling results is analyzed and statistically processed to obtain structured data that characterizes the risk indicators. This structured data is then integrated to obtain the analysis snapshot results. The analysis and statistical processing can include multi-dimensional feature extraction and statistical analysis, such as value range distribution statistics, boundary value determination, and threshold sampling.
[0080] In this embodiment, the indicator data source table is sampled to obtain a sampling result intermediate table. The sampling result intermediate table is then analyzed and statistically processed to obtain an analysis snapshot result. Sampling the indicator data source table and generating the analysis snapshot result eliminates the need for real-time access to the indicator data source table when automatically responding to indicator simulation requests, thus improving the efficiency of indicator simulation.
[0081] Please see Figure 4 This document provides a schematic flowchart of a hierarchical sampling process for an embodiment of this application. Figure 4 As shown, in one or more embodiments of this application, step S202 may include the following steps S302-S304.
[0082] S302, determine the data type corresponding to the indicator data source table, perform offline binning based on the data type, and obtain the binning results.
[0083] Specifically, after determining the indicator data source table for all risk indicators, the data types involved in the indicator data source table can be determined, such as numerical, categorical, string, and date types. Then, offline binning is performed according to the data types to obtain the binning results. Offline binning can divide the data of binned indicators into multiple discrete intervals according to preset binning rules, so that the data in each discrete interval has similar data characteristics, providing data support for subsequent stratified sampling processing. Binning a large amount of data can reduce the complexity of subsequent calculations. The preset binning rules can be the initial settings of the risk indicator backtracking simulation device, or they can be set by users or relevant personnel.
[0084] Optionally, after determining the indicator data source table, the data types of the records in the indicator data source table can be quickly estimated. For example, without scanning the entire indicator data source table, the data types of each field in the indicator data source table can be quickly identified through sampling statistics or parsing indicator metadata information.
[0085] Optionally, the preset binning rules can be equal-frequency binning or equal-width binning. Equal-frequency binning means that the number of samples in each discrete interval is equal, which is suitable for application scenarios with uneven data distribution, thereby avoiding data omission. Equal-width binning means that the length of each discrete interval is equal, which is suitable for application scenarios with uniform data distribution, and can more intuitively reflect the value range.
[0086] S304. Based on the binning results, perform hierarchical sampling processing to obtain an intermediate table of sampling results.
[0087] Specifically, stratified sampling can be performed based on the binning results. That is, the discrete intervals divided in the binning results can be used as the hierarchical structure of stratified sampling. Within each discrete interval, sampling is performed according to a preset sampling ratio. Then, the data obtained after sampling of each discrete interval is saved in the intermediate table of sampling results. The preset sampling ratio can be the initial setting of the risk indicator backtracking simulation device, or it can be set by the user or relevant personnel.
[0088] In this embodiment, the data type corresponding to the indicator data source table is determined, offline binning is performed based on the data type to obtain binning results, and stratified sampling is performed based on the binning results to obtain an intermediate sampling result table. By performing stratified sampling based on the binning results, the omission of sparse data or boundary values caused by random sampling is avoided, ensuring the consistency of data distribution between the intermediate sampling result table and the indicator data source table.
[0089] Please see Figure 5 This document provides a flowchart illustrating the statistical analysis process in an embodiment of this application. Figure 5 As shown, in one or more embodiments of this application, step S204 may include the following steps S402-S408.
[0090] S402 performs statistical processing on the value range distribution of the intermediate table of sampling results to obtain the probability distribution characteristics of the risk indicators.
[0091] Specifically, the analysis and statistical processing can include value range distribution statistical processing. Value range distribution statistical processing can be performed on the intermediate table of sampling results to extract data features that can characterize the distribution of risk indicator data, thereby obtaining the probability distribution features of risk indicators. The probability distribution features are used to represent the probability of occurrence of risk indicator values.
[0092] S404 performs boundary value determination processing on the intermediate table of sampling results to obtain the value range of risk indicators.
[0093] Specifically, the analysis and statistical processing can include boundary value determination processing. This can be performed on the intermediate table of sampling results, identifying and analyzing extreme values in the intermediate table based on preset boundary value determination rules to obtain the value range of risk indicators. For example, it can be the effective value range of risk indicators under normal transaction scenarios. The preset boundary value determination rules can be the initial settings of the risk indicator backtracking simulation device, or they can be set by users or relevant personnel. For example, the preset boundary value determination rules can be related to the actual transactions in the application scenario, such as critical thresholds in actual transactions like overdue deadlines.
[0094] S406 performs threshold sampling processing on the intermediate table of sampling results to obtain key numerical points of risk indicators.
[0095] Specifically, the analysis and statistical processing may include threshold sampling. Threshold sampling can be performed on the intermediate table of sampling results. Based on the probability distribution characteristics and value range obtained in the aforementioned steps, representative key numerical points can be selected from the intermediate table of sampling results according to the principle of representativeness. Key numerical points may include quantile points and boundary value points, where quantile points can be the index values corresponding to each percentile, and boundary value points can be physical boundary values, statistical boundary values, and critical thresholds in actual transactions, etc. It can be understood that there can be one or more key numerical points.
[0096] S408 generates analysis snapshot results based on probability distribution characteristics, value range, and key numerical points.
[0097] Specifically, by integrating the probability distribution characteristics, value ranges, and key numerical points obtained from the distribution statistical processing, an analytical snapshot result can be generated.
[0098] In this embodiment, value range distribution statistical processing is performed on the intermediate table of sampling results to obtain the probability distribution characteristics of the risk indicators. Boundary value determination processing is performed on the intermediate table of sampling results to obtain the value range of the risk indicators. Threshold sampling processing is performed on the intermediate table of sampling results to obtain the key numerical points of the risk indicators. Based on the probability distribution characteristics, value range, and key numerical points, an analysis snapshot result is generated. By generating the analysis snapshot result through value range distribution statistics, boundary value determination, and threshold sampling processing, the analysis snapshot result can reflect the data distribution of the actual indicator data source table, enabling accurate simulation result data to be obtained without accessing the actual indicator data source table when requesting indicator simulation.
[0099] Please see Figure 6 This document provides a flowchart illustrating the process of generating merged structured query statements in an embodiment of this application. Figure 6As shown, in one or more embodiments of this application, step S106 may include the following steps S502-S506.
[0100] S502, if a backtracking request for an indicator is received, determine the backtracking indicator corresponding to the backtracking request.
[0101] Specifically, when a user has a backtracking request for indicators, they can send the backtracking request to the risk indicator backtracking simulation device. If the backtracking request is received, the backtracking indicators contained in the backtracking request can be obtained. The backtracking indicators are the risk indicators that the user expects to query and backtrack.
[0102] Optionally, in addition to the backtracking metric, the backtracking request may also include a backtracking audience table and a backtracking time interval. The backtracking audience table is used to specify the set of user identifiers within the scope of the metric backtracking calculation, containing the user identifiers that need to be backtracked. The backtracking time interval is used to specify the time interval for the metric backtracking calculation, indicating in which time interval the user wants to query the value of the backtracking metric. By determining the backtracking metric, the backtracking audience table, and the backtracking time interval, the required risk indicator data can be accurately located.
[0103] S504 generates query statements for backtracking indicators based on indicator metadata information, and obtains all structured query statements corresponding to indicator backtracking requests.
[0104] Specifically, query statements are generated based on the indicator metadata information to obtain all structured query statements for querying backtracking indicators. Since each backtracking indicator and backtracking time interval has an independent structured query statement, the automated generation of SQL statements can reduce the error rate when manually writing them and also ensure the accuracy in subsequent call processing.
[0105] Optionally, the Calcite framework can be used to express SQL logical structures, transforming database query statements from string text into structured objects to obtain structured query statements.
[0106] S506 performs a table merging process on all structured query statements to obtain merged structured query statements.
[0107] Specifically, different backtracking metrics may come from different data tables in the metric data source table, and data from different time points may also come from different data tables in the metric data source table. All structured query statements can be merged within the same table. This process merges structured query statements that query the same data table, generating a merged structured query statement. Multiple structured query statements targeting the same data table can be merged into a single merged structured query statement that only requires a single scan of the same data table to obtain the results of all structured query statements. In other words, the merged structured query statement only scans the same data table once, thereby avoiding duplicate data readings and reducing the computational resources consumed by the call processing.
[0108] In this embodiment, if a backtracking request is received, the backtracking indicator corresponding to the request is determined. Based on the indicator metadata information, query statement generation is performed on the backtracking indicator to obtain all structured query statements corresponding to the backtracking request. All structured query statements are then merged within the same table to obtain a merged structured query statement. By automatically generating structured query statements and merging them within the same table, the efficiency and accuracy of SQL generation are improved, and subsequent duplicate data reading is avoided, reducing computational resource consumption.
[0109] Please see Figure 7 This document provides a schematic flowchart for a column-row transposition process, as illustrated in an embodiment of this application. Figure 7 As shown, in one or more embodiments of this application, step 108 may include the following steps S602-S604.
[0110] S602 uses a merged structured query statement to schedule and process the indicator data source table to obtain an intermediate result table.
[0111] Specifically, a merged structured query statement is used to schedule and process the indicator data source table, and the obtained data is stored in an intermediate result table.
[0112] S604 performs column and row transposition on the intermediate result table to obtain the backtracking output result table corresponding to the indicator backtracking request.
[0113] Specifically, since the backtracking metrics for each backtracking request are different, in order to unify the output results for different backtracking requests and avoid inconsistent structure of the backtracking output result table each time, the intermediate result table can be transposed to obtain a backtracking output result table with a unified structure, which is convenient for users to view and read.
[0114] Optionally, a backtracking output result table can be generated based on preset transpose rules. These preset transpose rules determine fixed columns in the backtracking output result table; for example, the fixed columns could be the indicator name and the indicator value. Please refer to [link / reference]. Figure 8 The following is an example diagram of column-row transposition processing provided in this application embodiment, wherein uid is the user identifier, dt can be the time interval, Indicator-name is the indicator name, Indicator-value is the indicator value, and the backtracking output result table obtained after column-row transposition processing can have Indicator-name and Indicator-value as fixed columns.
[0115] Optionally, the backtracking output result table can be cleaned and deduplicated, and then the cleaned and deduplicated backtracking output result table can be displayed to the user who issued the indicator backtracking request.
[0116] In this embodiment, a merged structured query statement is used to schedule the indicator data source table to obtain an intermediate result table. The intermediate result table is then transposed to obtain the backtracking output result table corresponding to the indicator backtracking request. By transposing the intermediate result table to obtain a backtracking output result table with a unified structure, the differences in result tables caused by the differences in indicators backtracked each time are eliminated, thereby achieving universality of indicator backtracking capabilities.
[0117] Please see Figure 9 This document provides a schematic diagram of a templated rendering process for an embodiment of this application. Figure 9 As shown, in one or more embodiments of this application, step S602 may include the following steps S702-S704.
[0118] S702 performs templated rendering for merged structured query statements.
[0119] Specifically, the structured query statement generated by the aforementioned steps is an SQL logical structure. The merged structured query statement can be templated and rendered to obtain a templated merged structured query statement. For example, Freemarker can be used to dynamically populate the merged structured query statement with parameters to form an executable SQL statement. This decouples the logical structure of the SQL from the specific dynamic parameters, allowing the same merged structured query statement to be reused in subsequent asynchronous executions by filling in different parameters.
[0120] S704, based on the indicator data source table, asynchronously executes the merged structured query statement after templated rendering processing to obtain an intermediate result table.
[0121] Specifically, based on the indicator data source table, asynchronous components are used to execute the merged structured query statements after template rendering in parallel, and the queried data is stored in the intermediate result table.
[0122] In this embodiment, the merged structured query statement is templated and rendered. Based on the indicator data source table, the templated and rendered merged structured query statement is executed asynchronously to obtain an intermediate result table. By dynamically populating the SQL logical results with parameters, the reuse of the merged structured query statement is achieved.
[0123] The following will be combined with the appendix Figure 10 - Appendix Figure 11 This paper provides a detailed description of the risk indicator backtracking simulation device provided in the embodiments of this application. It should be noted that the appendix... Figure 10 - Appendix Figure 11 The risk indicator backtracking simulation device in the application is used to execute the application. Figures 1-9 The methods shown in the embodiments are for illustrative purposes only, illustrating the parts relevant to the embodiments of this application. For specific technical details not disclosed, please refer to this application. Figures 1-9 The example shown.
[0124] Please see Figure 10 This illustration shows a schematic diagram of a risk indicator backtracking simulation device provided in an exemplary embodiment of this application. The risk indicator backtracking simulation device can be implemented as all or part of a device through software, hardware, or a combination of both. The device 1 includes a risk indicator determination unit 11, an indicator simulation unit 12, a statement merging unit 13, and an indicator backtracking unit 14.
[0125] Risk indicator determination unit 11 is used to determine the indicator data source table and indicator metadata information of risk indicators;
[0126] The indicator simulation unit 12 is used to perform simulation processing on the analysis snapshot results of the indicator data source table to obtain the simulation result data corresponding to the indicator simulation request if an indicator simulation request is received.
[0127] Statement merging unit 13 is used to perform table merging processing on all structured query statements corresponding to the indicator backtracking request if an indicator backtracking request is received, so as to obtain a merged structured query statement.
[0128] The indicator backtracking unit 14 is used to perform scheduling processing on the indicator data source table using the merged structured query statement to obtain the backtracking output result table corresponding to the indicator backtracking request.
[0129] In this embodiment, the indicator data source table and indicator metadata information of the risk indicators are determined. If an indicator simulation request is received, simulation processing is performed on the analysis snapshot results of the indicator data source table to obtain the simulation result data corresponding to the indicator simulation request. If an indicator backtracking request is received, all structured query statements corresponding to the indicator backtracking request are merged into a single table to obtain a merged structured query statement. The merged structured query statement is then used to schedule the indicator data source table to obtain the backtracking output result table corresponding to the indicator backtracking request. By using the indicator data source table as a basis, the automated execution of indicator simulation and indicator backtracking is achieved, improving the response efficiency and data accuracy of risk indicator simulation and backtracking.
[0130] Please see Figure 11 This illustration shows a schematic diagram of a risk indicator backtracking simulation device provided in an exemplary embodiment of this application. The risk indicator backtracking simulation device can be implemented as all or part of a device through software, hardware, or a combination of both. The device 1 includes a risk indicator determination unit 11, an indicator analysis unit 15, an indicator simulation unit 12, a statement merging unit 13, and an indicator backtracking unit 14.
[0131] Risk indicator determination unit 11 is used to determine the indicator data source table and indicator metadata information of risk indicators;
[0132] The indicator analysis unit 15 is used to perform sampling processing on the indicator data source table to obtain an intermediate table of sampling results;
[0133] The intermediate table of the sampling results is analyzed and statistically processed to obtain the analysis snapshot results.
[0134] Optionally, the indicator analysis unit 15 is specifically used to determine the data type corresponding to the indicator data source table, perform offline binning processing based on the data type, and obtain binning results;
[0135] Based on the binning results, stratified sampling processing is performed to obtain an intermediate table of sampling results.
[0136] Optionally, the indicator analysis unit 15 is specifically used to perform value range distribution statistical processing on the intermediate table of the sampling results to obtain the probability distribution characteristics of the risk indicator;
[0137] Boundary value determination processing is performed on the intermediate table of the sampling results to obtain the value range of the risk indicator;
[0138] Threshold sampling processing is performed on the intermediate table of the sampling results to obtain the key numerical points of the risk indicator;
[0139] Based on the probability distribution characteristics, the value range, and the key numerical points, an analysis snapshot result is generated.
[0140] The indicator simulation unit 12 is used to perform simulation processing on the analysis snapshot results of the indicator data source table to obtain the simulation result data corresponding to the indicator simulation request if an indicator simulation request is received.
[0141] Statement merging unit 13 is used to perform table merging processing on all structured query statements corresponding to the indicator backtracking request if an indicator backtracking request is received, so as to obtain a merged structured query statement.
[0142] Optional. Specifically, the statement merging unit 13 is used to determine the backtracking indicator corresponding to the indicator backtracking request if an indicator backtracking request is received;
[0143] Based on the indicator metadata information, query statements are generated for the backtracking indicator to obtain all structured query statements corresponding to the indicator backtracking request.
[0144] All the structured query statements are merged into a single table to obtain merged structured query statements.
[0145] Optional. The statement merging unit 13 is specifically used to perform template rendering processing on the merged structured query statement;
[0146] Based on the aforementioned indicator data source table, the merged structured query statement, after templated rendering processing, is executed asynchronously to obtain an intermediate result table.
[0147] The indicator backtracking unit 14 is used to perform scheduling processing on the indicator data source table using the merged structured query statement to obtain the backtracking output result table corresponding to the indicator backtracking request.
[0148] Optionally, the indicator backtracking unit 14 is specifically used to perform scheduling processing on the indicator data source table using the merged structured query statement to obtain an intermediate result table;
[0149] The intermediate result table is transposed to obtain the backtracking output result table corresponding to the indicator backtracking request.
[0150] In this embodiment, the indicator data source table and indicator metadata information of the risk indicators are determined, the data type corresponding to the indicator data source table is determined, offline binning is performed based on the data type to obtain binning results, and stratified sampling is performed based on the binning results to obtain an intermediate sampling result table. By performing stratified sampling based on the binning results, the omission of sparse data or boundary values caused by random sampling is avoided, ensuring the consistency of data distribution between the intermediate sampling result table and the indicator data source table. Value range distribution statistical processing is performed on the intermediate sampling result table to obtain the probability distribution characteristics of the risk indicators, boundary value judgment processing is performed on the intermediate sampling result table to obtain the value range of the risk indicators, and threshold sampling processing is performed on the intermediate sampling result table to obtain the key numerical points of the risk indicators. Based on the probability distribution characteristics, value range, and key numerical points, an analysis snapshot result is generated. By generating the analysis snapshot result through value range distribution statistics, boundary value judgment, and threshold sampling processing, the analysis snapshot result can reflect the data distribution of the real indicator data source table, so that accurate simulation result data can be obtained without accessing the actual indicator data source table when requesting indicator simulation.
[0151] If a backtracking request is received, the corresponding backtracking indicator is determined. Based on the indicator's metadata, query statements are generated for the backtracking indicator, resulting in all structured query statements corresponding to the backtracking request. These structured query statements are then merged into a single table to obtain a merged structured query statement. Automated generation and merging of structured query statements improves SQL generation efficiency and accuracy, avoids subsequent duplicate data reading, and reduces computational resource consumption. The merged structured query statement is used to schedule the indicator data source table, obtaining an intermediate result table. This intermediate result table is then transposed to obtain the backtracking output result table corresponding to the backtracking request. By transposing the intermediate result table to obtain a structured backtracking output result table, differences in the result table caused by variations in each backtracking indicator are eliminated, thus achieving universality of indicator backtracking capabilities. The merged structured query statement is templated and rendered asynchronously based on the indicator data source table to obtain an intermediate result table. Dynamic parameter filling of the SQL logical results enables the reuse of the merged structured query statement. By using indicator data source tables as a basis, the automated execution of indicator simulation and indicator backtracking is achieved, thereby improving the response efficiency and data accuracy of risk indicator simulation and backtracking.
[0152] It should be noted that the risk indicator backtracking simulation device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the risk indicator backtracking simulation method. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the risk indicator backtracking simulation device and the risk indicator backtracking simulation method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.
[0153] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0154] This application also provides a computer storage medium that can store multiple instructions, which are adapted to be loaded and executed by a processor as described above. Figures 1-9 The risk indicator backtracking simulation method described in the illustrated embodiment can be found in the following documentation for its specific execution process. Figures 1-9 The specific details of the illustrated embodiments will not be elaborated here.
[0155] This application also provides a computer program product storing at least one instruction, which is loaded and executed by the processor as described above. Figures 1-9 The risk indicator backtracking simulation method described in the illustrated embodiment can be found in the following documentation for its specific execution process. Figures 1-9 The specific details of the illustrated embodiments will not be elaborated here.
[0156] Please refer to Figure 12 This diagram illustrates a structural block diagram of an electronic device provided in an exemplary embodiment of this application. The electronic device in this application may include one or more components such as a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, memory 120, input device 130, and output device 140 may be connected via the bus 150.
[0157] Processor 110 may include one or more processing cores. Processor 110 connects to various parts of the electronic device using various interfaces and lines, and executes various functions of terminal 100 and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 120, and by calling data stored in memory 120. Optionally, processor 110 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 110 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user page, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 110 and may be implemented separately using a communication chip.
[0158] The memory 120 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 120 may include non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the various method embodiments described above, etc. The operating system may be the Android system, including systems deeply developed based on the Android system, the iOS system developed by Apple Inc., including systems deeply developed based on the iOS system, or other systems.
[0159] The memory 120 can be divided into operating system space and user space. The operating system runs in the operating system space, while native and third-party applications run in user space. To ensure that different third-party applications can achieve good running performance, the operating system allocates corresponding system resources for each application. However, different application scenarios within the same third-party application have different requirements for system resources. For example, in local resource loading scenarios, third-party applications have high requirements for disk read speed; in animation rendering scenarios, third-party applications have high requirements for GPU performance. Since the operating system and third-party applications are independent of each other, the operating system often cannot promptly perceive the current application scenario of a third-party application, resulting in the operating system's inability to adapt system resources accordingly.
[0160] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to establish data communication between the third-party applications and the operating system. This would allow the operating system to obtain the current scenario information of the third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.
[0161] The input device 130 is used to receive input instructions or data, and includes, but is not limited to, a keyboard, mouse, camera, microphone, or touch device. The output device 140 is used to output instructions or data, and includes, but is not limited to, a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 can be a touch display screen.
[0162] The touch display screen can be designed as a full-screen, curved screen, or irregularly shaped screen. It can also be designed as a combination of a full-screen and a curved screen, or a combination of an irregularly shaped screen and a curved screen; however, this application does not limit the specific design in this regard.
[0163] In addition, those skilled in the art will understand that the structure of the electronic device shown in the above figures does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the electronic device may also include radio frequency circuits, input units, sensors, audio circuits, Wireless Fidelity (WiFi) modules, power supplies, Bluetooth modules, etc., which will not be described in detail here.
[0164] exist Figure 12 In the illustrated electronic device, processor 110 can be used to call the risk indicator backtracking simulation application stored in memory 120, and specifically perform the following operations:
[0165] Determine the indicator data source table and indicator metadata information for the risk indicators;
[0166] If an indicator simulation request is received, simulation processing is performed on the analysis snapshot results of the indicator data source table to obtain the simulation result data corresponding to the indicator simulation request.
[0167] If a backtracking request for an indicator is received, all structured query statements corresponding to the backtracking request for the indicator are merged into a single table to obtain a merged structured query statement.
[0168] The merged structured query statement is used to schedule the data source table of the indicator to obtain the backtracking output result table corresponding to the indicator backtracking request.
[0169] In one embodiment, before the processor 110 performs simulation processing on the analysis snapshot results of the indicator data source table if an indicator simulation request is received, and obtains the simulation result data corresponding to the indicator simulation request, it also performs the following operations:
[0170] The sampling data source table of the indicator is processed to obtain an intermediate table of sampling results;
[0171] The intermediate table of the sampling results is analyzed and statistically processed to obtain the analysis snapshot results.
[0172] In one embodiment, when the processor 110 performs sampling processing on the indicator data source table to obtain a sampling result intermediate table, it specifically performs the following operations:
[0173] Determine the data type corresponding to the indicator data source table, perform offline binning based on the data type, and obtain the binning result;
[0174] Based on the binning results, stratified sampling processing is performed to obtain an intermediate table of sampling results.
[0175] In one embodiment, when the processor 110 performs analytical and statistical processing on the intermediate table of the sampling results to obtain the analysis snapshot results, it specifically performs the following operations:
[0176] The intermediate table of the sampling results is subjected to value range distribution statistical processing to obtain the probability distribution characteristics of the risk index;
[0177] Boundary value determination processing is performed on the intermediate table of the sampling results to obtain the value range of the risk indicator;
[0178] Threshold sampling processing is performed on the intermediate table of the sampling results to obtain the key numerical points of the risk indicator;
[0179] Based on the probability distribution characteristics, the value range, and the key numerical points, an analysis snapshot result is generated.
[0180] In one embodiment, when the processor 110 executes the "If a backtracking request is received, merge all structured query statements corresponding to the backtracking request into a single table" process to obtain a merged structured query statement, it specifically performs the following operations:
[0181] If a metric backtracking request is received, the backtracking metric corresponding to the metric backtracking request is determined;
[0182] Based on the indicator metadata information, query statements are generated for the backtracking indicator to obtain all structured query statements corresponding to the indicator backtracking request.
[0183] All the structured query statements are merged into a single table to obtain merged structured query statements.
[0184] In one embodiment, when the processor 110 executes the scheduled processing of the indicator data source table using the merged structured query statement to obtain the backtracking output result table corresponding to the indicator backtracking request, it specifically performs the following operations:
[0185] The merged structured query statement is used to schedule and process the indicator data source table to obtain an intermediate result table;
[0186] The intermediate result table is transposed to obtain the backtracking output result table corresponding to the indicator backtracking request.
[0187] In one embodiment, when the processor 110 executes the scheduled processing of the indicator data source table using the merged structured query statement to obtain an intermediate result table, it specifically performs the following operations:
[0188] The merged structured query statement is then subjected to template rendering.
[0189] Based on the aforementioned indicator data source table, the merged structured query statement, after templated rendering processing, is executed asynchronously to obtain an intermediate result table.
[0190] In this embodiment, the indicator data source table and indicator metadata information of the risk indicators are determined, the data type corresponding to the indicator data source table is determined, offline binning is performed based on the data type to obtain binning results, and stratified sampling is performed based on the binning results to obtain an intermediate sampling result table. By performing stratified sampling based on the binning results, the omission of sparse data or boundary values caused by random sampling is avoided, ensuring the consistency of data distribution between the intermediate sampling result table and the indicator data source table. Value range distribution statistical processing is performed on the intermediate sampling result table to obtain the probability distribution characteristics of the risk indicators, boundary value judgment processing is performed on the intermediate sampling result table to obtain the value range of the risk indicators, and threshold sampling processing is performed on the intermediate sampling result table to obtain the key numerical points of the risk indicators. Based on the probability distribution characteristics, value range, and key numerical points, an analysis snapshot result is generated. By generating the analysis snapshot result through value range distribution statistics, boundary value judgment, and threshold sampling processing, the analysis snapshot result can reflect the data distribution of the real indicator data source table, so that accurate simulation result data can be obtained without accessing the actual indicator data source table when requesting indicator simulation.
[0191] If a backtracking request is received, the corresponding backtracking indicator is determined. Based on the indicator's metadata, query statements are generated for the backtracking indicator, resulting in all structured query statements corresponding to the backtracking request. These structured query statements are then merged into a single table to obtain a merged structured query statement. Automated generation and merging of structured query statements improves SQL generation efficiency and accuracy, avoids subsequent duplicate data reading, and reduces computational resource consumption. The merged structured query statement is used to schedule the indicator data source table, obtaining an intermediate result table. This intermediate result table is then transposed to obtain the backtracking output result table corresponding to the backtracking request. By transposing the intermediate result table to obtain a structured backtracking output result table, differences in the result table caused by variations in each backtracking indicator are eliminated, thus achieving universality of indicator backtracking capabilities. The merged structured query statement is templated and rendered asynchronously based on the indicator data source table to obtain an intermediate result table. Dynamic parameter filling of the SQL logical results enables the reuse of the merged structured query statement. By using indicator data source tables as a basis, the automated execution of indicator simulation and indicator backtracking is achieved, thereby improving the response efficiency and data accuracy of risk indicator simulation and backtracking.
[0192] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.
[0193] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
[0194] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the indicator data source tables and indicator metadata information involved in this specification were obtained with full authorization.
Claims
1. A risk indicator backtracking simulation method, characterized in that, The method includes: Determine the indicator data source table and indicator metadata information for the risk indicators; If an indicator simulation request is received, simulation processing is performed on the analysis snapshot results of the indicator data source table to obtain the simulation result data corresponding to the indicator simulation request. If a backtracking request for an indicator is received, all structured query statements corresponding to the backtracking request for the indicator are merged into a single table to obtain a merged structured query statement. The merged structured query statement is used to schedule the indicator data source table to obtain the backtracking output result table corresponding to the indicator backtracking request; If a metric backtracking request is received, all structured query statements corresponding to the metric backtracking request are merged into a single table to obtain merged structured query statements, including: If a metric backtracking request is received, the backtracking metric corresponding to the metric backtracking request is determined; Based on the indicator metadata information, query statement generation processing is performed on the backtracking indicator to obtain all structured query statements corresponding to the indicator backtracking request, wherein each backtracking indicator corresponds to an independent structured query statement. All the structured query statements are processed by merging them into a single table. This process merges the structured query statements that query the same data table to generate a merged structured query statement. The merging process ensures that the merged structured query statement only needs to scan the same data table once.
2. The method according to claim 1, characterized in that, Before receiving an indicator simulation request and performing simulation processing on the analysis snapshot results of the indicator data source table to obtain the simulation result data corresponding to the indicator simulation request, the method further includes: The sampling data source table of the indicator is processed to obtain an intermediate table of sampling results; The intermediate table of the sampling results is analyzed and statistically processed to obtain the analysis snapshot results.
3. The method according to claim 2, characterized in that, The step of sampling the indicator data source table to obtain the intermediate table of sampling results includes: Determine the data type corresponding to the indicator data source table, perform offline binning based on the data type, and obtain the binning result; Based on the binning results, stratified sampling processing is performed to obtain an intermediate table of sampling results.
4. The method according to claim 2, characterized in that, The step of performing statistical analysis on the intermediate table of the sampling results to obtain the analysis snapshot results includes: The intermediate table of the sampling results is subjected to value range distribution statistical processing to obtain the probability distribution characteristics of the risk index; Boundary value determination processing is performed on the intermediate table of the sampling results to obtain the value range of the risk indicator; Threshold sampling processing is performed on the intermediate table of the sampling results to obtain the key numerical points of the risk indicator; Based on the probability distribution characteristics, the value range, and the key numerical points, an analysis snapshot result is generated.
5. The method according to claim 1, characterized in that, The step of using the merged structured query statement to perform scheduling processing on the indicator data source table to obtain the backtracking output result table corresponding to the indicator backtracking request includes: The merged structured query statement is used to schedule and process the indicator data source table to obtain an intermediate result table; The intermediate result table is transposed to obtain the backtracking output result table corresponding to the indicator backtracking request.
6. The method according to claim 5, characterized in that, The process of using the merged structured query statement to schedule and process the indicator data source table to obtain an intermediate result table includes: The merged structured query statement is then subjected to template rendering. Based on the aforementioned indicator data source table, the merged structured query statement, after templated rendering processing, is executed asynchronously to obtain an intermediate result table.
7. A risk indicator backtracking simulation device, characterized in that, The device includes: The risk indicator determination unit is used to determine the indicator data source table and indicator metadata information of the risk indicators; The indicator simulation unit is used to perform simulation processing on the analysis snapshot results of the indicator data source table if an indicator simulation request is received, and to obtain the simulation result data corresponding to the indicator simulation request. The statement merging unit is used to merge all structured query statements corresponding to the indicator backtracking request into the same table if an indicator backtracking request is received, so as to obtain a merged structured query statement. The indicator backtracking unit is used to perform scheduling processing on the indicator data source table using the merged structured query statement to obtain the backtracking output result table corresponding to the indicator backtracking request. The statement merging unit is specifically used to determine the backtracking indicator corresponding to the indicator backtracking request if an indicator backtracking request is received. Based on the indicator metadata information, query statement generation processing is performed on the backtracking indicator to obtain all structured query statements corresponding to the indicator backtracking request, wherein each backtracking indicator corresponds to an independent structured query statement. All the structured query statements are processed by merging them into a single table. This process merges the structured query statements that query the same data table to generate a merged structured query statement. The merging process ensures that the merged structured query statement only needs to scan the same data table once.
8. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as method steps as claimed in any one of claims 1 to 6.
9. A computer program product, characterized in that, The computer program product stores multiple instructions, which are adapted to be loaded by a processor and executed as the method steps of any one of claims 1 to 6.
10. An electronic device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed the method steps as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Intelligent generation method and device for power equipment accident recovery, computer equipment and storage medium
CN121480645A
Access control interfaces for blockchains
WO2024019836A1