Api channel configuration and troubleshooting method, device, equipment and storage medium

CN122985233APending Publication Date: 2026-10-27XINFEI YUYUAN (SHANGHAI) DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611254802.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0003]然而,这一过程高度依赖于开发人员对现有系统架构和特定渠道协议的深入理解,存在以下三方面技术问题;首先,配置流程繁琐且效率低下:每新增一个渠道,开发人员都需重复执行手动配置操作,包括编写代码、修改配置文件及重启服务等多个步骤,严重拖慢了业务的迭代速度和上线周期;其次,技术门槛高且依赖个人经验:复杂的配置项和分散的管理界面对技术人员专业能力要求较高,新成员往往需要大量时间学习和摸索,使得渠道接入工作难以标准化和推广;再者,人为错误风险高,排查成本巨大:手动配置极易因疏忽导致参数错误、配置遗漏等问题,且通常在开发阶段难以被发现,直到联调甚至生产环境才暴露,修复成本极高

Benefits of technology

本申请的技术方案通过获取API渠道的唯一标识符自动加载并实例化对应的运行参数,将传统依赖人工手动录入的分散式配置转变为自动化、标准化的初始化流程,显著降低了配置难度并提升了渠道接入效率,同时基于业务订单的唯一索引键在全链路状态机中实时追踪流转节点,使流程流转变为透明可视化监控,一旦监测到任一节点发生阻塞,系统自动定位阻塞原因并调用预设的旁路补偿机制对订单运行状态进行精准干预,无需人工逐项排查和修复,从根本上杜绝了人为配置错误导致的联调阻塞,大幅降低了故障排查成本,保证了测试流程的连续性与完整性,从而实现了渠道配置管理的规范化、自动化和智能化。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122985233A_ABST
    Figure CN122985233A_ABST
Patent Text Reader

Abstract

The application relates to an API channel configuration and troubleshooting method and device, equipment and a storage medium; a unique identifier of an API channel to be configured is acquired, and running parameters corresponding to the API channel are automatically loaded and instantiated based on the unique identifier to generate an independent test running environment matched with the API channel; in the independent test running environment, a unique index key of a business order is used to track a flow node of the business order in a full-link state machine in real time; when it is monitored that the business order is blocked at any flow node, a blocking reason is automatically located, a preset bypass compensation mechanism is called to intervene in a running state of the business order, so that the business order continues to flow across the blocking node; compared with the prior art, the technical scheme of the application can eliminate the dependence on manual experience and manual operation, significantly improve channel access efficiency and test stability, and fundamentally reduce human configuration errors and troubleshooting costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of computer software, and in particular to an API channel configuration and troubleshooting method, apparatus, device and storage medium. Background Technology

[0002] In application programming interface (API)-based service integration and channel management scenarios, whenever a new third-party service channel is introduced, the technical team must perform a series of standardized configuration processes, including manually entering channel metadata information into the API gateway, configuration files, or backend database.

[0003] However, this process heavily relies on developers' in-depth understanding of the existing system architecture and specific channel protocols, presenting three main technical challenges: First, the configuration process is cumbersome and inefficient: for each new channel, developers must repeatedly perform manual configuration operations, including writing code, modifying configuration files, and restarting services, severely slowing down business iteration and deployment cycles. Second, the technical threshold is high and dependent on personal experience: complex configuration items and scattered management interfaces require a high level of technical expertise, and new members often need a significant amount of time to learn and explore, making it difficult to standardize and promote channel integration. Third, the risk of human error is high, and the cost of troubleshooting is enormous: manual configuration is prone to errors such as parameter errors and configuration omissions due to negligence, and these issues are usually difficult to detect during the development phase, only becoming apparent during integration testing or even in the production environment, resulting in extremely high repair costs. Summary of the Invention

[0004] This application provides an API channel configuration and troubleshooting method, apparatus, device and storage medium. By organically combining one-click automated configuration, real-time tracking of the full-link state machine and intelligent bypass compensation mechanism, it completely eliminates the dependence on human experience and manual operation, significantly improves channel access efficiency and test stability, and fundamentally reduces human configuration errors and troubleshooting costs.

[0005] Firstly, this application provides an API channel configuration and troubleshooting method, comprising: obtaining a unique identifier of the API channel to be configured, and automatically loading and instantiating the running parameters corresponding to the API channel based on the unique identifier to generate an independent test running environment matching the API channel; in the independent test running environment, tracking the flow nodes of the business order in the full-link state machine in real time based on the unique index key of the business order; when it is detected that the business order is blocked at any flow node, automatically locating the cause of the blockage, and calling a preset bypass compensation mechanism to intervene in the running state of the business order to drive the business order to continue to flow across the blocked node.

[0006] In one possible implementation, the automatic loading and instantiation of the running parameters corresponding to the API channel based on the unique identifier specifically includes: receiving a virtual user identifier for testing and obtaining the verification rules corresponding to the API channel; automatically generating identity authentication simulation data matching the verification rules based on preset simulation data generation rules; wherein the identity authentication simulation data includes at least optical character recognition information simulation data and facial recognition information simulation data; matching the corresponding rate calculation rules and fund routing strategies from a preset strategy library according to the business type associated with the unique identifier, and injecting the rate calculation rules and fund routing strategies into the configuration database; initializing early settlement business rules according to the unique identifier, wherein the early settlement business rules include the period limit for allowing early settlement and the penalty calculation logic.

