Method, device and storage medium for migrating network edge control equipment to Hongmeng system

By creating a container engine on the Hongmeng operating system and importing the source operating system image, the containerized network edge control device program is solved, the compatibility problem during the migration process is reduced, and the migration efficiency is improved.

CN117891570BActive Publication Date: 2025-01-14福州城投新基建集团有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311788170.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2025-01-14
Estimated Expiration
2043-12-25

AI Technical Summary

Technical Problem

When migrating network edge control devices from other operating systems to Harmony operating systems, the application or drivers often fail to run normally due to compatibility issues. The existing solutions require rewriting or tuning of code, resulting in huge workloads.

Method used

By creating a container engine based on the Hongmeng operating system, obtaining the source operating system image and importing it into the container engine, containerizing the relevant programs of network edge control devices, reducing the need for code rewriting and adjustment.

Benefits of technology

It greatly reduces the workload of migrating network edge control devices to Hongmeng system, improves migration efficiency, and avoids the complexity of code rewriting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117891570B_ABST
    Figure CN117891570B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computer technology, and provides a method, device, and storage medium for migrating network edge control devices to the Hongmeng system. The method includes: creating a container engine based on the Hongmeng operating system; obtaining a source operating system image, wherein the source operating system is a system heterogeneous to the Hongmeng operating system; importing the source operating system image into a container engine based on the Hongmeng operating system; and containerizing the relevant programs of the network edge control device based on the Hongmeng operating system in the container engine into which the source operating system image has been imported. The technical solution of the present application can save the workload of migrating network edge control devices to different operating systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device and storage medium for migrating a network edge control device to a Hongmeng system. Background Art

[0002] Network edge control devices, also known as network edge computing devices, are a key component of a distributed computing architecture. They are located at the edge of the network and close to user devices and terminals, and are used to process and store data to provide faster, more reliable, and low-latency computing and services. The above characteristics of network edge control devices make their role in smart city construction increasingly significant.

[0003] With the rise of Harmony OS and its ecosystem, more and more users are migrating their network edge control devices originally based on other operating systems (such as Android OS) to Harmony OS. However, there are some differences between Harmony OS and other operating systems. During the migration process, some compatibility issues are inevitable, which may cause the applications or drivers on the network edge control devices originally based on other operating systems to fail to run properly on Harmony OS.

[0004] The existing solution to the above technical problems is to rewrite, adjust or replace some codes to ensure that the program can run normally on the Hongmeng operating system. However, modifying the code means increasing the workload, and for some large projects, this workload can even be described as astronomical. Summary of the invention

[0005] The present application provides a method, device and storage medium for migrating a network edge control device to a Hongmeng system, which can save the workload of migrating the network edge control device between different operating systems.

[0006] On the one hand, the present application provides a method for migrating a network edge control device to a Hongmeng system, the method comprising:

[0007] Create a container engine based on Hongmeng OS;

[0008] Obtain a source operating system image, where the source operating system is a system heterogeneous to the Hongmeng operating system;

[0009] Importing the source operating system image into the container engine based on the Hongmeng operating system;

[0010] The container engine that has imported the source operating system image containerizes the relevant programs of the network edge control device based on the Hongmeng operating system.

[0011] On the other hand, the present application provides a device for migrating a network edge control device to a Hongmeng system, the device comprising:

[0012] Create a module for creating a container engine based on the Hongmeng operating system;

[0013] An acquisition module, used to acquire a source operating system image, where the source operating system is a system heterogeneous to the Hongmeng operating system;

[0014] An import module, used to import the source operating system image into the container engine based on the Hongmeng operating system;

[0015] A containerization module is used to containerize relevant programs of a network edge control device based on the Hongmeng operating system in a container engine that has imported the source operating system image.

[0016] In the third aspect, the present application provides a device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the technical solution of the method for migrating a network edge control device to the Hongmeng system as described above are implemented.

[0017] In a fourth aspect, the present application provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the technical solution of the method for migrating a network edge control device to the Hongmeng system as described above.

