Deployment method of integrated energy management project and related device

By standardizing comprehensive energy management projects and utilizing Ansible Playbook role orchestration technology to automatically deploy middleware and applications, the problem of long deployment time in existing technologies is solved, an efficient and automated deployment process is achieved, and time costs are reduced. and improved system stability.

CN119356691APending Publication Date: 2025-01-24XINAO SHUNENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411370107.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The existing technology is difficult to shorten the deployment time of the integrated energy management system, resulting in high time costs.

Method used

Standardized projects are generated by standardizing domain names, middleware deployment, and operation and maintenance strategies for target projects. Then use Ansible Playbook role orchestration technology to arrange the running sequence according to the installation requirements of middleware and applications, and automatically deploy middleware and applications to the corresponding servers through shell scripts.

Benefits of technology

The deployment time of the middleware and applications was significantly shortened, the deployment efficiency was improved, the cost of time was reduced, and the human errors were reduced through the automation process, and the stability and consistency of the system were improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356691A_ABST
    Figure CN119356691A_ABST
Patent Text Reader

Abstract

The invention discloses a deployment method of an integrated energy management project and a related device. When the method provided by the embodiment of the invention is executed, firstly, domain name standardization, middleware deployment standardization and operation and maintenance strategy standardization can be performed on a target project to obtain a standardized project; and arranging the running sequence of the middleware and the application programs through an Ansible Playbook role based on the installation requirements of all the middleware used by the standardized project and the installation requirements of all the application programs used by the standardized project. And respectively sending the middleware and the application program to corresponding operation servers for deployment and operation by using a shell script based on an operation sequence of the middleware and the application program arranged by an Ansible Playbook role. According to the application, the process is automated by adopting Ansible Playbook role arrangement, so that the time for deploying the middleware and the application is greatly shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a deployment method and related devices for an integrated energy management project. Background Art

[0002] The integrated energy system integrates multiple energy sources such as coal, oil, natural gas, electricity and thermal energy in a specific area through advanced physical information technology and innovative management models, aiming to achieve coordinated planning and optimized operation among heterogeneous energy subsystems. This system can meet diversified energy needs, improve energy efficiency and promote sustainable development. Its core features are multi-energy complementarity and coordinated optimization, and the close coupling between various energy equipment realizes energy interaction and conversion. The integrated energy system is an overall framework that integrates multiple energy forms to achieve coordination and optimization of different energy subsystems, aiming to improve energy efficiency and promote sustainable development. The integrated energy management project is a specific implementation plan based on this framework, focusing on how to effectively manage and optimize these energy systems, including planning, deployment and maintenance.

[0003] However, building such a complex integrated energy management project is not easy. Since the integrated energy management system that the integrated energy management project relies on needs to cover a wide range of application scenarios, it is also necessary to integrate a variety of middleware to ensure seamless connection and collaboration of various subsystems. Middleware plays a bridging role in the system architecture. They are responsible for the transmission, processing and integration of data, so that different platforms and applications can interact smoothly. Due to the high technical complexity involved, the adaptation, configuration and tuning of each middleware requires professional knowledge and technical investment.

[0004] Considering the impact of the above factors, the entire process from integrated energy management project planning to on-site implementation and final delivery often requires a relatively long time frame. According to the implementation plan, starting from the deployment of middleware, to the installation and configuration of 75+ applications one by one, until joint debugging and final delivery, the entire process is expected to take about 15 to 20 days. This period not only includes the deployment of hardware and software, but also a large number of testing, verification, and adjustment links to ensure the stability and efficient operation of the system.

[0005] Therefore, how to shorten the time it takes for an integrated energy management system to deploy an integrated energy management project, and thereby reduce the time cost of deploying an integrated energy management project, is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0006] Based on the above problems, the present application provides a method and related devices for deploying an integrated energy management project, which can shorten the time for an integrated energy management system to deploy an integrated energy management project, thereby reducing the time cost of deploying the integrated energy management project.

[0007] The embodiments of the present application disclose the following technical solutions:

[0008] A method for deploying an integrated energy management project, applied to an integrated energy management system, the method comprising:

[0009] Standardize the domain name, middleware deployment, and operation and maintenance strategy of the target project to obtain a standardized project;

[0010] Based on the installation requirements of all middleware used by the standardization project and the installation requirements of all applications used by the standardization project, the running order of the middleware and the applications is arranged through the Ansible Playbook role;

[0011] The shell script is used to arrange the running order of the middleware and the application based on the Ansible Playbook role, and the middleware and the application are sent to their corresponding running servers for deployment and running respectively; the shell script is used to specify the running servers running the middleware and the application; the shell script determines the running servers running the middleware and the application based on the configuration files or environment variables of the middleware and the application.

[0012] In a possible implementation, the method further includes:

[0013] Create application image packages, middleware offline packages, and integrated energy management system optimization code packages, and set basic configuration files, external service files, and external entry files for the applications;

