Application startup method, device and electronic device

By receiving and processing application selection instructions, generating configuration parameters for adapting gateways, and optimizing application resource configuration, it solves the compatibility and efficiency problems of small and medium-sized enterprises when deploying and maintaining gateway equipment, and achieves more flexible and efficient application deployment.

CN119766863APending Publication Date: 2025-04-04CHINA TELECOM INTELLIGENT NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411959764.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

Small and medium-sized enterprises face poor gateway application compatibility and inefficient management when deploying and maintaining gateway equipment, mainly due to the lack of general gateway application management standards.

Method used

By receiving the application selection instructions for the target object, a target configuration parameter is generated that is suitable for the target gateway and sent to the target gateway to instruct the gateway to start the target application. In addition, the method also includes determining orchestration instructions for multiple target applications to indicate the startup sequence of multiple target applications, and optimizing resource configuration of the application when resource usage meets preset conditions.

Benefits of technology

It realizes that different models of gateway devices can correctly identify and parse application configuration parameters, improve the flexibility and efficiency of application deployment, and solve the problems of poor gateway application compatibility and inefficient management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766863A_ABST
    Figure CN119766863A_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and electronic device for starting an application. The method comprises: receiving an application selection instruction of a target object, wherein the application selection instruction comprises an identifier of a target gateway and configuration parameters of a target application; generating target configuration parameters corresponding to the configuration parameters, wherein the target configuration parameters are adapted to the target gateway; sending the target configuration parameters to the target gateway, wherein the target configuration parameters are used to instruct the target gateway to start the target application. The present application solves the technical problem that the related technology lacks a universal gateway application management standard, resulting in poor gateway application compatibility and low management efficiency.
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 method, device and electronic device for starting an application. Background Art

[0002] With the rapid development of information technology, the network environment of small and medium-sized enterprises is becoming increasingly complex, and the demand for gateway devices is becoming increasingly advanced and diversified. Due to the diversity and complexity of gateway device models and the lack of universal gateway application management standards for related technologies, small and medium-sized enterprises face problems such as poor gateway application compatibility and low management efficiency when deploying and maintaining gateway devices.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a method, device and electronic device for starting an application, so as to at least solve the technical problem that the related technology lacks a universal gateway application management standard, resulting in poor gateway application compatibility and low management efficiency.

[0005] According to one aspect of an embodiment of the present application, a method for starting an application is provided, comprising: receiving an application selection instruction of a target object, wherein the application selection instruction includes an identifier of a target gateway and configuration parameters of a target application; generating target configuration parameters corresponding to the configuration parameters, wherein the target configuration parameters are adapted to the target gateway; and sending the target configuration parameters to the target gateway, wherein the target configuration parameters are used to instruct the target gateway to start the target application.

[0006] In some embodiments of the present application, after generating target configuration parameters corresponding to the configuration parameters, the method further includes: determining orchestration instructions corresponding to multiple target applications in the application selection instructions, wherein the orchestration instructions are at least used to indicate the startup order of the multiple target applications; and sending the orchestration instructions to the target gateway.

[0007] In some embodiments of the present application, determining orchestration instructions corresponding to multiple target applications in an application selection instruction includes: obtaining target configuration parameters corresponding to all applications in the application selection instruction, wherein the target configuration parameters include resource requirements; arranging all applications in ascending order according to the resource requirements to obtain an application list; obtaining operating parameters of a target gateway, wherein the operating parameters include resource usage of the target gateway; when the resource usage satisfies a first preset condition, screening multiple target applications from the application list in turn, wherein the sum of the resource requirements corresponding to the multiple target applications satisfies a preset threshold; and generating orchestration instructions corresponding to the multiple target applications.

[0008] In some embodiments of the present application, the method also includes: obtaining operating status information of the target application reported by the target gateway from the asynchronous message cluster, wherein the asynchronous message cluster transmits messages through an asynchronous communication protocol; generating a target indicator corresponding to the operating status information, wherein the target indicator is used to quantify the resource usage of the target application; generating a first alarm message when the target indicator meets a second preset condition; and sending the first alarm message to the target object.

[0009] In some embodiments of the present application, the target gateway starts the target application in the following manner: the communication middleware of the target gateway obtains the target configuration parameters of the target application, wherein the target configuration parameters include image parameters; pulls the application image corresponding to the image parameters from the image repository; creates a target container on the target gateway using the target configuration parameters, wherein the target container is used to provide an operating environment for the application image; and starts the application image in the target container.

[0010] In some embodiments of the present application, the method also includes: obtaining container status information of the target container; generating a container status indicator corresponding to the container status information, wherein the container status indicator is used to quantitatively represent the resource usage of the target container; mapping the container status indicator using a preset mapping rule to obtain the health of the target application, wherein the preset mapping rule is used to indicate the correspondence between the container status indicator and the health of the target application; when the health of the target application meets a third preset condition, generating a second alarm information; and sending the second alarm information to the target object.

[0011] In some embodiments of the present application, the method also includes: receiving a management request sent by the communication middleware of the gateway, wherein the management request includes basic parameters of the gateway; updating a gateway list using the basic parameters of the gateway, wherein the gateway list is used to store managed gateways; and sending the updated gateway list to the target object.

