Containerized application method and device of home host, electronic equipment and storage medium

By containerizing the functional modules of the home gateway and dynamically adjusting the container orchestration tool, the problem of poor scalability and maintenance of the home host is solved, and flexible expansion and efficient system management are achieved.

CN120358106APending Publication Date: 2025-07-22GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510328147.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

The existing home hosts use fixed hardware and software architectures, which are difficult to adapt to rapidly changing needs and technical updates, and are poor in scalability and maintenance.

Method used

Containerize the functional modules of the home gateway, build a containerized environment, and dynamically adjust it when an update event is detected through the container orchestration tool.

Benefits of technology

It realizes dynamic scalability and maintenance of the home host, can be adjusted according to different scenarios, and supports automated testing, load management and fault handling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358106A_ABST
    Figure CN120358106A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a containerization application method and device of a home host, electronic equipment and a storage medium, and the method comprises the steps: carrying out containerization on one or more functional modules of a home gateway to construct a containerization environment of the home host, and enabling each functional module to run in an independent container; and when an update event used for triggering update of the home host is detected, adjusting the containerization environment of the home host according to the update event by adopting a preset container arrangement tool. Through the embodiment of the invention, the containerization of the home gateway is realized, so that compared with the existing fixed hardware and software architecture, the containerized home host in the embodiment of the invention can be dynamically adjusted according to different scenes, and the method has the advantages of high expansibility and good maintainability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of smart home, and particularly to a containerized application method and device for a home host, an electronic device, and a storage medium. Background Art

[0002] With the rapid development of smart home technology, the types and quantities of home smart devices are increasing continuously. How to efficiently manage and control these devices has become an important issue. Existing home hosts usually adopt a fixed hardware and software architecture, which is difficult to adapt to the rapidly changing requirements and technological updates, and has poor scalability and maintainability. Summary of the Invention

[0003] In view of the above problems, a containerized application method and device for a home host, an electronic device, and a storage medium are proposed to overcome the above problems or at least partially solve the above problems, including:

[0004] A containerized application method for a home host, the method including:

[0005] Containerize one or more functional modules of a home gateway to build a containerized environment for the home host, and each functional module runs in an independent container;

[0006] When detecting an update event for triggering an update to the home host, use a preset container orchestration tool to adjust the containerized environment of the home host according to the update event.

[0007] Optionally, the update event is an event of submitting test code. When detecting an update event for triggering an update to the home host, using a preset container orchestration tool to adjust the containerized environment of the home host according to the update event includes:

[0008] After detecting the time of submitting test code, package the test code into a container image;

[0009] Perform tests on the test code in a preset test environment;

[0010] When the test of the test code is successful, use the preset container orchestration tool to upgrade the containerized environment of the home host according to the container image.

[0011] Optionally, the update event is a load fluctuation event of the home host. When detecting an update event for triggering an update to the home host, using a preset container orchestration tool to adjust the containerized environment of the home host according to the update event includes:

[0012] Obtain the load information of the home host;

[0013] Determine whether to trigger a load fluctuation event according to the load information;

[0014] When it is determined that a load fluctuation event is triggered, adjust the container instances of the home host based on the load information by using a preset container orchestration tool.

[0015] Optionally, when it is determined that a load fluctuation event is triggered, adjusting the containerized instances of the home host based on the load information by using a preset container orchestration tool includes:

[0016] When it is determined that a load fluctuation event is triggered, when it is determined according to the load information that the load of the home host increases, increase the container instances of the home host by using a preset container orchestration tool according to the load information.

[0017] Optionally, when it is determined that a load fluctuation event is triggered, adjusting the containerized instances of the home host based on the load information by using a preset container orchestration tool includes:

[0018] When it is determined that a load fluctuation event is triggered, when it is determined according to the load information that the load of the home host decreases, reduce the container instances of the home host by using a preset container orchestration tool according to the load information.

[0019] Optionally, the update event is an event of detecting a faulty container node. When an update event for triggering an update of the home host is detected, adjusting the containerized environment of the home host by using a preset container orchestration tool according to the update event includes:

[0020] When a faulty container node exists in the containerized environment of the home host is detected, handle the faulty container node in the containerized environment of the home host by using a preset container orchestration tool.

[0021] Optionally, the update event is a start event of a scheduling policy. When an update event for triggering an update of the home host is detected, adjusting the containerized environment of the home host by using a preset container orchestration tool according to the update event includes:

[0022] When a start event of a scheduling policy is detected, obtain the container node information in the containerized environment;