[0018] From the technical solution provided by the present application, it can be seen that, unlike the prior art, when migrating a network edge control device on a system heterogeneous to the Hongmeng operating system to the Hongmeng operating system, the code is rewritten, adjusted or replaced. The technical solution of the present application is to create a container engine based on the Hongmeng operating system, obtain the source operating system image, import the source operating system image into the container engine based on the Hongmeng operating system, and containerize the relevant programs of the network edge control device based on the Hongmeng operating system in the container engine that has imported the source operating system image. Since the workload of creating a container engine based on the Hongmeng operating system and importing the source operating system image into the container engine based on the Hongmeng operating system is less than that of code rewriting, the workload of migrating the network edge control device to the Hongmeng system is greatly reduced, thereby improving the efficiency of the migration work. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 It is a flowchart of a method for migrating a network edge control device to a Hongmeng system provided in an embodiment of the present application;

[0021] Figure 2 It is a structural schematic diagram of an apparatus for migrating a network edge control device to a Hongmeng system provided in an embodiment of the present application;

[0022] Figure 3 It is a schematic diagram of the structure of the device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] In this specification, adjectives such as first and second may be used only to distinguish one element or action from another element or action, without necessarily requiring or implying any actual such relationship or order. Where circumstances permit, reference to an element or component or step (etc.) should not be interpreted as being limited to only one of the elements, components, or steps, but may be one or more of the elements, components, or steps, etc.

[0025] In this specification, for the convenience of description, the sizes of various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0026] With the rise of Harmony OS and its ecosystem, more and more users are migrating their network edge control devices that were originally based on other operating systems (such as Android OS) to Harmony OS. However, there are some differences between Harmony OS and other operating systems. During the migration process, some compatibility issues are inevitable, which may cause the applications or drivers on the network edge control devices that were originally based on other operating systems to fail to run properly on Harmony OS. In response to the above technical problems, the existing solution is to rewrite, adjust or replace some code to ensure that the program can run normally on Harmony OS. However, modifying the code means an increase in workload, and for some large projects, this workload can even be described as a huge amount.

[0027] In view of the above problems of the prior art, this application proposes a method for migrating network edge control devices to the Hongmeng system, which can save the workload of migrating network edge control devices to different operating systems. The flowchart is shown in the attached Figure 1 As shown, it mainly includes steps S101 to S104, which are described in detail as follows:

[0028] Step S101: Create a container engine based on the Hongmeng operating system.

[0029] In an embodiment of the present application, the container engine is software responsible for container lifecycle management. The container engine provides the functions required to run containers, including building, pulling, managing, and running container images, so that developers and administrators can easily operate containers through commands or application programming interfaces. The container here refers to a lightweight, executable software package that contains the code, runtime, system tools, libraries, and settings required for the software to run, providing an isolated environment for the application so that the application can run consistently in different computing environments. Containers are different from virtual machines in that they share the kernel with the host machine, but are isolated in user space, and they run on top of the container engine.

[0030] As an embodiment of the present application, creating a container engine based on the Hongmeng operating system can be: setting up an environment suitable for kernel development and system programming on the Hongmeng operating system; porting or newly developing a container engine in an environment suitable for kernel development and system programming; using a ported or newly developed container engine to manage container images that follow the Open Container Initiative (OCI) standard. It should be noted that whether it is porting a container engine or developing a new container engine, it is necessary to determine the container engine to be ported or a container engine to be developed, and then consider the system interface adaptation. For example, for Linux-specific system calls and functions, it is necessary to implement an alternative mechanism on the Hongmeng operating system or provide support through a compatibility layer. Finally, storage and networking need to be considered, that is, adapting the storage and network subsystems of the Hongmeng operating system to support persistent storage and network isolation of containers. In addition, the Open Container Initiative (OCI) is an industry association that promotes the standardization of container technology. Its goal is to develop a series of standards to standardize container formats and runtime environments to ensure the openness and portability of containers.

[0031] As an embodiment of the present application, using a transplanted or newly developed container engine to manage container images that comply with the Open Container Initiative (OCI) standard can be: creating a parser that can be used to parse container images that comply with the OCI standard; using the parser to parse the container parameters defined in the OCI configuration file; in the container engine, managing container images that comply with the Open Container Initiative (OCI) standard based on the parsed container parameters. In the above embodiment, creating a parser that can be used to parse container images that comply with the OCI standard first involves designing the software architecture of the parser for downloading, decompressing, and merging layers of container images, and secondly, writing code to implement the logic of parsing container images that comply with the OCI standard, including parsing the declaration, configuration, and files of each layer of the container image; and finally, importing all necessary dependencies and libraries of the parser into the Hongmeng operating system. It should be noted that the "layer" in the so-called "layer merging" in the above embodiments refers to the component of the container image, or the container image is composed of multiple layers, each layer corresponds to a part of the file system change, each layer is read-only, and the layers are stored separately. The layer merging process includes layer extraction, layer stacking and creation of a container file system, wherein the layer extraction refers to the parser extracting the tar format file, i.e., the layer, from the container image, and the layer stacking refers to the use of the union file system technology to stack these layers in a read-only manner. The top layer is usually a writable layer for storing changes when the container is running, and the creation of a container file system refers to creating a write layer at the top of this union file system, and all runtime changes of the container are written to this layer. The OCI configuration file is usually a JSON file, in which the container parameters defined include the execution parameters, environment variables, mount points, etc. of the container. Use a transplanted or newly developed container engine to manage container images that follow the Open Container Initiative OCI standard.

