Model calling method and related device
By constructing a shared model set and performing security verification, the network model can be dynamically invoked and updated, solving the problem of network model updates requiring system downtime in industrial control systems, and achieving flexible invocation and efficient business processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-06
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, updating network models in industrial control systems requires system shutdown, offline verification, and manual intervention, which limits the system's flexibility and intelligence level and fails to meet data security requirements.
By building a shared set of models in the service system, the security of the network model is verified, and the network model is dynamically invoked and updated using the model access interface. This decouples the target business from the network model, adopts a container-isolated deployment environment, and supports model version iteration and dynamic routing.
It enables flexible invocation and updating of the network model while ensuring security, improving the business processing efficiency and stability of the service system, supporting online hot-swapping and seamless upgrades, and avoiding business interruption.
Smart Images

Figure CN121814818A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial control, and in particular to a model invocation method and related apparatus. Background Technology
[0002] In the process of controlling industrial equipment through digital control systems, network models are typically used to implement various control functions within the control system, and the network model provides data processing services for the equipment in the control system.
[0003] To meet the security requirements of service systems, network access and network model replacement between service systems are strictly limited, and network models are typically deployed and run on a fixed single system. Because the network model and system services are strongly coupled, accessing, updating, or replacing the network model often requires system downtime, offline verification, and manual intervention, which limits the flexibility and intelligence of the service system. Furthermore, the strong coupling between the network model and system services means that updating the network model requires the device to temporarily suspend normal service.
[0004] Therefore, how to enable flexible invocation of the network model by system services and update the network model while ensuring the security of the service system is an urgent technical problem to be solved. Summary of the Invention
[0005] To address the aforementioned technical problems, this application provides a model invocation method and related apparatus.
[0006] The embodiments of this application disclose the following technical solutions:
[0007] On the one hand, embodiments of this application provide a model invocation method, the method comprising:
[0008] A set of models for sharing in the service system is determined, the set of models including multiple network models, each of which undergoes model validation based on security objectives before being added to the set of models;
[0009] The model access interface is used to obtain the model usage request corresponding to the target business in the service system. The model usage request includes the business identifier of the target business and the traffic requirement parameters of the target business.
[0010] Based on the current load capacity of the model set, a target network model that meets the traffic requirement parameters is determined from the candidate network models in the model set that correspond to the service identifier.
[0011] The target network model is invoked for the target service, and the model output after the target network model is invoked is returned to the target service.
[0012] On the other hand, embodiments of this application provide a model invocation apparatus, the apparatus comprising: a determining unit, an acquiring unit, a selecting unit, and an invocation unit;
[0013] A determining unit is used to determine a set of models to be shared in the service system, the set of models including multiple network models, each of which undergoes model verification based on security objectives before being added to the set of models;
[0014] The acquisition unit is used to acquire the model usage request corresponding to the target business in the service system through the model access interface. The model usage request includes the business identifier of the target business and the traffic requirement parameters of the target business.
[0015] The selection unit is used to determine the target network model that meets the traffic requirement parameters from the candidate network models corresponding to the service identifier in the model set according to the current load capacity of the model set.
[0016] The invocation unit is used to invoke the target network model for the target service and return the model output of the invoked target network model to the target service.
[0017] Optionally, the network models in the model set are deployed in their respective independent containers, and the calling unit is further used for:
[0018] The target network model is invoked for the target service by accessing the target container where the target network model is deployed.
[0019] Optionally, the device further includes: an updating unit;
[0020] The update unit is configured to update the model set in response to obtaining a model update task for the model set, and update the model set according to the update method corresponding to the model update task. The model update task includes at least one of model version iteration, adding a network model, or deleting a network model.
[0021] Optionally, the updating unit is further configured to:
[0022] When the model update task is to delete the first network model from the model set, and when the first network model is the target network model and is being invoked, a second network model that meets the traffic requirement parameters is determined from the candidate network models.
[0023] The second network model is used as the target network model for the target service, and the target service is dynamically routed to the second network model.
[0024] The first network model is deleted according to the deletion method corresponding to the model update task.
[0025] Optionally, the updating unit is further configured to:
[0026] When the model update task is to iterate the model version of the first network model in the model set, the third network model is updated to the model set, and the model version of the third network model is the iterative model version corresponding to the first network model;
[0027] After the third network model completes its iteration, if the first network model is used as the target model and is being invoked, the third network model is used as the target network model for the target service, and the target service is dynamically routed to the third network model.
[0028] Optionally, the calling unit is further configured to:
[0029] Based on the historical call parameters of the network models in the model set, select the fourth network model from the model set whose call frequency is higher than the common conditions;
[0030] If the fourth network model is not invoked, start the fourth network model and preload it into the runtime memory.
[0031] Optionally, the selection unit is further configured to:
[0032] From the model set, determine the candidate network model corresponding to the service identifier;
[0033] Based on the current load capacity of the model set, a candidate network model that matches the call priority corresponding to the target service is selected from the candidate network models that meet the traffic requirement parameters as the target network model.
[0034] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory:
[0035] The memory is used to store computer programs;
[0036] The processor is configured to perform the methods described above according to the computer program.
[0037] On the other hand, embodiments of this application provide a computer-readable storage medium for storing a computer program that, when executed by a computer device, implements the methods described above.
[0038] As can be seen from the above technical solution, when using network models to provide data processing services to devices in a service system, to ensure the security of the shared model set, network models are validated before being added to the shared model set, and only those network models that pass the validation are added to the shared model set. Constructing a shared model set for multiple network models and calling the network models through interfaces can decouple various target services in the service system from the network models. The model usage request includes the service identifier and traffic requirement parameters of the target service, used to determine the network model that can implement the target service function, as well as the specific business requirements of the target service. Based on the current calling status of network models in the model set, the target network model used to implement the target service can be determined, while avoiding service accumulation under conditions of strong coupling between the target service and the target network model. By calling the target network model to implement the target service and returning the output of the network model to the target service, the business requirements of the service system are fulfilled. Thus, while ensuring the security of the service system, the network model service layer and the target business logic layer in the service system are decoupled. The target business logic layer only calls the network model based on the model usage request through a unified model access interface, without having to care about the type, version and deployment location of the network model. This ensures that the target network model is accurately called to achieve the corresponding target business, while improving the business processing efficiency of the service system. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art 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.
[0040] Figure 1 A flowchart illustrating a model invocation method provided in an embodiment of this application;
[0041] Figure 2 A schematic diagram of a service system architecture provided in this application embodiment;
[0042] Figure 3 This application provides a schematic diagram of a network model invocation process.
[0043] Figure 4 This is a schematic diagram of a model calling device provided in an embodiment of this application. Detailed Implementation
[0044] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0045] In existing technologies, foreign online model loading platforms, such as Llama and OpenAI API, can update network models without interrupting business operations. However, these platforms cannot meet the data security and confidentiality requirements of the industrial control field. Current local network model updates typically involve manual or script-based methods, replacing the old model and loading the new one during system downtime or maintenance windows. However, this method requires system interruption, cannot enable real-time switching of target business processes, and lacks a dynamic verification mechanism, resulting in operational risks and response delays.
[0046] To ensure the security of the service system while enabling flexible invocation and updating of the network model by system services, this embodiment adds the network model used for model verification to a shared model set to guarantee the security of the model set. By utilizing interfaces to invoke the network model, the various target services in the service system are decoupled from the network model. Based on the model usage request and the current load capacity of the network models in the model set, the target network model used to implement the target service can be accurately determined. Therefore, while ensuring the security of the service system, the flexibility of network model updates and invocation processes, as well as the business processing efficiency of the service system, are improved.
[0047] The embodiments of this application will now be described with reference to the accompanying drawings.
[0048] Please see Figure 1 , Figure 1 This is a flowchart illustrating a model invocation method provided in an embodiment of this application.
[0049] S101: Determine a set of models to be shared in the service system. The set of models includes multiple network models, each of which undergoes model validation based on security objectives before being added to the set of models.
[0050] In the process of providing services to industrial equipment, to ensure the security requirements of the service system, the various business processes within the service system are typically deeply coupled with the network models used to implement those business processes. The various business processes cannot dynamically load the most suitable network model based on real-time operating status or differences in business needs. In this embodiment, the service system utilizes a model access interface to call different network models to provide data processing services to the industrial equipment. This decouples the various business processes within the service system from their corresponding network models. The model access interface performs separate startup and invocation of network models deployed in different environments, thereby improving the security, controllability, and stability of the service system.
[0051] The model set consists of multiple network models used to implement different data processing services. These different network models are adapted to the varying algorithmic requirements of different devices and components within industrial equipment. Based on the specific service needs of different industrial equipment, network models can be constructed using customized algorithms or by adopting custom network models. These network models are used to perform various services within the service system, such as fault analysis, fault early warning, and predictive maintenance. Furthermore, for service requirements with the same functionality, multiple network models can be set up to implement the same function, based on different requirements for business accuracy, data volume processing, and response timeliness, tailored to the specific needs of different industrial equipment or components. Different data processing services can call any network model from the model set according to their business needs, thereby achieving the sharing of multiple network models within the model set.
[0052] To ensure the security of service system calls to network models in the model set to execute corresponding functions, each network model needs to undergo security verification before being added to the model set. This verification can be achieved through one or more methods, such as model signature verification, hash verification, or metadata verification. This ensures the security and consistency of the network model access process, prevents unauthorized model loading or version conflicts, and guarantees that the legitimacy and compatibility of network models meet the security requirements of the shared model set.
[0053] S102: Obtain the model usage request corresponding to the target business in the service system through the model access interface. The model usage request includes the business identifier of the target business and the traffic requirement parameters of the target business.
[0054] In this embodiment, the model access interface is used to connect the target service to the corresponding target model. The target service refers to various system services performed by the service system on industrial equipment, such as monitoring, diagnosis, prediction, and control, including equipment fault analysis, fault prediction, valve status identification, and operating condition optimization. The model usage request includes the service identifier and traffic requirement parameters of the target service. The service identifier is used to identify one or more network models in the model set that can implement the target service function, and the traffic requirement parameters are used to determine the specific requirements of the target service, such as the data volume, data processing accuracy requirements, and processing speed requirements. Obtaining the model usage request through the model access interface allows for the determination of the selection criteria for choosing a network model from the model set.
[0055] S103: Based on the current load capacity of the model set, determine the target network model that meets the traffic requirement parameters from the candidate network models corresponding to the service identifier in the model set.
[0056] In this embodiment, the current load capacity of the model set reflects the invocation status of network models in the model set, as well as the business processing capabilities of uninvoked network models. The business processing capabilities of a network model can include performance indicators such as latency in business processing, accuracy or precision of data processing, and the load of the current Graphics Processing Unit (GPU). Based on the business identifier, the required functions of the target business are determined, and one or more network models in the model set that can implement the target business functions are identified as candidate network models—that is, candidate network models in the model set corresponding to the business identifier. Based on the current load capacity of the model set, and according to the specific requirements of the target business determined in the traffic demand parameters, a network model that meets the selection criteria is dynamically selected from the candidate network models and determined as the target network model.
[0057] S104: Call the target network model for the target service and return the model output after the target network model is called to the target service.
[0058] In this embodiment, the target service is dynamically accessed through a model access interface to a determined target network model, and the target network model is invoked to execute the target service. The model output is the execution result obtained by invoking the target network model to execute the target service, such as the fault analysis results and fault early warning results of industrial equipment, as well as the execution results of various target services in the service system, such as optimization control strategies for industrial equipment. The model output after the target network model is invoked is returned to the target service, thereby completing the target service in the service system based on the decoupling of the target service and the target network model.
[0059] Based on S102-S104, the service system obtains the corresponding model usage request through the model access interface, and then accurately selects the corresponding target network model according to the service identifier and traffic requirement parameters of the target service. It can also call the target network model through the model access interface to complete the target service, thereby decoupling each target service from the corresponding target network model. This enables the target service to dynamically call multiple network models in the model set, i.e., the sharing of the model set.
[0060] Therefore, this application ensures that the model set meets the security requirements of the service system by performing security verification before adding the network model to the model set. Adding the security-verified network model to the shared model set and calling the network model in the model set through the model access interface decouples the target service from the target network model. Based on the service identifier and traffic requirement parameters of the target service in the model usage request, the selection criteria for the target network model are obtained. Under the premise of decoupling between the target service and the target network model, the target network model that meets the traffic requirement parameters of the target service is determined from one or more network models capable of implementing the target service function. This ensures the fulfillment of the target service's business requirements while avoiding the accumulation of system services under a single network model by selecting the target network model from candidate network models corresponding to the service identifier in the model set. Furthermore, by calling the target network model to execute the corresponding system business for the target service and returning the model output after the target network model is called to the target service, flexible and accurate calling of the target network model through the model access interface is achieved. Thus, while ensuring the security of the service system's business execution, the dynamic selection of the model improves the flexibility of the target service calling the target network model and the processing efficiency of the target service.
[0061] As one possible implementation, the network models in the model set are deployed in their own independent containers. S104: Call the target network model for the target business, including: calling the target network model for the target business by accessing the target container where the target network model is deployed.
[0062] In the embodiments of this application, independent containers divide the deployment environment of the model into multiple isolated spaces. By deploying each network model in the model set in its own independent container, each network model is isolated using the container. Each network model executes its corresponding target service in an independent deployment environment, and the network models cannot communicate with each other. During the process of calling a network model to implement the target service, because the independent containers divide the deployment environment of the network models, each target service accesses different communication paths through the model access interface to the containers where the target network models are deployed. Through different communication paths, only the independent target network models stored in the containers can be started and called. For example, there are multiple network models for industrial equipment fault analysis, each deployed in an independent container. The model access interface can only establish a connection with one independent container, thereby calling a network model for industrial equipment fault analysis to execute the target service independently. This avoids the impact of a single network model failure on the service system, thus improving the stability of the service system. Furthermore, redundancy verification is used to periodically monitor the operation of the network models to ensure that the network models can normally provide services to the target services.
[0063] Therefore, by dividing the deployment environment of multiple network models into containers, each network model has an independent communication path and operating environment. This enables secure isolation and independent startup between network models when multiple network models coexist, ensuring and improving the security and stability of network model calls and target business execution processes, thereby enhancing the stability of the service system.
[0064] As one possible implementation, in response to obtaining a model update task for the model set, the model set is updated according to the update method corresponding to the model update task. The model update task includes at least one of model version iteration, adding a network model, or deleting a network model.
[0065] In the embodiments of this application, the model update task is used to instruct the model set to perform model lifecycle maintenance for network models, including at least one of model version iteration, adding network models, or deleting network models. Specifically, model version iteration refers to updating the model set with models that have better performance for the same model implementing the same target business function. Adding network models refers to adding new network models to the model set to meet the new target business requirements of the service system. Deleting network models removes network models that are too old to meet the current business execution standards or have no calling requirements from the network set. Furthermore, during the model update task, a canary release method can be used to gradually expand the update scope of the network models, ensuring the security of the model update task while achieving a smooth transition in the execution of the target task.
[0066] Therefore, by performing update tasks on the model business, the execution quality of the target business of the model set and the richness of the business that can be achieved are improved. At the same time, the storage space of the model set is optimized, the utilization rate of the model set's computing power is improved, and thus the response efficiency of the service system to the target business is improved.
[0067] As one possible implementation, when the model update task is to delete the first network model from the model set, the model set is updated according to the update method corresponding to the model update task, including: when the first network model is the target model and is being invoked, determining the second network model that meets the traffic requirement parameters from the candidate network models; using the second network model as the target network model for the target service and dynamically routing the target service to the second network model; and deleting the first network model according to the deletion method corresponding to the model update task.
[0068] In this embodiment of the application, when the model update task is to delete the first network model from the model set, the first network model may be in an unused state or a used state. Therefore, deleting the first network model according to the deletion method corresponding to the model deletion task can avoid affecting the execution of the target task due to the execution of the model deletion task.
[0069] If the first network model is being invoked, meaning it's currently executing a target task as the target network model, directly deleting it would cause the model set to halt the ongoing target service. Therefore, before deleting the currently invoked first network model, it's necessary to select a second network model from among multiple candidate network models that also fulfill the target service's functionality, choosing one that meets the traffic requirements of the current target service. This second network model is then used as the target network model for the target service currently being executed by the first network model, and the target service is dynamically routed to the second network model. This allows for target network model switching without interrupting the target task. After the target service is routed to the second network model, the first network model is no longer invoked. At this point, the first network model is deleted to complete the model update task.
[0070] Therefore, before deleting the first network model that is currently the target network model, a second network model that meets the requirements of the target task is determined in advance, and the target task is dynamically routed to the second network model. This avoids the interruption of the target task execution when the target network model in the model set is being deleted, and allows the network model to be unloaded while the service system is running continuously.
[0071] As one possible implementation, when the model update task is to iterate the model version of the first network model in the model set, the model set is updated according to the update method corresponding to the model update task, including: iterating the third network model into the model set, the model version of the third network model being the iterated model version corresponding to the first network model; after the third network model completes the iteration, if the first network model is the target model and is being called, the third network model is used as the target network model for the target business, and the target business is dynamically routed to the third network model.
[0072] In the embodiments of this application, when the model update task is to iterate the version of the first network model, the iteration method corresponding to the model update task can prevent the first network model from interrupting the execution of the corresponding target service during the iteration process.
[0073] By utilizing the model access interface, without affecting the execution of corresponding services by the first network model as the target network model, the iterative version of the network model corresponding to the first network model, namely the third network model, is deployed to the model set. The third network model is then configured accordingly to ensure that it can be invoked and complete the execution of the target service. Furthermore, since the third network model is an iterative version of the first network model, it can at least perform the same functions as the first network model and meet the same target service traffic requirement parameters. Therefore, when the first network model is being invoked as the target network model to execute a target service, the target network model invoked by the target service can be directly changed to the third network model, and the target service can be dynamically routed to the third network model. This achieves online hot-swapping of network models, allowing for the timely introduction of new network models or replacement of old network models during continuous operation of the service system.
[0074] In the embodiments of this application, the model set can simultaneously retain multiple versions of a network model for use by target services with different traffic parameter requirements. Since different target services have different traffic requirement parameters, there may be differences in the actual business requirements of the target services. For example, when performing fault detection in the industrial field, a lower version of the network model used to implement this target service may only be able to detect the location of the faulty device, but its detection speed is fast. A higher version of the network model, on the other hand, can detect both the location of the faulty device and the cause of the fault, but its detection speed is slower. In this case, if the goal is to quickly locate the faulty device, the lower version of the network model can be called; if the goal is to simplify the fault diagnosis process, the higher version of the network model can be called, thus fulfilling the specific requirements of different target services.
[0075] Therefore, this application pre-deploys the model versions that need to be iterated into the model set. Assuming the iterated network model can execute normally, it dynamically routes the target service currently being executed by the non-iterated network model to the iterated network model. This achieves dynamic routing and switching between different versions of the network model without interrupting the execution of the target service, enabling seamless upgrades of network model versions and ensuring service continuity and compatibility. By selecting different versions of the same network model based on the traffic demand parameters of the target service, the target service can more flexibly call the target network model that matches its functional requirements, thereby improving the adaptability of the target network model to the target service and enhancing the efficiency and accuracy of the service system's target service processing.
[0076] As one possible implementation, based on the historical call parameters of the network models in the model set, a fourth network model with a higher call frequency than the common conditions is selected from the model set; if the fourth network model is in an uncalled state, the fourth network model is started and preloaded into the runtime memory.
[0077] In the embodiments of this application, the historical call parameters reflect the frequency of each network model in the model set being called, and the common use condition is used to distinguish whether a network model is a commonly used network model. When the call frequency reflected by the historical call parameters of the fourth network model is higher than the call frequency specified by the common use condition, the fourth network model is determined to be a commonly used network model. If the fourth network model is in an uncalled state, calling the fourth network model to execute the target service requires first starting the fourth network model and preloading it into memory, which will cause a delay in the execution of the target service. In order to meet the timeliness of the target service execution, for commonly used network models, they can be started in advance and loaded into memory, that is, the fourth network model can be started and preloaded into the running memory, so that when the target service calls the fourth network model, the fourth network model can achieve a fast response to the target service.
[0078] Therefore, by utilizing common conditions to identify frequently used network models in the model set and loading them into memory, memory space is effectively utilized to ensure timely response of the target network model. Pre-starting and loading frequently used network models that are not yet invoked into memory saves startup and loading time when the network model is invoked, thereby shortening the time it takes for the network model to respond to the target business and improving the processing efficiency of the target business.
[0079] As one possible implementation, S103: determining the target network model that meets the traffic requirement parameters from the candidate network models corresponding to the service identifier in the model set according to the current load capacity of the model set, including: determining the candidate network model corresponding to the service identifier from the model set; and selecting the candidate network model that adapts to the call priority corresponding to the target service from the candidate network models that meet the traffic requirement parameters according to the current load capacity of the model set.
[0080] In the embodiments of this application, the functions required by the target service can be determined based on the service identifier, and then network models capable of implementing the corresponding functions are selected from the model set as candidate network models. The invocation priority indicates whether the target service has high service requirements. For example, there is a high-precision positioning requirement for fault location of industrial equipment, or a high requirement for optimizing control strategies for industrial equipment. For high-priority target services corresponding to such high service requirements, the candidate network models that can be invoked are determined based on the current load capacity of the model set. Based on the specific service requirements specified by the traffic demand parameters, network models with strong service execution capabilities that are compatible with the target service are preferentially invoked to execute the corresponding target service. Lower-priority target services do not have high service requirements; therefore, there are more models that can meet their service requirements. While ensuring the execution of high-priority target tasks, the target network model can be adapted to achieve dynamic scheduling of network model running instances, supporting automatic scaling of network model computing resources based on the traffic demand parameters of the target service.
[0081] Therefore, by adaptively determining the priority of different target services and prioritizing the network model with stronger execution capabilities to execute higher-priority target services, dynamic configuration of the target network model and target services is achieved. This improves the matching degree between the target network model and target services, thereby optimizing the utilization of network model computing resources. Asynchronous loading of target services with different priorities also avoids blocking of target tasks.
[0082] Specifically, please refer to Figure 2 , Figure 2 This is a schematic diagram of a service system architecture provided in an embodiment of this application. The service system can provide services to the intelligent operation and maintenance platform of the nuclear power digital control system (DCS) or other intelligent operation and maintenance platforms that provide data processing services for industrial equipment. The application layer 201 sends the target business to the dynamic access layer 202, which has a model access interface. The dynamic access layer 202 uses a unified model registration center or model management module to dynamically discover and bind available network models. The model access interface is used for online dynamic access of network models, instructing the model set to perform model lifecycle maintenance, model dynamic configuration, model preloading, and dynamically routing the target business to the network model or performing online hot switching of the network model. Through the model access interface, the service system can load, unload, and update models while running. The model service layer 203 has a model set,
[0083] The model set includes network models capable of performing multiple functions, such as fault analysis models and fault early warning models. Multiple network models may be used to perform the same function. For example, network models for fault analysis may include fault analysis model a, fault analysis model b, and fault analysis model c. These network models can be the same or different. For instance, fault analysis model a and fault analysis model b can be the same network model used to handle a large number of ordinary fault analysis tasks simultaneously. Fault analysis model c, which provides higher accuracy fault location and shorter response time, is used to handle more urgent fault analysis tasks, thus enabling the coexistence and on-demand use of multiple network models.
[0084] Please see Figure 3 , Figure 3 This is one embodiment provided in this application. The nuclear power DCS intelligent operation and maintenance platform 301 sends the instruction of the target service or model update task to the model access interface 302 for online dynamic access of the model. The model access interface 302 performs the corresponding update operation according to the model set indicated by the model update task, or calls the network model that meets the requirements of the target service to provide services according to the specific needs of the target service. For example, it calls the fault analysis model a303 to perform the fault analysis task or calls the fault early warning model b304 to perform the fault early warning task. When the target service or model update task is completed, the execution result is fed back to the nuclear power DCS intelligent operation and maintenance platform 301 through the model access interface 302.
[0085] Please see Figure 4 , Figure 4 This application provides a schematic diagram of a model calling device.
[0086] On the other hand, embodiments of this application provide a model invocation device, the device comprising: a determining unit 401, an acquiring unit 402, a selecting unit 403, and an invocation unit 404;
[0087] The determining unit 401 is used to determine a set of models to be shared in the service system, the set of models including multiple network models, each network model passing model verification based on security objectives before being added to the set of models;
[0088] The acquisition unit 402 is used to acquire the model usage request corresponding to the target business in the service system through the model access interface. The model usage request includes the business identifier of the target business and the traffic requirement parameters of the target business.
[0089] Selection unit 403 is used to determine the target network model that meets the traffic requirement parameters from the candidate network models corresponding to the service identifier in the model set according to the current load capacity of the model set.
[0090] The calling unit 404 is used to call the target network model for the target service and return the model output after the target network model is called to the target service.
[0091] Optionally, the network models in the model set are deployed in their respective independent containers, and the calling unit is further used for:
[0092] The target network model is invoked for the target service by accessing the target container where the target network model is deployed.
[0093] As one possible implementation, the device further includes: an update unit 405;
[0094] The update unit 405 is configured to update the model set in response to obtaining a model update task for the model set, according to the update method corresponding to the model update task, wherein the model update task includes at least one of model version iteration, adding a network model, or deleting a network model.
[0095] As one possible implementation, the update unit 405 is further configured to:
[0096] When the model update task is to delete the first network model from the model set, and when the first network model is the target model and is being invoked, a second network model that meets the traffic requirement parameters is determined from the candidate network models.
[0097] The second network model is used as the target network model for the target service, and the target service is dynamically routed to the second network model.
[0098] The first network model is deleted according to the deletion method corresponding to the model update task.
[0099] As one possible implementation, the update unit 405 is further configured to:
[0100] When the model update task is to iterate the model version of the first network model in the model set, the third network model is updated to the model set, and the model version of the third network model is the iterative model version corresponding to the first network model;
[0101] After the third network model completes its iteration, if the first network model is used as the target model and is being invoked, the third network model is used as the target network model for the target service, and the target service is dynamically routed to the third network model.
[0102] As one possible implementation, the calling unit 404 is further configured to:
[0103] Based on the historical call parameters of the network models in the model set, select the fourth network model from the model set whose call frequency is higher than the common conditions;
[0104] If the fourth network model is not invoked, start the fourth network model and preload it into the runtime memory.
[0105] Optionally, the selection unit 403 is further configured to:
[0106] From the model set, determine the candidate network model corresponding to the service identifier;
[0107] Based on the current load capacity of the model set, a candidate network model that matches the call priority corresponding to the target service is selected from the candidate network models that meet the traffic requirement parameters as the target network model.
[0108] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory:
[0109] The memory is used to store computer programs;
[0110] The processor is configured to perform the methods described above according to the computer program.
[0111] On the other hand, embodiments of this application provide a computer-readable storage medium for storing a computer program that, when executed by a computer device, implements the methods described above.
[0112] As can be seen from the above technical solution, when using network models to provide data processing services to devices in a service system, to ensure the security of the shared model set, network models are validated before being added to the shared model set, and only those network models that pass the validation are added to the shared model set. Constructing a shared model set for multiple network models and calling the network models through interfaces can decouple various target services in the service system from the network models. The model usage request includes the business identifier and traffic requirement parameters of the target service, used to determine the network model that can implement the target service function, as well as the specific business requirements of the target service. Based on the current invocation status of network models in the model set, the target network model used to implement the target service can be determined, while avoiding business accumulation under strong coupling between the target service and the target network model. By calling the target network model to implement the target service and returning the output of the network model to the target service, the business requirements of the service system are fulfilled. Therefore, while ensuring the security of the service system, the decoupling of the network model service layer and the target business logic layer in the service system is achieved. Calling the network model based on the model usage request also ensures that the target network model is accurately called to implement the corresponding target service while improving the business processing efficiency of the service system.
[0113] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.
[0114] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0115] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0116] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0117] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0118] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A model invocation method, characterized in that, The method includes: A set of models for sharing in the service system is determined, the set of models including multiple network models, each of which undergoes model validation based on security objectives before being added to the set of models; The model access interface is used to obtain the model usage request corresponding to the target business in the service system. The model usage request includes the business identifier of the target business and the traffic requirement parameters of the target business. Based on the current load capacity of the model set, a target network model that meets the traffic requirement parameters is determined from the candidate network models in the model set that correspond to the service identifier. The target network model is invoked for the target service, and the model output after the target network model is invoked is returned to the target service.
2. The method according to claim 1, characterized in that, The network models in the model set are deployed in their respective independent containers. The step of calling the target network model for the target service includes: The target network model is invoked for the target service by accessing the target container where the target network model is deployed.
3. The method according to claim 1, characterized in that, The method further includes: In response to obtaining a model update task for the model set, the model set is updated according to the update method corresponding to the model update task. The model update task includes at least one of model version iteration, adding a network model, or deleting a network model.
4. The method according to claim 3, characterized in that, When the model update task is to delete the first network model from the model set, updating the model set according to the update method corresponding to the model update task includes: When the first network model is the target network model and is being invoked, a second network model that meets the traffic requirement parameters is determined from the candidate network models. The second network model is used as the target network model for the target service, and the target service is dynamically routed to the second network model. The first network model is deleted according to the deletion method corresponding to the model update task.
5. The method according to claim 3, characterized in that, When the model update task is to iterate the model version of the first network model in the model set, updating the model set according to the update method corresponding to the model update task includes: The third network model is iterated into the model set, and the model version of the third network model is the iterative model version corresponding to the first network model; After the third network model completes its iteration, if the first network model is used as the target model and is being invoked, the third network model is used as the target network model for the target service, and the target service is dynamically routed to the third network model.
6. The method according to claim 1, characterized in that, The method further includes: Based on the historical call parameters of the network models in the model set, select the fourth network model from the model set whose call frequency is higher than the common conditions; If the fourth network model is not invoked, start the fourth network model and preload it into the runtime memory.
7. The method according to claim 1, characterized in that, The step of determining the target network model that meets the traffic requirement parameters from the candidate network models corresponding to the service identifier in the model set based on the current load capacity of the model set includes: From the model set, determine the candidate network model corresponding to the service identifier; Based on the current load capacity of the model set, a candidate network model that matches the call priority corresponding to the target service is selected from the candidate network models that meet the traffic requirement parameters as the target network model.
8. A model recall device, characterized in that, The device includes: a determining unit, an acquiring unit, a selecting unit, and a calling unit; The determining unit is used to determine a set of models to be shared in the service system. The set of models includes multiple network models, and each network model undergoes model verification based on security objectives before being added to the set of models. The acquisition unit is used to acquire the model usage request corresponding to the target business in the service system through the model access interface. The model usage request includes the business identifier of the target business and the traffic requirement parameters of the target business. The selection unit is used to determine the target network model that meets the traffic requirement parameters from the candidate network models corresponding to the service identifier in the model set according to the current load capacity of the model set. The calling unit is used to call the target network model for the target service and return the model output of the called target network model to the target service.
9. A computer device, characterized in that, The computer device includes a processor and memory: The memory is used to store computer programs; The processor is configured to perform the method according to any one of claims 1-7 according to the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that, when executed by a computer device, performs the method described in any one of claims 1-7.