A modular model development and high-concurrency deployment system, method and device
Through modular model development and high concurrency deployment systems, including process analysis, model management and concurrent processing modules, the problem of industrial model development systems being difficult to cope with high concurrent requests is solved, and flexibility, scalability and stable operation are achieved.
Patent Information
- Application Number
- CN202410601040.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-05-15
AI Technical Summary
Existing industrial model development and deployment systems are difficult to cope with highly concurrent data processing and prediction requests, lack flexibility and scalability, and cannot effectively integrate multiple algorithms to adapt to new or unforeseen situations.
Provides a modular model development and high concurrency deployment system, including process analysis module, model management module and concurrent processing module. The process analysis module forms the target model management process. The model management module calls the target model and functional component deployment execution process, and the concurrent processing module monitors the operation of functional components and configures the actual required processes to deal with high concurrency requests.
It realizes the flexibility and scalability of the industrial model, can meet different application needs and technological changes, solves the problems of high concurrent data processing and prediction requests, meets the needs of large-scale applications, and ensures the stable operation of the system.
Smart Images

Figure CN118331590B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial model development and application technology, and in particular to a modular model development and high-concurrency deployment system, a modular model development and high-concurrency deployment method, and a modular model development and high-concurrency deployment device. Background Art
[0002] With the widespread application of information technologies such as industrial Internet and automatic control systems in the industrial field, a large amount of data related to industrial production activities is collected and stored in real time. Analyzing this data based on industrial models can achieve abnormal warning of industrial equipment, improve production processes, improve production efficiency, reduce production costs, etc. In order to increase the reuse rate of such industrial models, the development and deployment of multi-algorithm frameworks has become a key issue. However, existing industrial model development and deployment platforms usually focus on specific algorithms or a single framework. Although these methods perform well when dealing with simple or specific scenarios, they show their limitations when facing complex and changing application environments. This limitation is mainly manifested in two aspects:
[0003] First, there is a lack of flexibility and scalability. Most industrial models have limitations in dealing with highly dynamic and changing scenarios. They are usually designed for specific tasks or applications, and cannot effectively integrate multiple algorithms in new scenarios. They lack the necessary flexibility to adapt to new or unforeseen situations, which leads to inefficient processing, poor adaptability, and limited scalability. These frameworks also face many challenges in maintenance and updating.
[0004] Second, the application of industrial models faces challenges in high-concurrency computing.
[0005] The above limitations weaken their effectiveness and applicability in a rapidly changing technical environment. Therefore, how to provide a highly flexible and scalable model development and deployment system that can adapt to the high-concurrency data processing and prediction requests in the industrial model application field has become a technical problem that technicians in this field need to solve urgently. Summary of the invention
[0006] The present invention provides a modular model development and high-concurrency deployment system, a modular model development and high-concurrency deployment method and a modular model development and high-concurrency deployment device to solve the problem that the industrial model development and deployment system in the related technology is difficult to cope with high-concurrency data processing and prediction requests.
[0007] As a first aspect of the present invention, a modular model development and high-concurrency deployment system is provided, comprising:
[0008] A process parsing module is used to determine the functional components, target model management logic and target model required for target model management according to the target model management solution, and then form a target model management process, which includes a target model training process and a target model prediction process;
[0009] A model management module is used to call the target model according to the target model management process and call the required functional components according to the target model management process, and deploy and execute the target model management process;
[0010] A concurrent processing module is used to determine the functional components whose actual process requirements are greater than the preset process requirements in the target model management process, and configure the actual required processes for the corresponding functional components according to the actual process requirements;
[0011] The model management module includes: model training submodule, model prediction submodule and model information management submodule;
[0012] The model training submodule is used to call the required functional components from the component library according to the target model training process, and after obtaining the target model from the model information management submodule according to the target model training process, deploy and execute the target model training process to obtain the training model;
[0013] The model prediction submodule is used to call the required functional components from the component library according to the target model prediction process, and after obtaining the target training model from the model information management submodule according to the target model prediction process, deploy and execute the target model prediction process;
[0014] The model information management submodule is used to store model information, which includes the original information of the model and the training model information obtained by the model training submodule.
[0015] Furthermore, the concurrent processing module includes: a calculation unit, a judgment unit and a process management unit;
[0016] The calculation unit is used to monitor the execution status of each functional component in the target model management process, and calculate the actual process demand of each functional component according to the execution status of each functional component;
[0017] The judgment unit is used to judge whether the actual process demand of the functional component in the target model management process is greater than the preset process demand, and when it is determined that the actual process demand of the functional component is greater than the preset process demand, a corresponding concurrent request is generated and sent to the process management unit;
[0018] The process management unit is used to obtain concurrent requests and configure the actually required processes for the corresponding functional components according to the concurrent requests.
[0019] Furthermore, the process management unit is further used to configure a unique id for the upstream message of the functional component corresponding to the concurrent request before configuring the actually required process for the corresponding functional component according to the concurrent request.
[0020] Furthermore, the modular model development and high-concurrency deployment system also includes:
[0021] The environment configuration module is used to package the operating environment of the functional components in the component library so that the functional components support several script execution frameworks;
[0022] The script support module is used to provide several script execution frameworks to run functional components in different environments.
[0023] Furthermore, the model training submodule includes:
[0024] The training environment matching unit is used to match the corresponding operating environment for the functional components in the target model training process and call the corresponding script execution framework;
[0025] The training process execution unit is used to deploy and execute the target model training process.
[0026] Furthermore, the model training submodule also includes a target model creation unit;
[0027] The training process execution unit can form a target model creation instruction and send it to the target model creation unit when the target model call fails;
[0028] The target model creation unit is used to call the corresponding application interface to create the target model according to the target model creation instruction, and store the information of the target model into the model information management submodule.
[0029] Furthermore, the model prediction submodule includes:
[0030] The prediction environment matching unit is used to match the corresponding operating environment for the functional components in the target model prediction process and call the corresponding script execution framework;
[0031] The prediction process execution unit is used to deploy and execute the target model prediction process.
[0032] As another aspect of the present invention, a modular model development and high-concurrency deployment method is provided, comprising:
[0033] After determining the functional components, target model management logic and target model required for target model management according to the target model management solution, a target model management process is formed;
[0034] Call the target model according to the target model management process, call the required functional components according to the target model management process, and deploy and execute the target model management process;
[0035] Determine the functional components in the target model management process whose actual process requirements are greater than the preset process requirements, and configure the actual required processes for the corresponding functional components according to the actual process requirements.
[0036] As another aspect of the present invention, a modular model development and high-concurrency deployment device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the above-mentioned modular model development and high-concurrency deployment method can be implemented.
[0037] After the process parsing module of the present invention parses the customized target model management scheme to form the target model management process, the model management module calls the target model and the required functional components according to the target model management process to deploy and execute the target model management process. Through the modular architecture design, the training and prediction process of the industrial model can meet different application requirements and technical changes, and have flexibility and scalability. And the operation of the functional components in the target model management process is monitored by the concurrent processing module, and the actual required processes are configured for the functional components according to the monitoring results to solve high-concurrency data processing and prediction requests, and meet large-scale application requirements. In summary, the modular model development and high-concurrency deployment system, method and equipment provided by the present invention meet the flexibility, scalability and applicability of industrial model development and application, and can solve the high-concurrency data processing and prediction requests of industrial models in actual applications, meet large-scale application requirements, and ensure the stable operation of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present invention, but do not constitute a limitation of the present invention.
[0039] Figure 1 A structural block diagram of the modular model development and high-concurrency deployment system provided by the present invention;
[0040] Figure 2 This is a structural block diagram of the concurrent processing module provided by the present invention.
[0041] Figure 3 This is a structural block diagram of the model management module provided by the present invention.
[0042] Figure 4 It is another structural block diagram of the model management module provided by the present invention.
[0043] Figure 5 It is a schematic diagram of the visualization interface of the model training submodule provided by the present invention.
[0044] Figure 6 It is a schematic diagram of the visualization interface of the model prediction submodule provided by the present invention.
[0045] Figure 7 It is another structural block diagram of the modular model development and high-concurrency deployment system provided by the present invention.
[0046] Figure 8 It is a structural block diagram of the model training submodule provided by the present invention.
[0047] Fig. 9 It is another structural block diagram of the model training submodule provided by the present invention.
[0048] Fig.10 It is a structural block diagram of the model prediction submodule provided by the present invention.
[0049] Fig.11 It is another structural block diagram of the modular model development and high-concurrency deployment system provided by the present invention.
[0050] Fig.12 It is a flow chart of the modular model development and high-concurrency deployment method provided by the present invention. DETAILED DESCRIPTION
[0051] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0052] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention.
[0053] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present invention described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0054] In an embodiment of the present invention, a modular model development and high-concurrency deployment system 100 is provided, such as Figure 1 As shown, including:
[0055] The process analysis module 110 is used to determine the functional components, target model management logic and target model required for target model management according to the target model management solution, and then form a target model management process; the target model management solution in this embodiment can be obtained through user-defined configuration, and the user selects the functional components required for model management in the visual interface of the user configuration module, and defines the operating logic between each required functional component by arranging the functional components, that is, the target model management logic. After the user confirms the target model management solution, the visual image of the target model management solution can be saved in a JSON file. The process analysis module 110 obtains the JSON file corresponding to the target model management solution and parses the JSON file to determine the functional components, target model management logic and target model required for target model management, and then forms a target model management process. In this embodiment, the target model management process is a graph structure file; in addition, the user needs can also be analyzed through a large model, and a customized target model management solution can be automatically formed according to the analysis results. The embodiment of the present invention is not limited to this.
[0056] The process analysis module 110 provided in this embodiment can be a separate module, or can be implemented in the form of a message processing coordinator. This embodiment specifically adopts the form of a message processing demodulator. It should be understood that the process analysis module can be used as long as it can implement the analysis of the target model management solution, and this embodiment does not limit its form.
[0057] The model management module 120 is used to call the target model according to the target model management process and call the required functional components according to the target model management process, and deploy and execute the target model management process; the model management module 120 provided in this embodiment calls the target model according to the target model management process and calls the required functional components from the component library according to the target model management process, and deploys and executes the target model management process. Specifically, the component library includes functional components of types such as data reading, data processing, and feature processing, and each type can be further subdivided into several functional components. All functional components share a set of object storage as file input and output, and the code logic is written and implemented according to the functional components. In addition, the component library includes both functional components that come with the system and functional components that can be customized by users. User-defined functional components need to comply with storage path specifications that meet system standards.
[0058] When deploying and executing the target model management process, a process with a preset process requirement can be configured for each functional component in the target model management process. The preset process requirement used in this embodiment is 1, that is, the system configures one process for each functional component in the target model management process by default. In addition, the target model management process can be a target model training process or a target model prediction process, which is determined by the actual content of the target model management solution.
[0059] The concurrent processing module 130 is used to determine the functional components whose actual process requirements are greater than the preset process requirements in the target model management process, and configure the actually required processes for the corresponding functional components according to the actual process requirements.
[0060] After the target model management process is deployed and executed, the concurrent processing module 130 provided in this embodiment can monitor the execution status of the processes corresponding to each functional component in the target model management process, obtain the actual process demand of each functional component based on the execution status, and compare the actual process demand of each functional component with the preset process demand. If there is a functional component in the target model management process whose actual process demand is greater than the preset process demand, the actual required process is configured for the corresponding functional component according to the actual process demand to solve high-concurrency data processing needs and prediction requests, and meet the large-scale application needs of industrial models.
[0061] Specifically, the modular model development and high-concurrency deployment system 100 provided in the embodiment of the present invention adopts containerization and automated deployment, and uses technologies such as docker and kubernetes cluster to simplify the deployment process and improve deployment efficiency. In addition, the process parsing module 110, the model management module 120, and the concurrent processing module 130 all use message queues to manage data flows and communications between processes.
[0062] After the embodiment of the present invention parses the customized target model management solution through the process parsing module 110 to form the target model management process, the model management module 120 calls the target model and the required functional components according to the target model management process to deploy and execute the target model management process. Through the modular architecture design, the model training and prediction process can meet different application requirements and technical changes, and have flexibility and scalability. And the concurrent processing module 130 monitors the operation of the functional components in the target model management process, and configures the actual required processes for the functional components according to the monitoring results to solve high-concurrency data processing and prediction requests, and meet the large-scale application requirements of industrial models. In summary, the modular model development and high-concurrency deployment system 100 provided by the embodiment of the present invention meets the flexibility, scalability and applicability of industrial model development and application, and can solve the high-concurrency data processing and prediction requests of industrial models in actual applications, meet the large-scale application requirements of industrial models, and ensure the stable operation of the system.
[0063] Furthermore, if Figure 2 As shown, the concurrent processing module 130 includes: a calculation unit 131, a judgment unit 132 and a process management unit 133; the calculation unit 131 is used to monitor the execution of each functional component in the target model management process, and calculate the actual process demand of each functional component according to the execution of each functional component; in the embodiment of the present invention, the calculation unit 131 obtains the single process response time of each functional component at preset intervals, that is, the average processing time of a single process for a single request, the average processing time is in milliseconds, and the actual process demand of each functional component is calculated according to the single process response time. Specifically, the calculation method of the actual process demand adopted in this embodiment is as follows:
[0064] ;
[0065] in, Indicates the actual process demand, Indicates the number of requests that a single process needs to process per second. Indicates the single process response time.
[0066] The judgment unit 132 is used to judge whether the actual process demand of the functional component in the target model management process is greater than the preset process demand, and when it is determined that the actual process demand of the functional component is greater than the preset process demand, it generates a corresponding concurrent request and sends it to the process management unit 133; specifically, if the preset number of requests per second that a single process needs to process QPS is 100, and the actual single-process response time t of a functional component obtained by the calculation unit 131 is 100ms, then the actual process demand of the functional component is:
[0067] ;
[0068] That is, in order to achieve the goal of processing 100 requests per second, and the response time for each request is 100 milliseconds, 10 processes need to run concurrently for this functional component.
[0069] After the judgment unit 132 obtains the actual process demand 10, it compares the actual process demand 10 with the preset process demand 1. The actual process demand is greater than the preset process demand, so a concurrent request corresponding to the functional component is formed. The concurrent request includes the process quantity information 9 that the corresponding functional component needs to add and the location information of the executable program of the existing process of the corresponding functional component.
[0070] The process management unit 133 is used to obtain concurrent requests and configure actually required processes for corresponding functional components according to the concurrent requests.
[0071] For the above example, after the process management unit 133 provided in this embodiment obtains the concurrent request, it configures 9 parallel processes for the corresponding functional component according to the location information of the executable program of the existing process of the corresponding functional component recorded in the concurrent request and the information on the number of processes that need to be added 9. The processing code of the parallel process is the same as that of the existing process, and both can process upstream messages in a stateless manner.
[0072] Furthermore, the process management unit 133 is also used to configure a unique id for the upstream message of the functional component corresponding to the concurrent request before configuring the actual required process for the corresponding functional component according to the concurrent request, so as to prevent message confusion in subsequent processing.
[0073] Specifically, the judgment unit 132 judges whether the actual process demand of the functional component in the target model management process is greater than the preset process demand, and generates a corresponding concurrent request when it is determined that the actual process demand of the functional component is greater than the preset process demand, and sends it to the process management unit 133. The process management unit 133 first configures a unique ID for the upstream message of the functional component corresponding to the concurrent request, and then the process management unit 133 configures a corresponding number of parallel processes for the corresponding functional component according to the concurrent request, and starts the parallel processes at the same time through the kubernetes command line. When the upstream message is sent to the functional component, it will be sent to the message queue corresponding to the functional component first like other functional components. Several parallel processes will subscribe to the message queue at the same time and obtain the messages stored in the message queue in a first-come, first-served manner. Each process that obtains the upstream message processes the message and sends it to the main queue, waiting for the message processing coordinator to send the processed message to the message queue of the downstream functional component. If there are multiple nodes in the entire link whose actual process demand is greater than the preset process demand, this method can be used for parallel acceleration, which can effectively solve the problem of high-concurrency data processing and prediction requests in actual applications of industrial models, meet large-scale application needs, and ensure the stable operation of the system.
[0074] Furthermore, if Figure 3 As shown, the model management module 120 includes: a model training submodule 121, a model prediction submodule 122 and a model information management submodule 123; the model training submodule 121 is used to call the required functional components from the component library according to the target model training process, and after obtaining the target model from the model information management submodule 123 according to the target model training process, deploy and execute the target model training process to obtain the training model; the model prediction submodule 122 is used to call the required functional components from the component library according to the target model prediction process, and after obtaining the target training model from the model information management submodule 123 according to the target model prediction process, deploy and execute the target model prediction process; the model information management submodule 123 is used to store model information, and the model information includes the original information of the model and the training model information obtained by the model training submodule 121.
[0075] Specifically, Figure 4As shown, the model management module 120 provided in this embodiment may also include an application interface sub-module 124. The application interface sub-module 124 can match the corresponding functional interface according to the request instruction to manage the model information in the model information management sub-module 123. The application interface sub-module 124 may include: update target model functional interface, activate target model functional interface, obtain model list functional interface, delete target model functional interface, create model functional interface, upload target model functional interface, download target model functional interface, query target model information functional interface, etc.
[0076] The model information management submodule 123 stores several industrial equipment fault analysis algorithm models, such as bearing fault analysis algorithm model, belt conveyor sudden fault warning algorithm model, shield machine main drive motor abnormality detection algorithm model and shield machine cutter head mud cake diagnosis algorithm model.
[0077] In the specific implementation of this embodiment, an object storage bucket can be established to store all unstructured model files, standardize the model path, store each model under the same path, and manage the storage path of each version of the model file of the same model by increasing the version number. The upload target model function interface / download target model function interface will upload / download each version of the model file to the corresponding path.
[0078] The model information management submodule 123 provided in this embodiment stores detailed model information in the form of a data table. Specifically, each model and its iteratively updated model are stored in a data table. The specific form is shown in Table 1 Logistic Regression Model Information Data Table:
[0079] Table 1 Logistic regression model information data table
[0080]
[0081] Among them, id represents the unique index of each version of the model, name represents the model name, key represents the model object storage path, performance represents the model performance index, time represents the model creation time or update time, model_type represents the model type, and the modular model development and high-concurrency deployment system 100 provided in this embodiment supports multiple open source frameworks, such as scikit-learn, pytorch, tensorflow, etc.
[0082] In this embodiment, the process parsing module 110 is implemented in the form of a first message processing coordinator in the model training submodule 121 and a second message processing coordinator in the model prediction submodule 122.
[0083] like Figure 5As shown, the user can select the functional components required for target model training through the visual interface provided by the model training submodule 121, and define the operating logic between each required functional component by arranging the functional components, that is, the target model management logic. After the user confirms the target model training plan, the visual image of the target model training plan is saved in a JSON file. The first message processing coordinator obtains the JSON file corresponding to the target model training plan and parses the JSON file to form a graph structure file of the target model training process. The model training submodule 121 calls the required functional components from the component library according to the graph structure file, and obtains the target model from the model information management submodule 123 according to the graph structure file. Then, the target model training process is deployed and executed according to the graph structure file, and the training model information obtained after training is stored in the model information management submodule 123.
[0084] Furthermore, if Figure 6 As shown, the training model obtained by the model training submodule 121 can be predicted by the model prediction submodule 122. Specifically, the user can select the functional components required to predict the target training model through the visual interface provided by the model prediction submodule 122, and define the operating logic between each required functional component by arranging the functional components, that is, the target model prediction logic. After the user confirms the target model prediction plan, the visual image of the target model prediction plan is saved in a JSON file. The second message processing coordinator obtains the JSON file corresponding to the target model prediction plan and parses the JSON file to form a graph structure file of the target model prediction process. The model prediction submodule 122 calls the required functional components from the component library according to the graph structure file, and after obtaining the target training model from the model information management submodule 123 according to the graph structure file, the target model prediction process is deployed and executed according to the graph structure file.
[0085] The model training submodule 121 and the model prediction submodule 122 are used to deploy and execute customized target model training processes and target model prediction processes respectively, so that the modular model development and high-concurrency deployment system 100 has flexibility, scalability and applicability.
[0086] Furthermore, if Figure 7 As shown, the modular model development and high-concurrency deployment system 100 provided in this embodiment also includes: an environment configuration module 140, which is used to package the operating environment of the functional components in the component library so that the functional components support several script execution frameworks; a script support module 150, which is used to provide several script execution frameworks to run functional components in different environments.
[0087] The environment configuration module 140 provided in this embodiment packages the operating environment of each functional component in the component library through the docker image technology, and packages multiple images. At the same time, the script support module 150 provides corresponding script execution frameworks for functional components under different operating environments, so that the functional components can support multiple computing frameworks, such as scikit-learn, pytorch, tensorflow, etc. If the built-in operating environment does not meet the actual needs of the user, the user can refer to the built-in reference script on the premise of following the file input and output path specifications, and customize the packaging of the operating environment actually required by the functional component through the environment configuration module 140 and the script support module 150, so that the operation of the functional component is not affected by the environment, further improving the applicability of the modular model development and high-concurrency deployment system 100.
[0088] Furthermore, if Figure 8 As shown, the model training submodule 121 includes: a training environment matching unit 121-1, which is used to match the corresponding operating environment for the functional components in the target model training process and call the corresponding script execution framework; a training process execution unit 121-2, which is used to deploy and execute the target model training process.
[0089] Specifically, during the implementation of this embodiment, it is necessary to create a storage space bucket in the object storage for storing temporary files during the model training process.
[0090] After the training environment matching unit 121-1 matches the corresponding operating environment for the functional components in the target model training process according to the actual operating environment and calls the script execution framework corresponding to the operating environment in the script support module 150, the training process execution unit 121-2 performs subsequent processing based on the graph structure file of the target model training process parsed by the first message processing coordinator.
[0091] Specifically, the training process execution unit 121-2 first obtains the head node in the graph structure file of the target model training process, and passes the parameter file output path to the process corresponding to the head node. The path consists of the target model id, the current functional component name and the output port number. The input data can be offline data from multiple data sources. When the functional component is finished running, the output data is stored in the path. User-defined functional components also need to meet the storage path specifications, otherwise the input file will not be found when starting the process corresponding to the next functional component.
[0092] Then all components are run in sequence until the last target model is finished running, and then the version of the target model can be updated through the update target model function interface in the application interface submodule 124, and the training model information obtained after the target model is trained is stored in the standard model path.
[0093] If you need to update the model regularly, you can set up the model's automatic training logic to run it regularly.
[0094] In the above training process, the calculation unit 131 in the concurrent processing module 130 monitors the execution of each functional component in the target model training process at preset intervals, and calculates the actual process demand of each functional component according to the execution of each functional component. After obtaining the actual process demand, the judgment unit 132 determines the functional component whose actual process demand in the target model training process is greater than the preset process demand, and forms a corresponding concurrent request and sends it to the process management unit 133. The process management unit 133 first configures a unique id for the upstream message of the functional component corresponding to the concurrent request, and then the process management unit 133 configures a parallel process for the corresponding functional component according to the concurrent request, and starts the parallel process at the same time through the kubernetes command line. When the upstream message is sent to the functional component, it will be sent to the message queue corresponding to the functional component first like other functional components. Several parallel processes will subscribe to the message queue at the same time and obtain the messages stored in the message queue in a first-come, first-served manner. Each process that obtains the upstream message processes the message and sends it to the main queue, waiting for the first message processing coordinator to send the processed message to the message queue of the downstream functional component. If there are multiple nodes in the entire link whose actual process demand is greater than the preset process demand, this method can be used for parallel acceleration, which effectively solves the problem of high-concurrency data processing in actual applications of industrial models, meets large-scale application needs, and ensures the stable operation of the system.
[0095] Furthermore, if Fig. 9 As shown, the model training submodule 121 also includes a target model creation unit 121-3; the training process execution unit 121-2 can generate a target model creation instruction and send it to the target model creation unit 121-3 when the target model call fails; the target model creation unit 121-3 is used to call the corresponding application interface according to the target model creation instruction to create a target model, and store the target model information into the model information management submodule 123.
[0096] Specifically, after the training process execution unit 121-2 obtains the target model id in the parameter file output path of the head node, it calls the query target model information function interface to search for the target model according to the target model id. If the target model does not exist, the training process execution unit 121-2 forms a target model creation instruction and sends it to the target model creation unit 121-3. The target model creation unit 121-3 calls the creation model function interface according to the target model creation instruction to create the target model, and then stores the target model information in the model information management submodule 123, and returns a target model creation success notification to the training process execution unit 121-2. After the training process execution unit 121-2 obtains the target model creation success notification, it starts to run the head node, and runs the entire target model training process in sequence according to the graph structure file.
[0097] This embodiment adds a target model creation function to the target model training, so that the modular model development and high-concurrency deployment system 100 can support the training and deployment of more industrial models, and its applicability and scalability in the field of industrial model development and application are greatly improved.
[0098] Furthermore, if Fig.10 As shown, the model prediction submodule 122 includes: a prediction environment matching unit 122-1, which is used to match the corresponding operating environment for the functional components in the target model prediction process and call the corresponding script execution framework; a prediction process execution unit 122-2, which is used to deploy and execute the target model prediction process.
[0099] Specifically, during the implementation of this embodiment, it is also necessary to create a storage space bucket in the object storage for storing temporary files in the model prediction process.
[0100] After the prediction environment matching unit 122-1 matches the corresponding operating environment for the functional components in the target model prediction process according to the actual operating environment and calls the script execution framework corresponding to the operating environment from the script support module 150, the prediction process execution unit 122-2 performs subsequent processing based on the graph structure file of the target model prediction process parsed by the second message processing coordinator.
[0101] Specifically, the prediction process execution unit 122-2 first obtains the head node in the graph structure file of the target model prediction process, and passes the parameter file output path to the process corresponding to the head node. The path is composed of the target model id, the current functional component name and the output port number. The input data can be offline data from various data sources. When the functional component is finished running, the output data is stored in the path. User-defined functional components also need to meet the storage path specifications, otherwise the input file will not be found when starting the process corresponding to the next functional component.
[0102] Then all components are run in sequence until the final target model is run to obtain a prediction result, which can be displayed in a visualization interface provided by the model prediction submodule 122.
[0103] In the above prediction process, the calculation unit 131 in the concurrent processing module 130 monitors the execution of each functional component in the target model prediction process at preset intervals, and calculates the actual process demand of each functional component according to the execution of each functional component. After obtaining the actual process demand, the judgment unit 132 determines the functional component whose actual process demand in the target model prediction process is greater than the preset process demand, and forms a corresponding concurrent request and sends it to the process management unit 133. The process management unit 133 first configures a unique id for the upstream message of the functional component corresponding to the concurrent request, and then the process management unit 133 configures a parallel process for the corresponding functional component according to the concurrent request, and starts the parallel process at the same time through the kubernetes command line. When the upstream message is sent to the functional component, it will be sent to the message queue corresponding to the functional component first like other functional components. Several parallel processes will subscribe to the message queue at the same time and obtain the messages stored in the message queue in a first-come, first-served manner. Each process that obtains the upstream message processes the message and sends it to the main queue, waiting for the second message processing coordinator to send the processed message to the message queue of the downstream functional component. If there are multiple nodes in the entire link whose actual process demand is greater than the preset process demand, this method can be used for parallel acceleration, which effectively solves the problem of high-concurrency data processing and prediction requests in actual applications of industrial models, meets large-scale application needs, and ensures the stable operation of the system.
[0104] It should be understood that the modular model development and high-concurrency deployment system provided by the embodiment of the present invention is not limited to the above structure, and can also be as follows: Fig.11 As shown in the figure, it includes a model management module, an offline model training framework, a real-time data processing framework, a concurrent processing module and a data storage module. Fig.11 A brief description of the working principles of the provided modular model development and high-concurrency deployment system.
[0105] Specifically, the database of the data storage stores the original information of the cutter disc mud cake diagnosis algorithm model. The user can select the functional components required for the cutter disc mud cake diagnosis algorithm model training through the visual interface provided by the offline model training framework, and define the operation logic between each required functional component by arranging the functional components, that is, the cutter disc mud cake diagnosis algorithm model training logic. After the user confirms the cutter disc mud cake diagnosis algorithm model training plan, the visual image of the cutter disc mud cake diagnosis algorithm model training plan is saved in a JSON file. The JSON file corresponding to the cutter disc mud cake diagnosis algorithm model training plan is obtained through the global data coordinator and then the JSON file is parsed to form a graph structure file of the cutter disc mud cake diagnosis algorithm model training process. The offline model training framework calls the required functional components from the component library according to the graph structure file, obtains the original information of the cutter disc mud cake diagnosis algorithm model from the database according to the graph structure file, and then deploys and executes the cutter disc mud cake diagnosis algorithm model training process according to the graph structure file, and stores the trained cutter disc mud cake diagnosis algorithm training model into the database.
[0106] Subsequently, users can select the functional components required for predicting the cutter disc mud cake diagnosis algorithm training model through the visual interface provided by the real-time data processing framework, and define the operating logic between each required functional component, that is, the cutter disc mud cake diagnosis algorithm training model prediction logic, by arranging the functional components. After the user confirms the cutter disc mud cake diagnosis algorithm training model prediction plan, the corresponding visualization image is saved in a JSON file. After the JSON file is obtained and parsed by the global data coordinator, a graph structure file of the cutter disc mud cake diagnosis algorithm training model prediction process is formed. The real-time data processing framework calls the required functional components from the component library according to the graph structure file, obtains the information of the cutter disc mud cake diagnosis algorithm training model from the database according to the graph structure file, and then deploys and executes the cutter disc mud cake diagnosis algorithm training model prediction process according to the graph structure file.
[0107] In the above-mentioned cutter disc mud cake diagnosis algorithm model training process and cutter disc mud cake diagnosis algorithm training model prediction process, the concurrent processing module can be used to monitor the operation status of the functional components, and the actual required processes can be configured for the functional components based on the monitoring results to solve high-concurrency data processing and prediction requests, thereby meeting the large-scale application needs of industrial models.
[0108] In summary, Fig.11 The modular model development and high-concurrency deployment system can also meet the flexibility, scalability and applicability of industrial model development applications. At the same time, it can solve the high-concurrency data processing and prediction requests that exist in industrial models in actual applications, meet the large-scale application needs of industrial models, and ensure the stable operation of the system.
[0109] like Fig.12 As shown, another embodiment of the present invention provides a modular model development and high-concurrency deployment method, which is applied to the above-mentioned modular model development and high-concurrency deployment system 100, and the method includes: S1, after determining the functional components, target model management logic and target model required for target model management according to the target model management scheme, forming a target model management process; S2, calling the target model according to the target model management process and calling the required functional components according to the target model management process, and deploying and executing the target model management process; S3, determining the functional components in the target model management process whose actual process demand is greater than the preset process demand, and configuring the actual required processes for the corresponding functional components according to the actual process demand.
[0110] After parsing the customized target model management solution to form a target model management process, the embodiment of the present invention calls the target model and the required functional components according to the target model management process to deploy and execute the target model management process, so that the training and prediction process of the industrial model can meet different application requirements and technical changes, and has flexibility and scalability. And the operation of the functional components in the target model management process is monitored, and the actual required processes are configured for the functional components according to the monitoring results to solve high-concurrency data processing and prediction requests, and meet large-scale application requirements. In summary, the modular model development and high-concurrency deployment system 100 provided by the embodiment of the present invention meets the flexibility, scalability and applicability of industrial model development applications, and can solve the high-concurrency data processing and prediction requests of industrial models in actual applications, meet large-scale application requirements, and ensure the stable operation of the system.
[0111] Another embodiment of the present invention provides a modular model development and high-concurrency deployment device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the above-mentioned modular model development and high-concurrency deployment method can be implemented. The specific principles and effects of the device refer to the principles and effects of the above-mentioned modular model development and high-concurrency deployment system and modular model development and high-concurrency deployment method, and will not be repeated here.
[0112] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A modular model development and high-concurrency deployment system, characterized in that: include: A process parsing module is used to determine the functional components, target model management logic and target model required for target model management according to the target model management solution, and then form a target model management process, wherein the target model management process includes a target model training process and a target model prediction process; A model management module, used to call the target model according to the target model management process and call the required functional components according to the target model management process, and deploy and execute the target model management process; A concurrent processing module, used to determine the functional components whose actual process requirements are greater than the preset process requirements in the target model management process, and configure the actually required processes for the corresponding functional components according to the actual process requirements; The model management module includes: a model training submodule, a model prediction submodule and a model information management submodule; The model training submodule is used to call the required functional components from the component library according to the target model training process, and after obtaining the target model from the model information management submodule according to the target model training process, deploy and execute the target model training process to obtain the training model; The model prediction submodule is used to call the required functional components from the component library according to the target model prediction process, and after obtaining the target training model from the model information management submodule according to the target model prediction process, deploy and execute the target model prediction process; The model information management submodule is used to store model information, wherein the model information includes original information of the model and training model information obtained by training the model through the model training submodule; The concurrent processing module includes: a calculation unit, a judgment unit and a process management unit; The calculation unit is used to monitor the execution status of each functional component in the target model management process, and calculate the actual process demand of each functional component according to the execution status of each functional component; The judgment unit is used to judge whether the actual process demand of the functional component in the target model management process is greater than the preset process demand, and when it is determined that the actual process demand of the functional component is greater than the preset process demand, a corresponding concurrent request is generated and sent to the process management unit; The process management unit is used to obtain concurrent requests and configure actually required processes for corresponding functional components according to the concurrent requests.
2. The modular model development and high-concurrency deployment system according to claim 1, characterized in that: The process management unit is also used to configure a unique id for an upstream message of a functional component corresponding to a concurrent request before configuring an actually required process for the corresponding functional component according to the concurrent request.
3. The modular model development and high-concurrency deployment system according to any one of claims 1 to 2, characterized in that: Also includes: The environment configuration module is used to package the operating environment of the functional components in the component library so that the functional components support several script execution frameworks; The script support module is used to provide several script execution frameworks to run functional components in different environments.
4. The modular model development and high-concurrency deployment system according to claim 3, characterized in that: The model training submodule includes: The training environment matching unit is used to match the corresponding operating environment for the functional components in the target model training process and call the corresponding script execution framework; The training process execution unit is used to deploy and execute the target model training process.
5. The modular model development and high-concurrency deployment system according to claim 4, characterized in that: The model training submodule also includes a target model creation unit; The training process execution unit can form a target model creation instruction and send it to the target model creation unit when the target model call fails; The target model creation unit is used to call the corresponding application interface to create the target model according to the target model creation instruction, and store the information of the target model into the model information management submodule.
6. The modular model development and high-concurrency deployment system according to claim 3, characterized in that: The model prediction submodule includes: The prediction environment matching unit is used to match the corresponding operating environment for the functional components in the target model prediction process and call the corresponding script execution framework; The prediction process execution unit is used to deploy and execute the target model prediction process.
7. A modular model development and high-concurrency deployment method, applied to the modular model development and high-concurrency deployment system according to any one of claims 1 to 6, characterized in that: include: After determining the functional components, target model management logic and target model required for target model management according to the target model management solution, a target model management process is formed; Calling the target model according to the target model management process and calling the required functional components according to the target model management process, and deploying and executing the target model management process; Determine the functional components in the target model management process whose actual process requirements are greater than the preset process requirements, and configure the actually required processes for the corresponding functional components according to the actual process requirements.
8. A modular model development and high-concurrency deployment device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, it can implement the modular model development and high-concurrency deployment method as described in claim 7.
Citation Information
Patent Citations
Artificial intelligence model construction method, system and device and storage medium
CN117289904A