Application deployment method and device, equipment and medium
Through the combination of low-code application development technology and lightweight frameworks at the edge, the lightweight deployment problem of software applications in the cloud-edge collaborative environment is solved, rapid deployment and function expansion are achieved, and resource consumption and development complexity are reduced.
Patent Information
- Application Number
- CN202411322105.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2024-12-24
AI Technical Summary
Under low-code development technology, software applications become small and light, and how to achieve lightweight cloud-edge collaborative application deployment is a problem that needs to be solved.
By developing applications based on low-code application development technology, using a lightweight framework to build the edge end, and using lightweight containers on the edge end, it realizes downloading and parsing of cloud broadcast application deployment packages, identifying and installing target dependencies, and injecting application operation Parameters to complete application deployment.
It realizes rapid application deployment and function expansion at the edge, reduces resource consumption, simplifies development processes, supports rapid application deployment and function expansion, and improves deployment efficiency and success rate.
Smart Images

Figure CN119179498A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software development, and in particular to an application deployment method, device, equipment and medium. Background Art
[0002] Application deployment refers to the process of installing, configuring, running, and making software applications available in a specific environment. Software applications usually need to rely on different databases, operating environments, and system configurations. In order to ensure the normal operation of software applications in the production environment, software applications need to be correctly deployed, and the specific method of software application deployment varies depending on the characteristics of the software application. Especially after starting to use low-code development technology to develop software applications, software applications have become small and light. How to achieve lightweight cloud-edge collaborative application deployment is a problem that needs to be solved. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide an application deployment method, apparatus, device and medium, which can realize lightweight cloud-edge collaborative application deployment at the edge by combining application development based on low-code application development technology, building edge based on lightweight framework and using lightweight container at the edge. The specific scheme is as follows:
[0004] The present application provides an application deployment method, which is applied to an edge terminal built on a lightweight framework, including:
[0005] Download the application deployment package from the cloud based on the network location of the application deployment package broadcast by the cloud; wherein the application deployment package is a deployment package automatically generated by the cloud after analyzing the application to be deployed; the application to be deployed is an application developed by the cloud using low-code application development technology;
[0006] Parsing the application deployment package to read an application configuration file from the application deployment package, and extracting application deployment parameters from the application configuration file to deploy the application to be deployed based on the application deployment parameters;
[0007] Analyzing the dependency declarations in the application deployment package using a local preset dependency manager to identify target dependencies required for the application to be deployed, and locally configuring and managing the target dependencies required for the application to be deployed based on a difference comparison result between the target dependencies and pre-installed dependencies in the local lightweight container;
[0008] The application running parameters are extracted from the application configuration file, and the application running parameters are injected into the application to be deployed, so as to complete the deployment of the application to be deployed.
[0009] Optionally, the process of generating the application deployment package includes:
[0010] The cloud uses a preset automatic packaging engine to analyze the application to be deployed to determine the application configuration file of the application to be deployed and the target dependencies required for the application to be deployed to run; the application configuration file includes the application deployment parameters and the application running parameters;
[0011] The cloud uses the preset automatic packaging engine to evaluate the application running environment and the deployable platform of the application to be deployed, so as to determine the corresponding compression algorithm and packaging method based on the evaluation result, and then uses the compression algorithm and the packaging method to compress and package the application code, the application configuration file and the target dependency of the application to be deployed to generate the application deployment package; wherein different application running environments and deployable platforms correspond to different compression algorithms and packaging methods.
[0012] Optionally, the downloading of the application deployment package from the cloud based on the network location of the application deployment package broadcasted by the cloud includes:
[0013] After the cloud generates the application deployment package and broadcasts the network location of the application deployment package based on the preset IoT communication protocol, if the edge receives the network location and determines that it can provide the application operating environment for the application to be deployed and that it belongs to the deployable platform, it downloads the application deployment package from the cloud based on the network location and reports the download progress of the application deployment package.
[0014] Optionally, the method further includes:
[0015] After the cloud completes the development of the application to be deployed using the low-code application development technology, the cloud stores the application to be deployed in the application management platform in the cloud, and uses the application management platform to manage the application to be deployed throughout its life cycle; wherein the management of the entire life cycle includes any one or a combination of the management of application code, the management of application versions, the management of dependencies required for application operation, and the management of application configuration files.
[0016] Optionally, the locally configuring and managing the target dependency required for running the application to be deployed based on the result of the difference comparison between the target dependency and the pre-installed dependency in the local lightweight container includes:
[0017] Comparing the target dependency with the pre-installed dependencies in the local lightweight container to obtain a difference comparison result; wherein the dependency includes any one or a combination of databases, network services, and middleware required for the application to run;
[0018] Determining, from the target dependencies, dependencies to be installed that do not exist in the pre-installed dependencies based on the difference comparison result, and installing the dependencies to be installed by automatically executing a preset dependency installation script;
[0019] Determine the dependency to be compared that exists in the pre-installed dependencies from the target dependencies based on the difference comparison result, perform dependency version comparison on the dependency to be compared and the installed dependencies in the pre-installed dependencies corresponding to the dependency to be compared, and perform configuration management on the installed dependencies based on the dependency version comparison result.
[0020] Optionally, the performing configuration management on the installed dependencies based on the dependency version comparison result includes:
[0021] If the dependency version comparison result indicates that the dependency version between the dependency to be compared and the corresponding installed dependency is different, then pulling the corresponding version of the dependency from the preset cloud repository based on the dependency version of the dependency to be compared, and using the corresponding version of the dependency to update the installed dependency;
[0022] If the dependency version comparison result indicates that the dependency version between the dependency to be compared and the corresponding installed dependency is the same, the installed dependency is retained.
[0023] Optionally, the method further includes:
[0024] Extracting security configuration information from the application configuration file, and encrypting and storing corresponding sensitive information in the to-be-deployed application based on the security configuration information;
[0025] After completing the deployment of the application to be deployed, if an access request for the deployed application from the target user based on the access path of the deployed application is obtained, the sensitive information encrypted and stored in the deployed application is decrypted based on the user login information in the access request, and the deployed application is started based on the decrypted information, so that the target user can log in and access the started application; wherein the access path and the user login information are located in the application running parameters.
[0026] In a second aspect, the present application provides an application deployment device, which is applied to an edge terminal built based on a lightweight framework, including:
[0027] A deployment package downloading module, used to download the application deployment package from the cloud based on the network location of the application deployment package broadcast by the cloud; wherein the application deployment package is a deployment package automatically generated by the cloud after analyzing the application to be deployed; the application to be deployed is an application developed by the cloud using low-code application development technology;
[0028] An application deployment module, used to parse the application deployment package to read an application configuration file from the application deployment package, and extract application deployment parameters from the application configuration file to deploy the application to be deployed based on the application deployment parameters;
[0029] A dependency management module, configured to analyze the dependency declarations in the application deployment package using a local preset dependency manager to identify target dependencies required for the application to be deployed, and to locally configure and manage the target dependencies required for the application to be deployed based on a difference comparison result between the target dependencies and pre-installed dependencies in the local lightweight container;
[0030] The deployment completion module is used to extract application running parameters from the application configuration file and inject the application running parameters into the application to be deployed to complete the deployment of the application to be deployed.
[0031] In a third aspect, the present application provides an electronic device, including:
[0032] Memory, used to store computer programs;
[0033] A processor is used to execute the computer program to implement the aforementioned application deployment method.
[0034] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, which implements the aforementioned application deployment method when executed by a processor.
[0035] The application deployment method of the present application is applied to an edge terminal built based on a lightweight framework; specifically, the application deployment package is downloaded from the cloud based on the network location of the application deployment package broadcast by the cloud; wherein the application deployment package is a deployment package automatically generated by the cloud after analyzing the application to be deployed; the application to be deployed is an application developed by the cloud using low-code application development technology; the application deployment package is parsed to read the application configuration file from the application deployment package, and the application deployment parameters are extracted from the application configuration file to deploy the application to be deployed based on the application deployment parameters; the dependency declaration in the application deployment package is analyzed using a local preset dependency manager to identify the target dependencies required for the operation of the application to be deployed, and the target dependencies required for the operation of the application to be deployed are locally configured and managed based on the difference comparison results between the target dependencies and the pre-installed dependencies in the local lightweight container; the application running parameters are extracted from the application configuration file, and the application running parameters are injected into the application to be deployed to complete the deployment of the application to be deployed. It can be seen that the present application realizes the cloud development and edge deployment of applications through the communication interconnection between the edge and the cloud; and, by developing applications based on low-code application development technology, the present application can simplify the application development process, making the application deployment package small and light; at the same time, by building an edge based on a lightweight framework and using lightweight containers on the edge, the present application can reduce the resource consumption on the edge, and can support the rapid deployment and functional expansion of applications, thereby developing applications based on low-code application development technology, building an edge based on a lightweight framework, and using lightweight containers on the edge, and quickly realizing lightweight cloud-edge collaborative application deployment on the edge. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0037] Figure 1 A flow chart of an application deployment method disclosed in this application;
[0038] Figure 2 This is an application deployment architecture diagram disclosed in this application;
[0039] Figure 3 A schematic diagram of the structure of an application deployment device disclosed in this application;
[0040] Figure 4This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments 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 creative work are within the scope of protection of the present invention.
[0042] The specific method of software application deployment varies depending on the characteristics of the software application. Especially after starting to use low-code development technology to develop software applications, software applications have become small and light. How to achieve lightweight cloud-edge collaborative application deployment is a problem that needs to be solved. To this end, this application provides an application deployment method that can quickly achieve lightweight cloud-edge collaborative application deployment at the edge by combining the development of applications based on low-code application development technology, building an edge based on a lightweight framework, and using lightweight containers at the edge.
[0043] See also Figure 1 As shown, an embodiment of the present invention discloses an application deployment method, which is applied to an edge terminal built based on a lightweight framework, including:
[0044] Step S11, downloading the application deployment package from the cloud based on the network location of the application deployment package broadcast by the cloud; wherein the application deployment package is a deployment package automatically generated by the cloud after analyzing the application to be deployed; the application to be deployed is an application developed by the cloud using low-code application development technology.
[0045] In this embodiment, after the application to be deployed is developed using low-code application development technology in the cloud, and the application to be deployed is analyzed and automatically generated into an application deployment package, the cloud broadcasts the network location of the application deployment package so that the edge end built based on the lightweight framework can obtain the network location of the application deployment package broadcast by the cloud, and then download the application deployment package from the cloud based on the network location, so as to realize the deployment of the application to be deployed on the edge end based on the application deployment package. It should be noted that by running a lightweight framework on the resource-constrained edge end, it not only has the characteristics of low resource consumption and fast startup, but also supports the rapid deployment of applications on the edge end and functional expansion.
[0046] Among them, for low-code application development technology, the cloud provides a visual designer to develop software applications in a visual and configurable way, so that less code is used and software applications are deployed and delivered at a faster speed. This not only simplifies the application development process and lowers the technical threshold for application development, but also makes the developed software applications easier to maintain and upgrade.
[0047] Specifically, the cloud uses the rich UI (User Interface) component library provided by the visual designer to quickly build the basic framework of the application interface by dragging and dropping components, and set the properties and styles of the components; for example: the text, color and size of the button, as well as the placeholder and validation rules of the input box. While designing the application interface, the visual designer is used to visually arrange the front-end and back-end functions, and the business logic can be bound to the components in the application interface to achieve seamless integration of functional functions and the application interface; among which, the business logic includes but is not limited to the addition, deletion, modification and query of data, the triggering of workflows, etc. In addition, the visual designer can also be used to design data models to define the structure and relationship of data in the software application, thereby providing data support for the application interface.
[0048] It should be noted that after the application to be deployed is developed using low-code application development technology in the cloud, the cloud will store the application to be deployed on the application management platform in the cloud, and use the application management platform to manage the application to be deployed throughout its life cycle. Among them, the management of the entire life cycle includes any one or a combination of the management of application code, the management of application versions, the management of dependencies required for application operation, and the management of application configuration files. In this way, the management of the software application throughout its life cycle through the application management platform can not only provide important reference information for the deployment of software applications, but also ensure the integrity and traceability of software applications throughout their life cycle.
[0049] Furthermore, for the generation of the application deployment package, after the application to be deployed is stored in the application management platform in the cloud, the application management platform will start the preset automatic packaging engine, and use the preset automatic packaging engine and artificial intelligence and machine learning algorithms to analyze the application to be deployed stored in the application management platform to determine the application configuration file of the application to be deployed and the target dependencies required for the operation of the application to be deployed. Then the cloud uses the preset automatic packaging engine to evaluate the application operating environment and deployable platform of the application to be deployed, and determines the corresponding compression algorithm and packaging method based on the evaluation results, and uses the compression algorithm and packaging method to compress and package the application code, application configuration file and target dependencies of the application to be deployed, so as to generate an application deployment package. Among them, since different application operating environments and different deployable platforms correspond to different compression algorithms and different packaging methods, this embodiment can dynamically select the most suitable compression algorithm and packaging method according to the application operating environment and deployable platform of the application to be deployed, thereby improving the compatibility and availability of the application deployment package.
[0050] It should be noted that the application configuration file includes application deployment parameters and application running parameters; application deployment parameters include but are not limited to application name, running port and service version, etc.; application running parameters include but are not limited to application access path, application initialization data and user login information, etc.; user login information includes user name and password, etc. The dependencies required for application operation include but are not limited to databases, network services and middleware required for application operation; middleware includes but is not limited to Redis (Remote Dictionary Server) and RabbitMQ (MessageQueue); databases include but are not limited to MySQL and MongoDB, etc.; network services include but are not limited to mail services, SMS services or other third-party services.
[0051] In this embodiment, after the application deployment package is generated in the cloud and the network location of the application deployment package is broadcast based on the preset IoT communication protocol, if the edge receives the network location of the application deployment package and determines that it can provide the corresponding application operating environment for the application to be deployed and that it is a deployable platform for the application to be deployed, the application deployment package is downloaded from the cloud based on the network location, and the download progress of the application deployment package is reported. In this way, through the restrictions of the application operating environment and deployable platform of the application to be deployed, the problem of the edge downloading the application deployment package and finding that it cannot be deployed or cannot be used after deployment can be avoided, thereby greatly improving the efficiency and success rate of application deployment.
[0052] Among them, the cloud and the edge have established IoT communication between the two ends in advance based on the preset IoT communication protocol; for example, the preset IoT communication protocol includes but is not limited to MQTT (Message Queuing Telemetry Transport) and CoAP (Constrained Application Protocol). It should be noted that through the IoT communication mechanism between the cloud and the edge, the data transmitted between the cloud and the edge can also be encrypted and securely authenticated, thereby ensuring the security of data transmission.
[0053] Step S12: parsing the application deployment package to read an application configuration file from the application deployment package, and extracting application deployment parameters from the application configuration file to deploy the application to be deployed based on the application deployment parameters.
[0054] In this embodiment, the edge uses a built-in deployment package parser to parse the downloaded application deployment package to read the application configuration file from the application deployment package, and extract key application deployment parameters from the application configuration file, such as the application name, running port, and service version, etc., and then deploys the application to be deployed on the edge based on the application deployment parameters extracted from the application configuration file.
[0055] Among them, the application deployment parameters include but are not limited to environment deployment parameters, network deployment parameters, system permission deployment parameters, etc. Specifically, the environment deployment parameters can make the lightweight framework running on the edge automatically adapt to the operating environment required by the application to be deployed; the network deployment parameters can be used to automatically adjust the network configuration to adapt to the application to be deployed; the system permission deployment parameters can be used to dynamically apply for or adjust the system permissions required for the application to be deployed to run on the edge, and the system permissions include but are not limited to firewall access permissions, file read and write permissions, port addition and deletion permissions, etc. In this way, this embodiment deploys the application to be deployed on the edge through application deployment parameters, which can ensure that the application to be deployed runs and is used safely and compliantly after deployment.
[0056] Step S13: Use the local preset dependency manager to analyze the dependency declarations in the application deployment package to identify the target dependencies required for the operation of the application to be deployed, and locally configure and manage the target dependencies required for the operation of the application to be deployed based on the difference comparison results between the target dependencies and the pre-installed dependencies in the local lightweight container.
[0057] In this embodiment, the edge uses a built-in preset dependency manager to analyze the dependency declarations in the application deployment package to identify the target dependencies required for the application to be deployed, such as a specific version of the database, the basic operating environment of development languages such as python and java, and additional network services and middleware. Then, a difference comparison is made between the target dependencies and the pre-installed dependencies in the lightweight container at the edge, so as to configure and manage the target dependencies required for the application to be deployed based on the difference comparison results. Among them, the lightweight container at the edge is pre-installed with a simplified version of the database, middleware, network service, and the basic operating environment of development languages such as python and java, so that the application deployed on the edge can be run and used with the minimum operating environment through the lightweight container, thereby reducing the resource consumption of the edge.
[0058] In a specific implementation, if the difference comparison result indicates that some dependencies in the target dependency do not exist in the pre-installed dependency, that is, the edge end lacks some dependencies in the target dependency, it is necessary to determine the dependencies to be installed that do not exist in the pre-installed dependency from the target dependency based on the difference comparison result, and automatically execute the preset dependency installation script to install the dependencies to be installed. The preset dependency installation script is used to download, configure and install the dependencies.
[0059] In another specific implementation, if the difference comparison result indicates that some dependencies in the target dependency exist in the pre-installed dependency, then the dependency to be compared that exists in the pre-installed dependency is determined from the target dependency based on the difference comparison result, and then the dependency to be compared and the installed dependency corresponding to the dependency to be compared in the pre-installed dependency are compared, so as to perform configuration management on the installed dependency based on the dependency version comparison result. Specifically, if the dependency version comparison result indicates that the dependency version between the dependency to be compared and the corresponding installed dependency is different, it indicates that the installed dependency does not meet the running requirements of the application to be deployed, and it is necessary to further pull the corresponding version of the dependency from the preset warehouse located in the cloud based on the dependency version of the dependency to be compared, and use the corresponding version of the dependency to update the version of the installed dependency in the edge. If the dependency version comparison result indicates that the dependency version between the dependency to be compared and the corresponding installed dependency is the same, it indicates that the installed dependency meets the running requirements of the application to be deployed, and the installed dependency can be directly retained.
[0060] Step S14: extracting application running parameters from the application configuration file, and injecting the application running parameters into the application to be deployed, so as to complete the deployment of the application to be deployed.
[0061] In this embodiment, the edge can also extract application running parameters from the application configuration file, such as the access path, initialization data, and user login information of the application to be deployed; and then dynamically inject the application running parameters into the application to be deployed, thereby completing the deployment of the application to be deployed, and can also ensure that the services and database connections required when the application starts have been initialized according to the established parameters, thereby ensuring the normal startup and use of the application.
[0062] Furthermore, the edge end can also extract security configuration information from the application configuration file, and encrypt and store the corresponding sensitive information in the application to be deployed based on the security configuration information; in this way, this embodiment can reduce the risk of sensitive information being leaked in the application through the security configuration information in the application configuration file, thereby improving the security of the application. Correspondingly, after the deployment of the application to be deployed is completed, if the edge end obtains the target user's access request to the deployed application based on the access path of the deployed application, the encrypted and stored sensitive information in the deployed application is decrypted based on the user login information in the access request, and the deployed application is started based on the decrypted information, so that the target user can log in and access the started application at the edge end. Among them, the target user can access and use the deployed application based on the access path of the deployed application through a browser or a mobile terminal. In this way, this embodiment can not only reduce the amount of data transmitted to the cloud and reduce the resource consumption of the cloud by processing the data at the edge end, but also alleviate the time delay problem caused by transmitting data to the cloud for processing, thereby improving the response speed and operation efficiency of the application.
[0063] It should be noted that the edge adopts a highly modular design, and can dynamically load and unload modules in the edge based on actual application deployment requirements or user application requirements, such as the installation, loading and unloading of various network services, databases, middleware, etc. In this way, by adopting a modular design for the edge, it can not only meet the differentiated needs of users, but also reduce the resource consumption of the edge and improve the performance of the edge.
[0064] It can be seen that the present application realizes the cloud development and edge deployment of applications through the communication interconnection between the edge and the cloud; and, by developing applications based on low-code application development technology, the present application can simplify the application development process, making the application deployment package small and light; at the same time, by building an edge based on a lightweight framework and using lightweight containers on the edge, the present application can reduce the resource consumption on the edge, and can support the rapid deployment and functional expansion of applications, thereby developing applications based on low-code application development technology, building an edge based on a lightweight framework, and using lightweight containers on the edge, and quickly realizing lightweight cloud-edge collaborative application deployment on the edge.
[0065] See also Figure 2 As shown, an embodiment of the present invention discloses an application deployment method, including:
[0066] The cloud uses the low-code development technology to develop the application to be deployed through the local low-code development platform. Taking the customer relationship management system as an example, the cloud uses the visual designer provided by the low-code development platform to quickly design the user interface of the customer relationship management system by dragging and dropping the interface and pre-set UI components; at the same time, the visual designer provided by the low-code development platform is used to configure the data model and define entities such as customer information and transaction records and their attributes. In addition, the cloud can also use the visual designer provided by the low-code development platform to set business logic and workflows, such as sales funnels, customer status updates, etc., and drag and drop different business steps through the graphical interface; then the cloud uses the integration tools provided by the low-code development platform to connect the database and third-party services required by the customer relationship management system, such as email services or social media platforms. After that, the developed customer relationship management system is system tested to ensure that all functions can work as expected, and the user interaction and data flow in the customer relationship management system can be tested through the simulation environment of the low-code development platform. After completing the system test and simulation environment test, the developed customer relationship management system is stored in the low-code application management platform on the cloud, so that the cloud can use the application management platform to manage the customer relationship management system throughout its life cycle.
[0067] After the customer relationship management system is stored in the application management platform in the cloud, the application management platform will start the preset automatic packaging engine to analyze the customer relationship management system stored in the application management platform using the preset automatic packaging engine to automatically generate an application deployment package and broadcast the network location of the application deployment package based on the preset IoT communication protocol.
[0068] After the edge terminal built on the lightweight operating framework receives the network location of the application deployment package and determines that it can provide the corresponding application operating environment for the customer relationship management system and that it is a deployable platform for the customer relationship management system, it downloads the corresponding application deployment package from the cloud through the application package transmission channel based on the network location, and reports the download progress of the application deployment package so that users can know the download progress of the application deployment package.
[0069] After the edge completes downloading the application deployment package, the edge uses the built-in deployment package parser to parse the downloaded application deployment package to read the application configuration file from the application deployment package, and extract key application deployment parameters from the application configuration file, and then deploys the customer relationship management system on the edge based on the application deployment parameters.
[0070] At the same time, the edge also needs to use the built-in preset dependency manager to analyze the dependency declarations in the downloaded application deployment package to identify the target dependencies required for the operation of the customer relationship management system, and then compare the target dependencies with the pre-installed dependencies in the lightweight container on the edge. Based on the difference comparison results, the target dependencies required for the operation of the customer relationship management system are configured and installed on the edge.
[0071] Furthermore, the edge needs to read the application running parameters from the application configuration file and dynamically inject the application running parameters into the customer relationship management system, so as to complete the deployment and upgrade of the customer relationship management system, so that when the user's access request to the customer relationship management system is obtained later, the customer relationship management system can be started directly on the edge, so that the user can log in and access the started customer relationship management system.
[0072] It can be seen that the present application realizes the cloud development and edge deployment of applications through the communication interconnection between the edge and the cloud; and, by developing applications based on low-code application development technology, the present application can simplify the application development process, making the application deployment package small and light; at the same time, by building an edge based on a lightweight framework and using lightweight containers on the edge, the present application can reduce the resource consumption on the edge, and can support the rapid deployment and functional expansion of applications, thereby developing applications based on low-code application development technology, building an edge based on a lightweight framework, and using lightweight containers on the edge, and quickly realizing lightweight cloud-edge collaborative application deployment on the edge.
[0073] See also Figure 3 As shown, an embodiment of the present invention discloses an application deployment device, which is applied to an edge terminal built based on a lightweight framework, including:
[0074] A deployment package downloading module 11 is used to download the application deployment package from the cloud based on the network location of the application deployment package broadcast by the cloud; wherein the application deployment package is a deployment package automatically generated by the cloud after analyzing the application to be deployed; the application to be deployed is an application developed by the cloud using low-code application development technology;
[0075] An application deployment module 12, configured to parse the application deployment package to read an application configuration file from the application deployment package, and extract application deployment parameters from the application configuration file to deploy the application to be deployed based on the application deployment parameters;
[0076] A dependency management module 13 is used to analyze the dependency declarations in the application deployment package using a local preset dependency manager to identify target dependencies required for the application to be deployed to run, and locally configure and manage the target dependencies required for the application to be deployed to run based on a difference comparison result between the target dependencies and pre-installed dependencies in the local lightweight container;
[0077] The deployment completion module 14 is used to extract application running parameters from the application configuration file and inject the application running parameters into the application to be deployed to complete the deployment of the application to be deployed.
[0078] It can be seen that the present application realizes the cloud development and edge deployment of applications through the communication interconnection between the edge and the cloud; and, by developing applications based on low-code application development technology, the present application can simplify the application development process, making the application deployment package small and light; at the same time, by building an edge based on a lightweight framework and using lightweight containers on the edge, the present application can reduce the resource consumption on the edge, and can support the rapid deployment and functional expansion of applications, thereby developing applications based on low-code application development technology, building an edge based on a lightweight framework, and using lightweight containers on the edge, and quickly realizing lightweight cloud-edge collaborative application deployment on the edge.
[0079] In some specific embodiments, the process of generating the application deployment package in the application deployment device includes:
[0080] An application analysis unit, configured to analyze the application to be deployed by using a preset automatic packaging engine in the cloud to determine the application configuration file of the application to be deployed and the target dependencies required for the application to be deployed to run; the application configuration file includes the application deployment parameters and the application running parameters;
[0081] A deployment package generation unit is used for the cloud to evaluate the application running environment and deployable platform of the application to be deployed by using the preset automatic packaging engine, so as to determine the corresponding compression algorithm and packaging method based on the evaluation result, and then use the compression algorithm and the packaging method to compress and package the application code, the application configuration file and the target dependency of the application to be deployed to generate the application deployment package; wherein different application running environments and deployable platforms correspond to different compression algorithms and packaging methods.
[0082] In some specific embodiments, the deployment package download module 11 includes:
[0083] A deployment package downloading unit is used to generate the application deployment package in the cloud and broadcast the network location of the application deployment package based on a preset Internet of Things communication protocol. If the edge terminal receives the network location and determines that it can provide the application running environment for the application to be deployed and that it belongs to the deployable platform, the application deployment package is downloaded from the cloud based on the network location, and the download progress of the application deployment package is reported.
[0084] In some specific embodiments, the application deployment device further includes:
[0085] A full life cycle management unit is used to store the application to be deployed in the application management platform in the cloud after the application to be deployed is developed in the cloud using the low-code application development technology, and use the application management platform to manage the application to be deployed throughout its life cycle; wherein the full life cycle management includes any one or a combination of the management of application code, the management of application versions, the management of dependencies required for application operation, and the management of application configuration files.
[0086] In some specific embodiments, the dependency management module 13 includes:
[0087] A dependency comparison unit, used to compare the target dependency with the pre-installed dependencies in the local lightweight container to obtain a difference comparison result; wherein the dependency includes any one or a combination of databases, network services and middleware required for the application to run;
[0088] A dependency installation unit, configured to determine, from the target dependency, dependencies to be installed that do not exist in the pre-installed dependencies based on the difference comparison result, and to install the dependencies to be installed by automatically executing a preset dependency installation script;
[0089] A version comparison submodule is used to determine the dependencies to be compared that exist in the pre-installed dependencies from the target dependencies based on the difference comparison results, and to compare the dependency versions of the dependencies to be compared and the installed dependencies in the pre-installed dependencies corresponding to the dependencies to be compared, and to perform configuration management on the installed dependencies based on the dependency version comparison results.
[0090] In some specific embodiments, the version comparison submodule includes:
[0091] A dependency updating unit, configured to pull a dependency of a corresponding version from a preset repository in the cloud based on the dependency version of the dependency to be compared, and update the installed dependency using the dependency of the corresponding version if the dependency version comparison result indicates that the dependency versions of the dependency to be compared and the corresponding installed dependency are different;
[0092] The dependency retaining unit is configured to retain the installed dependency if the dependency version comparison result indicates that the dependency version between the dependency to be compared and the corresponding installed dependency is the same.
[0093] In some specific embodiments, the application deployment device further includes:
[0094] An information encryption storage unit, used to extract security configuration information from the application configuration file, and encrypt and store corresponding sensitive information in the application to be deployed based on the security configuration information;
[0095] An application startup unit, for decrypting the sensitive information encrypted and stored in the deployed application based on the user login information in the access request after the deployment of the application to be deployed is completed, and starting the deployed application based on the decrypted information, if an access request for the deployed application based on the access path of the deployed application is obtained from the target user; wherein the access path and the user login information are located in the application running parameters.
[0096] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0097] Figure 4 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the application deployment method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0098] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0099] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0100] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the application deployment method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0101] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed application deployment method. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.
[0102] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0103] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0104] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0105] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0106] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An application deployment method, characterized in that: Applied to edge devices built on lightweight frameworks, including: Download the application deployment package from the cloud based on the network location of the application deployment package broadcast by the cloud; wherein the application deployment package is a deployment package automatically generated by the cloud after analyzing the application to be deployed; the application to be deployed is an application developed by the cloud using low-code application development technology; Parsing the application deployment package to read an application configuration file from the application deployment package, and extracting application deployment parameters from the application configuration file to deploy the application to be deployed based on the application deployment parameters; Analyzing the dependency declarations in the application deployment package using a local preset dependency manager to identify target dependencies required for the application to be deployed, and locally configuring and managing the target dependencies required for the application to be deployed based on a difference comparison result between the target dependencies and pre-installed dependencies in the local lightweight container; The application running parameters are extracted from the application configuration file, and the application running parameters are injected into the application to be deployed, so as to complete the deployment of the application to be deployed.
2. The application deployment method according to claim 1, characterized in that: The process of generating the application deployment package includes: The cloud uses a preset automatic packaging engine to analyze the application to be deployed to determine the application configuration file of the application to be deployed and the target dependencies required for the application to be deployed to run; the application configuration file includes the application deployment parameters and the application running parameters; The cloud uses the preset automatic packaging engine to evaluate the application running environment and the deployable platform of the application to be deployed, so as to determine the corresponding compression algorithm and packaging method based on the evaluation result, and then uses the compression algorithm and the packaging method to compress and package the application code, the application configuration file and the target dependency of the application to be deployed to generate the application deployment package; wherein different application running environments and deployable platforms correspond to different compression algorithms and packaging methods.
3. The application deployment method according to claim 2, characterized in that: The downloading of the application deployment package from the cloud based on the network location of the application deployment package broadcasted by the cloud includes: After the cloud generates the application deployment package and broadcasts the network location of the application deployment package based on the preset IoT communication protocol, if the edge receives the network location and determines that it can provide the application operating environment for the application to be deployed and that it belongs to the deployable platform, it downloads the application deployment package from the cloud based on the network location and reports the download progress of the application deployment package.
4. The application deployment method according to claim 1, characterized in that: Also includes: After the cloud completes the development of the application to be deployed using the low-code application development technology, the cloud stores the application to be deployed in the application management platform in the cloud, and uses the application management platform to manage the application to be deployed throughout its life cycle; wherein the management of the entire life cycle includes any one or a combination of the management of application code, the management of application versions, the management of dependencies required for application operation, and the management of application configuration files.
5. The application deployment method according to claim 1, characterized in that: The locally configuring and managing the target dependency required for running the application to be deployed based on the difference comparison result between the target dependency and the pre-installed dependency in the local lightweight container includes: Comparing the target dependency with the pre-installed dependencies in the local lightweight container to obtain a difference comparison result; wherein the dependencies include any one or a combination of databases, network services, and middleware required for the application to run; Determining, from the target dependencies, dependencies to be installed that do not exist in the pre-installed dependencies based on the difference comparison result, and installing the dependencies to be installed by automatically executing a preset dependency installation script; Determine the dependency to be compared that exists in the pre-installed dependencies from the target dependencies based on the difference comparison result, perform dependency version comparison on the dependency to be compared and the installed dependencies in the pre-installed dependencies corresponding to the dependency to be compared, and perform configuration management on the installed dependencies based on the dependency version comparison result.
6. The application deployment method according to claim 5, characterized in that: The performing configuration management on the installed dependencies based on the dependency version comparison result includes: If the dependency version comparison result indicates that the dependency version between the dependency to be compared and the corresponding installed dependency is different, then pulling the corresponding version of the dependency from the preset cloud repository based on the dependency version of the dependency to be compared, and using the corresponding version of the dependency to update the installed dependency; If the dependency version comparison result indicates that the dependency version between the dependency to be compared and the corresponding installed dependency is the same, the installed dependency is retained.
7. The application deployment method according to any one of claims 1 to 6, characterized in that: Also includes: Extracting security configuration information from the application configuration file, and encrypting and storing corresponding sensitive information in the to-be-deployed application based on the security configuration information; After completing the deployment of the application to be deployed, if an access request for the deployed application from the target user based on the access path of the deployed application is obtained, the sensitive information encrypted and stored in the deployed application is decrypted based on the user login information in the access request, and the deployed application is started based on the decrypted information, so that the target user can log in and access the started application; wherein the access path and the user login information are located in the application running parameters.
8. An application deployment device, characterized in that: Applied to edge devices built on lightweight frameworks, including: A deployment package downloading module, used to download the application deployment package from the cloud based on the network location of the application deployment package broadcast by the cloud; wherein the application deployment package is a deployment package automatically generated by the cloud after analyzing the application to be deployed; the application to be deployed is an application developed by the cloud using low-code application development technology; An application deployment module, used to parse the application deployment package to read an application configuration file from the application deployment package, and extract application deployment parameters from the application configuration file to deploy the application to be deployed based on the application deployment parameters; A dependency management module, configured to analyze the dependency declarations in the application deployment package using a local preset dependency manager to identify target dependencies required for the application to be deployed, and to locally configure and manage the target dependencies required for the application to be deployed based on a difference comparison result between the target dependencies and pre-installed dependencies in the local lightweight container; The deployment completion module is used to extract application running parameters from the application configuration file and inject the application running parameters into the application to be deployed to complete the deployment of the application to be deployed.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the application deployment method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the application deployment method according to any one of claims 1 to 7.