[0014] Among them, the application image package includes the installation packages of all applications used by the standardization project; the middleware offline package includes the installation packages of all middleware used by the standardization project and their dependent packages; the integrated energy management system optimization code package includes security reinforcement optimization code, performance optimization code and fault recovery plan code.

[0015] In a possible implementation, the target project is standardized in domain name, including: generalization of internal domain name projects and parameterization of external domain name projects;

[0016] The internal domain name project generalization includes: generalizing the internal domain name of the internal application used by the target project based on a preset internal domain name naming rule;

[0017] The external domain name project parameterization includes: storing the external domain name of the external application used by the target project based on the environment variables of the target project.

[0018] In a possible implementation, the middleware deployment standardization includes: standardizing the deployment directory, configuration file, used port, calling address, and parameterized variable password part of the target project.

[0019] In a possible implementation, the operation and maintenance strategy standardization includes: data backup standardization, operation and maintenance management method standardization, middleware startup method standardization, and emergency disaster recovery standardization.

[0020] An integrated energy management system, the system comprising:

[0021] The standardization unit is used to standardize the domain name, middleware deployment, and operation and maintenance strategy of the target project to obtain a standardized project;

[0022] A running order arrangement unit, used for arranging the running order of the middleware and the application program through the Ansible Playbook role based on the installation requirements of all the middleware and the installation requirements of all the application programs used by the standardization project;

[0023] A sending unit is used to send the middleware and the application to their corresponding running servers for deployment and running based on the running order of the middleware and the application arranged by the Ansible Playbook role using a shell script; the shell script is used to specify the running server running the middleware and the application; the shell script determines the running server running the middleware and the application based on the configuration files or environment variables of the middleware and the application.

[0024] In a possible implementation, the system further includes:

[0025] An offline package making unit, used to make application image packages, middleware offline packages and integrated energy management system optimization code packages, and to set basic configuration files, external service files and external entry files for the applications;

[0026] Among them, the application image package includes the installation packages of all applications used by the standardization project; the middleware offline package includes the installation packages of all middleware used by the standardization project and their dependent packages; the integrated energy management system optimization code package includes security reinforcement optimization code, performance optimization code and fault recovery plan code.

[0027] In a possible implementation, the standardization unit specifically includes:

[0028] An internal domain name generalization unit, used to generalize the internal domain name of the internal application used by the target project based on a preset internal domain name naming rule;

[0029] The external domain name parameterization unit is used to store the external domain name of the external application used by the target project based on the environment variables of the target project.

[0030] A deployment device for an integrated energy management project comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the deployment method for the integrated energy management project as described above is implemented.

[0031] A computer-readable storage medium stores instructions, which, when executed on a terminal device, enable the terminal device to execute the above-mentioned method for deploying an integrated energy management project.

[0032] Compared with the prior art, this application has the following beneficial effects:

[0033] The present application provides a deployment method and related devices for an integrated energy management project. Specifically, when executing the deployment method for an integrated energy management project provided in an embodiment of the present application, the domain name, middleware deployment and operation and maintenance strategy of the target project can be standardized first to form a set of standardized projects. Next, the Ansible Playbook role orchestration technology is used to accurately plan the execution order of the middleware and application according to the middleware installation requirements and application installation requirements involved in the standardized project. Finally, with the help of customized shell scripts, the middleware and application are accurately scheduled and executed to their corresponding server environments according to the guidance of the Ansible Playbook. The present application automates the process by using the Ansible Playbook role orchestration, which greatly shortens the time for middleware and application deployment. Traditional methods require manual configuration one by one, while automated tools can handle multiple tasks at the same time, greatly improving efficiency. At the same time, automated deployment reduces errors caused by human intervention and improves the consistency and reliability of deployment. Standardized projects ensure the compatibility and uniformity of all components, which helps to avoid compatibility and configuration errors. In addition, the automated deployment process is easy to copy. Once a deployment is completed, it can be quickly and consistently executed when deployed in the same or similar environment, reducing maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in this embodiment or 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 some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0035] Figure 1 A method flow chart of a method for deploying a comprehensive energy management project provided in an embodiment of the present application;

[0036] Figure 2 A schematic diagram of the structure of an integrated energy management system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] To facilitate understanding of the technical solutions provided by the embodiments of the present application, the background technology involved in the embodiments of the present application will be described below.

[0038] The integrated energy system is mainly composed of energy supply networks (such as power supply, gas supply, cooling / heat supply, etc.), energy exchange links (such as combined cooling, heating and power units (CCHP units), generator sets, boilers, air conditioners, heat pumps, etc.), energy storage links (such as electricity storage, gas storage, heat storage, cold storage, etc.), terminal integrated energy supply and use units (such as microgrids) and a large number of terminal users.

