Method for managing and quickly calling algorithm model at web end

By using Docker to manage multiple Python algorithm models, the problem of cumbersome environment consistency and deployment of aircraft parameter prediction and fault diagnosis algorithms in the aviation field is solved, and the independent operation and efficient deployment of algorithm models are achieved, improving the stability and reliability of the system.

CN119597406APending Publication Date: 2025-03-11商飞软件有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411737606.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the aviation field, the complexity of aircraft systems makes it difficult for the existing technology to ensure the environmental consistency of aircraft parameter prediction and fault diagnosis algorithms, affecting the stability and independent operation of the algorithm. Moreover, Python algorithms are cumbersome during deployment and migration, and are easy to compete for resources with other applications.

Method used

Docker is used to manage multiple Python algorithm models to ensure consistency in development, testing and production environments, and package the packages and environment variables that the Python algorithm model depends on through Docker containers, simplifying the deployment process, and quickly launching more containers to share the load at high loads.

Benefits of technology

It realizes independent operation and environmental consistency of multiple Python algorithm models, simplifies the deployment process, and responds quickly at high loads, improving the stability and reliability of the algorithm model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597406A_ABST
    Figure CN119597406A_ABST
Patent Text Reader

Abstract

The invention provides a method for managing and quickly calling an algorithm model at a web end, which relates to the technical field of computer software, and comprises the following steps: S1, completing the building and training of the algorithm model on a local computer, and carrying out the installation of a Python compiling environment and a dependency package for algorithm models with different task requirements, and S2, respectively loading algorithm models based on the test flight model and trend prediction, and respectively training the algorithm models according to historical test flight parameters. According to the method for managing and rapidly calling the algorithm models at the web end, the Docker is used for managing the multiple Python algorithm models, the consistency of development, test and production environments can be guaranteed, the environment consistency is crucial to the stability of the algorithm models, independent operation of the multiple algorithm models is facilitated, and the efficiency of the development, test and production is improved. And meanwhile, a Docker container is utilized to package a package on which the Python algorithm model depends and an environment variable together, so that the deployment process can be simplified, and more containers can be quickly started to share a load during large-scale deployment or traffic peak so as to realize quick deployment and calling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer software technology, and in particular to a method for managing a quick call algorithm model on a web side. Background Art

[0002] The prediction of test flight data in the aviation field is particularly important to ensure the safety and normal operation of the aircraft. The extremely complex aircraft system requires more accurate and comprehensive algorithms to timely predict the changes in parameters related to the aircraft's flight status to monitor the aircraft's flight status and diagnose aircraft abnormalities.

[0003] Using Python to develop algorithms for predicting aircraft parameter trends and fault diagnosis algorithms requires different frameworks and environments. Without isolating the environment, the independence of the algorithm's operating environment cannot be guaranteed, which will affect the operation of other algorithms. In addition, when the algorithm's weights and data are large, separate management will make the model cumbersome to deploy or migrate, and the Python algorithm is prone to compete with other applications for resources during runtime. Summary of the invention

[0004] The purpose of the invention provided by the present invention is to use Docker to manage multiple Python algorithm models, which can ensure the consistency of development, testing and production environments. Environmental consistency is crucial to the stability of the algorithm model and is conducive to the independent operation of multiple algorithm models. At the same time, using Docker containers to package the packages and environment variables that the Python algorithm model depends on can simplify the deployment process. During large-scale deployment or traffic peaks, more containers can be quickly started to share the load, so as to achieve rapid deployment and calling.

[0005] In order to achieve the above effect, the present invention provides the following technical solution: a method for managing a quick call algorithm model on a web side, comprising the following steps:

[0006] Step 1: Complete the construction and training of the algorithm model on the local computer, and install the Python compilation environment and dependent packages for algorithm models with different task requirements.

[0007] Step 2: Load the algorithm models based on the test flight model and trend prediction respectively, and train the algorithm models according to the historical test flight parameters respectively.

[0008] Step 3: Package the model weights and project projects, and direct the dependency packages required for each algorithm model to the requirement.txt manifest file through commands, and place the project dependency packages in the environment directory.

[0009] Step 4: Set up the algorithm virtual environment.

[0010] Step 5: Build the corresponding Docker image package and upload it to the server.

[0011] Step 6: The server parses the Http request sent by the client.

[0012] Step 7: Call and return the visualization result through the CGI interface.

[0013] Furthermore, in the step 2, the algorithm model includes a single-dimensional test flight parameter time series prediction model, a multi-dimensional data anomaly monitoring model, an automatic labeling model for flight modes and flight subjects, a typical scenario and parameter dynamic identification model, an automatic parsing model for time-frequency domain analysis, and an automatic interpretation and anomaly monitoring model for spectral analysis.

