Virtualization service management method and electronic equipment

By adding system relay layer modules to the application framework layer, dynamically querying and converting the version types of the Android system layer, the compatibility problem of virtualization services under different Android versions is solved, and the stable operation of multi-screen collaborative services is achieved.

CN120256157APending Publication Date: 2025-07-04HONOR DEVICE CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202311808845.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The existing Android architecture cannot support different versions of virtualization services, resulting in compatibility issues for virtualization services in multi-screen collaborative services.

Method used

By adding the system relay layer module to the application framework layer, dynamically query the version types supported by the system layer, and converting between AIDL and HIDL process services, different versions of process service calls are supported.

Benefits of technology

It realizes compatibility of virtualized services under different Android versions, reduces the number of system-level accesses, improves business continuity and efficiency, and supports compatibility between old and new versions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256157A_ABST
    Figure CN120256157A_ABST
Patent Text Reader

Abstract

The invention discloses a method for managing virtualization services and electronic equipment, and is applied to the field of calling the virtualization services. Optionally, the method is applied to a scene in which the first electronic equipment and the second electronic equipment establish cooperative connection. The method comprises the steps that a first electronic device responds to an operation that a user confirms to establish a cooperative connection with a second electronic device, a first virtualization service is triggered and enabled, and the first virtualization service calls a first process service in a system layer; the first electronic equipment inquires a version type supported by a system layer; when the first process service supports the AIDL process, calling the AIDL process service; and when the first process service supports the HIDL process, calling the HIDL process service. The embodiment of the invention can support process services of different version types. In addition, the embodiment of the invention also supports dynamic update of the version type of the process service; in the process of dynamically updating the version, the process service which is being used is not influenced; and the latest updated version service can be used without waiting when the process service is called next time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of terminals, and specifically, to a method for managing virtualization services and an electronic device. Background Art

[0002] With the development of intelligent terminal technology, some services of intelligent terminals can be implemented by invoking virtualization services. Taking the multi-screen collaboration service as an example, when a user makes a video call using a mobile phone with a virtual camera function and also needs to work on a computer, the mobile phone and the computer can be multi-screen collaborated at this time, so that the computer can control the mobile phone to make a video call. With the development of Android versions and different implementation methods and opening requirements of system-level services, the original basic program framework opened based on the Android architecture cannot support virtualization services of different versions. Summary of the Invention

[0003] In view of this, this application provides a method for managing virtualization services, an electronic device, a computer-readable storage medium, and a computer program product, which can support process services of different version types.

[0004] In a first aspect, a method for managing virtualization services is provided, which is applied to a first electronic device. The method includes:

[0005] When establishing a collaborative connection with a second electronic device in any of the following ways: receiving a collaborative connection request from the second electronic device, scanning a QR code for establishing a collaborative connection, connecting to the second electronic device through a wired interface, displaying a first interface, where the first interface includes a first window, and the first window includes a first control;

[0006] In response to an operation of the user clicking the first control, enable a first virtualization service, and the first virtualization service invokes a first process service in the system layer;

[0007] Obtain version information corresponding to the first process service, where the version information includes the version type supported by the process service;

[0008] When the first process service supports a first system version, invoke the first process service under the first system version;

[0009] Or, when the first process service supports a second system version, invoke the first process service under the second system version;

[0010] Wherein, the first process service under the first system version and the first process service under the second system version are services of different version types.

[0011] Optionally, the first process service under the first system version is an HIDL process service, and the first process service under the second system version is an AIDL process service.

[0012] The above method can be executed by the first electronic device or a chip in the first electronic device. Based on the above solution, when the first electronic device and the second electronic device confirm the establishment of a collaborative connection, enable the first virtualization service, and the first virtualization service calls the first process service in the system layer; the first electronic device queries the version type supported by the system layer; when the first process service supports the AIDL process, call the AIDL process service; when the first process service supports the HIDL process, call the HIDL process service. The embodiments of the present application can support process services of different version types.

[0013] Optionally, when the first process service is loaded for the first time, its version information can be saved.

[0014] In some possible implementation manners, the method further includes:

[0015] Enable the second virtualization service, and the second virtualization service and the first virtualization service call the same process service in the system layer;

[0016] Obtain the version information corresponding to the first process service by querying the mapping table; wherein, the mapping table includes the version information corresponding to the first process service, and the mapping table is saved when the first process service is loaded for the first time.

[0017] Since the version information has been saved during the first loading, in this way, when enabling other virtualization services (such as the second virtualization service) that call the first process service subsequently, the saved version information can be directly queried for use, without repeatedly checking the service, reducing the number of accesses to the system layer.

[0018] In some possible implementation manners, the first virtualization service is a media audio speaker service, the second virtualization service is a call audio speaker service, and both the media audio speaker service and the call audio speaker service call the audio service in the system layer.

[0019] The embodiments of the present application support the invocation of the old version process service (HIDL process service), or in other words, are compatible with the invocation of both the new and old version process services. The following describes an example where the second process service called by the camera virtualization service supports the old version.

[0020] In some possible implementation manners, the method further includes:

[0021] When detecting a camera-related service, enable the camera virtualization service, and the camera virtualization service calls the second process service in the system layer;

[0022] Obtain the version information corresponding to the second process service;

[0023] In response to the version information corresponding to the second process service being the first system version, call the second process service under the first system version (for example, the camera HIDL service).

[0024] In some possible implementation manners, before obtaining the version information corresponding to the second process service, the method further includes:

[0025] In response to an operation of updating the system version, update the version information corresponding to the second process service, and the updated version information of the second process service is the second system version.

[0026] Optionally, the second process service under the first system version is an HIDL process service, and the second process service under the second system version is an AIDL process service.

[0027] In some possible implementation manners, the method further includes:

[0028] In response to an operation of notifying to exit the camera virtualization service, delete the version information corresponding to the second process service;

[0029] In response to an operation of triggering the camera virtualization service again, call the second process service under the second system version (for example, the camera AIDL service); wherein, when the camera virtualization service is triggered again, the update process of the version information corresponding to the second process service has been completed.

[0030] Before checking the version information corresponding to the second process service, a system version update can be performed to update the second process service from an HIDL process to an AIDL process. Since performing a system version update requires a certain process, it may be that when the second process service is currently in use, the update is still in progress; optionally, when the second process service is called next time, the version update process of the second process service has been completed. That is to say, during the execution of the system update, the user does not need to interrupt the service currently in use and can continue to use the old version of the process service to perform operations, without affecting the operations the user is currently using. And when the second process service is called next time, the latest updated version can be used.

[0031] In some possible implementation manners, in response to an operation of updating the system version, updating the version information corresponding to the second process service includes:

[0032] In response to an operation of the user clicking an update system control, update the version information corresponding to the second process service;

[0033] Alternatively, when the automatic update condition is met, the system version update is automatically performed, and the system version update includes: updating the version information corresponding to the second process service.

[0034] In some possible implementation manners, the first electronic device invokes the virtualization service in the system layer through a first interface; the first interface is used to execute the following interface process: by packing multiple commands in the main process and transparently transmitting the obtained JSON file to the system layer, so that the system layer parses the JSON file to obtain multiple parsed signaling messages. Through the first interface, dynamic compatibility of the system version can be achieved.

[0035] In some possible implementation manners, the first electronic device includes an application framework layer; the first module in the application framework layer loads a binary file from the system component module through a first call manner based on a unified protocol interface. The first call manner can be understood as a unified call manner. Compared with the prior art in which two binaries are loaded through two jni call manners, through the first call manner, the application framework layer can load one binary.

[0036] In a second aspect, an electronic device is provided, including a unit for executing any method in the first aspect. The electronic device may be a terminal or a chip inside the terminal. The electronic device includes a communication unit, a display unit, and a processing unit.

[0037] When the electronic device is a terminal, the processing unit may be a processor, the communication unit may be a communication interface, and the display unit may be a graphics processing module and a screen; the terminal may further include a memory for storing computer program code, and when the processor executes the computer program code stored in the memory, the terminal executes any method in the first aspect.

[0038] When the electronic device is a chip inside the terminal, the processing unit may be a logic processing unit inside the chip, the communication unit may be a communication interface, a pin, or a circuit, etc., and the display unit may be a graphics processing unit inside the chip; the chip may further include a memory, and the memory may be a memory inside the chip (for example, a register, a cache, etc.) or a memory located outside the chip (for example, a read-only memory, a random access memory, etc.); the memory is used to store computer program code, and when the processor executes the computer program code stored in the memory, the chip executes any method in the first aspect.

[0039] In a third aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores computer program code which, when run on an electronic device, causes the electronic device to execute any of the methods in the first aspect.

[0040] In a fourth aspect, a computer program product is provided. The computer program product includes computer program code which, when run on an electronic device, causes the electronic device to execute any of the methods in the first aspect.

[0041] In a fifth aspect, an embodiment of the present application provides a chip system. The chip system is applied to an electronic device and includes one or more processors for invoking computer instructions to cause the electronic device to execute the methods described in the first aspect and any possible implementation manner in the first aspect.

[0042] It can be understood that the electronic device provided in the second aspect, the computer-readable storage medium provided in the third aspect, the computer program product provided in the fourth aspect, and the chip system provided in the fifth aspect are all used to execute the methods provided in the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is an exemplary diagram of an application scenario of an embodiment of the present application;

[0044] Figure 2 is a software architecture diagram provided by an embodiment of the present application;

[0045] Figure 3 is a schematic block diagram of a system relay layer module of an embodiment of the present application;

[0046] Figure 4 is a schematic block diagram of a scheduling scheme provided by an embodiment of the present application;

[0047] Figure 5A is a timing example diagram for enabling virtualization services provided by an embodiment of the present application;

[0048] Figure 5B is an exemplary diagram of a user confirmation collaborative connection interface of an embodiment of the present application;

[0049] Figure 5C is another exemplary diagram of a user confirmation collaborative connection interface of an embodiment of the present application;

[0050] Figure 6A is another timing example diagram for enabling virtualization services provided by an embodiment of the present application;

[0051] Figure 6BIt is an example diagram of the system update interface;

[0052] Figure 6C It is an example diagram of an interface when the mobile phone receives a system update notification during the collaborative connection with the laptop;

[0053] Figure 6D It is an example diagram of the interface where the user sets the conditions for automatic system update;

[0054] Figure 7 It is an example diagram of a new interface process provided by the embodiments of the present application;

[0055] Figure 8 It is an example diagram of a calling method provided by the embodiments of the present application;

[0056] Figure 9 It is an example diagram of the method flow for managing virtualization services provided by the embodiments of the present application;

[0057] Figure 10 It is a schematic structural diagram of an electronic device applicable to the present application. Detailed implementation manners

[0058] Next, the technical solutions in the embodiments of the present application will be described in conjunction with the accompanying drawings.

[0059] In the embodiments of the present application, unless otherwise specified, the meaning of "a plurality" may be two or more.