[0007] In one possible implementation, the configuration process of the fund routing strategy specifically includes: receiving a combined instruction of the unique identifier and a specific lending funder code; defining the fund flow direction of the API channel when initiating a withdrawal request, so that the lending decision engine, when making fund routing selection, forces the loan request to be directed to a preset test funder.

[0008] In one possible implementation, the generation process of the identity authentication simulation data specifically includes: generating the optical character recognition information simulation data according to the verification rules of the API channel and the virtual user identifier used for testing; automatically constructing the corresponding identity credential image and structured text based on the optical character recognition information simulation data; extracting key identity information from the optical character recognition information simulation data, generating the corresponding facial feature vector based on the key identity information, and using the facial feature vector as the facial recognition information simulation data, wherein the facial recognition information simulation data is used to complete the liveness detection and face comparison process.

[0009] In one possible implementation, the real-time tracking of the business order's flow nodes in the end-to-end state machine based on the business order's unique index key specifically involves: calling a status query interface based on the unique index key to obtain the current status code of the business order; matching the current status code with a preset set of status codes in the end-to-end state machine to locate the current business stage and flow node of the business order; the business stage includes at least the pre-loan credit approval stage, the mid-loan borrowing stage, and the post-loan repayment stage.

[0010] In one possible implementation, detecting that the business order is blocked at any flow node specifically includes: in the independent test environment, according to the unique index key, cyclically calling the status query interface at preset time intervals to obtain the current status code of the business order; if the current status code obtained N times consecutively is the same and does not belong to the termination status code defined in the full-link state machine, then it is determined that the business order is blocked at the flow node; where N is a positive integer greater than or equal to 2.

[0011] In one possible implementation, the automatic identification of the blocking cause and the invocation of a preset bypass compensation mechanism to intervene in the running status of the business order, thereby driving the business order to continue flowing across the blocking node, specifically includes: in the independent test running environment, obtaining the error feedback information corresponding to the flow node based on the unique index key, parsing the exception code in the error feedback information, and matching the exception code with a preset blocking cause classification library to determine the blocking cause; based on the blocking cause, calling the target compensation interface bound to the blocking cause from a preset bypass compensation interface library to process the business order. The system performs at least one of the following compensation operations during operation: When the blocking reason is approval pending, the risk control status correction interface is called to force the approval status of the business order to be updated to the approved status; when the blocking reason is voucher generation failure, the contract status update interface is called to force the voucher status of the business order to be updated to the generated status; when the blocking reason is insufficient resource quota, the funds injection interface is called to increase the available resource quota of the target processor; when the blocking reason is result callback timeout, the repayment status correction interface is called to simulate a success notification sent by the downstream system to update the final status of the business order.

[0012] Secondly, this application provides an API channel configuration and troubleshooting device, comprising: a channel configuration module, a real-time tracking module for flow nodes, and a fault handling module; wherein, the channel configuration module is used to obtain the unique identifier of the API channel to be configured, and automatically load and instantiate the running parameters corresponding to the API channel based on the unique identifier to generate an independent test running environment matching the API channel; the real-time tracking module for flow nodes is used to track the flow nodes of the business order in the full-link state machine in real time based on the unique index key of the business order in the independent test running environment; the fault handling module is used to automatically locate the cause of the blockage when the business order is detected to be blocked at any flow node, and call a preset bypass compensation mechanism to intervene in the running state of the business order to drive the business order to continue to flow across the blocked node.

[0013] Thirdly, embodiments of this application also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0014] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.

[0015] This application provides an API channel configuration and troubleshooting method, apparatus, device, and storage medium, which have the following advantages compared with the prior art: The technical solution of this application automatically loads and instantiates the corresponding running parameters by obtaining the unique identifier of the API channel, transforming the traditional decentralized configuration that relies on manual input into an automated and standardized initialization process. This significantly reduces the configuration difficulty and improves the efficiency of channel access. At the same time, based on the unique index key of the business order, the system tracks the flow nodes in the end-to-end state machine in real time, making the process flow transparent and visually monitored. Once any node is detected to be blocked, the system automatically locates the cause of the blockage and calls the preset bypass compensation mechanism to accurately intervene in the order's running status. This eliminates the need for manual troubleshooting and repair, fundamentally preventing the debugging blockage caused by human configuration errors, greatly reducing the cost of troubleshooting, and ensuring the continuity and integrity of the testing process. Thus, it achieves the standardization, automation, and intelligence of channel configuration management. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0019] Figure 1 This is a flowchart illustrating an embodiment of an API channel configuration and troubleshooting method provided in this application; Figure 2This is a schematic diagram of an embodiment of the API channel configuration and troubleshooting device provided in this application; Figure 3 This is a schematic diagram of the structure of a computer device provided in this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, 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, 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.

