A method and system for adaptive degradation and recovery for multi-vendor identity authentication service

By unifying the authentication context and implementing layered risk calculations, combined with independent credential isolation and progressive recovery, the problems of misjudgment and frequent switching during fault switching in multi-vendor identity authentication systems have been resolved. This has enabled efficient fault handling and business continuity, and improved the availability and stability of authentication services.

CN123185042APending Publication Date: 2026-11-27SHANGHAI YOUKA NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611242607.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-11-27

Smart Images

  • Figure CN123185042A_ABST
    Figure CN123185042A_ABST
Patent Text Reader

Abstract

The application discloses a kind of adaptive degradation and recovery method and system for multi-supplier identity authentication service, it is related to identity authentication service technical field, method includes: S1, receiving the identity authentication request initiated by service calling party, extract the authentication material and routing control information in request, construct the unified authentication context irrelevant to supplier, set the overall deadline of this request, generate authentication material integrity check summary and write into unified authentication context;The application is authenticated by the response of supplier, and the accuracy of fault determination is realized by separating the statistics of business rejection and technical failure through semantic classification, avoid normal business conclusion to trigger degradation switching, by constructing the unified authentication context irrelevant to supplier and executing candidate chain replay within the overall time limit of single request, combined with each supplier certificate independent isolation mechanism, authentication business is migrated without feeling when fault switching, without calling party repeatedly submitting authentication material.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of identity authentication service technology, specifically to an adaptive degradation and recovery method and system for multi-vendor identity authentication services. Background Technology

[0002] Identity authentication is a core security foundation for online service platforms. It verifies the authenticity of user identities through technologies such as real-person authentication, facial recognition, and document verification. Widely used in scenarios such as connected vehicles, the Internet of Things, financial services, and government services, it serves as a crucial barrier against identity theft, business fraud, and unauthorized access. As business scale and security requirements continue to increase, a single identity authentication provider can hardly meet the comprehensive needs of high availability, low cost, and multi-scenario adaptability. Therefore, mainstream business platforms generally integrate multiple heterogeneous identity authentication providers, forming a multi-vendor identity authentication architecture. This architecture mitigates the risk of single points of failure through redundant deployment and allows for flexible scheduling based on the accuracy, billing standards, and interface characteristics of different providers. It optimizes operational costs while ensuring authentication effectiveness, making it the mainstream deployment model for identity authentication services on large platforms today.

[0003] In a multi-vendor authentication architecture, adaptive degradation and recovery mechanisms are the core support for ensuring high service availability. Adaptive degradation refers to the system automatically switching authentication traffic to other working vendors when a vendor experiences a technical failure, preventing a single point of failure from causing overall business interruption. Adaptive recovery refers to the system gradually switching traffic back to the original vendor in a controlled manner after the failed vendor's service is restored, avoiding secondary failures caused by sudden traffic surges. A mature adaptive degradation and recovery mechanism can significantly reduce the impact of vendor failures on business, reduce manual maintenance costs, and ensure the continuity and stability of authentication services.

[0004] Currently, general-purpose service circuit breaking and failover solutions are widely used in distributed systems, but they have many adaptation defects when directly applied to multi-vendor identity authentication scenarios. Existing general-purpose circuit breaking mechanisms only rely on general error statistics for fault determination, failing to distinguish between business rejection and technical failure in identity authentication scenarios. This easily leads to misjudging normal business conclusions such as identity mismatch and liveness verification failure as system failures, resulting in unnecessary degradation switching. At the same time, existing failover is mostly based on the granularity of a single interface call, which cannot complete the chained retries of multiple vendors within the overall time limit of a single authentication request. During switching, the caller needs to resubmit authentication materials, disrupting the process. The existing solutions suffer from poor user experience and are prone to exceeding business timelines. Furthermore, they do not strictly isolate the authentication credentials and protocol boundaries of different vendors, posing a risk of credential reuse during failover. Moreover, the recovery phase often adopts a strategy of fixed cooling-off time and single-success recovery, which can easily lead to frequent back-switch oscillations when vendor services fluctuate. At the same time, recovery probes can preempt high-priority routes such as document binding and manual forced access, undermining business determinism. In addition, the lack of a standardized fallback mechanism when all vendors fail makes it difficult to guarantee the continuity of authentication services. Therefore, it is of great significance to develop an adaptive degradation and recovery method and system for multi-vendor identity authentication services. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide an adaptive degradation and recovery method and system for multi-vendor identity authentication services. It can solve the technical problems of how to form accurate adaptive degradation decisions based on authentication failure semantics, continuous failure states and sliding window statistics, and how to prevent repeated switching when the vendor is unstable through a controllable detection and recovery mechanism, while ensuring that high-priority routes are not preempted and that the entire link has a backup capability.