[0060] The embodiments of the present application are applicable to electronic devices, and the electronic devices may be mobile phones, smart screens, tablet computers, wearable electronic devices, in-vehicle electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), projectors, artificial intelligence (AI) devices, wearable devices, in-vehicle devices, smart home devices, and / or smart city devices, etc. The embodiments of the present application do not impose special restrictions on the specific types of the electronic devices.

[0061] Embodiments of the present application are applicable to electronic devices that support virtualization functions or call virtualization capabilities. The virtualization function completes upper and lower layer scheduling in terms of virtualization services. In some embodiments, the electronic device supports multiple virtualization services. Optionally, the virtualization services include audio virtualization services (or virtual audio services), video virtualization services (or virtual video services), and so on. For example, the audio virtualization service includes virtual microphone services, virtual speaker services, etc. Also for example, the video virtualization service includes virtual camera services, etc.

[0062] Embodiments of the present application do not specifically limit the services for scheduling or triggering virtualization services. For example, when the user uses multi-screen collaboration services, super notification services, super incoming call services, or office services, the electronic device triggers the virtualization service.

[0063] In some application scenarios, taking the multi-screen collaboration service as an example, the first electronic device serves as the master device and can establish a communication connection with one or more second electronic devices, where the one or more second electronic devices serve as slave devices.