[0014] Furthermore, in step 4, the algorithm virtual environment construction process is as follows:

[0015] S401: Create a virtual environment;

[0016] S402: Install the dependent packages in the list;

[0017] S403: Load different algorithm models and project projects.

[0018] Furthermore, in step S401, the virtual environment is installed on the server side for different trend prediction tasks.

[0019] Furthermore, in step S402, the dependency package is installed in the requirement.txt manifest file of each model.

[0020] Furthermore, in step S403, the different algorithm models and project projects are loaded into their own virtual environments respectively.

[0021] Furthermore, in step S5, the step of building the corresponding Docker image package and uploading it to the server is:

[0022] S501: Create a virtual environment to package the project, algorithm model and manifest files into a Docker image package;

[0023] S501: Upload the packaged Docker image package to the server of the real-time monitoring platform.

[0024] Furthermore, in step S6, the server parses the HTTP sent by the client as follows:

[0025] S601: When the user needs to perform a trend forecasting task, he clicks a corresponding button on the client browser interface;

[0026] S602: The client sends an HTTP request to the server.

[0027] Furthermore, in step S7, the CGI interface calls and starts the virtual environment corresponding to the algorithm model on the application server, reads the data required for the task from the database, performs forward reasoning of the model, and obtains the prediction result.

[0028] Furthermore, in step S7, the prediction result is sent to the Web server through the CGI interface, the calculation result is rendered in Json and combined with the template to form an Html file, which is sent to the client browser to provide the user with a visual presentation of trend prediction and real-time monitoring of the test flight model.

[0029] The present invention provides a method for managing and quickly calling an algorithm model on a web side, which has the following beneficial effects: using Docker to manage multiple Python algorithm models can ensure the consistency of the development, testing and production environments. Environmental consistency is crucial to the stability of the algorithm model, and is conducive to the independent operation of multiple algorithm models. At the same time, using Docker containers to package the packages and environment variables that the Python algorithm model depends on can simplify the deployment process. During large-scale deployment or traffic peaks, more containers can be quickly started to share the load, so as to achieve rapid deployment and calling. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A flowchart of a method for quickly calling an algorithm model by managing a web terminal according to the present invention;

[0031] Figure 2 This is an architecture diagram of a Python algorithm for a method of quickly calling an algorithm model on a web side management according to the present invention. DETAILED DESCRIPTION

[0032] See also Figure 1-2 The present invention provides a technical solution: a method for managing a quick call algorithm model on a web side, comprising the following steps:

[0033] Step 1: Complete the construction and training of the algorithm model on the local computer, and install the Python compilation environment and dependent packages for algorithm models with different task requirements.

[0034] Step 2: Load the algorithm models based on the test flight model and trend prediction respectively, and train the algorithm models according to the historical test flight parameters respectively.

[0035] Step 3: Package the model weights and project projects, and direct the dependency packages required for each algorithm model to the requirement.txt manifest file through commands. Place the project dependency packages in the environment directory to avoid conflicts in dependency package versions, solve incompatibility issues between dependency packages of different versions, and facilitate quick copying of projects between the same operating systems.

[0036] Step 4: Set up the algorithm virtual environment.

[0037] Step 5: Build the corresponding Docker image package and upload it to the server.

[0038] Step 6: The server parses the Http request sent by the client.

[0039] Step 7: Call and return the visualization result through the CGI interface.

[0040] Specifically, in the step 2, the algorithm model includes a single-dimensional test flight parameter time series prediction model, a multi-dimensional data anomaly monitoring model, an automatic labeling model for flight modes and flight subjects, a typical scenario and parameter dynamic identification model, an automatic parsing model for time-frequency domain analysis, and an automatic interpretation and anomaly monitoring model for spectral analysis.

[0041] Specifically, in step 4, the algorithm virtual environment construction process is:

[0042] S401: Create a virtual environment;

[0043] S402: Install the dependent packages in the list;

[0044] S403: Load different algorithm models and project projects.

[0045] Specifically, in step S401, the virtual environment is installed on the server side for different trend forecasting tasks. The virtual environment is an isolated Python environment that allows different versions of software packages to be installed on the same server without interfering with each other.

[0046] Specifically, in step S402, the dependency package is installed in the requirement.txt manifest file of each model.

[0047] Specifically, in step S403, the different algorithm models and project projects are loaded into their own virtual environments respectively, and each project or model will run in its own, independent environment, ensuring that the dependencies between them will not conflict with each other.

[0048] Specifically, in step S5, the step of building the corresponding Docker image package and uploading it to the server is:

[0049] S501: Create a virtual environment to package the project, algorithm model and manifest files into a Docker image package;