[0021] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0022] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0023] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0024] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0025] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0026] Example 1, see Figure 1 , Figure 1 This is a flowchart illustrating one embodiment of the API channel configuration and troubleshooting method provided in this application, as shown below. Figure 1 As shown, the method includes steps 101-103, as detailed below: Step 101: Obtain the unique identifier of the API channel to be configured, and automatically load and instantiate the running parameters corresponding to the API channel based on the unique identifier to generate an independent test running environment that matches the API channel.

[0027] In one embodiment, the automatic loading and instantiation of the operating parameters corresponding to the API channel based on the unique identifier specifically includes: receiving a virtual user identifier for testing and obtaining the verification rules corresponding to the API channel; automatically generating identity authentication simulation data matching the verification rules based on preset simulation data generation rules; wherein the identity authentication simulation data includes at least optical character recognition information simulation data and facial recognition information simulation data; matching the corresponding rate calculation rules and fund routing strategies from a preset strategy library according to the business type associated with the unique identifier, and injecting the rate calculation rules and fund routing strategies into the configuration database; initializing early settlement business rules according to the unique identifier, wherein the early settlement business rules include the period limit for allowing early settlement and the penalty calculation logic.

[0028] In one embodiment, the process of generating the identity authentication simulation data specifically includes: generating the optical character recognition information simulation data according to the verification rules of the API channel and the virtual user identifier used for testing; automatically constructing the corresponding identity credential image and structured text based on the optical character recognition information simulation data; extracting key identity information from the optical character recognition information simulation data, generating the corresponding facial feature vector based on the key identity information, and using the facial feature vector as the facial recognition information simulation data, wherein the facial recognition information simulation data is used to complete the liveness detection and face comparison process.

[0029] In one embodiment, the configuration process of the fund routing strategy specifically includes: receiving a combined instruction of the unique identifier and a specific lending funder code; defining the fund flow direction of the API channel when initiating a withdrawal request, so that the lending decision engine, when making fund routing selection, forces the loan request to be directed to a preset test funder.

[0030] Specifically, the channel configuration management device first obtains the unique identifier of the API channel to be configured. The unique identifier is used to uniquely identify an API channel within the system.

[0031] Specifically, the channel configuration management device receives a virtual user identifier for testing and obtains the verification rules corresponding to the API channel; wherein, the virtual user identifier is used to uniquely identify a virtual user in the test environment and serves as the index basis for subsequent simulation data generation; the verification rules define the specific requirements of the API channel for data format and content in the identity authentication process.

[0032] Specifically, the channel configuration management device uses the virtual user identifier used for testing as an index to trigger preset simulated data generation rules. These rules predefine the data format, field types, and checksum requirements for optical character recognition information during the identity authentication process for different channels. Based on the API channel's verification rules, the channel configuration management device calls the corresponding data template and automatically generates simulated optical character recognition information data that meets the channel's requirements.

[0033] Specifically, the channel configuration management device renders the generated optical character recognition information simulation data into an identity credential image, which includes, but is not limited to, images of the front and back of an ID card. Simultaneously, the channel configuration management device extracts structured text information from the identity credential image, which includes key fields such as name, ID number, and address. Through this method, the generated identity credential image and structured text information fully comply with the API channel's verification rules and can successfully pass the initial identity authentication verification in the test environment.

[0034] Specifically, the channel configuration management device extracts key identity information from the structured text information, and constructs a facial feature vector that matches the simulated optical character recognition information based on the key identity information according to a preset feature generation algorithm; the simulated facial recognition information is used to complete the liveness detection and face comparison process, so that in the test environment, the system can perform liveness detection and face comparison operations based on the simulated facial recognition information, thereby verifying the authenticity of the user's identity.

[0035] Specifically, starting from the virtual user identifier, simulated data of optical character recognition information, identity credential image and structured text, and simulated data of facial recognition information are generated sequentially. These three have an inherent correspondence and consistency. This enables the testing process to complete the entire pre-loan access process from identity credential upload to facial verification without human intervention, greatly improving the coverage and efficiency of automated testing.

[0036] Specifically, the channel configuration management device selects the most suitable interest rate, service fee, and overdue penalty interest calculation rules from the preset rate template library based on the business type associated with the unique identifier, and persists them to the configuration database. This process is not a simple key-value pair entry, but a strategy injection process, which ensures that when a loan application is transferred to the loan disbursement stage, the core interest calculation engine can accurately call the channel-specific rate model, providing a precise basis for the subsequent repayment plan generation.

[0037] Specifically, during the configuration of the aforementioned fund routing strategy, the channel configuration management device receives a combined instruction of the unique identifier and the specific lending party code, and defines the fund flow direction of the API channel when initiating a withdrawal request. Through this configuration, the lending decision engine can bypass complex production environment scheduling algorithms when selecting fund routes, forcibly directing loan requests to preset test lending parties. This configuration directly affects the lending decision engine, enabling it to bypass complex production environment scheduling algorithms and forcibly direct loan requests to preset test lending parties. This allows for precise verification of the interface logic of specific lending parties in the test environment and greatly facilitates troubleshooting interface problems of specific lending parties.