[0039] The integrated energy system is a new integrated energy system that integrates modern physical information technology and innovative management strategies, aiming to optimize and coordinate the use of multiple energy forms in the region. This system integrates multiple energy resources such as coal, oil, natural gas, electricity, and thermal energy. Through advanced technical means and an integrated management platform, it realizes the coordinated planning, efficient operation, and comprehensive management of different energy subsystems to meet the diverse energy needs in the region, significantly improve energy utilization efficiency, and promote sustainable energy development. As the main carrier of intensive energy production and consumption, the integrated energy system not only realizes the comprehensive regulation and complementary utilization of multiple energy types such as electricity, gas, cooling, heat, and low-carbon emissions, but also builds a tightly coupled energy network within the system, enabling interactive conversion between various energy devices, thereby effectively responding to the temporal and spatial differences in energy supply and demand. In this process, the system characteristics become more diverse and refined due to the complex interaction between multiple energy sources.

[0040] The integrated energy management project and the integrated energy system are mutually reinforcing and closely linked. As an overall framework, the integrated energy system provides a blueprint and infrastructure for the integration, coordination and optimization of multiple energy forms. It aims to achieve efficient use of energy resources, reduce waste, and promote environmental sustainability.

[0041] The integrated energy management project is a specific implementation plan within this framework. It focuses on how to implement and optimize the strategies and operations of the energy system, including detailed planning, deployment, management and maintenance. Through project implementation, theory can be turned into practice to solve practical problems, such as improving energy efficiency, reducing costs, and ensuring a stable energy supply.

[0042] When deploying an integrated energy management project, the entire process is usually complicated because the integrated energy system on which the integrated energy management project is implemented has a wide range of applications and involves a variety of middleware. The operation and maintenance team first needs to develop a detailed deployment plan based on the customer's privatization system requirements. Then, the team will go to the customer site, manually connect to the intranet server, and complete the deployment of 35 middlewares one by one. This process takes about 3 days.

[0043] After the middleware is successfully deployed, the installation of more than 75 applications will be completed step by step, which takes about 6 days. After each application is deployed, the team needs to verify its availability and interactive configuration one by one, which also takes about 6 days. Finally, the overall joint debugging is carried out, and it can be delivered for use after passing it.

[0044] Therefore, the process of fully deploying an integrated energy management system and an integrated energy management project usually takes 15 days or more, which greatly increases the time cost of the complete deployment project of the integrated energy management system.

[0045] In order to solve this problem, a deployment method and related devices for an integrated energy management project are provided in an embodiment of the present application. First, a templated standardized project is constructed through standardized domain names, middleware deployment processes and operation and maintenance strategies. Then, the Ansible Playbook automation tool is used to pre-arrange the execution order according to the specific installation requirements of all middleware and applications used in the standardized project. Then, a shell script is introduced as an execution engine, and the relevant middleware and applications are automatically deployed to the specified running server for installation and deployment based on the deployment plan generated by Ansible Playbook and the configuration file or environment variables of the server. This application can significantly reduce the time and labor costs of deployment operations through automated deployment scripts and Ansible Playbook role orchestration. Compared with traditional methods, the deployment process does not require team members to spend a lot of time on inefficient manual configuration and verification. The automated process ensures the consistency of application logic and configuration throughout the project, avoids differences or errors introduced by human factors, and thus improves the overall stability of the system. In addition, the automated deployment process is easy to copy. Once a deployment is completed, it can be quickly and consistently executed when deployed in the same or similar environment, reducing maintenance costs.

[0046] 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 application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] See also Figure 1 , which is a method flow chart of a method for deploying a comprehensive energy management project provided in an embodiment of the present application, such as Figure 1 As shown, the deployment method of the integrated energy management project may include steps S101-S103:

[0048] S101: Standardize the domain name, middleware deployment, and operation and maintenance strategy of the target project to obtain a standardized project.

[0049] The process of standardizing domain names, middleware deployment, and operation and maintenance strategies for target projects means that a unified and standardized approach is adopted during the development, deployment, and maintenance phases of the project. Specifically:

[0050] Domain name standardization: This involves ensuring that all related domain names use uniform naming rules and formats, consistent resolution strategies, and effective security measures. Domain name standardization helps improve the accessibility, recognition, and security of a website or service.

[0051] Middleware deployment standardization: Middleware is a layer of software between applications and basic hardware, which optimizes the interaction experience between the two. Middleware deployment standardization includes defining and implementing a set of standard installation, configuration, version control and update processes. This standardization can improve the consistency and stability of the system and reduce failures and maintenance costs.

[0052] Operation and maintenance strategy standardization: Operation and maintenance strategy standardization is a set of standardized methods for how to manage, monitor, update and provide technical support, including but not limited to service level agreements, change management, incident response, performance monitoring and continuous integration / continuous deployment practices. These strategies ensure an efficient and stable operating environment and improve system availability and reliability.

[0053] Through these three steps of standardization activities, a standardized project can be obtained, that is, the entire project and its various components follow a set of pre-defined rules and best practices, which not only helps to improve the manageability, portability, scalability and security of the project, but also simplifies future maintenance and upgrade work, reduces technical debt, and improves the team's work efficiency and collaboration capabilities.

