Intelligent algorithm service platform for realizing low-code model
Through the intelligent algorithm service platform, low-code model construction and deployment functions are provided, which solves the complex problems of AI model development and deployment processes, and simplifies the development process, improves development efficiency and enhances algorithm integration flexibility.
Patent Information
- Application Number
- CN202411888805.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-15
AI Technical Summary
The development and deployment process of existing AI models is complex, requiring professional technical knowledge and programming skills, which is difficult to meet the needs of non-technical personnel, and the model serviceability and computing resource utilization are insufficient.
It provides an intelligent algorithm service platform, including user interaction module, algorithm model construction module, two-stage verification module, staged execution module and execution result feedback module. Through low-code model construction and deployment, the development process is simplified and development efficiency is improved.
Users can build and deploy AI models in low code, simplify development processes, lower usage thresholds, improve development efficiency, enhance algorithm integration flexibility, simplify model deployment processes, and improve GPU utilization.
Smart Images

Figure CN119829047A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence (AI) technology, and in particular to an intelligent algorithm service platform for implementing a low-code model. Background Art
[0002] In recent years, artificial intelligence (AI) and machine learning (ML) technologies have been widely used. From image recognition, speech processing to natural language understanding, all walks of life are using these technologies to achieve automation and intelligence. However, the existing AI model development and deployment process still has many challenges and limitations.
[0003] First, building and training efficient AI models requires professional technical knowledge and programming skills, including data preprocessing, feature engineering, algorithm selection, etc. This is a major obstacle for non-technical personnel and limits the popularization and application of AI technology. Although some model development platforms on the market provide a visual development environment, these platforms often have single functions and lack flexibility, making it difficult to meet user customization needs.
[0004] Secondly, the traditional AI development process is cumbersome and involves multiple steps, each of which requires different tools and environments. For example, data preprocessing may require the use of Python's pandas library, and model training and evaluation may require the use of deep learning frameworks such as TensorFlow or PyTorch. This increases the complexity and time cost of development.
[0005] In terms of algorithm integration, the support of existing platforms is also relatively limited. Users often cannot easily combine different types of algorithms (such as decision trees, neural networks, support vector machines, etc.) to build complex hybrid models. This limitation restricts users' creativity and flexibility in model development.
[0006] In addition, model servitization is another major challenge. After model training is completed, how to deploy the model as a callable service usually requires users to manually write code, involving server configuration, API development and other processes. This is particularly difficult and error-prone for users who lack programming experience. Even for experienced developers, this process is time-consuming and cumbersome.
[0007] The existing technology also has insufficient utilization of computing resources during model training. Especially for deep learning models that require a lot of computing resources, how to efficiently utilize GPU (graphics processing unit) resources and speed up training is an urgent problem to be solved. Summary of the invention
[0008] In order to solve technical problems such as difficulties in model construction and deployment, and complex development processes, the present invention provides an intelligent algorithm service platform for implementing low-code models, so that users can build and deploy AI models, greatly simplify the development process, lower the usage threshold, and improve development efficiency.
[0009] The technical solution adopted by the present invention is:
[0010] An intelligent algorithm service platform for realizing a low-code model, comprising a user interaction module, an algorithm model construction module, an algorithm model two-stage verification module, an algorithm model staged execution module, an algorithm model execution result feedback module and a storage device;
[0011] in,
[0012] User interaction module, used for users to configure task model information and visualize the platform execution process and results;
[0013] The user configures the task model information including: the user configures multiple algorithm models required to execute the current task based on the algorithm model pool provided by the platform, and whenever the user interaction module detects that the user selects an algorithm model from the algorithm model pool, the user is prompted to complete the algorithm and data representation content required by the current algorithm model based on the algorithm and data representation (DHPTS) predefined by the platform, and an algorithm description file of each algorithm model of the current task model is generated and stored in the memory;
[0014] The representation items of algorithm and data representation include data type (DT), hierarchy (H), parameter information (PI), training features (TF) and stage definition (SD); training features include training part and deployment part, and stage definition is divided into execution stage of training part and execution stage of deployment part. The execution stage of training part includes: initialize, execute, persist and cleanup; the execution stage of deployment part includes: deploy_initialize, deploy and inference.
[0015] The algorithm model building module builds a directed acyclic graph (DAG) model based on the task model information configured by the user. Each node of the directed acyclic graph model is an algorithm model, and the edges between the nodes are concrete representations of data flow, which are determined based on the hierarchical relationship configured by the user.
[0016] The algorithm model two-stage verification module is used to perform two-stage verification on the algorithm model construction module when constructing a directed acyclic graph model: real-time local verification (Local Validation, LV), whenever it is detected that the algorithm model construction module is executing a connection step between two nodes, the data type and hierarchical relationship in the algorithm description file of the algorithm model corresponding to the current two nodes are read from the memory for real-time local verification. If the predefined verification criteria are passed, the current connection step is allowed to be executed, otherwise the user is prompted with an error and modified to ensure modeling fault tolerance; overall verification (Global Validation, GV), when it is detected that the algorithm model construction module has completed the construction of the directed acyclic graph model, the overall structure is verified to ensure the rationality of the model construction, and the directed acyclic graph model that passes the overall verification is sent to the algorithm model staged execution module;
[0017] The algorithm model phased execution module allocates an idle container execution body to each directed acyclic graph model. Each container execution body includes several algorithm model phased execution training modules and several algorithm model phased execution deployment modules.
[0018] The container execution body allocates an execution training module / execution deployment module to each node of the directed acyclic graph model based on the stage definition of the current directed acyclic graph model: each execution training module / execution deployment module reads the algorithm description file of the algorithm model corresponding to the current node from the memory to execute the operation processing of each stage of the current algorithm model, and stores the execution results of each stage in the memory, so that each execution training module / execution deployment module of the current container execution body can read input data (that is, the input data of the algorithm model processed by the execution training module / execution deployment module is the output of another algorithm model). The container execution body obtains the total execution result of the task model corresponding to the current directed acyclic graph model based on the execution result of the execution training module / execution deployment module corresponding to the last node of the current directed acyclic graph model and stores it in the memory;
[0019] The algorithm model execution result feedback module reads the total execution result of the current directed acyclic graph model and the execution results of each algorithm model from the memory, and visually displays the platform execution process and execution results to the user through the user interaction module.
[0020] Furthermore, a log recording module is included to record the operation logs of the container execution body at each stage of the execution process.
[0021] Furthermore, the algorithm and data representation items of this application are specifically as follows:
[0022] Data Type (DT) is used to ensure the correct transfer of data between algorithm nodes. Data types are used to describe the acceptable input / output data form and structure of algorithm nodes.
[0023] Including basic types (such as integers, floating point numbers, strings), complex types (such as arrays, objects, lists), and special types (such as images, audio). Through detailed descriptions of data types, the data interface between algorithm nodes can be clarified, the correctness and consistency of data flow can be ensured, and the rigor and efficiency of model construction and management can be improved;
[0024] Hierarchy (Hierarchy, H): In the process of model construction, there is a partial order relationship between algorithm nodes. In order to ensure that the algorithm model can be connected and executed in the correct order, the hierarchical relationship is used as a standard. Each algorithm node has its specific position and execution order in the task model. This partial order relationship ensures that the data flow is transmitted along the expected path to avoid logical errors and data flow interruptions. Through a detailed description of the hierarchical relationship, the partial order and connection correctness of the algorithm nodes in the model construction can be ensured, and the fault tolerance of the algorithm model can be improved.
[0025] Parameter Info (PI): Parameter information represents the properties of the algorithm node, which is divided into training parameters and deployment parameters, covering the name, unique key value, input range, explanation and default value of each parameter. Each parameter has a unique key value, which is used to identify and lock the parameter. The parameter input range provides users with a valid value range and participates in the verification when the parameter is input to ensure the legitimacy of the parameter value. During the model building phase, users can modify the default value according to their needs and customize the model.
[0026] Training Features (TF): In this application, the entire task model construction process is divided into two parts: the training part and the deployment part, which require the construction of training graphs and deployment graphs. The training graph formally expresses the training logic of the algorithm model, and the deployment graph formally expresses the reasoning logic of the algorithm model. The model building process involves a variety of algorithms, some of which need to be trained to optimize the model performance before deploying reasoning (called "training algorithms"), while some can be used directly for deployment reasoning without prior training (called "non-training algorithms"). In order to effectively distinguish these two types of algorithms, the attributes of the algorithm's training features (TF) are defined. By using TF, the system can automatically screen and distinguish the algorithms that need to be trained, thereby preventing non-training algorithms from being mistakenly included in the training graph.
[0027] Stage Definition (SD): Defined according to the initialization, execution, persistence, cleanup, deployment initialization (deploy_initialize), deployment, and inference stages.
[0028] Furthermore, the node representation, variable edge representation and sequential connection of the directed acyclic graph model constructed by the algorithm model construction module are specifically as follows:
[0029] The node representation includes but is not limited to: the name of the algorithm model, parameter settings and algorithm description information; and the algorithm model construction module provides users with editing functions and visual display of nodes through the user interaction module.
[0030] Edge representation is used to characterize the direction and order of data flow. The algorithm model building module provides users with an edge representation configuration interface through the user interaction module. For example, by dragging an algorithm node, the user connects the output of the previous algorithm node to the input of the next algorithm node to ensure that data flows correctly.
[0031] Sequential connection, the nodes in the directed acyclic graph model are arranged according to the hierarchical relationship H, and are constructed according to the sequential relationship starting from the starting point. The algorithm model construction module uses a visual display through the user interaction module to help users understand the construction process of the task model to ensure that the order of the algorithm nodes in each stage is reasonable.
[0032] Furthermore, the real-time local verification of the two-stage verification module of the algorithm model includes the partial order verification of the algorithm and the matching check of the data types connected by the algorithm, which are specifically:
[0033] Algorithm partial order check: Ensure the partial order of model connections based on the defined algorithm hierarchy;
[0034] Matching check of data types connected by the algorithm: Matching check is performed based on the data types of the algorithm connections defined in the algorithm description file.
[0035] Preferably, the algorithm partial order check is set to: only allow low-level algorithm model H i Connect to high-level algorithm model H j Or the same-level algorithm, where i and j are used to characterize the hierarchical level of the algorithm model in the task model, and i<=j.
[0036] Preferably, the matching check of the data type of the algorithm connection is set as follows: the input and output data types are divided into multiple types, and the multiple types include a wildcard type (for example, defined as type *, which can match any type); if the output data type T of the pre-order algorithm model (the algorithm model corresponding to the pre-order node) in the directed acyclic graph model out Cannot be used with the post-order algorithm model's input data type T in If they do not match, the nodes corresponding to the two algorithm models are prohibited from being connected and the matching check fails.
[0037] Furthermore, the overall verification check items include: verifying that each algorithm node N i Are they all connected correctly? Is there any unconnected algorithm node N? isolate , and whether there are redundant or redundant connections E redundant .
[0038] Furthermore, the execution stages of the phased execution training module of the algorithm model are:
[0039] 1) Initialization phase: used to set the initial state of the algorithm model and read configuration parameters, and prepare the execution environment required for algorithm execution;
[0040] 2) Execution training phase: Run the main logic part of the algorithm model in the training phase to perform data processing and calculation;
[0041] 3) Persistence stage: save the model files and intermediate results generated during the execution of the algorithm model to ensure the persistent storage of data;
[0042] 4) Cleanup phase: Clean up temporary data generated during the execution of the algorithm model and release resources to ensure the stability of the system
[0043] Furthermore, the execution phases of the algorithm model phased execution deployment module are:
[0044] 1) Deployment initialization phase: configure and initialize the deployment phase parameters of the algorithm model in the task model usage environment to ensure that the algorithm model can be used correctly for reasoning;
[0045] 2) Deployment phase: Load the data and model files stored in the algorithm model’s staged execution training module, deploy the task model to the production environment so that it can be called and used by external systems, and provide support for the inference phase;
[0046] 3) Reasoning phase: Receive input data and generate prediction results or outputs in the task model usage environment, and can provide real-time or batch processing capabilities.
[0047] Specifically, each execution phase of the algorithm model's staged execution training module and the algorithm model's staged execution deployment module is specifically set as follows:
[0048] The initialization phase includes: parsing the configuration file, obtaining the data path, setting the storage path, and logging;
[0049] The execution training phase includes: data loading, real-time monitoring and logging;
[0050] The persistence phase includes: persistent storage and logging;
[0051] The cleaning phase includes: temporary data cleaning, resource release, and cache cleaning;
[0052] The deployment initialization phase includes: parsing deployment parameters and obtaining training result paths;
[0053] The deployment phase includes: data loading, model validation, and logging;
[0054] The reasoning phase includes: data reception, model reasoning execution, result return, multiple reasoning, real-time feedback, logging, and error handling.
[0055] The technical solution provided by the present invention brings at least the following beneficial effects:
[0056] The solution proposed in this invention allows users to easily build complex models, integrate multiple algorithms, and train models by intuitively dragging and connecting components, and automatically generate a callable model service interface after training. Through this innovation, users can build and deploy models in a low-code environment, which greatly simplifies the development process, lowers the usage threshold, and improves development efficiency.
[0057] The present invention has significant advantages in lowering the usage threshold, improving development efficiency, enhancing algorithm integration flexibility, simplifying the model deployment process, accelerating training speed and improving GPU utilization. It can effectively solve many problems in the existing technology and promote the popularization and application of artificial intelligence technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0059] Figure 1 A schematic diagram of the architecture of an intelligent algorithm service platform for implementing a low-code model provided in an embodiment of the present invention.
[0060] Figure 2 It is a schematic diagram of the staged operation of the model in an embodiment of the present invention. DETAILED DESCRIPTION
[0061] To make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be described in detail and completely in conjunction with the drawings in the implementation of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings can be arranged and designed using different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present invention.
[0062] In one embodiment, see Figure 1 An intelligent algorithm service platform for implementing a low-code model provided by an embodiment of the present invention includes: a user interaction module, an algorithm model construction module, an algorithm model two-stage verification module, an algorithm model staged execution module, an algorithm model execution result feedback module and a memory.
[0063] Among them, the user interaction module is used for the user to configure the task model information, and to visualize the platform execution process and execution results (in this embodiment, the data display layer based on the intelligent algorithm service platform is used for visual output, and the data display layer can be a display, an electronic display screen, etc.); the user configuration task model information includes: the user configures multiple algorithm models required to execute the current task based on the algorithm model pool provided by the platform, and whenever the user interaction module detects that the user selects an algorithm model from the algorithm model pool, the user is prompted to complete the algorithm and data representation content required for the current algorithm model based on the algorithm and data representation (DHPTS) predefined by the platform, and the algorithm description file of each algorithm model of the current task model is generated and stored in the memory; wherein the representation items of the algorithm and data representation include data type (DataType, DT), hierarchical relationship (Hierarchy, H), parameter information (Parameter Info, PI), training features (TF) and stage definition, SD); training features include training part and deployment part, and stage definition is divided into execution phase of training part and execution phase of deployment part. The execution phase of training part includes: initialize, execute, persist and cleanup; the execution phase of deployment part includes: deploy_initialize, deploy and inference;
[0064] The algorithm model building module builds a directed acyclic graph (DAG) model based on the task model information configured by the user. Each node of the directed acyclic graph model is an algorithm model, and the edges between the nodes are concrete representations of data flow, which are determined based on the hierarchical relationship configured by the user.
[0065] The algorithm model two-stage verification module is used to perform two-stage verification on the algorithm model construction module when constructing a directed acyclic graph model: real-time local verification (Local Validation, LV), whenever it is detected that the algorithm model construction module is executing a connection step between two nodes, the data type and hierarchical relationship in the algorithm description file of the algorithm model corresponding to the current two nodes are read from the memory for real-time local verification. If the predefined verification criteria are passed, the current connection step is allowed to be executed, otherwise the user is prompted with an error and modified to ensure modeling fault tolerance; overall verification (Global Validation, GV), when it is detected that the algorithm model construction module has completed the construction of the directed acyclic graph model, the overall structure is verified to ensure the rationality of the model construction; the directed acyclic graph model that passes the overall verification is sent to the algorithm model staged execution module;
[0066] The algorithm model phased execution module allocates an idle container execution body to each directed acyclic graph model. Each container execution body includes several algorithm model phased execution training modules and several algorithm model phased execution deployment modules.
[0067] The container execution body allocates an execution training module / execution deployment module to each node of the directed acyclic graph model based on the stage definition of the current directed acyclic graph model: each execution training module / execution deployment module reads the algorithm description file of the algorithm model corresponding to the current node from the memory to execute the operation processing of each stage of the current algorithm model, and stores the execution results of each stage in the memory, so that each execution training module / execution deployment module of the current container execution body can read input data (that is, the input data of the algorithm model processed by the execution training module / execution deployment module is the output of another algorithm model). The container execution body obtains the total execution result of the task model corresponding to the current directed acyclic graph model based on the execution result of the execution training module / execution deployment module corresponding to the last node of the current directed acyclic graph model and stores it in the memory;
[0068] The algorithm model execution result feedback module reads the total execution result of the current directed acyclic graph model and the execution results of each algorithm model from the memory, and visually displays the platform execution process and execution results to the user through the user interaction module.
[0069] In one embodiment, an intelligent algorithm service platform for implementing a low-code model according to an embodiment of the present invention also includes a logging module for recording operation logs of the container executor at various stages during the execution process.
[0070] In one embodiment, the algorithm and data representation items of the present application are specifically:
[0071] Data Type (DT) is used to ensure the correct transfer of data between algorithm nodes. Data types are used to describe the acceptable input / output data form and structure of algorithm nodes.
[0072] Including basic types (such as integers, floating point numbers, strings), complex types (such as arrays, objects, lists), and special types (such as images, audio). Through detailed descriptions of data types, the data interface between algorithm nodes can be clarified, the correctness and consistency of data flow can be ensured, and the rigor and efficiency of model construction and management can be improved;
[0073] Hierarchy (Hierarchy, H): In the process of model construction, there is a partial order relationship between algorithm nodes. In order to ensure that the algorithm model can be connected and executed in the correct order, the hierarchical relationship is used as the standard. Each algorithm node has its specific position and execution order in the task model. This partial order relationship ensures that the data flow is transmitted along the expected path to avoid logical errors and data flow interruptions. Through a detailed description of the hierarchical relationship, the partial order and connection correctness of the algorithm nodes in the model construction can be ensured, and the fault tolerance of the algorithm model can be improved.
[0074] Parameter Info (PI): Parameter information represents the properties of the algorithm node, which is divided into training parameters and deployment parameters, covering the name, unique key value, input range, explanation and default value of each parameter. Each parameter has a unique key value, which is used to identify and lock the parameter. The parameter input range provides users with a valid value range and participates in the verification when the parameter is input to ensure the legitimacy of the parameter value. During the model building phase, users can modify the default value according to their needs and customize the model.
[0075] Training Features (TF): In this application, the entire task model construction process is divided into two parts: the training part and the deployment part, which require the construction of training graphs and deployment graphs. The training graph formally expresses the training logic of the algorithm model, and the deployment graph formally expresses the reasoning logic of the algorithm model. The model building process involves a variety of algorithms, some of which need to be trained to optimize the model performance before deploying reasoning (called "training algorithms"), while some can be used directly for deployment reasoning without prior training (called "non-training algorithms"). In order to effectively distinguish these two types of algorithms, the attributes of the algorithm's training features (TF) are defined. By using TF, the system can automatically screen and distinguish the algorithms that need to be trained, thereby preventing non-training algorithms from being mistakenly included in the training graph.
[0076] Stage Definition (SD): Defined according to the initialization, execution, persistence, cleanup, deployment initialization (deploy_initialize), deployment, and inference stages.
[0077] In one embodiment, the node representation, edge representation and sequential connection of the directed acyclic graph model constructed by the algorithm model construction module are specifically as follows:
[0078] Node Representation (NR): Each algorithm node is represented as a node N in the DAG graph. These nodes contain not only the name of the algorithm node, but also detailed parameter settings and algorithm description information. For example, the main parameters of the algorithm, such as learning rate, number of iterations, etc., may be displayed on the node, and editing functions are provided, and users can modify these parameters directly on the graph. The visual display of the nodes enables users to intuitively understand the specific role and configuration of each algorithm node, which is convenient for debugging and optimization.
[0079] Edge Representation (ER): The connections between algorithm nodes are represented by edges E, which show the direction and order of data flow. Users drag algorithm nodes to connect the output of the previous algorithm node to the input of the next algorithm node to ensure the correct flow of data. The design of edges reflects the linear order of data processing flow and avoids data loops or logical errors.
[0080] Sequential Connection (SC): The nodes in the DAG graph are arranged in a hierarchical relationship H and constructed in sequential order starting from the starting point. The visual display of the hierarchical relationship helps users understand the construction process of the entire model and ensures the reasonable order of algorithm nodes at each stage. For example, the data preprocessing node can be placed on the far left of the graph and connected to the feature extraction, training, and inference nodes in sequence to form a clear workflow line.
[0081] In one embodiment, the real-time local verification of the algorithm model two-stage verification module includes algorithm partial order verification and matching check of the data types connected by the algorithm. Specifically:
[0082] Algorithm partial order verification: According to the defined algorithm hierarchical relationship, ensure the partial order of the connections of the model. Specifically, only allow low-level algorithms H i to be connected to high-level algorithms H j or the same-level algorithms, where (i <= j), and prohibit high-level algorithms H j from being connected to low-level algorithms H i , where j < i. This mechanism ensures the feasibility and logical consistency of the model after construction. For example, the data preprocessing algorithm H1 must be connected before the feature extraction algorithm H2, and the feature extraction algorithm (H2) must be connected before the model training algorithm H3. This strict hierarchical control not only prevents logical errors but also improves the structuring and standardization of the model.
[0083] Matching check of the data types connected by the algorithm: Perform a matching check according to the data types connected by the algorithm defined in the algorithm description file. Specifically, classify the input and output data types into multiple types, such as txt, csv, img, dataframe, mp4, etc. Among them, type * can match any type, representing a general data type. If the output data type T of the previous algorithm out cannot match the input data type T of the subsequent algorithm in , the two algorithms cannot be connected. For example, if the output T of algorithm A1 out is of img type, while the input T of algorithm A2 in requires csv type, then these two algorithms cannot be directly connected. This matching check mechanism ensures the correctness and consistency of the data flow and prevents model errors caused by data type mismatches.
[0084] The overall verification (verification of the rationality of the overall model composition) of the algorithm model two-stage verification module is used to comprehensively check whether the composition of the model conforms to logic and ensure its running stability. It includes: verifying whether each algorithm node N i is correctly connected and whether there are unconnected algorithm nodes N isolate, and whether there are redundant or redundant connections E redundant For example, when the model is built, if there is an isolated algorithm node N isolate , it means that there is an error in the overall structure. In addition, the logical coherence of the entire model needs to be checked to ensure that the connection of each algorithm is logical and all necessary algorithm steps are correctly included. This rationality verification ensures the stability and reliability of the model in actual operation and avoids runtime errors and exceptions.
[0085] In one embodiment, each execution phase of the phased execution training module of the algorithm model specifically includes:
[0086] 1) Initialization phase: used to set the initial state of the algorithm and read configuration parameters, and prepare the environment required for algorithm execution. The specific contents are as follows:
[0087] Parsing configuration files: Read and parse the algorithm description files in each algorithm node to extract the parameter information required for the training phase. This step ensures that each algorithm node can correctly read and apply its specific parameter settings during the training process.
[0088] Data path acquisition: Obtain the path information of data storage to ensure that the algorithm can correctly access and process the training data. By accurately locating the location of the training data, the algorithm can efficiently read and preprocess the data and prepare for the subsequent training process.
[0089] Storage path settings: Set the storage path for data results and model files in the persistent storage phase of the algorithm. Clear storage path settings help to orderly store and manage data and model files in subsequent steps, ensuring that result files and model files can be correctly saved and retrieved.
[0090] Logging: To help users understand the execution status and possible problems of the initialization phase, the operation log of the initialization phase is recorded, including the configuration file information read and parsed, parameter display, data path information, etc. These log information provides detailed records for subsequent tracking and analysis.
[0091] 2) Execute training phase (execute): Run the main logic part of the algorithm training phase, perform data processing and calculation, the specific contents are as follows:
[0092] Data loading: Load training data according to the data path information to ensure that the data can be correctly read and processed by the algorithm. Data loading includes reading data files from the storage path, parsing data formats, and processing data anomalies to ensure data integrity and quality.
[0093] Model training: The training process of the algorithm is performed using the loaded data and configured parameters, including model construction, training, and optimization. The training process involves multiple rounds of iterations, with the prediction results calculated through forward propagation and the model parameters updated through backpropagation to minimize the loss function. Optimization algorithms such as gradient descent, Adam, etc. are applied during the training process to accelerate convergence and improve model performance.
[0094] Real-time monitoring: Real-time monitoring of key indicators in the training process, such as loss function value, accuracy, etc., provides immediate feedback. The monitoring system will collect and display various performance indicators in the training process, generate real-time training curves, and help users to promptly discover and solve problems in training. An alarm mechanism can also be set. When certain indicators are abnormal, the system will immediately notify the user to take measures.
[0095] Logging: Log information during the training process is recorded in detail, including training progress, parameter adjustments, model performance, etc., to ensure the transparency and traceability of the training process. The log content covers detailed information for each iteration, such as changes in parameter values, changes in loss functions, and the time taken for each round of training. The log system also supports log retrieval and analysis, making it easier for users to trace back and optimize the training process. In addition, when errors occur during training, error information is recorded and a corresponding processing mechanism is provided.
[0096] 3) Persistence stage (persist): Save the model files and intermediate results generated during the algorithm execution to ensure the persistent storage of data. The specific contents are as follows:
[0097] Persistent storage: The data results and model files obtained during the execution phase are persistently stored in the specified path to ensure the integrity and availability of the model files. Persistent storage includes saving the model weights, configuration files, intermediate results and other data to the MinIO storage system. The system will create an appropriate folder structure to organize and classify the stored data for subsequent access and management.
[0098] Logging: Records the operation logs of the persistence phase, including the data results and the save path of the model file, to ensure the transparency and traceability of the storage process. The log content covers each step of the persistence operation, such as the file save start time, end time, save path, file size, verification results, etc. The log system supports monitoring and auditing of persistence operations, making it easier for users to track and troubleshoot problems in the storage process.
[0099] 4) Cleanup phase: Clean up temporary data and release resources generated during the execution of the algorithm to ensure the stability of the system. The specific contents are as follows:
[0100] Temporary data cleaning: To prevent the waste of disk space and data confusion, it is necessary to delete temporary data and files generated during the execution process during the cleaning phase. During the cleaning process, the system will scan the specified temporary folders and cache directories, delete the intermediate files, temporary logs, and temporary data sets that are no longer needed, to keep the storage system clean and efficient.
[0101] Resource release: Releases system resources occupied during execution, including memory, CPU, GPU, etc., to ensure reasonable allocation and efficient use of system resources. The cleanup operation closes unreleased file handles, terminates processes and threads that occupy resources, reclaims unused memory blocks, releases GPU memory, etc., to avoid resource leakage and performance degradation.
[0102] Cache cleaning: Cleans cached data generated during algorithm execution to prevent data conflicts and repeated calculations. Cache cleaning includes deleting memory cache, disk cache, and network cache to ensure that subsequent executions will not produce incorrect results due to cached data. The system uses a cache management mechanism to identify and clean up cached data that is no longer needed, while retaining useful cache to improve performance.
[0103] Furthermore, the execution phases of the algorithm model phased execution deployment module specifically include:
[0104] 1) Deployment initialization phase (deploy_initialize): Configure and initialize the deployment phase parameters of the algorithm in the production environment to ensure that the algorithm can be used correctly for reasoning. The specific contents are as follows:
[0105] Parsing deployment parameters: Read and parse the deployment phase parameter information in the algorithm description file, and extract the configuration parameters related to the deployment.
[0106] Obtaining the path of training results: Obtain the storage path information of the training result files from the algorithm description file. This step ensures that the deployment phase can correctly access and use the training result files, including model files, parameter files, and other auxiliary data. By parsing the configuration file, confirm the location of the model files and other related resources to ensure that they can be correctly loaded and used during the deployment process.
[0107] 2) Deployment phase (deploy): Load the persistently stored data and model files, deploy the model to the production environment so that it can be called and used by external systems, and provide support for the inference phase. The specific contents are as follows:
[0108] Data loading: First, load the trained data results and model files from the specified storage path. This includes model parameter files, intermediate data generated during training, auxiliary files, etc. Ensuring that these files can be correctly read and used by the deployment environment is the key to the deployment process. Through an efficient data loading mechanism, loading time is reduced and deployment efficiency is improved.
[0109] Model validation: Model validation is a key step in the deployment phase, and the system will perform detailed validation on the loaded model file. This includes checking the integrity of the model file to ensure that there is no damage or data loss during the transmission process. In addition, version matching checks are performed to ensure the compatibility of the model with the deployment environment to prevent prediction errors or system crashes caused by inconsistent versions.
[0110] Logging (based on the logging module): To ensure the transparency and traceability of the deployment process, the system will record detailed operation logs at each key step. The logs will include important information such as the path information of data loading, the results of model verification, the details of environment initialization, and the status of service startup. These logs not only help track every operation in the deployment process, but also provide key clues to trace the root cause of the problem when a problem occurs. And when any error is detected during loading, verification, or initialization, the error information will be recorded in detail.
[0111] 3) Inference phase: receiving input data and generating prediction results or outputs in a production environment, providing real-time or batch processing capabilities. The specific contents are as follows:
[0112] Data reception: The inference phase first receives new data passed in by the user. This data is submitted through API requests and file uploads. It is necessary to ensure that the data format and content meet the input requirements of the model. In order to effectively manage and access this data, the data is usually stored in a storage system such as MinIO for subsequent processing and calling.
[0113] Model inference execution: Once the data is received and stored, the system uses the loaded model to reason about the data, ensuring that the model can effectively generate corresponding prediction results or outputs based on the input data.
[0114] Result return: After the inference is completed, the system returns the generated prediction results or outputs to the user or other systems. The results are returned in the form of real-time API responses, file download links, etc. to meet the needs of different application scenarios.
[0115] Multiple inferences: In order to enable the same model to receive and process different batches of data input multiple times without reloading or initializing the model between each inference service call, especially for application scenarios that require high throughput and low latency, the system is able to handle the needs of multiple loop calls to the inference service. This capability improves the efficiency and performance of the system.
[0116] Real-time feedback: During the inference process, the system provides real-time feedback to monitor the inference progress, time consumption, and resource utilization. This information is critical for performance optimization and system tuning, ensuring that the system can maintain stable operation under high load and changing environments.
[0117] Logging (based on the logging module): To ensure the transparency and traceability of the reasoning process, the system records the key steps and events of each reasoning operation in detail. The log includes information such as data reception time and reasoning results, helping to track and analyze system performance and potential problems.
[0118] Error handling: If an error occurs during the reasoning process, the system will record the error information and take appropriate measures. Error handling includes error logging, automatic retry, alarm notification, or rollback to the last stable state to ensure the stability and reliability of the reasoning process.
[0119] In one embodiment, a model phased operation of an intelligent algorithm service platform for implementing a low-code model of the present invention includes:
[0120] (1) Saving information to a specified database in memory, including:
[0121] First, during the model building process of the algorithm model building module, the custom parameter information of each algorithm node is recorded in detail. This information includes parameter name, parameter value, and other relevant configuration details. By storing this data in JSON format, it is ensured that these parameters can be correctly read and applied at different stages of the model, thereby maintaining the consistency and repeatability of the model.
[0122] In addition, the algorithm connection order is recorded in detail. This includes recording the pre-order and post-order node information of each algorithm node to ensure that these connection relationships can be accurately used during model training. The directed acyclic graph (DAG) information with connection order is saved to the database in JSON format to ensure that the direction of data flow and processing logic remain consistent during each run.
[0123] The graph information G(N,E) in DAG is converted into json format data according to the node connection order, where the node connection order is expressed as [N1,N2,…,N n ] Process each node N in turn according to the specified order. i, generate a custom parameter P i 'JSON data, the specific data format is N i (D i ,H i ,P i ',T i ,S i ), the generated JSON data is stored in the database in node order for subsequent loading. i is the data type, H i is a hierarchical relationship, T i is the training characteristic, P i ' is the custom parameter information (Parameter Info, PI), that is, all the attribute parameter information of the algorithm model, such as its model structure, weight, bias, loss function, optimizer, etc., S i It is the stage definition, and the subscript i is the node number.
[0124] In order to enhance the efficiency of model management and retrieval, some metadata information needs to be saved. These metadata include the name, version number, creation time, last update time, creator, and description information of the algorithm model. Such metadata enables users to quickly locate and identify the required model among many algorithm models, thereby improving the efficiency of algorithm model management.
[0125] (2) Load information during the training and deployment inference phases and execute them in stages. This includes obtaining model building information from the database, such as user-defined parameter settings and the connection order of each algorithm. Read [N1, N2, …, N n ] Sequential information, get each node N i (D i ,H i ,P i ',T i ,S i )'s custom parameter information P i ', Stage S i Code that performs training and deploys inference in a sequential manner.
[0126] First, you need to create a container for training and deploying reasoning (corresponding to the container executable of this application). The container provides an isolated and independent environment for subsequent work to ensure that various operations do not interfere with each other. After the container is created, the algorithm initialization phase begins. At this stage, all algorithms (algorithm models) to be used need to be initialized. This process involves loading various resources required for training and reasoning, including but not limited to data sets, pre-trained model parameters, and other necessary configuration files.
[0127] After the initialization phase, the specific phase of algorithm execution will begin. In this phase, all algorithms will be executed in the container in a predetermined order. At the same time, this process also includes the storage and management of intermediate results to ensure that the output of each step can be used as the input of the next step, forming a complete pipeline.
[0128] Each stage of the entire process has strict checkpoints and recording mechanisms to ensure transparency and traceability of operations. This not only facilitates immediate debugging and optimization, but also provides valuable reference for future upgrades and expansions.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0130] The above are only some embodiments of the present invention. For those skilled in the art, several modifications and improvements can be made without departing from the creative concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. An intelligent algorithm service platform for implementing a low-code model, characterized in that: It includes a user interaction module, an algorithm model construction module, an algorithm model two-stage verification module, an algorithm model staged execution module, an algorithm model execution result feedback module and a memory; in, User interaction module, used for users to configure task model information and visualize the platform execution process and results; The user configures the task model information including: the user configures multiple algorithm models required to execute the current task based on the algorithm model pool provided by the platform, and whenever the user interaction module detects that the user selects an algorithm model from the algorithm model pool, the user is prompted to complete the algorithm and data representation content required by the current algorithm model based on the algorithm and data representation predefined by the platform, and an algorithm description file of each algorithm model of the current task model is generated and stored in the memory; The representation items of algorithm and data representation include data type, hierarchical relationship, parameter information, training characteristics and stage definition; the training characteristics include training part and deployment part, and the stage definition is divided into the execution stage of the training part and the execution stage of the deployment part. The execution stage of the training part includes: initialization, execution training, persistence, and cleanup; the execution stage of the deployment part includes: deployment initialization, deployment and reasoning; The algorithm model building module builds a directed acyclic graph model based on the task model information configured by the user. Each node of the directed acyclic graph model is an algorithm model, and the edges between the nodes are concrete representations of data flow, which are determined based on the hierarchical relationship configured by the user. The algorithm model two-stage verification module is used to perform two-stage verification on the algorithm model construction module when constructing a directed acyclic graph model: real-time local verification, whenever the algorithm model construction module is detected in the process of executing the connection step between two nodes, the data type and hierarchical relationship in the algorithm description file of the algorithm model corresponding to the current two nodes are read from the memory for real-time local verification. If the predefined verification criteria are passed, the current connection step is allowed to be executed, otherwise the user is prompted with an error and the step is modified; overall verification, when it is detected that the algorithm model construction module has completed the construction of the directed acyclic graph model, the overall structure is verified, and the directed acyclic graph model that passes the overall verification is sent to the algorithm model staged execution module; The algorithm model phased execution module allocates an idle container execution body to each directed acyclic graph model. Each container execution body includes several algorithm model phased execution training modules and several algorithm model phased execution deployment modules. The container execution body is based on the stage definition of the current directed acyclic graph model, and allocates an execution training module / execution deployment module to each node of the directed acyclic graph model: each execution training module / execution deployment module reads the algorithm description file of the algorithm model corresponding to the current node from the memory to execute the operation processing of each stage of the current algorithm model, and stores the execution results of each stage in the memory for each execution training module / execution deployment module of the current container execution body to read input data. The container execution body obtains the total execution result of the task model corresponding to the current directed acyclic graph model based on the execution result of the execution training module / execution deployment module corresponding to the last node of the current directed acyclic graph model and stores it in the memory; The algorithm model execution result feedback module reads the total execution result of the current directed acyclic graph model and the execution results of each algorithm model from the memory, and visually displays the platform execution process and execution results to the user through the user interaction module.
2. The platform as described in claim 1 is characterized in that it also includes a logging module for recording operation logs of the container execution body at each stage during the execution process.
3. The platform according to claim 1, characterized in that the data types, hierarchical relationships and parameter information in each representation item of the algorithm and data representation are specifically: Data types include basic types, complex types, and special types; The hierarchical relationship is used to characterize the partial order relationship of each algorithm node in the model construction process, and to characterize the position and execution order of each algorithm node in the task model; Parameter information is used to characterize the properties of algorithm nodes. It is divided into training parameters and deployment parameters, including name, unique key value, input range, explanation, and default value.
4. The platform as claimed in claim 1, characterized in that the node representation, variable representation and sequential connection of the directed acyclic graph model constructed by the algorithm model construction module are specifically: Node representation includes: The name of the algorithm model, parameter settings and algorithm description information; And the algorithm model building module provides users with editing functions and visual display of nodes through the user interaction module; Edge representation is used to characterize the direction and order of data flow. The algorithm model building module provides the user with an edge representation configuration interface through the user interaction module. Sequential connection, the nodes in the directed acyclic graph model are arranged in a hierarchical relationship and constructed in a sequential relationship starting from the starting point. The algorithm model construction module is visualized through the user interaction module to help users understand the construction process of the task model.
5. The platform as claimed in claim 1, characterized in that the real-time local verification of the two-stage verification module of the algorithm model includes a partial ordering check of the algorithm and a matching check of the data types connected by the algorithm, which is specifically: Algorithm partial order check: Ensure the partial order of model connections based on the defined algorithm hierarchy; Matching check of data types connected by the algorithm: Matching check is performed based on the data types of the algorithm connections defined in the algorithm description file.
6. The platform as claimed in claim 5, characterized in that the algorithm partial order check is set to: only allow low-level algorithm model H i Connect to high-level algorithm model H j Or the same-level algorithm, where i and j are used to represent the level of the hierarchy, and i<=j.
7. The platform as claimed in claim 5, characterized in that the matching check of the data type of the algorithm connection is set to: divide the input and output data types into multiple types, and the multiple types include a wildcard type; if the output data type T of the previous algorithm model in the directed acyclic graph model out Cannot be used with the post-order algorithm model's input data type T in If they do not match, the nodes corresponding to the two algorithm models are prohibited from being connected and the matching check fails.
8. The platform as claimed in claim 1, characterized in that the check items of the overall verification include: Verify each algorithm node N i Are they all connected correctly? Are there any unconnected algorithm nodes N? isolate , and whether there are redundant or redundant connections E redundant .
9. The platform according to any one of claims 1 to 8, characterized in that each execution phase of the phased execution training module of the algorithm model is: 1) Initialization phase: used to set the initial state of the algorithm model and read configuration parameters, and prepare the execution environment required for algorithm execution; 2) Execution training phase: Run the main logic part of the algorithm model in the training phase to perform data processing and calculation; 3) Persistence stage: save the model files and intermediate results generated during the execution of the algorithm model; 4) Cleanup phase: clean up temporary data generated during the execution of the algorithm model and release resources; The execution phases of the algorithm model phased execution deployment module are: 1) Deployment initialization phase: configure and initialize the deployment phase parameters of the algorithm model in the task model usage environment; 2) Deployment phase: Load the data and model files stored in the algorithm model’s staged execution training module, deploy the task model to the production environment so that it can be called and used by external systems, and provide support for the inference phase; 3) Reasoning phase: Receive input data and generate prediction results or outputs in the task model usage environment, and provide real-time or batch processing capabilities.
10. The platform according to claim 9, characterized in that each execution phase of the algorithm model's phased execution training module and the algorithm model's phased execution deployment module is specifically set as: The initialization phase includes: Parse configuration files, obtain data paths, set storage paths, and record logs; The execution training phase includes: data loading, real-time monitoring and logging; The persistence phase includes: persistent storage and logging; The cleaning phase includes: temporary data cleaning, resource release, and cache cleaning; The deployment initialization phase includes: parsing deployment parameters and obtaining training result paths; The deployment phase includes: data loading, model validation, and logging; The reasoning phase includes: data reception, model reasoning execution, result return, multiple reasoning, real-time feedback, logging, and error handling.