Flow routing method based on multi-model optimization and rule fallback mechanism
Through multi-model optimization and rule fallback mechanisms, intelligent routing nodes call alternative models in parallel based on confidence thresholds, construct a comprehensive scoring function to select the optimal path, and fall back to the rule engine when confidence is insufficient or conflict occurs. This solves the rigidity and instability problems of process systems in existing technologies and enables efficient decision-making in complex business scenarios.
Patent Information
- Application Number
- CN202511578550.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-02-03
AI Technical Summary
Existing intelligent process orchestration systems are rigid when faced with diverse needs. The instability of a single model may lead to process jump errors. They lack multi-model collaboration mechanisms and rule rollback designs, making it difficult to meet the accuracy, robustness, and flexibility requirements of complex business scenarios.
A multi-model optimization and rule fallback mechanism is adopted. The main inference model is called through the intelligent routing node. A confidence threshold is set. If the confidence is high, the main model path is executed. Otherwise, alternative models are called in parallel. A comprehensive scoring function is constructed to select the optimal path. The rule fallback mechanism is triggered when the confidence is insufficient or the path conflicts.
It improves the accuracy, robustness, and flexibility of process routing decisions, avoids the reasoning illusion of a single model and the rigidity of fixed rules, and ensures the stability and adaptability of the process, making it suitable for complex intelligent process scenarios such as finance, customer service, and e-commerce.
Smart Images