[0054] In a possible implementation, domain name standardization is performed on the target project, including: generalization of internal domain name projects and parameterization of external domain name projects;

[0055] In a possible implementation, the internal domain name project generalization includes: based on a preset internal domain name naming rule, generalizing the internal domain name of the internal application used by the target project.

[0056] Generalizing the internal domain names of internal applications used by the target project based on the preset internal domain name naming rules means unifying the domain name format of all internal applications by following the preset standardized rules and styles. This includes adopting a unified naming length, using a specific character set, being case-sensitive, or applying a specific prefix or suffix.

[0057] Specifically, define naming rules: First, define a set of detailed domain name naming rules, such as including the abbreviation of the company or project name, a specific version number or date, labels for different functions or environments (such as development, testing, and production), and ensure compliance with domain name length, character type, or other technical standards;

[0058] Review current domain names: Then identify the domain names of all existing internal applications and identify those that do not comply with the new naming rules.

[0059] Develop a transition plan: Next, design a specific transition strategy for each domain name that needs to be adjusted to ensure that the transition from the old name to the new name is smooth and service is not interrupted. This step involves redirecting, gradually migrating, or running the old and new names simultaneously when necessary until the deployment is complete and the old name is deleted or redirected.

[0060] Through such a generalization process, the internal system's recognizability can be improved, management complexity can be reduced, and security can be improved.

[0061] It should be noted that in-house applications refer to applications developed, managed and deployed within an organization. They are usually closely linked to the core business processes of an enterprise and are designed to support specific business needs, improve work efficiency or enhance service quality. In-house applications may include but are not limited to enterprise resource planning, customer relationship management, supply chain management, human resource management systems, etc.

[0062] In a possible implementation, the external domain name project parameterization includes: based on the environment variables of the target project, storing the external domain name of the external application used by the target project.

[0063] Based on the environment variables of the target project, the external domain names of the external applications used by the target project are stored, which means that when deploying the target project, the environment variables are used as a configuration mechanism to manage and specify the domain name information required by the external applications. Environment variables play the role of dynamic configuration and resource reference here. They are usually stored in the operating system environment and can be read and used by scripts, programs or other automation tools.

[0064] Specifically, define environment variables: First, define a set of environment variables in the development environment to contain the domain name information required by external applications. These variables may include information such as host name, port number, subdomain name, etc.

[0065] Get or configure the domain name: Then, according to the project requirements, you can manually enter the domain name value into the environment variable, or you can automatically obtain it through other methods, such as reading from configuration files, application programming interface (API) responses, and databases.

[0066] Apply environment variables: Finally, when deploying the project, ensure that the build process or deployment script can read these environment variables and correctly apply them to the relevant configuration of the external application. This step involves modifying the application's configuration files, compilation parameters, startup scripts, or other configuration logic.

[0067] The benefit of this approach is that it improves the flexibility and maintainability of the configuration. Environment variables allow domain name configurations to be quickly changed in different environments (such as development, testing, and production) without modifying the source code, while also reducing the risk of hard-coding errors.

[0068] It should be noted that external applications (or third-party applications) (External / Application) refer to software products provided by external developers (such as suppliers, partners, and other service providers), which are usually delivered to end users through a network (usually the Internet). External applications can be any type of application, from simple World Wide Web (Web) services to complex SaaS (Software as a Service) solutions, such as cloud storage services, email services, analytical tools, marketing automation tools, etc.

[0069] In a possible implementation, the middleware deployment standardization includes: standardizing the deployment directory, configuration file, used port, calling address, and parameterized variable password part of the target project.

[0070] "Middleware deployment standardization" refers to the process of deploying and managing middleware services by adopting unified standards and specifications in the system architecture. Doing so can improve deployment efficiency, simplify maintenance work, ensure consistency in different environments, and provide a basis for automated execution. Specifically, "middleware deployment standardization" includes the following key aspects:

[0071] Standardized deployment directory: Define a specific, unified directory structure to store middleware installation files, configuration files, logs, etc. This helps reduce confusion during deployment and facilitates management and maintenance.

[0072] Standardized configuration files: Create and use configuration files in a standard format that contain the parameters and settings required for the middleware to run. Standardized configuration not only reduces the possibility of errors, but also makes it easier to copy configurations to other environments.

[0073] Standardize port usage: Specifying a fixed set of port numbers or ranges for middleware services helps avoid conflicts between different components and simplifies the development of network and security policies.

[0074] Standardized call addresses: Clarify the interface addresses (such as Uniform Resource Locator (URL) or API path) provided by the middleware to ensure that external systems can access these services consistently. This improves the discoverability of the system and supports cross-team collaboration and integration.