[0064] Embodiments of the present application do not specifically limit the communication connection method between the first electronic device and the second electronic device. The communication connection between the first electronic device and the second electronic device can be a wired connection (for example, connected through a USB cable), or a wireless connection. Among them, the wired connection refers to the method of establishing a connection through a wired interface. The wired interface includes but is not limited to: universal serial bus (USB) interface, Ethernet interface, high definition multimedia interface (HDMI) interface, video graphics array (VGA) interface, digital visual interface (DVI), serial interface, and so on. The wireless connection refers to the method of establishing a connection through a wireless communication interface. The wireless connection includes but is not limited to: wireless fidelity (Wi-Fi) connection, Bluetooth connection, infrared connection, NFC connection, ZigBee connection and other short-range connections, or can also be a long-range connection (the long-range connection includes but is not limited to mobile networks supporting 2G, 3G, 4G, 5G, 6G, and subsequent standard protocols). For example, the master device and the slave device can log in to the same user account (for example, the user's Honor account), and then establish a long-range connection through a server (for example, the multi-device collaboration server provided by Honor).

[0065] The following is described in combination with Figure 1 the application scenarios in Figure 1As shown, when user A makes a video call with user B (using mobile phone 103) using mobile phone 102, it is also necessary to use laptop 101 to handle some work at the same time. For convenience of operation, user A can perform multi-screen collaboration between mobile phone 102 (corresponding to the first electronic device) and laptop 101 (corresponding to the second electronic device). After establishing a collaborative connection between mobile phone 102 and laptop 101, the audio and video of mobile phone 102 can be switched to laptop 101. At this time, user A can control mobile phone 102 to make a video call through laptop 101.

[0066] After establishing a collaborative connection between mobile phone 102 and laptop 101, the audio and video of mobile phone 102 will be switched to laptop 101. Optionally, options can pop up on mobile phone 102 for the user to decide whether to switch the audio and video to laptop 101. If the user confirms to switch the audio and video to laptop 101, then the sound collection of the microphone will be collected from laptop 101. If user B (who is having a video call with user A) makes a sound, then the sound of user B will also be played from the speaker of laptop 101. At the same time, the picture captured by the camera of mobile phone 102 will also be switched to the picture captured by the camera of laptop 101.

[0067] As Figure 1 shown, the interface 11 displayed on mobile phone 102 is the interface after establishing a video call connection between mobile phone 102 and mobile phone 103. After the collaboration between mobile phone 102 and laptop 101, the interface displayed on laptop 101 includes interface 10. Interface 10 is the same as, or synchronized with, the interface 11 displayed on mobile phone 102.

[0068] In Figure 1 the multi-screen collaboration scenario shown, mobile phone 102 realizes collaboration with laptop 101 by invoking virtualized audio and video services (including virtualized audio service and virtualized video service).

[0069] It should be noted that Figure 1 only the multi-screen collaboration service is described as an example, and the embodiments of the present application are not limited thereto.

[0070] It should also be noted that for different types of services, the virtualized services invoked by the mobile phone can be the same or different, and the embodiments of the present application do not make any limitations in this regard.

[0071] It should be understood that Figure 1 the application scenarios shown only take mobile phones and laptops as examples for description, and the embodiments of the present application are not limited thereto. For example, mobile phone and tablet, mobile phone and smart screen, and mobile phone and mobile phone are also applicable to the embodiments of the present application.

[0072] The embodiment of the present application provides a method for managing virtualization services. By adding some modules (at least including a system relay layer) to the application framework layer in the software architecture and modifying the scheduling process of virtualization services, different service versions can be supported to run properly under the same system. The following will be combined with Figure 2 The relevant modules involved in the embodiment of the present application will be described with reference to the software architecture shown.

[0073] Figure 2 is the architecture diagram of the software system provided by the embodiment of the present application. The software system can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiment of the present application, taking the layered architecture as an example, the software system of the electronic device will be described exemplarily.

[0074] As Figure 2 shown, the software system adopting a layered architecture is divided into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the software system can be divided into five layers, from top to bottom, namely the application layer, the application framework layer, the system layer, the extension layer, and the kernel layer (linux kernel).

[0075] The application layer may include multiple applications, or a series of application packages (android application package, APK). In the embodiment of the present application, as Figure 2 shown, the application layer includes instant messaging software and multi-screen collaboration applications. The instant messaging software can be a system application or a third-party application, such as social applications like WeChat and QQ. In some embodiments, the multi-screen collaboration application is a system application.

[0076] For another example, as Figure 2 shown, the application layer may also include a gallery, a map, WIFI, Bluetooth, SMS, music, calls, navigation, video, and a camera.

[0077] The application framework layer provides application programming interfaces (API) and programming frameworks for the applications in the application layer. The application framework layer may include some predefined functions.

[0078] In the embodiment of the present application, a functional module for managing virtualization services is provided in the application framework layer. As Figure 2As shown in the figure, the application framework layer includes an interconnected service module. The interconnected service module includes an interface layer module, a connection layer module, and a system relay layer. Optionally, the application framework layer includes a device virtualization platform (distributed mobile sensing development platform, DMSDP) framework layer; the DMSDP framework layer includes an interconnected service module.

[0079] The interface layer module in the interconnected service is used to provide an interface to enable communication between the interconnected service module and the upper layer (application layer). For example, the interface layer module obtains requests from the application layer. For another example, the interface layer module sends signaling or data to the application layer. Exemplarily, the interface layer module is the DMSDP software development kit (SDK) interface layer module.

[0080] The connection layer module is an intermediate conversion layer used to connect the interface layer module and the system relay layer. The connection layer module can also be called the DMSDP (Wrapper) connection layer. When the system relay layer is first loaded, it obtains the service version supported by the system layer and converts the corresponding service version. For example, it converts the Android interface definition language (AIDL) service to V2 and the hardware abstraction layer interface definition language (HIDL) service to V1.

[0081] Among them, AIDL is a description language for an Android internal process communication interface. By defining an inter-process communication interface through AIDL, inter-process communication is achieved. AIDL is a solution for implementing remote procedure call (RPC) in the Android architecture.

[0082] The system relay layer is used to perform corresponding processing when the application layer business calls back the virtualization service. Exemplarily, the system relay layer is the DMSDP system relay layer.

[0083] In some embodiments, the system relay layer is used to update the version controller according to the AIDL and HIDL service configuration in the system layer (for example, Figure 3 the version control module shown in the figure).

[0084] Optionally, when the system relay layer checks the services in the system layer, it can preferentially read according to the AIDL version; if the AIDL service is not configured, it reads the HIDL service.

[0085] Exemplarily, when the system relay layer checks the services of the system layer, it checks whether the AIDL configuration file exists; if it exists, it continues to perform the AIDL service check. For persistent AIDL services, it is considered that the AIDL service is supported. For non-persistent AIDL services, it can attempt to obtain the service handle; if the service handle is obtained, it is considered that the AIDL service is supported. Among them, persistent AIDL services can be understood as services that are pulled up or started after the device is powered on.

[0086] Optionally, the AIDL configuration file can include version number, device identifier, product information, etc. For example, the form of the AIDL configuration file is AIDL manifest.

[0087] For example, for the camera virtualization service (which can also be simply referred to as the camera service or camera-related service), it is necessary to check both the camera registration service and the camera stream switching service. If both the camera registration service and the camera stream switching service pass the check (passing the check can be understood as: there is an AIDL configuration file corresponding to the camera AIDL service), it is considered that the system layer supports the camera AIDL service.

[0088] For example, for the audio virtualization service (which can also be simply referred to as the audio service or audio-related service), it is necessary to check both the microphone service and the speaker service. If both the microphone service and the speaker service pass (passing the check can be understood as: there is an AIDL configuration file corresponding to the audio AIDL service), it is considered that the system layer supports the audio AIDL service. For other cases, it is considered that the system layer only supports HIDL services.

[0089] Regarding the specific functions or roles of the interface layer module, connection layer module, and system relay layer, they will be described in detail in the Figure 5A or Figure 6A sequence shown later.

[0090] Optionally, the interconnection service module also includes a data processing module, a transmission channel, and capability collection. The data processing module is used to process service-related business data of the interconnection service, including but not limited to data collection, data parsing, data packaging, data conversion, data query, data storage, etc. The transmission channel is used to transmit data related to the interconnection service (or virtualization service). The capability collection module is used to collect relevant virtualization capabilities supported by the local device and the peer device (for example, the device for multi-screen collaboration with the local device). Exemplarily, the capability collection module is used to collect camera resolution information, the number of cameras, and the usage status of audio or video.

[0091] It can be understood that the application framework layer also includes other modules related to virtualization services. For example, optionally, Figure 2The device discovery service, device transmission service, device connection service, and collaboration assistant service shown in []. Among them, the device discovery service is used to provide a framework interface for virtual services related to device discovery. The device transmission service is used to provide a framework interface for virtual services related to device transmission functions. The device connection service is used to provide a framework interface for virtual services related to device connection functions. The collaboration assistant service is used to provide a framework interface for virtual services related to device collaboration functions.

[0092] Multiple functional modules may be included in the system layer. In the embodiments of the present application, the system layer provides an adaptation layer functional module for virtualization services. As Figure 2 shown, the system layer includes a camera virtualization adaptation layer and an audio virtualization adaptation layer. Among them, the audio virtualization adaptation layer is used to provide virtualization services related to audio. Optionally, the audio virtualization adaptation layer includes an audio AIDL service and an audio HIDL service.

[0093] In some embodiments, the audio virtualization adaptation layer includes virtualization services for different audio types, and the virtualization services for different audio types can be integrated into the same service module. For example, the audio AIDL service includes a media audio (audio) speaker service, a call audio (modem) speaker service, a media audio (audio) microphone service, and a call audio (modem) microphone service.

[0094] Among them, media audio includes but is not limited to: alarm sounds, message reminder sounds, or notification sounds, etc.; call audio can be understood as sounds related to people, including but not limited to: telephone call sounds, call recordings, etc.

[0095] The camera virtualization adaptation layer is used to provide virtualization services related to the camera. Optionally, the camera virtualization adaptation layer includes a camera AIDL service and a camera HIDL service.

[0096] In some embodiments, the camera virtualization adaptation layer includes camera virtualization services in different modes, and the camera virtualization services in different modes can be integrated into the same service module. For example, the camera AIDL service includes a camera registration service and a camera stream switching service.

[0097] It can be understood that other modules may also be included in the system layer. Optionally, as Figure 2 shown, the system layer further includes a multimedia platform, an audio framework, a codec module, etc. The functions of other respective modules can refer to the explanations in related technologies.

[0098] It can also be understood that the virtualization adaptation layer in the system layer can be differentiated according to the system layer configuration. Figure 2The descriptions herein are merely exemplary. For example, access to and communication with the camera HIDL service and the audio HIDL service can be maintained. Optionally, with the evolution of technology or the development of Android versions, Figure 2 it may also include relevant AIDL services (such as the camera AIDL service and the audio AIDL service), but does not include relevant HIDL services (such as the camera HIDL service and the audio HIDL service); or, it may also include some AIDL services and some HIDL services, such as the camera AIDL service and the audio HIDL service, etc.

[0099] Optionally, as Figure 2 shown, the system layer further includes a multimedia platform, an audio framework, a codec module, etc.

[0100] The extended layer refers to the extended layer of the hardware abstraction layer (HAL). As Figure 2 shown, the extended layer includes an audio module, a modem module, a sensor module, a camera module, and a virtual camera module. The extended layer can be understood as a layer re - encapsulated according to the usage mode of the system layer, used to solve the adaptation problem for different drivers.

[0101] It can be understood that Figure 2 the extended layer shown may also include other modules, and the embodiments of the present application are not limited thereto.

[0102] The kernel layer is used to drive hardware resources. Multiple driver modules can be included in the kernel layer. As Figure 2 shown, the kernel layer includes a display driver, a camera driver, a USB driver, a CPU driver, an audio driver, a network driver, a storage driver, and a print driver, etc.

[0103] Figure 2 In the software architecture shown, the application layer and the system service layer can communicate across processes. The communication method can adopt an inter - process communication mechanism (Binder), or rely on the Binder driver to achieve communication.

[0104] It should be understood that Figure 2 the layered structure shown does not constitute a specific limitation on the software system of the electronic device. In other embodiments of the present application, the software system of the electronic device may include more or fewer architectures than Figure 2 the layered architecture shown, or each layer architecture of the software system of the electronic device may include more or fewer components than Figure 2 the composition structure shown, and the embodiments of the present application are not limited thereto.

[0105] Taking the multi-screen collaboration application as an example, when the mobile phone responds to the user's operation of confirming multi-screen collaboration with the peer device, it triggers a request to enable the audio virtualization service. It should be understood that the description here is based on triggering the audio virtualization service as an example, and the embodiments of the present application are not limited to this. After the first electronic device and the second electronic device establish multi-screen collaboration, the audio virtualization service is usually started by default. The request to enable the audio virtualization service is passed from the application layer to the application framework layer. The system relay layer in the interconnected service in the application framework layer performs cross-process access to check the service version type supported by the lower layer (system layer). Specifically, the system relay layer checks the audio virtualization adaptation layer in the system layer to determine whether the audio virtualization service supports the audio AIDL service or the HIDL service. The system layer returns the result to the system relay layer in the interconnected service. The system relay layer continues to return the result to the connection layer module in the interconnected service. The connection layer module in the interconnected service converts the result into the corresponding version number (V2 or V1) for recording and returns the version number to the interface layer in the interconnected service. The interface layer in the interconnected service returns the result of successful enabling to the application layer.

[0106] Figure 3 The figure shows an example diagram of the system relay layer in the embodiments of the present application. As Figure 3 shown, the system relay layer includes a V2 interface module, a V1 interface module, a version control module, a management module, an HIDL scheduling module, and an AIDL scheduling module. Among them, the V2 interface module and the V1 interface module are connected to the upper-layer interconnected service interface. The upper-layer interconnected service interface can be the DMSDPWrapper interface. The V2 interface module needs to read the version control module to determine the version number supported by the lower layer. If the upper-layer interconnected service calls the V1 interface module, then it can be called according to the historical solution; if the upper-layer interconnected service calls the V2 interface module, it may be an old version (V1 version) or a new version (V2 version), then dynamic selection needs to be implemented according to the version control module. The encapsulation (Wrapper) management module is respectively connected to the V2 interface module and the V1 interface module. The encapsulation (Wrapper) management module is also connected to the HIDL scheduling module and the AIDL scheduling module to connect with the virtualization adaptation layer (including the virtualization adaptation layer HIDL service and the virtualization adaptation layer AIDL service) in the system layer when calling the corresponding service.

[0107] Figure 4 It is a schematic diagram of the historical solution of the virtualization service and the decoupling solution proposed in the present application. As Figure 4As shown, in the embodiments of the present application, during the process of loading virtualization services, first check the service version type in the system layer, or rather the chip service type, to determine whether it is an AIDL service or an HIDL service; subsequently, the system layer returns the check result to the system dependency library; the connection layer in the system dependency library converts the service type into a version number, namely version V1 or version V2. If version V2 is supported, then execute the V2 callback scheme; if version V1 service is supported, then execute the V1 callback scheme. The solution provided by the embodiments of the present application can be compatible with historical versions.

[0108] Furthermore, the embodiments of the present application support dynamic update of service versions, that is, after the service version in the system layer corresponding to the virtualization service is updated from an HIDL service to an AIDL service, the AIDL service can be called when the service is invoked next time.

[0109] Taking virtualization service 2 as an example, service 2 corresponds to callback V1; after callback 1 is processed by the system dependency library, it calls the HIDL service, and the HIDL service passes through the HIDL callback in HIDL chip service 2 to run virtualization service 2. After the HIDL update in HIDL chip service 2 is completed, the latest updated AIDL service can be called back the next time service 2 is enabled.

[0110] The above solution includes a callback scheme for the new version (V2) and a callback scheme for the old version (V1). After a service is triggered in the application layer, version judgment needs to be performed first, that is, detect the version type of the virtualization service being called. Or rather, determine whether its corresponding version type is V1 or V2, and return the check result to the system dependency library. After intermediate processing by the system dependency library, the version information can be returned to the application layer. The version information can be the new version (V2) or the old version (V1). When the virtualization service triggered in the application layer is the old version (V1), the scheduling can be executed through the Figure 4 shown callback scheme for the old version (V1). When the virtualization service triggered in the application layer is the new version (V2), the scheduling can be executed through the Figure 4 shown callback scheme for the new version (V2).

[0111] In some embodiments, the solution provided by the embodiments of the present application satisfies usability for both the new version of the Android system and the old version of the chip, as well as for the new version and the new version of the chip after the Android system version of the electronic device is updated. Or rather, the solution provided by the embodiments of the present application can be compatible with the high version of Android and the old version of the chip.

[0112] Refer to Figure 5A , Figure 5A which is a timing example diagram for enabling virtualization services in the embodiments of the present application.

[0113] In some embodiments, Figure 5AThe timing process shown can be applied to Figure 2 the software architecture shown. Optionally, Figure 5A the first service shown in Figure 2 is triggered by an application in the application layer in, for example, a multi-screen collaboration application or an instant messaging software application. Figure 5A The interface layer module shown in (for example, the DMSDP SDK interface layer) is Figure 2 the interface layer module shown in; Figure 5A The connection layer module shown in (for example, the DMSDP encapsulation Wrapper connection layer) is Figure 2 the connection layer module shown in; Figure 5A The relay layer module shown in can be Figure 2 the system relay layer shown in the application framework layer in; Figure 5A The AIDL process audio service shown in can be Figure 2 the audio AIDL service in the audio virtualization service shown in the system layer; Figure 5A The AIDL process video service shown in can be Figure 2 the camera AIDL service in the camera virtualization service shown in the system layer.

[0114] As Figure 5A shown in the enabling process 1, taking the first service as an example, the process of enabling the virtualization service includes the following steps:

[0115] Step 101, the first service in the application layer enables the first virtualization service.

[0116] In the embodiments of the present application, there are no specific limitations on the service and / or application that triggers the virtualization service. The first service is generally used to refer to a service that needs to trigger the virtualization service. For example, the first service is an office service, a multi-screen collaboration service, etc.

[0117] In the embodiments of the present application, there are no specific limitations on the application that initiates the first service. For example, the application can be a multi-screen collaboration application, an office application, a video call application, etc.

[0118] In the embodiments of the present application, there are no specific limitations on the quantity and / or type of the enabled virtualization service, which can specifically depend on the trigger of the service and / or the application implementation.

[0119] Generally speaking, for the multi-screen collaboration service, the first enabled is the audio service. Exemplarily, taking the multi-screen collaboration service as an example, the virtualization service enabled by the multi-screen collaboration service includes: enabling the audio speaker service and / or the audio microphone service.

[0120] The timing of enabling the virtualization service is described below from the perspective of UX interaction.

[0121] Generally speaking, for the multi-screen collaboration service, the first enabled service is the audio service. Exemplarily, taking the multi-screen collaboration service as an example, the virtualized services enabled by the multi-screen collaboration service include: enabling the media audio speaker service and / or the media audio microphone service.

[0122] The timing of enabling virtualized services is described below from the perspective of UX interaction.

[0123] In some scenarios, for the multi-screen collaboration service, when the multi-screen collaboration service is enabled, or when it is confirmed that the devices are collaborating, virtualized services are enabled. The embodiments of the present application do not specifically limit the operation of confirming the execution of multi-screen collaboration.

[0124] In some embodiments, through the "Bluetooth" function, the first electronic device realizes collaborative connection with the second electronic device. Exemplarily, the user turns on the "Multi-screen Collaboration" switch option on the PC side and turns on the Bluetooth function of the mobile phone. A connection interface is displayed on the mobile phone, and the interface includes a "Connect" control; the mobile phone initiates a collaborative connection in response to the user's operation of clicking the "Connect" control. After the connection is successful, the interface of the mobile phone will be synchronously displayed on the PC side. When the mobile phone detects the user's operation of clicking the "Connect" control, virtualized services can be enabled, such as audio virtualization services.

[0125] Figure 5B Shows an example of a collaborative connection interface. As Figure 5B As shown, assuming that the laptop 101 enables the multi-screen collaboration function and the mobile phone 102 turns on the "Bluetooth" function, a connection window 210 can pop up on the interface of the mobile phone 102. The window 210 includes a connect control and a cancel control. The window 210 is used to prompt the user that a connection can be established to achieve data sharing between devices. The mobile phone 102 starts to establish a connection with the laptop 101 in response to the user's operation of clicking the connect control. After the laptop 101 and the mobile phone 102 successfully establish a connection, the interface of the mobile phone 102 will be synchronously displayed on the laptop 101.

[0126] In some embodiments, through the "touch-to-touch" function or the "one-touch connection" function, the first electronic device realizes collaborative connection with the second electronic device. Exemplarily, by touching the magic-link label of the Honor laptop with the NFC area on the back of the mobile phone, the interconnection between the mobile phone and the laptop can be realized. It can be understood that this connection method requires both the mobile phone and the laptop to support the NFC function.

[0127] In some embodiments, through the scanning code function, the first electronic device realizes collaborative connection with the second electronic device. For example, as Figure 5CAs shown, the mobile phone 102 establishes a connection with the PC by scanning the QR code displayed on the laptop 101; after scanning the QR code displayed on the laptop 101, a connection interface is displayed on the mobile phone 102, and the connection interface includes a window 210, and the window 210 includes a "Connect" control; the mobile phone 102 initiates a collaborative connection in response to the user's operation of clicking the "Connect" control. After the laptop 101 and the mobile phone 102 successfully establish a connection, the interface of the mobile phone 102 will be synchronously displayed on the laptop 101.

[0128] In some embodiments, in response to the user's operation on the mobile phone, the first electronic device determines to establish a collaborative connection with the second electronic device. The user's operation on the mobile phone includes, but is not limited to: clicking an operation to confirm the connection in a window popped up on the screen, or clicking a shortcut key to achieve collaborative interconnection.

[0129] In some embodiments, after the first electronic device (such as a mobile phone) is connected to the second electronic device (such as a PC) through a data cable (such as a USB interface), a collaborative connection is established. Exemplarily, after the mobile phone is connected to the PC through a data cable, a connection interface pops up on the mobile phone, and the interface includes a "Connect" control; the mobile phone initiates a collaborative connection in response to the user's operation of clicking the "Connect" control.

[0130] In some other scenarios, there are other services (such as super incoming call, shared call) that enable virtualization services.

[0131] In some embodiments, the first electronic device (such as a mobile phone) and the second electronic device (such as a PC) do not establish a collaborative connection, but they are devices within the same trust ring. In the scenario of shared call, if the first electronic device receives an incoming call, then it will trigger the enabling of virtualization services.

[0132] Exemplarily, the mobile phone enters the "Super Terminal" interface, and the "Super Terminal" interface includes multiple intelligent devices; the mobile phone establishes a collaborative connection with the PC in response to the user's operation of clicking the PC in the interface.

[0133] Step 102-1, the interface layer attempts to obtain service information from the connection layer.

[0134] Optionally, after step 101, or rather, after the interface layer receives an instruction to enable the first virtualization service, it can attempt to obtain the corresponding service information from the connection layer.

[0135] Since there is a possibility that other services will also trigger the enabling of the first virtualization service, the interface layer can perform service query after receiving an instruction to enable the first virtualization service. Optionally, step 102-2, the interface layer performs device and service logic processing.

[0136] The purpose of introducing step 102-2 is to perform service checks or determine service usage. For example, the interface layer can check whether there are other services using the audio virtualization service, or whether the audio virtualization service is enabled repeatedly, or check whether the audio permission of the current device (such as a device that performs multi-screen collaboration with an electronic device) is enabled.

[0137] The embodiments of the present application do not limit the specific implementation manner of the interface layer to perform service checks. Exemplarily, the interface layer can determine whether the currently enabled first virtualization service is being used by checking mapping table A. The service usage situation can be obtained by querying the mapping table. If the first virtualization service is not being used by other services, then the subsequent steps can be continued; if there are other services using the first virtualization service, then an error is reported or the current process ends.

[0138] Step 102-2 can occur after step 101. Optionally, the embodiments of the present application do not specifically limit the execution sequence between step 102-2 and step 102-1. For example, step 102-2 is before step 102-1. Or, step 102-2 is after step 102-1.

[0139] Step 103, the connection layer first loads the system relay layer.

[0140] When first loading the system relay layer module, the connection layer can obtain the service version supported by the system layer, or the supported version status, from the relay layer.

[0141] Optionally, in the embodiments of the present application, the connection layer converts (or defines) the AIDL service supported by the system layer into version V2; and converts (or defines) the HIDL service into version V1.

[0142] Step 104, the system relay layer checks the process services in the system layer.

[0143] That is to say, the system relay layer determines which version of the service is supported by the process module of the lower layer (system layer) through cross-process access.

[0144] Taking the virtualization service enabled in step 101 as an audio service as an example, correspondingly, what is queried in step 104 is the version type supported by the audio service in the system layer. For example, as Figure 5A shown, the audio service supports the AIDL process service.

[0145] Step 105, the system layer returns the query result to the system relay layer.

[0146] Exemplarily, the audio service in the system layer returns the query result to the system relay layer.

[0147] In some embodiments, the query result is used to indicate whether the audio service in the system layer supports the AIDL process service, or rather, whether the version of the service that the first virtualization service needs to call in the system layer is version V2.

[0148] Exemplarily, for the first virtualization service, by checking the service support information, the result returned by the AIDL process is "supported", that is, the audio service supports the AIDL service.

[0149] Step 106, the system relay layer returns the result to the connection layer.

[0150] After obtaining the "supported" result returned by the system layer, the system relay layer returns this result to the connection layer.

[0151] Step 107-1, the connection layer records the version information.

[0152] After receiving the result returned by the system relay layer, the connection layer can perform version information recording, that is, save the version information supported by the virtualization service. The version information is used to indicate whether the virtualization service supports the AIDL service or the HIDL service. Optionally, the connection layer can name the versions that support the AIDL service and the HIDL service respectively through different version numbers. For example, if the version status supported by the virtualization adaptation layer in the system layer is the AIDL service, it is recorded as V2; if the version status supported by the virtualization adaptation layer in the system layer is the HIDL service, it is recorded as V1.

[0153] Exemplarily, after receiving the "supported" result returned by the system relay layer, the connection layer performs version information recording, that is, saves the version information supported by the audio service. For the case where the audio service supports the AIDL process service, the connection layer records the version information of the audio service as V2. Of course, if the result returned by the system relay layer is "not supported", that is, it does not support the AIDL process service or supports the HIDL process service, then the connection layer can record the version information as V1.

[0154] It can be understood that here, the audio service in the system layer supporting the AIDL process service is used as an example for description, and the embodiments of the present application are not limited thereto.

[0155] The embodiments of the present application do not specifically limit the way for the connection layer to save information. Exemplarily, the connection layer can save the version information supported by different types of services in the form of a mapping table or a mapping relationship, etc.

[0156] In some embodiments, for different types of services, the connection layer records their version information separately according to different types. For example, for audio services, it records the version information corresponding to audio services; for camera services, it records the version information corresponding to camera services.

[0157] Step 107-2, the connection layer returns a result to the interface layer.

[0158] After recording the version information, the connection layer will return a result to the interface layer. The returned result may include the version number supported by the virtualization service. For example, the returned result is "V2", which means the audio service supports version V2.

[0159] Step 107-3, the interface layer returns a result to the first service.

[0160] For the interface layer, when returning a result to the application layer, it will directly return the result of "enable success" without returning the version number. It can be understood that for the application layer, there is no need to return the version information. In the case where the system layer supports the AIDL service, it can directly notify the corresponding virtualization service in the application layer that its enable is successful.

[0161] Through the above enable process 1, after triggering the first virtualization service, by checking the version status supported by the system layer, the process of accessing the AIDL service can be realized.

[0162] The above enable process 1 introduced the process of enabling the first virtualization service. The following will introduce Figure 5A the process of enabling the second virtualization service (which can be simply referred to as "enable process 2"). Optionally, in Figure 5A it, the enable process 2 occurs after the enable process 1. The similarity between the enable process 2 and the enable process 1 is that they call the same type of virtualization service. For example, as Figure 5A shown, the first virtualization service is an audio speaker service, which calls the audio service module in the system layer; the second virtualization service is a modem service, which also calls the audio service module in the system layer. That is to say, the first virtualization service and the second virtualization service are services that call the same virtualization service module in the system layer.

[0163] In some embodiments, the first virtualization service and the second virtualization service correspond to the same type of service. Or rather, the first virtualization service and the second virtualization service call the same process service module (or virtualization service module) in the system layer. This means that if the first virtualization service is enabled first and the second virtualization service is enabled later, and the service version type supported by the system layer has been queried during the process of enabling the first virtualization service, then when enabling the second virtualization service, the connection layer module can know the version type of the audio virtualization service module corresponding to the second virtualization service by checking the historical information. Since the process of cross-process access is slow and takes a certain amount of time, in this way, by querying the historical information, there is no need to repeatedly execute the cross-process access of the system relay layer to the system layer to query the relevant process of the supported version status, which can save time.

[0164] It can be understood that Figure 5A The specific content of the first virtualization service and / or the second virtualization service shown in

[0165] Exemplarily, the first virtualization service is a media audio speaker service, and the second virtualization service is a call audio speaker service; when enabling the first virtualization service or the second virtualization service, the audio virtualization service module in the system layer is called.

[0166] Another exemplarily, the first virtualization service is a media audio microphone service, and the second virtualization service is a call audio microphone service; when enabling the first virtualization service or the second virtualization service, the audio virtualization service module in the system layer is called.

[0167] Another exemplarily, the first virtualization service is a media audio microphone service, and the second virtualization service is a call audio speaker service; when enabling the first virtualization service or the second virtualization service, the audio virtualization service module in the system layer is called.

[0168] As Figure 5A shown, the process of enabling the second virtualization service includes:

[0169] Step 201, the second service in the application layer enables the second virtualization service.

[0170] Optionally, for the multi-screen collaboration service, when the electronic device receives an incoming call, the call audio (modem) service will also be triggered.

[0171] Of course, the above is only described by taking the multi-screen collaboration service as an example, and the embodiments of the present application are not limited thereto. In fact, which virtualization services are enabled depends on the trigger of the service and / or the application implementation.

[0172] It should be noted that the above multiple virtualization services for enabling multi-screen collaboration services are also exemplary descriptions, and the embodiments of the present application are not limited thereto. For example, during the process of a user using an electronic device for multi-screen collaboration, if the electronic device receives a video call service, then the camera registration service also needs to be enabled. The process of enabling the album registration service will be described in detail later.

[0173] Exemplarily, taking the second service as the multi-screen collaboration service as an example, the virtualization services enabled by the multi-screen collaboration service may further include: enabling the call audio microphone (modem mic) service; enabling the call audio speaker (modem speaker) service, etc.

[0174] Step 202, the interface layer obtains service information from the connection layer.

[0175] The process of step 202 is similar to that of step 102, and the relevant description can be referred to the previous text. For the sake of brevity, it will not be repeated here.

[0176] Step 203, the connection layer checks the historical information.

[0177] It should be noted that the historical information refers to the version information of the connection layer historical record. In some embodiments, the recording process of the historical information may occur in step 107-1 of the foregoing enabling process 1. Since the version type of the service supported by the system layer has been queried in the foregoing enabling process 1, then in the enabling process 2, the connection layer module can directly check the historical information to obtain the version type of the audio virtualization service module corresponding to the second virtualization service, without having to perform the cross-process access process again, which can save time.

[0178] Step 204-1, the connection layer returns the result to the interface layer.

[0179] Optionally, the result returned by the connection layer to the interface layer includes "V2". The relevant description of step 204-1 can be referred to the description of step 107-2. For the sake of brevity, it will not be repeated here.

[0180] Step 204-2, the interface layer returns the result to the second service.

[0181] Step 204-2 is similar to the foregoing step 107-3, and the relevant description can be referred to the previous text. For the sake of brevity, it will not be repeated here.

[0182] Regarding the process of accessing the same type of virtualization service in the system layer, the foregoing is only described by taking two typical scenarios of enabling process 1 and enabling process 2 as examples, that is, enabling process 1 is the process of first loading the audio service, and enabling process 2 is the process of non-first loading the audio service. The embodiments of the present application are not limited thereto.

[0183] It should be understood that the enabled virtualization services may include a greater quantity and / or variety. Figure 5A The steps shown in Figure 5A are only exemplary descriptions.

[0184] It should also be understood that the embodiments of the present application do not specifically limit the sequence of the enabled virtualization services. However, for a certain virtualization service being called, if it is the first time to be loaded, its version information can be saved according to the process in the enabling process 1, so that the same type of virtualization service can be directly queried and used when it is loaded later. For example, in the enabling process 2, the mapping table saved in the connection layer in the enabling process 1 can be queried to obtain the corresponding version information.

[0185] As described above in connection with Figure 5A the situation of supporting the AIDL process when enabling the virtualization service, in some scenarios, there may be a situation where some virtualization services do not support the AIDL process but support the HIDL process. The situation of not supporting the AIDL process but supporting the HIDL process may be an old version of the virtualization service, and it can also be understood as a virtualization service that has not been upgraded or updated. The embodiments of the present application also provide solutions for the virtualization services in these scenarios to achieve dynamic compatibility with the old version of the virtualization service. The following will be described in connection with Figure 6A the timing diagram in Figure 6A .

[0186] It should be noted that Figure 6A the process in Figure 6A can be executed alone or in combination with Figure 5A The embodiments of the present application do not specifically limit this.

[0187] Optionally, when Figure 6A is combined with Figure 5A for implementation, Figure 6A and Figure 5A the process of Figure 5A can be implemented simultaneously, or the process in Figure 5A can be executed first, and then the process in Figure 6A is executed.

[0188] For the case of first executing Figure 5A and then executing Figure 6A taking the application scenario of multi-screen collaboration as an example, the electronic device defaults to enabling the audio virtualization service first; during the multi-screen collaboration process, if the electronic device receives a video call, it will also enable the camera virtualization service.

[0189] Regarding each module shown in Figure 6A the difference from Figure 5A is that: Figure 6A the system layer in Figure 6A includes a camera service that supports the HIDL process. The other modules are similar to those shown in Figure 5A and will not be elaborated here. As shown in Figure 6A it includes:

[0190] Step 301: The third service in the application layer enables the third virtualization service.

[0191] Optionally, the third virtualization service is a camera service, such as a camera registration service.

[0192] Exemplarily, when an application related to the camera (using video call) is opened, the camera service is enabled. Or rather, the third service is the video call service. Optionally, the video call service is a video call of a third-party application.

[0193] It can be understood that the above description is made by taking the third virtualization service as the camera registration service as an example, and the embodiments of the present application are not limited thereto.

[0194] It should be noted here that usually different services or rather application programs may call different services, that is, which type of service is specifically enabled (or the service is changed) depends on the service requirements and / or application triggers, and the embodiments of the present application do not make specific limitations thereto.

[0195] Exemplarily, for the connection between the electronic device and the intelligent learning desk lamp, or the Changlian phone service, the registration type service (such as the camera registration service) can be called; for the third-party video call service, the switching type service (such as the camera stream switching service) can be called.

[0196] Step 302-1: The interface layer attempts to obtain service information from the connection layer.

[0197] Optionally, in step 3 step 103, the connection layer loads the system relay layer for the first time.

[0198] Step 302-2: The interface layer executes device and service logic processing.

[0199] The relevant description of step 302-2 can refer to the description at step 102-2 above. For the sake of brevity, it will not be repeated here.

[0200] Exemplarily, the interface layer checks the usage of the camera registration service.

[0201] Step 303: The connection layer loads the system relay layer for the first time.

[0202] Step 304: The system relay layer executes the process check service in the system layer.

[0203] Step 305: The system layer returns the query result to the system relay layer.

[0204] In Figure 6AIn this case, the query result returned by the HIDL process to the system relay layer is "not supported". That is to say, for the third virtualization service triggered and enabled by the application layer, the system layer does not support the AIDL process.

[0205] Step 306, the system relay layer returns the result to the connection layer.

[0206] After obtaining the "not supported" result returned by the system layer, the system relay layer returns this result to the connection layer.

[0207] Step 307-1, the connection layer records the version information.

[0208] Correspondingly, the version information about the camera service recorded by the connection layer is "V1".

[0209] Step 307-2, the connection layer returns the result to the interface layer.

[0210] After recording the version information, the connection layer will return the result to the interface layer. The returned result can include the version number supported by the virtualization service. For example, the returned result is "V1", which means the camera service supports version V1.

[0211] Step 307-3, the interface layer returns the result to the third service.

[0212] For the interface layer, when returning the result to the application layer, it will directly return the result of "enable successful" without returning the version number. That is to say, for the service that supports the HIDL process, it can also directly notify the application layer that the corresponding virtualization service is enabled successfully.

[0213] Similarly, for the third virtualization service and the fourth virtualization service, they can also correspond to the same type of service. For example, the third virtualization service is the camera registration service, and the fourth virtualization service is the camera stream switching service. Both belong to the camera service. Regarding the relationship between the third virtualization service and the fourth virtualization service, reference can be made to the description of the first virtualization service and the second virtualization service above, which will not be elaborated here. The following combines Figure 6A in the enabling process 4 to describe the process of enabling the fourth virtualization service. It should be understood that for some descriptions in the steps involved in the process of enabling the fourth virtualization service, reference can be made to the description of the enabling process 2 above. Figure 5A in the enabling process 2.

[0214] As Figure 6A shown, the process of enabling the fourth virtualization service includes:

[0215] Step 401, the third service in the application layer enables the fourth virtualization service.

[0216] Step 402, the interface layer obtains the service information from the connection layer.

[0217] Step 403, the connection layer checks historical information.

[0218] Similarly, since the version information of the camera service was recorded as "V1" in the aforementioned step 307-1, the version information of the camera service queried here is "V1".

[0219] Step 404-1, the connection layer returns the result to the interface layer.

[0220] Optionally, the result returned by the connection layer to the interface layer includes "V1".

[0221] Step 404-2, the interface layer returns the result to the third service.

[0222] For the relevant description of step 404-2, reference can be made to the previous step 307-3. For the sake of brevity, it will not be elaborated here.

[0223] It can be understood that Figure 6A the above description takes the first loading of the HIDL process camera service in the system layer when enabling the camera registration service as an example, and the embodiments of the present application are not limited to this. For example, it can also be the first loading of the HIDL process camera service in the system layer when enabling the camera stream switching service. Of course, in the system relay layer, cross-process access only needs to be performed when the HIDL process camera service in the system layer is first loaded. For non-first loading situations, the connection layer can obtain the corresponding version number by checking the historical version information.

[0224] Figure 6A The enabling processes 3 and 4 in show camera services that do not support the AIDL process. In some scenarios, with system version upgrades or dynamic updates, some virtualization services that do not support the AIDL process will be updated to virtualization services that support the AIDL process through updates or upgrades. The embodiments of the present application provide embodiments for dynamically updating virtualization services, by performing dynamic updates during the process of enabling a certain virtualization service (or during the use of this virtualization service), and being able to use the latest version when enabling this virtualization service next time. Compared with the way of interrupting the current service usage during the upgrade service in the related upgrade service process, the method of the embodiments of the present application can achieve dynamic updates without interrupting the virtualization service being used (or interrupting the current service); and there is no need to wait when enabling this virtualization service next time, and the latest updated service can be directly used. The following is described in combination with Figure 6A the update process 5 shown in.

[0225] Figure 6AThe update process 5 shown includes: the system update module is used to update the HIDL process camera service in the system layer. After a period of time, the HIDL process camera service in the system layer has been updated to the AIDL process camera service.

[0226] During Figure 6A , the update process 5 occurs before the notification exit process 6. In this way, when the camera service is enabled again later, the updated camera service is used.

[0227] It should be understood that Figure 6A only the example of updating the version of the camera service in the system layer is described herein, and the embodiments of the present application are not limited thereto.

[0228] Optionally, after the version update of the virtualization service in the system layer is completed, the electronic device can complete related functions by restarting. Or, for some virtualization services, the electronic device can be used without restarting after the update is completed.

[0229] The embodiments of the present application do not limit the specific timing of the version update process of the virtualization service. In some embodiments, the version update process of the virtualization service may occur during the use of the virtualization service, or, after the system relay layer module checks the service and before the virtualization service is triggered next time.

[0230] The embodiments of the present application do not limit the manner in which the user performs the version update. Exemplarily, as Figure 6B shown in (1) in Figure 6B , the mobile phone responds to the operation of the user clicking on the settings application 1201 and displays Figure 6B the interface shown in (2) in Figure 6B . As shown in (2) in Figure 6B , the settings page includes a "System and Updates" control 1202. The mobile phone responds to the operation of the user clicking on the "System and Updates" control 1202 and displays the settings interface for "System and Updates". For example, the settings interface for "System and Updates" is as shown in (3) in Figure 6B , and this interface includes a software update option 1203. The mobile phone responds to the operation of the user clicking on the software update option 1203 and displays an interface for checking the system version. For example,

[0231] Alternatively, in some embodiments, in response to the user clicking the "Confirm System Update" control in the pop-up window, the electronic device performs the update in the background.

[0232] Alternatively, in some embodiments, when the first electronic device and the second electronic device are in multi-screen collaboration, the first electronic device performs the update in the background in response to the user clicking the "Confirm System Update" control on the collaborative device. For example, as Figure 6C shown, when the mobile phone 102 and the laptop 101 have established a multi-screen collaboration connection, a system update window pops up in the interface of the mobile phone 102. The mobile phone starts downloading the system file in response to the user clicking the "Download and Install" option in the system update window. Of course, the mobile phone can download the system file in the background; during the process of downloading the system file, the collaborative services between the mobile phone 102 and the laptop 101 can proceed normally. That is to say, during the collaboration process, the mobile phone performs a system update in response to the user's operation of confirming the update after receiving the update notification.

[0233] Alternatively, in some embodiments, if the user sets that the electronic device can automatically download and update under certain specific conditions, then after the corresponding conditions are met, the electronic device can automatically download and update.

[0234] For example, as Figure 6D shown in (1) below, the mobile phone displays the Figure 6D interface shown in (2) below in response to the user clicking the control 1301. As Figure 6D shown in (2) below, the interface includes a window 1302. The window 1302 includes the local settings option and the help option. The mobile phone displays the Figure 6D interface shown in (3) below in response to the user clicking the local settings option. As Figure 6D shown in (3) below, the interface includes the switch option for automatic download under WLAN and the switch option for night installation. Figure 6D In the interface shown in (3) below, both the switch option for automatic download under WLAN and the switch option for night installation are in the on state. That is to say, if the mobile phone detects that it is in the WLAN environment, it will automatically download the system file and automatically complete the installation at night. That is to say, during the collaboration process, after the update conditions are met, the mobile phone automatically performs a system update.

[0235] It can be understood that the above examples illustrate various ways of updating the system, and the embodiments of the present application are not limited thereto.

[0236] For the above update process, in the historical solution, the application framework layer cannot perform version updates during the use of a virtualization service. In the related art, it is necessary to wait until the current use of the virtualization service is completed, and after the application framework layer and the system layer are all updated, it can be used again. In the embodiments of the present application, during the use of a virtualization service, the system layer can be updated, and the latest service can be directly used when the virtualization service is triggered next time. From the user's perspective, there is no need to interrupt the current business, nor to wait for the update, and the latest updated service can be directly used. Moreover, by providing different version controls for multiple services, compatibility can be achieved on the same system version.

[0237] In some embodiments, during the execution of the business, the corresponding virtualization service can also be notified to exit.

[0238] It should be noted that, in some embodiments, enabling or disabling a virtualization service is essentially triggered by the business and can be considered as an active behavior of the user. Disabling a virtualization service will not affect the operation of other virtualization services.

[0239] In some embodiments, the notification to exit is triggered automatically due to certain exceptions in the system layer or based on certain mechanisms, resulting in the process exiting. The notification to exit is essentially related to the service process module in the system layer. If a service process module is notified to exit, then all services related to that process module will exit. For example, if the AIDL process audio service is notified to exit, then the enabled media audio virtualization service or the call audio speaker service will both exit. Another example is that when it is found in the background that some services consume too much power during operation, the process will be ended.

[0240] The following is described in combination with Figure 6A the notification exit process 6 shown in

[0241] Exemplarily, as Figure 6A the notification exit process 6 shown in

[0242] Step 501, the third business in the application layer notifies to exit.

[0243] Exemplarily, in response to the user hanging up the video call operation, the camera service exits.

[0244] The embodiments of the present application do not specifically limit the event that triggers the notification to exit. It can be triggered by the upper layer (such as the application layer) to notify to exit, or it can be triggered by the lower layer to notify to exit.

[0245] In some application scenarios, there may also be cases where the underlying event triggers the shutdown of the virtualization service or notifies the exit of the currently running virtualization service. Taking the camera virtualization service as an example, when the camera is actively closed by the user, or when the electronic device responds to the user's operation of launching another application, causing the currently running camera virtualization service to be preempted by the other application, then the underlying layer will pass the shutdown notification to the system layer (for example, the hardware layer or the kernel layer passes the shutdown event to the upper layer). The system layer passes the shutdown notification to the system relay layer so that the system relay layer can decide whether to delete the callback of the currently running virtualization service based on the processing logic. Of course, after the underlying module triggers the shutdown notification, the shutdown notification is passed to the corresponding service module in the system layer, and which specific service module it is passed to depends on the service type corresponding to the event.

[0246] For example, when the event triggered at the underlying layer is the event that the smart table lamp is first connected to the camera, the shutdown notification is passed to the system relay layer through the camera registration service.

[0247] Also, for example, when the event triggered at the underlying layer is the event of switching between the front or rear camera, the shutdown notification is passed to the system relay layer through the camera stream switching service.

[0248] The embodiments of the present application do not specifically limit the triggering conditions for notifying the exit of the virtualization service. The foregoing examples are only exemplary descriptions of some scenarios, and the embodiments of the present application are not limited thereto. For example, in the case of an underlying failure, there may also be a situation where the virtualization service is notified to exit.

[0249] Step 502, the interface layer notifies the connection layer to clear the status. Or rather, when the interface layer receives the notification to exit command, it notifies the connection layer to delete the status of the service. The connection layer can delete the usage status of the corresponding service (or delete the version information corresponding to the process service).

[0250] In some embodiments, the connection layer can delete the saved version information. For example, delete the saved version type V1 corresponding to the camera service in the system layer.

[0251] It can be understood that when the connection layer clears the status, it can also perform other operations, including but not limited to: closing unnecessary running threads or processes, releasing memory space, disconnecting from remote devices, etc. The embodiments of the present application do not specifically limit this.

[0252] Step 503, the connection layer unloads the module of the system relay layer.

[0253] In some embodiments, unloading the module of the system relay layer can be understood as unloading the binary file. The binary file can be understood as the code segment for implementing the corresponding service. "Unloading" can be understood as the operation of deleting from the memory space. By unloading the binary file, the occupation of memory space can be avoided.

[0254] It can be understood that the first loading mentioned in the foregoing process essentially loads the binary file stored in the memory space. When exiting the service, the binary file can be unloaded to avoid occupying the memory space.

[0255] Step 504-1: The connection layer returns the deletion result to the interface layer.

[0256] After the connection layer deletes the usage status of the service, it can notify the interface layer of the deletion result. For example, the deletion result indicates that the deletion has been successful.

[0257] Step 504-2: The interface layer returns the deletion result to the application layer.

[0258] After receiving the deletion success result returned by the connection layer, the interface layer returns or forwards the deletion success result to the application layer to notify the upper layer that the status of the relevant service information has been deleted.

[0259] In some embodiments, after the service update in the system layer is completed, if the virtualization service triggered by exiting the current service is enabled again next time, the latest updated virtualization service can be used. Exemplarily, as Figure 6A shown in the enabling process 7, includes the following steps:

[0260] Step 701: The third service in the application layer enables the fourth virtualization service.

[0261] The difference between step 701 and step 401 is that step 701 occurs after update process 5 and notification of exit process 6. When executing step 701, the update process of the camera service has been completed.

[0262] Step 702: The interface layer obtains service information from the connection layer.

[0263] Step 703: The connection layer first loads the system relay layer.

[0264] Step 704: The system relay layer checks the service for the process in the system layer.

[0265] At this time, since the HIDL process camera service in the system layer has been updated to the AIDL service, when the system relay layer accesses the system layer check service across processes here, the obtained result is "support" for the AIDL service.

[0266] Step 705: The system layer returns the query result to the system relay layer.

[0267] In Figure 6AAmong them, the query result returned by the AIDL process to the system relay layer is "supported". That is to say, for the fourth virtualization service triggered again by the application layer, the system layer supports the AIDL process.

[0268] It can be seen that in the aforementioned enabling process 4, the result returned by the system layer when enabling the fourth virtualization service is "not supported" for the AIDL process, and after the update process 5, the returned query result has been updated to "supported".

[0269] Step 706, the system relay layer returns the result to the connection layer.

[0270] After the system relay layer obtains the "supported" result returned by the system layer, it returns this result to the connection layer.

[0271] Step 707-1, the connection layer records the version information.

[0272] Correspondingly, the version information about the camera service recorded by the connection layer is "V2".

[0273] Step 707-2, the connection layer returns the result to the interface layer.

[0274] After the connection layer records the version information, it will return the result to the interface layer. This returned result can include the supported version number. For example, the returned result is "V2", which means the camera service supports version V2, or the camera AIDL service.

[0275] Step 707-3, the interface layer returns the result to the third service.

[0276] For the interface layer, when returning the result to the application layer, it will directly return the result of "enable success" without returning the version number. That is to say, for the service that supports the AIDL process after update, it can directly notify the application layer that the corresponding virtualization service enables successfully.

[0277] In the embodiment of the present application, when the service in the system layer is updated from the HIDL service to the AIDL service, the loading of the DMSDP on the system relay layer is removed through the disable interface of the service call, and the version control module of the system relay layer is re-initialized during the next service call, replacing the historical version with the updated version, thus realizing dynamic service update.

[0278] To achieve dynamic compatibility, the embodiment of the present application also provides an extensible general interface. By using a more general JSON protocol, the interface process is simplified to solve the problem of high complexity of interface changes in historical versions. The following is described in combination with Figure 7 the examples in

[0279] such as Figure 7As shown, the AIDL interface process provided by the embodiments of the present application involves at least Figure 7 the DMSDP main process, system components, and chip component services shown in Figure 2 For example, the audio AIDL service or audio HIDL service in the audio virtualization service shown in

[0280] When the application framework layer accesses a certain service in the chip component service across processes, the DMSDP main process can package or merge multiple commands. For example, multiple commands can be packaged into a json file or a structure. The types of multiple commands are not specifically limited here. For example, multiple commands include: unregister callback, notification command 1, notification command 2, … notification command n, control command 1, etc. Among them, the registration callback command is independent and does not need to be packaged. The system component (specifically, the protocol transfer module in the system component) transmits the packaged json file to the chip component service through the command forwarding interface. After receiving the packaged json file, the chip component service will parse it, and the aforementioned multiple commands can be obtained through the parsing. Correspondingly, for the case where the chip component service sends multiple commands to the DMSDP main process, packaging can also be performed first; the system component transmits the packaged commands to the DMSDP main process, and multiple commands sent by the chip component service can be obtained through parsing.

[0281] In the existing interface process, there is a strong dependency among the DMSDP main process, system components, and chip component services. Or, the relationship between multiple commands and the interfaces of system components is a many-to-many relationship (or a one-to-one relationship). For example, if there are 6 commands in the DMSDP main process, each command corresponds to an interface in the system component, and 6 corresponding commands are obtained through parsing in the chip component service. That is, for 6 commands, the corresponding connection relationship can be shown as 6:6:6. In the existing interface process, if a new service is added to the DMSDP main process, since there is no corresponding interface in the system component, the system will crash and the new service cannot be used; or, for each new service added, a corresponding interface is added on the system component side, and the complexity of changing the interface is relatively high.

[0282] And from Figure 7It can be seen from the interface flow shown in that the system component only needs to forward commands in the AIDL interface flow. For example, if there are 6 commands in the DMSDP main process, these 6 commands correspond to the same interface in the system component, and the chip component service obtains the corresponding 6 commands through parsing, that is, for the 6 commands, the corresponding connection relationship can be illustrated as 6:1:6. It can be seen that in the modified interface flow, the dependency relationship between the DMSDP main process, the system component and the chip component service is converted into the dependency relationship between the DMSDP main process and the chip component service. The advantage of doing this is that when a new chip component service is added to the chip component service, since the relationship between multiple commands and the interface of the system component is a many-to-one relationship, it is sufficient to update it in the chip component service or in the DMSDP main process (for example, put the corresponding APK on the shelves), without changing the interface in the system component; or, when there is an updated business or a new business requirement or a new command in the DMSDP main process, since the relationship between multiple commands and the interface of the system component is a many-to-one relationship, it is sufficient to update it in the DMSDP main process or in the chip component service, without changing the interface in the system component, thereby solving the problem of high complexity of historical interface changes. In this way, changes in the system layer and chip ROM upgrades can be dynamically supported after the system is updated, and reflected through business. Among them, Figure 7 The packaging and parsing processes shown in are all completed in the relay layer module.

[0283] Understandably, Figure 7 The AIDL interface flow shown in can be applied to Figure 5A or Figure 6A The timing diagram is shown.

[0284] In some embodiments, Figure 7 The V2 interface shown applies to Figure 6A In the timing diagram in Figure 6A The update process in 5. Figure 7 In the process of updating the HIDL camera service to the AIDL camera service, there is no need to change the system components, for example, Figure 6A No changes are required to the interface or connection layers in the .

[0285] The present application embodiment also provides a calling method, unifying the protocol entry to the interface layer, ensuring the consistency of logic and the scalability of the protocol. Figure 8 The examples in the following are described. Figure 8 As shown, Figure 8 The upper part of the diagram shows the historical calling method, and the lower part of the diagram shows the calling method of this application.

[0286] In the historical call method, the service completes the cross-module call to the system relay layer through the call of two Java Native Interface (JNI) interfaces. As Figure 8 shown in the upper figure above, the application framework layer loads binary files through two interfaces. Taking the camera service as an example, DMSDP (APK) needs to load two binary files from the DMSDP system component, namely: libvircamerawrapper.so, and, libcamera_jni.so, see Figure 8 the block diagram example in the upper right area of the upper figure above. Figure 8 The call process shown in the upper figure above includes two call methods. For example, Figure 8 the first call method shown in the upper figure above includes the following steps: Step 1, the office service accesses or enables the service through DMSDP (APK); Step 2, DMSDP (APK) obtains the service from the DMSDP system component through the jni interface; Step 3, after receiving the request from the DMSDP system component, the HIDL service in the chip component returns relevant information, such as, the queried information, starts the corresponding service or returns the service status; Step 4, the DMSDP system component passes the information returned by the HIDL service in the chip component to DMSDP (APK).

[0287] Another example, Figure 8 the second call method shown in the upper figure above includes the following steps: Step 5, DMSDP (APK) performs operations such as switching through the jni interface; Step 6, DMSDP (libmsdpmedia) passes instructions to the DMSDP system component through the wrapper interface; Step 7, the DMSDP system component communicates with the HIDL service in the chip component through the HIDL interface.

[0288] For Figure 8 the upper figure shown, the framework layer needs to load two binary files, and these two binary files need to occupy a certain amount of memory space; moreover, there is a certain complexity in implementing the above two call methods through two jnis.

[0289] Figure 8 The following figure in shows the call method in the present application. As Figure 8 shown in the lower figure below, the application framework layer loads binary files through a unified interface. The call method in the present application unifies the protocol entry to the wrapper interface layer. Taking the camera service as an example, DMSDP (APK) only needs to load one binary file (for example, libvircamerawrapper.so) from the DMSDP system component, see Figure 8 the block diagram example in the upper right area of the lower figure below. Figure 8The invocation method shown in the following figure includes the following steps: Step 1, the office service accesses or enables the service through DMSDP (APK); Step 2, DMSDP (APK) obtains the service from DMSDP (libmsdpmedia) through the new jni interface (for example, the cameracontrol interface); Step 3, DMSDP (libmsdpmedia) passes the instruction to the DMSDP system component through the wrapper interface; Step 4A, the DMSDP system component accesses the HIDL service or AIDL service in the chip component, including but not limited to: querying service information, starting the service, querying the service usage status, etc.; Step 4B, the HIDL service or AIDL service in the chip component passes the relevant situation of the HIDL service or AIDL to DMSDP through the interface in sequence. In addition, Figure 8 The following figure in further includes: Step 5, DMSDP (APK) performs operations such as switching through the jni interface; Step 6, DMSDP (libmsdpmedia) passes the instruction to the DMSDP system component through the wrapper interface; Step 7, the DMSDP system component communicates with the HIDL service in the chip component through the HIDL interface.

[0290] It can be seen that Figure 8 the invocation method shown in the following figure in only needs to load one binary file. Compared with Figure 8 the method in the upper figure in that needs to load two binary files, the embodiment of the present application provides a highly scalable upper and lower layer decoupling solution, which can reduce the occupation of memory space, or rather reduce the disk occupation; and, the call interface is unified to the wrapper interface layer, and the call method is relatively simple, which can ensure logical consistency.

[0291] In the invocation method of the present application, by unifying the protocol interface to the wrapper interface layer, that is, only one interface is needed to complete the call.

[0292] As described above in combination with Figures 5A to 8 the example in describes the timing diagram or implementation logic of the management virtualization service in the embodiment of the present application. The following combines Figure 9 to describe the method flow of the management virtualization service shown in the embodiment of the present application. Figure 9 The method shown in can be applied to the first electronic device. As Figure 9 shown in , it includes:

[0293] Step 910, when establishing a collaborative connection with the second electronic device in any of the following ways: receiving a collaborative connection request from the second electronic device, scanning a QR code for establishing a collaborative connection, connecting to the second electronic device through a wired interface, displaying a first interface, where the first interface includes a first window, and the first window includes a first control.

[0294] Step 920: In response to the user's operation of clicking the first control, enable the first virtualization service, and the first virtualization service calls the first process service in the system layer.

[0295] Step 930: Obtain the version information corresponding to the first process service, where the version information includes the version types supported by the process service.

[0296] Step 940: When the first process service supports the first system version, call the first process service under the first system version; or, when the first process service supports the second system version, call the first process service under the second system version; where the first process service under the first system version and the first process service under the second system version are services of different version types.

[0297] In the embodiment of the present application, when the first electronic device and the second electronic device confirm the establishment of a collaborative connection, enable the first virtualization service, and the first virtualization service calls the first process service in the system layer; the first electronic device queries the version types supported by the system layer; when the first process service supports the AIDL process, call the AIDL process service; when the first process service supports the HIDL process, call the HIDL process service. The embodiment of the present application can support process services of different version types.

[0298] In some embodiments, the method further includes: enabling a second virtualization service, where the second virtualization service and the first virtualization service call the same process service in the system layer; obtaining the version information corresponding to the first process service by querying the mapping table; where the mapping table includes the version information corresponding to the first process service, and the mapping table is saved when the first process service is first loaded.

[0299] That is to say, when the first process service is first loaded, its version information can be saved. In this way, when other virtualization services that call the first process service are enabled subsequently, the saved version information can be directly queried and used, without repeatedly checking the service, reducing the number of accesses to the system layer.

[0300] In some embodiments, the first process service under the first system version is an HIDL process service, and the first process service under the second system version is an AIDL process service.

[0301] In some embodiments, the first virtualization service is a media audio speaker service, the second virtualization service is a call audio speaker service, and both the media audio speaker service and the call audio speaker service call the audio service in the system layer.

[0302] Of course, the embodiments of the present application support the invocation of the old version of the process service. In some embodiments, the method further includes:

[0303] When detecting a camera-related service, enabling the camera virtualization service, and the camera virtualization service invokes the second process service in the system layer;

[0304] Obtaining (or checking) the version information corresponding to the second process service;

[0305] In response to the version information corresponding to the second process service being the first system version, invoking the second process service under the first system version.

[0306] Exemplarily, the second process service invoked when enabling the camera virtualization service is the HIDL version service.

[0307] In some embodiments, before obtaining the version information corresponding to the second process service, the method further includes:

[0308] In response to an operation of updating the system version, updating the version information corresponding to the second process service, and the updated version information of the second process service is the second system version.

[0309] That is to say, before checking the version information corresponding to the second process service, the system version can be updated to update the second process service from the HIDL process to the AIDL process. Since the execution of the system version update requires a certain process, it may still be in the update process when the second process service is currently in use; optionally, when the second process service is invoked next time, the version update process of the second process service has been completed. In this way, the latest updated version can be used when the second process service is invoked next time.

[0310] Optionally, the second process service under the first system version is the HIDL process service, and the second process service under the second system version is the AIDL process service.

[0311] After the system version update is completed, the latest updated version can be used when enabling the camera virtualization service next time. In some embodiments, the method further includes: in response to an operation of notifying to exit the camera virtualization service, deleting the version information corresponding to the second process service; in response to an operation of triggering the camera virtualization service again, invoking the second process service under the second system version; wherein, when the camera virtualization service is triggered again, the update process of the version information corresponding to the second process service has been completed.

[0312] The embodiments of the present application do not specifically limit the timing of triggering system updates or the specific manner of triggering updates. Optionally, in response to an operation of updating the system version, the version information corresponding to the second process service is updated, including:

[0313] In response to an operation of the user clicking on the system update control, the version information corresponding to the second process service is updated;

[0314] Or, when the automatic update condition is met, the system version update is automatically executed, and the system version update includes: updating the version information corresponding to the second process service.

[0315] Exemplarily, reference may be made to the interface shown above Figures 6B to 6C to execute the system version update.

[0316] Optionally, the first electronic device invokes the virtualization service in the system layer through a first interface; the first interface is used to execute the following interface process: by packing multiple commands in the main process and transmitting the obtained JSON file transparently to the system layer, so that the system layer can parse the JSON file to obtain multiple parsed signaling messages.

[0317] The first interface can be referred to as the V2 interface. Through the first interface, dynamic compatibility of the system version can be achieved. For example, the specific process of the first interface can be referred to the description above Figure 7 For the sake of brevity, it will not be elaborated here.

[0318] Optionally, the first electronic device includes an application framework layer; the first module in the application framework layer loads a binary file from the system component module through a first call method based on a unified protocol interface. The first call method can be understood as a unified call method. Compared with the prior art of loading two binaries through two jni call methods, through the first call method, the application framework layer can load one binary. For the specific description, reference can be made to the description above Figure 8 For the sake of brevity, it will not be elaborated here.

[0319] As described above in conjunction with Figures 1 to 9 , the method for managing virtualization services provided by the embodiments of the present application has been described in detail. Next, the device embodiments of the present application will be described in conjunction with Figure 10 It should be understood that the device for managing virtualization services in the embodiments of the present application can execute the method for managing virtualization services in the foregoing embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the foregoing method embodiments.

[0320] Figure 10 FIG. shows a schematic structural diagram of an electronic device 1000 applicable to the present application.

[0321] The electronic device 1000 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0322] Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0323] It should be noted that Figure 10 the structure shown does not constitute a specific limitation on the electronic device 1000. In other embodiments of the present application, the electronic device 1000 may include more or fewer components than Figure 10 the components shown, or the electronic device 1000 may include Figure 10 a combination of some of the components shown, or the electronic device 1000 may include Figure 10 sub-components of some of the components shown. Figure 10 The components shown may be implemented in hardware, software, or a combination of software and hardware.

