Risk control decision debugging method and device, equipment and storage medium

By storing log data to a distributed search engine in the risk control decision system, building a decision execution diagram and generating a graphical user interface, the existing system's insufficient path coverage and inefficiency during testing and debugging is solved, and efficient debugging and verification.

CN119415412APending Publication Date: 2025-02-11CHINA MERCHANTS BANK
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411402879.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

In the testing and debugging process, existing risk control decision-making systems have problems such as inefficient path coverage, lack of grayscale publishing functions, and relying on manual log analysis.

Method used

By storing the structured data of the risk control decision log into a distributed search engine, querying the target log data, building a decision execution diagram and generating a graphical user interface, breakpoint debugging and parameter change display are realized.

Benefits of technology

Comprehensive change verification is achieved, the representativeness and coverage of test data are enhanced, and the accuracy and efficiency of debugging are improved through interactive debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415412A_ABST
    Figure CN119415412A_ABST
Patent Text Reader

Abstract

The invention discloses a risk control decision debugging method, device and equipment and a storage medium, and relates to the technical field of risk control decisions, and the method comprises the following steps: storing structured data of a risk control decision log into a distributed search engine; querying the target log data in the distributed search engine to obtain a log data query result; constructing a decision execution graph according to the log data query result, and constructing a graphical user interface according to the decision execution graph; breakpoint debugging is carried out based on a debugging instruction sent by a user on the graphical user interface, and parameter changes before and after the debugging instruction is executed are displayed. According to the method, the structured data of the risk control decision log is stored in the distributed search engine, and the decision execution graph is constructed based on the queried log data, so that comprehensive change verification can be realized, the representativeness and coverage of test data are enhanced, interactive debugging is realized based on a graphical user interface, and the debugging accuracy and efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of risk control decision-making, and in particular to a debugging method, device, equipment and storage medium for risk control decision-making. Background Art

[0002] The risk control decision-making system of banks is under unprecedented iteration pressure. Although there are a variety of visual decision orchestration solutions on the market to accelerate decision updates, these tools have exposed significant limitations when dealing with complex problems. For example, in highly complex scenarios such as personal credit approval, the rule combinations involved may result in thousands of execution paths. Existing visualization tools cannot provide comprehensive path coverage testing solutions, resulting in inefficiency of testers when building test cases and often missing critical paths. Due to the lack of grayscale release function, direct release of decision changes may cause serious production accidents with reduced accuracy, affecting business stability. When encountering abnormal decision output or test deviation, it currently relies on manual log analysis, which often takes more than an hour. This experience-based positioning method is not only inefficient, but also increases the complexity of decision maintenance, seriously affecting the work efficiency and satisfaction of developers. Summary of the invention

[0003] The main purpose of this application is to provide a debugging method, device, equipment and storage medium for risk control decisions, aiming to solve the technical problem that the existing decision process testing method cannot fully cover the test, resulting in low accuracy and efficiency of risk control decision debugging.

[0004] To achieve the above objectives, the present application proposes a method for debugging risk control decisions, the method comprising:

[0005] Store the structured data of risk control decision logs in a distributed search engine;

[0006] Querying the target log data in the distributed search engine to obtain log data query results;

[0007] Constructing a decision execution graph according to the log data query result, and constructing a graphical user interface according to the decision execution graph;

[0008] Breakpoint debugging is performed based on the debugging instructions issued by the user in the graphical user interface, and parameter changes before and after the execution of the debugging instructions are displayed.

[0009] In one embodiment, the graphical user interface includes a debugging function area, and the debugging function area includes a decision execution graph display area;

[0010] The step of constructing a decision execution graph according to the log data query result, and constructing a graphical user interface according to the decision execution graph includes:

[0011] Parsing the decision execution response message in the log data query result;

[0012] Constructing a decision node according to the decision execution response message, and constructing a decision execution graph according to the decision node;

[0013] A graphical user interface is constructed, and the decision execution diagram is displayed in the decision execution diagram display area.

[0014] In one embodiment, the debugging function area also includes a node configuration display area and a parameter change display area;

[0015] The step of performing breakpoint debugging based on the debugging instruction issued by the user in the graphical user interface and displaying parameter changes before and after the execution of the debugging instruction includes:

[0016] When a user clicks a target decision node in the decision execution diagram in the graphical user interface, displaying node configuration information of the target decision node in the node configuration display area;

[0017] When a user issues a debugging instruction based on the target decision node and the node configuration information, executing the debugging instruction, and obtaining a post-execution parameter after the debugging instruction is executed;

[0018] The original parameters before the debugging instruction is executed and the parameters after the execution are displayed in the parameter change display area.

[0019] In one embodiment, after the step of displaying the original parameters before the execution of the debugging instruction and the parameters after the execution in the parameter change display area, the method further includes:

[0020] Determine the execution order according to the topological structure of the decision execution graph and the timestamps of the decision nodes in the decision execution graph;