[0012] According to another aspect of an embodiment of the present application, there is also provided an application startup device, comprising: a receiving module, used to receive an application selection instruction of a target object, wherein the application selection instruction comprises an identifier of a target gateway and configuration parameters of a target application; an adjustment module, used to generate target configuration parameters corresponding to the configuration parameters, wherein the target configuration parameters are adapted to the target gateway; and an execution module, used to send the target configuration parameters to the target gateway, wherein the target configuration parameters are used to instruct the target gateway to start the target application.

[0013] According to another aspect of the embodiments of the present application, an electronic device is provided, including: a memory and a processor, the memory being used to store program instructions; the processor being connected to the memory and being used to execute the method for implementing the above-mentioned application startup.

[0014] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned application startup method by running the computer program.

[0015] According to another aspect of the embodiments of the present application, a computer program product is provided, including computer instructions, which implement the above-mentioned application startup method when executed by a processor.

[0016] In an embodiment of the present application, a method of converting application configuration parameters is adopted. By receiving the configuration parameters of the target object, target configuration parameters that are compatible with the target gateway are generated, and the target configuration parameters are sent to the target gateway to start the target application. The purpose of correctly identifying and parsing application configuration parameters by gateway devices of different models is achieved, thereby achieving the technical effect of improving the flexibility and efficiency of application deployment, and further solving the technical problem that the related technology lacks a universal gateway application management standard, resulting in poor gateway application compatibility and low management efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0018] Figure 1 It is a hardware structure block diagram of a computer terminal according to an application startup method of an embodiment of the present application;

[0019] Figure 2 is a flow chart of an application startup method according to an embodiment of the present application;

[0020] Figure 3 is a system architecture diagram of an application startup method according to an embodiment of the present application;

[0021] Figure 4 This is a flow chart of a new gateway management according to an application startup method of an embodiment of the present application;

[0022] Figure 5 is a flowchart of application delivery and status synchronization of an application startup method according to an embodiment of the present application;

[0023] Figure 6 It is a structural diagram of a device for starting an application according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. 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 should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:

[0027] Gateway Device: A hardware device in the field of network communication that serves as a bridge between different networks or protocols to forward and convert data. In an intelligent network environment, gateway devices are not only responsible for basic network connection tasks, but also integrate a series of advanced functions such as security protection, protocol conversion, data optimization, application management, etc.

[0028] Gateway Application: A concept in the field of software development and network device management, which refers to software applications or services running on gateway devices to provide additional network functions or data processing capabilities. Gateway applications cover a wide range of areas, including but not limited to artificial intelligence, video surveillance, network monitoring, traffic control, security protection, etc. These applications can be flexibly loaded, unloaded, and upgraded on different gateway devices through containerized deployment, realizing dynamic expansion and efficient management of gateway device functions.

[0029] Containerization Deployment: A technology in the field of software engineering that packages applications and their runtime environments in containers so that they can be deployed on any platform that supports container technology. This simplifies the application deployment process, ensures operational consistency, and improves resource utilization.

[0030] Asynchronous Messaging: A mechanism in computer communications that allows the sender to continue executing after sending a message without waiting for the receiver's response. The receiver processes the message and may send a receipt at its convenience.

[0031] Middleware: A concept in the field of computer software, referring to a layer of software located between the operating system and application software, used to provide services such as communication protocols, data format conversion, and message queues.

[0032] Gateway devices (referred to as "gateways") are key devices that connect different network domains. They are not only responsible for data forwarding and routing, but also bear important responsibilities such as security protection, protocol conversion, data optimization, and device management. Small and medium-sized enterprises generally face challenges in gateway application management during the process of informatization construction. These challenges are mainly reflected in the following aspects:

[0033] (1) Traditional gateways have low configuration: With the widespread application of technologies such as big data, the Internet of Things (IoT), and artificial intelligence (AI), the hardware configuration of traditional gateways cannot meet the application operation and deployment of statistical analysis, gateway device management, and security protection. As a result, they cannot meet the needs of enterprises for real-time analysis of network data, unified management of a large number of gateway devices, and timely defense against evolving network attack methods.

[0034] (2) Increasing demand for asynchronous communication: Currently, gateway devices on the market do not support efficient asynchronous message processing mechanisms, and there is a lack of a unified management platform for gateways regardless of brand or model. Small and medium-sized enterprises face problems such as the inability to grasp the running status of gateways and applications in real time and the delay in receiving alarm information.

[0035] (3) Lack of unified gateway application management and orchestration standards: There are many gateway brands and models on the market, and it is difficult for small and medium-sized enterprises to find a unified and efficient gateway application management and orchestration method. This leads to many difficulties for enterprises when deploying and maintaining gateway devices, such as poor device compatibility and high management costs.

[0036] In order to solve the above technical problems, the embodiments of the present application provide corresponding solutions, which are described in detail below.

[0037] The method embodiment of application startup provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a method for starting an application. Figure 1As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions connected via a wired and / or wireless network. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0038] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0039] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the method of application startup in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the above-mentioned method of application startup is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0040] The transmission module 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0041] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .

[0042] It should be noted that, in some optional embodiments, the above Figure 1 The computer terminal shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer terminal described above.

[0043] In the above-mentioned operating environment, an embodiment of the present application provides an embodiment of a method for starting an application. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0044] Figure 2 is a flow chart of a method for starting an application according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0045] Step S202: receiving an application selection instruction of a target object, wherein the application selection instruction includes an identifier of a target gateway and configuration parameters of a target application.

