Multi-model node unified access dynamic adaptation method, system, device and medium
Patent Information
- Application Number
- CN202611188627.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-09-08
AI Technical Summary
[0003]本申请提供了一种多模型节点统一接入动态适配方法、系统、设备以及介质,用于解决传统方案中导致模型上线的开发周期较长,且缺乏灵活性的技术问题
[0014]In one of the solutions provided in this application, model configuration information, including interface, parameter, and exception fallback definitions, is acquired, stored, and synchronized in real time. In response to model selection commands, corresponding parameter configurations are extracted, and a unified parameter configuration interface is dynamically generated for different control types. During content generation, an interface scheduling module constructs messages based on the request body template and continuously monitors the call status to automatically route to a backup model when circuit breaker conditions are triggered. By utilizing standardized configuration parsing, dynamic UI component mapping, and unified scheduling and exception circuit breaking, the underlying capabilities of the model are decoupled from the front-end interactive interface. This significantly shortens the development cycle for accessing and expanding new model types, achieves high consistency in visual interface and operational interaction across multiple model nodes, and effectively avoids business interruptions caused by single model interface failures or network congestion. It significantly improves the expansion efficiency of the multi-model ecosystem of the artificial intelligence platform and the overall service availability, solving the problems of long development cycles and lack of flexibility in model deployment.
Smart Images