[0038] Optionally, the funding routing strategy further includes configuring at least one target funding party and its corresponding routing weight for the API channel; in non-mandatory mode, the lending decision engine allocates the proportion of loan requests from different funding parties according to the routing weight; while in test mode, the routing weight is bypassed by using a combination instruction of the unique identifier and a specific lending party code, and the loan requests are forcibly directed to a preset test funding party.

[0039] Specifically, the channel configuration management device also initializes the early settlement business rules based on the unique identifier; wherein, the early settlement business rules include the number of periods allowed for early settlement and the logic for calculating penalties.

[0040] Specifically, the channel configuration management device loads the corresponding early settlement rule template based on the unique identifier. This template defines whether early settlement is allowed for that channel and how the penalty for breach of contract is calculated. Furthermore, testers can specify the earliest possible period for early settlement to construct test scenarios with different boundary conditions, thereby comprehensively verifying the robustness and accuracy of the interest calculation system under non-standard repayment behavior.

[0041] Step 102: In the independent test environment, based on the unique index key of the business order, track the flow nodes of the business order in the end-to-end state machine in real time.

[0042] In one embodiment, the status query interface is called according to the unique index key to obtain the current status code of the business order; the current status code is matched with the preset status code set in the end-to-end state machine to locate the current business stage and flow node of the business order; the business stage includes at least the pre-loan credit approval stage, the mid-loan borrowing stage, and the post-loan repayment stage.

[0043] Specifically, the channel configuration management device calls the status query interface based on the unique index key to obtain the current status code of the business order; preferably, the unique index key can be the order number, which is used to uniquely identify a business order within the system and serves as a key index for querying the entire lifecycle status of the order; through this unique index key, the channel configuration management device can accurately locate the target order and obtain its real-time status information in each business process.

[0044] Specifically, the channel configuration management device maintains an internal state mapping mechanism. This mechanism predefines the correspondence between different status codes and various business stages and flow nodes. Based on the discrete status codes returned by the interface, the channel configuration management device can accurately determine the specific node of the current business order by querying the state mapping mechanism. In this way, the channel configuration management device can transform the originally black-box business process flow into transparent and visible monitoring, providing accurate decision-making basis for subsequent targeted data manipulation or anomaly handling.

[0045] Specifically, the pre-loan credit granting stage corresponds to the application and credit granting process for a business order; the mid-loan borrowing stage corresponds to the borrowing and payment process for a business order; and the post-loan repayment stage corresponds to the repayment and settlement process for a business order. In each of these stages, the channel configuration management device can obtain the current status code of a business order and locate its specific flow node in real time by calling the corresponding status query interface. For example, in the pre-loan credit granting stage, the channel configuration management device calls the credit granting query interface based on the unique index key to obtain the status code corresponding to the credit approval result; in the mid-loan borrowing stage, the channel configuration management device calls the loan order status query interface based on the unique index key to track the current status of the loan order; and in the post-loan repayment stage, the channel configuration management device calls the repayment order status query interface based on the unique index key to confirm the repayment result. By calling the corresponding status query interfaces at different stages, the channel configuration management device achieves full lifecycle status tracking of business orders from pre-loan to post-loan.

[0046] Step 103: When it is detected that the business order is blocked at any flow node, the cause of the blockage is automatically located, and the preset bypass compensation mechanism is invoked to intervene in the running status of the business order, so as to drive the business order to continue to flow across the blocked node.

[0047] In one embodiment, detecting that the business order is blocked at any flow node specifically includes: in the independent test running environment, according to the unique index key, cyclically calling the status query interface at preset time intervals to obtain the current status code of the business order; if the current status code obtained N times consecutively is the same and does not belong to the termination status code defined in the full-link state machine, then it is determined that the business order is blocked at the flow node; where N is a positive integer greater than or equal to 2.

[0048] Specifically, in the aforementioned independent test environment, the channel configuration management device monitors in real time whether the business order is blocked. To accurately determine whether an order has remained unchanged for an extended period, the channel configuration management device uses the unique index key to cyclically call the status query interface at preset time intervals to obtain the current status code of the business order. The preset time interval can be pre-configured by testers based on the actual business scenario, for example, set to query every 5 seconds, every 10 seconds, or every 30 seconds; this invention does not impose a specific limitation on this. Through the aforementioned cyclical calling method, the channel configuration management device continuously obtains the status code of the business order at various points in time, thereby achieving real-time monitoring of the order flow status.

[0049] Specifically, during the cyclical invocation of the status query interface, the channel configuration management device compares and analyzes the current status codes obtained multiple times consecutively. If the current status codes obtained N times consecutively are the same, and none of the current status codes belong to the termination status codes defined in the end-to-end state machine, the channel configuration management device determines that the business order is blocked at the flow node. Here, N is a positive integer greater than or equal to 2, for example, N can be 3, 5, or 10, and the specific value can be preset by the testers according to the business system's tolerance for response time. If the current status code belongs to the termination status code, it indicates that the business order has completed this stage of flow normally, and there is no need to determine if it is blocked.

