Multi-model management method and system
By identifying the model management request signal and managing the model based on the mirror warehouse, the data islands and redundancy problems of model management in the catalytic cracking device are solved, efficient integration and scheduling of the model are realized, and the intelligent and continuous operation of the device is improved.
Patent Information
- Application Number
- CN202410108360.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-25
- Publication Date
- 2025-07-25
AI Technical Summary
In the existing catalytic cracking device, there are problems of data silos and local data redundancy, making it difficult to achieve model integration and unified scheduling.
By identifying the model management request signal, determining the target model type, and building and calling model images based on the mirror warehouse, the model registration, update and call is realized, and the timing task type, event trigger type and algorithm optimization type scheduling scheme are adopted to avoid excessive model components locally.
It realizes unified integration and scheduling management of models in different operating environments and development languages, improves the intelligent monitoring and optimization guidance capabilities of the device, and solves the problems of difficult model integration, slow scheduling, and lack of a unified platform.
Smart Images

Figure CN120371373A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of algorithm models, and particularly to a multi-model management method and a multi-model management system. Background Art
[0002] The fluid catalytic cracking unit is one of the typical refining units. In order to quickly achieve the continuous and intelligent operation of the unit, more and more monitoring models, optimization models, etc. are applied to ensure the safe, stable and long-term operation of the fluid catalytic cracking unit. However, these models often use different programming languages and have different calculation frequencies, making it difficult to integrate and apply them, and generally causing the phenomenon of data islands.
[0003] In the existing solutions, based on different business processing requirements, a large number of prefabricated models need to be stored locally. And as the models are continuously updated, a large number of historical version models will gradually accumulate locally, resulting in a large amount of data redundancy. In view of the problems of data islands and local data redundancy easily occurring in the existing model management solutions, a new model management solution needs to be proposed. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide a multi-model management method and system to at least solve the problems of data islands and local data redundancy easily occurring in the existing model management solutions.
[0005] To achieve the above purpose, in the first aspect of the present invention, a multi-model management method is provided. The method includes: in response to a model management request signal, identifying the request content corresponding to the request signal; determining a management plan for the model based on the request content; when the management plan is a call plan, determining a target model type based on the request content, and triggering a corresponding model call plan based on the determined target model type; executing the model call plan, and extracting a model image based on an optimization plan.
[0006] Optionally, the model management request signal includes: a model registration request signal, a model update request signal, and a model call request signal.
[0007] Optionally, the identifying the request content corresponding to the request signal includes: the request content of the model registration request signal includes applying for a model code and building an image; the request content of the model update request signal includes image replacement; the request content of the model call request signal includes extracting a target model.
[0008] Optionally, when the current request signal is a model registration request signal, the management scheme for determining the model based on the request content includes: identifying the basic information of the model to be registered based on the request content; generating a unique code for the model to be registered based on the basic information, and determining the input parameter data group of the model to be registered; defining the output of the model to be registered as a preset standard string; constructing a model image based on the unique code of the model to be registered, the input parameter data group of the model to be registered, and the standard character, and pushing the model image to the model repository.
[0009] Optionally, the unique code of the model to be registered includes: a device number identification bit, a model type identification bit, and a sequence code identification bit.
[0010] Optionally, when the current request signal is a model update request signal, the management scheme for determining the model based on the request content includes: training a new model based on newly determined training samples; using the unique code of the corresponding model to be replaced as the code of the new model, and generating a new model image; interacting with each image repository to transfer the new model image and delete the original image.
[0011] Optionally, the target model type includes one or more of: timed task type, event trigger type, and algorithm optimization type.
[0012] Optionally, triggering the corresponding model scheduling scheme based on the determined target model type includes: if the target model type is a timed task type, determining the model scheduling time based on a preset time sequence table; at each model scheduling time, correspondingly calling the data query RestfulApi provided by the system service for program integration; calling the model based on the integrated program.
[0013] Optionally, triggering the corresponding model scheduling scheme based on the determined target model type includes: if the target model type is an event trigger type, monitoring preset trigger events; in response to the trigger signal of the preset trigger event, retrieving the corresponding model; wherein the preset trigger event is data update trigger or alarm data trigger.
[0014] Optionally, triggering the corresponding model scheduling scheme based on the determined target model type includes: if the target model type is an algorithm optimization type, in response to the trigger signal of the algorithm optimization scenario, calling the corresponding algorithm optimization type model; receiving the model input parameters based on the restful interface, and combining the model input parameters to be passed to the model in json format.
[0015] In a second aspect of the present invention, a multi-model management system is provided. The system includes: a collection unit, configured to identify the request content corresponding to a request signal in response to a model management request signal; a solution determination unit, configured to determine a management solution for the model based on the request content; a call unit, configured to, when the management solution is a call solution, determine a target model type based on the request content and trigger a corresponding model call solution based on the determined target model type; and an execution unit, configured to execute the model call solution and extract a model image based on an optimization solution.
[0016] In a third aspect of the present invention, a computer-readable storage medium is provided. Instructions are stored on the computer-readable storage medium, and when running on a computer, the instructions cause the computer to execute the above multi-model management method.
[0017] In a fourth aspect of the present invention, an electronic device is provided. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above multi-model management method is implemented.
[0018] Through the above technical solutions, in view of the actual situations of multi-models and multi-algorithms based on mechanism and data-driven, the present invention proposes a model integration and scheduling method and system, realizes the fusion application of various algorithm models, effectively realizes the aggregation and sharing of device data, process mechanism, and intelligent models, and strengthens the intelligent monitoring and optimization guidance of the device. The model integration and scheduling method and system for a fluid catalytic cracking unit proposed by the present invention preferably solve problems such as difficult model integration, slow scheduling, and lack of a unified platform, can complete the unified integration and scheduling management of mechanism models and data models in different operating environments and different development languages, and realize all-round monitoring and early warning and technical support for processes, equipment, environmental protection, risks, emergencies, etc.
[0019] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent specific embodiment part. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings are used to provide a further understanding of the embodiments of the present invention, and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the embodiments of the present invention, but do not constitute a limitation to the embodiments of the present invention. In the drawings:
[0021] Figure 1 is a flowchart of the steps of a multi-model management method provided by an embodiment of the present invention;
[0022] Figure 2 is a schematic diagram of a registration coding structure provided by an embodiment of the present invention;
[0023] Figure 3It is the system structure diagram of the multi-model management system provided by an embodiment of the present invention. Specific embodiments
[0024] The following will describe the specific embodiments of the present invention in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for the purpose of illustrating and explaining the present invention, and are not used to limit the present invention.
[0025] The fluid catalytic cracking unit is one of the typical refining units. In order to quickly realize the continuous and intelligent operation of the unit, more and more monitoring models, optimization models, etc. are applied to ensure the safe, stable and long-term operation of the fluid catalytic cracking unit. However, these models often use different programming languages and have different calculation frequencies, making it difficult to integrate and apply them, and generally causing the phenomenon of data islands.
[0026] In the existing solutions, a large number of prefabricated models need to be locally stored based on different business processing requirements. And as the models are continuously updated, a large number of historical version models will gradually accumulate locally, resulting in a large amount of data redundancy.
[0027] Aiming at the problems of data islands and local data redundancy that are likely to occur in the existing model management solutions, the solution of the present invention proposes a multi-model management method. In view of the actual situation of multi-models and multi-algorithms of mechanism and data-driven, the present invention proposes a model integration and scheduling method and system to realize the integrated application of various algorithm models, effectively realize the aggregation and sharing of device data, process mechanism and intelligent models, and strengthen the intelligent monitoring and optimization guidance of the device. The model integration and scheduling method and system for fluid catalytic cracking units proposed by the present invention preferably solve the problems of difficult model integration, slow scheduling and lack of a unified platform, and can complete the unified integration and scheduling management of mechanism models and data models in different operating environments and different development languages, and realize all-round monitoring and early warning and technical support for processes, equipment, environmental protection, risks, emergencies, etc.
[0028] Figure 1 It is the method flow chart of the multi-model management method provided by an embodiment of the present invention. As Figure 1 shown, an embodiment of the present invention provides a multi-model management method, and the method includes:
[0029] Step S10: Respond to the model management request signal and identify the request content corresponding to the request signal.
[0030] Specifically, the model management request signal includes: a model registration request signal, a model update request signal, and a model call request signal.
[0031] Further, the request content for identifying the corresponding request signal includes: the request content of the model registration request signal includes an application model code and building an image; the request content of the model update request signal includes image replacement; the request content of the model invocation request signal includes extracting a target model.
[0032] In the embodiments of the present invention, in the actual application process, there may be various model management requirements. For example, there are new model registration requirements for new businesses, update requirements for historical models, and model invocation requirements based on current needs. The solution of the present invention needs to execute corresponding model management solutions based on different model management requirements.
[0033] In the embodiments of the present invention, the solution of the present invention aims at the characteristics of multiple links and a large amount of point data in the production process of a fluid catalytic cracking unit, and there are problems such as difficulty in integrating and managing various business models such as process, equipment, environmental protection, and operation, and the lack of a unified platform. The present invention provides a multi-concurrency, highly reliable model integration, scheduling, and management technology, constructs a business model integration, registration, management, and scheduling optimization system, and provides efficient and reliable scheduling and computing services for the model.
[0034] Step S20: Determine a model management solution based on the request content.
[0035] Specifically, when the current request signal is a model registration request signal, the determining a model management solution based on the request content includes: identifying basic information of the model to be registered based on the request content; generating a unique code for the model to be registered based on the basic information, and determining an input parameter data group for the model to be registered; defining the output of the model to be registered as a preset standard string; constructing a model image based on the unique code of the model to be registered, the input parameter data group of the model to be registered, and the standard character, and pushing the model image to the model repository.
[0036] Embodiment 1:
[0037] Basic information registration: The model provider provides the model name, model address IP, model address port number, model address root route, and model invocation URL. This device will generate a 10-digit unique model code based on the registration information. This code is the unique identifier of each model, and its generation rule is as Figure 2 . Among them, the first 4 digits represent the number of the device to which the model belongs, and this number comes from the enterprise organization information; the middle 2 digits are determined by the model type filled in during model registration. The process type code is set to 01, the equipment type code is set to 02, the environmental protection type code is set to 03, the operation type code is set to 04, and the other type code is set to 05; the last 4 digits are the sequential code automatically generated by the model in the registration system.
[0038] Embodiment 2:
[0039] Input parameter selection: According to the data characteristics of the fluid catalytic cracking unit, to avoid querying data in the database every time the model is calculated, the model provider needs to select the input parameters of the model during registration, define the parameters required by the model and their default values. The system will generate corresponding data groups based on the input parameters, and only relevant data within the data group needs to be read each time it is called, improving the calculation efficiency.
[0040] Furthermore, output result definition: Define information such as the name of the output result of the model and the output result structure. The output result structure is defined as a JSON string.
[0041] Preferably, the unique encoding of the model to be registered includes: a device number identification bit, a model type identification bit, and a sequence encoding identification bit.
[0042] Preferably, when the current request signal is a model update request signal, the management scheme for determining the model based on the request content includes: training a new model based on the newly determined training samples; using the unique encoding of the corresponding model to be replaced as the encoding of the new model, and generating a new model image; interacting with each image repository to transfer the new model image and delete the original image.
[0043] Embodiment 3:
[0044] For image management, image construction is achieved by writing a Dockerfile and pushing the image to the image repository. Mirroring is a form of file storage and a type of redundancy. A complete copy of the data on one disk exists on another disk, which is called mirroring. Many files can be made into a mirror file. After opening it with software such as GHOST when placed on the same disk as GHOST and other programs, it is restored to many files. RAID 1 and RAID 10 use mirroring. Common mirror file formats include ISO, BIN, IMG, TAO, DAO, CIF, and FCD.
[0045] In the embodiments of the present invention, the so-called mirror image file is actually similar to a ZIP compressed package. It makes a specific series of files into a single file according to a certain format to facilitate users' downloading and using. For example, a beta version of an operating system, a game, etc. The mirror image file not only has the "synthesis" function of the ZIP compressed package, but its most important feature is that it can be recognized by specific software and can be directly burned onto a CD. In fact, the mirror image file in the general sense can be further extended. More information can be included in the mirror image file. For example, system files, boot files, partition table information, etc. In this way, the mirror image file can contain all the information of a partition or even a hard disk. The classic software for using this type of mirror image file is Ghost, which also has the burning function. However, its burning only saves the mirror image file itself on the CD, while the general burning software can directly burn the content contained in the supported mirror image file onto the CD.
[0046] In the embodiments of the present invention, when the present invention's solution performs mirror image management, it stores and schedules mirror images based on a mirror image repository, avoiding excessive local storage of model components. When a model needs to be executed, it directly extracts through the mirror image repository. The main functions of the mirror image repository are mirror image storage, mirror image management, and mirror image distribution. Each repository can contain multiple mirror images, which are distinguished by tags. Usually, when using a mirror image, three elements, namely the mirror image repository type, repository application, and specific application version, should be fully considered. Through the mirror image repository, it is convenient to share mirror images among multiple running environments, and use containers to quickly simulate the same running environment to run applications, avoiding abnormal application running or inconsistent behaviors caused by different running environments. The mirror image contains the main body of the application, as well as the running environment, tool set, etc. required by the application. When building a mirror image, the mirror image repository, repository, and tag of the mirror image can be specified, or the mirror image repository, repository, and tag can be added to the mirror image after the build is completed, so as to push the same mirror image to different mirror image repositories. The mirror image repository is in a central position in mirror image sharing and is closely related to the mirror image repository in mirror image construction, continuous integration, mirror image deployment, and mirror image release.
[0047] Step S30: When the management solution is a call solution, determine the target model type based on the request content, and trigger the corresponding model call solution based on the determined target model type.
[0048] Specifically, the target model type includes one or more of: timed task type, event trigger type, and algorithm optimization type. The triggering of the corresponding model scheduling solution based on the determined target model type includes: if the target model type is the timed task type, determine the model scheduling moment based on a preset time sequence table; at each model scheduling moment, correspondingly call the data query RestfulApi provided by the system service to perform program integration; call the model based on the integrated program.
[0049] Preferably, triggering a corresponding model scheduling scheme based on the determined target model type includes: if the target model type is event-triggered, monitoring preset trigger events; in response to a trigger signal of a preset trigger event, retrieving the corresponding model; wherein the preset trigger event is data update trigger or alarm data trigger.
[0050] Embodiment 4:
[0051] The model implements a timing task within the call layer (for example, execute once every 10 minutes), calls various data query RestfulApis provided by the system service, and after program integration and summary, transfers parameters to call the method of the algorithm layer.
[0052] In a possible implementation manner, when the model scheduling is performed in the solution of the present invention, it includes two layers of services: the scheduling layer service and the algorithm layer service. The function of the scheduling layer is:
[0053] (1) Call the interface function of the algorithm layer;
[0054] (2) Obtain data from the platform service;
[0055] (3) Provide restfulApi service externally.
[0056] The function of the algorithm layer is:
[0057] (1) Integrate professional algorithm packages such as process, equipment, and environmental protection;
[0058] (2) Provide restfulApi service externally, accept request parameters and execute specific algorithms;
[0059] (3) Return the calculation results of the algorithm model.
[0060] Preferably, different chemical plants have different usage frequencies for each model. To ensure the model extraction efficiency, preferably, for models with a usage frequency greater than a preset threshold, the corresponding refining plant stores the model locally so that when a model operation needs to be performed, it can be directly executed based on the local model. For models with a usage frequency lower than the preset threshold, the model is extracted through the image repository, and the local model is deleted after use. Or directly transmit the data to be processed to the cloud, perform data processing based on the cloud model, and the local only receives the processed information fed back and does not need to execute the model locally.
[0061] Preferably, triggering a corresponding model scheduling scheme based on the determined target model type includes: if the target model type is event-triggered, monitoring preset trigger events; in response to a trigger signal of a preset trigger event, retrieving the corresponding model; wherein the preset trigger event is data update trigger or alarm data trigger.
[0062] Specifically, such a scheduling method is triggered by the system service to send a message notification to the algorithm model for execution, realizing the monitoring of the message queue service (Kafka). There are two scenarios: real-time data update trigger and alarm data trigger.
[0063] Preferably, triggering the corresponding model scheduling scheme based on the determined target model type includes: if the target model type is algorithm optimization type, then in response to the algorithm optimization scenario trigger signal, call the corresponding algorithm optimization type model; receive the model input parameters based on the restful interface, and combine the model input parameters to be passed to the model in json format.
[0064] Specifically, such a scheduling method is provided with a restful interface by the model to receive the model input parameters. The system actively triggers the algorithm execution in the algorithm optimization scenario, calls the above interface, combines the model input parameters, and passes them to the model in json format. After receiving the request parameters, the model completes the execution of the algorithm and stores the results.
[0065] Step S40: Execute the model call scheme, and extract the model image based on the optimization scheme.
[0066] Specifically, there are multiple image repositories. When each local refining device has an image extraction requirement, first judge the image extraction delay of each image repository, and select the image repository with the lowest delay for image extraction to ensure the response speed. If image extraction is recognized, it is also possible to establish communication with other local refining devices with corresponding images, and use the corresponding local refining device as a relay node for image extraction.
[0067] Embodiment Five:
[0068] First, implement a timed heartbeat to notify the platform service of the running status of the model. At the same time, implement the restful interfaces for starting, stopping, and restarting the algorithm layer. When the service stops, the platform service will call these interfaces to ensure the normal operation of the algorithm layer. A timed task runs in the scheduling layer, which regularly obtains the data required for calculation from the platform service system api (the only parameter is the registration code FCC1010001 of the model), calls the basic algorithm api of the above algorithm layer to obtain the result, and then calls the platform service api to store the result in the database. The table structure is agreed upon in the first step of algorithm registration. It is known that this algorithm uses an event-triggered call method, which adds a message queue service to the system architecture. When any update occurs in the input parameters selected by the algorithm, a json-formatted string message will be sent to the message queue service, with the format {type: "rt_update", msg: "FCC1010001 data update"}, where type refers to the message type and msg refers to the message content. The scheduling layer sends a message to the platform service to obtain the model input parameters. The platform service returns the corresponding parameters according to the model code. Subsequently, the scheduling layer implements the call to the algorithm and returns the algorithm calculation result, and finally stores the calculation result in the platform service.
[0069] Figure 3 It is the system structure diagram of a multi-model management system provided by an embodiment of the present invention. As Figure 3 shown, an embodiment of the present invention provides a multi-model management system, and the system includes:
[0070] An acquisition unit, configured to identify the request content corresponding to the request signal in response to the model management request signal.
[0071] Specifically, the model management request signal includes: a model registration request signal, a model update request signal, and a model call request signal.
[0072] Further, the identifying the request content corresponding to the request signal includes: the request content of the model registration request signal includes applying for a model code and building an image; the request content of the model update request signal includes image replacement; the request content of the model call request signal includes extracting a target model.
[0073] In the embodiment of the present invention, in the actual application process, there may be various model management requirements. For example, the new model registration requirement for new services, the update requirement for historical models, and the model call requirement based on the current need. The solution of the present invention needs to execute corresponding model management solutions based on different model management requirements.
[0074] In an embodiment of the present invention, in view of the characteristics of multiple links and a huge amount of point data in the production process of the fluid catalytic cracking unit, there are problems such as difficulty in integrating and managing various business models such as process, equipment, environmental protection, and operation, and the lack of a unified platform. The present invention provides a multi-concurrency, highly reliable model integration, scheduling, and management technology, and constructs a business model integration, registration, management, and scheduling optimization system to provide efficient and reliable scheduling and computing services for the models.
[0075] A scheme determination unit determines a management scheme for the model based on the request content.
[0076] Specifically, when the current request signal is a model registration request signal, the determining the management scheme for the model based on the request content includes: identifying the basic information of the model to be registered based on the request content; generating a unique code for the model to be registered based on the basic information, and determining the input parameter data group of the model to be registered; defining the output of the model to be registered as a preset standard string; constructing a model image based on the unique code of the model to be registered, the input parameter data group of the model to be registered, and the standard character, and pushing the model image to the model repository.
[0077] Basic information registration: The model provider provides the model name, model address IP, model address port number, model address root route, and model call URL. This device will generate a 10-digit unique model code based on the registration information. This code is the unique identifier of each model, and its generation rule is as Figure 2 follows. Among them, the first 4 digits represent the number of the device to which the model belongs, and this number is derived from the enterprise organization information; the middle 2 digits are determined by the model type filled in during model registration. The process class code is set to 01, the equipment class code is set to 02, the environmental protection class code is set to 03, the operation class code is set to 04, and the other class code is set to 05; the last 4 digits are the sequential code automatically generated by the model in the registration system.
[0078] Input parameter selection: According to the data characteristics of the fluid catalytic cracking unit, in order to avoid querying data in the database every time the model is calculated, the model provider needs to select the model input parameters during registration, define the parameters and parameter default values required by the model, and the system will generate the corresponding data group according to the input parameters. Each time it is called, only the relevant data in the data group needs to be read, which improves the calculation efficiency.
[0079] Furthermore, output result definition: Define the output result name, output result structure, etc. of the model. The output result structure is defined as a json string.
[0080] Preferably, the unique code of the model to be registered includes: a device number identification bit, a model type identification bit, and a sequential code identification bit.
[0081] Preferably, when the current request signal is a model update request signal, the management scheme for determining the model based on the request content includes: training a new model based on newly determined training samples; using the unique encoding of the corresponding model to be replaced as the encoding of the new model, and generating a new model image; interacting with each image repository to transfer the new model image and delete the original image.
[0082] For image management, image construction is achieved by writing a Dockerfile and the image is pushed to an image repository. Mirroring is a form of file storage and a type of redundancy where an exact copy of the data on one disk exists on another disk. Many files can be made into an image file. When opened with software like GHOST after being placed on a disk with GHOST and other programs, it reverts to many files. RAID 1 and RAID 10 use mirroring. Common image file formats include ISO, BIN, IMG, TAO, DAO, CIF, and FCD.
[0083] In the embodiments of the present invention, an image file is actually similar to a ZIP compressed package. It makes a specific series of files into a single file in a certain format for convenient user download and use, such as a beta version of an operating system, a game, etc. An image file not only has the "synthesis" function of a ZIP compressed package, but its most important feature is that it can be recognized by specific software and directly burned onto a CD. In fact, the generally defined image file can be further extended to contain more information, such as system files, boot files, partition table information, etc., so that the image file can contain all the information of a partition or even a hard disk. The classic software for using such image files is Ghost, which also has a burning function. However, its burning only saves the image file itself on the CD, while generally defined burning software can directly burn the content contained in the supported image file onto the CD.
[0084] In the embodiments of the present invention, when the present invention's solution performs image management, it stores and schedules images based on an image repository, avoiding excessive local storage of model components. When a model needs to be executed, it is directly retrieved from the image repository. The main functions of an image repository are image storage, image management, and image distribution. Each repository can contain multiple images, which are distinguished by tags. Usually, when using an image, three elements, namely the image repository type, repository application, and specific application version, should be fully considered. Through the image repository, it is convenient to share images between multiple running environments, and containers can be used to quickly simulate the same running environment to run applications, avoiding application running anomalies or inconsistent behaviors due to different running environments.
[0085] The image contains the main body of the application, as well as the operating environment, toolset, etc. required by the application. When building the image, the image repository, repository and tag of the image can be specified, or the image repository, repository and tag can be added to the image after the build is completed, so as to push the same image to different image repositories. The image repository is in a central position in image sharing and is closely related to the image repository in image building, continuous integration, image deployment, and image release.
[0086] The calling unit is used to determine the target model type based on the request content when the management scheme is the calling scheme, and trigger the corresponding model calling scheme based on the determined target model type.
[0087] Specifically, the target model type includes one or more of: timed task type, event trigger type, and algorithm optimization type. The triggering of the corresponding model scheduling scheme based on the determined target model type includes: if the target model type is the timed task type, the model scheduling time is determined based on a preset time sequence table; at each model scheduling time, the data query RestfulApi provided by the system service is called correspondingly for program integration; the model is called based on the integrated program.
[0088] Preferably, the triggering of the corresponding model scheduling scheme based on the determined target model type includes: if the target model type is the event trigger type, the preset trigger event is monitored; in response to the trigger signal of the preset trigger event, the corresponding model is retrieved; wherein, the preset trigger event is data update trigger or alarm data trigger.
[0089] The model implements a timed task (for example, executed once every 10 minutes) within the calling layer, calls various data query RestfulApis provided by the system service, and after program integration and summary, passes parameters to call the method of the algorithm layer.
[0090] In a possible implementation manner, when the model scheduling is performed in the solution of the present invention, it includes two layers of services: the scheduling layer service and the algorithm layer service. The function of the scheduling layer is:
[0091] (1) Call the interface function of the algorithm layer;
[0092] (2) Obtain data from the platform service;
[0093] (3) Provide restfulApi service externally.
[0094] The function of the algorithm layer is:
[0095] (1) Integrate professional algorithm packages such as process, equipment, and environmental protection;
[0096] (2) Provide restfulApi service externally, accept request parameters and execute specific algorithms;
[0097] (3) Return the calculation result of the algorithm model.
[0098] Preferably, different chemical plants have different usage frequencies for each model. To ensure the model extraction efficiency, preferably, for models with a usage frequency greater than a preset threshold, the corresponding refining plant stores the model locally so that when model operations need to be performed, the local model can be directly executed. For models with a usage frequency lower than the preset threshold, the model is extracted through the mirror repository, and the local model is deleted after use. Or directly transfer the data to be processed to the cloud, and perform data processing based on the cloud model. Only the processed information fed back is received locally, and the model does not need to be executed locally.
[0099] Preferably, triggering the corresponding model scheduling scheme based on the determined target model type includes: if the target model type is event-triggered, then monitor the preset trigger event; in response to the preset trigger event trigger signal, retrieve the corresponding model; where the preset trigger event is data update trigger or alarm data trigger.
[0100] Specifically, this type of scheduling method is used by the system service to send a message to notify the algorithm model to execute according to specific events, realizing the monitoring of the message queue service (Kafka). There are two scenarios: real-time data update trigger and alarm data trigger.
[0101] Preferably, triggering the corresponding model scheduling scheme based on the determined target model type includes: if the target model type is algorithm optimization type, then in response to the algorithm optimization scenario trigger signal, call the corresponding algorithm optimization type model; receive the model input parameters based on the restful interface and transfer the combined model input parameters to the model in json format.
[0102] Specifically, this type of scheduling method is provided with a restful interface by the model to receive the model input parameters. The system actively triggers the algorithm execution in the algorithm optimization scenario, calls the above interface, combines the model input parameters, and transfers them to the model in json format. After receiving the request parameters, the model completes the execution of the algorithm and stores the results.
[0103] The execution unit is used to execute the model call scheme and extract the model image based on the optimization scheme.
[0104] Specifically, there are multiple mirror repositories. When each local refining plant has a mirror extraction requirement, first judge the mirror extraction delay of each mirror repository, and select the mirror repository with the lowest delay for mirror extraction to ensure the response speed. If mirror extraction is recognized, communication can also be established with other local refining plants with corresponding mirrors, and the corresponding local refining plants are used as relay nodes for mirror extraction.
[0105] Preferably, any unit needs to transmit a heartbeat packet to the system at regular intervals. A service component that fails to upload a heartbeat packet within the specified time limit (1 minute) will be considered an unhealthy service. The heartbeat detection includes the following steps:
[0106] (1) The server polls the latest time of the heartbeat packet of each client, and a client that times out will trigger a restart;
[0107] (2) The client sends a heartbeat packet ("ping") to the server at regular intervals;
[0108] (3) When the server receives the heartbeat packet from the client, it indicates that the client is normal. The server will refresh the timer that triggers the client restart and send a response packet to the client;
[0109] (4) If the server finds that a certain client has timed out and still has not received a heartbeat packet, it means that the client of the model is abnormal, and the restart interface is called.
[0110] The embodiment of the present invention also provides a computer-readable storage medium. Instructions are stored on the computer-readable storage medium, and when running on a computer, the computer is made to execute the above multi-model management method.
[0111] Those skilled in the art can understand that all or part of the steps in the method for implementing the above embodiments can be completed by a program instructing relevant hardware. The program is stored in a storage medium, including several instructions to make a single-chip microcomputer, a chip, or a processor execute all or part of the steps of the method described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0112] The optional embodiments of the present invention have been described in detail above in conjunction with the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above embodiments. Within the technical concept scope of the embodiments of the present invention, various simple modifications can be made to the technical solutions of the embodiments of the present invention, and these simple modifications all fall within the protection scope of the embodiments of the present invention. In addition, it should be noted that, in the above specific embodiments, the various specific technical features described can be combined in any suitable manner without conflict. To avoid unnecessary repetition, the embodiments of the present invention will not separately describe various possible combination methods.
[0113] In addition, any combination can be made among various different embodiments of the present invention, as long as it does not violate the idea of the embodiments of the present invention, and it should also be regarded as the content disclosed by the embodiments of the present invention.
Claims
1. A multi-model management method, characterized in that, The method includes: In response to a model management request signal, identifying the request content corresponding to the request signal; Based on the request content, determining a management plan for the model; When the management plan is a call plan, based on the request content, determining a target model type, and triggering a corresponding model call plan based on the determined target model type; Executing the model call plan, and extracting a model image based on an optimization plan.
2. The method according to claim 1, characterized in that, The model management request signal includes: A model registration request signal, a model update request signal, and a model call request signal.
3. The method according to claim 2, wherein The identifying the request content corresponding to the request signal includes: The request content of the model registration request signal includes an application model code and building an image; The request content of the model update request signal includes image replacement; The request content of the model call request signal includes extracting a target model.
4. The method according to claim 2, wherein When the current request signal is a model registration request signal, the determining a management plan for the model based on the request content includes: Based on the request content, identifying basic information of the model to be registered; Generating a unique code for the model to be registered based on the basic information, and determining an input parameter data group of the model to be registered; Defining the output of the model to be registered as a preset standard string; Building a model image based on the unique code of the model to be registered, the input parameter data group of the model to be registered, and the standard character, and pushing the model image to a model repository.
5. The method according to claim 4, wherein The unique code of the model to be registered includes: A device number identification bit, a model type identification bit, and a sequence code identification bit.
6. The method according to claim 2, characterized in that, When the current request signal is a model update request signal, the determining a management plan for the model based on the request content includes: Training a new model based on newly determined training samples; Using the unique code of the corresponding model to be replaced as the code of the new model, and generating a new model image; Interacting with each image repository to perform transmission of the new model image and deleting the original image.
7. The method according to claim 1, characterized in that, The target model type includes: One or more of a timed task type, an event-triggered type, and an algorithm optimization type.
8. The method according to claim 7, wherein The triggering a corresponding model scheduling plan based on the determined target model type includes: If the target model type is a timed task type, determining a model scheduling time based on a preset time sequence table; At each model scheduling time, correspondingly calling a data query RestfulApi provided by a system service for program integration; Calling a model based on the integrated program.
9. The method according to claim 7, wherein The triggering a corresponding model scheduling plan based on the determined target model type includes: If the target model type is an event-triggered type, monitoring a preset trigger event; In response to a preset trigger event trigger signal, calling a corresponding model; where The preset trigger event is data update trigger or alarm data trigger.
10. The method according to claim 7, characterized in that, The triggering a corresponding model scheduling plan based on the determined target model type includes: If the target model type is an algorithm optimization type, in response to an algorithm optimization scenario trigger signal, calling a corresponding algorithm optimization type model; Receiving model input parameters based on a restful interface, and combining the model input parameters to be passed to the model in json format.
11. A multi-model management system, characterized in that, The system includes: An acquisition unit, configured to, in response to a model management request signal, identify the request content corresponding to the request signal; A solution determination unit that determines a management solution for the model based on the request content; An invocation unit that, when the management solution is an invocation solution, determines a target model type based on the request content and triggers a corresponding model invocation solution based on the determined target model type; An execution unit that executes the model invocation solution and extracts a model image based on the optimization solution.
12. A computer-readable storage medium, characterized in that, Instructions are stored on the computer-readable storage medium, and when running on a computer, cause the computer to execute the multi-model management method described in any one of claims 1-10.
13. An electronic device, the electronic 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 computer program, it implements the multi-model management method described in any one of claims 1-10.
Citation Information
Cited By
Life cycle management method and system for multiple artificial intelligence models
CN121187707A