[0021] Determine the next execution node of the target decision node in the decision execution graph according to the execution order, or, if the target decision node is a node involving an external rule, display the rule detail node corresponding to the target decision node in the decision execution graph display area, and use the rule detail node as the next execution node;

[0022] The debugging instruction is executed based on the next execution node, and parameter changes before and after the execution of the debugging instruction are displayed in the parameter change display area.

[0023] In one embodiment, after the step of performing breakpoint debugging based on the debugging instruction issued by the user in the graphical user interface and displaying the parameter changes before and after the execution of the debugging instruction, the method further includes:

[0024] Acquire cleaned historical decision data, and construct a backtesting task based on the cleaned historical decision data;

[0025] Starting the backtest task according to the priority through the task scheduler;

[0026] Loading target decision execution resources according to the backtest task;

[0027] Obtaining target log data corresponding to the cleaned historical decision data from the distributed search engine;

[0028] Execute the backtest task based on the target decision execution resource and the target log data to obtain new and old decision test results;

[0029] The new and old decision test results are statistically analyzed to obtain decision change evaluation results.

[0030] In one embodiment, after the step of performing statistics and analysis on the new and old decision test results to obtain the decision change evaluation result, the following step is further included:

[0031] Deploy a new decision version on a first decision execution application, and deploy an old decision version on a second decision execution application, wherein the new decision version is provided by a first service route, and the old decision version is provided by a second service route;

[0032] Setting the traffic distribution ratio of the first service route and the second service route in the decision configuration;

[0033] The traffic distribution ratio is dynamically adjusted by executing the application gateway so that the performance data of the new decision version and the old decision version meet the consistency condition.

[0034] In one embodiment, the step of dynamically adjusting the traffic distribution ratio by executing the application gateway so that the performance data of the new decision version and the old decision version meet the consistency condition includes:

[0035] Obtaining preset flow experiment parameters, wherein the preset flow experiment parameters include experiment time, flow distribution ratio and monitoring index;

[0036] The routing weights corresponding to the first service route and the second service route are adjusted in real time by executing the application gateway, and the user request is distributed to the first decision execution application and the second decision execution application according to the traffic distribution ratio;

[0037] Monitoring the performance data of the new decision version and the old decision version in real time;

[0038] Performing batch analysis on the performance data through a data warehouse to obtain a performance difference between the new decision version and the old decision version;

[0039] The traffic distribution ratio is dynamically adjusted so that the performance difference satisfies a consistency condition.

[0040] In addition, to achieve the above purpose, the present application also proposes a debugging device for risk control decision, the debugging device for risk control decision comprising:

[0041] Log data storage module, used to store structured data of risk control decision logs in distributed search engines;

[0042] A log data query module, used to query target log data in the distributed search engine and obtain log data query results;

[0043] A user interface construction module, used to construct a decision execution graph according to the log data query result, and to construct a graphical user interface according to the decision execution graph;

[0044] The risk control decision debugging module is used to perform breakpoint debugging based on the debugging instructions issued by the user in the graphical user interface, and to display the parameter changes before and after the execution of the debugging instructions.

[0045] In addition, to achieve the above-mentioned purpose, the present application also proposes a debugging device for risk control decisions, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the debugging method for risk control decisions as described above.

[0046] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the risk control decision debugging method described above are implemented.

[0047] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the risk control decision debugging method as described above.

[0048] The present application provides a method for debugging risk control decisions, by storing the structured data of the risk control decision log in a distributed search engine; querying the target log data in the distributed search engine to obtain the log data query results; constructing a decision execution graph based on the log data query results, and constructing a graphical user interface based on the decision execution graph; performing breakpoint debugging based on the debugging instructions issued by the user in the graphical user interface, and displaying the parameter changes before and after the execution of the debugging instructions. The present application stores the structured data of the risk control decision log in a distributed search engine, and constructs a decision execution graph based on the queried log data, thereby enabling comprehensive change verification, enhancing the representativeness and coverage of the test data, and improving the accuracy and efficiency of debugging by implementing interactive debugging based on the graphical user interface. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0051] Figure 1 A flowchart diagram of the first embodiment of the debugging method for risk control decision-making of this application;

[0052] Figure 2 A flowchart diagram of the second embodiment of the debugging method for risk control decision-making of this application is provided;

[0053] Figure 3 It is the decision restoration and debugging function module in the second embodiment of the debugging method for risk control decision of this application;

[0054] Figure 4 A flowchart diagram of the third embodiment of the debugging method for risk control decision-making of this application is provided;

[0055] Figure 5 A schematic diagram of the execution flow of the backtesting task in Embodiment 3 of the debugging method for risk control decision-making of this application;

[0056] Figure 6 A flowchart diagram of the fourth embodiment of the debugging method for risk control decision-making of this application is provided;