[0046] In the above step S202, the target object refers to the entity that initiates the application deployment request, such as the operation management platform or the user interface. The target object receives the application selection of the user or manager, which may include the identification of the target gateway and the configuration parameters of the target application, and sends a command to the server of the gateway management platform through the network to trigger the deployment and management process of the application.

[0047] The target application refers to the application centrally managed by the management platform. After the local test of the new version of the application is completed, it needs to be put on the management platform for security scanning. After the scan passes, the corresponding version is uploaded to the management platform for use. The application can support CPU architectures such as x86 and ARM, as well as orchestration tools such as Helm and docker compose.

[0048] The application selection instruction is a command or data packet generated according to the operation of the target object, which is used to instruct the network management platform to execute the deployment of a specific application. The application selection instruction can contain the unique identifier of the target gateway (such as the serial number, MAC address, IP address, etc. of the gateway device) and the configuration parameters of the target application. The configuration parameters can include various settings required for the application to run, such as CPU and memory requirements, storage path, port mapping, network configuration, security policy, etc.

[0049] In some embodiments of the present application, the target object sends an application selection instruction to the server of the gateway management platform through a network (such as HTTP, MQTT, etc.), and the instruction is encapsulated into a data packet of a specific format, which includes the identifier of the target gateway and the configuration parameters of the target application. In order to ensure the accurate transmission of instructions, an asynchronous message mechanism can also be used to ensure that the command can be correctly processed even in a high-concurrency environment through a message queue or event-driven method. For example, on the ICT management platform, the operation and maintenance personnel select a specific gateway device and specify the application to be deployed and its configuration parameters. The platform encapsulates this information into an application selection instruction and sends it to the server of the gateway management platform via an HTTP POST request. The request contains the unique identifier of the target gateway and all necessary configuration information of the application, such as hardware resource requirements, configuration parameters that comply with the K8S management system, and image pull parameters.

[0050] Step S204: generating target configuration parameters corresponding to the configuration parameters, wherein the target configuration parameters are adapted to the target gateway.

[0051] In the above step S204, the target configuration parameters refer to the parameters generated by the server of the gateway management platform after converting and optimizing the original configuration parameters according to the hardware characteristics, operating system, container environment and other information of the target gateway, including detailed information required for application startup, such as image location, resource restrictions (CPU, memory, etc.), environment variables, network configuration, etc. The target configuration parameters ensure that the application can run efficiently and stably on the target gateway and is compatible with the resource management strategy of the gateway.

[0052] In some embodiments of the present application, the server of the gateway management platform parses the received configuration parameters, identifies the hardware resource requirements, image pull address and other information therein, and then converts these parameters according to the model, hardware configuration and operating environment of the target gateway to match the actual situation of the gateway. For example, if the original configuration parameters contain image pull information in Helm format, and the target high-level gateway supports Docker containerized deployment, the server of the gateway management platform will automatically convert the Helm information into the image repository address and label available to Docker. At the same time, if the original configuration parameters contain absolute paths or specific hardware dependencies, the server of the gateway management platform will also adapt these parameters to relative paths or adjust the allocation strategy of hardware resources according to the environment of the target gateway to ensure the smooth deployment of the application.

[0053] In the process of generating the target configuration parameters, the server of the gateway management platform will optimize the resource configuration of the application according to the current resource usage of the target gateway. For example, if the CPU usage of the target gateway is high, the server of the gateway management platform can limit the upper limit of the CPU usage of the application, or dynamically adjust the memory allocation to ensure the stable operation of the gateway and the effective use of resources. In some embodiments of the present application, when the server of the gateway management platform receives the application selection instruction, it checks the operating status and resource usage of the target gateway. Based on the inspection results, if the CPU and memory resources of the target gateway are tight, the management platform will adjust the configuration parameters of the application, such as setting the upper limit of CPU usage to 80% and the upper limit of memory usage to 70%, thereby preventing excessive consumption of gateway resources when the application is deployed.

[0054] In complex scenarios where multiple applications need to work together, in order to ensure the orderly startup of applications, avoid resource conflicts, and improve the success rate of application deployment, the following steps can also be performed: determine the orchestration instructions corresponding to multiple target applications in the application selection instructions, wherein the orchestration instructions are at least used to indicate the startup order of the multiple target applications; send the orchestration instructions to the target gateway.

[0055] Orchestration instructions refer to a set of instructions used to control the start, stop, upgrade and interaction of multiple applications in a specific order and strategy. The orchestration instructions define the dependencies, startup timing and communication mechanism between applications. In some embodiments of the present application, after receiving the application selection instruction, the server of the gateway management platform can analyze the configuration parameters of multiple target applications in the instruction, identify the dependencies between multiple target applications, for example, an application may require the service provided by another application to run normally, and determine the startup order of multiple target applications based on the identified dependencies. In addition, the server of the gateway management platform can also directly obtain the dependencies and startup order between applications pre-defined by users or operation and maintenance personnel. Based on the identified dependencies, the server of the gateway management platform generates an orchestration instruction, which may include a list of target applications to be started in sequence, as well as specific configuration parameters for each application.