[0050] Preferably, the final status code refers to the status code corresponding to the final state of a business order that has completed all processes as defined in the full-link state machine, such as status codes like "credit granted successfully", "loan disbursement successfully", and "settled".

[0051] Example Explanation: During the pre-loan credit approval stage, if the channel configuration management device repeatedly displays "Credit processing in progress" status code through repeated calls to the credit query interface, and this status code is not a termination status code, the channel configuration management device determines that the business order was blocked during the pre-loan credit approval stage, usually due to a suspension of the risk control node. Through this method, the channel configuration management device can promptly and accurately detect abnormal pauses in the business order process, providing triggering conditions for subsequent blocking cause localization and bypass compensation.

[0052] In one embodiment, the automatic identification of the blocking cause and the invocation of a preset bypass compensation mechanism to intervene in the running status of the business order, so as to drive the business order to continue flowing across the blocking node, specifically includes: in the independent test running environment, obtaining the error feedback information corresponding to the flow node according to the unique index key, parsing the exception code in the error feedback information, and matching the exception code with a preset blocking cause classification library to determine the blocking cause; according to the blocking cause, calling the target compensation interface bound to the blocking cause from the preset bypass compensation interface library to adjust the running status of the business order. The system will perform at least one of the following compensation operations: when the blocking reason is approval pending, call the risk control status correction interface to force the approval status of the business order to be updated to the approved status; when the blocking reason is voucher generation failure, call the contract status update interface to force the voucher status of the business order to be updated to the generated status; when the blocking reason is insufficient resource quota, call the funds injection interface to increase the available resource quota of the target processor; when the blocking reason is result callback timeout, call the repayment status correction interface to simulate the success notification sent by the downstream system to update the final status of the business order.

[0053] Specifically, in the aforementioned independent test environment, after determining that the business order is blocked, the channel configuration management device automatically locates the cause of the blockage. The channel configuration management device obtains the error feedback information corresponding to the flow node based on the unique index key. This error feedback information is provided by the underlying status query interface along with the returned status code. The channel configuration management device parses the exception code in the error feedback information and matches it with a preset blockage cause classification library to determine the cause of the blockage. The blockage cause classification library predefines the correspondence between different exception codes and various blockage causes. For example, when the exception code indicates that the risk control system is suspended, the blockage cause is determined to be approval suspension; when the exception code indicates that the contract generation is abnormal, the blockage cause is determined to be voucher generation failure; when the exception code indicates that the funding party's quota is insufficient, the blockage cause is determined to be insufficient resource quota; when the exception code indicates that the downstream system has not returned the expected result, the blockage cause is determined to be result callback timeout.

[0054] Specifically, after determining the cause of the blockage, the channel configuration management device, based on the cause, calls the target compensation interface bound to the blockage cause from a pre-set bypass compensation interface library to perform corresponding compensation operations on the running status of the business order. The bypass compensation interface library pre-stores compensation interfaces corresponding one-to-one with various blockage causes, and each compensation interface is used to perform a specific status correction or data intervention operation.

[0055] Specifically, the channel configuration management device searches for and calls the target compensation interface bound to the identified blocking cause from the bypass compensation interface library, performs a bypass repair operation, updates the local status record of the business order, and enables the business order to exit the blocking state and continue to flow forward.

[0056] Specifically, when the blockage is due to approval being suspended, the channel configuration management device calls the risk control status correction interface to forcibly update the approval status of the business order to "approved." For example, in the pre-loan credit approval stage, if the business order status shows "credit processing" for an extended period, it is usually diagnosed as a suspension of the risk control node. In this case, the channel configuration management device calls the risk control status correction interface, and based on the unique user identifier returned by the credit approval result, forcibly updates the approval status of the risk control system, simulating a risk control approval signal, thereby removing the blockage and allowing the order to continue flowing.

[0057] Specifically, when the blockage is due to a failure to generate a voucher, the channel configuration management device calls the contract status update interface to forcibly update the voucher status of the business order to the generated status. For example, in the loan application stage, if a business order is detected to be stuck at the contract generation node, the channel configuration management device calls the contract status update interface to automatically set the contract status to generated, eliminating the prerequisite dependency and allowing the order to smoothly enter the subsequent loan disbursement queue.

[0058] Specifically, when the blockage is due to insufficient resources, the channel configuration management device calls the funds injection interface to increase the available resources of the target processor. For example, in the loan approval process, if the channel configuration management device calls the loan failure reason analysis interface to obtain a detailed error code and confirms that the approval rejection is due to insufficient funds, the funds injection interface is immediately triggered to automatically increase the available funds for the day for the sub-funding party corresponding to the loan, and then the loan process can be re-executed.

[0059] Specifically, during the loan application stage, after the business order has passed credit approval, it enters the loan application stage. The channel configuration management device calls the loan order status query interface based on the unique index key to obtain the loan order status of the business order; if the loan order status indicates that it is currently in the pending review stage, the channel configuration management device can update the loan order status of the business order to the approved status through an automated script or status correction interface, so as to simulate the manual review operation to complete the loan application approval process.