[0023] Use a preset container orchestration tool to execute a preset scheduling policy according to the container node information.

[0024] Optionally, using a preset container orchestration tool to execute a preset scheduling policy according to the container node information includes:

[0025] Determine the container nodes to be filtered according to the container node information;

[0026] Use the preset container orchestration tool to filter the container nodes to be filtered in the containerized environment;

[0027] Sort the remaining container nodes in the containerized environment according to the container node information;

[0028] Use the preset container orchestration tool to adjust the containerized environment of the home host based on the node sorting information.

[0029] Optionally, the update event is an event of detecting a faulty container. When detecting an update event for triggering an update of the home host, using the preset container orchestration tool to adjust the containerized environment of the home host according to the update event includes:

[0030] When detecting that the container status of the target container in the containerized environment is a faulty state, use the preset container orchestration tool to restart the target container.

[0031] A containerized application device for a home host, the device includes:

[0032] A containerization processing module, configured to containerize one or more functional modules of a home gateway to build a containerized environment of the home host, and each functional module runs in an independent container;

[0033] A container adjustment module, configured to, when detecting an update event for triggering an update of the home host, use a preset container orchestration tool to adjust the containerized environment of the home host according to the update event.

[0034] An electronic device, including a processor, a memory, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the containerized application method of the home host as described above.

[0035] A computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the containerized application method of the home host as described above.

[0036] The embodiments of the present invention have the following advantages:

[0037] In an embodiment of the present invention, one or more functional modules of a home gateway are containerized to build a containerized environment for a home host, and each functional module runs in an independent container; when an update event for triggering an update of the home host is detected, a preset container orchestration tool is used to adjust the containerized environment of the home host according to the update event. Thus, compared with the existing fixed hardware and software architectures, the containerized home host in the embodiment of the present invention can be dynamically adjusted according to different scenarios, and has the advantages of high scalability and good maintainability. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] To more clearly illustrate the technical solutions of the present invention, the drawings required for the description of the present invention will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.

[0039] Figure 1 is a flowchart of steps of a method for containerized application of a home host provided by an embodiment of the present invention;

[0040] Figure 2a is a flowchart of steps of another method for containerized application of a home host provided by an embodiment of the present invention;

[0041] Figure 2b is a schematic diagram of a code upgrade process of a home host provided by an embodiment of the present invention;

[0042] Figure 3 is a flowchart of steps of another method for containerized application of a home host provided by an embodiment of the present invention;

[0043] Figure 4 is a flowchart of steps of another method for containerized application of a home host provided by an embodiment of the present invention;

[0044] Figure 5 is a flowchart of steps of another method for containerized application of a home host provided by an embodiment of the present invention;

[0045] Figure 6 is a flowchart of steps of another method for containerized application of a home host provided by an embodiment of the present invention;

[0046] Figure 7 is a schematic diagram of a containerized architecture provided by an embodiment of the present invention;

[0047] Figure 8 is a schematic diagram of the structure of a containerized application device for a home host provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] To make the above objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.

[0049] Referring to Figure 1 , a flowchart of the steps of a method for containerizing applications of a home host provided by an embodiment of the present invention is shown, which may specifically include the following steps:

[0050] Step S101, containerize one or more functional modules of the home gateway to build a containerized environment for the home host, and each functional module runs in an independent container;

[0051] In the embodiment of the present invention, one or more fixed functional modules in the home gateway can be containerized through containerization technology, so that the corresponding functional modules after containerization can build a containerized environment for the home host. For example, the device management module of the home intelligent gateway can be converted into a device management container through containerization technology, the data processing module can be converted into a data processing container through containerization technology, the control instruction module can be converted into a control instruction container through containerization technology, and the management and scheduling module can be converted into a management and scheduling container through containerization technology.

[0052] In practical applications, containerization technology is a technology that packages an application program and its dependencies together, enabling them to run consistently in any environment. The core idea of containerization technology is to decouple the application program from the underlying infrastructure in an isolated and lightweight manner, thereby improving the efficiency of development, testing, and deployment. Containerization technology has advantages such as consistency, lightweight, portability, isolation, high efficiency, and rich ecosystem.

[0053] In containerization technology, a container is an important component. A container is a lightweight and portable unit that contains application code, runtime, system tools, libraries, and configuration files. The container shares the operating system kernel with the host, but realizes an independent running environment through isolation mechanisms (such as namespaces and control groups). Thus, after containerizing the fixed functional modules, on the one hand, container technology is more lightweight than traditional virtualization technology, can utilize system resources more efficiently, improve the performance and response speed of the system, and achieve efficient resource utilization; on the other hand, through containerization and modular design, it is convenient to add new functional modules and device support to meet the diverse needs of the home intelligent gateway, thereby realizing flexible scalability.