[0006] To address the aforementioned technical problems, this invention provides the following technical solution: an adaptive degradation and recovery method for multi-vendor identity authentication services, comprising the following steps: S1. Receive the authentication request initiated by the business caller, extract the authentication materials and routing control information in the request, construct a unified authentication context that is independent of the vendor, set the overall deadline for this request, generate an authentication material integrity verification summary and write it into the unified authentication context. S2. Filter routable suppliers according to the preset routing priority rules, determine the preferred supplier, sort the remaining routable automatic suppliers according to priority to form a candidate sequence, perform deduplication on the candidate sequence, and add a manual review node at the end of the candidate sequence. S3. Select the current target supplier from the candidate sequence. The corresponding supplier adapter derives the supplier-specific request based on the unified authentication context. The adapter assembles the request using its own independently held access credentials. Set the single call timeout to the smaller value between the supplier's configured timeout and the remaining time limit of the request, and call the target supplier's service. S4. Receive the response result returned by the target supplier, perform semantic classification processing on the response result, and update the health status data of the corresponding supplier according to the classification result; S5. Calculate the current risk value based on the health status data of the target supplier, compare the current risk value with the preset removal threshold, and mark the supplier as unroutable when the current risk value reaches the preset removal threshold. S6. Perform corresponding processing based on the current supplier's call result. If it belongs to the technical success category, return the corresponding authentication conclusion. If it belongs to the technical failure category and the remaining time limit of the request meets the call requirements, verify the integrity of the unified authentication context and replay the same unified authentication context to the next candidate supplier. S7. Calculate the cooling-off period for suppliers in an unroutable state. After the cooling-off period expires, select service requests without high-priority routes to perform probe processing. Update the recovery status data according to the probe results. Clear the unroutable mark of the supplier when the preset recovery conditions are met. S8. When all automatic suppliers are in an unroutable state, the overall request time limit is exhausted, or all candidate sequences have been executed without an acceptable result, the authentication request will be transferred to the manual review node for processing.

[0007] Furthermore, step S2, when filtering routable suppliers and generating candidate sequences according to preset routing priority rules, includes the following steps: Iterate through all currently routable vendors, match the document-level explicit routing rules corresponding to the request, and if a match exists and the target vendor is in a routable state, then determine that vendor as the preferred vendor. If no explicit routing rule at the certificate level is matched, a manually forced routing rule will be matched. If a match exists and the target supplier is in a routable state, the supplier will be determined as the preferred supplier. If no explicit routing rules at the certificate level or manually forced routing rules are matched, the default preferred supplier will be determined according to the preset priority sorting method or the weighted traffic distribution strategy. The remaining routable automatic suppliers are sorted from highest to lowest priority, and entries that are duplicates of the preferred supplier are removed to form an initial candidate sequence. A manual review node is then added to the end of the initial candidate sequence.

[0008] Furthermore, step S4 includes the following steps when performing semantic classification processing on the response result: Parse the original result code and response message content of the supplier's response to extract the authentication conclusion field and the failure reason field; Responses that pass authentication are classified as successful authentication, while responses that fail identity verification and are not due to technical anomalies are classified as ordinary business rejection. The business rejection responses included in the preset review scope are classified as reviewable business rejection categories, and network connection abnormality, service response timeout, and service internal abnormality responses are classified as ordinary technical failure categories. Authentication failures, incorrect credentials, abnormal account status, and service rate limiting responses are categorized as critical supplier failures.

[0009] Furthermore, step S5, when calculating the current risk value based on health status data and performing the removal determination, includes the following steps: Read the consecutive normal failure count, consecutive critical failure count, total sliding window request count, sliding window technical failure count, and sliding window slow call count for the target supplier. Calculate the current risk value of the target supplier using the following formula. ,in For suppliers The current risk value, For suppliers Count of consecutive normal failures, For ordinary failures, the threshold is continuously removed. For suppliers Continuous critical failure count Thresholds are continuously removed for critical faults. This represents the total number of technical failures within the sliding window. The total number of requests within the sliding window. Remove the threshold for window failure rate. This represents the total number of slow calls within the sliding window. Remove the threshold for slow call rate of the window, when the total number of requests within the sliding window... When it is 0, and Both corresponding values ​​are 0. The threshold for continuous removal of ordinary failures and the threshold for continuous removal of critical faults are calibrated according to the supplier's service level and business fault tolerance requirements. The threshold for removal of window failure rate and the threshold for removal of window slow call rate are calibrated according to business availability indicators. The sliding window duration is determined according to the business traffic scale and fault response sensitivity requirements. The slow call judgment threshold is calibrated according to 1.5 times the nominal latency of a single supplier interface. The current risk value is compared with the preset removal threshold, which is set to 1. If the current risk value is greater than or equal to the preset removal threshold, the supplier removal operation is triggered, and the supplier is marked as unroutable.

[0010] Furthermore, step S7, when calculating the cooling time and performing the probing process for suppliers in an unroutable state, includes the following steps: Record the number of consecutive removals by the supplier, calculate the final cooling time according to the following formula, and set the corresponding cooling cutoff time: ,in For the first Cooling time after each consecutive removal This is the initial cooling reference duration. This is the maximum cooldown duration limit. The number of consecutive removals, the number of consecutive removals. The initial value is 1. This is the jitter coefficient. The initial cooling baseline duration is calibrated based on the average recovery time of supplier failures, the maximum cooling duration is calibrated based on the longest degradation duration acceptable to the business, and the jitter coefficient is set according to the risk control requirements of multi-supplier concurrent switchback, with a value range of 0 to 0.3. After the cooling-off deadline is reached, a single request is selected as a probe request from the service requests that have no explicit routing at the certificate level and no manual forced routing. The target supplier is invoked using a probe request. The probe success count is updated based on the response. When the number of consecutive successful probes reaches a preset threshold, the preset recovery conditions are met, and the supplier's unroutable flag is cleared.

[0011] Furthermore, in step S2, when using a weighted routing strategy to determine the default preferred supplier, the corresponding weight value is derived based on the priority value of each supplier, a deterministic hash operation is performed based on the routing key of the request to obtain the landing point value, the weight values ​​are accumulated in the order of candidate suppliers, and the supplier whose accumulated weight is greater than the landing point value for the first time is selected as the preferred supplier. The same routing key will yield the same routing result when the supplier set and weight values ​​remain unchanged.