[0060] Specifically, after the business order is approved, it enters the loan disbursement stage, which is highly susceptible to delays due to external dependencies. If a blockage is detected in the loan disbursement stage, the channel configuration management device performs a deep investigation: it calls the loan disbursement failure reason analysis interface to obtain the detailed error code corresponding to the business order in the loan disbursement stage, and matches the corresponding blocking reason based on the error code. If the error code indicates a contract generation error, the contract status update interface is called to forcibly set the contract status to generated; if the error code indicates insufficient funding from the funding party, the funding position injection interface is called to increase the available funding from the target funding party.

[0061] Specifically, after the loan disbursement blockage of the aforementioned business order is resolved, the channel configuration management device calls the successful loan order construction interface to generate a successful loan record based on the credit line information of the business order, thereby completing the loan process and enabling the business order to enter the post-loan repayment stage. The input parameter of the successful loan order construction interface is the credit line number of the business order, and the output is the successful loan record. The underlying logic of this interface is to construct a complete successful loan record according to preset loan record generation rules based on fields such as channel information, user information, credit limit, and fee rules in the credit line. This record includes key fields such as loan amount, loan time, funding party code, and contract number, ensuring consistency between the loan record and the credit information.

[0062] Specifically, when the blocking reason is a result callback timeout, the channel configuration management device calls the repayment order status correction interface to simulate a success notification sent by the downstream system to update the final status of the business order. For example, in the post-loan repayment stage, if the repayment order remains in the repayment processing state for a long time, it is usually due to missing message callbacks from the downstream repayment engine. In this case, the channel configuration management device calls the repayment order status correction interface. The underlying logic of this interface is to simulate an asynchronous repayment success notification message sent by the API downstream, forcibly updating the local repayment order status to success, thereby completing the lifecycle of the order.

[0063] Specifically, through the above methods, the channel configuration management device can automatically call the corresponding compensation interface to perform bypass repair operations for different types of blocking causes, effectively avoiding test interruptions caused by unstable external dependencies or missing asynchronous messages, and greatly improving the efficiency and stability of end-to-end testing.

[0064] In one embodiment, in the independent test environment, since the test environment is not the actual lending environment of the funder and lacks real fund flow data, a data synchronization operation is still required after the business order is successfully disbursed.

[0065] Specifically, the channel configuration management device calls the asset and account data synchronization interface. The input parameter of the asset and account data synchronization interface is the credit approval number of the business order. The process of obtaining accounting data from the funding party is simulated through the asset and account data synchronization interface to ensure that the accounting records of the local system are consistent with the loan disbursement status, thereby providing a data foundation for subsequent post-loan testing.

[0066] In one embodiment, after the business order is successfully disbursed, the channel configuration management device also performs a time-dimensional bypass compensation operation.

[0067] Specifically, since repayment is not possible on the day of loan disbursement in the production environment, in order to cover various time-sensitive scenarios such as repayment on the billing date, early repayment of the current period, overdue repayment, and batch deduction in the test environment, the channel configuration management device calls the dynamic adjustment interface for the interest accrual date. Based on the unique index key of the business order, it flexibly modifies the interest accrual date of the business order. By artificially creating a time difference, the current test time point meets the preconditions for various repayment scenarios.

[0068] In one embodiment, after adjusting the interest accrual date, for a batch deduction scenario, the channel configuration management device calls the batch deduction simulation interface, passing in the unique index key of the business order and the specified batch deduction period. The batch deduction simulation interface is used to simulate batch deduction instructions initiated by the core accounting system to complete the repayment operation for the specified period.

[0069] In one embodiment, after the repayment instruction is executed, the channel configuration management device performs dual verification of the repayment result.

[0070] Specifically, the channel configuration management device calls the repayment status query interface to confirm whether the business order has been settled; if the repayment fails, it calls the repayment failure reason analysis interface to parse the specific exception code, such as insufficient balance, channel maintenance, etc., so as to carry out targeted repair tests.

[0071] In one embodiment, to address the overdue testing requirements in risk control, after adjusting the interest accrual date to put the business order into an overdue state, the channel configuration management device calls the overdue order compensation interface. This interface performs operations based on the unique index number of the business order. This operation simulates a third party or guarantor compensating for overdue payments, verifying the logical correctness of the system's handling of overdue bad debts.

[0072] In one embodiment, for a specific scenario requiring partial repayment testing, the business order must be in a repurchased state. To this end, after adjusting the interest accrual date, the channel configuration management device calls the order repurchase success interface, which performs operations based on the unique index number of the business order. By simulating an asset transfer or repurchase process through the order repurchase success interface, the status of the business order is set to repurchase successful, and then partial repayment and other related tests can be performed.