[0054] In the embodiments of the present invention, by containerizing various functional modules, the mutual influence between the functional modules can also be avoided.

[0055] Step S102, when detecting an update event for triggering the update of the home host, use a preset container orchestration tool to adjust the containerized environment of the home host according to the update event.

[0056] After establishing the containerized environment of the home host, an update event for triggering the update of the home host can be preset in the containerized environment. During the operation of the home host, the current containerized environment can be monitored. When an update event is detected, the container orchestration tool can be called to dynamically adjust the containerized environment of the home host.

[0057] In the embodiments of the present invention, the update event and the logic of dynamic adjustment can be set according to the actual scenario. In one example, the update event can be any one or more of the following events:

[0058] (1) An event of submitting test code; when the home host needs to be upgraded, new test code needs to be submitted. Thus, the event of submitting test code can be set as the update event to trigger the dynamic update of the home node.

[0059] (2) A load fluctuation event of the home host; when the home host is in a load fluctuation state, it is easy to cause the home host to be overloaded or have redundant load. At this time, the container instances of the home host can be dynamically adjusted so that the container instances are in an adapted state with the current load.

[0060] (3) An event of detecting a faulty container node; when there is a faulty container node, to avoid problems with the processing mechanism, the container node can be automatically cleared.

[0061] (4) A start event of the scheduling policy; when the scheduling policy is enabled, screening can be performed on the home host according to a preset logic, and the home host can be automatically optimized.

[0062] (5) An event of detecting a faulty container.

[0063] In the embodiments of the present invention, the preset container orchestration tool can be used to manage the deployment, expansion, and operation and maintenance of multiple containers. For example, the orchestration tool can be any one of tools such as k3s - lightweight Kubernetes, Containerd, etc.

[0064] In the containerized home host, the container orchestration tool has but is not limited to the following functions:

[0065] (1) Cluster management function: The cluster management function can be specifically divided into node management and resource management. Among them, node management: The container orchestration tool can manage a group of one or more physical or virtual machines, and these nodes run containers (programs run in containers). The orchestration tool monitors the health status of the nodes and automatically processes faulty nodes. Resource management: Define resource requirements and limits for resource management. Among them, resources can include but are not limited to resources such as CPU and memory.

[0066] (2) Container definition and deployment:

[0067] Containers are encapsulated in pods, and the operation and maintenance personnel define the configuration of the pods, including the required container images, environment variables, mounted volumes, network environment, etc.

[0068] The orchestration tool ensures communication between containers, customizes the specifications of containers, that is, the number of replicas, and the orchestration tool automatically configures the load balancer.

[0069] (3) Scheduling strategy: The scheduling strategy can consider the usage of nodes, load balancing, and setting of custom affinity and anti-affinity rules. In the embodiments of the present invention, node adjustment can be performed according to filtering rules and priority rules. Specifically, the scheduler first filters out inappropriate nodes, and then sorts the appropriate nodes according to the preset priorities, so as to select the most suitable node. If only one node is involved in this solution, the scheduling strategy is mainly to avoid system crashes caused by node overload after a new program is deployed. With this scheduling strategy, if the resources are not sufficient to run the program to be deployed, the deployment cannot be completed.

[0070] (4) Scaling and expansion: When the traffic increases and the current number of replicas cannot complete the work, the number of replicas is automatically increased, or the number of replicas can also be manually managed.

[0071] (5) Health check and self-healing ability: The container orchestration tool can monitor the status of each container to ensure that the containers are running normally. When a container fails (that is, the internal program cannot run normally), the container will be automatically restarted, but for faulty nodes, the nodes will not be restarted, and the operation of other containers will not be affected.

[0072] (6) Network and storage management: Create a virtual network, assign IP addresses; support dynamic creation of storage volumes (mounted by containers) to ensure the persistence of container data.

[0073] In the embodiments of the present invention, a container orchestration tool is used to implement the dynamic scheduling and management of containers, ensuring the high availability and disaster tolerance of the system.

[0074] In an embodiment of the present invention, a solution for integrating a home host program based on container technology is provided. By using container technology, traditional embedded systems can have the advantages of batch continuous integration, high availability, scalability, and support for third-party ecological chains.