[0012] Furthermore, in step S3, each supplier adapter independently maintains its own short-term access token cache, sets an expiration buffer time for the cache, and adopts a mutual exclusion control mechanism for the token refresh operation. When an adapter receives an unauthorized response, it clears the corresponding token cache and reacquires the token, performing a retry operation only once.

[0013] Furthermore, in step S5, the supplier removal operation adopts atomic mutual exclusion control, and the same supplier triggers only one state transition operation at the same time. The state change information is sent to the operation and maintenance terminal through an asynchronous channel, and the execution process of the state change notification does not block the main processing link of the authentication request.

[0014] Furthermore, in step S7, a progressive grayscale recovery mode can be enabled. After continuous successful detection, the supplier enters a multi-stage recovery state, with each stage setting a corresponding traffic release ratio, and the normalized hash value corresponding to the request is calculated according to the following formula: ,in For routing key The corresponding normalized hash value, It is a consistent hash function. The stable routing key corresponding to the request is generated using a non-cryptographic consistent hashing algorithm based on the business entity identifier of the request. The normalized granularity is determined based on the traffic volume and the accuracy requirements of the stage-based traffic splitting. When the normalized hash value is less than the release ratio of the current recovery stage, a request is made to enter the recovery provider. Each stage sets a corresponding closing threshold, which is strictly lower than the preset removal threshold. When the stage conditions are met, the next recovery stage is entered. When a fault occurs, the system reverts to the corresponding state.

[0015] An adaptive degradation and recovery system for multi-vendor identity authentication services is provided, which is applicable to the aforementioned adaptive degradation and recovery method for multi-vendor identity authentication services. The system includes an authentication request access module, a routing scheduling module, a vendor adaptation module, a semantic classification and state update module, a hierarchical risk decision-making module, a context replay control module, an adaptive recovery control module, and a manual review fallback module. The authentication request access module is used to receive the identity authentication request from the business caller, extract authentication materials and control information, construct a unified authentication context and set the overall deadline for the request, and output the unified authentication context to the routing scheduling module. The routing scheduling module is used to maintain routing rules and generate candidate supplier sequences, and outputs the candidate sequence information and unified authentication context to the supplier adaptation module. The supplier adaptation module is used to convert the unified authentication context into a supplier-specific request and call the corresponding supplier service, and output the response returned by the supplier to the semantic classification and status update module. The semantic classification and status update module is used to perform semantic classification on the response results, update the supplier health status data, and output the classification results to the hierarchical risk decision module and the context replay control module, respectively. The hierarchical risk decision module is used to calculate the supplier risk value and generate a removal decision, which is then output to the adaptive recovery control module. The context replay control module is used to schedule the candidate sequence replay process and verify the integrity of the unified authentication context. The adaptive recovery control module is used to manage the cooling calculation, detection scheduling and recovery determination process of the removed supplier; The manual review fallback module is used to handle authentication requests that the automatic process cannot process and output the final authentication conclusion.

[0016] Compared with existing technologies, this adaptive degradation and recovery method and system for multi-vendor identity authentication services has the following advantages: This invention achieves accurate fault diagnosis by classifying supplier responses using authentication semantics, separating and statistically analyzing business rejection and technical failure, thus avoiding erroneous triggering of downgrade switching based on normal business conclusions. It constructs a unified authentication context independent of suppliers and performs candidate chain replay within the overall timeframe of a single request. Combined with an independent isolation mechanism for each supplier's credentials, it enables seamless migration of authentication services during fault switching, eliminating the need for the caller to repeatedly submit authentication materials. Through a layered risk assessment mechanism combining continuous faults and window statistics, it achieves a balance between rapid response to critical faults and resilience to ordinary faults. A recovery strategy combining exponential backoff, single-probe detection, and continuous success thresholds, with optional gradual gray-scale rollback, ensures smooth recovery against rollback oscillations. Finally, through explicit routing priority protection and a manual review fallback mechanism, it balances business determinism and service continuity.

[0017] Other advantages, objectives and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination or study, or may be learned from the practice of the invention. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0019] Figure 1 A flowchart illustrating the steps of an adaptive degradation and recovery method for multi-vendor identity authentication services; Figure 2 This is a flowchart illustrating the process of filtering routable suppliers and generating candidate sequences according to preset routing priority rules. Figure 3 This is a schematic diagram of the structure of an adaptive degradation and recovery system for multi-vendor identity authentication services. Detailed Implementation

[0020] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.

[0021] This invention provides an adaptive degradation and recovery method and system for multi-vendor identity authentication services. Applied to online service platforms accessing multiple heterogeneous identity authentication vendors, it uses a unified authentication context as the core carrier to deliver authentication materials and control information. A semantic classification mechanism distinguishes between business rejection and technical failures for accurate health statistics. A hierarchical risk calculation model drives automatic vendor removal from degradation. An exponential backoff cooling-off combined with gray-scale probing mechanism ensures smooth recovery of failed vendors. Simultaneously, multi-level routing priority rules ensure business determinism, and a manual review node serves as a fallback throughout the entire process. The entire solution completes chained retries and failover for multiple vendors within the overall timeframe of a single authentication request. The entire process eliminates the need for business callers to repeatedly submit authentication materials, effectively avoiding business interruptions caused by single-point vendor failures, suppressing frequent switching oscillations caused by service jitter, and balancing the availability, stability, and determinism of authentication services with business rules. A detailed description is provided below with reference to specific embodiments.