[0075] Parameterize variable password parts: By encapsulating variable elements (such as passwords, database connection strings, etc.) in parameterized files instead of hard-coding them directly in code or configuration files, you can quickly adapt to different deployment environments or change security policies without modifying the core deployment scripts.

[0076] Based on the above standardized practices, a repeatable, consistent, and automated deployment process can be performed through automated deployment tools. Deployment to different environments can be achieved by simply adjusting some specific parameters, which significantly improves the deployment speed and reduces the error rate.

[0077] In a possible implementation, the operation and maintenance strategy standardization includes: data backup standardization, operation and maintenance management method standardization, middleware startup method standardization, and emergency disaster recovery standardization.

[0078] Standardization of operation and maintenance strategies is a key step to ensure stable and reliable operation of the system, which covers standardized operations in multiple aspects.

[0079] Operation and maintenance strategy standardization specifically includes:

[0080] Data backup standardization: This refers to establishing a unified data backup process and rules to ensure that all critical data can be backed up regularly and safely and stored in a reliable location. Standardization includes but is not limited to backup frequency, retention period, backup method (online / offline backup), backup media, recovery test process, etc. Standardization can effectively improve the speed and success rate of data recovery and reduce the risk of data loss.

[0081] Standardization of operation and maintenance management methods: Operation and maintenance management standardization involves the development of a set of operational guidelines and processes that can be followed, such as problem reporting and resolution processes, change management processes, version control, performance monitoring and optimization standards, etc. This helps team members collaborate efficiently, reduces misunderstandings and errors, ensures that all operation and maintenance activities follow the same standards, and improves operation and maintenance efficiency and quality.

[0082] Standardization of middleware startup methods: In software architecture, middleware serves as a bridge connecting various components. Standardization of its startup methods can simplify the deployment and troubleshooting process. Standardization includes middleware installation, configuration and startup scripts, common troubleshooting guides, update and upgrade processes, etc. By standardizing the startup methods of middleware, the consistency and stability of the system can be ensured, while improving the repeatability and efficiency of operations.

[0083] Standardization of emergency disaster recovery: The standardization of emergency disaster recovery (DR) plans aims to plan and prepare in advance to deal with possible catastrophic events, such as hardware failure, network interruption, natural disasters or human errors. Standardized DR plans usually include detailed disaster scenario analysis, recovery strategies, trigger conditions, responsibility allocation, resource requirements, recovery processes, test records and regular reviews. Through standardized DR processes, the normal operation of the system can be restored quickly and effectively, reducing the impact of business interruptions.

[0084] By standardizing these operation and maintenance strategies, the reliability and service quality of computer infrastructure can be significantly improved, while also reducing operating costs and risks. This standardization is not only applicable to the current technical environment, but can also adapt to future business and technical changes, providing long-term flexibility and stability.

[0085] S102: Based on the installation requirements of all middleware used by the standardization project and the installation requirements of all applications used by the standardization project, the running order of the middleware and the application is orchestrated through the Ansible Playbook role.

[0086] Based on the installation requirements of all middleware and applications in the standardized project, the running order is arranged through the Ansible Playbook role, which means using the Ansible automation tool to manage and execute the deployment process based on a specific operating system. This process involves creating a set of predefined scripts or Playbooks that contain steps for installing, configuring, and starting middleware and applications, and arranging the execution order according to the specific requirements and dependencies of these resources.

[0087] Specifically, collect requirements: First, you need to understand the installation requirements of each middleware and application, including pre-installed software packages, configuration parameters, environment dependencies, etc. Usually you need to consult official documents, technical manuals, or discuss with the system administrator to obtain them.

[0088] Write Ansible Playbook: Then use Ansible Playbook to define a set of tasks, each of which corresponds to a specific operation, such as installing a specific package, modifying a configuration file, starting a service, etc. You also need to define the dependencies between these tasks to ensure that all dependent tasks have been completed before executing any task.

[0089] Define roles (optional): To make the code easier to manage and facilitate reuse, you can also organize a set of related tasks into Ansible roles. Roles allow encapsulation of common configuration and management logic, reducing duplication of code and improving maintainability.

[0090] Arrange the running order: Finally, arrange the execution order according to the dependencies of the middleware and applications. For example, you may need to install and initialize the database server first, then install the application server, and finally deploy the application. Throughout this process, dependencies and execution order are crucial to ensure the correctness and stable operation of the system.

[0091] It should be noted that in Ansible, Ansible-roles represent a way to distribute, organize, and reuse configuration tasks. Specifically, roles are important components in Ansible Playbook, which contain a series of tasks, variables, templates, and other resources required to perform specific tasks.

[0092] A role can encapsulate a series of operations, such as installing software, configuring services, managing system files, etc. The role implements automation requirements through a set of abstract directory structures (including tasks, handlers, meta, etc.), and can flexibly adjust the configuration through parameters. The role can be imported into Ansible playbook for use, so that it can be reused throughout the deployment process, maintaining consistency and improving efficiency.