[0056] The server of the gateway management platform can send the orchestration instructions to the target gateway through the asynchronous message mechanism to ensure that the instructions can be received and executed by the gateway device without affecting other operations. For example, the orchestration instructions are sent to the target gateway through the EMQX (Erlang MQTT Broker) asynchronous message cluster, and the communication middleware (Agent) on the gateway can subscribe to the "Application Management and Status Reporting Topic" (a communication topic for processing events and data related to gateway application management) to receive the orchestration instructions in real time and execute application deployment according to the startup order in the instructions.

[0057] The orchestration instructions can also be determined based on the resource requirements of the application and the resource usage of the target gateway, specifically: obtaining the target configuration parameters corresponding to all applications in the application selection instruction, wherein the target configuration parameters include the resource requirements; arranging all applications in ascending order according to the resource requirements to obtain an application list; obtaining the operating parameters of the target gateway, wherein the operating parameters include the resource usage of the target gateway; when the resource usage meets the first preset condition, screening multiple target applications from the application list in turn, wherein the sum of the resource requirements corresponding to the multiple target applications meets the preset threshold; generating orchestration instructions corresponding to the multiple target applications.

[0058] Resource requirements refer to the hardware resources required for application runtime, such as CPU, memory, disk space, etc., and are used to evaluate the application's consumption of gateway device hardware resources. Application list refers to a list of applications arranged in ascending order (i.e., sorted from small to large in terms of resource requirements), which is used to determine the deployment order. For example, applications with smaller resource requirements can be deployed first to save resources and improve deployment efficiency.

[0059] In some embodiments of the present application, the server of the gateway management platform parses the application selection instruction, extracts the configuration parameters such as the resource requirements of all applications, and then arranges them in ascending order according to the requirements to form an optimized application list. For example, when receiving a deployment request including three applications "AI", "Video" and "Monitoring", the resource requirements (such as CPU, memory, etc.) of each application are first obtained, and then these requirements are arranged in ascending order to form an optimized application startup order list.

[0060] The operation parameters of the gateway include CPU usage, memory usage, disk space remaining, etc., which are used to evaluate whether the gateway has sufficient resources to carry the new application. In some embodiments of the present application, the server of the gateway management platform sends a query request to the target gateway through an asynchronous message. After receiving the request, the Agent component reports the current resource usage, including key information such as CPU usage and memory usage. This information helps determine whether the gateway meets the deployment conditions of the new application.

[0061] The first preset condition may be a set threshold value of gateway resource usage, for example, a preset threshold value of each operating parameter, which is used to determine whether the gateway is in a safe operating state. The preset threshold value is used to limit the upper limit of the total resource demand of the newly deployed application to ensure that it does not exceed the carrying capacity of the gateway and avoid resource overload.

[0062] When the resource usage of the gateway meets the first preset condition, multiple applications whose total resource requirements meet the preset threshold can be screened out from the application list, and orchestration instructions can be generated to ensure efficient deployment of applications and that resources are not overloaded. For example, the server of the gateway management platform finds that the total resource requirements of the two applications "AI" and "Monitoring" are within the remaining resource range, and the current CPU usage and memory usage of the gateway meet the first preset condition. The management platform generates an orchestration instruction to instruct the Agent component to deploy the two applications in sequence and allocate a specific amount of resources to each application to ensure a smooth deployment process and effective use of resources.

[0063] Step S206: Send the target configuration parameters to the target gateway, wherein the target configuration parameters are used to instruct the target gateway to start the target application.

[0064] In the above step S206, the server of the gateway management platform can use the EMQX asynchronous message cluster to send the target configuration parameters in the form of a message to the communication middleware Agent on the target gateway (the Agent subscribes to the "Application Management and Status Reporting Topic" and can receive and process these configuration parameters). For example, when the server of the gateway management platform generates the target configuration parameters of the "AI" application, it will publish a message containing the parameters through the EMQX cluster. The Agent component on the high-order gateway listens to these messages. Once it receives the configuration parameters of the application, it will pull the corresponding Docker image from the image repository according to the resource requirements and startup scripts indicated in the parameters, and start the application in the container environment of the gateway. In addition, the Agent will also monitor the running status of the application and the resource usage to ensure that the configuration parameters are executed correctly.

[0065] In some embodiments of the present application, the target gateway can start the target application in the following manner: the communication middleware of the target gateway obtains the target configuration parameters of the target application, wherein the target configuration parameters include image parameters; pulls the application image corresponding to the image parameters from the image repository; creates a target container on the target gateway using the target configuration parameters, wherein the target container is used to provide an operating environment for the application image; and starts the application image in the target container.

[0066] Communication middleware refers to a software component pre-installed in a high-level gateway device, which is responsible for handling the communication between various modules in the system (such as the communication between the server of the gateway management platform and the operation management platform), including receiving instructions, data reporting, status synchronization, etc. In some embodiments of the present application, the communication middleware Agent of the target gateway subscribes to a specific "application management and status reporting Topic". When the server of the gateway management platform publishes the target configuration parameters through this Topic, the Agent can receive the parameters.

[0067] The image repository refers to the server or cloud service of the gateway management platform that stores the application container image, and is a resource library for application deployment and update. The application image in the image repository includes the application's running code and dependent environment. In some embodiments of the present application, the Agent uses the image pull information in the target configuration parameters, such as the image repository address, image tag, etc., to download the corresponding application image from the external image repository to the local storage of the target gateway.