[0022] This embodiment is applied to the vehicle owner real-person authentication process of a vehicle networking service platform. The platform connects to three third-party identity authentication providers, offering services such as facial recognition, ID card verification, and driver's license verification. The three providers differ in their interface protocols, authentication methods, and latency metrics. The platform handles approximately 120,000 authentication requests daily, and the overall processing time for a single authentication request must not exceed 3000ms. The authentication service must meet high availability requirements. The platform deploys the adaptive degradation and recovery system described in this invention. The system includes an authentication request access module, a routing and scheduling module, a provider adaptation module, a semantic classification and state update module, a hierarchical risk decision-making module, a context replay control module, an adaptive recovery control module, and a manual review fallback module. The overall structure is as follows: Figure 3 As shown. Each module transmits data through standardized internal interfaces. The main processing link adopts a synchronous execution mode to ensure the timeliness of requests, while status notifications and operation and maintenance alarms adopt an asynchronous execution mode to avoid blocking the main link.

[0023] When a business caller initiates a vehicle owner authentication request, the request first enters the authentication request access module. This module extracts authentication materials from the request, such as the facial image, ID number, and business scenario identifier. It also extracts routing control information passed in by the caller, including the specified ID type and mandatory routing identifier. Based on the extracted information, the authentication request access module constructs a vendor-independent unified authentication context. This context includes a unique request identifier, authentication material storage address, standardized authentication parameter fields, routing control identifier, overall deadline timestamp, integrity verification summary, and records of called vendors. It contains no vendor-specific protocol fields and can adapt to the conversion needs of all access vendors.

[0024] The module calculates the overall deadline for this request based on the business-defined overall time limit of 3000ms for a single request, combined with the timestamp of the request reception time. This deadline timestamp is then written into the unified authentication context. All subsequent processing steps must be completed before this time. To ensure that the authentication materials are not tampered with during subsequent multi-vendor replays, the module performs a digest operation on the binary content of the authentication materials, generating an authentication material integrity verification digest, which is then written into the unified authentication context. Before each vendor switch replay, this verification digest is used to verify the context integrity, confirming that the authentication materials have not been altered. This embodiment uses the SHA-256 algorithm to generate the integrity verification digest, ensuring the reliability of the verification. The complete execution flow of the entire method is as follows: Figure 1 As shown.

[0025] The constructed unified authentication context is transmitted to the routing scheduling module. The module filters routable providers according to preset routing priority rules. The process of generating candidate sequences is as follows: Figure 2 As shown, the module sets three levels of routing priority, from highest to lowest: explicit route at the certificate level, manually forced route, and default traffic distribution route. Once a high-priority rule is matched, it will no longer match low-priority rules, ensuring the deterministic routing of high-priority services.

[0026] The module first iterates through all currently routable suppliers and matches the document-level explicit routing rules corresponding to the request. In this embodiment, only supplier A has official verification qualifications for driver's license verification services; therefore, an explicit routing rule is configured to bind the driver's license type to supplier A. If the current request is for driver's license verification and supplier A is routable, then supplier A is directly identified as the preferred supplier. The reason for setting document-level explicit routing with the highest priority is that a specific document type corresponds to only a single compliant supplier, and the stability of the route must be ensured to prevent non-compliant suppliers from undertaking the corresponding business.

[0027] If the current request is for general ID card verification and no explicit document-level routing rule is found, then the manual forced routing rule will continue to be matched. Manual forced routing is configured by operations personnel and is used for emergency dispatching, gray-scale testing, and special business support scenarios. If operations personnel have set a rule for forced routing to vendor B for a specific business line, and vendor B is in a routable state, then vendor B will be determined as the preferred vendor.

[0028] If neither of the two high-priority routing rules matches, a weighted traffic distribution strategy is used to determine the default preferred supplier. The weighted traffic distribution strategy is executed by deriving the corresponding weight value based on the priority value of each supplier. In this embodiment, the priority values ​​of the three suppliers are 10, 8, and 5, with corresponding weight values ​​of 50, 30, and 20. The module performs a deterministic hash operation based on the request's routing key to obtain the landing point value. The routing key is generated based on the business entity identifier of the request; in this embodiment, the vehicle owner's user ID is used as the routing key to ensure that requests from the same user have a stable routing landing point. The module accumulates the weight values ​​according to the priority order of the candidate suppliers, selecting the supplier whose accumulated weight is first greater than the landing point value as the preferred supplier. The same routing key yields the same routing result when the supplier set and weight values ​​remain unchanged, maintaining a stable and consistent user experience while achieving a balanced distribution of traffic according to weight ratios.

[0029] After determining the preferred supplier, the module sorts the remaining routable automatic suppliers by priority from high to low, removes entries that duplicate the preferred supplier, forming an initial candidate sequence, and appends a manual review node to the end of the initial candidate sequence. In this embodiment, if the preferred supplier is supplier A, the candidate sequence is supplier B, supplier C, and the manual review node in that order. The module performs deduplication on the candidate sequence to avoid the same supplier appearing repeatedly in the sequence and to prevent invalid duplicate calls.

[0030] Candidate sequence information and unified authentication context are synchronously transmitted to the vendor adaptation module. The module selects the current target vendor from the candidate sequence and calls the corresponding vendor adapter to perform request conversion. Each vendor adapter is deployed independently and maintains its own access credentials and protocol conversion logic. The adapter derives vendor-specific requests based on the unified authentication context and converts standardized authentication materials into the message format and parameter structure required by the target vendor.

