Data processing method and related equipment
By decoupling the DMSDP module and the device interconnection service, and adopting unified management and virtual device policies, the problem of the inability to operate concurrently in multiple device interconnection services in electronic devices is solved, and efficient data processing and resource management are achieved.
Patent Information
- Application Number
- CN202311835223.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, the device interconnection services in electronic devices are not effectively managed, resulting in the inability to operate concurrently, and the data information is easily confused.
By decoupling the DMSDP module from the device interconnection service, a unified DMSDP module is used to manage multiple device interconnection services, and strategically manage it based on virtual devices and data channels to avoid data confusion and achieve concurrent operation.
It realizes the operation of multiple device interconnection services in electronic devices at the same time, avoids data and information confusion and resource conflicts, and improves the efficiency and reliability of device interconnection services.
Smart Images

Figure CN120263843A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of terminals, and in particular, to a data processing method and related devices. Background Art
[0002] Device interconnection can achieve resource integration, device management, and data processing of different electronic devices. For different types of services, multiple electronic devices can automatically match and select an execution module with appropriate capabilities, enabling the service to continuously flow between different electronic devices and giving full play to the capabilities of different electronic devices. Among them, device interconnection services include, but are not limited to, at least one of a camera sharing service, a collaboration service, an incoming call service, or a sidecar service.
[0003] Currently, the device virtualization (Distributed Mobile Sensing Development Platform, DMSDP) module in an electronic device is coupled with device interconnection services. When running a device interconnection service, each device interconnection service needs to separately run the DMSDP module and the corresponding virtual device. However, since the existing solution does not manage multiple device interconnection services, currently multiple device interconnection services cannot run concurrently in an electronic device. Summary of the Invention
[0004] This application provides a data processing method and related devices, which can run multiple device interconnection services concurrently in an electronic device.
[0005] In a first aspect, an embodiment of this application provides a data processing method, which includes: receiving first data related to a first device interconnection service, where the first device interconnection service is any one of multiple device interconnection services; determining a first virtual device associated with the first device interconnection service based on virtual devices respectively associated with the multiple device interconnection services; and sending the first data to the first virtual device.
[0006] Optionally, multiple device interconnection services can be managed by the DMSDP module in the electronic device.
[0007] It can be seen that in the method described in this aspect, the device interconnection service is decoupled from the DMSDP module. Multiple device interconnection services are managed through a unified DMSDP module, and the first virtual device associated with the first device interconnection service can be determined from the virtual devices respectively associated with multiple device interconnection services. When the first electronic device receives the first data related to the first device interconnection service, the first data is sent to the first virtual device, which can avoid the confusion of the first data with the data information of other device interconnection services, thus facilitating the concurrent operation of multiple device interconnection services in the electronic device. At the same time, only one DMSDP module is run in the embodiment of the present application, and the DMSDP module runs as a single instance, which can effectively avoid the conflict of the memory resources and / or network resources corresponding to the DMSDP module.
[0008] Optionally, the method in this aspect is a data processing method when the electronic device receives data information from other electronic devices.
[0009] Optionally, the electronic device described in this aspect can be an electronic device on the device side. For example, when the electronic device is an electronic device (such as the first electronic device) that provides a virtual speaker for other electronic devices, the electronic device can receive audio data from other electronic devices and send the audio data to the virtual speaker. Optionally, the electronic device described in this aspect can also be an electronic device on the central side; for example, when the electronic device is an electronic device (such as the second electronic device) that is provided with a virtual camera by other electronic devices, other electronic devices can collect video data through the camera indicated by the virtual camera and transmit it to the electronic device. When the electronic device receives the video data from other electronic devices, the video data can be sent to the virtual camera.
[0010] Optionally, after sending the first data to the first virtual device, the method further includes sending the first data to the hardware device indicated by the first virtual device and processing the first data through the hardware device indicated by the first virtual device. For example, when the electronic device is an electronic device (such as the first electronic device) that provides a virtual speaker for other electronic devices, the audio data can be sent to the speaker indicated by the virtual speaker and the audio data is played through the speaker.
[0011] In combination with the first aspect, in an optional implementation manner, the method further includes: receiving second data related to a second device interconnection service; the second device interconnection service is a device interconnection service different from the first device interconnection service among multiple device interconnection services; determining a second virtual device associated with the second device interconnection service based on the virtual devices respectively associated with multiple device interconnection services; and sending the second data to the second virtual device.
[0012] It can be seen that in this embodiment, when receiving second data related to the second device interconnection service, the second data can be sent to the second virtual device related to the second device interconnection service, decoupling the device interconnection service from the DMSDP module. By managing multiple device interconnection services through a unified DMSDP module, it is possible to avoid confusion of data information of multiple device interconnection services, which is beneficial to the concurrent operation of multiple device interconnection services within the electronic device.
[0013] Combined with the first aspect, in an alternative embodiment,
[0014] Before receiving second data related to the second device interconnection service, the method further includes: receiving a third request for requesting to establish an association relationship between the second device interconnection service and the first virtual device; if the priority of the second device interconnection service is higher than that of the first device interconnection service, deleting the association relationship between the first device interconnection service and the first virtual device, and establishing an association relationship between the second device interconnection service and the first virtual device.
[0015] After receiving second data related to the second device interconnection service, the method further includes: sending the second data to the first virtual device.
[0016] It can be seen that in this embodiment, when multiple device interconnection services are associated with the same virtual device, the virtual device can be preempted based on the priorities of the multiple device interconnection services, and the virtual device can be allocated based on policies, effectively solving the problem of virtual device conflicts generated when multiple device interconnection services run concurrently.
[0017] Combined with the first aspect, in an alternative embodiment, receiving first data related to the first device interconnection service includes: receiving data through a first data channel; determining the first device interconnection service associated with the first data channel based on the data channels respectively associated with multiple device interconnection services, and taking the received data as the first data related to the first device interconnection service.
[0018] Combined with the first aspect, in an alternative embodiment, receiving second data related to the second device interconnection service includes: receiving data through a second data channel; determining the second device interconnection service associated with the second data channel based on the data channels respectively associated with multiple device interconnection services, and taking the received data as the second data related to the second device interconnection service.
[0019] In combination with the first aspect, in an optional implementation, the first device interconnection service and the second device interconnection service are device interconnection services between the first electronic device and the second electronic device. For example, the first electronic device provides the first device interconnection service for the second electronic device, and the first electronic device provides the second device interconnection service for the second electronic device, that is, the first device interconnection service and the second device interconnection service are concurrently running in the first electronic device, and the first device interconnection service and the second device interconnection service are concurrently running in the second electronic device.
[0020] In combination with the first aspect, in an optional implementation, the first device interconnection service is a device interconnection service between the first electronic device and the second electronic device, and the second device interconnection service is a device interconnection service between the first electronic device and the third electronic device. For example, the first electronic device provides the first device interconnection service for the second electronic device, and the first electronic device provides the second device interconnection service for the third electronic device, that is, the first device interconnection service and the second device interconnection service are concurrently running in the first electronic device.
[0021] In combination with the first aspect, in an optional implementation, the method further includes: sending the first data from the device virtualization module to the application layer through the first device virtualization interface corresponding to the first device interconnection service. It can be seen that the embodiments of the present application can implement the communication interaction between the DMSDP module and the application layer based on the cross-process technology.
[0022] In combination with the first aspect, in an optional implementation, the method further includes: transmitting the control information associated with each device interconnection service through the control channels respectively associated with each device interconnection service. It can be seen that in this embodiment, the control information associated with various device interconnection services can be transmitted through the control channels related to each device interconnection service, which can avoid the confusion of the control information of multiple device interconnection services, thereby facilitating the concurrent operation of multiple device interconnection services in the electronic device.
[0023] In combination with the first aspect, in an optional implementation, the method further includes: transmitting the control information associated with each device interconnection service between the application layer and the device virtualization module through the device virtualization interfaces respectively corresponding to each device interconnection service.
[0024] In combination with the first aspect, in an optional implementation, the multiple device interconnection services include at least two of the camera sharing service, the collaboration service, the incoming call service, or the Sidecar service. For example, the multiple device interconnection services include the collaboration service and the incoming call service; or, the multiple device interconnection services include the Sidecar service and the incoming call service; and so on, without limitation.
[0025] Second aspect, embodiments of the present application further provide another data processing method, which includes: obtaining first data related to the first device interconnection service; the first device interconnection service is any one of multiple device interconnection services; determining a first data channel associated with the first device interconnection service based on data channels respectively associated with multiple device interconnection services; and sending the first data through the first data channel.
[0026] Optionally, multiple device interconnection services may be managed by a DMSDP module in the electronic device.
[0027] Optionally, the method in this aspect is a data processing method when the described electronic device sends data information to other electronic devices.
[0028] Optionally, the electronic device described in this aspect may be an electronic device on the central side. For example, when the electronic device is an electronic device (such as a second electronic device) that provides a virtual speaker by other electronic devices, the electronic device may send audio data to other electronic devices. Optionally, the electronic device described in this aspect may also be an electronic device on the device side; for example, when the electronic device is an electronic device (such as a first electronic device) that provides a virtual camera for other electronic devices, the electronic device may collect video data through the camera indicated by the virtual camera and transmit it to other electronic devices.
[0029] Combined with the second aspect, in an optional implementation manner, the method further includes: obtaining second data related to the second device interconnection service; the second device interconnection service is a device interconnection service different from the first device interconnection service among multiple device interconnection services; determining a second data channel associated with the second device interconnection service based on data channels respectively associated with multiple device interconnection services; and sending the second data through the second data channel.
[0030] Combined with the second aspect, in an optional implementation manner, obtaining first data related to the first device interconnection service includes: obtaining data related to the first virtual device; determining the first device interconnection service associated with the first virtual device based on virtual devices respectively associated with multiple device interconnection services, and using the data as the first data related to the first device interconnection service.
[0031] Combined with the second aspect, in an optional implementation manner, obtaining second data related to the second device interconnection service includes: obtaining data related to the second virtual device; determining the second device interconnection service associated with the second virtual device based on virtual devices respectively associated with multiple device interconnection services, and using the data as the first data related to the second device interconnection service.
[0032] In combination with the second aspect, in an optional implementation, before obtaining the second data related to the second device interconnection service, the method further includes: if the priority of the second device interconnection service is higher than that of the first device interconnection service, deleting the association relationship between the first device interconnection service and the first virtual device, and establishing an association relationship between the second device interconnection service and the first virtual device; obtaining the second data related to the second device interconnection service includes: obtaining the data related to the first virtual device; based on the virtual devices respectively associated with multiple device interconnection services, determining the second device interconnection service associated with the first virtual device, and using the data as the second data related to the second device interconnection service.
[0033] In combination with the second aspect, in an optional implementation, the first device interconnection service and the second device interconnection service are device interconnection services between the first electronic device and the second electronic device.
[0034] In combination with the second aspect, in an optional implementation, the first device interconnection service is a device interconnection service between the first electronic device and the second electronic device, and the second device interconnection service is a device interconnection service between the first electronic device and the third electronic device.
[0035] In combination with the second aspect, in an optional implementation, the method further includes: sending the first data from the application layer to the device virtualization module through the first device virtualization interface corresponding to the first device interconnection service.
[0036] In combination with the second aspect, in an optional implementation, the method further includes: transmitting the control information associated with each device interconnection service through the control channel respectively associated with each device interconnection service.
[0037] In combination with the second aspect, in an optional implementation, the method further includes: transmitting the control information associated with each device interconnection service between the application layer and the device virtualization module through the device virtualization interface respectively corresponding to each device interconnection service.
[0038] In combination with the second aspect, in an optional implementation, the multiple device interconnection services include at least two of a camera sharing service, a collaboration service, an incoming call service, or a Sidecar service.
[0039] It should be noted that for the beneficial effects of the second aspect and any optional implementation of the second aspect, reference can be made to the beneficial effects of the first aspect and any optional implementation of the first aspect, which will not be elaborated here.
[0040] In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors, and one or more memories; the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device is caused to execute the method described in the first aspect or the second aspect.
[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including computer instructions, and when the computer instructions run on an electronic device, the electronic device is caused to execute the method described in the first aspect or the second aspect.
[0042] In a fifth aspect, an embodiment of the present application provides a chip or a chip system, including a processing circuit and an interface circuit, the interface circuit is used to receive code instructions and transmit them to the processing circuit, and the processing circuit is used to run the code instructions to execute the method described in the first aspect or the second aspect.
[0043] In a sixth aspect, an embodiment of the present application provides a computer program product, the computer program product includes a computer program, and when it runs on a computer, the computer is caused to execute the method described in the first aspect or the second aspect. Description of the Drawings
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be described below.
[0045] Figures 1a to 1c is a schematic structural diagram of a data sharing system provided by an embodiment of the present application;
[0046] Figure 2a is a schematic internal architecture diagram of an electronic device provided by the existing solution;
[0047] Figure 2b is a schematic internal architecture diagram of an electronic device provided by an embodiment of the present application;
[0048] Figure 3 is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present application;
[0049] Figure 4 is a schematic software structure diagram of an electronic device provided by an embodiment of the present application;
[0050] Figure 5 is a schematic flowchart of a data processing method provided by an embodiment of the present application;
[0051] Figure 6 is a schematic flowchart of another data processing method provided by an embodiment of the present application;
[0052] Figure 7 It is a schematic flowchart of yet another data processing method provided by an embodiment of the present application;
[0053] Figure 8 It is a schematic flowchart of a method for establishing a data channel provided by an embodiment of the present application. Specific Embodiments
[0054] The application (App) involved in the embodiments of the present application, also known as an application program, is a software program capable of implementing one or more specific functions. Generally, multiple applications can be installed in an electronic device. For example, instant messaging applications, audio applications, image capture applications, and so on. Among them, instant messaging applications can include, for example, SMS applications, WeChat, DingTalk, etc. Audio applications can include, for example, KuGou Music, Xiami Music, and so on. Image capture applications can include, for example, a camera application (the factory-set system camera or a third-party camera application). The applications mentioned in the following embodiments can be applications pre-installed when the electronic device leaves the factory, or applications downloaded from the network or obtained from other electronic devices by the user during the use of the electronic device.
[0055] It should be understood that in the present application, unless otherwise specified, " / " means "or". For example, A / B can mean A or B; "and / or" in the present application is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. "At least one" means one or more, and "multiple" means two or more.
[0056] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" is two or more.
[0057] It should be noted that the data channel described in the present application is used to transmit data information (such as the first data), and the control channel is used to transmit control information. In other embodiments, the data channel and the control channel can be collectively referred to as a "transmission channel", "MagicLink", etc., without limitation.
[0058] With the development of technology, the types of electronic devices (such as mobile phones, tablets, laptops, etc.) are becoming increasingly rich. Among them, different types of electronic devices have different characteristics. For example, mobile phones are small and convenient to carry; laptops have better processing performance, and their screens are larger, making them more convenient to operate. In order to improve the user experience, resource integration, device management, and data processing of different electronic devices can be achieved based on device interconnection, so as to give full play to the capacity advantages of different electronic devices.
[0059] Optionally, the electronic devices in the embodiments of the present application may include, but are not limited to, mobile phones, tablets, laptops, large-screen devices (such as smart TVs, smart screens, etc.), personal computers (Personal Computer, PC), handheld computers, netbooks, personal digital assistants (Personal Digital Assistant, PDA), wearable electronic devices, in-vehicle devices, virtual reality devices, etc. In an optional implementation manner, device interconnection can be applied between electronic devices of the same type. For example, mobile phone A and mobile phone B can form a data sharing system based on device interconnection technology, and this data sharing system integrates the capabilities of mobile phone A and mobile phone B. In another optional implementation manner, device interconnection can be applied between electronic devices of different types. For example, mobile phone A and computer C can form a data sharing system based on device interconnection technology, and this data sharing system integrates the capabilities of mobile phone A and computer C.
[0060] Device interconnection needs to be realized based on the communication connection between devices. This communication connection can be a wired communication connection or a wireless communication connection. Among them, the wired communication connection includes, but is not limited to, the communication connection constructed based on the USB On-The-Go (OTG) technology; among them, the wireless communication connection includes, but is not limited to, the communication connection constructed based on wireless fidelity (Wi-Fi) technology, Wi-Fi Direct technology, Bluetooth (BT) technology, near field communication (NFC) technology, infrared (IR) technology, etc.
[0061] Optionally, the above communication connection can be established based on a verification step, which can effectively avoid data leakage and improve data security. It should be noted that in some implementation manners, when multiple electronic devices are within a trust ring (for example, multiple electronic devices are logged in with the same user account at the same time), these multiple electronic devices can directly establish a communication connection without performing the verification step, which can omit the verification step while improving data security and is more simple and convenient.
[0062] It should be noted that for the convenience of description, in the embodiments of the present application, the electronic device providing the virtual device may be named as the "device side", and the electronic device using the virtual device may be named as the "central side". For example, if the data sharing system includes computer C and mobile phone A, and computer C provides a virtual device for mobile phone A to use, then computer C in the data sharing system is the device side, and mobile phone A is the central side. It should be noted that the device side and the central side in the data sharing system can be swapped. For example, in other embodiments, mobile phone A can also provide a virtual device for computer C to use. In this case, mobile phone A is the device side and computer C is the central side. Optionally, the virtual device in the embodiments of the present application includes but is not limited to at least one of a microphone, a speaker, or a camera.
[0063] To improve the capabilities of the data sharing system, it is necessary to concurrently run multiple device interconnection services within the electronic devices of the data sharing system (for example, concurrently run the first device interconnection service and the second device interconnection service within the electronic device). The following will describe various concurrent scenarios that may exist within the data sharing system in conjunction with Figures 1a to 1c the data sharing system shown below:
[0064] As Figure 1a shown, the data sharing system may include one device side 101 and two central sides 102 (including central side 102-1 and central side 102-2). In this concurrent scenario, the first device interconnection service runs between the device side 101 and the central side 102-1, and the second device interconnection service runs between the device side 101 and the central side 102-2. In this case, the first device interconnection service and the second device interconnection service are concurrently run within the device side 101.
[0065] As Figure 1b shown, the data sharing system may include one device side 101 and one central side 102. In this concurrent scenario, the first device interconnection service and the second device interconnection service are concurrently run between the device side 101 and the central side 102. In this case, the first device interconnection service and the second device interconnection service are concurrently run within the device side 101, and the first device interconnection service and the second device interconnection service are concurrently run within the central side 102.
[0066] As Figure 1c shown, the data sharing system may include two device sides 101 (including device side 101-1 and device side 101-2) and one central side 102. In this concurrent scenario, the first device interconnection service runs between the device side 101-1 and the central side 102, and the second device interconnection service runs between the device side 101-2 and the central side 102. In this case, the first device interconnection service and the second device interconnection service are concurrently run within the central side 102.
[0067] It should be noted that Figures 1a to 1c The first device interconnection service and the second device interconnection service in Figures 1a to 1c refer to different types of device interconnection services. Optionally, the first device interconnection service may include, but is not limited to, any one of camera sharing service, collaboration service, incoming call service, or Sidecar service. The second device interconnection service may include, but is not limited to, any one of camera sharing service, collaboration service, incoming call service, or Sidecar service that is different from the first device interconnection service. For example, the first device interconnection service is a collaboration service and the second device interconnection service is an incoming call service; or, the first device interconnection service is a Sidecar service and the second device interconnection service is an incoming call service; and so on, without limitation.
[0068] Taking the data sharing system including a first electronic device and a second electronic device as an example, where the first electronic device provides a virtual device for the second electronic device (i.e., the first electronic device is the device side and the second electronic device is the central side), the following elaborates on these four types of device interconnection services in detail:
[0069] (1) Camera sharing service
[0070] In the camera sharing service, the first electronic device (e.g., a mobile phone) can provide a camera to process the image data of the second electronic device (e.g., a computer).
[0071] (2) Collaboration service
[0072] In the collaboration service, the first electronic device (e.g., a computer) can provide a microphone and / or a speaker to process the interaction data (e.g., Q&A data in class) of the second electronic device (e.g., a mobile phone).
[0073] Furthermore, the first electronic device can also provide a display screen to display a user interface related to the second electronic device. In one implementation, the related user interface is the user interface that is being displayed in real time on the second electronic device. In another implementation, the related user interface is a hidden user interface in the second electronic device. For example, when the user interface of an instant messaging application is being displayed in real time on the second electronic device, the user interface of the video playback application on the second electronic device can be displayed through the first electronic device. It should be noted that this special collaboration service can also be referred to as a heterogeneous screen mirroring service.
[0074] (3) Incoming call service
[0075] In the incoming call service, the first electronic device (e.g., a computer) can provide a microphone and / or a speaker to process the call data of the second electronic device (e.g., a mobile phone).
[0076] (4) Sidecar service
[0077] In the companion service, a first electronic device (such as a tablet) can provide a speaker to play the audio data of a second electronic device (such as a computer).
[0078] Currently, the DMSDP module in the electronic device is coupled with the device interconnection service. When running the device interconnection service, each device interconnection service needs to separately run the DMSDP module and the corresponding virtual device. However, since the existing solution does not manage multiple device interconnection services, multiple device interconnection services cannot run concurrently in the electronic device.
[0079] For example, please refer to Figure 2a , Figure 2a which shows a schematic diagram of the internal architecture of an electronic device provided by the existing solution. Taking the first device interconnection service as the incoming call service and the second device interconnection service as the companion service as an example, when the device side 101 provides the incoming call service for the central side 102 (or central side 102-1), a DMSDP module related to the incoming call service needs to be run inside the device side 101 and occupy the virtual speaker; when the device side 101 provides the companion service for the central side 102 (or central side 102-2), another DMSDP module related to the companion service also needs to be run inside the device side 101 and occupy the virtual speaker. When the device side 101 receives audio data that needs to be processed by the speaker from the central side through the underlying data channel, it is impossible to determine whether the audio data is related to the incoming call service or the companion service, and the underlying data channel is prone to confusing the data information of multiple device interconnection services.
[0080] It can be seen that the existing solution does not manage multiple device interconnection services, which easily leads to the confusion of the data information of multiple device interconnection services, resulting in the inability to run multiple device interconnection services concurrently in the electronic device.
[0081] Based on this, the embodiment of the present application provides a data processing method. In this method, the DMSDP module and the device interconnection service are decoupled, and one DMSDP module uniformly manages multiple device interconnection services, so that multiple device interconnection services can be run concurrently in the electronic device.
[0082] Optionally, the DMSDP module is used to manage at least one of the following: virtual devices supported by the electronic device, the status of each virtual device, the association relationship between each device interconnection service and the virtual device, and the association relationship between each device interconnection service and the data channel.
[0083] In an alternative embodiment, the DMSDP module may include at least one of a virtualization unit, a concurrent state cache unit, a concurrent management unit, or a concurrent information interaction unit. Among them, the virtualization unit is used to manage the virtual devices supported by the electronic device. Optionally, the virtual devices correspond one-to-one with the hardware devices, that is, one virtual device indicates one hardware device. For example, the virtual microphone corresponds to the microphone, the virtual speaker corresponds to the speaker, the first virtual camera corresponds to the front camera, the second virtual camera corresponds to the rear camera, and so on. In the embodiments of the present application, using virtual devices to represent the corresponding hardware devices can abstract the hardware devices, making it more simple and convenient. It should be noted that for the DMSDP module on the device side, the virtualization unit is used to manage the virtual devices supported by the electronic device and provided for other electronic devices to use; for the DMSDP module on the central side, the virtualization unit is used to manage the virtual devices supported by other electronic devices and provided for this electronic device to use. Among them, the concurrent state cache unit is used to manage the state of each virtual device. For example, the state of a virtual device may include an occupied state and an unoccupied state. For the DMSDP module on the device side, if the virtual device is in the occupied state, it means that the virtual device has been provided for other electronic devices to use; if the virtual device is in the unoccupied state, it means that the virtual device has not been provided for other electronic devices to use. For the DMSDP module on the central side, if the virtual device is in the occupied state, it means that the virtual device has been provided by other electronic devices; if the virtual device is in the unoccupied state, it means that the virtual device has not been provided by other electronic devices. Among them, the concurrent management unit is used to manage the association relationship between each device interconnection service and the virtual device. For the DMSDP module on the device side, the device interconnection service refers to the device interconnection service provided by this electronic device for other electronic devices, and the virtual device is the virtual device provided by this electronic device for other electronic devices to use; for the DMSDP module on the central side; for the DMSDP module on the central side, the device interconnection service refers to the device interconnection service provided by other electronic devices for this electronic device, and the virtual device is the virtual device provided by other electronic devices for this electronic device to use. Among them, the concurrent information interaction unit is used to manage the association relationship between each device interconnection service and the data channel.
[0084] Please refer to Figure 2b , Figure 2b which shows another schematic diagram of the internal architecture of the electronic device. When the device side 101 receives the audio data that needs to be processed by the speaker from the central side through the underlying data channel, the DMSDP module can determine whether the audio data is related to the incoming call service or the follow-up service based on the association relationship between the device interconnection service and the virtual device. If the audio data is related to the incoming call service, the speaker related to the incoming call service processes the audio data; if the audio data is related to the follow-up service, the speaker related to the follow-up service processes the audio data.
[0085] It can be seen that when multiple device interconnection services are uniformly managed through the DMSDP module, the data information of various device interconnection services can be prevented from being confused, so that multiple device interconnection services can run concurrently in the electronic device.
[0086] It should be noted that Figure 2a and Figure 2b are described by taking the virtual devices corresponding to the first device interconnection service and the second device interconnection service as the same as an example. In other embodiments, the virtual devices corresponding to the first device interconnection service and the second device interconnection service may also be different. For example, when the virtual device corresponding to the first device interconnection service is the virtual camera corresponding to the camera sharing service, and the virtual device corresponding to the second device interconnection service is the virtual microphone corresponding to the collaboration service, the image data corresponding to the camera sharing service and the audio data corresponding to the collaboration service are also likely to be confused. Based on the solution of the present application, the data information confusion of these two device interconnection services can also be avoided. For a detailed description, reference can be made to the relevant embodiments of Figure 2a and Figure 2b for details and will not be elaborated here.
[0087] To better illustrate the embodiments of the present application, the electronic devices (such as the first electronic device, the second electronic device, the third electronic device, etc.) involved in the embodiments of the present application will be described in detail first.
[0088] As Figure 3 shown, it is a schematic diagram of the hardware structure of an electronic device. Among them, the electronic device may include: a processor, an external memory interface, an internal memory, a Universal Serial Bus (USB) interface, a charging management module, a power management module, a battery, antenna 1, antenna 2, a mobile communication module, a wireless communication module, an audio module, a sensor module, keys, a motor, an indicator, a camera, a display screen, and a subscriber identification module (SIM) card slot, etc. Among them, the audio module may include, but is not limited to, a speaker, a receiver, a microphone, a headphone interface, etc.; the sensor module may include, but is not limited to, a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
[0089] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than those shown, or combine certain components, or split certain components, or have different component arrangements. The components shown may be implemented in hardware, software, or a combination of software and hardware.
[0090] Among them, the processor may include one or more processing units. For example, the processor may include an application processor (AP), a modem processor (Modem), a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a neural network processing unit (NPU), etc.
[0091] Among them, different processing units may be independent devices or integrated in one or more processors. The processor is the nerve center and command center of the electronic device. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0092] Among them, the wireless communication function of the electronic device can be implemented through Antenna 1, Antenna 2, a mobile communication module, a wireless communication module, and a Modem, etc. In some embodiments, Antenna 1 of the electronic device is coupled to the mobile communication module, and Antenna 2 is coupled to the wireless communication module, so that the electronic device can communicate with network-side devices and other electronic devices through wireless communication technologies.
[0093] The display screen is used to display images, videos, etc. The display screen 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 MiniLED, a MicroLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1. In the embodiments of the present application, the electronic device can determine whether the user uses the electronic device during charging according to the screen-on time and the number of screen-on times of the display screen.
[0094] The audio module can be used to encode / decode voice into electrical signals and to convert electrical signals into voice. In a specific implementation, the audio module can be connected to at least one of the following: a speaker, a receiver, a microphone, or a headphone jack, and can be used to decode / encode the signals input / output from the above at least one item.
[0095] The camera can capture still images or videos. In a specific implementation, the camera can include one or more image sensors (such as a front sensor module or a rear sensor module, not shown), an image signal processor (ISP, not shown), or a flash LED (not shown).
[0096] In addition, an operating system runs on top of the above components. For example, the iOS operating system developed by Apple Inc., the Android open-source operating system developed by Google Inc., the Windows operating system developed by Microsoft Corporation, etc.
[0097] The operating system of the electronic device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present application, taking the Android system with a layered architecture as an example, the software and hardware structure of the electronic device is exemplarily described. It should be noted that although the embodiments of the present application are described by taking the Android system as an example, the basic principle is equally applicable to electronic devices based on operating systems such as iOS or Windows.
[0098] Figure 4 It is a schematic diagram of the software structure of the electronic device. The software structure adopts a layered architecture. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. Taking the Android system as an example, in some embodiments, the Android system can be divided from top to bottom into: an application layer, an application framework layer (Framework), a hardware abstraction layer (HAL), a kernel layer (Kernel), and a hardware layer (Hardware).
[0099] Among them, the application layer can include a series of application packages. The application packages can include APPs such as a camera, a gallery, a calendar, a call, a map, a WLAN, a Bluetooth, music, a video, a short message, and a phone manager.
[0100] Among them, the application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions. For example, the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, etc. The embodiments of the present application do not impose any restrictions on this. Exemplarily, the above window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc. The above content provider is used to store and obtain data, and make this data accessible to applications. The data may include videos, images, audio, dialed and answered calls, browsing history and bookmarks, phone books, etc. The above view system can be used to construct the display interface of an application. Each display interface can be composed of one or more controls. Generally speaking, controls may include interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. The above resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc. The above notification manager enables applications to display notification information in the status bar, can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify that the download is complete, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as a notification of a background-running application, and can also be a notification that appears on the screen in the form of a dialogue window. For example, prompt text information in the status bar, emit a prompt sound, vibrate, the indicator light flashes, etc. In some embodiments, the application framework layer may further include a DMSDP module. Optionally, the DMSDP module may include at least one of a virtualization unit, a concurrent state cache unit, a concurrent management unit, or a concurrent information interaction unit. Further, the electronic device may include a DMSDP module on the device side and a DMSDP module on the central side. The DMSDP module on the device side is used to interact with the DMSDP module on the central side of other electronic devices; the DMSDP module on the central side is used to interact with the DMSDP module on the device side of other electronic devices.
[0101] Among them, the hardware abstraction layer can be used to abstract the hardware. In some embodiments, the hardware abstraction layer includes hardware abstraction layer interface definition language (HIDL) interfaces. Among them, the hardware abstraction layer may include: camera HAL, display HAL, audio HAL, etc.
[0102] Among them, the kernel layer is the foundation of the Android operating system, responsible for functions such as hardware drivers, network, power supply, system security, and memory management. The kernel layer is an intermediate layer between hardware and software, and its role is to pass the requests of application programs to the hardware. The kernel layer includes at least a camera driver, a display driver, an audio driver, etc.
[0103] Among them, the hardware layer may include one or more hardware components. For example, the hardware layer may include a display screen, a microphone, a speaker, a camera, etc.
[0104] To better illustrate the embodiments of the present application, the following takes the first electronic device as the device side running the first device interconnection service as an example to elaborate in detail the data processing method of the embodiments of the present application. It should be noted that in this embodiment, the first electronic device includes a DMSDP module on the device side. As Figure 5 shown, the data processing method may include but is not limited to steps S101 - S103:
[0105] S101. The first electronic device receives first data related to the first device interconnection service.
[0106] Among them, the first device interconnection service is any one of multiple device interconnection services.
[0107] In an optional implementation manner, step S101 may include: The first electronic device receives first data related to the first device interconnection service through the data channel managed by the DMSDP module. Exemplarily, the first electronic device receives data through the first data channel, and based on the data channels associated with multiple device interconnection services, determines the first device interconnection service associated with the first data channel, and uses the received data as the first data related to the first device interconnection service. It should be noted that the DMSDP module and the first data channel may be located in the same software architecture layer. For example, the DMSDP module is located in the application framework layer, and the first data channel is also located in the application framework layer; the DMSDP module and the first data channel may also be located in different software architecture layers. For example, the DMSDP module is located in the application framework layer, and the first data channel is located in the HAL layer, which is not limited. It can be seen that in this implementation manner, the first data related to the first device interconnection service is specifically received through the data channel managed by the DMSDP module.
[0108] Optionally, the data channel associated with each device interconnection service may be established after enabling the virtual device associated with each device interconnection service. For example, taking the device interconnection service as the incoming call service, the audio data channel associated with the incoming call service may be established after enabling the virtual speaker. Another example is that taking the device interconnection service as the camera sharing, the video data channel associated with the camera sharing service may be established after enabling the virtual camera. It should be noted that "enabling the virtual device associated with each device interconnection service" described in the embodiments of the present application may also refer to "establishing the association relationship between the device interconnection service and the virtual device", which is not limited.
[0109] Exemplarily, the first data channel may be the data channel between the first electronic device and the second electronic device, that is, the first device interconnection service is the device interconnection service between the first electronic device and the second electronic device, and the first electronic device provides the first device interconnection service for the second electronic device. Then, in this case, the second electronic device may send data to the first electronic device through the first data channel, so that the first electronic device may receive data from the second electronic device through the first data channel. That is to say, the second electronic device, as the central side running the first device interconnection service, sends data to the first electronic device through the first data channel managed by the DMSDP module on the central side.
[0110] In one implementation, the second electronic device sends the first data through the first data channel, including: the second electronic device obtains the first data related to the first device interconnection service, determines the first data channel associated with the first device interconnection service based on the data channels respectively associated with multiple device interconnection services, and sends the first data through the first data channel.
[0111] Optionally, before the second electronic device sends the first data through the first data channel, the method further includes: the second electronic device obtains, through the DMSDP module, first data related to the first device interconnection service. Optionally, in another alternative implementation, the second electronic device may also obtain, through the first device interconnection service of the application layer, first data related to the first device interconnection service, and further send the first data from the application layer to the DMSDP module. Since the DMSDP module in the embodiments of the present application is decoupled from the device interconnection service of the application layer, cross-process technology is required to complete the communication interaction between the DMSDP module and the application layer. Based on this, the second electronic device sending the first data from the application layer to the DMSDP module includes: the second electronic device sending the first data from the application layer to the DMSDP module through the first device virtualization interface corresponding to the first device interconnection service. Optionally, the first device virtualization interface may be a device virtualization interface provided by the DMSDP module and corresponding to the first device interconnection service.
[0112] S102. The first electronic device determines a first virtual device associated with the first device interconnection service based on virtual devices respectively associated with multiple device interconnection services.
[0113] Exemplarily, taking the first device interconnection service as the incoming call service, the first virtual device associated with the incoming call service may be a virtual speaker.
[0114] S103. The first electronic device sends the first data to the first virtual device.
[0115] In an alternative implementation, the first electronic device may directly send the first data from the DMSDP module to the first virtual device. In another alternative implementation, the first electronic device may also send the first data from the DMSDP module to the application layer, and further the application layer sends the first data to the first virtual device. Since the DMSDP module in the embodiments of the present application is decoupled from the device interconnection service of the application layer, cross-process technology is required to complete the communication interaction between the DMSDP module and the application layer. Based on this, the first electronic device sending the first data from the DMSDP module to the application layer includes: the first electronic device sending the first data from the DMSDP module to the application layer through the first device virtualization interface corresponding to the first device interconnection service.
[0116] Optionally, before step S101, the first electronic device further performs at least one of the following: establishing an association relationship between the first device interconnection service and the first virtual device, adjusting the state of the first virtual device from an unoccupied state to an occupied state, and establishing an association relationship between the first device interconnection service and the first data channel. For example, taking the establishment of the association relationship between the first device interconnection service and the first virtual device as an example, the first electronic device may receive a first request for requesting to establish an association relationship between the first device interconnection service and the first virtual device, and the first electronic device responds to the first request to establish an association relationship between the first device interconnection service and the first virtual device.
[0117] Optionally, the first electronic device is a virtual device provider. When there is a hardware device corresponding to the virtual device in the first electronic device, the method further includes: the first electronic device sending the first data to the hardware device indicated by the first virtual device, and processing the first data through the hardware device indicated by the first virtual device. For example, when the first electronic device provides a virtual speaker for the second electronic device, the audio data may be sent to the speaker indicated by the virtual speaker, and the audio data is played through the speaker.
[0118] It can be seen that in this embodiment, the device interconnection service is decoupled from the DMSDP module, multiple device interconnection services are managed through a unified DMSDP module, and the first virtual device associated with the first device interconnection service can be determined from the virtual devices respectively associated with multiple device interconnection services. When the first electronic device receives the first data related to the first device interconnection service, the first data is sent to the first virtual device, which can avoid the confusion of the first data with the data information of other device interconnection services, thus facilitating the concurrent operation of multiple device interconnection services in the electronic device. At the same time, only one DMSDP module is run in the embodiment of the present application, and the DMSDP module runs as a single instance, which can effectively avoid conflicts of the memory resources and / or network resources corresponding to the DMSDP module.
[0119] Furthermore, the first electronic device can run the first device interconnection service and the second device interconnection service simultaneously. For example, the first electronic device may be Figure 1a or Figure 1b the device side 101 shown in the figure. The first device interconnection service and the second device interconnection service can be run simultaneously in the first electronic device. It should be noted that in this embodiment, the first electronic device includes the DMSDP module on the device side. As Figure 6 shown in the figure, the data processing method may include but is not limited to steps S201 - S206:
[0120] S201. The first electronic device receives the first data related to the first device interconnection service.
[0121] S202. The first electronic device determines a first virtual device associated with the first device interconnection service based on virtual devices respectively associated with multiple device interconnection services.
[0122] S203. The first electronic device sends first data to the first virtual device.
[0123] It should be noted that for the relevant elaborations on steps S201 to S203, please refer to Figure 5 the relevant embodiments and will not be elaborated here.
[0124] S204. The first electronic device receives second data related to the second device interconnection service.
[0125] Among them, the second device interconnection service is a device interconnection service different from the first device interconnection service among the multiple device interconnection services.
[0126] In an optional implementation manner, step S204 may include: The first electronic device receives second data related to the second device interconnection service through a data channel managed by the DMSDP module. Exemplarily, the first electronic device receives data through a second data channel, determines the second device interconnection service associated with the second data channel based on the data channels associated with the multiple device interconnection services, and uses the received data as the second data related to the second device interconnection service.
[0127] For different concurrent scenarios, the second data channel may be between different electronic devices. The following elaborates on the Figure 1a shown concurrent scenario and the Figure 1b shown concurrent scenario respectively:
[0128] (1) In the Figure 1a shown concurrent scenario, the second data channel is a data channel between the first electronic device and the third electronic device. That is, the second device interconnection service is a device interconnection service between the first electronic device and the third electronic device, and the first electronic device provides the second device interconnection service for the third electronic device.
[0129] In the Figure 1a shown concurrent scenario, the second electronic device may act as the central side 102-1, and the third electronic device may act as the central side 102-2. The first data related to the first device interconnection service is transmitted between the first electronic device and the second electronic device through the first data channel; the second data related to the second device interconnection service is transmitted between the first electronic device and the third electronic device through the second data channel.
[0130] In this case, the third electronic device can send data to the first electronic device through the second data channel. Thus, the first electronic device can receive data from the third electronic device through the second data channel. That is, the third electronic device, as the central side running the second device interconnection service, sends data to the first electronic device through the second data channel managed by the DMSDP module on the central side.
[0131] In one implementation, the third electronic device sends second data through the second data channel, including: the third electronic device obtains second data related to the second device interconnection service, determines the second data channel associated with the second device interconnection service based on the data channels respectively associated with multiple device interconnection services, and sends the second data through this second data channel.
[0132] Optionally, before the third electronic device sends second data through the second data channel, the method further includes: the third electronic device obtains second data related to the second device interconnection service through the DMSDP module. Optionally, in another alternative implementation, the third electronic device can also obtain second data related to the second device interconnection service at the application layer and further send the second data from the application layer to the DMSDP module.
[0133] (2) In Figure 1b In the concurrent scenario shown, the second data channel is the data channel between the first electronic device and the second electronic device. That is, the second device interconnection service is the device interconnection service between the first electronic device and the second electronic device, and the first electronic device provides the second device interconnection service for the second electronic device.
[0134] In Figure 1b In the concurrent scenario shown, the second electronic device serves as the central side 102. The first data related to the first device interconnection service is transmitted between the first electronic device and the second electronic device through the first data channel, and the second data related to the second device interconnection service is transmitted between the first electronic device and the second electronic device through the second data channel.
[0135] In this case, the second electronic device can send data to the first electronic device through the second data channel. Thus, the first electronic device can receive data from the second electronic device through the second data channel. That is, the second electronic device, as the central side running the second device interconnection service, sends data to the first electronic device through the second data channel managed by the DMSDP module on the central side.
[0136] In one implementation, the second electronic device sends second data through a second data channel, including: the second electronic device obtains second data related to the second device interconnection service, determines a second data channel associated with the second device interconnection service based on data channels respectively associated with multiple device interconnection services, and sends the second data through the second data channel.
[0137] Optionally, before the second electronic device sends second data through the second data channel, the method further includes: the second electronic device obtains second data related to the second device interconnection service through the DMSDP module. Optionally, in another alternative implementation, the second electronic device can also obtain second data related to the second device interconnection service through the application layer and further send the second data from the application layer to the DMSDP module.
[0138] Since the DMSDP module of the embodiment of the present application is decoupled from the device interconnection service of the application layer, communication interaction needs to be completed between the DMSDP module and the application layer based on cross-process technology. Based on this, an electronic device (including the second electronic device or the third electronic device) sends the second data from the application layer to the DMSDP module, including: the electronic device sends the second data from the application layer to the DMSDP module through a second device virtualization interface corresponding to the second device interconnection service. Optionally, the second device virtualization interface can be a device virtualization interface provided by the DMSDP module and corresponding to the second device interconnection service.
[0139] S205. The first electronic device determines a second virtual device associated with the second device interconnection service based on virtual devices respectively associated with multiple device interconnection services.
[0140] Wherein, the second virtual device and the first virtual device refer to different virtual devices. For example, taking the first virtual device as a virtual speaker, the second virtual device can be a virtual camera.
[0141] S206. The first electronic device sends the second data to the second virtual device.
[0142] In an alternative embodiment, the first electronic device may directly send the second data from the DMSDP module to the second virtual device. In another alternative embodiment, the first electronic device may also send the second data from the DMSDP module to the application layer, and further the application layer sends the second data to the second virtual device. Since the device interconnection service between the DMSDP module and the application layer in the embodiments of the present application has been decoupled, communication and interaction need to be completed between the DMSDP module and the application layer based on cross-process technology. Based on this, the first electronic device sending the second data from the DMSDP module to the application layer includes: the first electronic device sending the second data from the DMSDP module to the application layer through the second device virtualization interface corresponding to the second device interconnection service.
[0143] Optionally, before step S204, the first electronic device further performs at least one of the following steps: establishing an association relationship between the second device interconnection service and the second virtual device, adjusting the state of the second virtual device from an unoccupied state to an occupied state, and establishing an association relationship between the second device interconnection service and the second data channel. For example, taking the establishment of the association relationship between the second device interconnection service and the second virtual device as an example, the first electronic device may receive a second request for requesting to establish an association relationship between the second device interconnection service and the second virtual device, and the first electronic device responds to the second request to establish an association relationship between the second device interconnection service and the second virtual device.
[0144] It can be seen that in this embodiment, when the first electronic device receives the first data related to the first device interconnection service from the first data channel, the first data can be processed by the first virtual device related to the first device interconnection service, and when the first electronic device receives the second data related to the second device interconnection service from the second data channel, the second data can be processed by the second virtual device related to the second device interconnection service. Decoupling the device interconnection service from the DMSDP module and managing multiple device interconnection services through a unified DMSDP module can avoid confusion of data information of multiple device interconnection services, which is beneficial to concurrently running multiple device interconnection services in the electronic device.
[0145] Optionally, in other embodiments, after step S203 and before step S204, the first electronic device may further receive a third request for requesting to establish an association relationship between the second device interconnection service and the first virtual device. In this case, the first device interconnection service and the second device interconnection service may preempt the first virtual device (or rather, the hardware device indicated by the first virtual device) based on priority. The following will be elaborated in detail in combination with Figure 7 the data processing method. As Figure 7As shown, the data processing method may include but is not limited to steps S301 to S311:
[0146] S301. The first electronic device receives first data related to the first device interconnection service.
[0147] S302. The first electronic device determines a first virtual device associated with the first device interconnection service based on virtual devices respectively associated with multiple device interconnection services.
[0148] S303. The first electronic device sends the first data to the first virtual device.
[0149] S304. The first electronic device receives a third request for requesting to establish an association relationship between the second device interconnection service and the first virtual device.
[0150] Optionally, for Figure 1a the concurrent scenario shown, the third request is received from a third electronic device. Optionally, for Figure 1b the concurrent scenario shown, the third request is received from a second electronic device, without limitation.
[0151] S305. The first electronic device detects whether the priority of the second device interconnection service is higher than that of the first device interconnection service; if the priority of the second device interconnection service is higher than that of the first device interconnection service, steps S306 to S310 are executed; otherwise, step S311 is executed.
[0152] Optionally, the priority of the device interconnection service is determined by a policy. For example, the priority of the incoming call service is higher than that of the multimedia service (including but not limited to the camera sharing service, the collaboration service, or the sidecar service, etc.). Optionally, the policy may be set based on user requirements or experience, without limitation.
[0153] S306. The first electronic device deletes the association relationship between the first device interconnection service and the first virtual device and establishes an association relationship between the second device interconnection service and the first virtual device.
[0154] Optionally, the first electronic device may further perform at least one of the following: interrupt the first data channel, delete the association relationship between the first device interconnection service and the first data channel, establish a second data channel, or establish an association relationship between the second device interconnection service and the second data channel. It should be noted that the second data channel is established after establishing the association relationship between the second device interconnection service and the first virtual device.
[0155] That is to say, when the first electronic device discovers that the first virtual device is occupied by the first device interconnection service, since the priority of the second device interconnection service is higher than that of the first device interconnection service, the second device interconnection service can successfully preempt the first virtual device and enable the first virtual device to establish a second data channel.
[0156] S307. The first electronic device sends a third response, and the third response includes a first indication, where the first indication is used to indicate that the association relationship between the second device interconnection service and the first virtual device is successfully established.
[0157] Optionally, for Figure 1a the concurrent scenario shown, this third response is sent by the first electronic device to the third electronic device. Optionally, for Figure 1b the concurrent scenario shown, this third request is sent by the first electronic device to the second electronic device, without limitation.
[0158] Optionally, the first indication may be that the first virtual device is in an unoccupied state.
[0159] S308. The first electronic device receives second data related to the second device interconnection service.
[0160] S309. The first electronic device determines the first virtual device associated with the second device interconnection service based on the virtual devices respectively associated with multiple device interconnection services.
[0161] S310. The first electronic device sends the second data to the first virtual device.
[0162] Optionally, after the second device interconnection service goes offline, the first electronic device can also delete the association relationship between the second device interconnection service and the first virtual device, establish the association relationship between the first device interconnection service and the first virtual device, and continue to send the first data to the first virtual device. After the second device interconnection service goes offline, the first virtual device is in an unoccupied state, and the first electronic device can re-enable the first virtual device and reconstruct the first data channel. Thus, it is beneficial for the first electronic device to receive the first data related to the first device interconnection service through the first data channel and send the first data to the first virtual device.
[0163] Optionally, after all the device interconnection services in the first electronic device go offline (for example, the second device interconnection service goes offline and the first device interconnection service goes offline), no device interconnection service is running in the first electronic device, and the first electronic device can release the memory resources and / or network resources (such as IP addresses, ports, etc.) of the DMSDP module.
[0164] S311. The first electronic device sends a third response, where the third response includes a second indication for indicating that the establishment of the association relationship between the second device interconnection service and the first virtual device fails.
[0165] That is to say, when the first electronic device discovers that the first virtual device is occupied by the first device interconnection service, since the priority of the second device interconnection service is lower than or equal to that of the first device interconnection service, the second device interconnection service cannot preempt the first virtual device, nor can it enable the first virtual device to establish a second data channel.
[0166] Optionally, the second indication may be that the first virtual device is in an occupied state.
[0167] Optionally, after the first device interconnection service goes offline, the first virtual device is in an unoccupied state, and the first electronic device can enable the first virtual device and establish a second data channel. Thus, it is beneficial for the first electronic device to receive second data related to the second device interconnection service through the second data channel and send the second data to the first virtual device.
[0168] Optionally, after the device interconnection service goes offline, the first electronic device can delete information related to the device interconnection service through the DMSDP module. For example, after the first device interconnection service goes offline, the first electronic device can delete the association relationship between the first device interconnection service and the first virtual device, delete the association relationship between the first device interconnection service and the first data channel, and adjust the state of the first virtual device from the occupied state to the unoccupied state, etc.
[0169] It can be seen that in this embodiment, when multiple device interconnection services are associated with the same virtual device, the first electronic device can preempt the virtual device based on the priorities of the multiple device interconnection services. The first electronic device can allocate virtual devices based on policies, which can effectively solve the problem of virtual device conflicts generated when multiple device interconnection services run concurrently.
[0170] It should be noted that Figures 5 to 7The embodiments are described by taking the example of transmitting data information from the center to the device side (for example, the second electronic device transmits the first data to the first electronic device, or the third electronic device or the second electronic device transmits the second data to the first electronic device). In other embodiments, the device side can also transmit data information to the center side (for example, the first electronic device transmits the first data to the second electronic device, or the first electronic device transmits the second data to the third electronic device or the second electronic device). Taking the example of the first electronic device transmitting the first data related to the first device interconnection service to the second electronic device, it specifically includes: The first electronic device can obtain the first data related to the first device interconnection service through the DMSDP module, determine the first data channel associated with the first device interconnection service based on the data channels respectively associated with multiple device interconnection services, and send the first data through this first data channel. Correspondingly, the second electronic device receives the first data related to the first device interconnection service, determines the first virtual device associated with the first device interconnection service based on the virtual devices respectively associated with multiple device interconnection services, and sends the first data to the first virtual device. For example, when the first electronic device provides a virtual camera or a virtual microphone for the second electronic device, the first electronic device can collect video data through the camera or collect audio data through the microphone, obtain the video data or audio data related to the first device interconnection service through the DMSDP module, and send the video data or audio data through the first data channel. Correspondingly, the second electronic device receives the video data or audio data related to the first device interconnection service, determines the virtual camera or virtual microphone associated with the first device interconnection service based on the virtual devices respectively associated with multiple device interconnection services, and sends the video data to the virtual camera or sends the audio data to the virtual microphone. Other relevant descriptions can be referred to the relevant embodiments in the previous text and will not be elaborated here.
[0171] To better illustrate the embodiments of the present application, the following will combine Figure 4 with the software architecture schematic diagram of the electronic device shown in the figure, taking the first electronic device 10 as the device side and the second electronic device 20 as the center side, and elaborate in detail the relevant embodiments of establishing the first data channel between the first electronic device 10 and the second electronic device. The first electronic device 10 may include a device interconnection service 11, a device virtualization interface 12, and a DMSDP module 13. The device interconnection service 11 and the device virtualization interface 12 are located at the application layer, and the DMSDP module 13 is located at the application framework layer; the second electronic device 20 may include a device interconnection service 21, a device virtualization interface 22, and a DMSDP module 23. The device interconnection service 21 and the device virtualization interface 22 are located at the application layer, and the DMSDP module 23 is located at the application framework layer. It should be noted that the DMSDP module 13 is the DMSDP module on the device side, and the DMSDP module 23 is the DMSDP module on the center side. AsFigure 8 As shown, it may include but is not limited to the following steps S401 to S408:
[0172] S401. The second electronic device 20 interacts with the application layer of the first electronic device 10 for device interconnection capabilities through the application layer.
[0173] Among them, the device interconnection capabilities can be used to indicate whether the first device interconnection service is supported.
[0174] In an alternative implementation, step S401 may specifically include steps s11 - s12:
[0175] s11. The second electronic device 20 sends a fourth request to the application layer of the first electronic device 10 through the application layer.
[0176] Correspondingly, the first electronic device 10 receives the fourth request through the application layer.
[0177] Among them, the fourth request is used to request to obtain the device interconnection capabilities of the first electronic device.
[0178] In an alternative implementation, the fourth request may include a service identifier of the first device interconnection service. Optionally, the service identifier may include a service name. For example, taking the first device interconnection service as the collaboration service, the fourth request may include the service name "collaboration service" of the first device interconnection service; or taking the first device interconnection service as the camera sharing service, the fourth request may include the service name "camera sharing service" of the first device interconnection service. In this implementation, it is beneficial for the second electronic device to directly query whether the first electronic device supports the first device interconnection service. Optionally, the service name of the first device interconnection service can be written into the field "moduleName". For example, when the first device interconnection service is "camera sharing service", the first request carries the field "moduleName:OfficeCenter".
[0179] s12. The first electronic device 10 sends a fourth response to the application layer of the second electronic device 20 through the application layer.
[0180] Correspondingly, the second electronic device 20 receives the fourth response through the application layer program.
[0181] Among them, the fourth response is used to indicate the device interconnection capabilities of the first electronic device.
[0182] Optionally, if the fourth request does not include the service identifier of the first device interconnection service, the fourth response may include the service identifiers of all device interconnection services supported by the first electronic device. In this case, if the service identifier of the first device interconnection service is included in the service identifiers of all device interconnection services supported by the first electronic device, the second electronic device determines that the first electronic device supports the first device interconnection service; if the service identifier of the first device interconnection service is not included in the service identifiers of all device interconnection services supported by the first electronic device, the second electronic device determines that the first electronic device does not support the first device interconnection service.
[0183] Optionally, the second electronic device 20 may also send the device interconnection capability of the second electronic device 20 to the application layer of the first electronic device 10 through the application layer. It should be noted that the device interconnection capability may be carried in the fourth request or sent separately, without limitation.
[0184] Optionally, in other embodiments, the interaction process of the device interconnection capability may also be initiated by the first electronic device 10. That is to say, step S401 may also include: the first electronic device 10 sends a fourth request to the application layer of the second electronic device 20 through the application layer, and the second electronic device 20 sends a fourth response to the application layer of the first electronic device 10 through the application layer. For related descriptions, reference may be made to the foregoing related embodiments, and details are not repeated here.
[0185] Optionally, the first device interconnection service may be deployed in the Mobile Manager APP in the application layer. It should be noted that in other embodiments, the device interconnection service may also be deployed in other application packages in the application layer, without limitation.
[0186] S402. The application layer of the second electronic device 20 initializes the DMSDP module 23 through the device virtualization interface 22, and the application layer of the first electronic device 10 initializes the DMSDP module 13 through the device virtualization interface 12.
[0187] In an optional embodiment, initializing the DMSDP module 23 includes at least one of applying for memory resources of the DMSDP module 23, applying for network resources of the DMSDP module 23, or enabling the first device interconnection service of the DMSDP module 23. Correspondingly, initializing the DMSDP module 13 includes at least one of applying for memory resources of the DMSDP module 13, applying for network resources of the DMSDP module 13, or enabling the first device interconnection service of the DMSDP module 13.
[0188] Optionally, for the first device interconnection service, the device virtualization interface 12 and the device virtualization interface 22 may be device virtualization interfaces corresponding to the first device interconnection service.
[0189] Optionally, the method further includes: the DMSDP module 23 and the DMSDP module 13 interact with each other about their initialization information. For example, taking the DMSDP module 23 sending the initialization information of the DMSDP module 23 to the DMSDP module 13 as an example, the initialization information may include at least one of the memory resources applied by the DMSDP module 23, the network resources applied by the DMSDP module 23, or the first device interconnection service enabled by the DMSDP module 23.
[0190] S403. The device interconnection service 21 of the second electronic device 20 sends a fifth request to the DMSDP module 23 through the device virtualization interface 22. The fifth request is used to request the first electronic device 10 to provide a first virtual device for the second electronic device 20.
[0191] Correspondingly, the DMSDP module 23 of the second electronic device 20 receives the fifth request.
[0192] Optionally, the fifth request includes the type of the first virtual device. Taking the first virtual device as a virtual camera as an example, the value of this type can be "1"; taking the first virtual device as a virtual speaker as an example, the value of this type can be "32768". Optionally, the type of the first virtual device can be written into the field "serviceType". For example, when the type of the first virtual device is "1", the field "serviceType: 1" is carried in the fifth request.
[0193] Optionally, the fifth request may include the device identifier of the first electronic device 10. For example, the device identifier of the first electronic device may be "D7621xxx5C0". Optionally, the device identifier of the first electronic device can be written into the field "deviceId". For example, when the device identifier of the first electronic device is "D7621xxx5C0", the field "deviceId: D7621xxx5C0" is carried in the fifth request.
[0194] S404. The second electronic device 20 interacts with the DMSDP module 13 of the first electronic device 10 about the virtualization ability through the DMSDP module 23.
[0195] The virtualization ability can be used to indicate whether the first virtual device is supported.
[0196] In an alternative embodiment, step S404 may specifically include steps s21 - s22:
[0197] s21. The second electronic device 20 sends a sixth request to the DMSDP module 13 of the first electronic device 10 through the DMSDP module 23.
[0198] Correspondingly, the first electronic device 10 receives the sixth request through the DMSDP module 13.
[0199] Among them, the sixth request is used to request to obtain the virtualization capability of the first electronic device 10.
[0200] Optionally, the sixth request may include the type of the first virtual device. For example, the sixth request is used to request a virtual camera. In this implementation manner, it is beneficial for the second electronic device to directly query whether there is a virtual device of this type.
[0201] S22: The first electronic device 10 sends a sixth response to the DMSDP module 23 of the second electronic device 20 through the DMSDP module 13.
[0202] Correspondingly, the second electronic device 20 receives the sixth response through the DMSDP module 23.
[0203] Among them, the sixth response is used to indicate the virtualization capability of the first electronic device. Optionally, taking the first electronic device supporting the first virtual device (such as a virtual camera) as an example, the sixth response may include the identifier of the first virtual device, such as the identifier "Camera_0" of the virtual camera. Optionally, the identifier of the first virtual device can be written into the field "serviceId". For example, when the identifier of the first virtual device is "Camera_0", the field "serviceId: Camera_0" is carried in the sixth response. Optionally, taking the first electronic device not supporting the first virtual device (such as a virtual camera) as an example, the sixth response does not include the identifier of the first virtual device, and the value of the field "serviceId" in the sixth response is empty.
[0204] It should be noted that if the first electronic device supports the first virtual device, the subsequent steps are continued; if the first electronic device does not support the first virtual device, the DMSDP module 23 of the second electronic device 20 may send a fifth response to the device interconnection service 21 through the device virtualization interface 22, and the fifth response includes a third indication, and the third indication is used to indicate that the first electronic device does not support the first virtual device.
[0205] Optionally, in other implementation manners, the sixth response may further include the status of the first virtual device (occupied status or unoccupied status). When the first virtual device is in the unoccupied status, the subsequent steps can be continued; when the first virtual device is in the occupied status, the DMSDP module 23 of the second electronic device 20 may send a fifth response including a fourth indication to the device interconnection service 21 through the device virtualization interface 22, and the fourth indication is used to indicate that the first virtual device of the first electronic device is occupied.
[0206] S405. The second electronic device 20 sends a first request to the DMSDP module 13 of the first electronic device 10 through the DMSDP module 23. The first request is used to request to establish an association relationship between the first device interconnection service and the first virtual device.
[0207] Correspondingly, the DMSDP module 13 of the first electronic device 10 receives the first request.
[0208] Optionally, the first request may include the identifier of the first virtual device and / or the device identifier of the first electronic device.
[0209] S406. The first electronic device 10 queries the status of the first virtual device through the DMSDP module 13 and returns a first response to the DMSDP module 23 of the second electronic device 20.
[0210] Optionally, if the first virtual device is in an unoccupied state, the DMSDP module 13 may directly establish an association relationship between the first device interconnection service and the first virtual device, and return a first response including a fifth indication. The fifth indication is used to indicate that the association relationship between the first device interconnection service and the first virtual device has been established.
[0211] Optionally, if the first virtual device is in an occupied state, the DMSDP module 13 determines whether it can establish an association relationship between the first device interconnection service and the first virtual device based on the priorities of the first device interconnection service and other device interconnection services (i.e., the device interconnection service that occupies the first virtual device). For example, if the priority of the first device interconnection service is higher than the priority of other device interconnection services, the association relationship between the other device interconnection service and the first virtual device may be deleted, and an association relationship between the first device interconnection service and the first virtual device may be established (i.e., it is possible to establish an association relationship between the first device interconnection service and the first virtual device), and a first response including a fifth indication is returned. If the priority of the first device interconnection service is lower than or equal to the priority of other device interconnection services, it is not possible to establish an association relationship between the first device interconnection service and the first virtual device, and a first response including a sixth indication is returned. The sixth indication is used to indicate that the association relationship between the first device interconnection service and the first virtual device cannot be established.
[0212] Optionally, the first response may further include the status of the first virtual device (occupied state or unoccupied state).
[0213] It should be noted that if the first response includes a fifth indication, the subsequent steps are continued. If the first response includes a sixth indication, the DMSDP module 23 of the second electronic device 20 may send a fifth response including a fourth indication to the device interconnection service 21 through the device virtualization interface 22. The fourth indication is used to indicate that the first virtual device of the first electronic device is occupied.
[0214] S407. The second electronic device 20 establishes a first data channel between the second electronic device 20 and the first electronic device 10 through the DMSDP module 23, and the first electronic device 10 establishes the first data channel through the DMSDP module 13.
[0215] Optionally, during the process of establishing the first data channel, at least one of the configuration parameters of the hardware device indicated by the first virtual device, the type of the first data channel, or the ports at both ends of the first data channel needs to be negotiated between the DMSDP module 23 of the second electronic device 20 and the DMSDP module 13 of the first electronic device 10. Exemplarily, if the first virtual device is a virtual speaker, the configuration parameters may include the sampling rate of the speaker; for another example, if the first virtual device is a virtual camera, the configuration parameters may include the frame rate, image size, etc. Exemplarily, the type of the first data channel refers to the communication connection between devices, and this communication connection can be a wired communication connection or a wireless communication connection. For specific reference, please refer to the relevant descriptions above, and details will not be repeated. Exemplarily, the ports at both ends of the first data channel include at least one of the data sending port on the second electronic device side, the data receiving port on the first electronic device side, the data sending port on the first electronic device side, or the data receiving port on the second electronic device side.
[0216] The following describes in detail an exemplary embodiment of negotiating the configuration parameters of the hardware device indicated by the first virtual device between the DMSDP module 23 of the second electronic device 20 and the DMSDP module 13 of the first electronic device 10 in combination with steps S31 to S33.
[0217] S31: The second electronic device 20 sends a seventh request to the DMSDP module 13 of the first electronic device 10 through the DMSDP module 23. The seventh request is used to request the configuration parameters supported by the hardware device indicated by the first virtual device.
[0218] Correspondingly, the DMSDP module 13 of the first electronic device 10 receives the seventh request.
[0219] S32: The first electronic device 10 sends a seventh response to the DMSDP module 23 of the second electronic device 20 through the DMSDP module 13. The seventh response includes the configuration parameters supported by the hardware device indicated by the first virtual device.
[0220] S33: The second electronic device 20 selects a configuration parameter from the supported configuration parameters through the DMSDP module 23 and sends the selected configuration parameter to the DMSDP module 13 of the first electronic device 10.
[0221] Optionally, the selected configuration parameter may be sent separately or carried in a request message (such as the eighth request). It should be noted that when the selected configuration parameter is carried in the eighth request, this method further includes S34: The first electronic device 10 sends an eighth response to the DMSDP module 23 of the second electronic device 20 through the DMSDP module 13, and the eighth response is used to indicate that the selected configuration parameter has been received.
[0222] It should be noted that for the negotiation of the type of the first data channel and / or the implementation method of the ports at both ends of the first data channel between the DMSDP module 23 of the second electronic device 20 and the DMSDP module 13 of the first electronic device 10, reference may be made to the above embodiments, and details are not described herein again.
[0223] S408. The DMSDP module 23 of the second electronic device 20 sends a fifth response to the device interconnection service 21 through the device virtualization interface 22, and the fifth response includes a seventh indication.
[0224] Wherein, the seventh indication is used to indicate that the first data channel between the second electronic device and the first electronic device has been established.
[0225] It should be noted that after the first data channel is established, the steps Figure 5 S101 to S103 may be executed; or the steps Figure 6 S201 to S206 may be executed, which is not limited. For the specific implementation of establishing the second data channel, reference may be made to Figure 8 the relevant embodiments, and details are not described herein again.
[0226] It can be seen that the DMSDP module of the electronic device is decoupled from the device interconnection service at the application layer and can interact based on cross-process communication. For example, the DMSDP module 13 of the first electronic device 10 is decoupled from the first device interconnection service 11 and can implement cross-process communication based on the device virtualization interface 12; another example is that the DMSDP module 23 of the second electronic device 20 is decoupled from the first device interconnection service 21 and can implement cross-process communication based on the device virtualization interface 22. At the same time, a data channel can be established between the second electronic device 20 and the first electronic device 10 through the DMSDP module 23 and the DMSDP module 13.
[0227] The above Figures 5 to 7 embodiments illustrate the specific process of transmitting data information between electronic devices through a data channel. In specific implementation, control information also needs to be transmitted between electronic devices through a control channel. For example, Figure 8The above-mentioned control information can be transmitted through a control channel. Similar to data information, in a scenario where multiple device interconnection services coexist, when an electronic device needs to transmit (send and / or receive) control information to other electronic devices through a control channel, the electronic device may not be able to determine which device interconnection service among the multiple device interconnection services the control information is related to, thus confusing the control information of multiple device interconnection services. Therefore, the embodiments of the present application further include but are not limited to the following steps: transmitting control information associated with each device interconnection service through a control channel associated with each device interconnection service respectively. For example, an electronic device can obtain first control information associated with a first device interconnection service through a DMSDP module, determine a first control channel associated with the first device interconnection service based on control channels associated with multiple device interconnection services respectively, and send the first control information through the first control channel. It should be noted that the electronic device can also obtain the first control information related to the first device interconnection service through the first device interconnection service at the application layer, and further send the first control information from the application layer to the DMSDP module through a first device virtualization interface, which is not limited. Another example is that an electronic device can obtain data through a first control channel, determine that the control information is the first control information associated with the first device interconnection service based on control channels associated with multiple device interconnection services respectively, and send the first control information from the DMSDP module to the application layer through a first device virtualization interface, and the first device interconnection service at the application layer processes it. For a detailed embodiment, refer to the implementation manner of transmitting data information, which will not be elaborated here. It should be noted that the DMSDP module also needs to manage the association relationship between each device interconnection service and the control channel, and the control channel can be pre-configured.
[0228] In the embodiments of the present application, the device interconnection service located at the application layer and the DMSDP module need to implement interaction based on cross-process communication. Based on this, the embodiments of the present application need to standardize the formats of control information and data information for cross-process communication, that is, it is necessary to stipulate the formats of control information and data information transmitted through the device virtualization interface. The following will elaborate on control information and data information respectively:
[0229] 1. Control Information
[0230] Among them, the control information includes control information 1 sent from the device interconnection service to the DMSDP module, and control information 2 sent from the DMSDP module to the device interconnection service.
[0231] Exemplarily, taking the Json format as an example, the following exemplary shows the pseudo-code of control information 1:
[0232]
[0233]
[0234] Exemplarily, taking the Json format as an example, the pseudo code of the control information 2 is shown as follows:
[0235]
[0236]
[0237] It can be seen that in this embodiment, the control information 1 and the control information 2 can be in Json format, which is a lightweight data exchange format that is more concise and readable, and is conducive to developers to read and write. It should be noted that in other embodiments, the control message 1 and the control message 2 can also be in other formats, such as XML format, and this application does not limit this.
[0238] 2. Data information
[0239] The data information includes but is not limited to audio data and binary data sent from the device interconnection service to the DMSDP module, and video data and screen projection event data sent from the DMSDP module to the device interconnection service.
[0240] Exemplarily, when the first electronic device provides an incoming call service for the second electronic device, the second electronic device may send audio data from the device interconnection service to the DMSDP module.
[0241] Exemplarily, the data frame format of the audio data may be as follows:
[0242]
[0243] Exemplarily, when the first electronic device provides a collaborative service for the second electronic device, the first electronic device may send binary data from the device interconnection service to the DMSDP module.
[0244] Exemplarily, the data frame format of binary data may be as follows:
[0245]
[0246] Exemplarily, when the first electronic device provides a companion service for the second electronic device, the first electronic device may send the video data from the DMSDP module to the device interconnection service.
[0247] Exemplarily, the data frame format of the video data may be as follows:
[0248]
[0249] Exemplarily, when the first electronic device provides a heterogeneous screen mirroring service for the second electronic device, the first electronic device may send the screen mirroring event data from the DMSDP module to the device interconnection service.
[0250] Exemplarily, the data frame format of the screen mirroring event data may be as follows:
[0251]
[0252] It should be noted that the above data information is only for exemplary illustration. In other embodiments, more data information may also be exchanged between the device interconnection service and the DMSDP module. For example, image data, etc. This application does not make any limitations in this regard.
[0253] It should be noted that the embodiments of this application are described by taking the first device interconnection service and the second device interconnection service as examples. In other embodiments, more device interconnection services may be involved. For example, multiple device interconnection services may include the first device interconnection service, the second device interconnection service, and the third device interconnection service, without limitation.
[0254] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium may be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, solid-state drive), etc.
[0255] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by hardware instructed by a computer program. This program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The foregoing storage medium includes: various media that can store program codes, such as ROM or random access memory RAM, magnetic disks, or optical discs.
Claims
1. A data processing method, characterized in that, The method includes: Receiving first data related to a first device interconnection service; the first device interconnection service is any one of multiple device interconnection services; Determining a first virtual device associated with the first device interconnection service based on virtual devices respectively associated with the multiple device interconnection services; Sending the first data to the first virtual device.
2. The method according to claim 1, wherein The method further includes: Receiving second data related to a second device interconnection service; the second device interconnection service is a device interconnection service different from the first device interconnection service among the multiple device interconnection services; Determining a second virtual device associated with the second device interconnection service based on virtual devices respectively associated with the multiple device interconnection services; Sending the second data to the second virtual device.
3. The method according to claim 2, wherein Before receiving the second data related to the second device interconnection service, the method further includes: If the priority of the second device interconnection service is higher than the priority of the first device interconnection service, deleting the association relationship between the first device interconnection service and the first virtual device, and establishing an association relationship between the second device interconnection service and the first virtual device; After receiving the second data related to the second device interconnection service, the method further includes: Sending the second data to the first virtual device.
4. The method according to any one of claims 1 to 3, characterized in that The receiving of the first data related to the first device interconnection service includes: Receiving data through a first data channel; Determining a first device interconnection service associated with the first data channel based on data channels respectively associated with the multiple device interconnection services, and taking the received data as the first data related to the first device interconnection service.
5. The method according to any one of claims 2 to 4, characterized in that, The receiving of the second data related to the second device interconnection service includes: Receiving data through a second data channel; Determining a second device interconnection service associated with the second data channel based on data channels respectively associated with the multiple device interconnection services, and taking the received data as the second data related to the second device interconnection service.
6. The method according to any one of claims 2 to 5, characterized in that The first device interconnection service and the second device interconnection service are device interconnection services between a first electronic device and a second electronic device.
7. The method according to any one of claims 2 to 5, characterized in that The first device interconnection service is a device interconnection service between a first electronic device and a second electronic device, and the second device interconnection service is a device interconnection service between the first electronic device and a third electronic device.
8. The method according to any one of claims 1 to 7, characterized in that The method further includes: Sending the first data from a device virtualization module to an application layer through a first device virtualization interface corresponding to the first device interconnection service.
9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: Transmitting control information associated with each device interconnection service through a control channel respectively associated with each device interconnection service.
10. The method according to claim 9, characterized in that, The method further includes: Transmitting control information associated with each device interconnection service between an application layer and a device virtualization module through a device virtualization interface respectively corresponding to each device interconnection service.
11. The method according to any one of claims 1 to 10, characterized in that, The multiple device interconnection services include at least two of camera sharing service, collaboration service, incoming call service, or Sidecar service.
12. A data processing method, characterized in that, The method includes: Obtaining first data related to a first device interconnection service; the first device interconnection service is any one of the multiple device interconnection services; Based on the data channels respectively associated with the multiple device interconnection services, determining a first data channel associated with the first device interconnection service; Sending the first data through the first data channel.
13. The method according to claim 12, wherein The method further includes: Obtaining second data related to a second device interconnection service; the second device interconnection service is a device interconnection service different from the first device interconnection service among the multiple device interconnection services; Based on the data channels respectively associated with the multiple device interconnection services, determining a second data channel associated with the second device interconnection service; Sending the second data through the second data channel.
14. The method according to claim 12 or 13, characterized in that, The obtaining of the first data related to the first device interconnection service includes: Obtaining data related to a first virtual device; Based on the virtual devices respectively associated with the multiple device interconnection services, determining the first device interconnection service associated with the first virtual device, and using the data as the first data related to the first device interconnection service.
15. The method according to claim 13, wherein The obtaining of the second data related to the second device interconnection service includes: Obtaining data related to a second virtual device; Based on the virtual devices respectively associated with the multiple device interconnection services, determining the second device interconnection service associated with the second virtual device, and using the data as the first data related to the second device interconnection service.
16. The method according to claim 13, wherein Before obtaining the second data related to the second device interconnection service, the method further includes: If the priority of the second device interconnection service is higher than the priority of the first device interconnection service, deleting the association relationship between the first device interconnection service and the first virtual device, and establishing an association relationship between the second device interconnection service and the first virtual device; The obtaining of the second data related to the second device interconnection service includes: Obtaining data related to the first virtual device; Based on the virtual devices respectively associated with the multiple device interconnection services, determining the second device interconnection service associated with the first virtual device, and using the data as the second data related to the second device interconnection service.
17. The method according to any one of claims 13 to 16, characterized in that, The first device interconnection service and the second device interconnection service are device interconnection services between a first electronic device and a second electronic device.
18. The method according to any one of claims 13 to 16, characterized in that, The first device interconnection service is a device interconnection service between a first electronic device and a second electronic device, and the second device interconnection service is a device interconnection service between the first electronic device and a third electronic device.
19. The method according to any one of claims 12 to 18, characterized in that The method further includes: Sending the first data from the application layer to the device virtualization module through a first device virtualization interface corresponding to the first device interconnection service.
20. The method according to any one of claims 12 to 19, characterized in that, The method further includes: Transmit control information associated with each device interconnection service through a control channel respectively associated with each device interconnection service.
21. The method according to claim 20, wherein The method further includes: Transmit control information associated with each device interconnection service between the application layer and the device virtualization module through a device virtualization interface respectively corresponding to each device interconnection service.
22. The method according to any one of claims 12 to 21, characterized in that, The multiple device interconnection services include at least two of a camera sharing service, a collaboration service, an incoming call service, or a Sidecar service.
23. An electronic device, characterized in that, Includes: One or more processors, one or more memories; the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, the computer program code includes computer instructions, when the one or more processors execute the computer instructions, cause the electronic device to execute the method according to any one of claims 1-11; or execute the method according to any one of claims 12-22.
24. A computer-readable storage medium, characterized in that, Includes computer instructions, when the computer instructions run on an electronic device, cause the electronic device to execute the method according to any one of claims 1-11; or execute the method according to any one of claims 11-22.
25. A chip or chip system, characterized in that, Includes a processing circuit and an interface circuit, the interface circuit is configured to receive code instructions and transmit them to the processing circuit, the processing circuit is configured to run the code instructions to execute the method according to any one of claims 1-11; or execute the method according to any one of claims 12-22.