[0068] The target container refers to a container instance created according to the target configuration parameters in the container runtime environment of the target gateway, which is used to run the application image of the corresponding application. In some embodiments of the present application, the communication middleware Agent can create a container instance in the container runtime environment of the target gateway according to the resource restrictions and environment settings in the target configuration parameters, and then start the application image in the container to start the application.

[0069] In order to promptly discover problems in the operation of gateway applications, a real-time monitoring mechanism can also be set up, specifically: obtaining the operating status information of the target application reported by the target gateway from the asynchronous message cluster, wherein the asynchronous message cluster transmits messages through an asynchronous communication protocol; generating target indicators corresponding to the operating status information, wherein the target indicators are used to quantify the resource usage of the target application; generating a first alarm message when the target indicator meets a second preset condition; and sending the first alarm message to the target object.

[0070] The asynchronous message cluster includes the EMQX asynchronous message cluster (a high-concurrency message middleware based on the Erlang language, supporting asynchronous communication protocols such as MQTT), which is used to establish asynchronous communication channels between the modules of the system, so that the sending and receiving of messages can be carried out independently, and the response speed and throughput of the system are improved. In some embodiments of the present application, the server of the gateway management platform subscribes to the "Application Status and Alarm Information Topic" in the EMQX asynchronous message cluster and receives the application running status information reported by the high-order gateway. For example, when the Agent on the high-order gateway detects that the CPU usage of the "AI" application reaches 75%, it will report this status information to EMQX through the asynchronous message mechanism. EMQX forwards the message to the server of the subscribed gateway management platform. After receiving the message, the platform parses and obtains the CPU usage of the "AI" application.

[0071] The target indicators may include CPU usage, memory usage, disk space usage, etc. The second preset condition is used to determine whether the application operation status is normal, and may be a set resource usage threshold, for example, CPU usage exceeds 80%, memory usage exceeds 70%, etc. When the target indicator is greater than or equal to the corresponding preset threshold, it indicates that the application is running abnormally or resources are tight. The server of the gateway management platform extracts and calculates the target indicator based on the received operation status information, which is used to monitor the application resource usage. When the target indicator exceeds the second preset condition, the server of the gateway management platform will generate a first alarm message and send the first alarm message to the target object (such as operation and maintenance personnel or alarm management system) in the form of an asynchronous message through the message processing module.

[0072] In order to achieve refined monitoring of the application running status and improve the system's fault detection accuracy, the container status can also be monitored, specifically: obtaining container status information of the target container; generating a container status indicator corresponding to the container status information, wherein the container status indicator is used to quantitatively represent the resource usage of the target container; mapping the container status indicator using a preset mapping rule to obtain the health of the target application, wherein the preset mapping rule is used to indicate the corresponding relationship between the container status indicator and the health of the target application; generating a second alarm information when the health of the target application meets a third preset condition; and sending the second alarm information to the target object.

[0073] The container status information of the target container refers to the real-time status data of the container when it is running, including but not limited to CPU usage, memory usage, disk IO, network traffic, etc., which is used to reflect the running health and resource consumption of the container. In some embodiments of the present application, the communication middleware Agent on the target gateway can regularly monitor the running status of the container, collect and report the CPU usage, memory usage, disk IO and other data of the container. The container status indicator refers to an indicator formed by quantifying the container status information, which is used to more intuitively represent the container resource usage.

[0074] The preset mapping rules are used to convert the container status indicator into the health of the target application. Through the preset mapping rules, the system can evaluate whether the application is running well according to the resource usage of the container. The health of the target application refers to the quantitative value of the application running health status obtained by converting the container status indicator through the mapping rule. In some embodiments of the present application, the health evaluation can be performed based on the threshold. For example, the "monitoring" application is particularly sensitive to memory usage. The server of the gateway management platform can preset rules: when the memory indicator exceeds 70, the health is reduced to 50; when it is lower than 70, the health is calculated linearly according to the actual indicator. The health calculation can also be based on the weighted average. For example, for the "AI" application, if the CPU usage (the first container status indicator) and the memory occupancy rate (the second container status indicator) are both important factors for evaluating its running health, these two indicators can be given a weight of 0.5 respectively, which means that in the final health calculation, the CPU usage rate and the memory occupancy rate will be equally important. The weight value can be set in advance or dynamically determined based on the running state of the target container.

[0075] In some embodiments of the present application, the following steps can also be performed: receiving a management request sent by the communication middleware of the gateway, wherein the management request includes basic parameters of the gateway; updating a gateway list using the basic parameters of the gateway, wherein the gateway list is used to store managed gateways; and sending the updated gateway list to the target object.

[0076] A management request refers to a request sent by the communication middleware (such as Agent) in a new gateway device to the server of the gateway management platform after it is started, indicating that the device hopes to be included in the system for unified management. The server of the gateway management platform listens to a specific communication channel (such as MQTT Topic) and waits to receive management requests from the communication middleware of the new gateway. Once the request arrives, the platform will parse the data in the request and obtain the basic parameters of the gateway. The basic parameters of the gateway are used to describe the basic information of the new gateway, such as the hardware configuration, device status, network connection, etc. The gateway list refers to a data structure maintained by the server of the gateway management platform, which stores all the information of the managed gateway devices, such as device ID, model, location, status, etc.