[0075] In an embodiment of the present invention, one or more functional modules of a home gateway are containerized to build a containerized environment for the home host, and each functional module runs in an independent container; when an update event for triggering an update of the home host is detected, a preset container orchestration tool is used to adjust the containerized environment of the home host according to the update event. Thus, compared with the existing fixed hardware and software architectures, the containerized home host in the embodiment of the present invention can be dynamically adjusted according to different scenarios, and has the advantages of high scalability and good maintainability.

[0076] Referring to Figure 2a , a step flowchart of another method for containerizing a home host provided by an embodiment of the present invention is shown, which may specifically include the following steps:

[0077] Step S201: Containerize one or more functional modules of a home gateway to build a containerized environment for the home host, and each functional module runs in an independent container;

[0078] In an embodiment of the present invention, one or more fixed functional modules in a home gateway can be containerized through container technology, so that the corresponding functional modules after containerization can build a containerized environment for the home host. For example, the device management module of a home intelligent gateway can be converted into a device management container through container technology, the data processing module can be converted into a data processing container through container technology, the control instruction module can be converted into a control instruction container through container technology, and the management and scheduling module can be converted into a management and scheduling container through container technology.

[0079] Step S202: After detecting the time when the test code is submitted, package the test code into a container image;

[0080] In practical applications, after developers complete the development of a home host, they can obtain test code. When developers submit the test code, it can trigger the build process, and then the test code can be packaged into a container image.

[0081] Step S203: Perform tests in a preset test environment according to the test code;

[0082] Furthermore, the test code can be deployed to a specific test environment to perform automated tests.

[0083] Step S204, when the test of the test code is successful, use the preset container orchestration tool to upgrade the containerized environment of the home host according to the container image.

[0084] After the automated test ends, the automated test result can be obtained. Then, when the test result of the test code is successful, the container orchestration tool can be called to deploy the container image to the containerized environment of the actual home host to achieve the automated upgrade of the home host.

[0085] In one example, the automatic building and deployment of the code can be implemented based on a continuous integration tool, where the continuous integration tool can be, but is not limited to, any one or more of tools such as Jenkins, GitLab CI / CD, etc.

[0086] Refer to Figure 2b shows a schematic diagram of the code upgrade process of a home host in an embodiment of the present invention. In this flowchart, developers can submit the test code for upgrade to the gitLab code repository, and at the same time send a deployment release instruction to Jenkins. Jenkins can pull the latest test code from the gitLab code repository, package the test code and push it to the cloud image repository. After the test of the test code is successful, Jenkins can send an upgrade deployment instruction to the home host through mqtt, and the home host can pull the image from the cloud image repository and run the container. Thus, the automatic OTA upgrade of the home host is achieved.

[0087] In the embodiment of the present invention, through the containerized design, new functional modules can be conveniently added, such as adding support for new devices, adding new control logics, etc. It supports third-party developers to perform function extension and integration through the API interface to achieve an open ecosystem.

[0088] In an embodiment of the present invention, the home host can also support batch upgrade and single upgrade. Specifically, the channel between Jenkins and mqtt can be opened to achieve automated batch integration and module upgrade. For example, the kubectl instruction can be sent through mqtt to achieve high-speed batch integration of multiple devices. Specifically, a long connection is established with the server through mqtt for communication, and the server provides an api interface for Jenkins to send deployment commands, and the home host executes after receiving the instruction.

[0089] Among them, the way to establish a connection between Jenkins and MQTT is as follows: through shell scripts and self-written programs, the shell commands that Jenkins needs to execute can be specified through the Jenkinsfile. By executing shell commands through the Jenkinsfile, an API request is sent and the container image is uploaded to the cloud. After receiving the API request, the cloud broadcasts a notification through MQTT for the home host to perform an upgrade. Then, the container orchestration tool in the home host pulls the image from the cloud for deployment and operation and sends the operation result to the cloud.

[0090] In the embodiment of the present invention, a continuous integration tool is used to achieve automatic building, testing, and deployment of code, improving the efficiency of development and operation and maintenance, thereby ensuring the stability and reliability of the system.

[0091] In the embodiment of the present invention, one or more functional modules of the home gateway are containerized to build a containerized environment for the home host, and each functional module runs in an independent container; after detecting the time when the test code is submitted, the test code is packaged into a container image; the test code is tested in a preset test environment; when the test of the test code is successful, the preset container orchestration tool upgrades the containerized environment of the home host according to the container image. Thus, compared with the existing fixed hardware and software architecture, the containerized home host in the embodiment of the present invention can be automatically tested, deployed, and upgraded according to the test code, and has the advantages of high scalability and good maintainability.

