A lightweight application adaptation method for edge computing heterogeneous environments
By building automated pipelines through cross-compilation and virtualization technologies, encapsulating hardware compilers and using containerized cross-compilation environments, we solve the adaptation problem of edge computing applications in heterogeneous environments and achieve unified compilation and adaptation across heterogeneous environments. , simplifying the development process and improving efficiency.
Patent Information
- Application Number
- CN202110894630.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-05
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-08-05
AI Technical Summary
Edge computing applications need to be independently constructed and adapted to different compilation and running environments in heterogeneous environments, resulting in intensive development time and energy, which is time-consuming and labor-intensive.
Use cross-compilation technology and virtualization technology to build an automated pipeline-driven integrated development environment, encapsulate the compiler of the hardware environment, use the containerized cross-compilation environment to automatically concatenate compilation steps, generate a unified workflow framework, support heterogeneous CPU environments, and pass The hardware abstraction layer and software conversion layer provide a unified interface and isolate hardware differences.
It achieves unified application compilation and adaptation in heterogeneous environments, reduces repeated compilation requirements, simplifies the development process, improves efficiency and resource utilization, and supports multiple edge computing operating system environments.
Smart Images

Figure CN113687913B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of edge computing operating system technology, and in particular to a lightweight application adaptation method for edge computing heterogeneous environments. Background Art
[0002] With the large-scale application of edge computing, edge operating systems are facing increasingly complex challenges in edge environments, among which the adaptation of heterogeneous platforms is an important part. On the one hand, edge computing operating systems need to be applicable to different architectures, and on the other hand, they need to support lightweight virtual systems to adapt to heterogeneous platforms.
[0003] Edge computing involves a large number of terminal devices and edge nodes, which are the front-ends of data collection, data aggregation, data integration, and data processing. These devices are often heterogeneous and come from different manufacturers, with different data interfaces, different data structures, different transmission protocols, and different underlying platforms. The edge computing operating system uses architectural abstraction to isolate the underlying heterogeneous hardware, and uses the conversion layer between the operating system and the virtual environment to help the virtual environment itself adapt.
[0004] Given that edge computing has very different environmental data in different application scenarios, there are many edge operating systems designed for these scenarios. In the smart home scenario, the practice of connecting to the cloud computing center only through a wifi module is far from meeting the needs of smart homes. EdgeOSH is an edge operating system designed for smart homes. It is deployed in the edge gateway of the home and connects the upper-layer applications and the lower-layer smart home hardware through 3-layer functional abstraction. With this operating system, it is easier to connect and manage smart home devices within the home, and process the data generated by these devices locally, reducing the load on the data transmission bandwidth. At the same time, application service programs based on EdgeOSH can provide users with better resource management and allocation.
[0005] Edge computing operating systems are oriented to various edge computing tasks, and their service management layer should meet the requirements of differentiation, scalability, isolation, and reliability. PhiOS is an edge operating system for smart home devices, which introduces a lightweight REST engine and LUA interpreter to help users deploy computing tasks on home edge devices. OpenVDAP is a data analysis platform designed for automotive scenarios. It proposes EdgeOSv, an edge operating system for connected car scenarios, which can provide tasks elastic management, data sharing, and security and privacy protection.
[0006] The complex edge computing environment requires the edge computing operating system to use architectural abstraction to isolate the underlying heterogeneous hardware, and use the conversion layer between the operating system and the virtual environment to help the virtual environment itself adapt.
[0007] The current problem is that edge computing applications must be built independently to adapt to different edge computing heterogeneous environments. Developing edge computing applications requires a lot of time and energy to build various edge computing compilation and running environments and prepare components for different heterogeneous environments, which is time-consuming and labor-intensive.
[0008] In view of the above situation, the present invention proposes a lightweight application adaptation method for edge computing heterogeneous environment. Summary of the invention
[0009] In order to overcome the deficiencies of the prior art, the present invention provides a simple and efficient lightweight application adaptation method for edge computing heterogeneous environments.
[0010] The present invention is achieved through the following technical solutions:
[0011] A lightweight application adaptation method for edge computing heterogeneous environments, characterized by: combining cross-compilation technology and virtualization technology to build an automated pipeline-driven integrated development environment, encapsulating compilers for different hardware environments, using a containerized cross-compilation environment to automatically connect different steps and tasks in the compilation process, providing a unified workflow framework for heterogeneous environments, combining the code to be compiled with the compilation tool using container persistence, and the container automatically running the compilation pipeline to finally generate executable programs for each heterogeneous environment, thereby conveniently building edge computing applications across heterogeneous environments, adapting to various edge computing operating system environments, and supporting heterogeneous CPU environments.
[0012] During the system initialization phase, a hardware abstraction layer is built for the edge computing operating system to communicate directly with the hardware and provide abstract support for the application layer. The kernel layer of the heterogeneous environment provides services to the application layer in the form of an API (application programming interface), so that each software module of the application layer is independent and does not affect each other.
[0013] The object-oriented design method is used to encapsulate data and operations on data in the module entity of the object. The outside world cannot directly access and operate the internal part of the object, but can only access it indirectly through messages.
[0014] The hardware abstraction layer is further refined into several sub-layers by adopting the hierarchical design method. Uniform interface calls are defined between the sub-layers, thereby isolating the hardware-related and hardware-independent parts of the program code in the edge operating system, so that the hardware abstraction layer provides an interface that has shielded hardware differences for the software modules of the application layer.
[0015] After the system initialization phase is over, the edge computing operating system obtains control of the system, and the hardware abstraction layer becomes responsible for providing services to the edge computing operating system, converting application layer calls into direct access and control of the hardware, and establishing hardware-related drivers.
[0016] The application layer maps the driver function to the API of the hardware abstraction layer. The modified driver no longer interacts with the hardware directly, but accesses and controls the hardware resources through the API of the hardware abstraction layer. The driver table establishes a connection between the general Create function and the device-specified Create through a pointer to the internal driver function UARTlCreate().
[0017] Use the tool functions provided by the I / O subsystem to install or delete the hardware abstraction layer API into the driver table.
[0018] A software translation layer is built between the physical server and the edge computing operating system to coordinate access to all physical devices and lightweight virtual machines on the server, and to support multi-workload migration without interruption. When the server starts and executes the software translation layer, an appropriate amount of memory, CPU, network, and disk resources are allocated to each lightweight virtual machine container, and the client operating systems of all virtual machine containers are loaded.
[0019] Linux is used as a software conversion layer. The cross-compilation technology includes using an arm-linux-gcc compiler on a Linux PC to compile executable code for the Linux ARM platform.
[0020] The virtualization technology adopts Docker container virtualization technology, VMware virtual machine software or Citrix virtualization application program.
[0021] The automated pipeline driver may be a Jenkins tool, a GitLab CI (GitLab Continuous Integration) tool or a Circle CI technology.
[0022] The compiler adopts a cross compiler arm-linux-gcc, armv7-rpi2-linux-gnueabihf or armv6-rpi-linux-gnueabi.
[0023] The edge computing operating system environment adopts a microkernel operating system, a container kernel operating system or a real-time kernel operating system.
[0024] The beneficial effect of the present invention is that the lightweight application adaptation method for edge computing heterogeneous environments provides a unified calling method for applications, solving the problem of repeatedly compiling applications in heterogeneous environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present invention 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Attached Figure 1 It is a schematic diagram of the mapping relationship between the standard I / O functions and the API set of the present invention.
[0027] Attached Figure 2 It is a schematic diagram of the association between the I / O driver table, the device table and the hardware architecture abstract API of the present invention.
[0028] Attached Figure 3 A schematic diagram of a lightweight application adaptation method for edge computing heterogeneous environments according to the present invention.
[0029] Attached Figure 4 This is a schematic diagram of the hierarchical architecture of the lightweight application adaptation method for edge computing heterogeneous environments of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0031] Compilation is the translation process from source code to target code that can be directly executed by a computer or virtual machine. The compiler can generate target code that runs in the same environment as the computer and operating system (platform) where the compiler itself is located, or it can generate target code that runs on other platforms. This kind of compiler is called a cross-compiler. Cross-compilers are very useful when generating new hardware platforms. Sometimes it is because the target platform does not allow or cannot install the compiler we need; sometimes it is because the resources on the target platform are scarce and the compiler we need cannot be run; sometimes it is because the target platform has not been established yet. In the present invention, the cross-compiler can solve the problem of repeated compilation in heterogeneous environments. Through the cross-compilation tool, we can compile executable programs for other platforms on a host platform with strong CPU power and sufficient storage space (such as a PC).
[0032] Regarding container virtualization technology, virtualization technology is an important technology for cloud computing, which is mainly used for pooling physical resources so that they can be flexibly allocated to users. Containers are also virtualization, but they are "lightweight" virtualization. Their purpose is the same as that of virtual machines, which is to create an "isolated environment". However, it is very different from virtual machines - virtual machines are resource isolation at the operating system level, while containers are essentially resource isolation at the process level. Containers provide isolated operating spaces for applications. Each container contains an exclusive complete user environment space, including the application to be deployed and the system environment it depends on. The same system kernel is shared between containers. Docker is a software container that solves operating environment and configuration problems. It is a container virtualization technology that facilitates continuous concentration and overall release. In the present invention, containerization technology mainly provides an operating environment for realizing lightweight heterogeneous adaptation technology, which is convenient for deployment and operation.
[0033] The pipeline is a multiple different tasks and jobs that convert source code into a releasable product, usually connected in series into a software "pipeline". After an automatic process is successfully completed, the next process in the pipeline will be started. It is a workflow framework that runs on a single node, connecting tasks that originally ran independently on a single or multiple nodes, and realizing complex process orchestration and visualization that are difficult to complete with a single task.
[0034] This lightweight application adaptation method for edge computing heterogeneous environments combines cross-compilation technology and virtualization technology to build an automated pipeline-driven integrated development environment, encapsulates compilers for different hardware environments, and uses a containerized cross-compilation environment to automatically connect different steps and tasks in the compilation process, providing a unified workflow framework for heterogeneous environments. The code to be compiled and the compilation tool are combined using container persistence. The container automatically runs the compilation pipeline to finally generate executable programs for each heterogeneous environment, thereby facilitating the construction of edge computing applications across heterogeneous environments, adapting to various edge computing operating system environments, and supporting heterogeneous CPU environments.
[0035] During the system initialization phase, a hardware abstraction layer is built for the edge computing operating system to communicate directly with the hardware and provide abstract support for the application layer. The kernel layer of the heterogeneous environment provides services to the application layer in the form of an API (application programming interface), so that each software module of the application layer is independent and does not affect each other.
[0036] When the application layer performs hardware operations, it does not need to understand the specific details of the device, which greatly reduces the complexity of system understanding and development. The interface and implementation are separated, and the specific functional blocks are hidden behind the abstract interface to ensure that each module can be changed without affecting other modules, and the dependency between modules is limited to the interface. The relationship between software modules is independent of each other, rather than a relationship of mutual dependence between levels.
[0037] Objects are a structured way of using modules. In order to improve the scalability, maintainability and reusability of software, object-oriented design methods are used to encapsulate data and operations on data in the module entity of the object. The outside world cannot directly access and operate the internal objects, but can only access indirectly through messages;
[0038] The hardware abstraction layer is further refined into several sub-layers by adopting the hierarchical design method. Uniform interface calls are defined between the sub-layers, thereby isolating the hardware-related and hardware-independent parts of the program code in the edge operating system, so that the hardware abstraction layer provides an interface that has shielded hardware differences for the software modules of the application layer.
[0039] In order to ensure the portability of the development language, object-oriented thinking is also introduced. Although C language cannot directly support object-oriented data structures, such as dynamic binding of data types, polymorphic functions or class inheritance, it can refer to the characteristics of object-oriented languages to implement objects based on C language during design, but it does not rely on it, thus greatly reducing the difficulty of system development.
[0040] After the system initialization phase is over, the edge computing operating system obtains control of the system, and the hardware abstraction layer becomes responsible for providing services to the edge computing operating system, converting application layer calls into direct access and control of the hardware, and establishing hardware-related drivers.
[0041] The application layer maps the driver function to the API of the hardware abstraction layer. The modified driver no longer interacts with the hardware directly, but accesses and controls the hardware resources through the API of the hardware abstraction layer. The driver table establishes a connection between the general Create function and the device-specified Create through a pointer to the internal driver function UARTlCreate().
[0042] Use the tool functions provided by the I / O subsystem to install or delete the hardware abstraction layer API into the driver table.
[0043] Attached Figure 1 The mapping relationship between the standard I / O functions of the hardware-related device driver and the hardware architecture abstract API set is shown in the figure. As can be seen from the figure, the second row and the Nth element of the driver table is a pointer to the internal driver function UARTlCreate(). This pointer establishes the connection between the general Create function and the device-specific Create.
[0044] A software translation layer is built between the physical server and the edge computing operating system to coordinate access to all physical devices and lightweight virtual machines on the server, and to support multi-workload migration without interruption. When the server starts and executes the software translation layer, an appropriate amount of memory, CPU, network, and disk resources are allocated to each lightweight virtual machine container, and the client operating systems of all virtual machine containers are loaded.
[0045] Software translation layers are to operating systems what operating systems are to processes. They provide independent virtual container hardware platforms for execution, which in turn provide full access to the virtual space of the underlying devices. Lightweight virtualization is the process of hiding the underlying physical hardware through software translation layers so that multiple operating systems can use and share it transparently. In a typical layered architecture, the layer that provides platform virtualization is the software translation layer. Guest operating systems support heterogeneous container images because the hardware is virtualized specifically for these heterogeneous virtualized containers. For processes, the operating system virtualizes access to the underlying resources of the machine to the process. The software translation layer does the same thing, but its object is not the process, but the entire guest operating system.
[0046] At a high level, the software translation layer requires a few facilities to boot a guest operating system: a kernel image that needs to be driven, a configuration (such as an IP address and the amount of memory required), a disk and a network device. The disk and network devices are usually mapped to the machine's physical disks and network devices. Finally, a set of guest operating system tools are needed to boot and manage the guest operating system.
[0047] Linux is used as a software conversion layer. The cross-compilation technology includes using an arm-linux-gcc compiler on a Linux PC to compile executable code for the Linux ARM platform.
[0048] A key function achieved by a simplified software translation layer architecture is to enable guest operating systems to run simultaneously with the host operating system. Developing a software translation layer based on Linux benefits from the steady progress of Linux and the large amount of work invested in improving Linux. From typical optimizations, bug fixes, scheduling and memory management innovations to support for different processor architectures, Linux is a platform that continues to improve. In addition to using the Linux platform as a software translation layer, it can also be used as an operating system. Therefore, in addition to running multiple guest operating systems on the Linux software translation layer, other traditional applications can be run at this level.
[0049] The virtualization technology adopts Docker container virtualization technology, VMware virtual machine software or Citrix virtualization application program.
[0050] The automated pipeline driver may be a Jenkins tool, a GitLab CI (GitLab Continuous Integration) tool or a Circle CI technology.
[0051] The compiler adopts a cross compiler arm-linux-gcc, armv7-rpi2-linux-gnueabihf or armv6-rpi-linux-gnueabi.
[0052] Build edge computing applications across heterogeneous environments, including healthcare, video analytics, smart home, mobile big data analytics, etc.
[0053] The edge computing operating system environment adopts a microkernel operating system, a container kernel operating system or a real-time kernel operating system.
[0054] In the heterogeneous CPU environment, CPU architectures include X86, ARM, RS64, Power PC, etc.
[0055] Compared with the existing technology, this lightweight application adaptation method for edge computing heterogeneous environment has the following characteristics:
[0056] First, it supports virtualization under heterogeneous computing architectures with different types of instruction sets and different architectures, fully leveraging the advantages of various computing units, achieving a balance in performance, cost, power consumption, portability, etc., and meeting the needs of edge computing business scenarios.
[0057] Second, the adoption of lightweight virtualization adaptation technology greatly reuses the resources of the host system, realizes more fine-grained isolation management of host resources, and has relatively low cost and performance loss, with better resource utilization. While providing an isolation mechanism, it realizes resource sharing, meeting the key requirements of edge computing scalability, multi-tenancy, security, privacy and flexibility.
[0058] Third, building a cross-compilation pipeline for edge computing heterogeneous environments based on virtualized container technology can easily build edge computing applications suitable for various heterogeneous environments; using the pipeline can manage the entire project life cycle, clarify the stages, and facilitate problem handling. In addition, the current heterogeneous environment can be placed in the project code for version management, which is easy to maintain.
[0059] The embodiment described above is only one specific implementation of the present invention. Common changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the protection scope of the present invention.
Claims
1. A lightweight application adaptation method for edge computing heterogeneous environment, characterized by: Combine cross-compilation technology and virtualization technology to build an automated pipeline-driven integrated development environment, encapsulate compilers for different hardware environments, use containerized cross-compilation environments to automatically connect different steps and tasks in the compilation process, provide a unified workflow framework for heterogeneous environments, combine the code to be compiled with the compilation tool using container persistence, and the container automatically runs the compilation pipeline to finally generate executable programs for each heterogeneous environment; During the system initialization phase, a hardware abstraction layer is built for the edge computing operating system to communicate directly with the hardware and provide abstract support for the application layer. The kernel layer of the heterogeneous environment provides services to the application layer in the form of APIs, so that each software module of the application layer is independent and does not affect each other. The object-oriented design method is used to encapsulate data and operations on data in the module entity of the object. The outside world cannot directly access and operate the internal part of the object, but can only access it indirectly through messages. The hardware abstraction layer is further refined into multiple sub-layers by adopting a hierarchical design method. Uniform interface calls are defined between the sub-layers, thereby isolating the hardware-related and hardware-independent parts of the program code in the edge operating system, so that the hardware abstraction layer provides an interface that has shielded hardware differences for the software modules of the application layer. After the system initialization phase is over, the edge computing operating system obtains system control, and the hardware abstraction layer is responsible for providing services to the edge computing operating system, converting application layer calls into direct access and control of the hardware, and establishing hardware-related drivers; The application layer maps the driver function to the API of the hardware abstraction layer. The modified driver no longer interacts with the hardware directly, but accesses and controls the hardware resources through the API of the hardware abstraction layer. The driver table establishes a connection between the general Create function and the device-specified Create through a pointer to the internal driver function UARTlCreate(). Use the tool functions provided by the I / O subsystem to install or delete the hardware abstraction layer API into the driver table; A software translation layer is built between the physical server and the edge computing operating system to coordinate access to all physical devices and lightweight virtual machines on the server, and to support multi-workload migration without interruption. When the server starts and executes the software translation layer, an appropriate amount of memory, CPU, network, and disk resources are allocated to each lightweight virtual machine container, and the client operating systems of all virtual machine containers are loaded.
2. The lightweight application adaptation method for edge computing heterogeneous environment according to claim 1 is characterized in that: Linux is used as a software conversion layer. The cross-compilation technology includes using an arm-linux-gcc compiler on a Linux PC to compile executable code for the Linux ARM platform.
3. The lightweight application adaptation method for edge computing heterogeneous environment according to claim 1 is characterized in that: The virtualization technology adopts Docker container virtualization technology, VMware virtual machine software or Citrix virtualization application program.
4. The lightweight application adaptation method for edge computing heterogeneous environment according to claim 1 is characterized in that: The automated pipeline driver uses Jenkins tool, GitLab CI tool or Circle CI technology.
5. The lightweight application adaptation method for edge computing heterogeneous environment according to claim 1 is characterized in that: The compiler adopts a cross compiler arm-linux-gcc, armv7-rpi2-linux-gnueabihf or armv6-rpi-linux-gnueabi.
6. The lightweight application adaptation method for edge computing heterogeneous environment according to claim 1 is characterized in that: The edge computing operating system environment adopts a microkernel operating system, a container kernel operating system or a real-time kernel operating system.