[0050] S501: Upload the packaged Docker image package to the server of the real-time monitoring platform to ensure the consistency and portability of the project in different environments, and facilitate the deployment and management of the project. Through the Docker image, the project can be quickly started and run on the server.

[0051] Specifically, in step S6, the server parses the HTTP sent by the client as follows:

[0052] S601: When the user needs to perform a trend forecasting task, he clicks a corresponding button on the client browser interface;

[0053] S602: The client sends an HTTP request to the server.

[0054] Specifically, in step S7, the CGI interface calls and starts the virtual environment corresponding to the algorithm model on the application server, reads the data required for the task from the database, performs forward reasoning of the model, and obtains the prediction result.

[0055] Specifically, in step S7, the prediction result is sent to the Web server through the CGI interface, the calculation result is rendered in Json and combined with the template to form an Html file, which is sent to the client browser to provide users with a visual presentation of trend prediction and real-time monitoring of the test flight model.

[0056] The method of web-side management and quick calling of algorithm models is based on Docker to complete the deployment and coupling of algorithm models on the software platform of B / S architecture, which includes two stages: algorithm model management and algorithm model calling. The algorithm model management process mainly includes packaging the optimal algorithm model and project engineering, building the corresponding Docker image and uploading it to the server. The algorithm model calling process mainly builds a service that can process HTTP on the server. After the user clicks the corresponding button on the client browser interface, the client will send an Http request to the server. After the Web server parses the Http request, it calls and starts the algorithm model and data on the application server through the CGI interface to calculate the prediction results, and then returns the prediction results to the Web server. Finally, the results are rendered into an Html file, which is then sent to the client browser to visualize the result data.

[0057] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for managing a quick call algorithm model on a web side, characterized in that: The following steps are involved: S1. Complete the construction and training of the algorithm model on the local computer, and install the Python compilation environment and dependent packages for the algorithm models required by different tasks; S2. Loading the algorithm models based on the flight test model and trend prediction respectively, and training the algorithm models according to the historical flight test parameters respectively; S3. Package the model weights and project projects, direct the dependency packages required by each algorithm model to the requirement.txt manifest file through commands, and place the project dependency packages in the environment directory; S4, algorithm virtual environment construction; S5. Build the corresponding Docker image package and upload it to the server. S6. The server parses the HTTP request sent by the client; S7. Call and return the visualization result through the CGI interface.

2. According to claim 1, a method for managing a quick call algorithm model on a web side is characterized in that: In step S2, the algorithm model includes a single-dimensional test flight parameter time series prediction model, a multi-dimensional data anomaly monitoring model, an automatic labeling model for flight modes and flight subjects, a typical scenario and parameter dynamic identification model, an automatic parsing model for time-frequency domain analysis, and a spectrum analysis automatic interpretation and anomaly monitoring model.

3. According to claim 1, a method for managing a quick call algorithm model on a web side is characterized in that: In step S4, the algorithm virtual environment construction process is as follows: S401: Create a virtual environment; S402: Install the dependent packages in the list; S403: Load different algorithm models and project projects.

4. A method for managing a quick call algorithm model on a web end according to claim 3, characterized in that: In step S401, the virtual environment is installed on the server side for different trend prediction tasks.

5. A method for managing a quick call algorithm model on a web end according to claim 3, characterized in that: In step S402, the dependency package is installed in the requirement.txt manifest file of each model.

6. A method for managing a quick call algorithm model on a web end according to claim 3, characterized in that: In step S403, the different algorithm models and project projects are loaded into their own virtual environments respectively.

7. A method for managing a quick call algorithm model on a web end according to claim 1, characterized in that: In step S5, the steps of constructing the corresponding Docker image package and uploading it to the server are: S501: Create a virtual environment to package the project, algorithm model and manifest files into a Docker image package; S501: Upload the packaged Docker image package to the server of the real-time monitoring platform.

8. A method for managing a quick call algorithm model on a web end according to claim 1, characterized in that: In step S6, the server parses the HTTP message sent by the client as follows: S601: When the user needs to perform a trend forecasting task, he clicks a corresponding button on the client browser interface; S602: The client sends an HTTP request to the server.

9. A method for managing a quick call algorithm model on a web end according to claim 1, characterized in that: In step S7, the CGI interface calls and starts the virtual environment corresponding to the algorithm model on the application server, reads the data required for the task from the database, performs forward reasoning of the model, and obtains the prediction result.

10. A method for managing a quick call algorithm model on a web end according to claim 9, characterized in that: In step S7, the prediction result is sent to the Web server through the CGI interface, the calculation result is rendered in Json and combined with the template to form an Html file, which is sent to the client browser to provide users with a visual presentation of trend prediction and real-time monitoring of the test flight model.