[0057] Figure 7 A flow chart of a flow experiment in Embodiment 4 of the debugging method for risk control decision-making of this application;

[0058] Figure 8The overall system architecture diagram of the debugging method for risk control decision-making in this application;

[0059] Fig. 9 A schematic diagram of the module structure of the debugging device for risk control decision-making in an embodiment of the present application;

[0060] Fig.10 A schematic diagram of the device structure of the hardware operating environment involved in the risk control decision-making debugging method in the embodiment of the present application.

[0061] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0062] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0063] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0064] The main solution of the embodiment of the present application is: storing the structured data of the risk control decision log in a distributed search engine; querying the target log data in the distributed search engine to obtain the log data query results; constructing a decision execution graph according to the log data query results, and constructing a graphical user interface according to the decision execution graph; performing breakpoint debugging based on the debugging instructions issued by the user in the graphical user interface, and displaying the parameter changes before and after the execution of the debugging instructions.

[0065] Since existing visualization tools cannot provide comprehensive path coverage testing solutions, testers are inefficient when building test cases and often miss critical paths. Due to the lack of grayscale release functions, direct release of decision changes may cause serious production accidents with reduced accuracy, affecting business stability. When encountering abnormal decision output or test deviation, manual log analysis is currently relied upon, which often takes more than an hour. This experience-based positioning method is not only inefficient, but also increases the complexity of decision maintenance, seriously affecting the work efficiency and satisfaction of developers.

[0066] The present application provides a solution by storing the structured data of the risk control decision log in a distributed search engine; querying the target log data in the distributed search engine to obtain the log data query results; constructing a decision execution graph based on the log data query results, and constructing a graphical user interface based on the decision execution graph; performing breakpoint debugging based on the debugging instructions issued by the user in the graphical user interface, and displaying the parameter changes before and after the execution of the debugging instructions. The present application stores the structured data of the risk control decision log in a distributed search engine, and constructs a decision execution graph based on the queried log data, thereby enabling comprehensive change verification, enhancing the representativeness and coverage of the test data, and improving the accuracy and efficiency of debugging by implementing interactive debugging based on the graphical user interface.

[0067] It should be noted that the execution subject of the method of this embodiment can be a computing service device with risk control decision debugging, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc.; it can also be a risk control decision debugging device with the same or similar functions. This embodiment and the following embodiments will be described by taking the risk control decision debugging device as an example.

[0068] Based on this, the embodiment of the present application provides a debugging method for risk control decision-making, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the debugging method for risk control decision-making of this application.

[0069] In this embodiment, the risk control decision debugging method includes steps S10 to S40:

[0070] Step S10, storing the structured data of the risk control decision log in a distributed search engine.

[0071] It can be understood that this embodiment captures the logs of decision services by adopting a real-time log collection system (such as Fluentd or Logstash), converts unstructured logs into structured data using a log parsing algorithm (such as regular expressions or JSON parsing library), and stores the structured data in a distributed search engine (Elasticsearch, ES).

[0072] In the specific implementation, in the containerized decision-making application environment, we introduce a dynamic configuration mechanism to control log collection. The dynamic configuration mechanism is as follows:

[0073] dtms_log_enable: whether to enable log collection,

[0074] dms_log_report_kafka_topic: the topic address of the log collection kafka,

[0075] dims_log_report_kafka_servers: the server address of the log collection kafka,

[0076] dims_log_report_kafka_usernane: log collection kafka user name,

[0077] dms_log_report_kafka_password: log collection kafka password,

[0078] dms_log_app_app-id: the name of the currently executing application.

[0079] dms_log_app_prod-id: the id of the currently executing application product.

[0080] dmns_log_app_level1: log collection level.

[0081] It is understandable that when collecting logs, after configuring and enabling log collection, a log collection agent is used to monitor the standard output of the container, capture the logs of decision-making applications in real time, and structure them according to predefined log format standards (such as JSON or LTSV). The collected logs are transmitted through the message middleware Kafka to ensure high availability and low latency. When processing and storing logs, the Kafka consumer application is responsible for consuming log messages, using a custom parser (possibly based on regular expressions or JSONPath) for further parsing and data cleaning to remove noise information and ensure data quality. The processed log data is persistently stored in the (Elasticsearch, ES) cluster, using the distributed characteristics of ES to ensure data scalability and high query performance.

[0082] Step S20, querying the target log data in the distributed search engine to obtain the log data query result.

[0083] It should be understood that ES provides efficient data retrieval services for decision restoration and debugging through customized indexes and query APIs. Encapsulate the REST API of ES, develop a user-friendly query service interface, and support SQL-like query syntax (such as Elasticsearch's DSL or Kibana's Discover interface). Provide precise queries for single data records, as well as batch queries based on time ranges, keywords, decision IDs, and other conditions. At the same time, in order to improve query efficiency, implement index optimization strategies, such as using custom mappings and word breakers. The target log data corresponding to the request ID can be extracted from ES through the decision request ID to obtain the log data query results. This ensures the effective management and rapid access of decision data, and provides strong data support for decision restoration, debugging, and backtesting.