[0032] Step S102: Obtain a source operating system image, where the source operating system is a system heterogeneous to the Hongmeng operating system.

[0033] In an embodiment of the present application, the source operating system is a system heterogeneous to the Hongmeng operating system, for example, the Android operating system. The source operating system image includes the source operating system environment and the runtime container image, which can be used as the basis or starting point for other application images. Obtaining the source operating system image can be achieved in the following ways: determining a source operating system image as a starting point, for example, starting from an existing Android operating system image, or starting from a minimized Linux image, and building an Android operating system runtime environment on it; adding necessary libraries, middleware, environment variables, and other dependencies to the source operating system runtime environment; creating a command set text file containing all the commands required for the image; using the container tool to run the specified commands in the command set text file to create the source operating system image.

[0034] Step S103: Import the source operating system image into the container engine based on the Hongmeng operating system.

[0035] As an embodiment of the present application, importing the source operating system image into a container engine based on Hongmeng operating system can be: pushing the source operating system image to a container image repository; configuring the container engine based on Hongmeng operating system; using the configured container engine based on Hongmeng operating system to pull the source operating system image from the container image repository to the container engine based on Hongmeng operating system for operation. In the above embodiment, the container image is a lightweight, portable, self-contained software packaging format that contains all the content required to run a container and is used to create a container instance, that is, each time a container is started, the container engine creates it based on a container image. In other words, the container image is a template for creating a container, and the container is the running state of the container image after instantiation. As an example of a container image, once the source operating system image is created, it can be pulled from the container image repository by the container engine to the container engine based on Hongmeng operating system for operation. Configuring a container engine based on Hongmeng operating system mainly includes using specified commands in a command set text file to install necessary libraries and dependencies, adding system configuration to the container engine, and setting environment variables. It should be noted that the reason why the source operating system image is first pushed to the container image repository, and then the configured container engine based on Hongmeng OS is used to pull the source operating system image from the container image repository and run it in the container engine based on Hongmeng OS is a common workflow in container technology. It is mainly due to the following reasons:

[0036] 1) Version control and archiving: Storing container images in a container image repository can help developers perform version control on the built container images. Each push can be recorded for easy tracing and management.

[0037] 2) Sharing and distribution: Through the container image repository, developers can easily share container images with team members or other developers or deploy container images to different servers or environments;

[0038] 3) Standardized deployment process: Pushing to and pulling from a container image repository is a standardized process that can be integrated into the continuous integration and continuous deployment process;

[0039] 4) Security and auditing: By using a container image repository, you can increase security controls, such as scanning for vulnerabilities in images, checking the integrity and signature of image content, etc.

[0040] 5) Environmental isolation: Running containers directly in the build environment may cause environmental pollution problems. Distributing container images through a container image repository allows containers to be run in a clean environment, reducing unexpected environmental dependency issues.

[0041] More specifically, importing the source operating system image into the container engine based on the Hongmeng operating system includes: 1) configuring the container engine on the Hongmeng operating system to ensure that the container engine on the Hongmeng operating system is configured correctly, including network configuration, storage volume configuration, and security settings, so that it can pull the container image from the container image repository; 2) pulling and running the container image, that is, in the container engine on the Hongmeng operating system, using the corresponding commands to pull and run the source operating system image; 3) verification and testing, that is, after running the container, verification and testing are performed to ensure that the application works as expected, including testing network connections, data volume mounting, and other external dependencies; 4) automation and integration, that is, in order to simplify the deployment process, the CI / CD process can be used to automate the image building, pushing, and deployment process, in which a specific deployment script or configuration can be customized for the Hongmeng operating system. Through the above steps, the source operating system image can be imported into the container engine based on the Hongmeng operating system and made recognizable and runnable.