[0031] In this embodiment, access credentials for each vendor are independently isolated. Each adapter's credentials are stored on a separate encrypted configuration node, preventing different adapters from reading each other's access credentials. This architectural approach avoids the risks of credential leakage and cross-vendor reuse. Each vendor adapter independently maintains its own short-term access token cache with a 30-second expiration buffer. A refresh is triggered before the token officially expires to prevent call failures due to token expiration. Token refresh operations employ a mutual exclusion mechanism, allowing only one refresh request to execute at a time, avoiding credential conflicts and duplicate calls caused by concurrent refreshes. When an adapter receives an unauthorized response, it clears the corresponding token cache and reacquires a token, performing only one retry to avoid link congestion and timeout exceeding caused by infinite retries.

[0032] The adapter sets the single-call timeout to the smaller of the supplier's configured timeout and the remaining time limit of the request. In this embodiment, supplier A's configured timeout is 1500ms. If the current request's remaining time limit is 1200ms, then the actual timeout for this call is set to 1200ms, ensuring that a single supplier call will not exceed the overall request time limit and guaranteeing controllable timeliness throughout the entire request chain. After completing request assembly and latency configuration, the adapter calls the target supplier's authentication service through an encrypted channel.

[0033] After the target supplier returns a response, the response is transmitted to the semantic classification and status update module, which performs semantic classification processing on the response. The module pre-configures a mapping table between the original result code and the semantic category for each supplier. Upon receiving the response, the module first parses the original result code and response message content of the supplier's response, extracts the authentication conclusion field and the failure reason field, and completes the classification by referring to the mapping table.

[0034] The module categorizes successful authentication responses into "Authentication Success," a category of "Technical Success," indicating that the supplier's service is operating normally and returning a valid business conclusion. Responses that fail identity verification and are not due to technical anomalies are categorized into "General Business Rejection," a category of normal business conclusions indicating that the user's identity does not meet verification requirements and is not included in technical failure statistics. Business rejection responses within the preset review scope are categorized into "Reviewable Business Rejection," a category that can trigger subsequent manual review processes but is also not included in technical failure statistics. Responses such as network connection errors, service response timeouts, and internal service anomalies are categorized into "General Technical Failure," included in general failure statistics, indicating temporary anomalies in the supplier's service. Responses such as authentication failures, incorrect credentials, abnormal account status, and service rate limiting are categorized into "Critical Supplier Failure," included in critical failure statistics, indicating serious service problems with the supplier that may continue to impact business operations.

[0035] After semantic classification, the module updates the corresponding supplier's health status data based on the classification results, including consecutive ordinary failure counts, consecutive critical failure counts, total sliding window requests, sliding window technical failures, and sliding window slow call volume. This embodiment uses a 60-second sliding window statistical indicator. The sliding window duration is determined based on the business traffic scale and fault response sensitivity requirements; the larger the traffic scale and the higher the sensitivity requirements, the shorter the window duration. The slow call judgment threshold is set at 1.5 times the nominal latency of a single supplier interface. In this embodiment, supplier A's nominal average latency is 500ms, so the slow call judgment threshold is set to 750ms. Requests with a call time exceeding 750ms are counted as slow calls. When a technical success result occurs, the corresponding consecutive failure count is reset to zero, ensuring that normal requests can reset the fault statistics status.

[0036] The updated health status data is synchronously transmitted to the hierarchical risk decision-making module. The module calculates the current risk value based on the target supplier's health status data, compares the current risk value with a preset removal threshold, and determines whether to trigger a supplier removal operation. In the specific implementation of this embodiment, the target supplier's current risk value is calculated according to the following formula: ,in For suppliers The current risk value, For suppliers Count of consecutive normal failures, For ordinary failures, the threshold for continuous removal is set. For suppliers Continuous critical failure count Thresholds are continuously removed for critical faults. This represents the total number of technical failures within the sliding window. The total number of requests within the sliding window. Remove the threshold for window failure rate. This represents the total number of slow calls within the sliding window. Remove the slow call rate threshold for the window. This applies to the total number of requests within the sliding window. When it is 0, and Both corresponding values ​​are 0 to avoid zero denominator operation errors, and to ensure that the removal operation is not accidentally triggered in scenarios with no traffic.

[0037] The thresholds in this embodiment are calibrated as follows: the thresholds for continuous removal of ordinary failures and continuous removal of critical faults are calibrated based on the supplier's service level and business fault tolerance requirements. Supplier A is the core supplier with the highest service level, covering core driver's license verification business, and has strong business fault tolerance capabilities. The threshold for continuous removal of ordinary failures is set to 5, and the threshold for continuous removal of critical faults is set to 3. Supplier C is the backup supplier with a lower service level, only handling traffic diversion and backup traffic. The threshold for continuous removal of ordinary failures is set to 3, and the threshold for continuous removal of critical faults is set to 2. Failures can be quickly removed to avoid affecting the overall service. The thresholds for window failure rate removal and window slow call rate removal are calibrated based on business availability indicators. Based on the high availability requirements of the overall service and combined with historical fault data, the threshold for window failure rate removal is set to 0.05, and the threshold for window slow call rate removal is set to 0.1. The sliding window adopts a time-slice-based implementation, with each 1 second as a time slice. The window retains the statistical data of the most recent 60 time slices, which are updated over time to ensure the real-time and accuracy of the statistical data.