[0084] Step S30, constructing a decision execution graph according to the log data query result, and constructing a graphical user interface according to the decision execution graph.

[0085] It is understandable that the decision flow can be displayed using a graphical user interface (GUI) by building a decision execution graph based on the query results of ES. A graphical user interface is built based on the decision execution graph, and a breakpoint debugging function is integrated in the graphical user interface to achieve single-step execution and node-level debugging.

[0086] Step S40, performing breakpoint debugging based on the debugging instruction issued by the user in the graphical user interface, and displaying parameter changes before and after the execution of the debugging instruction.

[0087] It is understandable that the user can click on the breakpoint debugging function of the graphical user interface, and the system will perform breakpoint debugging based on the user's debugging instructions and display the parameter changes before and after the debugging instructions are executed. By comparing the parameter changes before and after execution, it can help users quickly locate decision-making problems. Using visual node debugging reduces the time cost of abnormal location, improves the efficiency of solving decision-making problems, improves the work experience of developers, and enhances the stability of the system.

[0088] This embodiment provides a method for debugging risk control decisions, which stores the structured data of the risk control decision log in a distributed search engine; queries the target log data in the distributed search engine to obtain the log data query results; constructs a decision execution graph based on the log data query results, and constructs a graphical user interface based on the decision execution graph; performs breakpoint debugging based on the debugging instructions issued by the user in the graphical user interface, and displays the parameter changes before and after the execution of the debugging instructions. This embodiment stores the structured data of the risk control decision log in a distributed search engine, and constructs a decision execution graph based on the queried log data, so that comprehensive change verification can be achieved, the representativeness and coverage of the test data are enhanced, and the accuracy and efficiency of debugging are improved by implementing interactive debugging based on the graphical user interface.

[0089] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 2 , step S30, the graphical user interface includes a debugging function area, and the debugging function area includes a decision execution diagram display area; the risk control decision debugging method also includes steps S301 to S303:

[0090] Step S301, parsing the decision execution response message in the log data query result.

[0091] It should be noted that the decision execution process is deeply analyzed through the decision restoration and debugging function module in this embodiment, which can be referred to Figure 3 , Figure 3 This is the decision restoration and debugging function module in the second embodiment of the debugging method for risk control decision in this application. This module tracks and displays the complete log link through the decision request ID. First, extract the log corresponding to the request ID from ES, parse the decision execution response message, and reconstruct the logical structure of the decision node, including input parameters, execution logic, and output results. The execution parameter changes of each node are presented through time series analysis and state comparison.

[0092] Step S302: construct a decision node according to the decision execution response message, and construct a decision execution graph according to the decision node.

[0093] Step S303: construct a graphical user interface and display the decision execution diagram in the decision execution diagram display area.

[0094] It is understandable that a decision node can be constructed according to the decision execution response message, and then a decision execution graph can be constructed according to multiple decision nodes. The graphical user interface constructed according to the decision execution graph can be divided into two parts: an information display area and a debugging function area. The information display area can display basic information of the request, such as request time, requester, decision version, etc. The debugging function area includes a decision execution graph display area, which can display the decision execution graph, and the decision execution graph allows users to perform interactive operations.

[0095] In a feasible implementation manner, the debugging function area further includes a node configuration display area and a parameter change display area; step S40 may include steps S401 to S403:

[0096] Step S401: When a user clicks a target decision node in a decision execution diagram in the graphical user interface, node configuration information of the target decision node is displayed in the node configuration display area.

[0097] It is understandable that the debugging function area may also include a node configuration display area and a parameter change display area, as well as a plurality of function buttons for user interaction, which may include buttons for single-step execution, entering external rules, exiting external rules, and exiting debugging. The user may click on a node, and when it is detected that the user clicks on a target decision node in the decision execution diagram, the node configuration information of the target decision node is obtained, and the node configuration information may be displayed in the node configuration display area for the user to view, and determine whether to set a breakpoint for debugging based on the node configuration information.

[0098] Step S402: when a user issues a debugging instruction based on the target decision node and the node configuration information, the debugging instruction is executed to obtain a post-execution parameter after the debugging instruction is executed.

[0099] It is understandable that the user can set a breakpoint based on the target decision node and the node configuration information, the system executes the debugging instructions, and intelligently analyzes the parameter changes before and after the breakpoint, and displays the context changes affected when the target decision node is used as a breakpoint.

[0100] Step S403: display the original parameters before the debugging instruction is executed and the parameters after the execution in the parameter change display area.

[0101] It can be understood that after the system executes the debugging instructions and analyzes the parameter changes before and after the breakpoint, the post-execution parameters obtained after the execution of the debugging instructions can be displayed in the parameter change display area respectively. Through visual and interactive debugging tools, the positioning and optimization of complex decision-making problems are greatly simplified, and the maintainability of the decision-making system is improved.