[0077] In some embodiments of the present application, the communication middleware communication component can be solidified in the high-order gateway device at the factory and automatically start when it is powered on. After startup, the status is reported to the server of the gateway management platform through asynchronous messages and the heartbeat mechanism is turned on to ensure that the status of the high-order gateway is reported to the server of the gateway management platform in real time. The server of the gateway management platform cleans the data reported by the newly connected gateway and sends a new gateway management asynchronous message to the operation management platform. After the operation management platform receives the gateway management message through the message processing module, it performs a secondary cleaning of the data and persists it in the DB and Redis. At this point, the new gateway management process is completed, and the process completes the unified access of high-order gateways of different manufacturers and models. The operation and maintenance personnel view the basic information of the online gateway in the gateway management module of the operation management platform, such as the following hanging terminals, network topology, WIFI settings, plug-ins, middleware, QOS, VPN, LAN&WAN binding, application management, etc.

[0078] Through the above steps S202 to S206, the application configuration parameters are converted, the configuration parameters of the target object are received, the target configuration parameters that are compatible with the target gateway are generated, and the target configuration parameters are sent to the target gateway to start the target application, so that the purpose of correctly identifying and parsing application configuration parameters by gateway devices of different models is achieved, thereby achieving the technical effect of improving the flexibility and efficiency of application deployment, and further solving the technical problem that the related technology lacks a universal gateway application management standard, resulting in poor gateway application compatibility and low management efficiency.

[0079] Figure 3 is a system architecture diagram of a method for starting an application according to an embodiment of the present application, such as Figure 3 As shown, in some embodiments of the present application, the system may include the following parts:

[0080] (1) Operation and management platform: The operation and management platform includes five modules: gateway management, application management, gateway statistics, alarm management, and message processing.

[0081] The gateway management module is responsible for the management of new gateway devices, including basic information management, status monitoring and device configuration updates. Through two-way communication with the gateway management platform, remote management and status synchronization of gateway devices are achieved.

[0082] The application management module is used for application upload, version management, and application distribution, update, and deletion. Enterprise users can select and configure applications to be deployed in this module and manage their status in the entire gateway device ecosystem.

[0083] The gateway statistics module collects and analyzes the operation data of gateway devices, provides statistical reports and data analysis, and helps enterprise users understand the usage and performance indicators of gateway devices.

[0084] The alarm management module processes the received alarm information, including alarm screening, classification and notification. It is integrated with mail servers, SMS gateways, WebHook servers, etc. to ensure that the alarm information can be conveyed to relevant personnel in a timely manner.

[0085] The message processing module is responsible for processing asynchronous messages from EMQX, including application list, status display and alarm information reception. It interacts with the message processing module of the gateway management platform through Http to achieve data synchronization and update.

[0086] The operation management platform communicates with the message processing module of the gateway management platform through the Http interface to receive or send status information, instructions and alarm data of the gateway and application.

[0087] (2) Gateway management platform: The gateway management platform includes four modules: gateway data collection, gateway data processing, command forwarding, and message processing.

[0088] The gateway data collection module receives the gateway's operating status data from EMQX by subscribing to the application management and status reporting topics.

[0089] The gateway data processing module is responsible for cleaning and formatting the data collected from the gateway and communication middleware Agent, preparing for subsequent data processing and analysis.

[0090] The instruction forwarding module processes instructions from the operation management platform and forwards them to the corresponding gateway devices, such as application issuance, upgrade and deletion instructions.

[0091] The message processing module communicates with the message processing module of the operation management platform through Http, sends the gateway management and terminal management information to EMQX, and receives the status report and detection data of EMQX.

[0092] (3) High-level gateway: High-level gateways include different gateway devices deployed by users of different platforms (such as enterprises), and each gateway device has a communication middleware Agent. The communication middleware Agent is pre-installed on each high-level gateway and is responsible for communicating with EMQX, including receiving application instructions by subscribing to application management and status reporting topics, and reporting gateway status and detection data to the EMQX cluster. The Agent is also responsible for pulling application images from the image repository and deploying, upgrading, or deleting applications.

[0093] (4) Asynchronous message cluster EMQX (EMQX Cluster) is used to handle the communication of massive gateway devices, including status reporting, data synchronization, application distribution, upgrade and deletion instruction forwarding, ensuring reliable message transmission and high concurrent processing capabilities.

[0094] Pub1-N represents multiple publishers in the EMQX cluster, which are responsible for issuing instructions for gateway management, terminal management, application delivery, upgrade and deletion, as well as collecting gateway status and detection data.

[0095] Sub1-N represents multiple subscribers in the EMQX cluster. They subscribe to topics such as gateway data collection, gateway data processing, application management, and status reporting to receive gateway status data and detection information, and forward application delivery, upgrade, and deletion instructions to the Agent on the gateway device.

[0096] In the above structure, the operation management platform and the gateway management platform communicate bidirectionally through the Http interface to achieve synchronization of application and gateway status data. The gateway management platform communicates with the communication middleware Agent of the high-order gateway through the EMQX cluster, and is responsible for forwarding application issuance, upgrade and deletion instructions, as well as status reporting and receiving detection data. The Agent of the high-order gateway receives instructions by subscribing to the Topic of the EMQX cluster, and publishes gateway status and detection data to the EMQX cluster. As a message middleware, EMQX is responsible for collecting gateway status information and publishing application instructions, ensuring reliable transmission and efficient processing of messages between the operation management platform, the gateway management platform and the high-order gateway.