[0042] Step S104: Containerize the relevant programs of the network edge control device based on the Hongmeng operating system in the container engine that has imported the source operating system image.

[0043] As an embodiment of the present application, containerizing the relevant programs of the network edge control device based on the Hongmeng operating system in the container engine that has imported the source operating system image can be: adding the installation files and configuration files of the relevant programs of the network edge control device to the source operating system image imported into the container engine; setting a command to start the relevant programs of the network edge control device when the container engine starts. In the above embodiment, the relevant programs of the network edge control device include both the application program of the network edge control device and the driver program of the network edge control device.

[0044] Furthermore, the method of the above embodiment also includes: according to the resource management characteristics of the Hongmeng operating system, optimizing the operating environment of the container engine that has imported the source operating system image, which mainly includes the following five aspects of optimization:

[0045] 1) Optimize container configuration, mainly including resource restrictions (i.e., configure container resource restrictions through control groups to prevent a single container from occupying too many resources, including CPU quotas, memory restrictions, IO bandwidth restrictions, etc.), adjust priorities (i.e., set appropriate CPU scheduling priorities to ensure the response speed of key applications), and memory management (i.e., optimize memory usage, such as by modifying over-delivery behavior and adjusting memory allocation policies);

[0046] 2) Adjust kernel parameters, mainly including kernel tuning (i.e., adjusting kernel parameters according to container requirements, such as swap propensity, maximum number of file descriptors at the system level, etc.) and network optimization (i.e., adjusting network stack parameters, such as TCP buffer size, to improve network performance);

[0047] 3) Use dedicated storage solutions, mainly including efficient storage (i.e., choose high-performance storage solutions, such as using SSDs or configuring file systems that are more suitable for I / O operations) and storage drivers (i.e., choose container storage drivers suitable for Hongmeng systems);

[0048] 4) Optimize container images, mainly including image size optimization (i.e. reducing the size of container images and removing unnecessary files and libraries, which helps speed up image download and startup time) and multi-stage builds (i.e. using multi-stage builds in command set text files to build minimized production images);

[0049] 5) Application-level optimization, which mainly includes code optimization (i.e. optimizing application code, reducing memory leaks, and improving efficiency) and concurrency and asynchrony (i.e., if the application supports it, using concurrency and asynchronous technologies to improve the application's response speed and processing capabilities).

[0050] By default, the container shares the same kernel as the host. This means that if the application in the container is maliciously exploited, it may attempt to affect or attack other containers on the host or the host itself. Although security is taken into account when designing the Hongmeng operating system, however, when running external applications (for example, applications based on the Android operating system) in a containerized environment, strict security isolation measures must still be ensured to prevent potential security threats. Therefore, further, the method of the above embodiment also includes: securely isolating the relevant programs of the network edge control device based on the Hongmeng operating system running in the container engine from the Hongmeng operating system. Specifically, securely isolating the relevant programs of the network edge control device based on the Hongmeng operating system running in the container engine from the Hongmeng operating system includes one of the following 6 methods or any combination:

[0051] 1) Use control groups to limit the amount of resources that can be used by containers instantiated from the source operating system image, such as CPU, memory, and I / O bandwidth, to prevent any container from exhausting all resources on the host machine;

[0052] 2) Configure corresponding policies to limit the capabilities of the container process instantiated by the source operating system image, for example, preventing the container from accessing specific file systems or network functions on the host;

[0053] 3) When creating the source OS image, only the necessary packages and applications are included, and all unnecessary services and tools are removed, which can reduce the attack surface;

[0054] 4) Reduce the system core capabilities of the container process after the source operating system image is instantiated to prevent it from making unnecessary system calls;

[0055] 5) Use network namespaces and virtual network interfaces to isolate the network traffic of containers instantiated from the source operating system image;

[0056] 6) Audit and monitor container activities and possible security incidents after the source operating system image is instantiated, or use tools such as Falco to detect abnormal container behavior after the source operating system image is instantiated, and respond to potential threats in a timely manner.