[0102] In a feasible implementation manner, after step S403, steps S404 to S406 may also be included:

[0103] Step S404: determining the execution order according to the topological structure of the decision execution graph and the timestamps of the decision nodes in the decision execution graph.

[0104] It is understandable that the debugging in this embodiment can realize single-point debugging and node-level debugging. If it is single-point debugging, the execution order can be determined according to the topological structure of the decision execution graph and the timestamps of the decision nodes in the decision execution graph.

[0105] Step S405, determining the next execution node of the target decision node in the decision execution graph according to the execution order, or, if the target decision node is a node involving external rules, displaying the rule detail node corresponding to the target decision node in the decision execution graph display area, and using the rule detail node as the next execution node.

[0106] It is understandable that after determining the execution order, the system intelligently calculates and highlights the next execution node and dynamically updates parameter changes. For nodes involving external rules, that is, the target decision node is a node involving external rules, the user can enter the rule details for debugging, just like the function debugging in the IDE, then the rule detail node corresponding to the target decision node can be displayed in the decision execution diagram display area, and the rule detail node can be used as the next execution node.

[0107] Step S406: Execute the debugging instruction based on the next execution node, and display the parameter changes before and after the execution of the debugging instruction in the parameter change display area.

[0108] It is understood that the system can automatically execute the debugging instructions based on the next execution node. After executing the debugging of the rule detail node, the user can click the Exit External Rule button to return from the rule details to the overall view of the decision diagram. The user can also click the End Debug button to exit the debugging interface at any time and return to the normal operation state.

[0109] In this embodiment, by building a decision execution graph based on the query results of ES, the decision flow is displayed using a graphical user interface. The breakpoint debugging function is integrated to achieve single-step execution and node-level debugging, and the decision problem can be quickly located by comparing the parameter changes before and after execution. This embodiment greatly simplifies the location and optimization of complex decision problems through visual and interactive debugging tools, and improves the maintainability of the decision system.

[0110] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. Figure 4 After step S40, the risk control decision debugging method further includes steps S51 to S56:

[0111] Step S51, obtaining cleaned historical decision data, and constructing a backtesting task according to the cleaned historical decision data.

[0112] It should be noted that in this embodiment, the automated testing framework is used to perform backtesting, compare the old and new decision results, and use statistical analysis methods to evaluate the impact of decision changes. Backtesting aims to use historical data to verify the effectiveness of decisions. It can be understood that first, a backtesting task can be constructed, and the task information edited by the user can be obtained from the backtesting task editing interface, and the backtesting task can be constructed based on the task information. The user defines the test task in the backtesting task editing interface and sets the source data screening conditions, such as time range, specific user groups, etc. Then, data preprocessing algorithms (such as missing value filling, outlier detection, etc.) and feature matching algorithms based on statistical models are used to clean the user-edited information to ensure that historical data is compatible with the new decision model. The system automatically performs data consistency verification and generates an adaptability report. The user can trigger a simulation execution, and the system will feedback the pre-execution results in real time to assist the user in adjusting the test parameters.

[0113] Step S52, starting the backtest task according to the priority through the task scheduler.

[0114] It should be understood that backtesting tasks can be performed for backtesting. Figure 5 Explain the execution process of the backtesting task. Figure 5 This is a schematic diagram of the execution flow of the backtest task in the third embodiment of the debugging method for risk control decision of this application. First, the execution application monitors the test task status in the database through the task scheduler, and automatically starts the backtest task according to the priority, and the status of the backtest task changes to the waiting state.

[0115] Step S53, loading the target decision execution resource according to the backtracking test task.

[0116] It should be understood that a task list in a waiting state is obtained, and the test tasks in the task list are assigned to the task execution thread, and the test tasks are executed by the thread. Specifically, when the state of the test task is determined to be a waiting state, the state of the test task is changed to an execution state. And start loading resources according to the backtest task, load the latest version of the target decision, ensure that it matches the backtest data, build the target decision execution resources, and update the resource mapping table. An innovative architecture for multi-decision sharing of execution resources is designed here. Through mapping table management, it ensures that the backtest task is executed independently without interfering with the production environment, thereby optimizing resource utilization.

[0117] Step S54: Acquire target log data corresponding to the cleaned historical decision data from the distributed search engine.

[0118] It can be understood that source data execution parameters corresponding to target log data matching the cleaned historical decision data are extracted from the distributed search engine ES, and parallel processing technology is used to improve efficiency.

[0119] Step S55, executing the backtest task based on the target decision execution resource and the target log data to obtain new and old decision test results.

[0120] It can be understood that the decision engine is used to perform backtesting, record the execution time and results of each test instance, and obtain new and old decision test results.

[0121] Step S56, statistics and analysis are performed on the new and old decision test results to obtain decision change evaluation results.