[0038] The module compares the current risk value with a preset removal threshold, which is set to 1. If the current risk value is greater than or equal to the preset removal threshold, a supplier removal operation is triggered, marking the supplier as unroutable. The supplier removal operation employs atomic mutual exclusion control, ensuring that only one state transition operation is triggered for the same supplier at any given time, preventing concurrent requests from repeatedly triggering the removal process and causing state anomalies. State change information is sent to the operations and maintenance terminal via an asynchronous message channel. The execution of the state change notification does not block the main processing link of authentication requests and does not affect the processing time of normal requests.

[0039] The semantic classification result is simultaneously transmitted to the context replay control module, which executes the corresponding branch processing based on the current vendor's call result. If the call result belongs to the technical success category, including authentication success, general business rejection, and verifiable business rejection, the module encapsulates the corresponding authentication conclusion in a standardized format and returns it to the business caller, thus ending the current request processing flow.

[0040] If the call result falls under the category of technical failure, including general technical failure and critical supplier failure, the module first verifies whether the remaining time limit of the request meets the call requirements of the next supplier. Specifically, it checks whether the remaining time limit is greater than the sum of the next supplier's configuration timeout and internal processing time. If the call requirements are met, a context integrity check is performed. The module compares the authentication material summary of the current context with the initially generated verification summary. After confirming that the authentication materials have not been tampered with, it updates the already called supplier record in the context, replays the same unified authentication context to the next candidate supplier, and repeats the supplier adaptation, service call, and result processing flow. If the remaining time limit does not meet the call requirements, the automatic supplier call process is terminated, and the process proceeds to the subsequent fallback processing stage.

[0041] In this embodiment, if supplier A's call fails and there is sufficient remaining time, the context is automatically replayed to supplier B. If supplier B also fails, the call is replayed to supplier C. The same unified authentication context is reused throughout, eliminating the need for the business caller to resubmit facial images and identification information, thus achieving seamless fault switching. Once all automatic suppliers in the candidate sequence have completed their execution, the call is not replayed, avoiding infinite loop calls.

[0042] Suppliers marked as unroutable enter the management process of the adaptive recovery control module. The module first records the number of consecutive removals of the supplier, calculates the corresponding cooling-off period, and sets a cooling-off deadline. During the cooling-off period, the supplier does not accept any service traffic. In the specific implementation of this embodiment, the final cooling-off period is calculated according to the following formula: ,in For the first Cooling time after each consecutive removal This is the initial cooling reference duration. This is the maximum cooldown duration limit. For the number of consecutive removals, This is the jitter coefficient. Let be a uniform random variable whose value ranges from -1 to 1.

[0043] The calibration methods for each parameter in this embodiment are as follows: The initial cooling baseline duration is calibrated based on the average recovery time of supplier failures. Based on the platform's historical operation and maintenance data, the average recovery time of failures for the three suppliers is approximately 120 seconds, therefore the initial cooling baseline duration is set to 120 seconds. The maximum cooling duration is calibrated based on the longest acceptable degradation time for the business. In this embodiment, the longest acceptable degradation time for a single supplier is 1800 seconds, therefore the maximum cooling duration is set to 1800 seconds to avoid the supplier being unable to resume carrying traffic for an extended period due to excessively long cooling times. The jitter coefficient is set according to the risk control requirements for concurrent switchbacks from multiple suppliers, with a value range of 0 to 0.3. In this embodiment, it is set to 0.2. By randomly jittering the recovery times of multiple removed suppliers, traffic surges and concurrent switchback oscillations caused by multiple suppliers expiring and recovering simultaneously are avoided. After a supplier successfully recovers and runs stably for 3600 seconds, the consecutive removal count is reset to zero, and the calculation restarts from the initial cooling duration.

[0044] Upon reaching the cooling-off deadline, the module selects a single request from service requests without explicit routing at the certificate level and without manual forced routing as a probe request. Only low-priority general requests are used for probe execution to avoid preempting high-priority routed service traffic, ensuring the determinism and stability of explicit and forced routing services. The module uses the probe request to call the target provider, updates the probe success count based on the response, and determines that the preset recovery conditions are met when the number of consecutive successful probes reaches a preset threshold, clearing the provider's unroutable flag. In this embodiment, the consecutive successful probe threshold is set to 3 to avoid frequent switching oscillations caused by recovery after a single success, ensuring that the provider's service has been stably restored.

[0045] This embodiment can enable a gradual gray-scale recovery mode. After consecutive successful detections, the supplier does not directly accept the full traffic, but instead enters a multi-stage recovery state. Each stage sets a corresponding traffic release ratio, gradually increasing the traffic capacity. In the specific implementation of this embodiment, the normalized hash value used to determine whether a request enters the recovery supplier is calculated according to the following formula: ,in For routing key The corresponding normalized hash value, It is a consistent hash function. The stable routing key corresponding to the request is generated using a non-cryptographic consistent hashing algorithm based on the business entity identifier of the request. The normalized granularity is determined based on the flow rate and the accuracy requirements of the stage-based traffic allocation. In this embodiment, the average daily flow rate is 120,000 times, and the normalized granularity is set to 10,000 to meet the accuracy requirements of the stage-based traffic allocation and ensure precise control of the release ratio at each stage.

[0046] When the normalized hash value is less than the allowance ratio for the current recovery phase, a request is made to proceed to the recovery provider. This embodiment sets three recovery phases: the allowance ratio for the first phase is 0.1, for the second phase it's 0.5, and for the third phase it's 1.0. Each phase has a corresponding shutdown threshold, which is strictly lower than a preset removal threshold. In this embodiment, the shutdown threshold for each phase is set to 0.5. When the provider's risk value is lower than the shutdown threshold and it has been running stably for a preset time, it enters the next recovery phase. If a failure occurs during operation, it reverts to the corresponding state, achieving a gradual and smooth traffic rollback and preventing a sudden surge in full traffic from causing the provider to fail again during recovery.