[0097] Figure 4 is a flowchart of a new gateway management according to a method for starting an application in an embodiment of the present application. Figure 3On the basis of the operation management platform and the gateway management platform, after the high-level gateway subscribes to the application management topic and the application management and status reporting topic, when the high-level gateway is powered on, its communication middleware starts automatically and starts to establish communication with the EMQX asynchronous message cluster, subscribing to the application and gateway management topic (topic). Subsequently, the middleware begins to collect and report the data of the new gateway, which includes but is not limited to the basic parameters, operating status and resource usage of the gateway. After receiving the data of the new gateway, the gateway management platform performs data cleaning to ensure the accuracy and completeness of the information. After that, the platform issues a new gateway management notification and synchronizes the information to all subscribers in the EMQX asynchronous message cluster. The management notification is synchronized to the operation management platform, which further cleans the information and persists it to the database (DB) to complete the gateway management process. This process enhances the dynamics and responsiveness of the system, enables the new gateway to be quickly incorporated into the management platform, and improves the efficiency of gateway management.

[0098] Figure 5 is a flowchart of application delivery and state synchronization of a method for application startup according to an embodiment of the present application. Figure 3 On the basis of the application management topic, after the operation management platform and the gateway management platform subscribe to the application management topic, and the high-level gateway subscribes to the application management and status reporting topic, the operation management platform sends the application to the target gateway through the Http interface, and the gateway management platform synchronizes the application sending data to ensure the accuracy and timeliness of data transmission. The communication middleware of the target gateway pulls the application image from the image warehouse, and then uses the target configuration parameters to create a target container on the target gateway to provide the operating environment of the application image. After the application is started in the target container, its operating status is transmitted to the EMQX asynchronous message cluster through the status reporting mechanism, and finally synchronized to the gateway management platform and the operation management platform. The platform cleans and confirms the application status and alarm information, and displays it to the target object. This process ensures the automated deployment and real-time monitoring of the application, improves the deployment efficiency, and also provides timely application status feedback to the operation and maintenance personnel, reducing the operation and maintenance costs.

[0099] This application can break through the limitations of traditional gateways from the hardware level through high-end gateway hardware that integrates computing power cards and high-performance processors. In addition, it can connect various AI, video, monitoring and other ecological applications through communication middleware to achieve containerized deployment of gateway applications, so that applications can be loaded on demand and flexibly orchestrated, and different applications have the ability to integrate and control each other. In addition, based on asynchronous messaging, it successfully realizes the automatic management of massive gateways, and can monitor the running status and occupied resources of applications in real time. At the same time, it can also provide real-time feedback on gateway status, device status, middleware status, etc., to fully ensure the efficiency and stability of gateway management and communication.

[0100] Figure 6 is a structural diagram of a device for starting an application according to an embodiment of the present application, such as Figure 6 As shown, the device comprises:

[0101] A receiving module 602 is used to receive an application selection instruction of a target object, wherein the application selection instruction includes an identifier of a target gateway and configuration parameters of a target application;

[0102] An adjustment module 604, configured to generate a target configuration parameter corresponding to the configuration parameter, wherein the target configuration parameter is adapted to the target gateway;

[0103] The execution module 606 is used to send the target configuration parameters to the target gateway, wherein the target configuration parameters are used to instruct the target gateway to start the target application.

[0104] In the above-mentioned application startup device, the receiving module is also used to determine the orchestration instructions corresponding to multiple target applications in the application selection instruction, wherein the orchestration instructions are at least used to indicate the startup order of the multiple target applications; and send the orchestration instructions to the target gateway.

[0105] In the above-mentioned application startup device, the receiving module is also used to obtain target configuration parameters corresponding to all applications in the application selection instruction, wherein the target configuration parameters include resource requirements; arrange all applications in ascending order according to the resource requirements to obtain an application list; obtain the operating parameters of the target gateway, wherein the operating parameters include the resource usage of the target gateway; when the resource usage meets the first preset condition, filter multiple target applications from the application list in turn, wherein the sum of the resource requirements corresponding to the multiple target applications meets the preset threshold; and generate orchestration instructions corresponding to the multiple target applications.

[0106] In the device for starting the above-mentioned application, the execution module is also used to obtain the running status information of the target application reported by the target gateway from the asynchronous message cluster, wherein the asynchronous message cluster transmits messages through an asynchronous communication protocol; generate a target indicator corresponding to the running status information, wherein the target indicator is used to quantify the resource usage of the target application; when the target indicator meets the second preset condition, generate a first alarm information; and send the first alarm information to the target object.

[0107] In the above-mentioned application startup device, the execution module is also used for the communication middleware of the target gateway to obtain the target configuration parameters of the target application, wherein the target configuration parameters include image parameters; pull the application image corresponding to the image parameters from the image repository; use the target configuration parameters to create a target container on the target gateway, wherein the target container is used to provide an operating environment for the application image; and start the application image in the target container.

[0108] In the above-mentioned device for starting the application, the execution module is also used to obtain container status information of the target container; generate a container status indicator corresponding to the container status information, wherein the container status indicator is used to quantify the resource usage of the target container; map the container status indicator using a preset mapping rule to obtain the health of the target application, wherein the preset mapping rule is used to indicate the correspondence between the container status indicator and the health of the target application; when the health of the target application meets a third preset condition, generate a second alarm information; and send the second alarm information to the target object.