[0092] Referring to Figure 3 , the flowchart of the steps of another method for containerizing an application of a home host provided by an embodiment of the present invention is shown, which may specifically include the following steps:

[0093] Step S301: Containerize one or more functional modules of the home gateway to build a containerized environment for the home host, and each functional module runs in an independent container;

[0094] In the embodiment of the present invention, one or more fixed functional modules in the home gateway can be containerized through containerization technology, so that the corresponding functional modules after containerization can build a containerized environment for the home host. For example, the device management module of the home intelligent gateway can be converted into a device management container through containerization technology, the data processing module can be converted into a data processing container through containerization technology, the control instruction module can be converted into a control instruction container through containerization technology, and the management and scheduling module can be converted into a management and scheduling container through containerization technology.

[0095] Step S302: Obtain the load information of the home host;

[0096] In practical applications, the load information of the home host can be monitored to obtain the load value in the current state. In one example, to reduce the operating pressure of the host, a detection period can be set, and then the load information of the home host can be obtained according to the detection period.

[0097] Step S303, determine whether a load fluctuation event is triggered according to the load information;

[0098] Specifically, it can be determined whether a load fluctuation event has been triggered based on the load information at the current moment and the load information at the historical moment. For example, it can be determined whether the difference between the load information at the current moment and the load information at the historical moment is within a preset range. When the difference is within the preset range, it can be determined that no load fluctuation event has been triggered. If the difference is not within the preset range, it can be determined that a load fluctuation event has been triggered.

[0099] Step S304, when it is determined that a load fluctuation event is triggered, adjust the container instances of the home host based on the load information using a preset container orchestration tool.

[0100] When it is determined that a load fluctuation event has been triggered, the current load can be made to match the load-bearing capacity of the home host itself by adjusting the container instances of the home host, thereby avoiding overloading and load redundancy.

[0101] In an embodiment of the present invention, when it is determined that a load fluctuation event is triggered, when it is determined according to the load information that the load of the home host increases, increase the container instances of the home host according to the load information using a preset container orchestration tool.

[0102] When the load increases, it is necessary to increase the container instances to relieve the pressure on the home host. The specific number of increases can be determined according to the load information and the load that each container instance can undertake.

[0103] In another embodiment of the present invention, when it is determined that a load fluctuation event is triggered, when it is determined according to the load information that the load of the home host decreases, reduce the container instances of the home host according to the load information using a preset container orchestration tool.

[0104] When the load decreases, in order to avoid waste of container resources caused by load redundancy of the home host, it is necessary to reduce the container instances. The specific number of reductions can be determined according to the load information and the load that each container instance can undertake. In practical applications, when it is necessary to reduce the container instances, the specific instances to be reduced can also be determined in combination with the load of each container instance, such as preferentially reducing the currently idle container instances.

[0105] In an embodiment of the present invention, one or more functional modules of a home gateway are containerized to build a containerized environment for a home host, and each functional module runs in an independent container; load information of the home host is obtained, and it is determined whether a load fluctuation event is triggered according to the load information; when it is determined that a load fluctuation event is triggered, a preset container orchestration tool is used to adjust the container instances of the home host based on the load information. Thus, compared with the existing fixed hardware and software architectures, the containerized home host in the embodiment of the present invention can dynamically adjust the container instances according to the load status, has the advantages of high scalability and good maintainability, and can avoid the home host from malfunctioning due to excessive load or resource idleness due to too low load.

[0106] Referring to Figure 4 , a flowchart of steps of another method for containerized application of a home host provided by an embodiment of the present invention is shown, and specifically may include the following steps:

[0107] Step S401, containerize one or more functional modules of a home gateway to build a containerized environment for a home host, and each functional module runs in an independent container;

[0108] In an embodiment of the present invention, one or more fixed functional modules in a home gateway can be containerized through containerization technology, so that the corresponding functional modules after containerization can build a containerized environment for a home host. For example, the device management module of a home intelligent gateway can be converted into a device management container through containerization technology, the data processing module can be converted into a data processing container through containerization technology, the control instruction module can be converted into a control instruction container through containerization technology, and the management and scheduling module can be converted into a management and scheduling container through containerization technology.

[0109] Step S402, when a faulty container node is detected in the containerized environment of the home host, use a preset container orchestration tool to handle the faulty container node in the containerized environment of the home host.

[0110] When there is a faulty node, the faulty node can be directly cleared to avoid the faulty node from affecting the normal operation of the home host.