[0057] from Figure 1 It can be seen from the example method of migrating a network edge control device to the Hongmeng system that, unlike the prior art, when migrating a network edge control device on a system heterogeneous to the Hongmeng operating system to the Hongmeng operating system, the code is rewritten, adjusted or replaced. The technical solution of the present application is to create a container engine based on the Hongmeng operating system, obtain a source operating system image, import the source operating system image into a container engine based on the Hongmeng operating system, and containerize the relevant programs of the network edge control device based on the Hongmeng operating system in the container engine into which the source operating system image has been imported. Since the workload of creating a container engine based on the Hongmeng operating system and importing the source operating system image into the container engine based on the Hongmeng operating system is less than that of code rewriting, the workload of migrating the network edge control device to the Hongmeng system is greatly reduced, thereby improving the efficiency of the migration work.

[0058] Please refer to the attached Figure 2 , is a device for migrating a network edge control device to a Hongmeng system provided in an embodiment of the present application, and the device may include a creation module 201, an acquisition module 202, an import module 203, and a containerization module 204, which are described in detail as follows:

[0059] Creating module 201, used to create a container engine based on Hongmeng operating system;

[0060] An acquisition module 202 is used to acquire a source operating system image, wherein the source operating system is a system heterogeneous to the Hongmeng operating system;

[0061] The import module 203 is used to import the source operating system image into the container engine based on the Hongmeng operating system;

[0062] The containerization module 204 is used to containerize the relevant programs of the network edge control device based on the Hongmeng operating system in the container engine that has imported the source operating system image.

[0063] From the above attached Figure 2It can be seen from the example of the device for migrating the network edge control device to the Hongmeng system that, unlike the prior art, when migrating the network edge control device on the system heterogeneous to the Hongmeng operating system to the Hongmeng operating system, the code is rewritten, adjusted or replaced. The technical solution of the present application is to create a container engine based on the Hongmeng operating system, obtain the source operating system image, import the source operating system image into the container engine based on the Hongmeng operating system, and containerize the relevant programs of the network edge control device based on the Hongmeng operating system in the container engine that has imported the source operating system image. Since the workload of creating a container engine based on the Hongmeng operating system and importing the source operating system image into the container engine based on the Hongmeng operating system is less than that of code rewriting, the workload of migrating the network edge control device to the Hongmeng system is greatly reduced, thereby improving the efficiency of the migration work.

[0064] Figure 3 Schematic diagram of the structure of the device provided by an embodiment of the present application. Figure 3 As shown, the device 3 of this embodiment mainly includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as a program for a method for migrating a network edge control device to a Hongmeng system. When the processor 30 executes the computer program 32, the steps in the above-mentioned method embodiment for migrating a network edge control device to a Hongmeng system are implemented, such as Figure 1 Alternatively, when the processor 30 executes the computer program 32, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 2 The functions of the creation module 201, the acquisition module 202, the import module 203 and the containerization module 204 are shown.

[0065] Exemplarily, the computer program 32 of the method for migrating a network edge control device to the Hongmeng system mainly includes: creating a container engine based on the Hongmeng operating system; obtaining a source operating system image, wherein the source operating system is a system heterogeneous to the Hongmeng operating system; importing the source operating system image into a container engine based on the Hongmeng operating system; containerizing the relevant programs of the network edge control device based on the Hongmeng operating system in the container engine into which the source operating system image has been imported. The computer program 32 can be divided into one or more modules / units, one or more modules / units are stored in the memory 31 and executed by the processor 30 to complete the present application. One or more modules / units can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program 32 in the device 3. For example, the computer program 32 can be divided into the functions of a creation module 201, an acquisition module 202, an import module 203 and a containerization module 204 (module in the virtual device), and the specific functions of each module are as follows: a creation module 201, used to create a container engine based on the Harmony operating system; an acquisition module 202, used to obtain a source operating system image, wherein the source operating system is a system heterogeneous to the Harmony operating system; an import module 203, used to import the source operating system image into a container engine based on the Harmony operating system; a containerization module 204, used to containerize relevant programs of a network edge control device based on the Harmony operating system in the container engine into which the source operating system image has been imported.

[0066] The device 3 may include but is not limited to a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3 It is only an example of device 3 and does not constitute a limitation of device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, a computing device may also include input and output devices, network access devices, buses, etc.

[0067] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0068] The memory 31 may be an internal storage unit of the device 3, such as a hard disk or memory of the device 3. The memory 31 may also be an external storage device of the device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the device 3. The memory 31 is used to store computer programs and other programs and data required by the device. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0069] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0070] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0071] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0072] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

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