[0324] The processor 110 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and a neural-network processing unit (NPU). Among them, different processing units may be independent devices or integrated devices.

[0325] The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.

[0326] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0327] In some embodiments, the processor 110 may include one or more interfaces. For example, the processor 110 may include at least one of the following interfaces: an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and a USB interface.

[0328] Figure 10The connection relationships between the modules shown are only illustrative and do not constitute a limitation on the connection relationships between the modules of the electronic device 1000. Optionally, the modules of the electronic device 1000 may also adopt a combination of various connection methods in the above embodiments.

[0329] The charging management module 140 is used to receive power from a charger. Among them, the charger can be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 can receive the current of the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 can receive electromagnetic waves (the current path is shown by a dotted line) through the wireless charging coil of the electronic device 1000. While charging the battery 142, the charging management module 140 can also supply power to the electronic device 1000 through the power management module 141.

[0330] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives the inputs of the battery 142 and / or the charging management module 140 and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, the wireless communication module 160, etc. The power management module 141 can also be used to monitor parameters such as the battery capacity, the number of battery cycles, and the battery health status (e.g., leakage, impedance). Optionally, the power management module 141 can be disposed in the processor 110, or the power management module 141 and the charging management module 140 can be disposed in the same device.

[0331] The wireless communication function of the electronic device 1000 can be implemented by devices such as antenna 1, antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor.