[0047] When all automated vendors are unroutable, the overall request timeout expires, or all candidate sequences have been executed without an acceptable result, the authentication request is transferred to the manual review fallback module. This module pushes the authentication materials within the unified authentication context to the manual review station, where professional reviewers verify the identity and output the final authentication conclusion. The conclusion is returned to the business caller via a standardized interface. The manual review node has a maximum processing timeout; requests that exceed this timeout are automatically escalated to the advanced review queue, ensuring the efficiency of the fallback process and guaranteeing the continuity of authentication services in extreme scenarios.

[0048] This embodiment achieves accurate fault diagnosis and adaptive degradation switching within a multi-vendor identity authentication architecture through the complete technical implementation process described above. The authentication semantic classification mechanism eliminates interference from normal business conclusions on fault statistics, effectively avoiding unnecessary degradation switching and improving the accuracy of fault diagnosis. A unified authentication context and candidate chain replay mechanism enable seamless fault switching, eliminating the need for business callers to repeatedly submit authentication materials and effectively improving the user experience. The layered risk calculation model balances rapid response to continuous faults with the resilience of window statistics, adapting to the fault tolerance requirements of different service level providers. The exponential backoff cooling combined with a directional probe recovery mechanism, along with an optional gradual gray-scale recovery mode, effectively suppresses frequent switching oscillations caused by provider service jitter, while ensuring the business determinism of high-priority routes through low-priority request probing. A manual review fallback node provides the final business continuity guarantee for the entire chain. The entire solution significantly improves the overall availability and operational stability of multi-vendor identity authentication services, reduces the frequency of manual maintenance intervention and operating costs, and adapts to the high availability requirements of identity authentication for large-scale online service platforms.

[0049] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. An adaptive degradation and recovery method for multi-vendor identity authentication services, characterized in that, The method includes the following steps: S1. Receive the authentication request initiated by the business caller, extract the authentication materials and routing control information in the request, construct a unified authentication context that is independent of the vendor, set the overall deadline for this request, generate an authentication material integrity verification summary and write it into the unified authentication context. S2. Filter routable suppliers according to the preset routing priority rules, determine the preferred supplier, sort the remaining routable automatic suppliers according to priority to form a candidate sequence, perform deduplication on the candidate sequence, and add a manual review node at the end of the candidate sequence. S3. Select the current target supplier from the candidate sequence. The corresponding supplier adapter derives the supplier-specific request based on the unified authentication context. The adapter assembles the request using its own independently held access credentials. Set the single call timeout to the smaller value between the supplier's configured timeout and the remaining time limit of the request, and call the target supplier's service. S4. Receive the response result returned by the target supplier, perform semantic classification processing on the response result, and update the health status data of the corresponding supplier according to the classification result; S5. Calculate the current risk value based on the health status data of the target supplier, compare the current risk value with the preset removal threshold, and mark the supplier as unroutable when the current risk value reaches the preset removal threshold. S6. Perform corresponding processing based on the current supplier's call result. If it belongs to the technical success category, return the corresponding authentication conclusion. If it belongs to the technical failure category and the remaining time limit of the request meets the call requirements, verify the integrity of the unified authentication context and replay the same unified authentication context to the next candidate supplier. S7. Calculate the cooling-off period for suppliers in an unroutable state. After the cooling-off period expires, select service requests without high-priority routes to perform probe processing. Update the recovery status data according to the probe results. Clear the unroutable mark of the supplier when the preset recovery conditions are met. S8. When all automatic suppliers are in an unroutable state, the overall request time limit is exhausted, or all candidate sequences have been executed without an acceptable result, the authentication request will be transferred to the manual review node for processing.

2. The adaptive degradation and recovery method for multi-vendor identity authentication services according to claim 1, characterized in that, Step S2, which involves filtering routable suppliers and generating candidate sequences according to preset routing priority rules, includes the following steps: Iterate through all currently routable vendors, match the document-level explicit routing rules corresponding to the request, and if a match exists and the target vendor is in a routable state, then determine that vendor as the preferred vendor. If no explicit routing rule at the certificate level is matched, a manually forced routing rule will be matched. If a match exists and the target supplier is in a routable state, the supplier will be determined as the preferred supplier. If no explicit routing rules at the certificate level or manually forced routing rules are matched, the default preferred supplier will be determined according to the preset priority sorting method or the weighted traffic distribution strategy. The remaining routable automatic suppliers are sorted from highest to lowest priority, and entries that are duplicates of the preferred supplier are removed to form an initial candidate sequence. A manual review node is then added to the end of the initial candidate sequence.

3. The adaptive degradation and recovery method for multi-vendor identity authentication services according to claim 2, characterized in that, In step S2, when the weighted routing strategy is used to determine the default preferred supplier, the corresponding weight value is derived based on the priority value of each supplier, a deterministic hash operation is performed based on the routing key of the request to obtain the landing point value, the weight values ​​are accumulated in the order of candidate suppliers, and the supplier whose accumulated weight is greater than the landing point value for the first time is selected as the preferred supplier. The same routing key will get the same routing result when the supplier set and weight value remain unchanged.