[0109] In the device started by the above application, the receiving module is also used to receive a management request sent by the communication middleware of the gateway, wherein the management request includes basic parameters of the gateway; update the gateway list using the basic parameters of the gateway, wherein the gateway list is used to store managed gateways; and send the updated gateway list to the target object.

[0110] It should be noted that Figure 6 The application shown starts the device for executing Figure 2 The method of launching the application shown, therefore Figure 2 The explanations in the application startup method in also apply to Figure 6 The device for launching the application shown will not be described in detail here.

[0111] An embodiment of the present application also provides an electronic device, which includes a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the steps of the method for implementing application startup in each embodiment of the present application.

[0112] For example, the processor performs the following functions by executing program instructions stored in the memory:

[0113] Receive an application selection instruction of a target object, wherein the application selection instruction includes an identifier of a target gateway and configuration parameters of a target application; generate target configuration parameters corresponding to the configuration parameters, wherein the target configuration parameters are adapted to the target gateway; send the target configuration parameters to the target gateway, wherein the target configuration parameters are used to instruct the target gateway to start the target application.

[0114] An embodiment of the present application further provides a non-volatile storage medium, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the steps of the application startup method in each embodiment of the present application by running the computer program.

[0115] An embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the method for starting an application in each embodiment of the present application.

[0116] The embodiments of the present application also provide a computer program, which, when executed by a processor, implements the steps of the method for starting an application in each embodiment of the present application.

[0117] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0118] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0119] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0120] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0121] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0122] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.

[0123] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for starting an application, characterized in that: include: Receiving an application selection instruction of a target object, wherein the application selection instruction includes an identifier of a target gateway and configuration parameters of a target application; Generating a target configuration parameter corresponding to the configuration parameter, wherein the target configuration parameter is adapted to the target gateway; The target configuration parameter is sent to the target gateway, wherein the target configuration parameter is used to instruct the target gateway to start the target application.

2. The method according to claim 1, characterized in that After generating the target configuration parameter corresponding to the configuration parameter, the method further includes: Determine an arrangement instruction corresponding to a plurality of target applications in the application selection instruction, wherein the arrangement instruction is at least used to indicate a startup order of the plurality of target applications; The orchestration instruction is sent to the target gateway.

3. The method according to claim 2, characterized in that Determining the orchestration instructions corresponding to the multiple target applications in the application selection instruction includes: Obtaining target configuration parameters corresponding to all applications in the application selection instruction, wherein the target configuration parameters include resource requirements; Arrange all the applications in ascending order according to the resource requirements to obtain an application list; Acquire the operating parameters of the target gateway, wherein the operating parameters include resource usage of the target gateway; In the case where the resource usage meets the first preset condition, a plurality of target applications are sequentially screened from the application list, wherein the sum of the resource requirements corresponding to the plurality of target applications meets a preset threshold; Generate orchestration instructions corresponding to the plurality of target applications.

4. The method according to claim 1, characterized in that: The method further comprises: Acquire the running status information of the target application reported by the target gateway from an asynchronous message cluster, wherein the asynchronous message cluster performs message transmission through an asynchronous communication protocol; Generate a target indicator corresponding to the running status information, wherein the target indicator is used to quantitatively represent the resource usage of the target application; When the target indicator meets the second preset condition, generating first alarm information; The first alarm information is sent to the target object.

5. The method according to claim 1, characterized in that The target gateway starts the target application in the following manner: The communication middleware of the target gateway obtains target configuration parameters of the target application, wherein the target configuration parameters include mirroring parameters; Pulling an application image corresponding to the image parameters from an image repository; Creating a target container on the target gateway using the target configuration parameters, wherein the target container is used to provide a running environment for the application image; The application image is started in the target container.

6. The method according to claim 5, characterized in that The method further comprises: Obtaining container status information of the target container; Generate a container status indicator corresponding to the container status information, wherein the container status indicator is used to quantitatively represent resource usage of the target container; Mapping the container status indicator using a preset mapping rule to obtain the health of the target application, wherein the preset mapping rule is used to indicate a corresponding relationship between the container status indicator and the health of the target application; When the health of the target application meets a third preset condition, generating second alarm information; The second warning information is sent to the target object.

7. The method according to claim 1, characterized in that The method further comprises: Receiving a management request sent by the communication middleware of the gateway, wherein the management request includes basic parameters of the gateway; Using the basic parameters of the gateway, the gateway list is updated, wherein the gateway list is used to store the managed gateways; The updated gateway list is sent to the target object.

8. A device for starting an application, characterized in that: include: A receiving module, configured to receive an application selection instruction of a target object, wherein the application selection instruction includes an identifier of a target gateway and configuration parameters of a target application; An adjustment module, configured to generate a target configuration parameter corresponding to the configuration parameter, wherein the target configuration parameter is adapted to the target gateway; An execution module is used to send the target configuration parameter to the target gateway, wherein the target configuration parameter is used to instruct the target gateway to start the target application.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the method for starting an application as described in any one of claims 1 to 7.

10. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the application startup method described in any one of claims 1 to 7 by running the computer program.

11. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the method for starting an application as described in any one of claims 1 to 7 is implemented.