[0332] The electronic device 1000 can implement the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0333] The display screen 194 can be used to display images or videos. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (Mini LED), a micro light-emitting diode (Micro LED), a Micro OLED, or a quantum dot light-emitting diode (QLED). In some embodiments, the electronic device 1000 can include one or N display screens 194, where N is a positive integer greater than 1.

[0334] The electronic device 1000 can implement the shooting function through an ISP, the camera 193, a video codec, a GPU, the display screen 194, and an application processor, etc.

[0335] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light passes through the lens and is transmitted to the camera photosensitive element. The optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can perform algorithm optimization on the noise, brightness, and color of the image. The ISP can also optimize parameters such as the exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0336] The camera 193 is used to capture static images or videos. An object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in standard formats such as red green blue (RGB) and YUV. In some embodiments, the electronic device 1000 may include one or N cameras 193, where N is a positive integer greater than 1.

[0337] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 1000 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0338] The video codec is used to compress or decompress digital videos. The electronic device 1000 can support one or more video codecs. In this way, the electronic device 1000 can play or record videos in multiple encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0339] The electronic device 1000 can implement audio functions through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and the application processor, etc. For example, music playback and recording.

[0340] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 1000 can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness. The ambient light sensor 180L can also automatically adjust the white balance when managing virtualization services.