[0111] In an embodiment of the present invention, one or more functional modules of a home gateway are containerized to build a containerized environment for a home host, and each functional module runs in an independent container; when a faulty container node is detected in the containerized environment of the home host, use a preset container orchestration tool to handle the faulty container node in the containerized environment of the home host. Thus, compared with the existing fixed hardware and software architectures, the containerized home host in the embodiment of the present invention can automatically clear faulty nodes and has the advantages of high scalability and good maintainability.

[0112] Reference Figure 5 , a step flowchart of another method for containerizing applications of a home host provided by an embodiment of the present invention is shown, which may specifically include the following steps:

[0113] Step S501, containerize one or more functional modules of the home gateway to build a containerized environment for the home host, and each functional module runs in an independent container;

[0114] In the embodiment of the present invention, one or more fixed functional modules in the home gateway can be containerized through containerization technology, so that the corresponding functional modules after containerization can build a containerized environment for the home host. For example, the device management module of the home intelligent gateway can be converted into a device management container through containerization technology, the data processing module can be converted into a data processing container through containerization technology, the control instruction module can be converted into a control instruction container through containerization technology, and the management and scheduling module can be converted into a management and scheduling container through containerization technology.

[0115] Step S502, when detecting a startup event of a scheduling policy, obtain container node information in the containerized environment;

[0116] Among them, the container node information may include but is not limited to node priority, node ID, node relationship, etc.

[0117] Step S503, use a preset container orchestration tool to execute a preset scheduling policy according to the container node information.

[0118] In an embodiment of the present invention, the step of using a preset container orchestration tool to execute a preset scheduling policy according to the container node information includes: determining container nodes to be filtered according to the container node information; using the preset container orchestration tool to perform filtering processing on the container nodes to be filtered in the containerized environment; sorting the remaining container nodes in the containerized environment according to the container node information; using a preset container orchestration tool to adjust the containerized environment of the home host based on the node sorting information.

[0119] Among them, filtering rules and sorting rules can be set in advance, and then the container nodes to be filtered can be screened out according to the filtering rules for filtering, and then node sorting can be performed according to the sorting rules. In one example, the sorting rules can be sorted according to the priority order. In the embodiment of the present invention, the filtering rules and sorting rules can be set according to the actual scenario, and no excessive limitation is imposed on this in the embodiment of the present invention.

[0120] In an embodiment of the present invention, one or more functional modules of a home gateway are containerized to build a containerized environment for a home host, and each functional module runs in an independent container; when a start event of a scheduling policy is detected, container node information in the containerized environment is obtained; a preset container orchestration tool is used to execute a preset scheduling policy according to the container node information. Thus, compared with the existing fixed hardware and software architectures, the containerized home host in the embodiment of the present invention can perform dynamic node scheduling according to the scheduling policy, optimize the nodes in the home environment, and has the advantages of high scalability and good maintainability.

[0121] Referring to Figure 6 , a flowchart of steps of another method for containerized application of a home host provided by an embodiment of the present invention is shown, which may specifically include the following steps:

[0122] Step S601, containerize one or more functional modules of a home gateway to build a containerized environment for a home host, and each functional module runs in an independent container;

[0123] In an embodiment of the present invention, one or more fixed functional modules in a home gateway can be containerized through containerization technology, so that the corresponding functional modules after containerization can build a containerized environment for a home host. For example, the device management module of a home intelligent gateway can be converted into a device management container through containerization technology, the data processing module can be converted into a data processing container through containerization technology, the control instruction module can be converted into a control instruction container through containerization technology, and the management and scheduling module can be converted into a management and scheduling container through containerization technology.

[0124] Step S602, when it is detected that the container state of a target container in the containerized environment is a fault state, use the preset container orchestration tool to restart the target container.

[0125] In an embodiment of the present invention, when a container fails, self-healing can be achieved by restarting the container, improving the disaster tolerance of the home host.

[0126] In an embodiment of the present invention, one or more functional modules of a home gateway are containerized to build a containerized environment for a home host, and each functional module runs in an independent container; when it is detected that the container state of a target container in the containerized environment is a fault state, use the preset container orchestration tool to restart the target container. Thus, compared with the existing fixed hardware and software architectures, the containerized home host in the embodiment of the present invention can automatically restart a faulty container, and has the advantages of high scalability and good maintainability.

[0127] Referring to Figure 7, which shows a schematic diagram of a containerized architecture in an embodiment of the present invention. Among them, the containerized system architecture of the home intelligent gateway includes a device management container, a data processing container, a control instruction container, and a management and scheduling container. The device management container is responsible for device registration, status monitoring, and information reporting; the data processing container is responsible for data collection, analysis, and storage; the control instruction container is responsible for receiving user instructions and sending them to the corresponding devices; the management and scheduling container manages and schedules each container through a container orchestration tool.

