Introduction to OpenHarmony hardware resource pooling architecture

As a distributed operating system for the era of full-scenario, full-connection, and full-intelligence, OpenHarmony integrates the capabilities of various terminal devices to achieve hardware mutual assistance and resource sharing, and provides users with a smooth full-scenario experience. In this issue, we introduce OpenHarmony's hardware resource pooling framework to reveal how OpenHarmony realizes multi-device collaboration.

1. Evolution of hardware resource access

Hardware resource access is the key to multi-device collaboration. Since the development of OpenHarmony, hardware resource access has undergone an evolution process from "one-to-one" to "one-to-many".

2.1 One to one

In the early stage of design, in order to solve the problem of coordination between the two devices, we integrated the hardware resources of the two devices through the distributed device virtualization platform provided by the system, realizing "one-to-one" hardware resource access.

insert image description here

Figure 1 "One-to-one" hardware resource access model

The application accesses the device virtualization platform by integrating the multi-device virtualization kit. The device virtualization platform provides data interaction between device A and device B as well as device virtualization capabilities, and then completes the application of device A to access the hardware capabilities of device B, realizing "one-to-one" hardware resource access. This access model can basically satisfy resource access between two devices, but there are also certain constraints:

● The first point is that applications need to integrate multi-device virtualization kits to access hardware resources, which increases the development workload.

● The second point is that this access model restricts the application of device A to only access the hardware capabilities of device B at the same time, that is, it can only complete "one-to-one" hardware resource access.

2.2 One-to-many

With the continuous deepening of smart life in all scenarios, the "one-to-one" device hardware resource access method can no longer meet the business needs of some complex scenarios. OpenHarmony continues to explore and innovate distributed technologies. By enhancing the virtualization capabilities of original distributed devices, it abstracts various hardware resources of multiple devices, such as screens, cameras, loudspeakers, keyboards, sensors, and memories, to form The unified hardware resource pool in the "Super Virtual Terminal" supports on-demand allocation and recombination of hardware resources, and truly realizes the global call of hardware resources. What kind of distributed hardware capability does the application need to use? It only needs to access the corresponding service and no longer needs to integrate the Kit; and the multiple hardware resources provided by the hardware resource pool can be accessed by different applications at the same time, realizing "one-to-many" Hardware resource access.

insert image description here

Figure 2 "One-to-many" hardware resource access model

Based on "hardware resource pooling", developers can select and match appropriate capability modules in the hardware resource pool according to different business scenarios, and give full play to the capability advantages of different devices, thereby building a new user experience.

2. Hardware resource pooling framework

Based on the innovative concept of "hardware resource pooling", OpenHarmony integrates hardware virtualization, hardware resource management, and hardware data management capabilities to build a hardware resource pooling framework and provides a unified hardware capability open interface for developers to easily implement application development. As shown in Figure 3, the hardware resource pooling framework abstracts the hardware resources of various devices and provides various distributed services for northbound applications, such as distributed cameras, distributed screens, distributed audio, and distributed input. Provide unified device management and distributed hardware framework to manage hardware resources.

insert image description here

Figure 3 Hardware resource pooling framework

The following is an introduction to the various components of the hardware resource pooling framework.

  1. Device Management (DeviceManager)

This component provides authenticated networking capabilities for account-independent distributed devices in the OpenHarmony system, and provides developers with a set of interfaces for distributed device discovery and authentication, as shown in Figure 4. Currently, the maximum number of devices that can be managed at the same time is 20 devices.

insert image description here

Figure 4 Device Management Components

For details, please refer to the code warehouse of the OpenHarmony project device management of the code cloud platform:

https://gitee.com/openharmony/device_manager

  1. Distributed Hardware Framework (DistributedHardwareFwk)

This component provides information management capabilities for hardware resource pooling. Its main capabilities include access management, capability query, status management, authority management, and version management.

For details, please refer to the code warehouse of the distributed hardware framework of the OpenHarmony project of the code cloud platform: https://gitee.com/openharmony/distributed_hardware_fwk

  1. Distributed Camera

This component provides the capability of cross-device camera access, abstracts the camera hardware capabilities of other terminal devices, and provides them as camera capabilities in the hardware resource pool for other devices to call.

For details, please refer to the code warehouse of the distributed camera of the OpenHarmony project of the code cloud platform: https://gitee.com/openharmony/distributed_camera

  1. Distributed Screen

This component provides cross-device screen capability calls, and provides the implementation of system projection, screen mirroring, and screen splitting capabilities for the OpenHarmony system framework.

For details, please refer to the code warehouse of the distributed screen of the OpenHarmony project of the code cloud platform: https://gitee.com/openharmony/distributed_screen

3. Subsequent planning

In addition to distributed cameras and distributed screens, the hardware resource pooling framework will also provide distributed audio and distributed input capabilities in subsequent versions. Distributed audio will provide hardware resource pooling capabilities for audio devices such as microphones, speakers, and handsets, and provide them to application developers through audio services, enabling developers to freely select, switch, and combine audio devices to improve user experience. Distributed input will provide hardware resource pooling capabilities for input devices such as keyboards and mice. Through input services, application developers can call input capabilities across devices to achieve multi-device collaboration.

The hardware resource pooling framework is still under construction, and we look forward to developers joining us to witness the infinite possibilities of the Internet of Everything era!

Guess you like

Origin blog.csdn.net/weixin_56796574/article/details/124501780