Figure CN121458009A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of automation, in particular to a process routing method based on multi-model optimization and rule fallback mechanism. BACKGROUND
[0002] In the actual application of the current intelligent process orchestration system, process routing is a core link for deciding the business flow direction and ensuring the efficient promotion of the process. The implementation path of the process routing mainly includes two categories: one is the process control based on the rule engine, such as the BPMN (Business Process Model and Notation) process management system. This type of method relies on manual pre-writing of static business rules, and completes process jumping through condition matching of input information. Although this method has decision certainty in fixed scenarios with clear rules, it has poor flexibility and is difficult to adapt to the rapid iteration of business when facing dynamic changes, complex or ambiguous business requirements. The other is the decision engine based on artificial intelligence models, which analyzes the process context information through intent recognition models and large language models to generate next operation suggestions to realize routing. Although this method can handle some complex semantic scenarios, the AI model is prone to reasoning illusion and insufficient confidence. Especially in key decision nodes such as financial risk control and medical diagnosis, the instability of a single model may lead to process jumping errors and cause serious business risks.
[0003] The typical architecture of the existing process system is a linear mode of “input→single condition judgment (rule or model)→branch routing→subsequent process node”. This architecture has obvious defects: on the one hand, once the system is bound to a certain judgment mechanism, it cannot dynamically switch or combine the use of rules and models according to real-time business scenarios, resulting in a rigid state of the process when facing diversified demands and prone to decision failure. On the other hand, there is a lack of multi-model coordination mechanism. When a model reasoning fails or has low confidence, the system cannot call other models for “alternative” decision making, and there is no effective means to optimize the results of multiple models. At the same time, there is a lack of rule fallback design. Once the model decision making goes wrong, the entire process will be interrupted, which is difficult to meet the comprehensive needs of enterprises for the accuracy, robustness and flexibility of process routing, and restricts the application expansion of intelligent process orchestration systems in complex business scenarios. SUMMARY
[0004] Therefore, the embodiments of the present application provide a process routing method based on multi-model optimization and rule fallback mechanism, which can improve the accuracy, robustness and flexibility of process routing decision making, ensure the stable promotion of the process, and be suitable for complex intelligent process scenarios in multiple fields such as finance, customer service and e-commerce.
[0005] The technical solution of the embodiments of the present application is as follows: In a first aspect, the embodiments of the present application provide a process routing method based on a multi-model optimization and rule fallback mechanism, the method comprising: configuring a node with a judgment jump function in intelligent process orchestration as an intelligent routing node; analyzing the current input context information by calling a preset main reasoning model through the intelligent routing node to generate a corresponding process recommendation path and the confidence of the path; setting a confidence threshold, comparing the confidence output by the main reasoning model with the threshold, if the confidence is higher than the threshold, using the recommendation path generated by the main model to perform process jump; if the confidence is lower than or equal to the threshold, entering a multi-model parallel reasoning step; calling at least one preset alternative reasoning model to analyze the current input context information in parallel, each alternative reasoning model outputting a corresponding candidate path and the confidence of the candidate path; constructing a comprehensive scoring function, calculating the comprehensive score of each model through the comprehensive scoring function based on the confidence output by each reasoning model, the historical performance parameters of the model, the response delay and the resource consumption, selecting the model with the highest comprehensive score from the models with a comprehensive score higher than a preset minimum standard, and using the corresponding path to perform process jump; if the comprehensive scores of all models are lower than the preset minimum standard, or the candidate paths output by each model conflict and the optimal path cannot be determined through a preset strategy, triggering a rule fallback mechanism, calling a rule engine, determining a process path according to a preset business rule and performing jump.
[0006] In a second aspect, the embodiments of the present application also provide a process routing device based on a multi-model optimization and rule fallback mechanism, the device comprising: a configuration module configured to configure a node with a judgment jump function in intelligent process orchestration as an intelligent routing node; a generation module configured to analyze the current input context information by calling a preset main reasoning model through the intelligent routing node to generate a corresponding process recommendation path and the confidence of the path; a comparison module configured to set a confidence threshold, compare the confidence output by the main reasoning model with the threshold, if the confidence is higher than the threshold, use the recommendation path generated by the main model to perform process jump; if the confidence is lower than or equal to the threshold, enter a multi-model parallel reasoning step; a calling module configured to call at least one preset alternative reasoning model to analyze the current input context information in parallel, each alternative reasoning model outputting a corresponding candidate path and the confidence of the candidate path; The computing module is configured to construct a comprehensive score function, calculate a comprehensive score of each model based on the confidence, the historical performance parameter, the response delay and the resource consumption output by each inference model, and select a model with the highest comprehensive score from the models with a comprehensive score higher than a preset minimum standard. The execution module is configured to trigger a rule fallback mechanism, call a rule engine, determine a process path according to a preset business rule and perform a jump if the comprehensive scores of all the models are lower than the preset minimum standard or the candidate paths output by each model conflict and the optimal path cannot be determined by the preset strategy.
[0007] In a third aspect, an electronic device is provided, including a processor, a storage medium and a bus. The storage medium stores machine readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium through the bus. The processor executes the machine readable instructions to perform the process routing method based on the multi-model optimization and rule fallback mechanism according to any one of the first aspect.
[0008] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program. When the computer program is run by a processor, the process routing method based on the multi-model optimization and rule fallback mechanism according to any one of the first aspect is executed.
[0009] The embodiments of the present application have the following beneficial effects: By configuring the nodes with the judgment and jump functions in the process as intelligent routing nodes, the main inference model is used to perform inference first, and whether to use the recommended path is determined based on the confidence threshold. When the confidence is insufficient, the backup model is called in parallel. The optimal path is selected from the qualified models based on a multi-dimensional comprehensive score function. When the scores of all the models are not up to standard or the path conflicts cannot be solved, the rule engine is automatically returned. The method not only effectively avoids the inference illusion and insufficient confidence of a single AI model, and the defects that the fixed rule engine is difficult to cope with dynamic and complex business scenarios, greatly improves the accuracy and adaptive flexibility of the process routing decision. At the same time, the calling logic of the main model gives consideration to the decision efficiency in the conventional scene. The bottom design of the multi-model parallel optimization and the rule fallback ensures the reliability of the key node decision and the stability of the process running, avoids the process interruption caused by the failure of a single decision mechanism, and provides a core guarantee for the stable and efficient operation of the intelligent process arrangement system in the key business scenarios in the fields of finance, customer service and e-commerce. BRIEF DESCRIPTION OF DRAWINGS
[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as limiting the scope. For those skilled in the art, other related drawings can also be obtained without creative labor under the guidance of the content of the present application.
[0011] Figure 1 is a flowchart of steps S101-S106 provided by the embodiments of the present application; Figure 2 is a flowchart of steps S201-S203 provided by the embodiments of the present application; Figure 3 is a flowchart of steps S301-S304 provided by the embodiments of the present application; Figure 4 is a flowchart of steps S401-S402 provided by the embodiments of the present application; Figure 5 is a flowchart of steps S501-S502 provided by the embodiments of the present application; Figure 6 is a structural schematic diagram of a flow routing device based on a multi-model optimization and rule fallback mechanism provided by the embodiments of the present application; Figure 7 is a structural schematic diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0012] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It should be understood that the drawings in the present application only play the purpose of illustration and description, and do not limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportion. The flowchart used in the present application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowchart or removed from the flowchart by those skilled in the art under the guidance of the content of the present application.
[0013] In the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subset of all possible embodiments, and can be combined with each other without conflict.
[0014] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0015] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0016] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0017] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application and is not intended to limit this application.
[0018] See Figure 1 , Figure 1 This is a flowchart illustrating steps S101-S106 of the process routing method based on multi-model optimization and rule fallback mechanism provided in this application embodiment, which will be combined with... Figure 1 Steps S101-S106 shown will be explained.
[0019] In step S101, the nodes with the judgment and jump function in the intelligent process orchestration are configured as intelligent routing nodes.
[0020] In an intelligent workflow orchestration system, a "node with jump function" refers to a node that needs to determine the subsequent workflow based on input information (such as user requests, business data, context status, etc.). Examples include the node that "determines the payment method" in an order processing workflow and the node that "determines the user's intent and assigns the service type" in a customer service dialogue workflow. This step, through configuration, marks such nodes as "intelligent routing nodes," enabling them to invoke multi-model inference, perform scoring and optimization, and rule rollback, distinguishing them from ordinary judgment nodes in traditional workflows that are only bound to a single rule or model.
[0021] The basic parameters of each intelligent routing node, such as "main model identifier", "alternative model list", "confidence threshold", "rule engine mapping relationship", etc., can be associated through the visual interface or configuration file definition of the process orchestration tool, for example, annotated in the configuration file in JSON format.
[0022] Through unified node type definition, standardized carriers are provided for subsequent multi-model calling and dynamic decision-making, solving the problem of fixed node function judgment and inability to flexibly expand decision logic in traditional processes.
[0023] In step S102, the preset main reasoning model is called through the intelligent routing node to analyze the current input context information, and the corresponding process recommendation path and the confidence of the path are generated.
[0024] The "preset main reasoning model" refers to the core reasoning model selected according to the characteristics of the business scenario (such as decision complexity, accuracy requirement), which is usually a model with strong semantic understanding or complex decision-making ability (such as large language model LLM), for example, in the financial risk control process, the main model can select a large language model optimized for "transaction risk judgment"; "current input context information" includes but is not limited to user request text, business data (such as order amount, user level), historical interaction records (such as the processing results of previous process nodes); "process recommendation path" refers to the unique or multiple candidate subsequent process node identifiers (such as "jump to credit card payment node" "jump to manual review node") output by the main model based on context analysis; "confidence" refers to the quantitative value of the credibility of the output path of the main model (usually the value range is 0-1), which can be calculated through logprob (log probability), maximum value of intent probability distribution, etc. For example, the large language model outputs a confidence of 0.85 by predicting the probability of "recommendation path rationality".
[0025] The intelligent routing node calls the main model through the API interface, encapsulates the context information according to the model's required format (such as Prompt template) and transmits it, for example, for the order processing scenario, the Prompt is encapsulated as: "Given the current order information: order amount 1200 yuan, user level VIP, historical payment record no abnormal, please judge whether the order should jump to 'automatic payment confirmation' node (path A) or'manual review' node (path B), and output the recommended path and confidence." The main model returns a structured result after processing, such as {"recommended_path": "A", "confidence": 0.88}.
[0026] Adopting the strategy of "main model priority", the main model as the core decision model can cover most of the conventional scenarios, avoid the waste of resources caused by calling multiple models in the initial stage, and solve the problem of "no priority call and high resource consumption" in the traditional multi-model solution.
[0027] In step S103, a confidence threshold is set, and the confidence output by the main reasoning model is compared with the threshold. If the confidence is higher than the threshold, the recommended path generated by the main model is used to perform flow jump; if the confidence is lower than or equal to the threshold, the multi-model parallel reasoning step is entered.
[0028] The "confidence threshold" is a critical value preset according to the business risk tolerance and decision accuracy requirement (usually the value range is 0.7-0.9), for example, in the medical diagnosis process, to reduce the risk, the threshold can be set to 0.9, and in the ordinary commodity recommendation process, the threshold can be set to 0.75; when the recommended path generated by the main model is used to perform flow jump, the intelligent routing node passes the recommended path information to the flow scheduling module, and the scheduling module drives the flow to enter the corresponding subsequent node; when the confidence of the main model is insufficient (such as the output confidence is 0.72, which is lower than the threshold 0.8), the alternative model calling logic is triggered to avoid decision errors caused by low single model confidence.
[0029] The threshold is set through a business configuration interface and stored in a database. After the intelligent routing node obtains the main model result, it performs numerical comparison logic (such as if confidence>threshold:execute_path(recommended_path)else:trigger_parallel_inference()). If the jump condition is met, the "node jump interface" of the process engine is used to update the process state to "has jumped to the recommended path node", and the jump log is recorded.
[0030] The confidence threshold realizes the quantitative judgment of "whether the main model is reliable", avoids the problems of "blindly relying on single model" or "giving up single model without basis" in the traditional solution, provides a trigger basis for subsequent multi-model calling, and balances decision accuracy and efficiency.
[0031] In step S104, at least one alternative reasoning model is called to analyze the current input context information in parallel, and each alternative reasoning model outputs a corresponding candidate path and the confidence of the candidate path.
[0032] The "preset at least one alternative reasoning model" refers to a reasoning model that is complementary or lightweight to the main model function. For example, when the main model is a large language model, the alternative model can include a lightweight intent classifier (focusing on fast intent recognition), a semantic graph routing model (focusing on accurate path matching based on a knowledge graph), a rule enhancement model (focusing on decision-making combined with basic rules), etc. The number can be configured according to the business scenario (usually 2-5). "Parallel analysis" refers to sending context information to all alternative models simultaneously through multi-threading or distributed scheduling mechanisms to avoid response delays caused by serial calls. Each alternative model independently processes input information, outputs candidate paths (which may be consistent or different from the main model path) and corresponding confidence levels according to its own reasoning logic. For example, the intent classifier outputs { "candidate_path": "A", "confidence": 0.92}, and the semantic graph model outputs { "candidate_path": "B", "confidence": 0.81}.
[0033] The system has a built-in model scheduling module that supports multi-model parallel calling. The calling requests of alternative models are managed through a thread pool or a distributed task queue (such as Celery). The same context information is adapted to the input format of each alternative model and sent in parallel. After each model is processed, the results are aggregated to the result cache area of the intelligent routing node through a callback function to ensure the ordered reception of parallel results.
[0034] Through multi-model parallel calling, "decision alternative solutions" are introduced to solve the reasoning illusion and insufficient confidence problems that may occur in single models (including the main model). At the same time, the parallel method avoids the delay accumulation of serial calling, ensuring the response efficiency of the process, which is different from the defects of "serial calling and long time-consuming" in traditional multi-model solutions.
[0035] In step S105, a comprehensive scoring function is constructed based on the confidence of each reasoning model output, model historical performance parameters, response delay, and resource consumption. The comprehensive score of each model is calculated through the comprehensive scoring function. From the models with a comprehensive score higher than the preset minimum standard, the model with the highest comprehensive score is selected, and the corresponding path is used to perform process jumping.
[0036] The "Comprehensive Scoring Function" is a quantitative calculation model that integrates multi-dimensional evaluation indicators to address the problem that "selecting the best model based solely on confidence may ignore performance and resource costs." "Model Historical Performance Parameters" refers to the model's decision accuracy in similar business scenarios in the past (e.g., the actual success rate of the model's recommended path execution in the past 30 days), obtained through system log statistics. "Response Latency" refers to the time (in milliseconds) it takes for the model to output results from receiving input information. "Resource Consumption" refers to the computing resources consumed during model inference (e.g., GPU memory usage, CPU utilization). "Preset Minimum Standard" refers to the minimum passing score for the comprehensive score (e.g., 60 points out of 100), used to filter models with excessively low scores and poor decision-making credibility. "Selecting the Model with the Highest Comprehensive Score and Executing the Jump" means selecting the optimal model from the qualified models to ensure that the decision is both reliable and efficient.
[0037] Confidence scores are extracted directly from the model output. Historical performance parameters are queried from the system's "model performance log library" (e.g., obtained via the SQL statement "SELECT avg (success_rate) FROM model_performance WHERE model_id='Intent_Classifier_V2' AND time_range='last 30 days'"). Response latency is recorded by a timer (from the start of the model call to the end of the result return). Resource consumption is collected by system monitoring tools (such as nvidia-smi, top command). Taking a percentage system as an example, each indicator is first standardized (e.g., confidence score of 0.8 maps to 80 points, historical accuracy of 95% maps to 95 points, response latency of 500ms maps to 80 points, and low resource consumption maps to a high score), and then substituted into the comprehensive scoring function for calculation. For example, if a model has a confidence score of 80, a historical performance score of 90, a response latency score of 75, and a resource consumption score of 85, and the weights are α=0.3, δ=0.2, β=0.2, and γ=0.3, then the comprehensive score = 80×0.3+90×0.2+75×0.2+85×0.3=24+18+15+25.5=82.5. The comprehensive scores of all models are iterated through, and models with scores ≥ the minimum standard (e.g., 60 points) are selected. Then, the highest-scoring model is selected using a sorting algorithm (e.g., bubble sort, quick sort), and the process jump interface is called to execute its recommended path.
[0038] By using a multi-dimensional comprehensive scoring system, a balance is achieved between "decision reliability, response efficiency, and resource cost," avoiding the one-sidedness of traditional solutions that "only consider confidence and ignore cost" or "only consider efficiency and ignore accuracy," thus ensuring that the selected model is optimal in the current scenario.
[0039] In step S106, if the comprehensive scores of all models are lower than the preset minimum standard, or the candidate paths output by each model conflict and the optimal path cannot be determined by the preset strategy, a rule fallback mechanism is triggered, a rule engine is called, and a process path is determined and jump is performed according to a preset business rule.
[0040] The “comprehensive scores of all models are lower than the preset minimum standard” means that the scores of the main model and all alternative models do not reach the qualified line (for example, all model scores are <60), indicating that the multi-model cannot provide a reliable decision under the current scenario; the “candidate paths output by each model conflict” means that the recommended paths output by different models are inconsistent (for example, the main model recommends path A, alternative model 1 recommends path B, and alternative model 2 recommends path C); the “preset strategy” means the judgment logic used to solve the conflict; when the multi-model decision fails, the backup logic of the rule engine is switched to guide the decision.
[0041] The intelligent routing node compares all candidate paths of the model, if there are at least two different paths and each path is supported by a model, it is determined that there is a conflict; if a voting conflict resolution strategy is configured, the strategy is executed first (for example, the number of models supporting each path is counted), if the strategy cannot determine the optimal path (for example, the number of models supporting each path is the same), the fallback is triggered; the intelligent routing node calls the rule engine through the API interface, and the current context information (for example, order amount, user level) is transmitted, the rule engine matches the corresponding path according to the “condition-action” rule (for example, IF order amount > 5000 THEN jump to the manual review node), and returns to the intelligent routing node to perform jump.
[0042] Through the rule fallback mechanism, a “bottom solution” is provided for the multi-model decision failure, avoiding the problem of “model failure and process interruption” in the traditional process, ensuring that the process has high fault tolerance and stability, and meeting the requirements of key business scenarios (such as financial transactions and medical services) for process continuity.
[0043] The above method solves the core defects of the prior art, such as “single model instability, fixed rule inflexibility, and lack of dynamic selection and fault tolerance”, through the three-layer decision logic of “main model priority-multi-model parallel optimization-rule fallback”, and realizes the improvement of the accuracy, robustness and flexibility of the process routing.
[0044] In some embodiments, the expression of the comprehensive score function is: Score i =α•Confidence i +δ•Performance i -β•Latency i -γ•Resource i , wherein Score iScorei is the comprehensive score of the ith model, Confidencei is the confidence of the ith model output path, Performancei is the performance of the ith model output path, Latencyi is the historical accuracy of the ith model, and Resourcei is the response delay of the ith model. i i i i α, β, γ, and δ are preset weight parameters, and α+β+γ+δ=1.
[0045] The expression adopts a design of "positive indicators plus points and negative indicators minus points", wherein Confidencei i and Performancei i are positive indicators (the higher the value, the better), so "α•Confidencei i " and "δ•Performancei i " are counted as plus points; Latencyi i and Resourcei i are negative indicators (the lower the value, the better), so "-β•Latencyi i " and "-γ•Resourcei i " are counted as minus points; the sum of the weight parameters α, β, γ, and δ is 1, which ensures that the weight distribution of each indicator conforms to the "normalization" principle, avoiding the imbalance of the score caused by the over-high or over-low weight of a certain indicator.
[0046] Scorei i is the comprehensive score of the ith model, which is a quantitative result of the "comprehensive performance" of the ith model in the current decision-making scenario. The higher the score, the more suitable the model is for the current scenario; the value range is usually 0-100 points (each indicator value needs to be standardized to the 0-100 point interval), and it can also be adjusted to a decimal form of 0-1 according to business needs; as the core basis for "model optimization", it is used to filter qualified models and determine the optimal model.
[0047] Confidencei i The confidence of the i-th model output path is a quantitative value of the "trustworthiness" of the model to its output candidate path, reflecting the depth of the model's understanding of the current context information and the certainty of its decision-making. Different methods are used according to different model types, such as large language models that calculate the logprob (log probability) corresponding to the output path and convert it to a confidence of 0-1, intent classifiers that output "intent matching probability" as confidence, and semantic graph models that calculate confidence through "path matching degree". If the logprob of the recommended path A of the large language model is -0.15, the confidence is calculated by the formula "confidence = exp (logprob)", which is exp (-0.15) ≈ 0.86, i.e. Confidence i = 0.86 (standardized to 86 points).
[0048] Performance i The historical accuracy of the i-th model is the proportion of the i-th model's recommended paths that are verified as "correct" by actual business in the same or similar business scenarios in the past, reflecting the long-term reliability of the model. The ratio of "model recommended path number" to "recommended path verified correct number" is calculated through system logs, and the formula is "Performance i = (correct recommendation times / total recommendation times) x 100%"; a certain intent classifier has recommended paths 1000 times in the past 30 days, of which 850 times have been verified as correct by business, then Performance i = 850 / 1000 x 100% = 85% (standardized to 85 points).
[0049] Latency i The response delay of the i-th model is the total time from "receiving input context information" to "outputting candidate path and confidence" of the i-th model, reflecting the response efficiency of the model. The start time (T1) and end time (T2) of the model call are recorded by a timer, and Latency i = T2-T1, usually in milliseconds (ms); since delay is a negative indicator, it needs to be converted to a positive score, for example, set "delay ≤ 300ms 100 points, 300ms < delay ≤ 500ms 80 points, 500ms < delay ≤ 800ms 60 points, delay > 800ms 40 points", if the delay of a certain model is 450ms, then Latency i standardized to 80 points (when calculating the score, subtract the points according to this score).
[0050] Resource iResource consumption of the ith model) is the computing resource occupied by the ith model during the inference process, including GPU memory, CPU usage, memory occupation, etc., reflecting the running cost of the model; the peak resource occupation is collected through system monitoring tools (such as nvidia-smi for monitoring GPU memory, and top command for monitoring CPU usage), and the resource consumption value is calculated by a pre-set weight; it is also a negative indicator and needs to be converted into a positive score, for example, set "GPU memory occupation ≤ 1 GB 100 points, 1 GB < occupation ≤ 2 GB 80 points, 2 GB < occupation ≤ 4 GB 60 points, occupation > 4 GB 40 points", if the GPU memory occupation of a certain model is 1.5 GB, then Resource i standardized to 80 points (when substituting into the formula, calculate the deduction item according to this score).
[0051] α, β, γ, δ (preset weight parameters) are used to adjust the "importance" coefficients of each indicator in the comprehensive score, and the greater the weight, the stronger the influence of the corresponding indicator on the final score; it is determined according to the business scenario requirements, for example, in the "financial risk control" scenario, decision accuracy is given priority, so α (confidence weight) and δ (historical accuracy weight) can be set to higher values (such as α = 0.4, δ = 0.3), β (delay weight) and γ (resource weight) are set to lower values (such as β = 0.15, γ = 0.15); in the "real-time customer service" scenario, response efficiency is given priority, so β (delay weight) is set to a higher value (such as β = 0.3), α = 0.3, δ = 0.2, γ = 0.2; α + β + γ + δ = 1, to ensure the rationality of the weight distribution of each indicator, and to avoid the problem of "weight total exceeding 1 leading to score being too high" or "total being less than 1 leading to score being too low".
[0052] Taking a certain alternative model (intention classifier) in the "real-time customer service process" as an example, the specific calculation process is as follows: Confidence i (confidence): the model output is 0.85, standardized to 85 points; Performance i (historical accuracy): past accuracy 90%, standardized to 90 points; Latency i (response delay): 350ms, standardized to 85 points; Resource i (resource consumption): GPU memory occupation 0.8GB, standardized to 90 points; According to the requirements of the real-time customer service scenario, set α = 0.3, δ = 0.2, β = 0.2, γ = 0.3 (satisfy α + β + γ + δ = 1); Score i= 0.3 x 85 + 0.2 x 90 - 0.2 x 85 - 0.3 x 90 = 25.5 + 18 - 17 - 27 = (25.5 + 18) - (17 + 27) = 43.5 - 44 = -0.5.
[0053] In practical applications, the negative indicators should be converted into "cost scores" first, and then calculated by "subtracting the cost score x weight", for example, the "cost score" of delay = 100 - standardized score, if the delay is standardized as 85 points, the cost score is 15 points, at this time the formula should be Score i = a • Confidence i + d • Performance i - b • (100 - Latency i )- g • (100 - Resource i ), the corrected calculation is as follows: Corrected formula: Score i = a • Confidence i + d • Performance i - b • (100 - Latency i )- g • (100 - Resource i ); Substitute the data: Score i = 0.3 x 85 + 0.2 x 90 - 0.2 x (100 - 85) - 0.3 x (100 - 90) = 25.5 + 18 - 0.2 x 15 - 0.3 x 10 = 43.5 - 3 - 3 = 37.5.
[0054] Compare the Score i (37.5 points) of this model with other model scores, if it is higher than the preset minimum standard (such as 30 points), it is included in the candidate model; if it is the highest score, the recommended path is adopted.
[0055] The above method converts the abstract indexes such as confidence, historical performance, delay, and resource into a calculable comprehensive score through a clear mathematical expression, avoids the uncertainty of the traditional scheme of "subjective judgment of model selection", and adjusts the weight parameters a, b, g, and d to adapt the needs of different business scenarios (such as accuracy priority, efficiency priority, and cost priority), solve the problem of "poor scene adaptability" of the traditional scoring function, and consider both positive indexes (accuracy and reliability) and negative indexes (efficiency and cost) to ensure that the selected model is optimal in comprehensive performance rather than in a single dimension.
[0056] In some embodiments, referring to Figure 2 , Figure 2 is a flowchart of steps S201-S203 provided by the embodiments of the present application, and the judgment process of the candidate paths output by the models in conflict and unable to determine the optimal path through the preset strategy includes steps S201-S203, which will be described in combination with each step.
[0057] In step S201, the number of model supports obtained by each candidate path is counted, and the support vote ratio of each candidate path is calculated.
[0058] The "candidate paths" refer to different paths output by all models participating in reasoning (main model + alternative model), for example, model 1 recommends path A, model 2 recommends path B, model 3 recommends path A, and model 4 recommends path C, so the candidate paths are A, B, and C; the "support number" refers to the number of models recommending a candidate path, for example, the support number of path A is 2 (model 1 and model 3), the support number of path B is 1 (model 2), and the support number of path C is 1 (model 4); the "support vote ratio" refers to the ratio of the support number of a path to the "total number of models participating in voting", and the formula is "support vote ratio = (support number of a path / total number of models participating in voting) x 100%", wherein the "total number of models participating in voting" is the sum of the number of the main model and all alternative models (such as 4 in the above example).
[0059] The intelligent routing node performs deduplication processing on the candidate paths output by all models to generate a "candidate path list" (such as [A, B, C]); the number of supporting models is counted for each candidate path by traversing the output results of all models, for example, the dictionary structure is stored as { "A": 2, "B": 1, "C": 1}; the total number of models participating in voting (such as 4) is obtained, and the ratio of each candidate path is calculated, for example, the ratio of path A is 2 / 4 x 100% = 50%, the ratio of path B is 1 / 4 x 100% = 25%, and the ratio of path C is 25%.
[0060] By quantifying the "model support degree of each path", objective data basis is provided for subsequent conflict resolution, avoiding the problem of "subjective path selection" in traditional conflict resolution.
[0061] In step S202, a support ratio threshold is set, and if the support ratio of a certain candidate path is higher than the threshold, the candidate path is adopted to perform the jump.
[0062] The "support ratio threshold" is a critical value for determining whether a path has "obtained a significant majority of support". It is usually set according to the requirements of the business for "model consensus degree" (such as 50%, 60%, 70%). For example, in the financial scenario requiring "high consensus", the threshold can be set to 60%, and in the ordinary recommendation scenario allowing certain differences, the threshold can be set to 50%. "Adopting the candidate path to perform the jump" means that when the support ratio of a certain path exceeds the threshold, the path is recognized as the "model consensus path", and the corresponding process jump is directly performed without entering the rule rollback.
[0063] The support ratio threshold is preset through a business configuration interface or a configuration file, for example, "conflict_vote_threshold=60%" is stored in the database; The support ratio of each candidate path is compared with the threshold one by one. For example, if the threshold is 60%, the ratio of path A is 50% (<60%), the ratio of path B is 25% (<60%), and the ratio of path C is 25% (<60%), then no path exceeds the threshold. If the threshold is 50%, then the ratio of path A is 50% (equal to the threshold, which can be set to "higher than or equal to" according to business rules), then path A is adopted. If there is a path that meets the conditions, the intelligent routing node calls the process scheduling interface to jump to the subsequent node corresponding to the path, and records "conflict resolution method=model vote consensus".
[0064] Whether there is a "model consensus path" is determined through "threshold judgment", and if there is, it is directly adopted to avoid the rule engine still being rolled back in the case of clear consensus, improve the efficiency of process decision-making, and improve the credibility of decision-making by using "multi-model consensus".
[0065] In step S203, if the support ratio of all candidate paths is lower than the threshold, it is determined that the optimal path cannot be determined, and the rule rollback mechanism is triggered.
[0066] When the support ratio of all candidate paths is lower than the threshold, no path has obtained enough model support, indicating that there is a significant difference in the decision of multiple models for the current scenario (for example, the support ratio of each path is 30% and the threshold is 50%). At this time, a unique and reliable path cannot be selected from the conflict paths through the voting mechanism. It is necessary to switch to the rule engine to guide the decision by the preset business rules.
[0067] Confirm whether all the support ratios of all candidate paths are less than the threshold value, for example, the support ratio of candidate path A is 40%, the support ratio of candidate path B is 35%, and the support ratio of candidate path C is 25%, and the threshold value is 50%. If all the support ratios are less than the threshold value, it is determined that all the support ratios are less than the threshold value. The intelligent routing node generates a "conflict resolution failure" log, calls an interface of the rule engine, and transmits the current context information into the rule engine. The rule engine matches the path according to the preset business rule and returns. The intelligent routing node executes the path jump and records "conflict resolution mode = rule fallback".
[0068] When there is a significant difference between multiple models, the rule fallback is used to avoid "forced selection of a path leading to decision errors", to ensure that the process can still be steadily pushed forward in the case of lack of model consensus, to further improve the fault tolerance and reliability of the process, and to solve the problem of "no bottom-up mechanism in the case of disagreement" in the traditional conflict resolution solution.
[0069] The above-mentioned method provides a specific and implementable solution for "conflict processing" through the voting conflict resolution process of "statistical support quantity-threshold value judgment-rule fallback", clearly defines the judgment standard of "when can the model consensus be used for decision-making and when the rule needs to be fallbacked", avoids the ambiguity of conflict processing, and balances the decision-making efficiency and reliability, which is an important supplement to the fault-tolerant mechanism of multi-model decision-making.
[0070] In some embodiments, referring to Figure 3 , Figure 3 is a flowchart of steps S301-S304 provided by the embodiments of the present application. The business rule optimization step can be implemented by steps S301-S304, which will be described in conjunction with each step.
[0071] In step S301, when the process path determined by the rule engine conflicts with the determined optimal path, the reasoning model that determines the optimal path generates a candidate business rule with generalization ability and without conflict with the existing business rule based on the current input context information, the optimal path, and the existing business rule.
[0072] The path output by the rule engine according to the preset rule (such as rule output path B) is inconsistent with the optimal path determined by the multi-model optimization (such as model optimization output path A), indicating that the existing rule has failed to adapt to the decision-making requirements of the current scenario; the reasoning model that determines the optimal path (the main model with the confidence threshold met or the model with the highest comprehensive score); the "context information" includes the input data of the current decision (such as user request, business parameter); the "optimal path" refers to the correct path determined by the multi-model optimization; the "existing business rule" refers to all static rules stored in the rule engine; the candidate rule not only can handle the current input scenario, but also can cover similar input scenarios (such as the current input is "order amount 1200 yuan, VIP user", the candidate rule is not only suitable for this order, but also suitable for similar scenarios such as "order amount 1000-1500 yuan, VIP user"); "not conflict with existing rules" refers to the "condition-action" logic of the candidate rule is not contradictory to the existing rules (such as the existing rule is "order amount > 5000 yuan → manual review", the candidate rule cannot be "order amount 6000 yuan → automatic confirmation").
[0073] The intelligent routing node compares the "rule engine output path" with the "multi-model optimal path", and if they are inconsistent, it triggers rule generation; the "context information, optimal path, and existing business rule list" are packaged according to the preset Prompt template and transmitted to the reasoning model that determines the optimal path, for example, the Prompt is: "existing business rules: 1. order amount > 5000 yuan → manual review; 2. non-VIP user → basic service node. Current context: order amount 1200 yuan, user level VIP, rule engine output path: basic service node, multi-model optimal path: VIP exclusive service node. Please generate a candidate business rule, which requires: 1. can correctly handle the current context (output VIP exclusive service node); 2. can cover similar scenarios (such as order amount 1000-1500 yuan, VIP user); 3. does not conflict with existing rules." The model outputs a candidate rule, for example, "if the user level is VIP and the order amount is in the 1000-1500 yuan range, then jump to the VIP exclusive service node", and the intelligent routing node standardizes the rule format (such as converting it to a structured format of "IF condition THEN action"). By automatically generating candidate rules through models, the problem of "rules requiring manual coding and being unable to adapt to new scenarios" in traditional rule engines is solved, realizing the "self-expansion" of rules, while ensuring the effectiveness of candidate rules (generalization ability, no conflict), providing high-quality candidates for subsequent rule updates.
[0074] In step S302, at least two preset adjudication models are called to judge the logical rationality, context consistency, generalization ability, and rule conflict of the candidate business rule, and each adjudication model outputs a judgment result of "accept" or "reject".
[0075] The "at least two preset judging models" refer to reasoning models (which can be the same as or different from the main model and the alternative model, and are usually models with strong logical reasoning capabilities, such as large language models) specially used for evaluating the quality of rules, and the number is set to at least two to avoid the judgment deviation of a single judging model; the "logical rationality" refers to whether there is a reasonable cause-and-effect relationship between the "condition" and the "action" of the candidate rule (for example, the rule "VIP user -> VIP service node" has logical rationality, while "VIP user -> ordinary user node" has no rationality); the "context consistency" refers to whether the candidate rule matches the current context information of the decision (for example, the current context is "VIP user", and the rule "VIP user -> VIP service node" is consistent); the "generalization ability" refers to whether the candidate rule can cover similar scenarios (for example, whether the rule contains "interval conditions" rather than "single value conditions"); the "rule conflict" refers to whether the candidate rule conflicts with existing business rules; and the "acceptance / rejection" refers to the binary evaluation result of the judging model on the quality of the candidate rule (acceptance means that the rule is qualified, and rejection means that the rule is not qualified).
[0076] The intelligent routing node sends the "candidate rule, existing rule list, current context" to at least two judging models (such as Model_Judge_1 and Model_Judge_2) through a parallel calling mechanism, and requires the models to evaluate according to the preset dimensions; for example, the judging model is sent: "candidate rule: 'if the user level is VIP and the order amount is in the interval of 1000-1500 yuan, then jump to the VIP exclusive service node'; existing rules: 1. order amount > 5000 yuan -> manual audit; 2. non-VIP user -> basic service node; current context: order amount 1200 yuan, VIP user. Please evaluate the candidate rule according to the following dimensions: 1. logical rationality (yes / no); 2. context consistency (yes / no); 3. generalization ability (yes / no); 4. rule conflict (no conflict / conflict). If all dimensions meet, output 'acceptance', otherwise output'rejection'. The judging models return the evaluation results respectively, for example, Model_Judge_1 outputs "acceptance", Model_Judge_2 outputs "acceptance", or Model_Judge_1 outputs "acceptance" and Model_Judge_2 outputs "rejection".
[0077] Through independent evaluation of multiple judging models, the misjudgment of a single model on the quality of the rule is avoided, the reliability of the candidate rule is ensured from multiple dimensions, objective basis is provided for subsequent rule confirmation, and the problem of low efficiency and strong subjectivity of traditional "manual rule evaluation" is solved.
[0078] In step S303, the proportion of the number of models with "acceptance" evaluation results is counted, and if the proportion is higher than a preset confirmation threshold, it is determined that the candidate business rule passes the verification; if the proportion is lower than or equal to the confirmation threshold, the candidate business rule is discarded.
[0079] The number of models that accept the judgment result refers to the ratio of the number of judgment models that output "accept" to the total number of judgment models participating in the judgment, and the formula is "acceptance ratio = (number of accepted models / total number of judgment models) x 100%"; the preset confirmation threshold refers to the critical value (such as 60%, 70%) for determining whether the candidate rule is "recognized by enough judges"; "pass the verification" means that the quality of the candidate rule is qualified and can enter the subsequent test link; "discard the candidate business rule" means that the quality of the candidate rule is unqualified and is not included in the rule engine, so as to avoid the influence of inferior rules on process decision.
[0080] The intelligent routing node counts the number of judgment models that output "accept", for example, 2 out of 3 judgment models accept and 1 rejects, so the number of accepted models is 2 and the total number of judgment models is 3; the acceptance ratio is 2 / 3 x 100% ≈ 66.7%; if the confirmation threshold is 60%, then 66.7% > 60%, and the verification is passed; if the acceptance ratio is 50% (2 out of 3 judgment models accept), and the threshold is 60%, then it is determined to be discarded; the rule that passes the verification is marked as "to be tested", and the rule that is discarded is recorded with the "discard reason (such as insufficient acceptance ratio)" and archived to the log.
[0081] Through the "multi-judge voting confirmation" mechanism, high-quality rules are further screened to avoid inferior rules entering the system due to the bias of individual judgment models, and the threshold is set to balance the "rule pass rate" and "rule quality", ensuring that the rules entering the test link have high reliability.
[0082] In step S304, the candidate business rule that passes the verification is tested by routing using the current input context information, and if the test result meets the optimal path requirement, the candidate business rule is included in the business rule set of the rule engine; if the test result does not meet the requirement, the candidate business rule is removed.
[0083] "Routing test" refers to substituting the current input context information into the candidate rule to verify whether the path output by the rule is consistent with the "multi-model optimal path"; "meets the optimal path requirement" means that the path output by the rule test is exactly the same as the optimal path determined by the multi-model (for example, the rule outputs "VIP exclusive service node" and the optimal path is also this node); "included in the business rule set of the rule engine" means that the candidate rule is added to the rule library of the rule engine, so that it takes effect in subsequent process routing; "remove the candidate business rule" means that the rule that fails the test is not included in the rule library to avoid its influence on subsequent decision.
[0084] The intelligent routing node substitutes the current context information (such as "order amount 1200 yuan, VIP user") into the candidate rule, calculates the rule output path, for example, the candidate rule outputs "VIP exclusive service node"; the rule output path is compared with the multi-model optimal path (such as the optimal path is also "VIP exclusive service node"), if consistent, the test is passed; if inconsistent (such as the rule output is "basic service node"), the test fails; the rule that passes the test is included in the business rule set through the "rule adding interface" of the rule engine, and is marked as "rule source = model automatic generation" and "creation time = current time"; the rule that fails the test is recorded as "test failure reason (such as rule output and optimal path are inconsistent)" and discarded.
[0085] Through actual context testing, the "actual effective ability" of the candidate rule is verified, so that the rule that is "theoretically qualified but actually invalid" due to the judgment deviation of the adjudication model is avoided from entering the system, and it is ensured that the rule included in the rule engine can really adapt to the business scenario, while realizing the "automatic updating" of the rule and reducing the manual maintenance cost.
[0086] The above-mentioned mode realizes the "self-learning and self-evolution" of the rule engine through the whole-process automatic rule optimization mechanism of "rule generation-multi-model judgment-vote confirmation-testing update", solves the core defects of the traditional rule engine, such as "rule solidification, high manual maintenance cost and inability to adapt to new scenarios", makes the rule engine evolve cooperatively with the multi-model decision, and further improves the adaptability and intelligent level of the whole-process routing system.
[0087] In some embodiments, referring to Figure 4 , Figure 4 is a flowchart of steps S401-S402 provided by the embodiments of the present application, the business rule optimization step further includes a rule version control and rollback sub-step, which can be implemented through steps S402-S402, which will be described in combination with each step.
[0088] In step S401, a unique version number is assigned to each business rule included in the rule engine, and the creation time, applicable business scenario and verification log of the rule are recorded.
[0089] In step S402, when a certain business rule causes a decision error in subsequent process routing, the business rule is disabled or rolled back to the historical effective version of the business rule based on the version number and log information.
[0090] "Unique version number" is a unique identifier assigned to each new rule, which can be in the format of "rule type-creation time-sequence number" (such as "order_route-20240520-001") or a self-incrementing number (such as V1, V2, V3), ensuring that each rule can be uniquely identified; "Creation time" is the specific time when the rule is incorporated into the rule engine (accurate to the second, such as 2024-05-20 14:30:25), used to trace the generation timing of the rule; "Applicable business scenario" describes the business scope of the rule (such as "VIP user small order scenario in e-commerce platform order processing flow"), avoiding the rule being called in inappropriate scenarios; "Verification log" is used to record detailed information of the rule in the "rule judgment" and "routing test" stages, including the participating judge models, judgment results, test context, test results, etc., such as "Judge Model: Model_Judge_1 (accept), Model_Judge_2 (accept); Test Context: Order Amount 1200 Yuan, VIP User; Test Result: Pass"; "Decision error" refers to the path output by the rule being verified as incorrect in subsequent business execution (such as the rule recommending "automatic payment confirmation", but the actual order has risks and needs manual review); "Disable the business rule" is used to mark the problem rule as "invalid", so that it will not be called in subsequent process routing; "Rollback to the historical effective version of the business rule" is used to restore the use of V1 rule if the problem rule is an update of a certain historical rule (such as V2 rule is the optimized version of V1 rule); if the problem rule is a new rule, remove the rule and restore to the state when there is no such rule.
[0091] In the database of the rule engine, a "rule version table" is designed, including the following fields: version number (primary key), rule content (structured "IF-THEN" format), creation time, applicable scenario, verification log, status (valid / invalid), and associated historical version number (e.g., V2 associated with V1); through business feedback or log analysis, rule decision errors are found, for example, a user complaint that a "VIP user's 1800 yuan order was incorrectly diverted to a normal node"; after verification, it is found that the order_route_002 rule does not cover the 1800 yuan scenario (the actual rule condition is 1000-2000 yuan, which should be covered, and if the rule execution logic error causes the jump error, it is determined to be a rule problem); according to the error path, the rule engine call log is queried to determine the rule version number that caused the error (e.g., order_route_002); when disabled, the "status" of order_route_002 in the rule version table is updated to "invalid", and the rule engine will filter this rule in subsequent calls; when rolled back, if the historical rule needs to be restored, the "status" of the associated historical version number (order_route_001) is updated to "valid", and the rule engine is ensured to call the historical valid version first; the reason for the rollback / disable operation, the person performing the operation, and the operation time are recorded, such as "2024-05-26 09:30:00, due to order_route_002 rule execution error, disable the rule and roll back to order_route_001, performed by: system automatically / administrator".
[0092] Through version number, creation time, verification log, and other information, the generation process and historical state of the rule can be quickly traced back, facilitating the troubleshooting of rule errors and solving the problem of "no rule version and no traceability of problems" in traditional rule engines; when a new rule has a problem, it can be quickly restored to a historical valid state through disable or rollback, avoiding the continuous impact of the error rule on the business process and reducing the risk of rule updates; through version management, the iteration history of the rule can be clearly managed, facilitating subsequent optimization of the rule (such as based on historical version modification), rather than generating the rule from scratch each time, improving the efficiency of rule maintenance.
[0093] The above-mentioned method provides a "risk bottom-up" guarantee for "rule automatic optimization" through the rule version management mechanism of "version unique identification-full information recording-error rollback", ensuring that the rule is "traceable, rollbackable, and risk controllable" during automatic updating, solving the defects of "no version management and error cannot be quickly fixed" in traditional rule automatic updating schemes, and further improving the whole process of business rule optimization.
[0094] In some embodiments, referring to Figure 5 , Figure 5is a flowchart of steps S501-S502 provided by the embodiment of the present application, and further includes a full-process log recording and feedback optimization step S501-S502, which will be described in combination with each step.
[0095] In step S501, the input context information of each intelligent routing node, the output result of each reasoning model, the calculation process of each model comprehensive score, the finally determined flow path, the rule rollback triggering condition and the business rule optimization process are recorded.
[0096] The full-process log refers to detailed data recording covering all links of the intelligent routing node decision, including: all decision-related data received by the intelligent routing node, including user request text, business parameters (such as order information, user level), previous flow node results, etc.; output data of the main model and the alternative model, including candidate path identifier, path confidence, model reasoning time consumption, etc.; original values and standardized values of Confidencei, Performancei, Latencyi, Resourcei of each model, weight parameters α, β, γ, δ, calculation steps and results of the comprehensive score; the final jump path determined through the main model priority, multi-model optimization or rule rollback, and the reason for determining the path (such as “the main model confidence 0.85> threshold 0.8, so the main model path is adopted”); if the rule rollback is triggered, the triggering reason (such as “all model scores are less than 60 points” “model path conflict and voting does not reach the threshold”) is recorded, the rule engine output path, and the rule calling time consumption; if the rule optimization is triggered, the conflict path (rule path and model path), candidate rule content, judgment model judgment result, rule test result, rule version information are recorded.
[0097] The log format adopts a structured log format (such as JSON), ensuring that the data is parseable and queryable. A time series database (such as InfluxDB, Prometheus) is used to store log data, supporting queries by time range, node ID, model ID, etc. dimensions; at the same time, a log retention period (such as 3 months) is set to avoid excessive storage resource occupation.
[0098] Through full-process log recording, a “data basis” is provided for subsequent feedback optimization, so that each decision of the system can be traced and analyzed, solving the problem of “decision process black-boxing and no data support optimization” in traditional systems.
[0099] In step S502, based on the log data, the weight parameters of the comprehensive score function, the confidence threshold and the support proportion threshold are dynamically adjusted; at the same time, according to the historical decision success rate of each model, the priority order of the main reasoning model and the alternative reasoning model is adjusted.
[0100] "Feedback optimization" refers to dynamically adjusting the core configuration parameters and model priorities of the system using historical log data to improve subsequent decision-making effectiveness. The weights are adjusted based on the correlation between "model scores and actual decision-making effectiveness" in the log. For example, if the log shows that "models with high Confidencei have high actual decision-making success rates", then the Confidencei weight (a) is increased. If "models with low Latencyi are more favored by the business", then the Latencyi weight (b) is decreased. The threshold is adjusted based on the relationship between "main model confidence and decision-making success rate" in the log. For example, if the log shows that "when the main model confidence is 0.75-0.8, the decision-making success rate is still 90%", then the threshold can be lowered from 0.8 to 0.75, reducing the frequency of multi-model calls. The threshold is adjusted based on the relationship between "voting proportion and decision-making success rate" in the log. For example, if "the path with a proportion of 50% has an actual success rate of 85%", then the threshold can be lowered from 60% to 50%, reducing the frequency of rule fallback. "Historical decision-making success rate" refers to the proportion of models whose "recommended paths are verified as correct" in the log. Models with high success rates have their priorities increased (e.g., from backup models to main models), and models with low success rates have their priorities decreased (e.g., from main models to backup models).
[0101] "Feedback optimization" refers to dynamically adjusting the core configuration parameters and model priorities of the system using historical log data to improve subsequent decision-making effectiveness. The weights are adjusted based on the correlation between "model scores and actual decision-making effectiveness" in the log. For example, if the log shows that "models with high Confidencei have high actual decision-making success rates", then the Confidencei weight (a) is increased. If "models with low Latencyi are more favored by the business", then the Latencyi weight (b) is decreased. The threshold is adjusted based on the relationship between "main model confidence and decision-making success rate" in the log. For example, if the log shows that "when the main model confidence is 0.75-0.8, the decision-making success rate is still 90%", then the threshold can be lowered from 0.8 to 0.75, reducing the frequency of multi-model calls. The threshold is adjusted based on the relationship between "voting proportion and decision-making success rate" in the log. For example, if "the path with a proportion of 50% has an actual success rate of 85%", then the threshold can be lowered from 60% to 50%, reducing the frequency of rule fallback. "Historical decision-making success rate" refers to the proportion of models whose "recommended paths are verified as correct" in the log. Models with high success rates have their priorities increased (e.g., from backup models to main models), and models with low success rates have their priorities decreased (e.g., from main models to backup models).
[0102] By dynamically adjusting core parameters and model priorities, the system can "adapt to business changes" (such as the business scenario changing from "accuracy first" to "efficiency first") and "strengthen the role of high-quality models / parameters", solving the problem of "fixed parameters, unchanged model priorities, and inability to adapt to changes" in traditional systems.
[0103] The above-mentioned method realizes the "continuous self-optimization" of the system through the feedback loop mechanism of "full-process logging-data-driven parameter adjustment-model priority optimization", making the process routing system no longer a "one-time configured static system", but a "self-adaptive system" that can continuously iterate and upgrade based on historical decision data, further improving the flexibility, accuracy, and long-term usability of the system, and solving the core defects of traditional process systems "without feedback mechanism and unable to continuously optimize".
[0104] In some embodiments, the feedback optimization is achieved through a pre-set lightweight meta-model or reinforcement learning strategy, which takes the model decision accuracy, process jump success rate, and resource consumption rate in the log data as optimization objectives, automatically deduces and outputs parameter adjustment schemes, and completes the dynamic optimization of scoring function parameters, thresholds, and model priorities.
[0105] The "lightweight meta-model (Meta-Learner)" is a small machine learning model specifically designed to "learn how to optimize system parameters", with historical log data (such as model indicators, decision results, resource consumption) as input and parameter adjustment schemes (such as adjusting α to 0.4 and threshold to 0.75) as output. "Lightweight" refers to the simple model structure (such as linear regression, decision tree) and low computational resource consumption, allowing real-time operation. The "reinforcement learning strategy" is an algorithm that optimizes through the interaction mechanism of "agent (Agent)-environment (Environment)-reward (Reward)", where "agent" is the module that performs parameter adjustment, "environment" is the process routing system and business scenario, and "reward" is the revenue calculated based on "model decision accuracy, process jump success rate, and resource consumption rate" (such as high accuracy and low resource consumption for high rewards). "Optimization objective" refers to the core indicators that feedback optimization needs to achieve, including: model decision accuracy, process jump success rate, and resource consumption rate. The meta-model or reinforcement learning strategy calculates the optimal parameter adjustment suggestion (such as "α from 0.3 to 0.4, β from 0.2 to 0.15") based on the input log data through its own algorithm logic, without human intervention. The system automatically updates the scoring function parameters, thresholds, and model priority configurations based on the output adjustment scheme and applies them to subsequent process decisions.
[0106] "input features" and "labels" are extracted from historical logs, including Confidencei, Performancei, Latencyi, Resourcei, current weight parameters α, β, γ, δ, and current thresholds. The labels are "whether to adjust parameters and the direction of adjustment" (such as "need to increase α and decrease β"). A decision tree (such as XGBoost, LightGBM) is selected as the meta-model due to its strong interpretability, fast training speed, and suitability for lightweight scenarios. The model is trained using a training set (70% of the log data) and validated using a validation set (30% of the log data). If the prediction accuracy of the model for "parameter adjustment needs" is above 85%, the training is complete. The meta-model periodically extracts the latest log data (such as the past 1 hour of logs) from the log database. The meta-model analyzes the input data and outputs a parameter adjustment scheme, such as "α=0.4, β=0.15, γ=0.2, δ=0.25; confidence threshold=0.75; support ratio threshold=50%; model priority: Intent_Classifier_V2>LLM_Model_V1". The system automatically writes the adjustment scheme into the configuration file, which is loaded by the intelligent routing node decision-making system in the future.
[0107] The reinforcement learning framework is built in the following way: Agent: designed as a parameter adjustment module, which can output different parameter combinations (such as the value range of α is 0.2-0.4, with a step size of 0.05); Environment: simulates the process routing system, inputs the parameter combination output by the agent, and returns "model decision-making accuracy, process jump success rate, and resource consumption rate"; Reward function design: Reward=0.5×accuracy+0.3×jump success rate-0.2×resource consumption rate (weights are set according to business needs), for example, accuracy 90%, jump success rate 95%, resource consumption rate 30%, then Reward=0.5×0.9+0.3×0.95-0.2×0.3=0.45+0.285-0.06=0.675; Reinforcement learning training and optimization: Training process: the agent continuously adjusts the parameter combination through trial and error (such as Q-Learning, PPO algorithm), obtains rewards in the environment, and gradually learns "parameter combinations that can obtain high rewards"; for example, the initial parameter combination has a reward of 0.5, and by adjusting α from 0.3 to 0.4, the reward is increased to 0.675; Real-time optimization: the trained reinforcement learning strategy is deployed to the system, real-time log data (environment feedback) is received, and the parameter combination is dynamically adjusted to ensure that the reward value is continuously maximized; if the reward decreases due to changes in the business scenario (such as a sudden increase in resource consumption rate), the strategy automatically adjusts the parameters (such as reducing gamma and reducing the weight of resource consumption).
[0108] Through the meta-model or reinforcement learning strategy, the "full automation" of parameter adjustment is realized, without the need for manual analysis of logs and modification of configurations, solving the problem of "high labor cost and slow response" in traditional feedback optimization; the meta-model and reinforcement learning strategy can perform fine-grained analysis based on massive log data to find the "optimal parameter combination", avoiding the subjectivity and limitations of manual adjustment and improving the optimization effect; the meta-model is analyzed regularly, and the reinforcement learning interacts in real time to ensure that the system can quickly respond to changes in the business (such as a sudden surge in new scenario orders) and adjust the parameters in a timely manner to adapt to changes, solving the problem of "adjustment lag" in traditional optimization.
[0109] The above-mentioned method provides a specific and efficient implementation means for "feedback optimization" through "lightweight meta-model or reinforcement learning strategy", upgrades feedback optimization from "manual driving" to "algorithm driving", greatly improves the automation, accuracy and real-time performance of optimization, and further enhances the "continuous self-optimization" capability of the system, which is an important improvement in the intelligent level of the process routing system.
[0110] In summary, the embodiments of the present application have the following beneficial effects: (1) Through the three-layer decision logic of "main model priority reasoning - multiple model parallel optimization selection - rule fallback bottoming", the problems of unstable single AI model reasoning, insufficient confidence and poor flexibility of fixed rule engine are effectively solved, the accuracy and robustness of process routing decision are greatly improved, and the reliability of key business node decision is ensured, and the process can still be guaranteed not to be interrupted when multiple models fail.
[0111] (2) The multi-factor comprehensive scoring function that integrates confidence, model historical performance, response delay and resource consumption is introduced, which can dynamically balance the decision effect and running cost, optimize the utilization rate of computing resources while ensuring routing accuracy, and avoid unnecessary resource waste.
[0112] (3) The business rule automatic generation, multi-model review, test update and version control rollback mechanism are designed to realize the self-learning and self-evolution of the rule engine, get rid of the limitations of traditional rules relying on manual maintenance, and make the rules adapt to dynamic and complex business scenario changes.
[0113] (4) Relying on full-process log recording and feedback optimization closed loop based on lightweight meta-model or reinforcement learning, the scoring function parameters, model priority and decision threshold can be dynamically adjusted to promote continuous iteration and upgrading of the system, further enhance the flexibility and adaptability of process routing, and ultimately provide a more efficient, stable and intelligent routing solution for intelligent process orchestration system, which is suitable for complex business process scenarios in multiple fields such as finance, customer service and e-commerce.
[0114] Based on the same inventive concept, this application also provides a process routing device based on a multi-model optimization and rule fallback mechanism, which corresponds to the process routing method based on a multi-model optimization and rule fallback mechanism in the first embodiment. Since the principle of the device in this application is similar to the process routing method based on a multi-model optimization and rule fallback mechanism, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0115] like Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of the process routing device 600 based on a multi-model optimization and rule fallback mechanism provided in this application embodiment. The process routing device 600 based on a multi-model optimization and rule fallback mechanism includes: Configuration module 601 is used to configure nodes with jump judgment functions in intelligent process orchestration as intelligent routing nodes; The generation module 602 is used to analyze the context information of the current input by calling the preset main inference model through the intelligent routing node, and generate the corresponding process recommendation path and the confidence of the path; The comparison module 603 is used to set a confidence threshold, compare the confidence output by the main inference model with the threshold, and if the confidence is higher than the threshold, the recommended path generated by the main model is used to execute the process jump; if the confidence is lower than or equal to the threshold, the multi-model parallel inference step is entered. Module 604 is used to call at least one preset alternative inference model to perform parallel analysis of the current input context information. Each alternative inference model outputs the corresponding candidate path and the confidence level of the candidate path. The calculation module 605 is used to construct a comprehensive scoring function, and calculate the comprehensive score of each model based on the confidence level output by each inference model, the historical performance parameters of the model, the response latency and resource consumption. From the models whose comprehensive scores are higher than the preset minimum standard, the model with the highest comprehensive score is selected, and the corresponding path is used to execute the process jump. The execution module 606 is configured to trigger a rule fallback mechanism, invoke a rule engine, determine a process path according to a preset business rule, and perform a jump if the comprehensive scores of all the models are lower than the preset minimum standard or the candidate paths output by the models conflict and an optimal path cannot be determined by the preset strategy.
[0116] Those skilled in the art should understand that, Figure 6 The implementation functions of the units in the process routing device 600 based on the multi-model optimization and rule fallback mechanism shown can be understood with reference to the foregoing descriptions of the process routing method based on the multi-model optimization and rule fallback mechanism. Figure 6 The functions of the units in the process routing device 600 based on the multi-model optimization and rule fallback mechanism shown can be implemented by programs running on a processor or by specific logic circuits.
[0117] In a possible implementation, the expression of the comprehensive score function is Score i = α • Confidence i + δ • Performance i - β • Latency i - γ • Resource i wherein Score i is the comprehensive score of the i-th model, Confidence i is the confidence of the path output by the i-th model, Performance i is the historical accuracy of the i-th model, Latency i is the response delay of the i-th model, Resource i is the resource consumption of the i-th model, α, β, γ, and δ are preset weight parameters, and α + β + γ + δ = 1.
[0118] In a possible implementation, the judgment process that the candidate paths output by the models conflict and an optimal path cannot be determined by the preset strategy includes: Count the number of model supports obtained by each candidate path, and calculate the support proportion of each candidate path; Set a support proportion threshold, and if the support proportion of a candidate path is higher than the threshold, the candidate path is used to perform a jump; If the support proportions of all the candidate paths are lower than the threshold, it is determined that an optimal path cannot be determined, and the rule fallback mechanism is triggered.
[0119] In a possible implementation, the execution module 606 further includes a business rule optimization step, specifically including: When the process path determined by the rule engine conflicts with the determined optimal path, the reasoning model that determines the optimal path generates a candidate business rule with generalization ability and without conflict with existing rules based on the current input context information, the optimal path, and existing business rules; At least two preset adjudication models are called to judge the logical rationality, context consistency, generalization ability, and rule conflict of the candidate business rule, and each adjudication model outputs a judgment result of "accept" or "reject"; The proportion of the number of models with "accept" judgment results is counted, and if the proportion is higher than a preset confirmation threshold, it is determined that the candidate business rule passes the verification; if the proportion is lower than or equal to the confirmation threshold, the candidate business rule is discarded; For the candidate business rule that passes the verification, the current input context information is used for routing test, and if the test result meets the requirement of the optimal path, the candidate business rule is included in the business rule set of the rule engine; if the test result does not meet the requirement, the candidate business rule is removed.
[0120] In a possible implementation, the execution module 606 further includes a rule version control and rollback sub-step: Each business rule included in the rule engine is assigned a unique version number, and the creation time, applicable business scenario, and verification log of the rule are recorded; When a business rule causes a decision error in subsequent process routing, the business rule is disabled or rolled back to a historical valid version of the business rule based on the version number and log information.
[0121] In a possible implementation, the execution module 606 further includes a full-process log recording and feedback optimization step, specifically including: The input context information of each intelligent routing node, the output result of each reasoning model, the calculation process of the comprehensive score of each model, the finally determined process path, the rule rollback triggering condition, and the business rule optimization process are recorded; Based on the log data, the weight parameters of the comprehensive scoring function, the confidence threshold, and the support proportion threshold are dynamically adjusted; at the same time, according to the historical decision success rate of each model, the priority order of the main reasoning model and the alternative reasoning model is adjusted.
[0122] In a possible implementation, the feedback optimization is realized through a preset lightweight meta-model or reinforcement learning strategy, and the meta-model or reinforcement learning strategy takes the model decision accuracy, process jump success rate, and resource consumption rate in the log data as the optimization target, automatically deduces and outputs a parameter adjustment scheme to complete the dynamic optimization of the scoring function parameters, thresholds, and model priority.
[0123] The process routing device based on the multi-model optimization and rule rollback mechanism has the following beneficial effects: (1) Through the three-layer decision logic of "main model priority reasoning - multi-model parallel optimization - rule fallback", the problems of single AI model reasoning instability, insufficient confidence and poor flexibility of fixed rule engine are effectively solved, greatly improving the accuracy and robustness of process routing decision, ensuring reliable decision at key business nodes and relying on rule engine to ensure uninterrupted process when multiple models fail.
[0124] (2) Introducing a multi-factor comprehensive scoring function that combines confidence, model historical performance, response delay and resource consumption, dynamically balancing decision effectiveness and operating cost, optimizing computing resource utilization while ensuring routing accuracy, and avoiding unnecessary resource waste.
[0125] (3) Designing business rule automatic generation, multi-model review, test update and version control rollback mechanism, realizing self-learning and self-evolution of rule engine, getting rid of the limitations of traditional rule dependence on manual maintenance, and making rules adapt to dynamic and complex business scenario changes.
[0126] (4) Relying on full-process log recording and feedback optimization closed loop based on lightweight meta-model or reinforcement learning, dynamically adjusting scoring function parameters, model priority and decision threshold, promoting continuous iteration and upgrading of the system, further enhancing the flexibility and adaptability of process routing, and ultimately providing a more efficient, stable and intelligent routing solution for intelligent process orchestration systems, suitable for complex business process scenarios in finance, customer service, e-commerce and other fields.
[0127] As shown in Figure 7 , a schematic diagram of the composition structure of an electronic device 700 provided by the embodiments of the present application is shown. The electronic device 700 comprises: Figure 7 a processor 701, a storage medium 702, and a bus 703. The storage medium 702 stores machine-readable instructions executable by the processor 701. When the electronic device 700 is running, the processor 701 and the storage medium 702 communicate through the bus 703. The processor 701 executes the machine-readable instructions to perform the steps of the process routing method based on the multi-model optimization and rule fallback mechanism described in the embodiments of the present application. In actual application, each component in the electronic device 700 is coupled together through the bus 703. It can be understood that the bus 703 is used to realize the connection and communication between the components. The bus 703 includes not only a data bus, but also a power bus, a control bus and a state signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as bus 703 in the
[0128] . Figure 7 The above electronic device has the following beneficial effects:
[0129] (1) Through the three-layer decision logic of "main model priority reasoning-multi-model parallel optimization-rule fallback bottom-up", the problems of single AI model reasoning instability, insufficient confidence and poor flexibility of fixed rule engine are effectively solved, the accuracy and robustness of process routing decision are greatly improved, and the key business node decision is reliable and the process can still be guaranteed not to be interrupted when multiple models fail.
[0130] (2) The multi-factor comprehensive scoring function is introduced, which fuses confidence, model historical performance, response delay and resource consumption, which can dynamically balance the decision effect and operation cost, optimize the utilization rate of computing resources while ensuring routing accuracy, and avoid unnecessary resource waste.
[0131] (3) The business rule automatic generation, multi-model review, test update and version control rollback mechanism are designed to realize the self-learning and self-evolution of the rule engine, get rid of the limitations of traditional rules relying on manual maintenance, and make the rules adapt to dynamic and complex business scenario changes.
[0132] (4) Relying on the whole process log recording and feedback optimization closed loop based on lightweight meta-model or reinforcement learning, the scoring function parameters, model priority and decision threshold can be dynamically adjusted to promote the continuous iteration and upgrading of the system, further enhance the flexibility and adaptive ability of process routing, and finally provide a more efficient, stable and intelligent routing solution for intelligent process orchestration system, which is suitable for complex business process scenarios in finance, customer service, e-commerce and other fields.
[0133] The embodiment of the application also provides a computer readable storage medium, the storage medium stores executable instructions, when the executable instructions are executed by at least one processor 701, the process routing method based on the multi-model optimization and rule fallback mechanism is realized.
[0134] In some embodiments, the storage medium can be a ferromagnetic random access memory (FRAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface storage, an optical disc, a compact disc read-only memory (CD-ROM), or the like; or can be various devices including one or any combination of the above storage mediums.
[0135] In some embodiments, the executable instructions can be in the form of programs, software, modules, scripts, or code, written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0136] By way of example, the executable instructions can or can not correspond to a file in a file system, can be stored in a part of a file that holds other programs or data, for example, one or more scripts stored in a hypertext markup language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files, for example, files that store one or more modules, sub programs, or code portions.
[0137] By way of example, the executable instructions can be deployed to be executed on one computer, or on multiple computers located at one site, or distributed across multiple sites and interconnected by a communication network.
[0138] The computer-readable storage medium described above has the following beneficial effects: (1) Through the three-layer decision logic of "main model priority reasoning - multi-model parallel optimization - rule fallback bottoming", the problems of single AI model reasoning instability, insufficient confidence and poor flexibility of fixed rule engine are effectively solved, the accuracy and robustness of process routing decision are greatly improved, and the key business node decision is reliable and the process can still be guaranteed not to be interrupted when multiple models fail.
[0139] (2) A multi-factor comprehensive scoring function is introduced, which integrates confidence, model historical performance, response delay and resource consumption, which can dynamically balance decision effect and operation cost, optimize computing resource utilization rate while ensuring routing accuracy, and avoid unnecessary resource waste.
[0140] (3) The business rule automatic generation, multi-model review, test update and version control rollback mechanism are designed to realize the self-learning and self-evolution of the rule engine, get rid of the limitations of traditional rules relying on manual maintenance, and make the rules adapt to dynamic and complex business scenario changes.
[0141] (4) Relying on the full-process log recording and feedback optimization closed loop based on lightweight meta-model or reinforcement learning, the scoring function parameters, model priority and decision threshold can be dynamically adjusted to promote the continuous iteration and upgrading of the system, further enhance the flexibility and self-adaptability of the process routing, and ultimately provide a more efficient, stable and intelligent routing solution for the intelligent process orchestration system, which is suitable for complex business process scenarios in fields such as finance, customer service and e-commerce.
[0142] In several embodiments provided in the present application, it should be understood that the disclosed methods and electronic devices can be implemented in other ways. The device embodiments described above are only illustrative, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed components can be through some interface, indirect coupling or communication connection of the device or unit, which can be electrical, mechanical or other forms.
[0143] The modules described as separate components can or can not be physically separated, and the components shown as modules can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0144] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.
[0145] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a nonvolatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a platform server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various media that can store program codes.
[0146] The above is merely specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A process routing method based on multi-model optimization and rule fallback mechanism, characterized in that, The method includes: Configure nodes with jump detection functions in intelligent process orchestration as intelligent routing nodes; The intelligent routing node calls the preset main inference model to analyze the context information of the current input, and generates the corresponding process recommendation path and the confidence level of the path. Set a confidence threshold, compare the confidence score output by the main inference model with the threshold. If the confidence score is higher than the threshold, the recommended path generated by the main model is used to jump to the execution flow; if the confidence score is lower than or equal to the threshold, the multi-model parallel inference step is entered. Invoke at least one preset alternative reasoning model to analyze the current input context information in parallel. Each alternative reasoning model outputs the corresponding candidate path and the confidence level of the candidate path. A comprehensive scoring function is constructed. Based on the confidence level, historical performance parameters, response latency, and resource consumption of each inference model, the comprehensive score of each model is calculated using the comprehensive scoring function. From the models whose comprehensive scores are higher than the preset minimum standard, the model with the highest comprehensive score is selected, and the corresponding path is used to execute the process jump. If the overall score of all models is lower than the preset minimum standard, or if the candidate paths output by each model conflict and the optimal path cannot be determined by the preset strategy, then the rule rollback mechanism is triggered, the rule engine is called, the process path is determined according to the preset business rules, and the jump is executed.
2. The method according to claim 1, characterized in that, The expression for the comprehensive scoring function is: Score i =α•Confidence i +δ•Performance i -β•Latency i -γ•Resource i Among them, Score i Confidence is the overall score of the i-th model. i Performance is the confidence score of the i-th model output path. i Let Latency be the historical accuracy of the i-th model. i For the response latency of the i-th model, Resource i Let be the resource consumption of the i-th model, and let α, β, γ, and δ be preset weight parameters, and α+β+γ+δ=1.
3. The method according to claim 1, characterized in that, The process for determining whether the candidate paths output by each model conflict and the optimal path cannot be determined by a preset strategy includes: Count the number of model support votes obtained for each candidate path, and calculate the percentage of support votes for each candidate path. Set a support percentage threshold. If the support percentage of a candidate path is higher than the threshold, then the candidate path will be used to perform the jump. If the percentage of votes for all candidate paths is lower than the threshold, it is determined that the optimal path cannot be determined, and the rule rollback mechanism is triggered.
4. The method according to claim 1, characterized in that, It also includes business rule optimization steps, specifically including: When the process path determined by the rule engine conflicts with the determined optimal path, the reasoning model that determined the optimal path generates a candidate business rule with generalization ability that does not conflict with the existing rules based on the current input context information, the optimal path and existing business rules. At least two preset referee models are invoked to evaluate the logical rationality, contextual consistency, generalization ability, and rule conflict of the candidate business rules. Each referee model outputs a "receive" or "reject" judgment result. The percentage of models that "accept" the evaluation result is counted. If the percentage is higher than the preset confirmation threshold, the candidate business rule is determined to have passed the verification; if the percentage is lower than or equal to the confirmation threshold, the candidate business rule is discarded. For candidate business rules that pass the verification, a routing test is performed using the current input context information. If the test result meets the optimal path requirements, the candidate business rule is included in the business rule set of the rule engine; if the test result does not meet the requirements, the candidate business rule is removed.
5. The method according to claim 4, characterized in that, The business rule optimization steps also include rule version control and rollback steps: Assign a unique version number to each business rule incorporated into the rule engine, and record the rule's creation time, applicable business scenarios, and verification logs; When a business rule causes a decision error in subsequent process routing, the business rule is disabled or rolled back to a previously valid version based on the version number and log information.
6. The method according to claim 1, characterized in that, It also includes full-process logging and feedback optimization steps, specifically including: Record the input context information of each intelligent routing node, the output results of each inference model, the calculation process of the comprehensive score of each model, the final determined process path, the rule rollback triggering situation, and the business rule optimization process; Based on the log data, the weight parameters, confidence threshold, and support percentage threshold of the comprehensive scoring function are dynamically adjusted; at the same time, the priority ranking of the main inference model and the alternative inference models is adjusted according to the historical decision success rate of each model.
7. The method according to claim 6, characterized in that, The feedback optimization is achieved through a preset lightweight meta-model or reinforcement learning strategy. The meta-model or reinforcement learning strategy takes the model decision accuracy, process jump success rate and resource consumption rate in the log data as optimization targets, automatically infers and outputs parameter adjustment schemes, and completes the dynamic optimization of scoring function parameters, thresholds and model priorities.
8. A process routing device based on multi-model optimization and rule fallback mechanism, characterized in that, The device includes: The configuration module is used to configure nodes with jump detection functions in intelligent process orchestration as intelligent routing nodes; The generation module is used to analyze the context information of the current input by calling the preset main inference model through the intelligent routing node, and generate the corresponding process recommendation path and the confidence of the path; The comparison module is used to set a confidence threshold and compare the confidence level output by the main inference model with the threshold. If the confidence level is higher than the threshold, the recommended path generated by the main model is used to jump to the execution flow; if the confidence level is lower than or equal to the threshold, the multi-model parallel inference step is entered. The calling module is used to call at least one preset alternative inference model to analyze the current input context information in parallel. Each alternative inference model outputs the corresponding candidate path and the confidence level of the candidate path. The calculation module is used to construct a comprehensive scoring function. Based on the confidence level output by each inference model, the model's historical performance parameters, response latency, and resource consumption, the comprehensive scoring function is used to calculate the comprehensive score of each model. From the models whose comprehensive scores are higher than the preset minimum standard, the model with the highest comprehensive score is selected, and the corresponding path is used to execute the process jump. The execution module is used to trigger a rule rollback mechanism if the overall score of all models is lower than the preset minimum standard, or if the candidate paths output by each model conflict and the optimal path cannot be determined by the preset strategy. In this case, the rule engine is called to determine the process path and execute the jump according to the preset business rules.
9. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the process routing method based on a multi-model optimization and rule fallback mechanism as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, performs the process routing method based on a multi-model optimization and rule fallback mechanism as described in any one of claims 1 to 7.