[0128] In practical applications, since the functional modules are containerized, all the containers therein are adjustable containers. When new functions or new processing logics need to be added, the dynamic adjustment of the containers can be achieved by modifying the test code.

[0129] It should be noted that for the method embodiments, for simplicity of description, they are expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequences, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present invention.

[0130] Refer to Figure 8 , which shows a schematic diagram of the structure of a containerized application device of a home host provided by an embodiment of the present invention, and specifically may include the following modules:

[0131] The containerization processing module 801 is used to containerize one or more functional modules of the home gateway to build a containerized environment for the home host, and each functional module runs in an independent container;

[0132] The container adjustment module 802 is used to, when detecting an update event for triggering an update to the home host, adjust the containerized environment of the home host according to the update event by using a preset container orchestration tool.

[0133] In an embodiment of the present invention, the update event is an event of test code submission, and the container adjustment module 802 may include the following sub-modules:

[0134] The test code representative sub-module is used to, after detecting the time of test code submission, package the test code into a container image;

[0135] The test sub-module is used to perform tests in a preset test environment according to the test code;

[0136] An upgrade sub-module, configured to upgrade the containerized environment of the home host according to the container image by using the preset container orchestration tool when the test of the test code is successful.

[0137] In an embodiment of the present invention, the update event is a load fluctuation event of the home host, and the container adjustment module 802 may include the following sub-modules:

[0138] A load information acquisition sub-module, configured to acquire the load information of the home host;

[0139] A load fluctuation event determination sub-module, configured to determine whether a load fluctuation event is triggered according to the load information;

[0140] A container instance adjustment sub-module, configured to adjust the container instances of the home host by using a preset container orchestration tool based on the load information when it is determined that a load fluctuation event is triggered.

[0141] In an embodiment of the present invention, the container instance adjustment sub-module may include the following units:

[0142] An instance increase unit, configured to increase the container instances of the home host by using a preset container orchestration tool according to the load information when it is determined that a load fluctuation event is triggered and it is determined that the load of the home host increases according to the load information.

[0143] In an embodiment of the present invention, the container instance adjustment sub-module may include the following units:

[0144] An instance decrease unit, configured to decrease the container instances of the home host by using a preset container orchestration tool according to the load information when it is determined that a load fluctuation event is triggered and it is determined that the load of the home host decreases according to the load information.

[0145] In an embodiment of the present invention, the update event is an event of detecting a faulty container node. When an update event for triggering an update of the home host is detected, the container adjustment module 802 may include the following sub-modules:

[0146] A faulty node processing sub-module, configured to process the faulty container nodes in the containerized environment of the home host by using a preset container orchestration tool when faulty container nodes are detected in the containerized environment of the home host.

[0147] In an embodiment of the present invention, the update event is a start event of a scheduling policy, and the container adjustment module 802 may include the following sub-modules:

[0148] A container node information acquisition sub-module, configured to acquire container node information in the containerized environment when a start event of a scheduling policy is detected;

[0149] A scheduling policy execution sub-module, configured to execute a preset scheduling policy according to the container node information by using a preset container orchestration tool.

[0150] In an embodiment of the present invention, the scheduling policy execution sub-module includes the following units:

[0151] A container node to be filtered determination unit, configured to determine a container node to be filtered according to the container node information;

[0152] A node filtering unit, configured to perform filtering processing on the container nodes to be filtered in the containerized environment by using the preset container orchestration tool;

[0153] A node sorting unit, configured to sort the remaining container nodes in the containerized environment according to the container node information;

[0154] An adjustment unit, configured to adjust the containerized environment of the home host based on the node sorting information by using a preset container orchestration tool.

[0155] In an embodiment of the present invention, the update event is an event of detecting a faulty container, and the container adjustment module 802 may include the following sub-modules:

[0156] A container restart module, configured to restart a target container by using the preset container orchestration tool when it is detected that the container state of the target container in the containerized environment is a faulty state.

[0157] In an embodiment of the present invention, one or more functional modules of a home gateway are containerized to construct a containerized environment of a home host, and each functional module runs in an independent container; when an update event for triggering an update of the home host is detected, a preset container orchestration tool is used to adjust the containerized environment of the home host according to the update event. Thus, compared with the existing fixed hardware and software architecture, the containerized home host in the embodiment of the present invention can be dynamically adjusted according to different scenarios, and has the advantages of high scalability and good maintainability.