[0341] In some embodiments, the ambient light sensor 180L can obtain the ambient illuminance of the current shooting environment. When the ambient illuminance is greater than or equal to the first illuminance threshold, it can be considered that the current shooting environment is relatively bright, and it can be considered that the current is a high-brightness shooting environment.

[0342] The touch sensor 180K, also known as a touch control device. The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, which is also called a touch control screen. The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor 180K can transmit the detected touch operations to the application processor to determine the type of touch event. Visual outputs related to the touch operations can be provided through the display screen 194. In some other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 1000 and at a different position from the display screen 194.

[0343] The keys 190 include a power-on key and volume keys. The keys 190 can be mechanical keys or touch keys. The electronic device 1000 can receive key input signals and implement functions related to the key input signals.

[0344] The motor 191 can generate vibrations. The motor 191 can be used for incoming call notifications or touch feedback. The motor 191 can produce different vibration feedback effects for touch operations on different application programs. For touch operations on different regions of the display screen 194, the motor 191 can also produce different vibration feedback effects. Different application scenarios (such as time reminders, receiving messages, alarms, and games) can correspond to different vibration feedback effects. The touch vibration feedback effects can also support customization.

[0345] In some embodiments, when the processor 110 establishes a collaborative connection with a second electronic device in any of the following ways: receiving a collaborative connection request from the second electronic device, scanning a QR code for establishing a collaborative connection, connecting to the second electronic device through a wired interface, displaying a first interface through the display screen 194, the first interface including a first window, and the first window including a first control; in response to a user's operation of clicking the first control, enabling a first virtualization service, and the first virtualization service invoking a first process service in the system layer; obtaining version information corresponding to the first process service, the version information including the version types supported by the process service; when the first process service supports a first system version, invoking the first process service under the first system version; or, when the first process service supports a second system version, invoking the first process service under the second system version; wherein, the first process service under the first system version and the first process service under the second system version are services of different version types.

