DEV Community

ZHZL-m
ZHZL-m

Posted on

【Journey of HarmonyOS Next】HarmonyOS Overview (1)

Image description

1 -> Introduction to HarmonyOS
HarmonyOS is an all-scenario distributed operating system developed by Huawei that aims to provide a seamless collaboration experience for multiple devices. The design concept of the HarmonyOS system is "future-oriented, all-scenario-oriented" and supports a variety of device types, including smartphones, tablets, smart wearable devices, smart screens, etc.

2 -> History of HarmonyOS
The development of the HarmonyOS system dates back to 2019, when the U.S. Department of Commerce blacklisted Huawei, preventing it from purchasing components and technology from U.S. manufacturers. In response, Huawei released the first generation of the HarmonyOS operating system. With the passage of time, the HarmonyOS system has been continuously iteratively upgraded, realizing all the self-development of the system base, and becoming the world's third largest mobile operating system after Apple's iOS and Android systems.

3 -> HarmonyOS technical features
3.1 -> Hardware mutual assistance and resource sharing
Hardware mutual assistance and resource sharing can be realized between multiple devices, and the key technologies that rely on include distributed soft bus, distributed device virtualization, distributed data management, and distributed task scheduling.

3.1.1 -> Distributed soft bus
The distributed soft bus is the communication base of distributed devices such as mobile phones, tablets, smart wearables, smart screens, and car machines, like an invisible bridge, providing a unified distributed communication capability for the interconnection between devices, and creating conditions for non-inductive discovery and zero-waiting transmission between devices. Developers only need to focus on the implementation of business logic, and do not need to pay attention to the networking mode and underlying protocol.

Application Scenarios:

Smart home control: Through the distributed soft bus, users can use mobile phones or other smart devices to control various smart appliances in the home, such as lights, air conditioners, curtains, etc. For example, users can turn on the air conditioner in their home in advance with their mobile phone on the way home, or control the curtains to be automatically opened from their mobile phone when they get up.
Virtual Reality (VR) and Augmented Reality (AR): In VR and AR applications, distributed soft buses can be used to connect headsets to other devices for a more immersive experience. For example, with a distributed soft bus, VR devices can be connected to external cameras to integrate real-world scenes into a virtual environment.
In the field of education, distributed soft buses can be used to connect students' electronic devices (such as tablets and laptops) with teachers' teaching devices to achieve synchronous display and interaction of teaching content.
3.1.2 -> Distributed device virtualization
The distributed device virtualization platform can realize resource fusion, device management, and data processing of different devices, and a variety of devices can form a super virtual terminal. For different types of tasks, we match and select appropriate execution hardware for users, so that services can flow continuously between different devices, and give full play to the capabilities of different devices, such as display capabilities, camera capabilities, audio capabilities, interaction capabilities, and sensor capabilities.

Application Scenarios:

Game scenes: When playing games, you can virtualize the hardware capabilities of your phone (such as gravity sensors, accelerometers, touch capabilities, etc.) into game controllers to provide players with a more convenient and smooth gaming experience. For example, when playing a racing game, you can use your phone as a steering wheel to control the direction of the car in the game through the phone's gravity sensing.
Video call scenario: When users are doing housework or other things, they can connect their mobile phones with smart TVs or other large-screen devices, and virtualize the screen and camera of large-screen devices into local resources, replacing the phone's own screen and camera, so that they can make video calls while doing other things.
Multi-screen collaborative office: In work scenarios, hardware resources such as screens, keyboards, and mice of mobile phones, tablets, and laptops can be virtualized to achieve multi-screen collaborative office. For example, users can start editing a document on their phone and then seamlessly switch to a tablet or laptop to continue editing, with all changes synced in real-time to increase productivity.
Education scenario: In the field of education, the hardware resources of students' electronic devices (such as tablets and laptops) and teachers' teaching equipment (such as smart blackboards and projectors) can be virtualized to realize the synchronous display and interaction of teaching content. Teachers can control the display of instructional content on students' devices on their own devices, or students can display their work or work to the teacher's teaching devices through virtualization technology.
3.1.3 -> Distributed data management
Distributed data management is based on the capabilities of distributed soft buses to achieve distributed management of application data and user data. User data is no longer bound to a single physical device, business logic is separated from data storage, and cross-device data processing is as convenient and fast as local data processing, allowing developers to easily store, share, and access data in all scenarios and multiple devices, creating the basic conditions for creating a consistent and smooth user experience.

Application Scenarios:

Smart home control: In smart home scenarios, users can use their mobile phones to control smart devices in their homes, such as lights, air conditioners, TVs, etc. HarmonyOS's distributed data management capabilities allow phones to seamlessly connect with these devices, allowing users to control their entire home environment without having to switch between different apps. For example, when a user goes home, the phone can automatically connect to a smart door lock at home, and after identifying the user, it can automatically turn on the lights, adjust the temperature of the air conditioner, and play the user's favorite programs on the TV according to the user's habits.
Distributed office collaboration: For enterprise office scenarios, distributed data management can realize multi-device collaborative office. Employees can edit documents on their phones and then seamlessly switch to their tablets or computers to continue editing, with changes to the document synced to all devices in real time. In addition, in the meeting, participants can use distributed screen projection technology to project content from their mobile phones or tablets to the big screen for easy display and sharing. At the same time, distributed task scheduling can distribute complex computing tasks to high-performance devices to improve work efficiency.
Game applications and multi-person collaboration applications: Distributed data objects can be used for cross-device migration and multi-terminal collaboration. For example, in a gaming app, players can sync their game progress and data across different devices, enabling a seamless switching experience. In multi-person collaboration apps, team members can synchronize and edit documents, tables, and other data in real time on their respective devices to improve collaboration efficiency.
3.1.4 -> Distributed task scheduling
Based on the technical characteristics of distributed soft bus, distributed data management, distributed profile, etc., distributed task scheduling builds a unified distributed service management (discovery, synchronization, registration, and call) mechanism, which supports remote startup, remote call, remote connection, and migration of cross-device applications, and can select appropriate devices to run distributed tasks according to the capabilities, locations, business running status, resource usage, and user habits and intentions of different devices.

Application Scenarios:

Smart home control: In smart home scenarios, users can control smart devices in their homes, such as lights, air conditioners, and TVs, through their mobile phones. HarmonyOS's distributed task scheduling capabilities allow phones to seamlessly connect with these devices, allowing users to control their entire home environment without having to switch between different apps. For example, when a user goes home, the phone can automatically connect to a smart door lock at home, and after identifying the user, it can automatically turn on the lights, adjust the temperature of the air conditioner, and play the user's favorite programs on the TV according to the user's habits.
Distributed office collaboration: For enterprise office scenarios, distributed task scheduling can realize multi-device collaborative office. Employees can edit documents on their phones and then seamlessly switch to their tablets or computers to continue editing, with changes to the document synced to all devices in real time. In addition, in the meeting, participants can use distributed screen projection technology to project content from their mobile phones or tablets to the big screen for easy display and sharing. At the same time, distributed task scheduling can distribute complex computing tasks to high-performance devices to improve work efficiency.
Game applications and multiplayer collaboration applications: Distributed task scheduling can be used for cross-device migration and multi-terminal collaboration. For example, in a gaming app, players can sync their game progress and data across different devices, enabling a seamless switching experience. In multi-person collaboration apps, team members can synchronize and edit documents, tables, and other data in real time on their respective devices to improve collaboration efficiency.
Mobile payment: Users can complete payment operations on the watch, while the actual payment processing is completed by mobile phones, improving the security and convenience of payment. This cross-device payment method relies on HarmonyOS's distributed task scheduling capabilities to ensure the secure transmission and processing of payment data between different devices.
3.1.5 -> Distributed connectivity capabilities
The distributed connection capability provides the connection capability between the bottom layer and the application layer of the intelligent terminal, and shares some hardware resources and software capabilities of the terminal through the USB interface. Based on distributed connection capabilities, developers can develop corresponding forms of ecological products to provide consumers with a richer connection experience.

Distributed connectivity capabilities include the underlying capabilities (Connect Service) and application layer capabilities (AILife Client Service).

The underlying capability (Connect Service) involves the following modules:
Terminal USB: The USB module on the smart terminal side can supply power to USB ecological products, and is the physical interface connecting smart terminals and ecological products.
Access management: The intelligent terminal provides a unified interface for communicating with ecological products.
Communication framework: unified management of network search, signal display, and external interface through the access management module.
The application layer capability (AILife Client Service) involves the following modules:
Smart life: A public development platform for ecological products, which can connect to USB ecological devices and create access cards.
Application Scenarios:

USB module: The USB module on the ecological accessories side is used to establish a physical connection with the USB of the smart terminal.
Functional modules: Ecosystem partners develop equipment systems and functions according to needs.
Accessory plug-ins: Ecosystem partners develop ecosystem accessory functions based on AILife Client Service capabilities.
3.2 -> One-time development, multi-terminal deployment
HarmonyOS provides a user program framework, an ability framework, and a UI framework to support the reuse of business logic and interface logic for multiple devices in the application development process, enabling one-time application development and multi-terminal deployment, improving the efficiency of cross-device application development.

Among them, the UI framework supports two development languages, Java and JS, and provides rich polymorphic controls, which can display different UI effects on mobile phones, tablets, smart wearables, smart screens, and car machines. Adopting the mainstream design methods in the industry, it provides a variety of responsive layout solutions, supports raster layout, and meets the interface adaptability of different screens.

3.3 -> Unified OS, flexible deployment
HarmonyOS supports the flexible deployment of multiple devices on demand through componentization and miniaturization, adapting to different types of hardware resources and functional requirements. It supports the automatic generation of componentized dependencies through the compilation chain relationship, forms a component tree dependency graph, supports the convenient development of product systems, and lowers the development threshold of hardware devices.

Support the selection of each component (optional component): You can choose the required component according to the form and requirements of the hardware.
Supports the configuration of function sets in components (components can be large or small): You can configure the function sets in a component based on the resources and functional requirements of the hardware. For example, select to configure some of the controls in the Graphics Framework component.
Support the association of dependencies between components (the platform can be large or small): According to the compilation chain relationship, componentized dependencies can be automatically generated. For example, selecting a graphics framework component will automatically select dependent graphics engine components, and so on.

Top comments (0)