4. The adaptive degradation and recovery method for multi-vendor identity authentication services according to claim 1, characterized in that, Step S4, when performing semantic classification processing on the response result, includes the following steps: Parse the original result code and response message content of the supplier's response to extract the authentication conclusion field and the failure reason field; Responses that pass authentication are classified as successful authentication, while responses that fail identity verification and are not due to technical anomalies are classified as ordinary business rejection. The business rejection responses included in the preset review scope are classified as reviewable business rejection categories, and network connection abnormality, service response timeout, and service internal abnormality responses are classified as ordinary technical failure categories. Authentication failures, incorrect credentials, abnormal account status, and service rate limiting responses are categorized as critical supplier failures.

5. The adaptive degradation and recovery method for multi-vendor identity authentication services according to claim 1, characterized in that, Step S5, when calculating the current risk value based on health status data and performing the removal determination, includes the following steps: Read the consecutive normal failure count, consecutive critical failure count, total sliding window request count, sliding window technical failure count, and sliding window slow call count for the target supplier. Calculate the current risk value of the target supplier using the following formula: ,in For suppliers The current risk value, For suppliers Count of consecutive normal failures, For ordinary failures, the threshold is continuously removed. For suppliers Continuous critical failure count Thresholds are continuously removed for critical faults. This represents the total number of technical failures within the sliding window. The total number of requests within the sliding window. Remove the threshold for window failure rate. This represents the total number of slow calls within the sliding window. Remove the threshold for slow window call rate; The current risk value is compared with the preset removal threshold, which is set to 1. If the current risk value is greater than or equal to the preset removal threshold, the supplier removal operation is triggered, and the supplier is marked as unroutable.

6. The adaptive degradation and recovery method for multi-vendor identity authentication services according to claim 5, characterized in that, In step S5, the supplier removal operation adopts atomic mutual exclusion control. Only one state transition operation is triggered for the same supplier at the same time. The state change information is sent to the operation and maintenance terminal through an asynchronous channel. The execution process of the state change notification does not block the main processing link of the authentication request.

7. The adaptive degradation and recovery method for multi-vendor identity authentication services according to claim 1, characterized in that, Step S7, when calculating the cooling time and performing the detection process for suppliers in an unroutable state, includes the following steps: Record the number of consecutive removals by the supplier, calculate the final cooling time according to the following formula, and set the corresponding cooling cutoff time: ,in For the first Cooling time after each consecutive removal This is the initial cooling reference duration. This is the maximum cooldown duration limit. For the number of consecutive removals, This is the jitter coefficient. It is a uniform random variable whose value ranges from -1 to 1; After the cooling-off deadline is reached, a single request is selected as a probe request from the business requests that have no explicit routing at the certificate level and no manual forced routing. The target supplier is invoked using a probe request. The probe success count is updated based on the response. When the number of consecutive successful probes reaches a preset threshold, the preset recovery conditions are met, and the supplier's unroutable flag is cleared.

8. The adaptive degradation and recovery method for multi-vendor identity authentication services according to claim 7, characterized in that, In step S7, a gradual grayscale recovery mode can be enabled. After continuous successful detection, the supplier enters a multi-stage recovery state. Each stage sets a corresponding traffic release ratio, and the normalized hash value corresponding to the request is calculated according to the following formula: ,in For routing key The corresponding normalized hash value, It is a consistent hash function. For the corresponding stable routing key, For normalized granularity, when the normalized hash value is less than the release ratio of the current recovery stage, the request is sent to the recovery provider. Each stage sets a corresponding closing threshold, which is strictly lower than the preset removal threshold. When the stage conditions are met, the next recovery stage is entered. When a fault occurs, the system reverts to the corresponding state.

9. The adaptive degradation and recovery method for multi-vendor identity authentication services according to claim 1, characterized in that, In step S3, each supplier adapter independently maintains its own short-term access token cache. The cache is set with an expiration buffer time. The token refresh operation adopts a mutual exclusion control mechanism. When the adapter receives an unauthorized response, it clears the corresponding token cache and reacquires the token, performing a retry operation only once.

10. An adaptive degradation and recovery system for multi-vendor identity authentication services, applicable to the adaptive degradation and recovery method for multi-vendor identity authentication services as described in any one of claims 1-9, characterized in that, The system includes an authentication request access module, a routing scheduling module, a vendor adaptation module, a semantic classification and state update module, a hierarchical risk decision-making module, a context replay control module, an adaptive recovery control module, and a manual review fallback module. The authentication request access module is used to receive the identity authentication request from the business caller, extract authentication materials and control information, construct a unified authentication context and set the overall deadline for the request, and output the unified authentication context to the routing scheduling module. The routing scheduling module is used to maintain routing rules and generate candidate supplier sequences, and outputs the candidate sequence information and unified authentication context to the supplier adaptation module. The supplier adaptation module is used to convert the unified authentication context into a supplier-specific request and call the corresponding supplier service, and output the response returned by the supplier to the semantic classification and status update module. The semantic classification and status update module is used to perform semantic classification on the response results, update the supplier health status data, and output the classification results to the hierarchical risk decision module and the context replay control module, respectively. The hierarchical risk decision module is used to calculate the supplier risk value and generate a removal decision, which is then output to the adaptive recovery control module. The context replay control module is used to schedule the candidate sequence replay process and verify the integrity of the unified authentication context. The adaptive recovery control module is used to manage the cooling calculation, detection scheduling and recovery determination process of the removed supplier; The manual review fallback module is used to handle authentication requests that the automatic process cannot process and output the final authentication conclusion.