[0346] It can be understood that the method for managing virtualization services in the embodiments of the present application can be applied to Figure 10 the electronic device shown in, and the specific implementation steps can refer to the introduction of the method embodiments above, which will not be elaborated here.

[0347] The processor may be implemented by a processing unit. The term "unit" herein may be implemented in the form of software and / or hardware, and the embodiments of the present application do not make specific limitations thereto.

[0348] For example, the "unit" may be a software program, a hardware circuit, or a combination of both that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group of processors, etc.) that executes one or more software or firmware programs, and a memory, an integrated logic circuit, and / or other suitable devices that can provide the above functions.

[0349] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0350] The present application also provides a computer program product, which implements the method described in any method embodiment of the present application when executed by a processor.

[0351] The computer program product may be stored in a memory and finally converted into an executable target file that can be executed by a processor through processes such as preprocessing, compilation, assembly, and linking.

[0352] The present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program implements the method described in any method embodiment of the present application when executed by a computer. The computer program may be a high-level language program or an executable target program.

[0353] The computer-readable storage medium may be a volatile memory or a non-volatile memory, or may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0354] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes and technical effects of the above-described devices and apparatuses can refer to the corresponding processes and technical effects in the foregoing method embodiments, and will not be elaborated herein again.

[0355] In several embodiments provided in this application, the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, some features of the above-described method embodiments can be ignored or not executed. The above-described apparatus embodiments are merely illustrative. The division of units is only a logical function division, and there may be other division methods in actual implementation. Multiple units or components can be combined or integrated into another system. In addition, the coupling between units or the coupling between components can be direct coupling or indirect coupling. The above coupling includes electrical, mechanical, or other forms of connection.