[0122] Finally, based on the old and new decision test results obtained from the test, historical and current decision results are compared, and difference analysis and performance indicator evaluation (such as accuracy, recall, etc.) are used to obtain the decision change evaluation results. After the execution is completed, the system automatically releases resources to ensure the effective use of resources.

[0123] In this embodiment, historical decision data is used to clean and transform it through data preprocessing algorithms to meet the requirements of the current decision model. Backtesting is performed using an automated testing framework to compare new and old decision results, and statistical analysis methods are used to evaluate the impact of decision changes. Backtesting provides a systematic and automated decision verification method to ensure the accuracy and efficiency of decision optimization.

[0124] Based on the first embodiment of the present application, in the fourth embodiment of the present application, the same or similar contents as those in the first embodiment can refer to the above description, and will not be described in detail later. Figure 6 After step S56, the risk control decision debugging method further includes steps S61 to S63:

[0125] Step S61, deploying the new decision version on the first decision execution application, and deploying the old decision version on the second decision execution application, the new decision version is served by the first service routing, and the old decision version is served by the second service routing.

[0126] It is understandable that in this embodiment, API Gateway is used for traffic routing, and grayscale release is achieved through dynamic weight allocation. The monitoring tool monitors the performance indicators of the new and old versions in real time, provides trial run effect comparison for different versions of decisions, and provides grayscale release capability support for newly built decisions. The traffic experiment is designed to safely evaluate new decision versions by running two or more versions of decision services in parallel. The process of the traffic experiment can be referred to Figure 7 , Figure 7 This is a flow chart of the traffic experiment in Example 4 of the debugging method for risk control decision of the present application. The new decision version 1 and the old decision version 2 are respectively deployed as independent execution applications: the first decision execution application Y and the second decision execution application YB. Each version is provided through different service routes: the first service route A and the second service route B.

[0127] Step S62: setting the traffic distribution ratio of the first service route and the second service route in the decision configuration.

[0128] It should be understood that in this embodiment, dynamic control of traffic is achieved by configuring a weight-based routing policy, for example, the traffic distribution ratio of the new decision version 1 and the old decision version 2 is set in the decision configuration.

[0129] Step S63: dynamically adjusting the traffic distribution ratio by executing the application gateway so that the performance data of the new decision version and the old decision version meet the consistency condition.

[0130] It is understandable that the traffic distribution ratio can be dynamically adjusted by executing the application gateway so that the performance data of the new decision version and the old decision version meet the consistency condition. Specifically, the execution application gateway dynamically allocates requests to the corresponding application according to the configuration to ensure that the consistency condition is met, and a smooth switch is achieved without affecting the user experience.

[0131] In a feasible implementation manner, step S63 may further include steps S631 to S635:

[0132] Step S631, obtaining preset flow experiment parameters, wherein the preset flow experiment parameters include experiment time, flow distribution ratio and monitoring index.

[0133] It is understandable that this embodiment describes the specific process of the flow experiment. First, the flow experiment parameters preset by the user are obtained, including parameters such as the experiment time, flow distribution ratio, and monitoring index.

[0134] Step S632: adjusting the routing weights corresponding to the first service route and the second service route in real time by executing the application gateway, and distributing the user request to the first decision execution application and the second decision execution application according to the traffic distribution ratio.

[0135] It should be understood that after the experiment is started, the routing weights corresponding to the first service route and the second service route are adjusted in real time by executing the application gateway, and the user request is distributed to the first decision execution application and the second decision execution application according to the traffic distribution ratio.

[0136] Step S633: monitor the performance data of the new decision version and the old decision version in real time.

[0137] It is understandable that the performance of the new decision version and the old decision version can be monitored in real time through the built-in monitoring system, performance data such as response time and error rate can be obtained, and alarm thresholds can be set to ensure service stability.

[0138] Step S634: batch analyze the performance data through the data warehouse to obtain the performance difference between the new decision version and the old decision version.

[0139] It is understandable that the performance data corresponding to the execution data during the experiment can be collected, batch analysis can be performed through the data warehouse, the performance difference between the new and old versions can be compared, and performance difference indicators such as conversion rate and user satisfaction can be obtained.

[0140] Step S635: dynamically adjust the traffic distribution ratio so that the performance difference satisfies the consistency condition.

[0141] It should be understood that the traffic distribution ratio can be adjusted in real time according to the performance difference data by executing the application gateway so that the performance difference meets the consistency condition. Through such traffic experiments, the decision-making team can accurately evaluate the effect of the new decision version while minimizing risks, ensuring the launch of the optimal decision.

[0142] In this embodiment, grayscale release is achieved through traffic routing and dynamic weight allocation. The monitoring tool monitors the performance indicators of the new and old versions in real time, provides trial run effect comparison for different versions of decisions, and provides grayscale release capability support for newly built decisions. The dual versions of the decision are enabled in parallel, combined with dynamic traffic control, allowing the effects of different versions to be compared through grayscale release, reducing the risk of new decision launches and improving the scientific nature of decision optimization.