[0093] S103: Using a shell script to arrange the running order of the middleware and the application based on the Ansible Playbook role, the middleware and the application are respectively sent to their corresponding running servers for deployment and running.

[0094] Using shell scripts to orchestrate the middleware and application running order based on Ansible Playbook roles, and sending these components to their corresponding running servers for execution, means using automated scripts (shell scripts) to manage the entire deployment process. This process involves understanding the specific configuration requirements of the middleware and applications, including which server they need to run on, and then planning and executing the deployment based on these requirements.

[0095] The specific process is as follows:

[0096] Understanding configuration: First, you need to understand the characteristics of different middleware and applications and their configuration files (such as YAML (YAML A in't Markup Language), JSON (JavaScript Object Notation) or XML (eXtensible Markup Language) format), as well as the functional positions and performance requirements of these components in the system. At the same time, determine the best deployment server or cluster for each component, which may be based on load balancing, resource optimization or other strategies;

[0097] Design Shell Script: Server Selection Logic: Create a shell script that gets the deployment information of each component from the Ansible Playbook (for example, component name, required servers, configuration files or environment variables, etc.);

[0098] Execute deployment commands: Based on the servers required by each component, use commands such as Secure Shell (SSH) and Secure Copy Protocol (SCP) to transfer the deployment package or configuration file to the target server, and then execute the installation and configuration commands.

[0099] Dependency management: ensure that dependencies are properly handled, that is, before a component is deployed to the server, all its dependent components have been successfully deployed and enabled;

[0100] Monitoring and logging: Add scripting functions to monitor key status during deployment and generate detailed deployment logs to facilitate subsequent debugging and auditing;

[0101] Execution and verification: Through parameter passing, environment variables or input mechanisms, the script can flexibly specify the components to be deployed and their servers, enhancing the versatility and scalability of the script;

[0102] Execute the shell script to trigger the deployment process in the Ansible Playbook, and observe the result output and error log to ensure that the deployment is successfully executed without unexpected problems.

[0103] It should be noted that shell scripts are used to specify the running servers for middleware and applications, and shell scripts determine the running servers for middleware and applications based on the configuration files or environment variables of the middleware and applications. Using shell scripts to specify the servers for running middleware and applications means automatically selecting specific servers to deploy or run these system components based on predefined logic and rules. This process is usually determined based on the configuration files or environment variables of the middleware and applications. The configuration files contain detailed information about how to deploy, execute, and where to run these systems, such as server addresses, ports, resource requirements, etc. Environment variables may be used to dynamically adjust deployment targets, such as by setting different environment identifiers (such as development, test, and production environments) to determine which server cluster to deploy the component to.

[0104] Shell scripts parse these configuration files and environment variables and perform corresponding logical judgments, such as checking whether there are enough resources and confirming whether the predetermined startup conditions are met, so as to determine and instruct which servers will take on the running tasks of various middleware and applications. The design of such scripts needs to take into account the complexity of the system, such as load balancing, disaster recovery backup, automatic expansion and other requirements, to ensure efficient use of resources while ensuring the stability and reliability of the system.

[0105] It should also be noted that deployment and operation refers to the continuous operation process after the middleware and applications are installed and started in the target environment. Deployment and operation emphasizes the management of the entire process from installation to stable operation. Compared with operation, deployment and operation also includes the setting, configuration, installation, and subsequent monitoring, maintenance, and optimization of the system environment.

[0106] In a possible implementation, the method further includes:

[0107] Create application image packages, middleware offline packages and integrated energy management system optimization code packages, and set basic configuration files, external service files and external entry files for the applications.

[0108] Creating application image packages, middleware offline packages, and integrated energy management system optimization code packages, as well as setting basic configuration files, external service files, and external entry files for applications, is a core part of the system integration and deployment process, and is designed to make the construction and deployment of software systems more efficient, controllable, and standardized.

[0109] Specifically:

[0110] (1) Application image package: An application image package is a package that contains all the components necessary for the application to run (such as libraries, dependencies, configuration files, etc.), ensuring that the application can run without difference in different environments. This includes but is not limited to installation packages, configuration files, dependent libraries, etc.

[0111] Production method: ① Collect all application components: List all libraries, dependencies, and configuration files required by the application.

[0112] ②Use containerization technology: Use Docker or similar tools to create an image that contains all applications and their dependencies. This usually involves writing a Dockerfile, which defines how to build the final image from the base image and includes how to install and configure the application.

[0113] ③Verify the image: Ensure that the generated image can start and run the application normally without dependency errors or configuration problems.

[0114] (2) Middleware offline package: The middleware offline package is designed specifically for middleware. It contains a set of pre-built components including middleware and its dependencies. It aims to provide a closed environment to facilitate the deployment and management of middleware services without relying on network connections for installation and configuration.

[0115] Production method: ① Sort out the middleware requirements: determine all the middleware and necessary dependencies used in the project.

[0116] ②Distribution and packaging: Separately package each middleware and its dependencies to ensure that they are independently accessible. This may be done through a separate installation script, Docker image, or other packaging mechanism.

[0117] ③Testing and verification: Ensure that each offline package can independently and correctly install and run the corresponding middleware service.

[0118] (3) Integrated Energy Management System Optimization Code Package: This code package contains key codes and strategies for security reinforcement, performance improvement, and fault recovery for the integrated energy management system. This is a software enhancement package for specific business objectives.

[0119] Production method: ① Analyze requirements: Identify clear requirements for system optimization, security hardening, and fault recovery.

[0120] ② Development and integration: Develop corresponding code segments according to requirements, which may include security policies, performance tuning logic and emergency plans.

[0121] ③Testing and verification: Ensure that the optimized functions are not only effective but also do not introduce new problems. The test should cover various scenarios, including but not limited to high load, security attacks, abnormal situations, etc.

[0122] (4) Set up basic configuration files, external service files, and external import files:

[0123] Basic configuration (Deployments) file: defines the basic operating parameters and environment variables of the application.

[0124] External service file: specifies the application's external service port and communication mechanism.

[0125] Ingress file: Usually the entry file for application startup or service exposure, which determines the startup mode and external visibility of the service.

[0126] Setting method: ① Write the configuration (Deployments) file: configure specific parameters according to application requirements and environment.

[0127] ②Configure external services: specify ports, protocol types, etc. in the configuration file or external service list.

[0128] ③ Define the entry point (ingress): Ensure that the startup script or service initialization can be called or discovered externally through a clear path.

[0129] Through the above steps, complex software systems can be systematically built and managed to ensure the compatibility and collaboration between various components while improving the efficiency of deployment and maintenance.

[0130] Based on the contents of S101-S103, it can be seen that the target project is first standardized, including the specifications of domain names, middleware deployment and operation and maintenance strategies, to generate standardized projects. Then, based on the installation requirements of the middleware and applications used in the project, Ansible Playbook is used to perform role orchestration and arrange the execution order of the middleware and applications. Subsequently, with the help of a customized shell script, the middleware and applications are accurately deployed to the corresponding running servers according to the operation instructions of Ansible Playbook. This script not only specifies server resources, but also selects servers for deployment in an optimized manner based on the configuration files or environment variables of the middleware and applications, thereby realizing an efficient, automated and personalized system deployment process. This application significantly reduces deployment time and labor costs through automated deployment scripts and Ansible Playbook role orchestration, avoiding time-consuming manual configuration and verification in traditional methods. The automated process ensures the consistency of logic and configuration in the project, reduces human errors, and improves system stability. At the same time, the process is easy to copy, so that subsequent deployments in similar environments can be performed quickly and consistently, thereby reducing maintenance costs.

[0131] See also Figure 2 , Figure 2 This is a schematic diagram of the structure of an integrated energy management system provided in an embodiment of the present application. Figure 2 As shown, the integrated energy management system includes:

[0132] The standardization unit 201 is used to standardize the domain name, middleware deployment, and operation and maintenance strategy of the target project to obtain a standardized project;

[0133] An operation sequence arrangement unit 202, configured to arrange the operation sequence of the middleware and the application program through an Ansible Playbook role based on the installation requirements of all the middleware and the installation requirements of all the application programs used by the standardization project;

[0134] The sending unit 203 is used to use a shell script to send the middleware and the application to their corresponding running servers for deployment and operation based on the running order of the middleware and the application arranged by the Ansible Playbook role; the shell script is used to specify the running server running the middleware and the application; the shell script determines the running server running the middleware and the application based on the configuration files or environment variables of the middleware and the application.

[0135] In a possible implementation, the system further includes:

[0136] An offline package making unit, used to make application image packages, middleware offline packages and integrated energy management system optimization code packages, and to set basic configuration files, external service files and external entry files for the applications;

[0137] Among them, the application image package includes the installation packages of all applications used by the standardization project; the middleware offline package includes the installation packages of all middleware used by the standardization project and their dependent packages; the integrated energy management system optimization code package includes security reinforcement optimization code, performance optimization code and fault recovery plan code.

[0138] In a possible implementation, domain name standardization is performed on the target project, including: generalization of internal domain name projects and parameterization of external domain name projects.

[0139] In a possible implementation, the standardization unit 201 specifically includes:

[0140] An internal domain name generalization unit, used to generalize the internal domain name of the internal application used by the target project based on a preset internal domain name naming rule;

[0141] The external domain name parameterization unit is used to store the external domain name of the external application used by the target project based on the environment variables of the target project.

[0142] In a possible implementation, the middleware deployment standardization includes: standardizing the deployment directory, configuration file, used port, calling address, and parameterized variable password part of the target project.

[0143] In a possible implementation, the operation and maintenance strategy standardization includes: data backup standardization, operation and maintenance management method standardization, middleware startup method standardization, and emergency disaster recovery standardization.

[0144] In addition, an embodiment of the present application also provides a deployment device for an integrated energy management project, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the deployment method for the integrated energy management project as described above is implemented.

[0145] In addition, an embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the deployment method of the integrated energy management project as described above.

[0146] The embodiment of the present application provides a comprehensive energy management system, which first uses the standardization unit 201 to standardize the domain name, middleware deployment, and operation and maintenance strategy of the target project to obtain a standardized project. Then the operation sequence arrangement unit 202 is used to arrange the operation sequence of the middleware and application programs through the Ansible Playbook role based on the installation requirements of all middleware used in the standardized project and the installation requirements of all applications used in the standardized project. Finally, the sending unit 203 uses a shell script to send the middleware and application programs to their corresponding operation servers for deployment and operation based on the operation sequence of the middleware and application programs arranged by the Ansible Playbook role. The present application significantly reduces deployment time and labor costs by automating the deployment script and Ansible Playbook role arrangement. Compared with traditional methods, the automated process avoids inefficient manual configuration, ensures the consistency of project logic and configuration, reduces human errors, and improves system stability. In addition, automated deployment is easy to copy, making subsequent deployments in similar environments faster and more consistent, and reducing maintenance costs.

[0147] The above is a detailed introduction to the deployment method and related devices of an integrated energy management project provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer to each other. For the integrated energy management system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can refer to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

[0148] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0149] It should also 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.

Claims

1. A method for deploying an integrated energy management project, characterized in that: Applied to an integrated energy management system, the method comprises: Standardize the domain name, middleware deployment, and operation and maintenance strategy of the target project to obtain a standardized project; Based on the installation requirements of all middleware used by the standardization project and the installation requirements of all applications used by the standardization project, the running order of the middleware and the applications is arranged through the Ansible Playbook role; The shell script is used to arrange the running order of the middleware and the application based on the Ansible Playbook role, and the middleware and the application are sent to their corresponding running servers for deployment and running respectively; the shell script is used to specify the running servers running the middleware and the application; the shell script determines the running servers running the middleware and the application based on the configuration files or environment variables of the middleware and the application.

2. The method according to claim 1, characterized in that The method further comprises: Create application image packages, middleware offline packages, and integrated energy management system optimization code packages, and set basic configuration files, external service files, and external entry files for the applications; Among them, the application image package includes the installation packages of all applications used by the standardization project; the middleware offline package includes the installation packages of all middleware used by the standardization project and their dependent packages; the integrated energy management system optimization code package includes security reinforcement optimization code, performance optimization code and fault recovery plan code.

3. The method according to claim 1, characterized in that Standardize the domain names of target projects, including: generalization of internal domain name projects and parameterization of external domain name projects; The internal domain name project generalization includes: generalizing the internal domain name of the internal application used by the target project based on a preset internal domain name naming rule; The external domain name project parameterization includes: storing the external domain name of the external application used by the target project based on the environment variables of the target project.

4. The method according to claim 1, characterized in that: The middleware deployment standardization includes: standardizing the deployment directory, configuration file, used port, calling address and parameterized variable password part of the target project.

5. The method according to claim 1, characterized in that The operation and maintenance strategy standardization includes: data backup standardization, operation and maintenance management method standardization, middleware startup method standardization and emergency disaster recovery standardization.

6. An integrated energy management system, characterized in that: The system comprises: The standardization unit is used to standardize the domain name, middleware deployment, and operation and maintenance strategy of the target project to obtain a standardized project; A running order arrangement unit, used for arranging the running order of the middleware and the application program through the Ansible Playbook role based on the installation requirements of all the middleware and the installation requirements of all the application programs used by the standardization project; A sending unit is used to send the middleware and the application to their corresponding running servers for deployment and running based on the running order of the middleware and the application arranged by the Ansible Playbook role using a shell script; the shell script is used to specify the running server running the middleware and the application; the shell script determines the running server running the middleware and the application based on the configuration files or environment variables of the middleware and the application.

7. The method according to claim 6, characterized in that The system further comprises: An offline package making unit, used to make application image packages, middleware offline packages and integrated energy management system optimization code packages, and to set basic configuration files, external service files and external entry files for the applications; Among them, the application image package includes the installation packages of all applications used by the standardization project; the middleware offline package includes the installation packages of all middleware used by the standardization project and their dependent packages; the integrated energy management system optimization code package includes security reinforcement optimization code, performance optimization code and fault recovery plan code.

8. The method according to claim 6, characterized in that The standardization unit specifically includes: An internal domain name generalization unit, used to generalize the internal domain name of the internal application used by the target project based on a preset internal domain name naming rule; The external domain name parameterization unit is used to store the external domain name of the external application used by the target project based on the environment variables of the target project.

9. A deployment device for an integrated energy management project, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for deploying an integrated energy management project as described in any one of claims 1 to 5 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the method for deploying an integrated energy management project as described in any one of claims 1 to 5.