[0356] It should be understood that in various embodiments of this application, the magnitudes of the sequence numbers of the processes do not mean the order of execution. The order of execution of the processes should be determined by their functions and internal logics, and should not constitute any limitation to the implementation process of the embodiments of this application.

[0357] In addition, the terms "system" and "network" in this document are often used interchangeably. The term " / or" in this document is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally represents an "or" relationship between the related objects before and after.

[0358] In the embodiments of this application, terms (or numbers) such as "first", "second",... are only used for descriptive purposes, that is, only to distinguish different objects, such as different "virtualization services", etc., and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first", "second",... may explicitly or implicitly include one or more features. In the description of the embodiments of this application, "at least one (item)" means one or more. The meaning of "multiple" is two or more. "At least one (item) below" or its similar expressions refer to any combination of these items, including any combination of a single (item) or multiple (items).

[0359] For example, in the embodiments of this application, the meaning of an expression similar to "the item includes at least one of the following: A, B, and C", without special instructions, usually means that the item can be any one of the following: A; B; C; A and B; A and C; B and C; A, B, and C; A and A; A, A, and A; A, A, and B; A, A, and C, A, B, and B; A, C, and C; B and B, B, B, and B, B, B, and C, C and C; C, C, and C, and other combinations of A, B, and C. The above uses three elements A, B, and C as an example to illustrate the selectable items of the item. When the expression is "the item includes at least one of the following: A, B,..., and X", that is, when there are more elements in the expression, then the applicable items of the item can also be obtained according to the foregoing rules.

[0360] In summary, the above description is only a preferred embodiment of the technical solution of this application and is not used to limit the protection scope of this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the protection scope of this application.

Claims

1. A method for managing virtualized services, characterized in that, Applied to a first electronic device, the method includes: When establishing a collaborative connection with a second electronic device in any of the following ways: receiving a collaborative connection request from the second electronic device, scanning a QR code for establishing a collaborative connection, connecting to the second electronic device through a wired interface, displaying a first interface, where the first interface includes a first window, and the first window includes a first control; In response to a user's operation of clicking the first control, enable a first virtualization service, and the first virtualization service calls a first process service in the system layer; Obtain version information corresponding to the first process service, where the version information includes the version type supported by the process service; When the first process service supports a first system version, call the first process service under the first system version; Or, when the first process service supports a second system version, call the first process service under the second system version; Wherein, the first process service under the first system version and the first process service under the second system version are services of different version types.

2. The method according to claim 1, characterized in that The method further includes: Enable a second virtualization service, and the second virtualization service and the first virtualization service call the same process service in the system layer; Obtain the version information corresponding to the first process service by querying a mapping table; wherein, the mapping table includes the version information corresponding to the first process service, and the mapping table is saved when the first process service is first loaded.

3. The method according to claim 1 or 2, characterized in that, The first process service under the first system version is an HIDL process service, and the first process service under the second system version is an AIDL process service.

4. The method according to any one of claims 1 to 3, characterized in that, The first virtualization service is a media audio speaker service, and the second virtualization service is a call audio speaker service. Both the media audio speaker service and the call audio speaker service call the audio service in the system layer.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: When detecting a camera-related service, enable a camera virtualization service, and the camera virtualization service calls a second process service in the system layer; Obtain the version information corresponding to the second process service; In response to the version information corresponding to the second process service being the first system version, call the second process service under the first system version.

6. The method according to claim 5, wherein Before obtaining the version information corresponding to the second process service, the method further includes: In response to an operation of updating the system version, update the version information corresponding to the second process service, and the updated version information of the second process service is the second system version.

7. The method according to claim 6, wherein The second process service under the first system version is an HIDL process service, and the second process service under the second system version is an AIDL process service.

8. The method according to claim 6 or 7, characterized in that, The method further includes: In response to an operation of notifying to exit the camera virtualization service, delete the version information corresponding to the second process service; In response to an operation of triggering the camera virtualization service again, call the second process service under the second system version; wherein, when the camera virtualization service is triggered again, the update process of the version information corresponding to the second process service has been completed.

9. The method according to any one of claims 6 to 8, characterized in that, The operation of updating the system version is performed, and the version information corresponding to the second process service is updated, including: In response to the operation of the user clicking the system update control, the version information corresponding to the second process service is updated; Alternatively, when the automatic update condition is met, the system version update is automatically performed, and the system version update includes: updating the version information corresponding to the second process service.

10. The method according to any one of claims 1 to 9, characterized in that The first electronic device calls the virtualization service in the system layer through the first interface; the first interface is used to execute the following interface process: by packing a plurality of commands in the main process and transmitting the obtained JSON file to the system layer in a transparent manner, so that the system layer can parse the JSON file to obtain a plurality of parsed signaling.

11. The method according to any one of claims 1 to 10, characterized in that The first electronic device includes an application framework layer; the first module in the application framework layer loads the binary file from the system component module through the first call method based on the unified protocol interface.

12. An electronic device, characterized in that, It includes a processor and a memory, the processor and the memory are coupled, the memory is used to store a computer program, and when the computer program is executed by the processor, the electronic device executes the method according to any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the electronic device executes the method according to any one of claims 1 to 11.

14. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system includes one or more processors, and the processors are used to call computer instructions to make the electronic device execute the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Embedded system, and upgrading method and upgrading equipment thereof

    CN104572185A

  • Anomaly processing method and device, server and storage medium

    CN109933465A

  • Camera API adaptation method and device based on Android system, equipment and medium

    CN113360179A

  • Method for acquiring video frame, electronic equipment and readable storage medium

    CN115022570A

  • Virtualized camera enabling method, electronic equipment and cooperative work system

    CN116366957A