[0143] For example, to help understand the implementation process of the risk control decision debugging method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 8 , Figure 8 This is the overall system architecture diagram of the debugging method for risk control decision-making of this application. The system architecture of this application mainly includes four parts, specifically:

[0144] (1) Data support: A real-time log collection system is used to capture the logs of decision services. Log parsing algorithms (such as regular expressions or JSON parsing libraries) are used to convert unstructured logs into structured data and store them in a distributed search engine (Elasticsearch, ES). ES provides efficient data retrieval services for decision restoration and debugging through customized indexing and query APIs. The complete log chain is tracked and displayed through the decision request ID. First, the log corresponding to the request ID is extracted from ES.

[0145] (2) Decision restoration and debugging: Based on the query results of ES, the decision execution graph is constructed and the decision flow is displayed using a graphical user interface (GUI). The breakpoint debugging function is integrated to achieve single-step execution and node-level debugging. By comparing the parameter changes before and after execution, decision problems can be quickly located.

[0146] (3) Backtesting: Use historical decision data to clean and transform it through data preprocessing algorithms to make it meet the requirements of the current decision model. Use an automated testing framework to perform backtesting, compare old and new decision results, and use statistical analysis methods to evaluate the impact of decision changes.

[0147] (4) Traffic experiment: API Gateway is used for traffic routing, and grayscale release is achieved through dynamic weight allocation. The monitoring tool monitors the performance indicators of the new and old versions in real time, provides trial run effect comparison for different version decisions, and provides grayscale release capability support for newly built decisions.

[0148] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the debugging method of the risk control decision of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0149] This application also provides a debugging device for risk control decision-making, please refer to Fig. 9 , the risk control decision debugging device includes:

[0150] The log data storage module 10 is used to store the structured data of the risk control decision log in the distributed search engine;

[0151] The log data query module 20 is used to query the target log data in the distributed search engine and obtain the log data query result;

[0152] A user interface construction module 30, used to construct a decision execution graph according to the log data query result, and to construct a graphical user interface according to the decision execution graph;

[0153] The risk control decision debugging module 40 is used to perform breakpoint debugging based on the debugging instructions issued by the user in the graphical user interface, and to display parameter changes before and after the execution of the debugging instructions.

[0154] The debugging device for risk control decision provided by the present application adopts the debugging method for risk control decision in the above embodiment to solve the technical problem. Compared with the prior art, the beneficial effect of the debugging device for risk control decision provided by the present application is the same as the beneficial effect of the debugging method for risk control decision provided by the above embodiment, and the other technical features in the debugging device for risk control decision are the same as the features disclosed in the above embodiment method, which will not be described in detail here.

[0155] The present application provides a debugging device for risk control decisions, and the debugging device for risk control decisions includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the debugging method for risk control decisions in the above-mentioned embodiment one.

[0156] Reference below Fig.10 , which shows a schematic diagram of the structure of a debugging device suitable for implementing the risk control decision of the embodiment of the present application. The debugging device for the risk control decision in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The debugging device for risk control decision shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0157] like Fig.10As shown, the debugging device for risk control decision may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the debugging device for risk control decision are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the debugging device of the risk control decision to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a debugging device of the risk control decision with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0158] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0159] The debugging device for risk control decision provided by the present application adopts the debugging method for risk control decision in the above embodiment, which can solve the technical problem of debugging risk control decision. Compared with the prior art, the beneficial effect of the debugging device for risk control decision provided by the present application is the same as the beneficial effect of the debugging method for risk control decision provided by the above embodiment, and the other technical features in the debugging device for risk control decision are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0160] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0161] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0162] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the risk control decision debugging method in the above-mentioned embodiment.

[0163] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0164] The above-mentioned computer-readable storage medium may be included in the debugging device of the risk control decision; or it may exist independently without being assembled into the debugging device of the risk control decision.

[0165] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the debugging device of the risk control decision, the debugging device of the risk control decision: stores the structured data of the risk control decision log in the distributed search engine; queries the target log data in the distributed search engine to obtain the log data query result; constructs a decision execution graph according to the log data query result, and constructs a graphical user interface according to the decision execution graph; performs breakpoint debugging based on the debugging instructions issued by the user in the graphical user interface, and displays the parameter changes before and after the execution of the debugging instructions.

[0166] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0167] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0168] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0169] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned debugging method for risk control decisions, and can solve technical problems. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the debugging method for risk control decisions provided in the above-mentioned embodiments, and will not be elaborated here.

[0170] The present application also provides a computer program product, including a computer program, which implements the steps of the risk control decision debugging method as described above when the computer program is executed by a processor.

[0171] The computer program product provided in this application can solve the technical problem. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the debugging method for risk control decision provided in the above embodiment, which will not be elaborated here.

