SCU containerized micro-application dynamic deployment method of intelligent converged terminal
By structuring SCU deployment requests and dynamically calculating resource quotas based on real-time status, a dependency graph is constructed and containerized deployment is performed. This solves the problems of chaotic dependency management and unreasonable resource allocation in SCU application deployment, improves deployment efficiency and stability, and achieves intelligent optimization of resource configuration and correct order of component dependencies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-27
- Publication Date
- 2026-03-27
Smart Images

Figure CN121597251B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent fusion terminals and containerized micro-application, and particularly relates to a SCU containerized micro-application dynamic deployment method of an intelligent fusion terminal. BACKGROUND
[0002] As a key infrastructure of smart grid, intelligent fusion terminals integrate multiple functional modules such as communication, computing, sensing and data processing. The core component of intelligent fusion terminals, the smart control unit (SCU), is responsible for the unified scheduling of terminal resources, application management and operation state monitoring, and is the center of ensuring the efficient collaborative work of the terminal. The SCU needs to process multiple heterogeneous data streams and support the dynamic loading and running of various applications, and its application deployment mechanism directly affects the overall performance and service reliability of the terminal.
[0003] Currently, the application deployment of the SCU mainly relies on manual configuration or semi-automatic script process. Developers usually submit deployment requests through command line interface or simple configuration files, and the system performs parsing and execution based on pre-set templates. The deployment process lacks standardized input specifications, resource quotas are mostly allocated statically, and component dependency relationships are determined manually and loaded sequentially. When deploying new functions, the component version, resource requirements and startup order need to be specified manually, and the system only performs basic verification without considering the real-time system state. This mode can still cope with the initial deployment scenario, but as the complexity of terminal applications increases and concurrent demand increases, its limitations become increasingly apparent.
[0004] The applicant found that the existing technology mainly has two problems in the SCU application deployment: 1) The deployment request is usually submitted in the form of text description or scattered parameters, lacking a unified data model and verification mechanism. The deployment system cannot automatically identify component dependency relationships or version compatibility, leading to parameter parsing errors, component missing or conflicts during deployment, and reducing deployment efficiency. 2) The existing method sets resource quotas (such as CPU, memory) based on historical experience or fixed thresholds, without dynamic adjustment in combination with the current load of the SCU. When the system is in a high load state, new applications fail to deploy due to insufficient resources; when the system is idle, resources are idle due to excessive reservation. The existing strategy cannot adapt to the dynamic changes of the terminal running environment, resulting in low resource utilization or the risk of system overload.
[0005] In summary, there is an urgent need for a SCU micro-application dynamic deployment method that can standardize deployment request input and dynamically optimize resource allocation to improve the automation level and adaptability of the SCU in application management, and lay the foundation for the large-scale application of intelligent fusion terminals. SUMMARY
[0006] In view of the above prior art deficiencies, the technical problem to be solved by the present application is: how to provide an SCU containerized micro application dynamic deployment method of an intelligent fusion terminal, effectively solving the problems of management confusion, unreasonable resource allocation, low deployment success rate and the like in traditional micro application deployment, by modularizing and standardizing the deployment process, reducing the need for manual intervention, thereby improving the efficiency and stability of the SCU containerized micro application dynamic deployment.
[0007] To solve the above technical problems, the present application adopts the following technical solutions:
[0008] The SCU containerized micro application dynamic deployment method of an intelligent fusion terminal comprises:
[0009] S1: obtaining a deployment request of a micro application to be deployed, and converting the deployment request into structured micro application description information;
[0010] S2: calculating the resource quota of the micro application to be deployed based on the micro application description information and the real-time state of the SCU of the intelligent fusion terminal;
[0011] S3: extracting corresponding components from a pre-installed component library based on the micro application description information to construct a directed acyclic graph, and generating a component loading order of the micro application to be deployed based on the directed acyclic graph;
[0012] S4: creating a container for the micro application to be deployed, and configuring the container based on the component loading order and the resource quota of the micro application to be deployed, to obtain a deployed micro application;
[0013] S5: starting the deployed micro application and performing an automated health check to generate a micro application service state.
[0014] Preferably, in step S1, the following steps are specifically included:
[0015] S101: the obtained deployment request of the micro application to be deployed includes a micro application package, an application ID, a version number, resource requirements and a list of dependent components;
[0016] S102: checking the integrity, compliance and security of the micro application package, and the uniqueness of the application ID, the format of the version number and the authenticity of each dependent component in the list of dependent components; if all the checks are passed, step S103 is performed, otherwise the micro application deployment is ended;
[0017] S103: converting the resource requirements into standard units to obtain standardized resource requirements, which include CPU requirements and memory requirements;
[0018] S104: extracting the basic weights of each dependent component from the pre-installed component library, and calculating the average basic weight of all dependent components;
[0019] S105: The micro application to be deployed passes the checked micro application package, application ID, version number, list of dependent components, and standardized resource requirements and average base weight of all dependent components as its structured micro application description information.
[0020] Preferably, in step S2, the following steps are specifically included:
[0021] S201: Obtain the real-time state of the intelligent fusion terminal SCU, which includes the total available CPU, total available memory, and current active micro application list of the SCU.
[0022] S202: Calculate the dynamic weight value of the micro application to be deployed based on the average base weight of the micro application to be deployed and the historical data of the SCU.
[0023] The formula is:
[0024] ;
[0025] In the formula: represents the dynamic weight value of the micro application to be deployed; represents the average base weight of the micro application to be deployed; represents the historical average load of the same type of micro application in the SCU as the micro application to be deployed; represents the maximum load of the SCU;
[0026] S203: Calculate the dynamic weight value of all existing micro applications in the current active micro application list.
[0027] The formula is:
[0028] ;
[0029] In the formula: represents the dynamic weight value of the existing micro application; represents the historical average load of the existing micro application; represents the maximum load of the SCU;
[0030] S204: Accumulate the dynamic weight values of the micro application to be deployed and all existing micro applications to obtain the total dynamic weight, and divide the dynamic weight value of the micro application to be deployed by the total dynamic weight to obtain the resource allocation ratio of the micro application to be deployed.
[0031] S205: Multiply the resource allocation ratio of the micro application to be deployed by the total available CPU and the total available memory of the SCU, respectively, to obtain the CPU allocation and memory allocation of the micro application to be deployed as its resource quota.
[0032] Preferably, in step S205, based on the CPU allocation and the memory allocation of the micro application to be deployed and its CPU demand and memory demand, the following judgment is made:
[0033] If the CPU allocation of the micro application to be deployed is less than 80% of its CPU demand, the deployment is terminated;
[0034] If the CPU allocation of the micro application to be deployed is greater than or equal to 80% of its CPU demand and the memory allocation is less than 80% of its memory demand, memory degradation deployment is performed, that is, the CPU guarantees the core function and the memory is moderately adjusted;
[0035] If the CPU allocation of the micro application to be deployed is greater than or equal to 80% of its CPU demand and the memory allocation is greater than or equal to 80% of its memory demand, the deployment is performed based on the CPU allocation and the memory allocation.
[0036] Preferably, in step S3, the following steps are included:
[0037] S301: Based on the dependency component list of the micro application to be deployed, the current version of each dependency component is extracted from the preset component library;
[0038] S302: The pre-dependent components and their current versions of each dependency component are obtained from the preset component library;
[0039] S303: All dependency components and pre-dependent components are taken as nodes, and the dependency relationship between nodes is taken as edges to construct a directed acyclic graph as a dependency graph;
[0040] S304: The components in the dependency graph are version corrected to obtain a corrected dependency graph;
[0041] S305: The Kahn algorithm is used to topologically sort the corrected dependency graph to generate a component loading order.
[0042] Preferably, in step S304, the processing steps of version correction of the dependency graph include:
[0043] S3041: Two components with a dependency relationship in the dependency graph are taken as a dependency pair;
[0044] S3042: The version conflict probability of the two components in each dependency pair is calculated to generate a conflict probability matrix;
[0045] The calculation formula of the version conflict probability is:
[0046] ;
[0047] In the formula: represents the version conflict probability of two components in a dependency pair; represents the Sigmoid function; represents the pre-trained weight matrix; represents the feature vector after splicing of two components in a dependency pair, and the feature vector of the component includes version number, CPU consumption and memory consumption;
[0048] S3043: For the dependency pair in the conflict probability matrix, if the conflict probability is greater than the preset conflict value, find the compatible version of the corresponding component from the preset component library;
[0049] S3044: Replace the current version of the corresponding component in the dependency graph with the compatible version of the component to generate a revised dependency graph.
[0050] Preferably, in step S4, the following steps are specifically included:
[0051] S401: Create a Docker container on the SCU, set the kernel parameters of the Docker container based on the CPU allocation and memory allocation of the micro application to be deployed, and initialize the network isolation and storage volume of the Docker container to obtain an initialized container environment;
[0052] S402: In the initialized container environment, deploy the dependent components and the pre-dependent components one by one according to the component loading order of the micro application to be deployed;
[0053] S403: Decompress the micro application package of the micro application to be deployed and deploy it to the specified directory of the Docker container, and configure the environment variables to match the request description to obtain the deployed micro application.
[0054] Preferably, in step S402, for the deployed dependent components and pre-dependent components, the deployment system starts the service process thereof and verifies the health status; if the deployment of the dependent component or the pre-dependent component fails, the deployed component is immediately rolled back and the environment is cleaned up.
[0055] Preferably, in step S403, after obtaining the deployed micro application, the micro application service process is started; if it fails multiple times, the deployment is terminated; if it is successfully started, the deployment system records the service availability state of the deployed micro application.
[0056] Compared with the prior art, the SCU containerized micro application dynamic deployment method of the intelligent fusion terminal in the application has the following beneficial effects:
[0057] The application converts the deployment request of the micro application into a standardized description, dynamically calculates the resource quota combined with the real-time state of the SCU, constructs a dependency graph and generates a loading sequence, and finally completes the containerized deployment and health check. The overall method effectively solves the problems of chaotic dependency management, unreasonable resource allocation, and low deployment success rate in traditional micro application deployment, and by modularizing and standardizing the deployment process, reduces the need for manual intervention, improves deployment efficiency and system stability. At the same time, the dynamic resource calculation mechanism ensures the rational use of system resources, avoids resource waste and system overload risk, and provides reliable protection for the collaborative operation of multiple micro applications of the intelligent fusion terminal SCU.
[0058] The application converts the deployment request into structured micro application description information, and through integrity, compliance, security checks and standardized processing, ensures the accuracy and reliability of the deployment request. First, it solves the deployment failure risk caused by non-standard request format and unclear component dependency in traditional deployment, improving the success rate of SCU micro application deployment. Second, through application ID uniqueness check and version number format verification, it avoids application conflict and version confusion, ensuring the standardization of system application management. Finally, the generation of structured description information provides accurate input for subsequent resource calculation and dependency processing, making the entire deployment process more rigorous and traceable, significantly improving the automation level and overall reliability of micro application deployment.
[0059] The application calculates the resource quota based on the micro application description information combined with the real-time state of the SCU, realizes intelligent optimization of resources through dynamic weight calculation and resource proportion allocation. First, it solves the problem of resource waste or shortage caused by static configuration in traditional resource allocation, ensuring that the deployed application can obtain resources matching its actual needs. Second, by utilizing historical load data and dynamically considering the maximum load of the system, it can adapt to the load changes of the SCU, improve the resource utilization rate of the SCU and ensure the stability of the system.
[0060] The application constructs a directed acyclic graph based on micro application description information and generates component loading sequence, effectively solving the component dependency and version compatibility problem in micro application deployment. First, by analyzing the dependency relationship and performing topological sorting, it ensures the correct order of component loading and avoids service abnormalities caused by improper loading sequence. Second, it solves the version conflict between components through version conflict probability calculation and compatible version replacement mechanism, improving the success rate of component deployment.
[0061] The application creates a container for the micro application to be deployed and configures the container based on the loading sequence and resource quota, realizes environment isolation and accurate resource control. First, through the creation and parameter configuration of the Docker container, the independence and consistency of the micro application running environment are ensured, and environment conflicts are avoided. Secondly, the dependent components are deployed according to the component loading sequence, which ensures the integrity and stability of service startup and avoids service abnormalities caused by missing components or incorrect loading sequence. Finally, through network isolation and storage volume configuration, the security of the container is enhanced. BRIEF DESCRIPTION OF DRAWINGS
[0062] In order to make the purpose, technical scheme and advantages of the application clearer, the application will be further described in detail below in combination with the drawings, in which:
[0063] Figure 1 The logical block diagram of the SCU containerized micro application dynamic deployment method of the intelligent fusion terminal. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical scheme and advantages of the application clearer, the application will be further described in detail below in combination with the drawings, in which:
[0065] The application will be further described in detail below through specific embodiments:
[0066] Embodiment:
[0067] An SCU containerized micro application dynamic deployment method of an intelligent fusion terminal is disclosed in this embodiment.
[0068] As shown in the figure, the SCU containerized micro application dynamic deployment method of the intelligent fusion terminal comprises: Figure 1
[0069] S1: Obtain the deployment request of the micro application to be deployed, and convert the deployment request into structured micro application description information;
[0070] S2: Calculate the resource quota of the micro application to be deployed based on the micro application description information combined with the real-time state of the SCU of the intelligent fusion terminal;
[0071] S3: Extract corresponding components from the preset component library based on the micro application description information to construct a directed acyclic graph, and generate a component loading order of the to-be-deployed micro application based on the directed acyclic graph;
[0072] S4: Create a container for the to-be-deployed micro application, and configure the container based on the component loading order and resource quota of the to-be-deployed micro application, to obtain a deployed micro application;
[0073] S5: Start the deployed micro application, and perform an automated health check (a successful response confirms that the service is ready), to generate a micro application service state.
[0074] The application converts the deployment request of the micro application into a standardized description, dynamically calculates the resource quota based on the real-time state of the SCU, constructs a dependency graph and generates a loading order, and finally completes containerized deployment and health check. The overall method effectively solves the problems of chaotic dependency management, unreasonable resource allocation, and low deployment success rate in traditional micro application deployment, and reduces the need for manual intervention, improves deployment efficiency and system stability. At the same time, the dynamic resource calculation mechanism ensures the rational use of system resources, avoids resource waste and system overload risk, and provides reliable protection for the collaborative operation of multiple micro applications of the intelligent fusion terminal SCU.
[0075] In the specific implementation process, step S1 includes the following steps:
[0076] S101: The deployment request of the to-be-deployed micro application includes a micro application package, an application ID, a version number, resource requirements, and a list of dependent components;
[0077] For example, the to-be-deployed micro application is a "real-time electricity price calculation" function, and the deployment request includes: the application ID is MKT-001, the version number is v2.3, the CPU requirement is 500 MHz, the memory requirement is 128 MB, and the dependent components include an authentication service and a data parser.
[0078] S102: Check the integrity, compliance and security of the micro application package, and the uniqueness of the application ID, the format of the version number, and the authenticity of each dependent component in the list of dependent components; if all checks are passed, step S103 is executed, otherwise the micro application deployment is ended;
[0079] In this embodiment, checking the integrity, compliance and security of the micro application package means calculating the SHA-256 checksum of the micro application package and comparing it with the digest submitted by the user; decompressing the micro application package to verify whether it contains the required files; scanning the package content using the pre-installed lightweight security rule library. Checking the uniqueness of the application ID means querying the system application registry to confirm that the application ID (such as MKT-001) corresponding to the "real-time electricity price calculation" is not occupied. Checking the format of the version number means verifying whether the version number v2.3 conforms to the semantic versioning specification (major version.minor version.patch number) to exclude invalid formats (such as v2.3.1). Checking the existence of dependent components means verifying whether the authentication service and data parser are in the pre-installed component library (a list of components pre-maintained by the system).
[0080] S103: Unit conversion of resource requirements to obtain standardized resource requirements, including CPU requirements and memory requirements;
[0081] For example: convert the CPU requirement from 500 MHz to an integer unit (such as 500) recognizable by the system kernel, and convert the memory requirement from 128 MB to an integer unit (such as 128).
[0082] S104: Extract the base weight of each dependent component from the pre-installed component library and calculate the average base weight of all dependent components;
[0083] For example: the base weight of the authentication service is 1.2 (obtained based on historical load test data, reflecting its average CPU consumption characteristics); the base weight of the data parser is 0.8 (obtained based on historical load test data, reflecting its average memory consumption characteristics); the average base weight is 1.0.
[0084] S105: The micro application to be deployed passes the micro application package, application ID, version number, dependent component list, and standardized resource requirements and average base weight of all dependent components as its structured micro application description information.
[0085] For example: a structured micro application description information is: application ID: MKT-001, version number: v2.3, CPU requirement: 500, memory requirement: 128, dependent component list: authentication service, data parser, average base weight: 1.5.
[0086] The application converts the deployment request into structured micro-application description information, and ensures the accuracy and reliability of the deployment request through integrity, compliance, security check and standardized processing. Firstly, the risk of deployment failure caused by non-standard request format and unclear component dependency in traditional deployment is solved, and the success rate of SCU micro-application deployment is improved. Secondly, application ID uniqueness check and version number format verification are performed to avoid application conflict and version confusion, and the standardization of system application management is ensured. Finally, the generation of structured description information provides accurate input for subsequent resource calculation and dependency processing, making the entire deployment process more rigorous and traceable, and significantly improving the automation level and overall reliability of micro-application deployment.
[0087] In the implementation process, step S2 includes the following steps:
[0088] S201: Obtain the real-time state of the intelligent fusion terminal SCU, which includes the total available CPU, the total available memory and the current active micro-application list of the SCU;
[0089] In this embodiment, reading the current system state from the kernel monitoring module includes: 1) total available CPU: the current idle CPU computing power of the system (unit: MHz, for example, 2500 MHz); 2) total available memory: the current idle memory capacity of the system (unit: MB, for example, 512 MB); 3) active micro-application list: the list of micro-application IDs currently running (for example, [MKT-001, DISTR-002]).
[0090] S202: Calculate the dynamic weight value of the micro-application to be deployed based on the average basic weight of the micro-application to be deployed and the historical data of the SCU;
[0091] The formula is:
[0092] ;
[0093] In the formula: represents the dynamic weight value of the micro-application to be deployed; represents the average basic weight of the micro-application to be deployed; represents the historical average load of the same type of micro-application in the SCU as the micro-application to be deployed, that is, the average CPU load (such as 200 MHz) of the same type of micro-application in the historical running, which is extracted by the log analysis module of the SCU; represents the maximum load of the SCU, that is, the historical highest CPU load (such as 2000 MHz) of the SCU, which is dynamically recorded by the kernel monitoring module;
[0094] S203: Calculate the dynamic weight value of all existing micro-applications in the current active micro-application list;
[0095] The formula is expressed as:
[0096] ;
[0097] In the formula: represents the dynamic weight value of the existing micro application; represents the historical average load of the existing micro application; represents the maximum load of the SCU;
[0098] S204: Accumulate the dynamic weight value of the micro application to be deployed and the dynamic weight values of all existing micro applications to obtain a dynamic weight sum, and divide the dynamic weight value of the micro application to be deployed by the dynamic weight sum to obtain the resource allocation proportion of the micro application to be deployed;
[0099] For example, if the dynamic weight value of the micro application to be deployed is 0.8 and the dynamic weight sum is 2.0, then the resource allocation proportion of the micro application to be deployed = 0.8 / 2.0 = 0.4;
[0100] S205: Multiply the resource allocation proportion of the micro application to be deployed by the total available CPU and the total available memory of the SCU, respectively, to obtain the CPU allocation amount and the memory allocation amount of the micro application to be deployed as its resource quota.
[0101] For example, if the resource allocation proportion of the micro application to be deployed is 0.4, the total available CPU of the SCU is 2500 MHz, and the total available memory of the SCU is 512 MB, then the CPU allocation amount of the micro application to be deployed = 0.4*2500 = 1000 MHz, and the memory allocation amount = 0.4*512 = 204.8 MB (rounded to 204 MB).
[0102] Specifically, based on the CPU allocation amount and the memory allocation amount of the micro application to be deployed and its CPU demand and memory demand, the following judgments are made:
[0103] If the CPU allocation amount of the micro application to be deployed is less than 80% of its CPU demand, the deployment is terminated;
[0104] If the CPU allocation amount of the micro application to be deployed is greater than or equal to 80% of its CPU demand and the memory allocation amount is less than 80% of its memory demand, memory degradation deployment is performed, that is, the CPU guarantees the core function and the memory is moderately adjusted;
[0105] If the CPU allocation amount of the micro application to be deployed is greater than or equal to 80% of its CPU demand and the memory allocation amount is greater than or equal to 80% of its memory demand, the deployment is performed based on the CPU allocation amount and the memory allocation amount.
[0106] The application is based on micro-application description information combined with real-time state calculation of SCU resource quota, realizes intelligent optimization configuration of resources through dynamic weight calculation and resource proportion allocation. First, the problem of resource waste or shortage caused by static configuration in traditional resource allocation is solved, and it is ensured that the deployed application can obtain resources matching its actual demand. Secondly, through the use of historical load data and dynamic consideration of the maximum load of the system, the load change of the SCU can be adapted, the resource utilization rate of the SCU can be improved, and the system stability can be guaranteed.
[0107] In the implementation process, step S3 includes the following steps:
[0108] S301: Based on the dependency component list of the micro application to be deployed, the default compatible version of each dependency component is extracted from the pre-set component library (component version database maintained by the system in advance) to generate a mapping list of dependency components-version numbers;
[0109] For example: the default compatible version of the authentication service is v1.2, and the default compatible version of the data parser is v0.8. If there is no default version in the component library, the system automatically uses the latest stable version (such as "authentication service-v2.0"), and records the log.
[0110] S302: Obtain the pre-dependent components and their current versions of each dependent component from the pre-set component library;
[0111] For example: the pre-dependent component of authentication service-v1.2 is database driver-v3.0, and the pre-dependent component of data parser-v0.8 is JSON parsing library-v1.5.
[0112] S303: All dependent components and pre-dependent components are taken as nodes, and the dependency relationship between nodes is taken as edges to construct a directed acyclic graph (DAG) as a dependency graph, which includes a node list and an edge list;
[0113] S304: The components in the dependency graph are version corrected to obtain a corrected dependency graph;
[0114] S305: The Kahn algorithm is used to topologically sort the corrected dependency graph to generate a component loading order (for example: database driver-v3.1, JSON parsing library-v1.5, authentication service-v1.2, data parser-v0.8).
[0115] Specifically, the processing logic of Kahn algorithm (topological sorting based on in-degree) includes:
[0116] 1) Calculate the in-degree (number of dependent items) of all nodes;
[0117] 2) Add nodes with in-degree = 0 (no pre-dependency) to the queue;
[0118] 3) Remove nodes one by one, update the in-degree of adjacent nodes, and repeat until the queue is empty.
[0119] Generate loading order:
[0120] Database driver-v3.1 in the atlas has in-degree = 0, i.e., load first;
[0121] Authentication service-v1.2 depends on database driver-v3.1, in-degree = 1, load order after the latter.
[0122] Specifically, the processing steps for version correction of the dependency graph include:
[0123] S3041: Take two components with dependency relationship in the dependency graph as a dependency pair (such as authentication service-v1.2 and database driver-v3.0);
[0124] S3042: Calculate the version conflict probability of the two components in each dependency pair to generate a conflict probability matrix;
[0125] The formula for calculating the version conflict probability is:
[0126]
[0127] In the formula: represents the version conflict probability of the two components in the dependency pair; represents the Sigmoid function, which is used to map the result to the range of 0~1; represents the pre-trained weight matrix (stored locally on the terminal, trained based on historical conflict data, such as a 100x100 matrix); represents the feature vector after concatenation of the two components in the dependency pair, where the feature vector of a component includes version number, CPU consumption, and memory consumption. For example: dependency pair = (authentication service-v1.2, database driver-v3.0), extract the feature vector of each component from the preset component library: the feature vector of authentication service-v1.2 = [version number, CPU consumption, memory consumption] = [1.2, 1.5, 0.8]; the feature vector of database driver-v3.0 = [version number, CPU consumption, memory consumption] = [3.0, 2.0, 1.2], then the concatenated feature vector .
[0128] S3043: For the dependency pair in the conflict probability matrix with conflict probability greater than the conflict preset value (set to 0.6), find the compatible version of the corresponding component from the preset component library (for example, the compatible version of database driver is v3.1);
[0129] S3044: Replace the current version of the corresponding component in the dependency graph with the compatible version of the component (e.g., replace database driver-v3.0 with database driver-v3.1), and generate a revised dependency graph (containing the replaced version).
[0130] The application constructs a directed acyclic graph based on micro application description information and generates a component loading sequence, effectively solving the component dependency and version compatibility problems in micro application deployment. First, by analyzing the dependency relationship and performing topological sorting, the correct order of component loading is ensured, and service abnormalities caused by improper loading order are avoided. Second, version conflict probability calculation and compatible version replacement mechanism are used to solve the version conflict between components, improving the success rate of component deployment.
[0131] In the specific implementation process, step S4 includes the following steps:
[0132] S401: Create a Docker container on the SCU, set the kernel parameters of the Docker container based on the CPU allocation and memory allocation of the micro application to be deployed, and initialize the network isolation (create a dedicated bridge network) and storage volume (mount the log directory) of the Docker container, to obtain an initialized container environment (e.g., container ID: c7a8b9d, status: network / storage initialization completed);
[0133] S402: In the initialized container environment, deploy the dependent components and pre-dependent components one by one according to the component loading sequence of the micro application to be deployed, and generate a list of deployed dependent components (containing the deployment status of each component);
[0134] For the deployed dependent components and pre-dependent components, the deployment system starts their service processes and verifies the health status (e.g., whether the process state is normal, whether the key interface is reachable); if the dependent component or pre-dependent component fails to deploy, the deployed components are immediately rolled back and the environment is cleaned up to ensure a clean container state.
[0135] S403: Decompress the micro application package of the micro application to be deployed and deploy it to the specified directory of the Docker container, and configure the environment variables to match the request description, to obtain the deployed micro application.
[0136] After obtaining the deployed micro application, start the micro application service process and perform automated health checks (e.g., send test requests to verify service responses); if the health check fails, the deployment system automatically retries to start; if it fails multiple times, terminate the deployment; if it is successfully started, the deployment system records the service availability status (e.g., response time, success rate) of the deployed micro application.
[0137] In the implementation process, in step S5, it is judged whether hot update (such as version upgrade) is needed based on the micro application service state: if it is the first deployment, hot update is skipped; if hot update is needed, a seamless switching mechanism is executed: the old version is kept to process the current request when the new version is loaded, and the new version is automatically switched to after the request is completed, so that service zero interruption is ensured.
[0138] The application creates a container for the micro application to be deployed and configures the container based on the loading sequence and resource quota, so that environment isolation and accurate resource control are realized. First, the independence and consistency of the micro application running environment are ensured through the creation and parameter configuration of the Docker container, and environment conflicts are avoided. Second, dependent components are deployed according to the component loading sequence, so that the integrity and stability of service startup are ensured, and service abnormalities caused by missing components or incorrect loading sequence are avoided. Finally, the security of the container is enhanced through network isolation and storage volume configuration.
[0139] Finally, it should be noted that the above examples are only used to illustrate the technical solutions of the present application and not to limit the technical solutions. Those of ordinary skill in the art should understand that modifications or equivalent replacements to the technical solutions of the present application without departing from the purpose and scope of the technical solutions should be covered in the scope of the claims of the present application.
Claims
1. A method for dynamically deploying containerized micro-applications in an intelligent converged terminal's SCU, characterized in that, include: S1: Obtain the deployment request of the micro-application to be deployed, and convert the deployment request into structured micro-application description information; S2: Calculate the resource quota for the micro-application to be deployed based on the micro-application description information and the real-time status of the intelligent fusion terminal SCU. S3: Extract corresponding components from the pre-built component library based on the micro-application description information to construct a directed acyclic graph, and generate the component loading order of the micro-application to be deployed based on the directed acyclic graph; Step S3 specifically includes the following steps: S301: Based on the list of dependent components of the micro-application to be deployed, extract the current version of each dependent component from the pre-built component library; S302: Retrieve the prerequisite dependent components and their current versions for each dependent component from the pre-built component library; S303: Construct a directed acyclic graph (DAG) as a dependency graph, using all dependent components and their predecessors as nodes and the dependencies between nodes as edges. S304: Modify the versions of the components in the dependency graph to obtain the modified dependency graph; S305: Perform topological sorting on the corrected dependency graph to generate the component loading order; S4: Create a container for the micro-application to be deployed, and configure the container based on the component loading order and resource quota of the micro-application to be deployed, so as to obtain the deployed micro-application; Step S4 specifically includes the following steps: S401: Create a Docker container on the SCU, set the kernel parameters of the Docker container based on the CPU and memory allocation of the micro-application to be deployed, and initialize the network isolation and storage volume of the Docker container to obtain the initialized container environment. S402: In the initialized container environment, deploy the dependent components and the preceding dependent components one by one according to the component loading order of the micro-application to be deployed; S403: Unzip the micro-application package to be deployed and deploy it to the specified directory of the Docker container, and configure environment variables to match the request description to obtain the deployed micro-application; S5: Launch the deployed micro-application and perform automated health checks to generate the micro-application service status.
2. The method for dynamic deployment of SCU containerized micro-applications in an intelligent converged terminal as described in claim 1, characterized in that: Step S1 specifically includes the following steps: S101: The deployment request of the micro-application to be deployed includes the micro-application package, application ID, version number, resource requirements, and list of dependent components; S102: Check the integrity, compliance, and security of the micro-application package, as well as the uniqueness of the application ID, the format of the version number, and the authenticity of each dependent component in the dependent component list; if all checks are passed, proceed to step S103; otherwise, end the micro-application deployment. S103: Convert the resource requirements to units to obtain standardized resource requirements, which include CPU requirements and memory requirements; S104: Extract the base weights of each dependent component from the prefabricated component library and calculate the average base weight of all dependent components; S105: The micro-application to be deployed is described using the inspected micro-application package, application ID, version number, list of dependent components, standardized resource requirements, and average base weight of all dependent components as its structured micro-application description information.
3. The method for dynamic deployment of SCU containerized micro-applications in an intelligent converged terminal as described in claim 2, characterized in that: Step S2 specifically includes the following steps: S201: Obtain the real-time status of the intelligent converged terminal SCU, which includes the total available CPU, total available memory, and list of currently active micro-applications of the SCU. S202: Calculate the dynamic weight value of the micro-application to be deployed based on the average base weight of the micro-application to be deployed and the historical data of the SCU; The formula is expressed as: ; In the formula: This represents the dynamic weight value of the micro-application to be deployed; This represents the average base weight of the micro-application to be deployed; This represents the historical average load of micro-applications of the same type as the micro-application to be deployed in the SCU; Indicates the maximum load of the SCU; S203: Calculate the dynamic weight values of all existing micro-applications in the current active micro-application list; The formula is expressed as: ; In the formula: This represents the dynamic weight value of an existing micro-application; This represents the historical average load of existing micro-applications. Indicates the maximum load of the SCU; S204: The dynamic weight value of the micro-application to be deployed is summed with the dynamic weight values of all existing micro-applications to obtain the total dynamic weight. The resource allocation ratio of the micro-application to be deployed is obtained by dividing the dynamic weight value of the micro-application to be deployed by the total dynamic weight. S205: The resource quota of the micro-application to be deployed is obtained by multiplying the resource allocation ratio of the micro-application to be deployed by the total available CPU and total available memory of the SCU.
4. The method for dynamic deployment of SCU containerized micro-applications in an intelligent converged terminal as described in claim 3, characterized in that: In step S205, based on the CPU and memory allocation of the micro-application to be deployed, as well as its CPU and memory requirements, the following judgments are made: If the CPU allocation for the micro-application to be deployed is less than 80% of its CPU requirement, the deployment will be terminated. If the CPU allocation of the micro-application to be deployed is greater than or equal to 80% of its CPU requirement and the memory allocation is less than 80% of its memory requirement, then a memory degradation deployment will be performed. If the CPU allocation for the micro-application to be deployed is greater than or equal to 80% of its CPU requirement and the memory allocation is greater than or equal to 80% of its memory requirement, then the deployment will be performed based on the CPU allocation and memory allocation.
5. The method for dynamic deployment of SCU containerized micro-applications in an intelligent converged terminal as described in claim 1, characterized in that: Step S304, the process of version correction for the dependency graph includes: S3041: Treat two components with a dependency relationship in the dependency graph as a single dependency pair; S3042: Calculate the version conflict probability of the two components in each dependency pair and generate a conflict probability matrix; The formula for calculating the probability of version conflicts is as follows: ; In the formula: This indicates the probability of version conflict between the two components in the dependency pair; Represents the Sigmoid function; This represents the pre-trained weight matrix; This represents the feature vector concatenated from the two components in the dependency pair. The feature vector of each component includes its version number, CPU consumption, and memory consumption. S3043: For dependency pairs in the conflict probability matrix whose conflict probability is greater than the default conflict value, search for the compatible version of the corresponding component in the preset component library; S3044: Replace the current version of the corresponding component in the dependency graph with a compatible version of the component to generate a corrected dependency graph.
6. The method for dynamic deployment of SCU containerized micro-applications in an intelligent converged terminal as described in claim 1, characterized in that: In step S402, for the deployed dependent components and pre-dependent components, the deployment system starts their service processes and verifies their health status; if the deployment of a dependent component or pre-dependent component fails, the deployed components are immediately rolled back and the environment is cleaned up.
7. The method for dynamic deployment of SCU containerized micro-applications in an intelligent converged terminal as described in claim 1, characterized in that: In step S403, after obtaining the deployed micro-application, the micro-application service process is started; if it fails multiple times, the deployment is terminated; if it starts successfully, the deployment system records the service availability status of the deployed micro-application.
Citation Information
Patent Citations
AI model automatic deployment platform based on containerization technology
CN120743426A
Enterprise-level application-oriented security deployment method, equipment and medium
CN121193468A