[0073] Example 2, see Figure 2 , Figure 2This is a schematic diagram of an embodiment of the API channel configuration and troubleshooting device provided in this application. Corresponding to the above API channel configuration and troubleshooting method, this application also provides an API channel configuration and troubleshooting device. This API channel configuration and troubleshooting device includes modules for executing the above API channel configuration and troubleshooting method, and can be configured in terminals such as desktop computers, tablet computers, and laptops; specifically, the API channel configuration and troubleshooting device includes a channel configuration module 201, a real-time tracking module for flow nodes 202, and a fault handling module 203. The channel configuration module 201 is used to obtain the unique identifier of the API channel to be configured, and automatically load and instantiate the running parameters corresponding to the API channel based on the unique identifier, so as to generate an independent test running environment that matches the API channel.

[0074] The real-time tracking module 202 is used to track the flow nodes of a business order in the end-to-end state machine in real time, based on the unique index key of the business order, in the independent test environment.

[0075] The fault handling module 203 is used to automatically locate the cause of the blockage when the business order is detected to be blocked at any flow node, and to call a preset bypass compensation mechanism to intervene in the running status of the business order so as to drive the business order to continue to flow across the blockage node.

[0076] In one embodiment, the channel configuration module 201 is used to automatically load and instantiate the operating parameters corresponding to the API channel based on the unique identifier, specifically including: receiving a virtual user identifier for testing and obtaining the verification rules corresponding to the API channel; automatically generating identity authentication simulation data matching the verification rules based on preset simulation data generation rules; wherein the identity authentication simulation data includes at least optical character recognition information simulation data and facial recognition information simulation data; matching the corresponding rate calculation rules and fund routing strategies from a preset strategy library according to the business type associated with the unique identifier, and injecting the rate calculation rules and fund routing strategies into the configuration database; initializing early settlement business rules according to the unique identifier, wherein the early settlement business rules include the period limit for allowing early settlement and the penalty calculation logic.

[0077] In one embodiment, the configuration process of the fund routing strategy specifically includes: receiving a combined instruction of the unique identifier and a specific lending funder code; defining the fund flow direction of the API channel when initiating a withdrawal request, so that the lending decision engine, when making fund routing selection, forces the loan request to be directed to a preset test funder.

[0078] In one embodiment, the process of generating the identity authentication simulation data specifically includes: generating the optical character recognition information simulation data according to the verification rules of the API channel and the virtual user identifier used for testing; automatically constructing the corresponding identity credential image and structured text based on the optical character recognition information simulation data; extracting key identity information from the optical character recognition information simulation data, generating the corresponding facial feature vector based on the key identity information, and using the facial feature vector as the facial recognition information simulation data, wherein the facial recognition information simulation data is used to complete the liveness detection and face comparison process.

[0079] In one embodiment, the real-time tracking module 202 for the transfer node is used to track the transfer node of the business order in the end-to-end state machine in real time based on the unique index key of the business order. Specifically, it calls the status query interface according to the unique index key to obtain the current status code of the business order; and matches the current status code with the preset status code set in the end-to-end state machine to locate the current business stage and transfer node of the business order; the business stage includes at least the pre-loan credit approval stage, the mid-loan borrowing stage, and the post-loan repayment stage.

[0080] In one embodiment, the fault handling module 203 is used to detect that the business order is blocked at any flow node, specifically including: in the independent test running environment, according to the unique index key, cyclically calling the status query interface at a preset time interval to obtain the current status code of the business order; if the current status code obtained N times consecutively is the same and does not belong to the termination status code defined in the full-link state machine, then it is determined that the business order is blocked at the flow node; where N is a positive integer greater than or equal to 2.

[0081] In one embodiment, the fault handling module 203 is used to automatically locate the cause of the blockage and call a preset bypass compensation mechanism to intervene in the running status of the business order, so as to drive the business order to continue to flow across the blockage node. Specifically, it includes: in the independent test running environment, obtaining the error feedback information corresponding to the flow node according to the unique index key, parsing the abnormal code in the error feedback information, and matching the abnormal code with a preset blockage cause classification library to determine the blockage cause; according to the blockage cause, calling the target compensation interface bound to the blockage cause from the preset bypass compensation interface library to perform the operation on the business order. The order's running status will execute at least one of the following compensation operations: When the blocking reason is approval pending, the risk control status correction interface will be called to forcibly update the approval status of the business order to the approved status; when the blocking reason is voucher generation failure, the contract status update interface will be called to forcibly update the voucher status of the business order to the generated status; when the blocking reason is insufficient resource quota, the funds injection interface will be called to increase the available resource quota of the target processor; when the blocking reason is result callback timeout, the repayment status correction interface will be called to simulate a success notification sent by the downstream system to update the final status of the business order.

[0082] like Figure 3 As shown, Figure 3 This is a schematic diagram of the structure of a computer device provided in this application; it includes a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112 and the memory 113 communicate with each other through the communication bus 114, and the memory 113 is used to store computer programs.

[0083] In one embodiment of this application, the processor 111, when executing the program stored in the memory 113, implements the API channel configuration and troubleshooting method provided in any of the foregoing method embodiments.

[0084] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0085] Therefore, this application embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the API channel configuration and troubleshooting method provided in any of the foregoing method embodiments.

[0086] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.