[0158] An embodiment of the present invention further provides an electronic device, which may include a processor, a memory, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, the containerized application method of the home host as described above is implemented.

[0159] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the containerized application method of the above home host is implemented.

[0160] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant parts, refer to the partial description of the method embodiment.

[0161] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other.

[0162] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a device, or a computer program product. Therefore, the embodiments of the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.

[0163] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0164] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0165] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable terminal device provide for implementing the process Figure 1 one process or multiple processes and / or blocks Figure 1 steps for the functions specified in one block or multiple blocks.

[0166] Although the preferred embodiments of the embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present invention.

[0167] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements includes not only those elements, but also other elements not expressly listed, or elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the element.

[0168] The above has introduced in detail the method and device for generating game voice, electronic device, and storage medium provided. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A containerized application method for a home host, characterized in that, The method includes: containerizing one or more functional modules of a home gateway to build a containerized environment for a home host, where each functional module runs in an independent container; When detecting an update event for triggering an update to the home host, use a preset container orchestration tool to adjust the containerized environment of the home host according to the update event.

2. The method according to claim 1, wherein The update event is an event of submitting test code. The step of, when detecting an update event for triggering an update to the home host, using a preset container orchestration tool to adjust the containerized environment of the home host according to the update event includes: After detecting the time of submitting test code, package the test code into a container image; test the test code in a preset test environment; When the test of the test code is successful, use the preset container orchestration tool to upgrade the containerized environment of the home host according to the container image.

3. The method according to claim 1, wherein The update event is a load fluctuation event of the home host. The step of, when detecting an update event for triggering an update to the home host, using a preset container orchestration tool to adjust the containerized environment of the home host according to the update event includes: Obtain the load information of the home host; Judge whether a load fluctuation event is triggered according to the load information; When it is determined that a load fluctuation event is triggered, use a preset container orchestration tool to adjust the container instances of the home host based on the load information.

4. The method according to claim 3, wherein The step of, when it is determined that a load fluctuation event is triggered, using a preset container orchestration tool to adjust the containerized instances of the home host based on the load information includes: When it is determined that a load fluctuation event is triggered and it is determined according to the load information that the load of the home host increases, use a preset container orchestration tool to increase the container instances of the home host according to the load information.

5. The method according to claim 3, wherein The step of, when it is determined that a load fluctuation event is triggered, using a preset container orchestration tool to adjust the containerized instances of the home host based on the load information includes: When it is determined that a load fluctuation event is triggered and it is determined according to the load information that the load of the home host decreases, use a preset container orchestration tool to reduce the container instances of the home host according to the load information.

6. The method according to claim 1, characterized in that, The update event is an event of detecting a faulty container node. The step of, when detecting an update event for triggering an update to the home host, using a preset container orchestration tool to adjust the containerized environment of the home host according to the update event includes: When detecting that there is a faulty container node in the containerized environment of the home host, use a preset container orchestration tool to handle the faulty container node in the containerized environment of the home host.

7. The method according to claim 1, wherein The update event is a start event of a scheduling policy. The step of, when detecting an update event for triggering an update to the home host, using a preset container orchestration tool to adjust the containerized environment of the home host according to the update event includes: When detecting a start event of a scheduling policy, obtain the container node information in the containerized environment; Execute a preset scheduling policy according to the container node information by using a preset container orchestration tool.

8. The method according to claim 7, wherein The step of executing a preset scheduling policy according to the container node information by using a preset container orchestration tool includes: Determine the container nodes to be filtered according to the container node information; Use the preset container orchestration tool to filter the container nodes to be filtered in the containerized environment; Sort the remaining container nodes in the containerized environment according to the container node information; Use a preset container orchestration tool to adjust the containerized environment of the home host based on the node sorting information.

9. The method according to claim 1, characterized in that The update event is an event of detecting a faulty container. When detecting an update event for triggering an update to the home host, using a preset container orchestration tool to adjust the containerized environment of the home host according to the update event includes: When detecting that the container status of the target container in the containerized environment is a faulty state, use the preset container orchestration tool to restart the target container.

10. A containerized application device for a home host, characterized in that, The device includes: a containerization processing module, configured to containerize one or more functional modules of a home gateway to construct a containerized environment of a home host, and each functional module runs in an independent container; a container adjustment module, configured to, when detecting an update event for triggering an update to the home host, use a preset container orchestration tool to adjust the containerized environment of the home host according to the update event.

11. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the containerized application method of the home host according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, it implements the containerized application method of the home host according to any one of claims 1 to 9.