[0172] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A debugging method for risk control decision, characterized in that: The method includes: Store the structured data of risk control decision logs in a distributed search engine; Querying the target log data in the distributed search engine to obtain log data query results; Constructing a decision execution graph according to the log data query result, and constructing a graphical user interface according to the decision execution graph; Breakpoint debugging is performed based on the debugging instructions issued by the user in the graphical user interface, and parameter changes before and after the execution of the debugging instructions are displayed.

2. The method according to claim 1, characterized in that The graphical user interface includes a debugging function area, and the debugging function area includes a decision execution diagram display area; The step of constructing a decision execution graph according to the log data query result, and constructing a graphical user interface according to the decision execution graph includes: Parsing the decision execution response message in the log data query result; Constructing a decision node according to the decision execution response message, and constructing a decision execution graph according to the decision node; A graphical user interface is constructed, and the decision execution diagram is displayed in the decision execution diagram display area.

3. The method according to claim 2, characterized in that The debugging function area also includes a node configuration display area and a parameter change display area; The step of performing breakpoint debugging based on the debugging instruction issued by the user in the graphical user interface and displaying parameter changes before and after the execution of the debugging instruction includes: When a user clicks a target decision node in the decision execution diagram in the graphical user interface, displaying node configuration information of the target decision node in the node configuration display area; When a user issues a debugging instruction based on the target decision node and the node configuration information, executing the debugging instruction and obtaining a post-execution parameter after the debugging instruction is executed; The original parameters before the debugging instruction is executed and the parameters after the execution are displayed in the parameter change display area.

4. The method according to claim 3, characterized in that After the step of displaying the original parameters before the execution of the debugging instruction and the parameters after the execution in the parameter change display area, the method further includes: Determine the execution order according to the topological structure of the decision execution graph and the timestamps of the decision nodes in the decision execution graph; Determine the next execution node of the target decision node in the decision execution graph according to the execution order, or, if the target decision node is a node involving an external rule, display the rule detail node corresponding to the target decision node in the decision execution graph display area, and use the rule detail node as the next execution node; The debugging instruction is executed based on the next execution node, and parameter changes before and after the execution of the debugging instruction are displayed in the parameter change display area.

5. The method according to claim 1, characterized in that After the step of performing breakpoint debugging based on the debugging instruction issued by the user in the graphical user interface and displaying the parameter changes before and after the execution of the debugging instruction, the method further includes: Acquire cleaned historical decision data, and construct a backtesting task based on the cleaned historical decision data; Starting the backtest task according to the priority through the task scheduler; Loading target decision execution resources according to the backtest task; Obtaining target log data corresponding to the cleaned historical decision data from the distributed search engine; Execute the backtest task based on the target decision execution resource and the target log data to obtain new and old decision test results; The new and old decision test results are statistically analyzed to obtain decision change evaluation results.

6. The method according to claim 5, characterized in that After the step of performing statistics and analysis on the new and old decision test results to obtain the decision change evaluation result, the method further includes: Deploy a new decision version on a first decision execution application, and deploy an old decision version on a second decision execution application, wherein the new decision version is provided by a first service route, and the old decision version is provided by a second service route; Setting the traffic distribution ratio of the first service route and the second service route in the decision configuration; The traffic distribution ratio is dynamically adjusted by executing the application gateway so that the performance data of the new decision version and the old decision version meet the consistency condition.

7. The method according to claim 6, characterized in that The step of dynamically adjusting the traffic distribution ratio by executing the application gateway so that the performance data of the new decision version and the old decision version meet the consistency condition includes: Obtaining preset flow experiment parameters, wherein the preset flow experiment parameters include experiment time, flow distribution ratio and monitoring index; The routing weights corresponding to the first service route and the second service route are adjusted in real time by executing the application gateway, and the user request is distributed to the first decision execution application and the second decision execution application according to the traffic distribution ratio; Monitoring the performance data of the new decision version and the old decision version in real time; Performing batch analysis on the performance data through a data warehouse to obtain a performance difference between the new decision version and the old decision version; The traffic distribution ratio is dynamically adjusted so that the performance difference satisfies a consistency condition.

8. A debugging device for risk control decision, characterized in that: The debugging device for risk control decision-making includes: Log data storage module, used to store structured data of risk control decision logs in distributed search engines; A log data query module, used to query target log data in the distributed search engine and obtain log data query results; A user interface construction module, used to construct a decision execution graph according to the log data query result, and to construct a graphical user interface according to the decision execution graph; The risk control decision debugging module is used to perform breakpoint debugging based on the debugging instructions issued by the user in the graphical user interface, and to display the parameter changes before and after the execution of the debugging instructions.

9. A debugging device for risk control decision-making, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the risk control decision debugging method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the risk control decision debugging method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Construction method and device of agent application, equipment, medium and program product

    CN119988148A