Figure CN122711201A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology and provides a method, system, device, and medium for unified access and dynamic adaptation of multiple model nodes. Background Technology
[0002] In the field of AI-powered content creation platforms, to meet the diverse content creation needs of users, these platforms typically need to integrate multiple types of generative AI models, such as text generation models, image generation models, and video generation models. Existing multi-model integration methods usually rely on customized development for each specific model. In this model, whenever the platform needs to add a new AI model, developers must separately develop corresponding node components, configure the interactive interface for node parameters, and define the model's unique interface call logic. This customized integration approach results in a long development cycle for model deployment and a lack of flexibility. When the platform needs to quickly adapt and deploy emerging, higher-performance AI models to enhance its capabilities, the high development costs and low scalability often make it difficult to meet the rapidly iterating business needs, thus restricting the service capabilities and scalability of AI-powered content creation platforms. Summary of the Invention
[0003] This application provides a method, system, device, and medium for unified access and dynamic adaptation of multiple model nodes, which solves the technical problems of long development cycles and lack of flexibility in traditional solutions.
[0004] To solve the above problems, the following technical solution is provided: A method for unified access and dynamic adaptation of multiple model nodes, the method comprising: Obtain the model configuration information of the artificial intelligence model to be connected. The model configuration information includes interface configuration information, parameter configuration information, and fallback configuration for exceptions. The fallback configuration for exceptions includes circuit breaker conditions and backup model identifiers. The model configuration information is stored in the model configuration library and synchronized to the front-end business canvas and interface scheduling module. In response to the model selection instruction for the functional node in the front-end business canvas, the artificial intelligence model selected by the model selection instruction is determined as the target artificial intelligence model, and the parameter configuration information corresponding to the target artificial intelligence model is extracted from the model configuration library; For each parameter defined in the parameter configuration information, the input control is matched according to the corresponding control type to generate the parameter configuration interface of the function node; In response to the content generation request, the parameter values input through the parameter configuration interface are obtained, and the interface scheduling module fills the parameter values into the request body template contained in the interface configuration information, constructs a request message, and sends it to the target artificial intelligence model; Monitor the invocation status of the target artificial intelligence model, and when the invocation status meets the circuit breaker condition, route the content generation request to the backup model corresponding to the backup model identifier.
[0005] In one implementation, the parameter configuration information includes parameter name, control type, default value, optional range, and visibility identifier; For each parameter defined in the parameter configuration information, the step of matching input controls according to the corresponding control type to generate the parameter configuration interface of the function node includes: The parameter configuration information is filtered based on the visibility identifier to extract the set of target parameters visible to the user; For each parameter in the target parameter set, the corresponding input control is rendered according to the corresponding control type. Based on the default value and the optional range, the input control is filled with default display data and configured with interactive boundaries to complete the rendering of the parameter configuration interface.
[0006] In one implementation, the interface configuration information includes the interface address, authentication method, and request body template; The step of having the interface scheduling module fill the parameter values into the request body template included in the interface configuration information, construct a request message, and send it to the target artificial intelligence model includes: Extract the parameter placeholders from the request body template, and map and fill the parameter values into the positions corresponding to the parameter placeholders; According to the authentication method, add the corresponding credential information to the request header, generate the request message that conforms to the target artificial intelligence model interface protocol, and send the request message to the interface address.
[0007] In one implementation, the interface configuration information further includes a timeout threshold, a maximum number of retries, and a flow control threshold. The construction request message is sent to the target artificial intelligence model, including: Based on the aforementioned flow control threshold, flow limiting control is applied to the frequency of requests sent to the target artificial intelligence model. If, after sending the request message, no response data is received for a duration that reaches the timeout threshold, the current request is determined to have timed out. If the current request times out or an error response is received from the server, and the current number of retries for the request message has not reached the maximum number of retries, then the request message is resent.
[0008] In one implementation, after routing the content generation request to the backup model corresponding to the backup model identifier, the method further includes: Initiate a circuit breaker lockout period, and during the circuit breaker lockout period, route all content generation requests for the target artificial intelligence model to the backup model; After the circuit breaker lockout period ends, the service health status of the target artificial intelligence model is detected; If the service health status indicator is normal, then according to the automatic switchback rule in the anomaly fallback configuration, subsequent content generation requests will be rerouted to the target artificial intelligence model.
[0009] In one implementation, the model configuration information further includes response processing rules, which include the generation result extraction path and error code mapping relationship; After the interface scheduling module fills the parameter values into the request body template included in the interface configuration information, constructs the request message, and sends it to the target artificial intelligence model, the method further includes: Receive response data returned by the target artificial intelligence model; If the response data is a successful response, the content download link is parsed from the response data based on the generated result extraction path; If the response data is an error response, the original error code in the error response is converted into the corresponding prompt information based on the error code mapping relationship and then output.
[0010] In one implementation, synchronizing the model configuration information to the front-end business canvas and interface scheduling module includes: Configuration change notifications are sent to the front-end business canvas and the interface scheduling module respectively through a publish-subscribe mechanism. In response to the configuration change notification, the front-end business canvas and the interface scheduling module are triggered to read the model configuration information from the model configuration library and update the configuration, so as to complete the synchronization of the model configuration information to the front-end business canvas and the interface scheduling module.
[0011] A multi-model node unified access dynamic adaptation system, the system comprising: The model access module is used to obtain the model configuration information of the artificial intelligence model to be accessed, store the model configuration information in the model configuration library, and synchronize the model configuration information to the front-end business canvas and interface scheduling module; the model configuration information includes interface configuration information, parameter configuration information, and exception fallback configuration, and the exception fallback configuration includes circuit breaker conditions and backup model identifier; The model configuration library is used to store the model configuration information; The node rendering module is used to respond to the model selection instruction for the functional node in the front-end business canvas, determine the selected artificial intelligence model as the target artificial intelligence model, extract the parameter configuration information corresponding to the target artificial intelligence model from the model configuration library, and match the input control according to the corresponding control type for each parameter defined in the parameter configuration information to generate the parameter configuration interface of the functional node. The interface scheduling module is used to respond to the content generation request by filling the parameter values input through the parameter configuration interface into the request body template contained in the interface configuration information to construct a request message and sending it to the target artificial intelligence model. An exception handling module is used to monitor the calling status of the target artificial intelligence model, and when the calling status meets the circuit breaker condition, to route the content generation request to the backup model corresponding to the backup model identifier.
[0012] A terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to perform the steps of the method described above.
[0013] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the above-described method.
[0014] In one of the solutions provided in this application, model configuration information, including interface, parameter, and exception fallback definitions, is acquired, stored, and synchronized in real time. In response to model selection commands, corresponding parameter configurations are extracted, and a unified parameter configuration interface is dynamically generated for different control types. During content generation, an interface scheduling module constructs messages based on the request body template and continuously monitors the call status to automatically route to a backup model when circuit breaker conditions are triggered. By utilizing standardized configuration parsing, dynamic UI component mapping, and unified scheduling and exception circuit breaking, the underlying capabilities of the model are decoupled from the front-end interactive interface. This significantly shortens the development cycle for accessing and expanding new model types, achieves high consistency in visual interface and operational interaction across multiple model nodes, and effectively avoids business interruptions caused by single model interface failures or network congestion. It significantly improves the expansion efficiency of the multi-model ecosystem of the artificial intelligence platform and the overall service availability, solving the problems of long development cycles and lack of flexibility in model deployment. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating a method for unified access and dynamic adaptation of multiple model nodes in one embodiment of this application; Figure 2 This is a schematic diagram of a multi-model node unified access dynamic adaptation system according to one embodiment of this application; Figure 3 This is a schematic diagram of the structure of a terminal device according to one embodiment of this application. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0018] In one embodiment, such as Figure 1 As shown, a method for unified access and dynamic adaptation of multiple model nodes is provided, which includes the following steps: S101. Obtain the model configuration information of the artificial intelligence model to be connected. The model configuration information includes interface configuration information, parameter configuration information, and fallback configuration. Among them, the fallback configuration includes circuit breaker conditions and backup model identifier. S102. Store the model configuration information in the model configuration library and synchronize the model configuration information to the front-end business canvas and interface scheduling module. S103. In response to the model selection instruction for the functional node in the front-end business canvas, the artificial intelligence model selected by the model selection instruction is determined as the target artificial intelligence model, and the parameter configuration information corresponding to the target artificial intelligence model is extracted from the model configuration library. S104. For each parameter defined in the parameter configuration information, match the input control according to the corresponding control type to generate the parameter configuration interface of the function node. S105. In response to the content generation request, obtain the parameter values input through the parameter configuration interface, and have the interface scheduling module fill the parameter values into the request body template contained in the interface configuration information, construct the request message and send it to the target artificial intelligence model. S106. Monitor the calling status of the target artificial intelligence model, and when the calling status meets the circuit breaker condition, route the content generation request to the backup model corresponding to the backup model identifier.
[0019] In AI-powered content creation platforms, integrating various generative models often faces compatibility challenges due to differing interface protocols and inconsistent parameters. To achieve rapid model deployment and unified management, the system introduces a standardized model integration and parsing mechanism. First, it obtains the model configuration information of the AI model to be integrated. This configuration information refers to a file defined using a standardized protocol (such as JSON format), comprehensively describing the physical attributes and calling logic of a new model. Regarding the acquisition method, operators do not need to develop customized code; they only need to fill out a form in the system's model operation management backend or directly upload the standardized configuration file. Specifically, the model configuration information mainly includes three core modules: First, interface configuration information, which defines the underlying communication requirements of the model provider, such as the interface request address, request method, authentication method, and request body template; second, parameter configuration information, which records all parameter metadata supported by the model, covering parameter name, parameter type, optional range, default value, and whether it is visible to the user; and third, exception fallback configuration, which is used to formulate disaster recovery strategies, specifying the backup model identifier (i.e., the alternative model ID used to take over traffic when the main model is unavailable) and circuit breaker conditions. As an example, the circuit breaker conditions can be set as specific exception triggering rules such as three consecutive requests returning server errors, consecutive timeout rates exceeding a preset threshold, or returning a quota exhaustion flag. In addition, this configuration information preferably also includes basic identity information (such as whether the model type is text-to-image or text-generated) and response processing rules.
[0020] After parsing and validating the configuration file, the system persistently stores the model configuration information in the backend model configuration repository. Simultaneously, the system uses an internal message publishing mechanism to synchronize the model configuration information to the frontend business canvas and interface scheduling module in real time. This real-time synchronization mechanism ensures that the frontend interface and backend scheduling engine can dynamically detect and load new models without restarting the service. Preferably, during the synchronization process, the system supports version management of model configurations, allowing for canary release verification for specified tenants or user groups, followed by a full release after stable operation.
[0021] When a user creates content and establishes a multimodal processing flow on the front-end business canvas, the user triggers a model selection command in the drop-down menu of a specific functional node (such as an image generation node or a voice-over node). In response to this command, the system identifies the selected AI model as the target AI model for the current task. Subsequently, the system dynamically extracts and loads the parameter configuration information specific to the target AI model from the model configuration library, using this as the data benchmark for subsequent interface redrawing.
[0022] After obtaining the specific parameter specifications, the system enters the dynamic adaptive reconstruction phase of the front-end UI. For each parameter defined in the parameter configuration information, the system matches the corresponding input control according to its preset control type, thereby dynamically generating the parameter configuration interface for the functional nodes on the canvas. Control type refers to the specific UI component form used by the front-end page to receive user interaction, such as a number slider, dropdown selection box, toggle button, or text input box. The system automatically hides complex parameters that are set to be invisible to the user based on the configuration, exposing only the core adjustable configuration items, and automatically filling in default values and validation rules. This mechanism ensures that regardless of the vendor or model, a completely unified operation and interaction logic is presented after integration with the platform, reducing the learning cost for users switching between different models.
[0023] When a user completes the interface configuration and triggers the generation operation, the system responds to the content generation request by collecting the various parameter values entered by the user through the parameter configuration interface in real time. At this time, the backend interface scheduling module extracts the interface configuration information corresponding to the model and automatically fills the collected parameter values into the corresponding fields of the preset request body template according to the mapping relationship. Simultaneously, the scheduling module automatically encapsulates the necessary request headers and authentication tokens, constructs a standardized request message that meets the requirements of the target vendor, and sends it to the server endpoint of the target artificial intelligence model via the public network or dedicated line. This process effectively shields the heterogeneous differences at the API protocol level between different large language models or multimodal generation models.
[0024] During request sending and model inference, the system continuously monitors the call status of the target AI model (such as network latency, HTTP status codes, and concurrency throttling). Once the call status meets the preset circuit breaker conditions (e.g., a supplier interface outage causing continuous request failures), the system generates requests for all content currently in progress and during the circuit breaker lockout period, automatically and transparently routing them to the backup model corresponding to the backup model identifier pointed to in the exception fallback configuration for processing. Throughout this process, the execution status of nodes on the front-end canvas is seamlessly integrated, and the user is completely unaware of it at both the visual and operational levels, thus ensuring the continuous operation of the business process.
[0025] As can be seen, in this embodiment, by acquiring and storing model configuration information, including interface, parameter, and exception fallback definitions, and synchronizing it in real time, the corresponding parameter configuration is extracted in response to the model selection command. A unified parameter configuration interface is dynamically generated for different control types. During content generation, the interface scheduling module constructs messages based on the request body template and continuously monitors the call status to automatically route to the backup model when the circuit breaker condition is triggered. By using standardized configuration parsing, dynamic mapping of UI components, and unified scheduling and exception circuit breaker algorithms, the underlying capabilities of the model and the front-end interactive interface are decoupled. This significantly shortens the development cycle for the access and expansion of new types of models, achieves a high degree of consistency in visual interface and operation interaction among multi-source model nodes, and effectively avoids business interruptions caused by single model interface failure or network congestion. This significantly improves the expansion efficiency of the multi-model ecosystem of the artificial intelligence platform and the availability of the overall service.
[0026] In one embodiment, the parameter configuration information includes parameter name, control type, default value, optional range, and visibility identifier; for each parameter defined in the parameter configuration information, the input control is matched according to the corresponding control type to generate the parameter configuration interface of the function node, specifically including the following steps: S201. Filter parameter configuration information based on visibility identifiers and extract the set of target parameters that are visible to the user. S202. For each parameter in the target parameter set, render the corresponding input control according to the corresponding control type, and fill the input control with default display data and configure interactive boundaries based on the default value and optional range to complete the rendering of the parameter configuration interface.
[0027] After obtaining the parameter configuration information corresponding to the target AI model, the system enters the dynamic adaptive reconstruction phase of the front-end user interface. During this process, the parameter configuration information predefines all parameter metadata that the model can call, specifically covering parameter names, control types used to guide the rendering of front-end components, default values used for interface initialization, selectable ranges that limit user input, and visibility identifiers used for access control.
[0028] During interface generation, some underlying AI models contain a large number of complex debug-level parameters or system-level configurations, which are not suitable for direct exposure to non-technical users on the front end. Therefore, the system iterates through and filters the overall parameter configuration information by reading the visibility identifier of each parameter. The system automatically masks or hides underlying parameters configured to be invisible to the user, retaining only the core configuration items required for business operations, thereby accurately extracting the set of target parameters visible to the user.
[0029] Next, for each parameter in the extracted target parameter set, its corresponding control type is parsed, and the corresponding input control is rendered in the canvas's function node panel. As an example, if the control type is defined as a dropdown list, the system renders a dropdown list containing multiple preset texts; if defined as a number slider, switch button, or text input box, the system renders a slider component, Boolean switch, or character input box accordingly. After the input control is rendered, the system automatically reads the preset default values and uses them as the default display data to populate the corresponding input control; simultaneously, the system configures interactive boundaries for each input control based on the selectable range. These interactive boundaries provide real-time parameter validation during user operation, ensuring that the user's input values or options are strictly limited to the range supported by the model. When the model configuration is updated, the front-end canvas can automatically update the parameter configuration interface synchronously, allowing users to perceive and use the updated model capabilities without refreshing the page.
[0030] In this embodiment, the target parameter set is extracted by filtering parameter configuration information based on visibility identifiers, and input controls are rendered for each parameter according to control type. At the same time, the display data is filled in with default values and optional ranges and interactive boundaries are configured. The complex underlying model parameters are transformed into standardized and secure front-end interactive components, which shields the complexity of underlying parameters between different models, reduces the learning threshold for users to configure node parameters, and ensures that the layout and interaction logic of the node parameter configuration interface remain highly consistent when switching between different models. This improves the user's operational efficiency and experience consistency in the multimodal creation process.
[0031] In one embodiment, the interface scheduling module fills the parameter values into the request body template included in the interface configuration information, constructs a request message, and sends it to the target artificial intelligence model. Specifically, this includes the following steps: The interface configuration information includes the interface address, authentication method, and request body template; S301. Extract the parameter placeholders from the request body template and map the parameter values to the positions corresponding to the parameter placeholders. S302. Add the corresponding credential information to the request header according to the authentication method, generate a request message that conforms to the target artificial intelligence model interface protocol, and send the request message to the interface address.
[0032] After the user completes the front-end parameter configuration and triggers the content generation operation, the system needs to establish communication with the back-end model service and issue calculation instructions. Since different model providers typically have different underlying communication requirements, the system uses preset interface configuration information to guide the specific communication process. Specifically, this interface configuration information includes the interface address indicating the network access endpoint of the model service, the authentication method specifying the security verification mechanism, and the request body template defining the data interaction structure format.
[0033] When constructing request data, the system first executes step S301. The interface scheduling module parses the request body template and extracts the reserved parameter placeholders. The system obtains the various parameter values configured by the user in the front-end interface and automatically maps and fills these actual business data into the corresponding positions of the parameter placeholders according to the field mapping relationship. As an example, during or after filling the parameter values into the request body template, the system will also perform a secondary validation of the parameters to ensure that the format and value range of the filled data strictly conform to the definition requirements of the underlying interface of the target artificial intelligence model, avoiding request failure due to incorrect parameter format.
[0034] After assembling the business data payload, the system performs protocol encapsulation and data transmission. To pass the model vendor's server-side security verification, the system reads and automatically adds corresponding credential information to the request header of the network request according to the authentication method specified in the interface configuration information. This credential information can specifically be an application key (API Key), a dynamic access token (Token), or other securely signed encrypted data. After the above template rendering and secure encapsulation processing, the system generates a request message that conforms to the target AI model's interface protocol in terms of structure, field arrangement, and security verification. Finally, the request message is directed to the target model's interface address, thereby triggering the model server's inference calculation process. In practical multimodal content creation applications, based on this unified request assembly mechanism, the system can well adapt to the access scenarios of multiple vendors' models with the same capabilities. For example, for the same type of image-to-image or text-to-video capability, models from multiple different vendors can be uniformly encapsulated into the same functional node. Users can freely switch between them on the front end, and the system automatically applies their respective template assembly protocols on the back end without changing any node links.
[0035] In this embodiment, by extracting parameter placeholders from the request body template and mapping and filling parameter values, and dynamically adding credential information to the request header according to the authentication method to generate and send a request message that conforms to the interface protocol, the non-standardized front-end interaction data is converted into standardized underlying network communication data by using a data template rendering mechanism and standardized protocol encapsulation technology. This effectively shields the heterogeneous protocol differences between different artificial intelligence model vendors at the network call layer, ensuring that business parameters can be accurately and securely converted into inference instructions that the target model can recognize, and improving the compatibility and assembly efficiency of the multi-model platform in the interface call process.
[0036] In one embodiment, the interface configuration information further includes a timeout threshold, a maximum number of retries, and a flow control threshold; constructing a request message and sending it to the target artificial intelligence model specifically includes the following steps: S401. Based on the flow control threshold, the frequency of request messages sent to the target artificial intelligence model is subject to flow limiting control. S402. If, after sending a request message, no response data is received for a period of time that reaches the timeout threshold, the current request is determined to have timed out. S403. If the current request times out or an error response is received from the server, and the current number of retries for the request message has not reached the maximum number of retries, then resend the request message.
[0037] When sending the constructed request message to the target AI model, considering that external model vendor interfaces typically face network latency, service jitter, and concurrency limitations, the system needs a standardized interface scheduling and protection strategy. At this point, the pre-configured interface configuration information also includes parameters for controlling network communication rhythm and retry logic, specifically covering timeout thresholds, maximum number of retries, and flow control thresholds. The flow control threshold characterizes the maximum number of requests allowed to be sent to the external interface per unit time; as an example, it can correspond to the QPS (queries per second) limit parameter configured in the model configuration.
[0038] During the request sending phase, the system executes step S401, where the unified interface scheduling module limits the frequency of request messages sent to the target AI model based on flow control thresholds. By controlling the number of concurrently sent request messages, the system ensures that the call frequency does not exceed the load limit allowed by the external model vendor, thereby avoiding triggering the vendor interface's rate limiting protection mechanism due to excessive concurrency.
[0039] Subsequently, after the request message is sent, the system synchronously initiates a timeout control mechanism. The system will wait for a preset timeout threshold. If the duration of no response data received reaches the timeout threshold, the system will determine that the current request has timed out and automatically terminate the invalid request wait.
[0040] To address request failures caused by network fluctuations or server instability, the system initiates an automatic retry mechanism. When the system determines that the current request has timed out, or receives a server-side error response from the model provider's interface (such as service unavailability or other backend exceptions), the system checks the current number of retries for the request packet. If this number of retries has not reached the configured maximum number of retries, the system will automatically resend the request packet. This retry mechanism addresses exceptions other than parameter validation failures and provides fault tolerance for occasional network packet loss or short-term service anomalies.
[0041] In this embodiment, by configuring timeout thresholds, maximum retry counts, and flow control thresholds in the interface configuration information, and by performing frequency limiting based on the flow control thresholds when sending request packets, combined with a timeout determination mechanism and retransmission actions for timeout or error responses within the limit, the concurrent flow control algorithm intercepts overloaded requests. Furthermore, by filtering occasional network and service anomalies through time threshold determination and cyclic retry logic, the success rate and robustness of the platform's calls to external artificial intelligence model interfaces are improved. This reduces the probability of node execution failures caused by third-party interface flow limiting or occasional network fluctuations, and enhances the operational stability of multimodal generation services in complex network environments.
[0042] In one embodiment, after routing the content generation request to the alternate model corresponding to the alternate model identifier, the method further includes the following steps: S501. Initiate the circuit breaker locking period, and during the circuit breaker locking period, route all content generation requests for the target artificial intelligence model to the backup model. S502. After the circuit breaker lockout period ends, check the service health status of the target artificial intelligence model; S503. If the service health status is normal, then according to the automatic switchback rules in the fallback configuration, subsequent content generation requests will be rerouted to the target AI model.
[0043] After the system detects an anomaly in the model interface and triggers the master-slave switchover logic, in order to avoid the system initiating high-frequency invalid retries when the master model service is extremely unstable, which could lead to excessive consumption of system resources or cascading failures, the system introduces a time window isolation and state self-healing mechanism.
[0044] The circuit breaker lockout period refers to a preset time window used for service isolation protection. As an example, the duration of this period can be configured to be 5 minutes. During the circuit breaker lockout period, the system will intercept and redirect traffic at the gateway layer of the interface scheduling module, forcibly routing all new content generation requests for the target AI model to the backup model for processing. At the same time, the system automatically updates the default selected model of the corresponding functional node in the front-end business canvas to the backup model, so that the front-end business flow and underlying model inference are smoothly taken over by the backup model during this period. Users do not need to be aware of the failure switching of the underlying model at the operation level, ensuring the continuity of the content creation process.
[0045] Once the protective circuit breaker lockout period ends, the system automatically initiates a liveness probe on the original master model to detect the service health status of the target AI model. This service health status is used to quantitatively characterize the current service availability level of the target model. Specifically, it can be assessed by sending multiple lightweight probe requests to the target model to determine whether its error rate and response time have fallen back and stabilized below a preset normal judgment threshold.
[0046] If the service health status is determined to be normal after testing, indicating that the target model has recovered its ability to provide stable service, the system will read and, according to the automatic switchback rules pre-defined in the anomaly fallback configuration, remove the traffic redirection at the gateway layer and reroute subsequent content generation requests to the target AI model, restoring the business flow to the initial main model service architecture. As a preferred solution, if the system detects that the target AI model experiences another anomaly shortly after switching back, the system will immediately terminate the switchback process, reactivate the backup model for fallback takeover, and automatically extend the duration of the next round of circuit breaker lockout. Furthermore, the system backend will record all model switching operations and triggering anomalies in the system log and push real-time alerts to platform operations personnel to facilitate subsequent anomaly investigation and model call strategy optimization.
[0047] In this embodiment, by initiating a circuit breaker lockout period after routing to the backup model to take over all content generation requests, and detecting the service health status of the target AI model after the period ends, the requests are rerouted to the target AI model according to the automatic switchback rules. By utilizing a time window-level traffic isolation mechanism and an automatic status transition logic based on indicator detection, the system resource blockage caused by continuous requests to the faulty model is effectively prevented. This achieves a smooth transition and self-recovery of the server when facing model interface anomalies, reduces the maintenance cost of manual intervention, and significantly improves the overall stability and risk resistance of the platform service in multi-model calling scenarios.
[0048] In one embodiment, after the interface scheduling module fills the parameter values into the request body template included in the interface configuration information, constructs the request message, and sends it to the target artificial intelligence model, the method further includes the following steps: S601, Receive response data returned by the target artificial intelligence model; S602. If the response data is a successful response, extract the content download link from the response data based on the generated result extraction path; S603. If the response data is an error response, convert the original error code in the error response into the corresponding prompt information based on the error code mapping relationship and output it.
[0049] After sending a request message to the target AI model, the system needs to automatically parse and manage the status of the returned results from the model server. In step S601, the interface scheduling module listens for and receives asynchronous or synchronous response data returned by the target AI model. This response data is typically encapsulated in the response body of the HTTP / HTTPS protocol, containing the status identifier after model execution and the specific business processing results.
[0050] If the system determines that the response data is a successful response based on the status code in the response header or the logic in the response body, the system will activate the preset output extraction path in the model configuration information. This path defines the hierarchical relationship for locating and extracting the actual generated products (such as URIs of images, videos, audio, or text content) from complex JSON or XML format response messages. The interface scheduling module parses the content download link according to this path and sends it back to the business front end for users to preview or download.
[0051] If the system determines the response data to be an error response, it executes step S603. Because the error code definitions for different model vendors vary significantly (for example, vendor A's "Insufficient Balance" error code might be 1001, while vendor B's might be 505), directly displaying the original error code to the user would cause comprehension difficulties. Therefore, the system calls a preset error code mapping table. This table establishes a mapping mechanism between the system's unified internal prompt message library and the external original error codes. Based on this mapping relationship, the system converts the original error code contained in the received error response into Chinese prompt information that conforms to the business definition and is directly understandable to the user. For example, the vendor's "502 Gateway Error" is automatically converted to "Model service is temporarily unavailable, please try again later." The system outputs this prompt information to the front-end interactive interface in real time to help users quickly locate operational problems or wait for the system to automatically trigger a master / slave failover action.
[0052] In this embodiment, by receiving response data returned by the target artificial intelligence model, extracting the download link based on the path parsing of the generated result upon successful response, and converting the original error code into a prompt message based on the error code mapping relationship upon error response and outputting it, the standardized encapsulation of response data from different vendor models is achieved by utilizing path parsing-based product extraction technology and a mapping table-based error semantic standardization conversion mechanism. This enables users to obtain uniformly formatted result products and semantically clear error feedback when operating different types of models, improving the user-friendliness of platform interaction and the standardization of business exception handling.
[0053] In one embodiment, synchronizing model configuration information to the front-end business canvas and interface scheduling module specifically includes the following steps: S701. Send configuration change notifications to the front-end business canvas and interface scheduling module respectively through the publish-subscribe mechanism; S702. In response to the configuration change notification, the front-end business canvas and interface scheduling modules are triggered to read the model configuration information from the model configuration library and update the configuration, so as to complete the synchronization of the model configuration information to the front-end business canvas and interface scheduling modules.
[0054] In a unified access and dynamic expansion adaptation system for multiple model nodes, due to frequent changes in model access configurations (such as model deployment, version rollback, or parameter adjustment), in order to ensure that each functional module of the system can perceive the latest configuration in real time without restarting the service or interrupting the user's current content generation task, the system introduces a real-time configuration synchronization mechanism based on the publish / subscribe (Pub / Sub) model.
[0055] In practice, when an administrator modifies the parameter configuration of a model and saves it in the model operation management backend, the system persists the data in the model configuration repository. The system backend service uses a pre-defined distributed publish-subscribe message queue (such as Redis Pub / Sub or Kafka) to publish a configuration change notification message to a specific configuration change topic. This notification message carries the changed model ID, version number, and the type of change action (such as add, update, or take offline). At this time, the frontend business canvas (as a subscriber) and the backend interface scheduling module (also as a subscriber) will listen for this change notification in real time.
[0056] Subsequently, the system triggers active data retrieval and status updates on each subscriber. Upon receiving the change notification, the front-end business canvas immediately retrieves the latest model configuration data from the model configuration repository via an asynchronous API interface. Based on the new data, it redraws the model selection dropdown and node parameter configuration interface, thus achieving real-time synchronization of the front-end display logic. Simultaneously, upon receiving the same change notification, the interface scheduling module also initiates a configuration refresh process. This involves loading the latest interface definitions, authentication credentials, and exception fallback policies from the model configuration repository and overwriting any existing configuration cache in memory. Through this mechanism, the entire system can achieve real-time updates of the entire configuration chain with a latency of only seconds.
[0057] In this embodiment, a publish-subscribe mechanism is introduced to send configuration change notifications. The front-end business canvas and interface scheduling module automatically responds and reads the latest information from the model configuration library to update the local configuration. An event-driven data synchronization architecture is used to maintain the consistency of the state of each functional component. This completely eliminates the need to manually restart the entire creation platform or perform cumbersome service deployment operations after adjusting the model configuration, and realizes the dynamic and smooth expansion of model capabilities and real-time effectiveness. At the same time, it ensures the high global consistency of system configuration in a cluster deployment environment, greatly reduces the risk of service operation errors caused by configuration asynchrony, and improves the platform's real-time response capability and system availability in complex operation and maintenance scenarios.
[0058] In one embodiment, such as Figure 2 As shown, a unified access dynamic adaptation system for multiple model nodes is provided. The system includes: The model access module 101 is used to obtain the model configuration information of the artificial intelligence model to be accessed, store the model configuration information in the model configuration library, and synchronize the model configuration information to the front-end business canvas and interface scheduling module. The model configuration information includes interface configuration information, parameter configuration information, and exception fallback configuration. The exception fallback configuration includes circuit breaker conditions and backup model identifier. Model configuration library 102 is used to store model configuration information; The node rendering module 103 is used to respond to the model selection instruction for the functional node in the front-end business canvas, determine the selected artificial intelligence model as the target artificial intelligence model, extract the parameter configuration information corresponding to the target artificial intelligence model from the model configuration library, and match the input control according to the corresponding control type for each parameter defined in the parameter configuration information to generate the parameter configuration interface of the functional node. The interface scheduling module 104 is used to respond to the content generation request by filling the parameter values entered through the parameter configuration interface into the request body template contained in the interface configuration information to construct a request message and sending it to the target artificial intelligence model. The exception handling module 105 is used to monitor the calling status of the target artificial intelligence model and, when the calling status meets the circuit breaker condition, route the content generation request to the backup model corresponding to the backup model identifier. After routing the content generation request to the backup model corresponding to the backup model identifier, the system is further configured to: initiate a circuit breaker locking period, and within the circuit breaker locking period, route all content generation requests for the target artificial intelligence model to the backup model; after the circuit breaker locking period ends, detect the service health status of the target artificial intelligence model; if the service health status indicates normal, then according to the automatic switchback rules in the exception fallback configuration, reroute subsequent content generation requests to the target artificial intelligence model.
[0059] For details on the implementation of each module in this multi-model node unified access dynamic adaptation system, please refer to the description of the aforementioned embodiments, which will not be repeated here.
[0060] In one embodiment, such as Figure 3 As shown, a terminal device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The feature is that when the processor executes the computer program, it implements the steps or functions implemented in the multi-model node unified access dynamic adaptation method as described in any of the preceding claims.
[0061] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described method for unified access dynamic adaptation of multi-model nodes.
[0062] The details regarding the equipment and media can be found in the description of the aforementioned method embodiments, and will not be repeated here.
[0063] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by hardware related to computer program instructions. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Furthermore, any references to memory, storage, user databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory.
[0064] Those skilled in the art will understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.
[0065] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for unified access and dynamic adaptation of multiple model nodes, characterized in that, The method includes: Obtain the model configuration information of the artificial intelligence model to be connected. The model configuration information includes interface configuration information, parameter configuration information, and exception fallback configuration. The exception fallback configuration includes circuit breaker conditions and backup model identifier. The parameter configuration information includes control type. The model configuration information is stored in the model configuration library and synchronized to the front-end business canvas and interface scheduling module. In response to the model selection instruction for the functional node in the front-end business canvas, the artificial intelligence model selected by the model selection instruction is determined as the target artificial intelligence model, and the parameter configuration information corresponding to the target artificial intelligence model is extracted from the model configuration library; For each parameter defined in the parameter configuration information, input controls are matched according to the corresponding control type to generate the parameter configuration interface of the function node; In response to the content generation request, the parameter values input through the parameter configuration interface are obtained, and the interface scheduling module fills the parameter values into the request body template contained in the interface configuration information, constructs a request message, and sends it to the target artificial intelligence model; Monitor the invocation status of the target artificial intelligence model, and when the invocation status meets the circuit breaker condition, route the content generation request to the backup model corresponding to the backup model identifier; After routing the content generation request to the backup model corresponding to the backup model identifier, the method further includes: Initiate a circuit breaker locking period, and during the circuit breaker locking period, route all content generation requests for the target artificial intelligence model to the backup model; After the circuit breaker lockout period ends, the service health status of the target artificial intelligence model is detected; If the service health status indicator is normal, then according to the automatic switchback rule in the anomaly fallback configuration, subsequent content generation requests will be rerouted to the target artificial intelligence model.
2. The method according to claim 1, characterized in that, The parameter configuration information also includes parameter name, default value, optional range, and visibility identifier; For each parameter defined in the parameter configuration information, the step of matching input controls according to the corresponding control type to generate the parameter configuration interface of the function node includes: The parameter configuration information is filtered based on the visibility identifier to extract the set of target parameters visible to the user; For each parameter in the target parameter set, the corresponding input control is rendered according to the corresponding control type. Based on the default value and the optional range, the input control is filled with default display data and configured with interactive boundaries to complete the rendering of the parameter configuration interface.
3. The method according to claim 1, characterized in that, The interface configuration information includes the interface address, authentication method, and the request body template. The step of having the interface scheduling module fill the parameter values into the request body template included in the interface configuration information, construct a request message, and send it to the target artificial intelligence model includes: Extract the parameter placeholders from the request body template, and map and fill the parameter values into the positions corresponding to the parameter placeholders; According to the authentication method, add the corresponding credential information to the request header, generate the request message that conforms to the target artificial intelligence model interface protocol, and send the request message to the interface address.
4. The method according to claim 1, characterized in that, The interface configuration information also includes a timeout threshold, a maximum number of retries, and a flow control threshold. The construction request message is sent to the target artificial intelligence model, including: Based on the aforementioned flow control threshold, flow limiting control is applied to the frequency of requests sent to the target artificial intelligence model. If, after sending the request message, no response data is received for a duration that reaches the timeout threshold, the current request is determined to have timed out. If the current request times out or an error response is received from the server, and the current number of retries for the request message has not reached the maximum number of retries, then the request message is resent.
5. The method according to claim 1, characterized in that, The model configuration information also includes response processing rules, which include the result extraction path and error code mapping relationship. After the interface scheduling module fills the parameter values into the request body template included in the interface configuration information, constructs the request message, and sends it to the target artificial intelligence model, the method further includes: Receive response data returned by the target artificial intelligence model; If the response data is a successful response, the content download link is parsed from the response data based on the generated result extraction path; If the response data is an error response, the original error code in the error response is converted into the corresponding prompt information based on the error code mapping relationship and then output.
6. The method according to any one of claims 1 to 5, characterized in that, The step of synchronizing the model configuration information to the front-end business canvas and interface scheduling module includes: Configuration change notifications are sent to the front-end business canvas and the interface scheduling module respectively through a publish-subscribe mechanism. In response to the configuration change notification, the front-end business canvas and the interface scheduling module are triggered to read the model configuration information from the model configuration library and update the configuration, so as to complete the synchronization of the model configuration information to the front-end business canvas and the interface scheduling module.
7. A multi-model node unified access dynamic adaptation system, characterized in that, The system includes: The model access module is used to obtain the model configuration information of the artificial intelligence model to be accessed, store the model configuration information in the model configuration library, and synchronize the model configuration information to the front-end business canvas and interface scheduling module. The model configuration information includes interface configuration information, parameter configuration information, and exception fallback configuration. The exception fallback configuration includes circuit breaker conditions and backup model identifier. The parameter configuration information includes control type. The model configuration library is used to store the model configuration information; The node rendering module is used to respond to the model selection instruction for the functional node in the front-end business canvas, determine the artificial intelligence model selected by the model selection instruction as the target artificial intelligence model, extract the parameter configuration information corresponding to the target artificial intelligence model from the model configuration library, and match the input control according to the corresponding control type for each parameter defined in the parameter configuration information to generate the parameter configuration interface of the functional node. The interface scheduling module is used to respond to the content generation request by filling the parameter values input through the parameter configuration interface into the request body template contained in the interface configuration information to construct a request message and sending it to the target artificial intelligence model. An exception handling module is used to monitor the calling status of the target artificial intelligence model, and when the calling status meets the circuit breaker condition, to route the content generation request to the backup model corresponding to the backup model identifier; After routing the content generation request to the backup model corresponding to the backup model identifier, the system is further configured to: Initiate a circuit breaker locking period, and during the circuit breaker locking period, route all content generation requests for the target artificial intelligence model to the backup model; After the circuit breaker lockout period ends, the service health status of the target artificial intelligence model is detected; If the service health status indicator is normal, then according to the automatic switchback rule in the anomaly fallback configuration, subsequent content generation requests will be rerouted to the target artificial intelligence model.
8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 6.