[0087] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0088] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0089] The steps in the methods of this application embodiment can be adjusted, merged, or deleted according to actual needs. The units in the apparatus of this application embodiment can be merged, divided, or deleted according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0090] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0091] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0092] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Since these modifications and variations fall within the scope of the claims and their equivalents, this application also intends to include these modifications and variations.

[0093] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for configuring and troubleshooting API channels, characterized in that, include: Obtain the unique identifier of the API channel to be configured, and automatically load and instantiate the running parameters corresponding to the API channel based on the unique identifier to generate an independent test running environment that matches the API channel; In the independent test environment, the flow nodes of the business order in the end-to-end state machine are tracked in real time based on the unique index key of the business order; When a blockage is detected at any flow node of the business order, the cause of the blockage is automatically located, and a preset bypass compensation mechanism is invoked to intervene in the running status of the business order, so as to drive the business order to continue to flow across the blockage node.

2. The method according to claim 1, characterized in that, The automatic loading and instantiation of the runtime parameters corresponding to the API channel based on the unique identifier specifically includes: Receive the virtual user identifier used for testing, and obtain the verification rules corresponding to the API channel; Based on preset simulation data generation rules, identity authentication simulation data that matches the verification rules is automatically generated; wherein, the identity authentication simulation data includes at least optical character recognition information simulation data and face recognition information simulation data; Based on the business type associated with the unique identifier, the corresponding rate calculation rules and fund routing strategies are matched from the preset strategy library, and the rate calculation rules and fund routing strategies are injected into the configuration database. The early settlement business rules are initialized according to the unique identifier, wherein the early settlement business rules include the number of periods allowed for early settlement and the logic for calculating the penalty for breach of contract.

3. The method according to claim 2, characterized in that, The configuration process for the fund routing strategy specifically includes: Receive a combined instruction of the unique identifier and the specific lender code; Define the flow of funds when the API channel initiates a withdrawal request, so that the lending decision engine will force the loan request to be directed to a preset test funder when making fund routing selection.

4. The method according to claim 2, characterized in that, The process of generating the identity authentication simulation data specifically includes: Based on the verification rules of the API channel and the virtual user identifier used for testing, simulated data of optical character recognition information is generated; Based on the simulated data of the optical character recognition information, the corresponding identity credential image and structured text are automatically constructed; Key identity information is extracted from the optical character recognition information simulation data, and a corresponding facial feature vector is generated based on the key identity information. The facial feature vector is then used as the facial recognition information simulation data, which is used to complete liveness detection and face comparison.

5. The method according to claim 1, characterized in that, The method of tracking the flow nodes of a business order in the end-to-end state machine in real time based on the unique index key of the business order is as follows: The current status code of the business order is obtained by calling the status query interface based on the unique index key. The current status code is matched with the preset status code set in the full-link state machine to locate the current business stage and flow node of the business order; The business stages include at least the pre-loan credit approval stage, the loan borrowing stage, and the post-loan repayment stage.

6. The method according to claim 1, characterized in that, The detection of a blockage in the business order at any processing node specifically includes: In the independent test environment, the status query interface is called cyclically at preset time intervals based on the unique index key to obtain the current status code of the business order; If the current status code obtained N times consecutively is the same and none of them belong to the termination status code defined in the full-link state machine, then it is determined that the business order is blocked at the flow node; where N is a positive integer greater than or equal to 2.

7. The method according to claim 6, characterized in that, The automatic identification of the cause of the blockage and the invocation of a preset bypass compensation mechanism to intervene in the running status of the business order, so as to drive the business order to continue flowing across the blockage node, specifically includes: In the independent test environment, the error feedback information corresponding to the flow node is obtained according to the unique index key, the exception code in the error feedback information is parsed, and the exception code is matched with a preset blocking reason classification library to determine the blocking reason; Based on the cause of the blockage, the target compensation interface bound to the cause of the blockage is called from the preset bypass compensation interface library to perform at least one of the following compensation operations on the running status of the business order: When the reason for the blockage is that the approval is suspended, the risk control status correction interface is called to forcibly update the approval status of the business order to the approved status; When the blocking reason is that the voucher generation failed, the contract status update interface is called to force the voucher status of the business order to be updated to the generated status. When the blocking is due to insufficient resource quota, the fund position injection interface is called to increase the available resource quota of the target processor. When the blocking reason is a result callback timeout, the repayment order status correction interface is called to simulate a success notification sent by the downstream system in order to update the final status of the business order.

8. An API channel configuration and troubleshooting device, characterized in that, include: Channel configuration module, real-time tracking module for circulation nodes, and fault handling module; The channel configuration module is used to obtain the unique identifier of the API channel to be configured, and automatically load and instantiate the running parameters corresponding to the API channel based on the unique identifier, so as to generate an independent test running environment that matches the API channel. The real-time tracking module for the flow nodes is used to track the flow nodes of the business order in the end-to-end state machine in real time based on the unique index key of the business order in the independent test environment. The fault handling module is used to automatically locate the cause of the blockage when the business order is detected to be blocked at any flow node, and to call a preset bypass compensation mechanism to intervene in the running status of the business order so as to drive the business order to continue to flow across the blocked node.

9. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-7.