Application development and deployment method based on cloud platform and cloud platform system
By adopting front-end and back-end integrated design and containerization technology on the cloud platform, using Python and two-level proxy routing, the increased complexity of the front-end and back-end separation architecture and the multi-technology stack management problem are solved, and a Web that responds quickly to needs and efficiently iterates is realized. Application development and deployment.
Patent Information
- Application Number
- CN202410504220.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-04-25
AI Technical Summary
In the existing technology, the architecture model of separation of front and back ends increases the complexity of development and requires the configuration of a large number of interface definitions and interface documents, which hinders the development progress. In addition, full-stack developers need to master multiple technology stacks, making it difficult to meet the needs of rapid iteration.
It adopts a front-end and back-end integrated design architecture and containerization technology based on the cloud platform, uses Python as a unified technology stack, and routes access through a two-level proxy to achieve direct development, testing and deployment of web applications, simplifying the development process and lowering the threshold.
It improves the speed of business personnel responding to needs and the iteration speed of application versions, improves work efficiency and flexibility, simplifies technology stack management, reduces development complexity, and supports rapid iteration and function customization.
Smart Images

Figure CN118353887B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software development systems, and in particular to a cloud platform-based application development and deployment method and a cloud platform system. Background Art
[0002] With the rapid development of network technology, Web applications (i.e. Web applications) have become one of the current mainstream applications, and the development and deployment of Web applications has also become a problem that developers need to solve. Web applications are applications that are accessed through the network Web, and users can access their functions based on a browser. Compared with traditional desktop applications, Web applications do not need to be installed on the user's computer, but rely on a Web browser to run. Users can interact with Web applications through the browser and obtain the required information or complete specific tasks. They have the advantages of cross-platform compatibility, easy updating and maintenance, and access anytime and anywhere. The implementation of Web applications mainly relies on Web front-end (also known as client) technology, Web back-end (also known as server-side) technology, database technology, etc.
[0003] Web application development refers to developers using network technology and programming languages to develop applications suitable for the Web environment, while Web application deployment refers to deploying the developed Web application to the server (mainly installing and deploying the relevant components of the Web application, such as the operating environment, program, database, middleware, etc. on the server) so that users can access it through the network. With the development and popularization of cloud computing technology, more implementation solutions are provided for the development and deployment of applications. Cloud platform refers to a software platform that provides basic resource capabilities such as computing, network and storage based on hardware. Based on the cloud platform, developers can deploy the applications they develop to the cloud platform, and the cloud platform provides operating resources for the application. Traditional cloud platforms (such as GAE platform, WeChat applet platform, etc.) usually adopt a front-end and back-end separation architecture. The front-end is responsible for page rendering and interaction, usually using technologies such as JavaScript and hypertext markup language HTML; the back-end is responsible for business and data logic processing, usually using technologies such as PHP and Java. The loosely coupled design of front-end and back-end separation allows the front-end and back-end to be developed simultaneously, and allows teams to use different technology stacks and tools for development according to their respective needs, thereby improving development efficiency. However, the front-end and back-end separation architecture model increases the complexity of development and requires the configuration of a large number of interface definitions and interface documents (the interaction between the front-end and back-end is highly dependent on the API interface). The communication cost between the front-end and back-end is high, and misunderstandings and inconsistencies are prone to occur, which hinders the development progress.
[0004] In order to improve the development efficiency of Web applications and reduce the communication costs and problems caused by the collaboration between the front-end and back-end, the existing technology also proposes the web full-stack development technology, in which full-stack developers undertake all functional development tasks including the front-end, back-end, database management, and cloud computing platforms. However, considering the differences between the front-end technology stack (mainly including HTML, CSS and JavaScript, as well as various front-end frameworks and libraries) and the back-end technology stack (mainly including PHP, Java, as well as various back-end frameworks and libraries), database technology, and cloud computing technology, high requirements are placed on full-stack developers, which also raises the development threshold of Web applications. When business needs change, developers are required to re-develop the code. Business personnel are highly dependent on technical developers, which reduces the efficiency and flexibility of application development and makes it difficult to meet the needs of fast iteration of Web applications.
[0005] On the other hand, with the popularity of large language models (LLM) such as the GPT model, model-based application development and deployment have also been proposed. How to use the model to provide users with more application scenarios is also one of the current research hotspots. Summary of the invention
[0006] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a cloud platform-based application development and deployment method and cloud platform system. The present invention is based on a front-end and back-end integrated design architecture and containerization technology, uses Python as a unified technology stack, and uses a two-level proxy for routing access. It can directly complete the development, testing and deployment of Web applications on the cloud platform, so that business personnel can respond to demand changes more quickly, accelerate the iteration and upgrade of application versions, and improve the work efficiency and flexibility of business personnel, so as to better meet business needs.
[0007] To achieve the above objectives, the present invention provides the following technical solutions:
[0008] A cloud platform-based application development and deployment method comprises the following steps:
[0009] Deploy the Kubernetes container cloud platform and start containers according to organizations. The Kubernetes container cloud platform is used to configure container resources for each organizational tenant. Each organizational tenant corresponds to a container. Different organizational tenants correspond to different containers. Each container is set with a container IP and a corresponding server name.
[0010] Configure two-level proxy routing and perform routing access through two-level proxy devices. The first-level proxy device is used to match requests to the corresponding container based on the server name, and the second-level proxy device is used to match requests to the application process based on the application name.
[0011] Configuring a Python Web framework, wherein the Python Web framework is used to develop Python Web applications;
[0012] Configure an application store for each organization tenant, which is used to obtain the Python Web application to be deployed, and upload and deploy the Python Web application to the container corresponding to the target organization tenant.
[0013] Further, the steps to upload a Python web application through the app store include:
[0014] Receive an application deployment request for a target organization tenant, wherein the application deployment request includes an application store URL address having a front-end machine IP address, and the application store URL address also includes a server name of the target organization tenant and application program name information of the application store;
[0015] After matching the front-end machine according to the aforementioned front-end machine IP address, the front-end machine, as a first-level proxy device, forwards the request to the container of the target organization tenant according to the aforementioned server name;
[0016] The container, as a secondary proxy device, forwards the request to the application store process of the target organization tenant according to the application name of the aforementioned application store;
[0017] Start the application store and upload the Python Web application to be deployed through the operation interface of the application store.
[0018] Further, receiving an application deployment request for a target organization tenant through a Web browser includes the following steps:
[0019] Obtain the address information entered by the business personnel in the address bar of the Web browser;
[0020] After identifying the front-end machine IP address in the address information, match it to the corresponding front-end machine; then, identify the server name and application name in the address information, and send the identified server name and application name as path parameters to the aforementioned front-end machine.
[0021] Furthermore, when uploading a Python Web application, a code file of the Python Web application developed by the business personnel using the aforementioned Python Web framework is obtained; the aforementioned code file is packaged and compressed to obtain an application compressed file in a preset format, and then the aforementioned application compressed file is selected through the operation interface of the application store and uploaded to the corresponding server;
[0022] The server is configured to: receive an application compressed file, store the application compressed file in a temporary directory, and decompress the application compressed file.
[0023] Further, the steps of deploying the Python web application to the container corresponding to the target organization tenant include:
[0024] Get the decompressed application file;
[0025] Copy the decompressed application file to the specified application directory, and allocate an unoccupied port in the container to the Python Web application, through which the corresponding Python Web application can be accessed;
[0026] Use the Python command to start the aforementioned Python Web application, so that the Python Web application runs on the aforementioned server, completing the deployment of the Python Web application.
[0027] Furthermore, after obtaining the Python code file of the Python Web application written by the business personnel through the Python Web framework, the Python code in the code file is converted into a page description in JSON format, and the page is rendered through the Vue.js dynamic component.
[0028] Furthermore, the Python Web framework is also configured with an interactive notebook Jupyter, through which Python code files related to data analysis are written.
[0029] Furthermore, on the cloud platform, a function window interface is configured for the institutional tenants, through which the user can access the applications published by the institutional tenants and enter the applications by clicking on the corresponding link information;
[0030] The steps to access the applications published by the institutional tenants through the functional window interface are as follows;
[0031] Select the type of application you want to access, that is, Python Web application, through the function window interface;
[0032] Output the directory of Python web applications published by the organization's tenants;
[0033] Obtain the target Python Web application information selected by the user from the Python Web application directory, obtain the corresponding URL address and then issue an access request; the URL address contains the front-end machine IP address, server name and target Python Web application name of the aforementioned institution tenant;
[0034] Find the two-level proxy device according to the URL address, the first-level proxy device front-end forwards the access request to the corresponding container according to the server name, and the second-level proxy device container forwards the access request to the corresponding port according to the application name, that is, the port corresponding to the target Python Web application;
[0035] Returns link information for the aforementioned target Python web application.
[0036] The present invention also provides a cloud platform system for developing and deploying application programs, including the following structure:
[0037] The container configuration unit is used to configure container resources for each organizational tenant through the Kubernetes container cloud platform. Each organizational tenant corresponds to a container, and different organizational tenants correspond to different containers. Each container is set with a container IP and a corresponding server name; and, start the container by organization.
[0038] The routing unit is used to configure two-level proxy routing and perform routing access through two-level proxy devices. The first-level proxy device is used to match requests to corresponding containers according to the server name, and the second-level proxy device is used to match requests to application processes according to the application name.
[0039] An application development unit, used for configuring a Python Web framework, wherein the Python Web framework is used for developing Python Web applications;
[0040] The application upload and deployment unit is used to configure the application store of each organization tenant, and the application store is used to obtain the Python Web application to be deployed, and upload and deploy the Python Web application to the container corresponding to the target organization tenant.
[0041] Further, the cloud platform system is associated with a preset model, and a model-oriented Python Web application is developed through the application development unit;
[0042] The model-oriented Python Web application is configured to: display the functional module information in the aforementioned preset model; and call one or more functional modules in the aforementioned preset model to perform calculations and receive the calculation results returned by the aforementioned model.
[0043] Due to the adoption of the above technical solution, the present invention has the following advantages and positive effects compared with the prior art, as an example: the present invention is based on a front-end and back-end integrated design architecture and containerization technology, adopts Python as a unified technology stack, and uses a two-level proxy for routing access. It can directly complete the development, testing and deployment of Web applications on the cloud platform, so that business personnel can respond to changes in demand more quickly, accelerate the iteration and upgrade of application versions, and improve the work efficiency and flexibility of business personnel, thereby better meeting business needs.
[0044] On the one hand, using Python full-stack development, the unified technology stack simplifies the development process and technology stack management, significantly reducing the complexity and cycle of development. At the same time, Python as a low-code form can significantly reduce the complexity of development, and there is no need to configure a large number of HTML, CSS and JavaScript code files. In addition, using the Python ecosystem can accelerate application development and function customization. Compared with the traditional interface drag-and-drop form, the code-driven development model is more flexible and customizable.
[0045] On the other hand, the cloud platform system can also associate with a preset model, and display and call the functional modules in the aforementioned preset model to perform task processing by developing and deploying applications. The model can be any of the models such as a large language model LLM (Large Language Model), a neural network language model, a training language model, a mathematical model, etc. In this way, for the preset model, the function of facilitating users to obtain and call the model through a Python Web application is realized. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A logical structure diagram of the two-level proxy routing provided in an embodiment of the present invention.
[0047] Figure 2 A flowchart of a cloud platform-based application development and deployment method provided in an embodiment of the present invention.
[0048] Figure 3 A flowchart of a business person developing, uploading and deploying an application program provided by an embodiment of the present invention.
[0049] Figure 4 A flow chart of an institutional user accessing an application provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following is a further detailed description of the cloud platform-based application development and deployment method and cloud platform system disclosed in the present invention in conjunction with the accompanying drawings and specific embodiments. It should be noted that the technologies (including methods and devices) known to ordinary technicians in the relevant fields may not be discussed in detail, but in appropriate cases, the above-mentioned known technologies are considered to be part of the specification. At the same time, other examples of exemplary embodiments may have different values. The structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the invention.
[0051] In the description of the embodiments of the present application, " / " means or, and "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" means: A and B exist alone, B exists alone, and A and B exist at the same time. In the description of the embodiments of the present application, "multiple" means two or more.
[0052] The technical concept and solution of the present invention are introduced below based on exemplary application scenarios.
[0053] The explanations of relevant technical terms are as follows:
[0054] 1) Kubernetes, abbreviated as K8S, is an open source container orchestration tool used to automate the deployment, expansion, and management of containerized applications.
[0055] 2) Jupyter (also known as Jupyter Notebook) is an online interactive notebook platform for creating, sharing and displaying computational work. It supports multiple programming languages, including Python, R, Julia, etc.
[0056] 3) FastAPI: A modern, fast (high performance) web framework based on Python.
[0057] 4) Vue.js: A popular open source JavaScript front-end tool for building interactive web user interfaces. Example
[0058] A cloud platform-based application development and deployment method comprises the following steps:
[0059] S100, deploy the Kubernetes container cloud platform and start the container according to the organization; wherein, the Kubernetes container cloud platform is used to configure container resources for each organizational tenant, each organizational tenant corresponds to a container, different organizational tenants correspond to different containers, and each container is set with a container IP and a corresponding server name.
[0060] S200, configure two-level proxy routing, and perform routing access through two-level proxy devices. The first-level proxy device is used to match the request to the corresponding container according to the server name, and the second-level proxy device is used to match the request to the application process according to the application name.
[0061] S300, configuring a Python Web framework (ie, a Web framework based on the Python language), wherein the Python Web framework is used to develop a Python Web application program.
[0062] S400, configuring an application store for each organization tenant, wherein the application store is used to obtain a Python Web application to be deployed, and upload and deploy the Python Web application to a container corresponding to the target organization tenant.
[0063] The tenant refers to an organization or individual who uses cloud services on a cloud platform. They can rent cloud resources to meet their needs. In this embodiment, an institutional tenant is a tenant of an organization. An institutional tenant can choose different cloud services according to their needs, such as computing resources, storage space, network bandwidth, etc., and pay according to actual usage; and a tenant can manage and configure their own cloud resources through the management console or API of the cloud service provider.
[0064] See also Figure 1 As shown in the figure, as an example of a typical method, there can be two specific organizational tenants, namely Organization 1 and Organization 2. The Kubernetes container cloud platform starts containers according to organizational tenants. Each organizational tenant has its own container. Each container is configured with a unique container IP to distinguish different containers, and the corresponding server is configured. Each server has a unique server name (ID) to distinguish different servers. Containers and servers are set one by one. Figure 1 In the figure, the container IP of the container corresponding to organization 1 is 192.168.1.100, the server name is test1, and the container 192.168.1.100 corresponds to the server test1; the container IP of the container corresponding to organization 2 is 192.168.1.101, the server name is test2, and the container 192.168.1.101 corresponds to the server test2.
[0065] In this embodiment, the steps for uploading a Python Web application through an application store may be as follows:
[0066] S410, receiving an application deployment request for a target organization tenant, wherein the application deployment request includes an application store URL address having a front-end machine IP address, and the application store URL address also includes a server name of the target organization tenant and application program name information of the application store.
[0067] S420, after matching the front-end machine according to the aforementioned front-end machine IP address, the front-end machine, as a first-level proxy device, forwards the request to the container of the target organization tenant according to the aforementioned server name.
[0068] S430, the container, as a secondary proxy device, forwards the request to the application store process of the target organization tenant according to the application name of the aforementioned application store.
[0069] S440: Start an application store and upload the Python Web application to be deployed through the operation interface of the application store.
[0070] Specifically, in step S410, an application deployment request for a target organization tenant may be received through a Web browser, including the following steps:
[0071] S411, obtaining the address information entered by the business personnel in the address bar of the Web browser.
[0072] S412, after identifying the front-end machine IP address in the address information, match it to the corresponding front-end machine; then, identify the server name and application name in the address information, and send the identified server name and application name as path parameters to the aforementioned front-end machine.
[0073] In step S440, when uploading the Python Web application through the operation interface of the application store, the specific steps can be as follows: obtain the code file of the Python Web application developed by the business personnel through the aforementioned Python Web framework; package and compress the aforementioned code file to obtain an application compressed file in a preset format, and then select the aforementioned application compressed file through the operation interface of the application store and upload it to the corresponding server.
[0074] The server is configured to: receive an application compressed file, store the application compressed file in a temporary directory, and decompress the application compressed file.
[0075] At this time, a file compression processing unit can be set up, which is configured to: package and compress the aforementioned application code files to obtain an application compressed file in a preset format, and then store it in a specified path of the application store. Later, the business personnel can access the application compressed files in the aforementioned specified path through the operation interface of the application store, select the target application compressed file from it, and upload it to the server.
[0076] At this time, in step S400, the step of deploying the Python Web application to the container corresponding to the target organization tenant is preferably as follows:
[0077] S450: Obtain the decompressed application file.
[0078] S460, copy the decompressed application file to the specified application directory, and allocate an unoccupied port in the container to the Python Web application, through which the corresponding Python Web application can be accessed.
[0079] S470, using a Python command to start the aforementioned Python Web application, so that the Python Web application runs on the aforementioned server, completing the deployment of the Python Web application, see Figure 2 shown.
[0080] The present invention adopts K8S container cloud platform, builds cloud platform through K8S to carry out container orchestration, and realizes the isolation and deployment of application programs through containerization technology. Specifically, each organization is assigned a container as an institutional tenant, and different institutional tenants correspond to different containers, so that the applications between different organizations are isolated from each other. At the same time, based on the relationship between the container and the application, a two-level proxy device is configured for routing access. The first-level proxy device routes the request to the corresponding container according to the server name, and the second-level proxy routes the request to the specific Web application process according to the Web application name. In addition, an application store (i.e., App Store program) is configured for each institutional tenant for uploading and deploying applications. Through the application store corresponding to the institutional tenant, the business personnel can package the relevant executable files of the application to be deployed into a zip file and upload it to the corresponding server. The server will decompress the zip file and deploy it to the corresponding container; at the same time, an unoccupied port is allocated to each application for access.
[0081] In this embodiment, preferably, after obtaining the Python code file of the Python Web application written by the business personnel through the Python Web framework, the Python code in the code file can be converted into a page description in JSON format, and the page is rendered through the Vue.js dynamic component.
[0082] Furthermore, the Python Web framework can also be configured with an interactive notebook Jupyter, through which Python code files related to data analysis can be written. In this way, business personnel can conduct open exploratory analysis of applications in Jupyter, and after completing the analysis, directly use Python code to write applications, and then deploy the applications. In this way, the development and deployment of Web applications are completed based on the cloud platform to better meet business needs.
[0083] In another embodiment of the present invention, a function window interface is also configured for institutional tenants on the cloud platform, through which users can access applications published by institutional tenants and enter the applications by clicking on corresponding link information.
[0084] Specifically, the steps for accessing applications published by institutional tenants through the function window interface are as follows: select the type of application to be accessed, i.e., Python Web application, through the function window interface; output the Python Web application directory published by the institutional tenant; obtain the target Python Web application information selected by the user from the Python Web application directory, and issue an access request after obtaining the corresponding URL address; the URL address of the target Python Web application may include the front-end machine IP address, server name and target Python Web application name of the aforementioned institutional tenant; find a two-level proxy device according to the URL address, the first-level proxy device front-end machine forwards the access request to the corresponding container according to the server name, and the second-level proxy device container forwards the access request to the corresponding port according to the application name, i.e., the port corresponding to the target Python Web application; return the link information of the aforementioned target Python Web application.
[0085] In this embodiment, it is preferred to receive the application deployment request of the target organization tenant through a Web browser. At this time, the address information entered by the business personnel in the address bar of the Web browser can be obtained; after identifying the front-end machine IP address in the address information, the corresponding front-end machine is first matched; then the server name and application name in the address information are identified, and the identified server name and application name are sent to the aforementioned front-end machine as path parameters.
[0086] Combine the following Figure 3 and 4 Describe in detail the specific scenarios for deploying and accessing applications.
[0087] First, after the business personnel complete the development and debugging of Python Web application app01 through the cloud platform, they obtain the application file of app01. The application file processing unit of the cloud platform packages and compresses the application file (code file) of app01 to obtain the compressed application file of app01.
[0088] Then, the business personnel enters the application store URL address including the front-end machine IP address (i.e. 192.168.1.1) in the address bar of the web browser. For example, the request information can be "http: / / 192.168.1.1 / test1 / appstore", and the application store URL address includes the path parameter server name (i.e. test1) and application name (i.e. appstore).
[0089] Afterwards, proxy routing forwarding is performed. After matching the front-end machine according to the front-end machine IP address, the front-end machine forwards the request to the corresponding container (for example, the corresponding container IP is 192.168.1.100) according to the first-level proxy routing rule (i.e. matching the request to the corresponding container according to the server name), and then forwards the request to the application process of the App Store according to the second-level proxy routing rule (i.e. matching the request to the application process according to the application name), and the corresponding port is 8114.
[0090] Start the App Store, and the business personnel can select the previously processed application compressed file on the App Store operation interface, such as the application compressed file of app01, and upload it to the server. After uploading, the compressed file is stored in a temporary directory and decompressed.
[0091] Finally, deploy the application. The decompressed application files are copied to the specified application directory, for example, the Workspace / app01 directory. An unoccupied port, such as 8115, is automatically assigned to the application app01 in the container. Use the Python command to start the application app01, and the application app01 starts running on the server. In this way, the deployment of the application app01 is completed.
[0092] In this way, the application can be published as soon as it is uploaded, which greatly simplifies the deployment process and steps.
[0093] The process of users from institution 1 accessing app01 can be found in Figure 4 shown.
[0094] Specifically, first, the user of institution 1 can input the IP address of the front-end machine through the browser, such as "http: / / 192.168.1.1"; after identifying the IP address of the front-end machine, the corresponding function window interface is output; through the function window interface, the user can select the type of application to be accessed, for example, if the user selects Python Web application, the interface can output the Python Web application directory published by the tenant of the institution associated with the front-end machine. Obtain the target Python Web application information selected by the user from the Python Web application directory, such as app01, obtain the URL address "http: / / 192.168.1.1 / test1 / app01" corresponding to app01, and then issue an access request; the URL address contains the IP address of the front-end machine of the tenant of the institution "192.168.1.1", the server name "test1" and the target Python Web application name "app01". According to the URL address, the two-level proxy device is found. The first-level proxy device front-end machine can forward the access request to the corresponding container "192.168.1.100" according to the server name "test1", and the second-level proxy device container forwards the access request to the corresponding port according to the application name "app01", that is, the port "8115" corresponding to the target Python Web application "app01"; finally, the link information of the application app01 is returned, and the user can enter the application by clicking the corresponding link.
[0095] Furthermore, in another implementation of this embodiment, based on the cloud platform, the backend API can be written using FastAPI, and the front-end interface can be edited using Vue.js, and then the back-end application files and the front-end application files can be uploaded to the cloud platform as two independent applications.
[0096] Another embodiment of the present invention further provides a cloud platform system for developing and deploying application programs.
[0097] The cloud platform system includes a container configuration unit, a routing unit, an application development unit and an application upload and deployment unit.
[0098] The container configuration unit is used to configure container resources for each institutional tenant through the Kubernetes container cloud platform. Each institutional tenant corresponds to a container, and different institutional tenants correspond to different containers. A container IP and a corresponding server name are set for each container; and, the container is started according to the organization.
[0099] The routing unit is used to configure two-level proxy routing and perform routing access through two-level proxy devices. The first-level proxy device is used to match requests to corresponding containers according to server names, and the second-level proxy device is used to match requests to application processes according to application names.
[0100] The application development unit is used to configure a Python Web framework, and the Python Web framework is used to develop Python Web application programs.
[0101] The application upload and deployment unit is used to configure the application store of each organization tenant, and the application store is used to obtain the Python Web application to be deployed, and upload and deploy the Python Web application to the container corresponding to the target organization tenant.
[0102] In this embodiment, the cloud platform system is associated with a preset model, and a model-oriented Python Web application is developed through the application development unit.
[0103] The preset model, as an example of a typical method, can be any one of the models such as a large language model (LLM), a neural network language model, a training language model, a mathematical model, etc.
[0104] The model-oriented Python Web application is configured to: display the functional module information in the aforementioned preset model; and call one or more functional modules in the aforementioned preset model to perform calculations and receive the calculation results returned by the aforementioned model.
[0105] In this way, for the preset model, after the business personnel develop and deploy the corresponding Python Web application, users can conveniently obtain and call the functions of the model through the Python Web application. As an example but not a limitation, for example, if the preset model is the InternLM model (an open source large model, also known as the Shusheng Puyu large model), the business personnel can develop and deploy a Python Web App for the InternLM model through the cloud platform to display and call the functional modules of the internlm model and return the results.
[0106] For other technical features, please refer to the description of the previous embodiment and will not be repeated here.
[0107] The present invention also provides a computer-readable storage medium for storing a computer program that can be executed by a processing unit, wherein the computer program implements the above-mentioned method when executed by the processing unit.
[0108] The storage medium may include any medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0109] For other technical features, please refer to the description of the previous embodiment and will not be repeated here.
[0110] In the above description, the disclosure of the present invention is not intended to limit itself to these aspects. Rather, within the scope of the target protection of the present disclosure, the components can be selectively and operatively combined in any number. In addition, terms such as "include", "encompass" and "have" should be interpreted as inclusive or open by default, rather than exclusive or closed, unless they are explicitly defined to the contrary. All technical, scientific or other terms are consistent with the meanings understood by those skilled in the art, unless they are defined to the contrary. Common terms found in dictionaries should not be interpreted too idealistically or too impractically in the context of relevant technical documents, unless the present disclosure explicitly defines them as such. Any changes and modifications made by a person of ordinary skill in the field of the present invention based on the above disclosure belong to the scope of protection of the claims.
Claims
1. A cloud platform-based application development and deployment method, characterized in that Includes steps: Deploy the Kubernetes container cloud platform and start containers according to organizations. The Kubernetes container cloud platform is used to configure container resources for each organizational tenant. Each organizational tenant corresponds to a container. Different organizational tenants correspond to different containers. Each container is set with a container IP and a corresponding server name. Configure two-level proxy routing and perform routing access through two-level proxy devices. The first-level proxy device is used to match requests to the corresponding container based on the server name, and the second-level proxy device is used to match requests to the application process based on the application name. Configuring a Python Web framework, wherein the Python Web framework is used to develop Python Web applications; Configure an application store for each institutional tenant, the application store is used to obtain the Python Web application to be deployed, and upload and deploy the Python Web application to the container corresponding to the target institutional tenant; wherein the step of uploading the Python Web application through the application store includes: receiving an application deployment request for the target institutional tenant, the application deployment request includes an application store URL address with a front-end machine IP address, and the application store URL address also includes the server name of the target institutional tenant and the application name information of the application store; after matching the front-end machine according to the aforementioned front-end machine IP address, the front-end machine, as a first-level proxy device, forwards the request to the container of the target institutional tenant according to the aforementioned server name; the container, as a second-level proxy device, forwards the request to the application store process of the target institutional tenant according to the aforementioned application store application name; start the application store, and upload the Python Web application to be deployed through the operation interface of the application store.
2. The method according to claim 1, characterized in that: Receiving an application deployment request for a target organization tenant through a web browser includes the following steps: Obtain the address information entered by the business personnel in the address bar of the Web browser; After identifying the front-end machine IP address in the address information, match it to the corresponding front-end machine; then, identify the server name and application name in the address information, and send the identified server name and application name as path parameters to the aforementioned front-end machine.
3. The method according to claim 1 or 2, characterized in that: When uploading a Python Web application, obtain the code file of the Python Web application developed by the business personnel using the aforementioned Python Web framework; After the aforementioned code files are packaged and compressed to obtain an application compressed file in a preset format, the aforementioned application compressed file is selected through the operation interface of the application store and uploaded to the corresponding server; The server is configured to: receive an application compressed file, store the application compressed file in a temporary directory, and decompress the application compressed file.
4. The method according to claim 3, characterized in that The steps to deploy a Python web application to a container corresponding to the target organization tenant include: Get the decompressed application file; Copy the decompressed application file to the specified application directory, and allocate an unoccupied port in the container to the Python Web application, through which the corresponding Python Web application can be accessed; Use the Python command to start the aforementioned Python Web application, so that the Python Web application runs on the aforementioned server, completing the deployment of the Python Web application.
5. The method according to claim 1, characterized in that: After obtaining the Python code file of the Python Web application written by the business personnel through the Python Web framework, the Python code in the code file is converted into a page description in JSON format, and the page is rendered through the Vue.js dynamic component.
6. The method according to claim 5, characterized in that: The Python Web framework is also configured with an interactive notebook Jupyter, through which Python code files related to data analysis are written.
7. The method according to claim 1, characterized in that On the cloud platform, a function window interface is configured for institutional tenants, through which users can access applications published by institutional tenants and enter the applications by clicking on corresponding link information; The steps to access the applications published by the institutional tenants through the functional window interface are as follows; Select the type of application you want to access, that is, Python Web application, through the function window interface; Output the directory of Python web applications published by the organization's tenants; Obtain the target Python Web application information selected by the user from the Python Web application directory, obtain the corresponding URL address and then issue an access request; the URL address contains the front-end machine IP address, server name and target Python Web application name of the aforementioned institution tenant; Find the two-level proxy device according to the URL address, the first-level proxy device front-end forwards the access request to the corresponding container according to the server name, and the second-level proxy device container forwards the access request to the corresponding port according to the application name, that is, the port corresponding to the target Python Web application; Returns link information for the aforementioned target Python web application.
8. A cloud platform system for application development and deployment, characterized in that include: The container configuration unit is used to configure container resources for each organizational tenant through the Kubernetes container cloud platform. Each organizational tenant corresponds to a container, and different organizational tenants correspond to different containers. Each container is set with a container IP and a corresponding server name; and, start the container by organization. The routing unit is used to configure two-level proxy routing and perform routing access through two-level proxy devices. The first-level proxy device is used to match requests to corresponding containers according to the server name, and the second-level proxy device is used to match requests to application processes according to the application name. An application development unit, used for configuring a Python Web framework, wherein the Python Web framework is used for developing Python Web applications; An application uploading and deployment unit is used to configure an application store for each institutional tenant, wherein the application store is used to obtain a Python Web application to be deployed, and upload and deploy the Python Web application to a container corresponding to a target institutional tenant; wherein the step of uploading a Python Web application through the application store comprises: receiving an application deployment request for a target institutional tenant, wherein the application deployment request comprises an application store URL address having an IP address of a front-end machine, wherein the application store URL address also comprises a server name of the target institutional tenant and application name information of the application store; after matching the front-end machine according to the aforementioned front-end machine IP address, the front-end machine, as a first-level proxy device, forwards the request to the container of the target institutional tenant according to the aforementioned server name; the container, as a second-level proxy device, forwards the request to the application store process of the target institutional tenant according to the aforementioned application name of the application store; and starting the application store, and uploading the Python Web application to be deployed through the operation interface of the application store.
9. The cloud platform system according to claim 8, characterized in that: The cloud platform system is associated with a preset model, and after the model-oriented Python Web application is developed by the application development unit, it is deployed to the cloud platform by the aforementioned application upload and deployment unit; The model-oriented Python Web application is configured to: display the functional module information in the aforementioned preset model; and call one or more functional modules in the aforementioned preset model to perform calculations and receive the calculation results returned by the aforementioned model.