[0075] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program of the method for migrating the network edge control device to the Hongmeng system can be stored in a storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments, that is, create a container engine based on the Hongmeng operating system; obtain the source operating system image, wherein the source operating system is a system heterogeneous to the Hongmeng operating system; import the source operating system image into the container engine based on the Hongmeng operating system; containerize the relevant programs of the network edge control device based on the Hongmeng operating system in the container engine into which the source operating system image has been imported. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The storage medium may include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the storage medium does not include electric carrier signal and telecommunication signal. The above embodiments are only used to illustrate the technical solution of the present application, but not to limit it; although the present application is described in detail with reference to the above embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features therein by equivalent; and these modifications or replacements do not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solution of each embodiment of the present application, and should be included in the protection scope of the present application. The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present invention.

Claims

1. A method for migrating a network edge control device to a Hongmeng system, characterized in that: The method comprises: Create a container engine based on Hongmeng OS; Obtain a source operating system image, where the source operating system is a system heterogeneous to the Hongmeng operating system; Importing the source operating system image into the container engine based on the Hongmeng operating system; Containerize the relevant programs of the network edge control device based on the Hongmeng operating system in the container engine that has imported the source operating system image; According to the resource management characteristics of the Hongmeng operating system, the operating environment of the container engine that has imported the source operating system image is tuned, and the tuning includes: optimizing container configuration, adjusting kernel parameters, using dedicated storage solutions, optimizing container images, and application-level optimization. The optimization of container configuration includes resource restrictions, adjusting priorities, and memory management. The adjustment of kernel parameters includes kernel tuning and network optimization. The use of dedicated storage solutions includes efficient storage and storage drivers. The optimization of container images includes image size optimization and multi-stage construction. The application-level optimization includes code optimization as well as concurrency and asynchrony. The related programs of the network edge control device based on the Hongmeng operating system running in the container engine are securely isolated from the Hongmeng operating system, including one of the following six methods or any combination: 1) limiting the amount of resources that can be used by the container after the source operating system image is instantiated through a control group; 2) configuring corresponding policies to limit the capabilities of the container process after the source operating system image is instantiated; 3) only including necessary packages and applications when creating the source operating system image, and removing all unnecessary services and tools; 4) reducing the system core capabilities of the container process after the source operating system image is instantiated; 5) using network namespaces and virtual network interfaces to isolate the network traffic of the container after the source operating system image is instantiated; 6) auditing and monitoring the container activities and possible security incidents after the source operating system image is instantiated, or using tools to detect abnormal container behavior after the source operating system image is instantiated; The importing of the source operating system image into the container engine based on the Hongmeng operating system includes: 1) configuring the container engine on the Hongmeng operating system, including network configuration, storage volume configuration and security settings; 2) using corresponding commands in the container engine on the Hongmeng operating system to pull and run the source operating system image; 3) after running the container, verifying and testing to ensure that the application works as expected, including testing network connections, data volume mounting, and other external dependencies; 4) using the CI / CD process to automate the image building, pushing and deployment process, and customize specific deployment scripts or configurations for the Hongmeng operating system.

2. The method for migrating a network edge control device to a Hongmeng system as claimed in claim 1, characterized in that: The creation of a container engine based on the Hongmeng operating system includes: Setting up an environment suitable for kernel development and system programming on the Hongmeng operating system; Port or newly develop a container engine in the environment suitable for kernel development and system programming; Use the ported or newly developed container engine to manage container images that follow the Open Container Initiative (OCI) standard.

3. The method for migrating a network edge control device to a Hongmeng system as claimed in claim 2, characterized in that: The use of the transplanted or newly developed container engine to manage container images that comply with the Open Container Initiative (OCI) standard includes: Create a parser that can be used to parse container images that follow the OCI standard; The parser is used to parse the container parameters defined in the OCI configuration file; In the container engine, a container image complying with the Open Container Initiative (OCI) standard is managed based on the parsed container parameters.

4. The method for migrating a network edge control device to a Hongmeng system as claimed in claim 1, characterized in that: The container engine that has imported the source operating system image containerizes the relevant programs of the network edge control device based on the Hongmeng operating system, including: Adding the installation files and configuration files of the relevant programs of the network edge control device to the source operating system image imported into the container engine; Set a command to start the related program when the container engine starts.

5. A device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

6. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • A container management method and device in a Docker system

    CN108984268A