Screen projection method and electronic equipment
By creating independent processes based on user identification in screen projection devices and adapting display style data, the problem of user privacy leakage and display adaptation difficulties is solved, and security and cost-effectiveness is improved.
Patent Information
- Application Number
- CN202510446169.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-31
- Publication Date
- 2025-08-19
AI Technical Summary
In the existing screen projection technology, the user privacy of the first device may be leaked, the security is low, and the physical characteristics of the display screens of different devices lead to difficulty in adapting the display content, increasing the cost of screen projection and reducing the user experience.
By determining the screen projection device based on the user identification, and creating independent processes in the device, displaying different display content on different devices, achieving heterogeneous screen projection, improving security, and adapting processing by obtaining the display style data of the device, reducing costs.
Improves the security and flexibility of screen projection display, reduces costs, and improves user experience and display performance.
Smart Images

Figure CN120508270A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202011642279.5, and the original application date is December 31, 2020. The entire content of the original application is incorporated into this application by reference. Technical Field
[0002] The present application relates to the field of terminal technology, and in particular to a screen projection method and electronic device. Background Art
[0003] Currently, electronic devices can install and run applications, and the electronic device can obtain the display content of the application and display it on the local display. However, this single display method has gradually become unable to meet user needs, and various more diverse display methods have emerged, among which screen projection is an important display method.
[0004] In the prior art, a first device may obtain display content corresponding to a process of an application program, and the first device may display the display content, or may project the display content to a second device, thereby displaying the display content on the display screen of the second device.
[0005] However, since the user of the first device and the user viewing the display screen of the second device may not be the same, for example, the first device may be a user's mobile phone, and the second device may be a public display screen in a company's conference room, the user of the first device usually does not want the user viewing the second device to see some private content through the second device. In the existing screen projection method, the first device and the second device can display the same content, which may lead to the privacy leakage of the user of the first device and low security. Summary of the Invention
[0006] In view of this, the present application provides a screen projection method and electronic device to improve the security of screen projection display.
[0007] To achieve the above objectives, in a first aspect, embodiments of the present application provide a screen projection method, comprising:
[0008] The first device obtains first display content corresponding to the first process of the first application;
[0009] The first device determines the second device based on a first user identifier corresponding to the first process;
[0010] The first device projects the first display content onto a display screen of the second device for display.
[0011] The first application may be any application in the first device. In some embodiments, the first application may include a system application, which is used to provide the software environment necessary for the electronic device to operate or interact with the user, such as a desktop application and a system user interface application. In other embodiments, the first application may include a user application, which can be installed by the user and provide value-added services to the user, such as communication applications and games.
[0012] It should be noted that the user identification in this embodiment may refer to a user identification in the operating system of the electronic device.
[0013] In an embodiment of the present application, the first device can obtain the first display content corresponding to the first process of the first application and determine the second device based on the first user identifier corresponding to the first process. Since the first process corresponds to the first user identifier and the second device is determined based on the first user identifier, the first display content of the first process can be projected to the second device for display. That is, the first device can control the content projected and displayed on the second device through the first user identifier, reducing the problem of indiscriminately projecting all display content of the first application to the second device and improving the security of the display.
[0014] Optionally, the method further includes:
[0015] The first device obtains second display content corresponding to a second process of the first application, where the second process corresponds to a second user identifier, and the second user identifier corresponds to the first device;
[0016] The first device displays the second display content on a display screen of the first device.
[0017] For example, the first user identifier may be expressed as userid=10, ie, user 10; and the second user identifier may be expressed as userid=0, ie, user 0.
[0018] Users can use multiple user IDs to control the display content displayed on multiple different devices, which improves the flexibility and security of the display. In addition, since the first device displays the first display content corresponding to the first process of the first application on the second device when running the first application, and displays the second display content corresponding to the second process of the first application on the first device or the third device, and these two processes are independent, the first device can adapt the first display content and the second display content to the display screens of the second device and the first device (or the third device), respectively, thereby displaying the first display content and the second display content on the second device and the first device (or the third device), respectively. For the user, being able to display the first application on two devices at the same time improves display performance and user experience.
[0019] Optionally, the first user identifier is the same as the second user identifier, the first process is the same as the second process, and the first display content is the same as the second display content.
[0020] The first device can compare the first user identifier with the second identifier. When the first user identifier and the second user identifier are different, it can be determined that the current screen projection is a heterogeneous screen projection. When the first user identifier and the second user identifier are the same, the current screen projection is a homogeneous screen projection, and the first process and the second process are the same process, then the first display content is the same as the second display content.
[0021] Optionally, the first device determining the second device based on the first user identifier corresponding to the first process includes:
[0022] The first device determines, based on the first user identifier, a device identifier of the second device from a stored correspondence between at least one user identifier and at least one device identifier, the at least one user identifier including the first user identifier, and the at least one device identifier including the device identifier of the second device;
[0023] The first device determines the second device according to the device identification of the second device.
[0024] It should be noted that the correspondence between the user identifier and the device identifier can be determined in advance by the first device. In some embodiments, the first device can first determine the second device for screen projection, then determine the first user identifier corresponding to the second device, and then store the device identifier of the second device in correspondence with the first user identifier, so that when the first display content of the first process corresponding to the first user identifier is obtained, the corresponding second device can be determined based on the first user identifier.
[0025] In some embodiments, the first device may search for the second device upon receiving a screen projection operation from the user. If the first device finds multiple electronic devices, it may display a device list to the user, the device list including the device identifiers of the multiple electronic devices, and upon receiving a confirmation operation from the user based on at least one device identifier among the multiple electronic device identifiers, the electronic device corresponding to the at least one device identifier may be determined as the second device.
[0026] In some embodiments, the first device may determine the first user identifier based on the device identifier of the second device from a stored correspondence between at least one device identifier and at least one user identifier. In some embodiments, the first device may provide a user list to the user, the user list including at least one user identifier, and upon receiving a user confirmation operation based on any user identifier, determine the user identifier as the first user identifier. In some embodiments, the first device may also receive the first user identifier submitted by the user.
[0027] Optionally, the first device obtaining first display content corresponding to the first process includes:
[0028] The first device obtains third display content corresponding to the first process of the first application;
[0029] The first device obtains display style data corresponding to the second device from the application body of the first application;
[0030] The first device performs adaptation processing on the third display content based on the display style data corresponding to the second device to obtain the first display content.
[0031] The first device can obtain the display style data corresponding to the second device from the application body of the first application without pre-setting the display style data for various devices, thereby reducing the cost of screen projection display.
[0032] Optionally, before the first device obtains the first display content corresponding to the first process of the first application, the method further includes:
[0033] The first device creates the first process based on the first user identifier.
[0034] Optionally, the first device creates the first process based on the first user identifier, including:
[0035] If the first device determines that the user corresponding to the first user identifier exists, obtaining user data of the first application from the user space corresponding to the first user identifier;
[0036] The first process is created based on the user data of the first application.
[0037] The first device may determine whether the stored user ID list includes the first user ID. If so, it may be determined that the user corresponding to the first user ID exists. Otherwise, it may be determined that the user corresponding to the first user ID does not exist. If the user corresponding to the first user ID does not exist, the first device may create the user based on the first user ID, and then create the first process based on the first user ID.
[0038] It should be noted that the first device may include multiple user spaces, each isolated from the others. User spaces may include application data. In some embodiments, the application data may include user data, which may be data generated by the first device for a user when running an application, such as chat logs from an instant messaging application, images captured by a camera, and so on. The application itself may be stored in a designated storage space outside of the multiple user spaces, and the instruction storage space may be shared by the users corresponding to the multiple user spaces. Alternatively, in some embodiments, the application data may also include the application itself, and the first device may install the application in the user space corresponding to each user ID based on different user IDs. The user data of the same application in different user spaces may be different, allowing the first device to independently run multiple processes of the same application simultaneously. For example, the instruction storage space used to install the application in the first device is located at " / data / app", and the first device includes two user spaces, with the addresses of the two user spaces being " / data / user / 0" and " / data / user / 10", respectively. " / data / user / 0" is the user space for user 0, and " / data / user / 10" is the user space for user 10. Each user space includes user data of a communication application, so the first device can independently run two processes of the communication application at the same time. For the user, two communication applications can be run on the first device, and different application accounts can be logged in to each communication application.
[0039] In some embodiments, the first device may create a second process of the application based on the second user identifier in a manner similar to creating the first process based on the first user identifier.
[0040] Optionally, the first device includes a first mobile phone, and the second device includes a computer, a vehicle-mounted device, a smart TV, or a second mobile phone. Of course, in actual applications, the second device may also include other electronic devices provided with a display.
[0041] In a second aspect, an embodiment of the present application provides a screen projection device, which can be applied to an electronic device, and the screen projection device can use any of the methods described in the first aspect above.
[0042] In a third aspect, an embodiment of the present application provides an electronic device comprising: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute any one of the methods described in the first aspect above when calling the computer program.
[0043] In a fourth aspect, an embodiment of the present application provides a chip system, which includes a processor coupled to a memory, and the processor executes a computer program stored in the memory to implement any method described in the first aspect above.
[0044] The chip system may be a single chip or a chip module composed of multiple chips.
[0045] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements any of the methods described in the first aspect when the computer program is executed by a processor.
[0046] In a sixth aspect, an embodiment of the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute any one of the methods described in the first aspect above.
[0047] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0049] Figure 2 A schematic diagram of the structure of a screen projection system provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of a screen projection scenario provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of another screen projection scenario provided in an embodiment of the present application;
[0052] Figure 5 A schematic structural diagram of another screen projection system provided in an embodiment of the present application;
[0053] Figure 6 A schematic diagram of the software architecture of an application provided in an embodiment of the present application;
[0054] Figure 7 A flowchart of a screen projection method provided in an embodiment of the present application;
[0055] Figure 8 A schematic diagram of another screen projection scenario provided in an embodiment of the present application;
[0056] Figure 9 A schematic diagram of another screen projection scenario provided in an embodiment of the present application;
[0057] Figure 10 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] The screen projection method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0059] Please refer to Figure 1 , is a schematic diagram of the structure of an electronic device 100 provided in this application. The electronic device 100 may be the first device, the second device, the third device, the fourth device, or the fifth device described below, and the electronic device 100 may include a processor 110, a memory 120, and a communication module 130, etc.
[0060] The processor 110 may include one or more processing units, and the memory 120 is used to store program codes and data. In the embodiment of the present application, the processor 110 may execute computer-executable instructions stored in the memory 120 to control and manage the actions of the electronic device 100.
[0061] The communication module 130 can be used for communication between various internal modules of the electronic device 100, or communication between the electronic device 100 and other external electronic devices. For example, if the electronic device 100 communicates with other electronic devices via a wired connection, the communication module 130 may include an interface, such as a USB interface. The USB interface may be an interface that complies with USB standards, specifically a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices.
[0062] Alternatively, the communication module 130 may include an audio device, a radio frequency circuit, a Bluetooth chip, a wireless fidelity (Wi-Fi) chip, a near-field communication (NFC) module, etc., and can realize the interaction between the electronic device 100 and other electronic devices in a variety of different ways.
[0063] Optionally, the electronic device 100 may further include a display screen 140, which may display images or videos in a human-computer interaction interface. Optionally, the display screen 140 may include a physical display screen, a virtual display screen, a wireless display screen (Wi-Fi display), and the like.
[0064] Optionally, the electronic device 100 may further include a peripheral device 150 , such as a mouse, a keyboard, a speaker, a microphone, and the like.
[0065] It should be understood that, except Figure 1 The embodiments of the present application do not specifically limit the structure of the electronic device 100 except for the various components or modules listed in the figure. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine or separate certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0066] Please refer to Figure 2 , is a structural diagram of a screen projection system provided in an embodiment of the present application, and the screen projection system may include a fourth device 200 and a fifth device 300.
[0067] The fourth device 200 may include a first application layer 210 , a first application management service layer 220 , a first window management service (WMS) layer 230 , a first display management service (DMS) layer 240 , a first display layer 250 , and a first encoding layer 260 .
[0068] The first application layer 210 may include local display style data 211, at least one cast display style data 212, and first application data 213. The local display style data 211 and the cast display style data 212 may be preset by the fourth device 200 in advance based on the physical characteristics of the display screens of the fourth device 200 and the fifth device 300, so that the same display content can be displayed normally and in different display styles on the local device and the fifth device 300, respectively, wherein the physical characteristics may include at least one of resolution and dots per inch (DPI). The local display style data 211 may include a first desktop (launcher) 214 and a first system user interface (system UI) 215. The cast display style data 212 may include a second desktop (which may be called cast_launcher) 216 and a second system user interface (which may be called cast_system UI) 217. The first desktop 214 and the second desktop 216 may be the same application or different applications, and are used to provide different desktop styles for different devices, such as landscape, portrait, screen size, screen ratio, etc. The first system user interface 215 and the second system user interface 217 can be the same application or different applications, and are used to provide different UI styles for different devices, such as the status bar, notification bar, navigation bar, and volume UI. Among them, the first desktop 214 and the second desktop 216. The first application data 213 can include the application itself (such as a camera, gallery, instant messaging application, and audio and video application) and the user data of the application (such as documents, photos, music, videos, and chat history).
[0069] The first application management service layer 220 may include a first application management service module 221. The first application management service module 221 may be used to manage the running state of an application. In some embodiments, the first application management service module 221 may manage the lifecycle of components such as application activity components through an activity management service (AMS), such as starting, ending, and scheduling activity components. Activity components are important components of an application, and all activity components of an application may run within the application's process.
[0070] The first window management service layer 230 may include a first logical display screen (display content) 231 and a second logical display screen 232. The first logical display screen 231 and the second logical display screen 232 may correspond to the display screen of the fourth device 200 and the display screen of the fifth device 300, respectively. Taking the first logical display screen 231 as an example, the first logical display screen 231 may determine the display content to be displayed on the display screen of the fourth device 200 based on the information included in the windows and sub-windows of each active component.
[0071] The first display management service layer 240 can be used to manage the life cycle of display screens (including the display screen of the fourth device 200 and the display screen of the fifth device 300). A display adapter can be coupled to the first display management service layer 240. The display adapter can be used to discover the display screen and determine the physical characteristics of the display screen. It can also process the display content according to the physical characteristics of the display screen, so that the display content adapts to the physical characteristics, that is, the display adapter can provide an adaptation function for the display screen. The first display management service layer 240 can provide the detected physical characteristics of the display screen to other layers (such as the first window management service layer 230) so that other layers can perform display-related operations based on the physical characteristics. In some embodiments, the display adapter may include at least one of a local display adapter 241, a virtual display adapter (overlay display adapter or virtual display adapter) 242, and a wireless display adapter (wifi display adapter) 243, wherein the local display adapter 241 can be used to provide an adaptation function for the physical display screen (or main display screen), the virtual display adapter 242 can be used to provide an adaptation function for the virtual display screen, and the virtual display adapter 242 can be created by the fourth device 200 when detecting a projection device (such as the fifth device 300), and the wireless display can be used to provide an adaptation function for the wireless display. In an embodiment of the present application, the local display adapter 241 can provide an adaptation function for the display screen of the fourth device 200, and the wireless display adapter 243 can provide an adaptation function for the display screen of the fifth device 300.
[0072] The first display layer 250 may synthesize and render the data required to be displayed on a certain display screen through an image synthesis service (such as a surface flinger), and send the obtained display content (such as an image) to the display screen for display.
[0073] The first encoding layer 260 may be used to encode display content to be transmitted to the fifth device 300 .
[0074] The fifth device 300 may include a second display layer 310 and a first decoding layer 320. The first decoding layer 320 may decode the display content encoded by the first encoding layer 260 and send the decoded display content to the second display layer 310. The second display layer 310 may display the display content by performing similar or identical steps as the first display layer 250.
[0075] In some embodiments, the fourth device 200 can simultaneously display an interface on the local side through heterogeneous screen projection, and display another interface on the screen of its device. Specifically, take the example of the fourth device 200 projecting the screen on the fifth device 300 through heterogeneous screen projection. The fourth device 200 discovers the physical characteristics of the display screen of the fifth device 300 through the first display management service layer 240, and searches for the projection display style data 212 corresponding to the fifth device 300 on the local side based on the physical characteristics of the display screen. The fourth device 200 displays a desktop on the local side through the local display style data 211, and displays another desktop on the fifth device 300 through the projection display style data 212. When an application is running, the fourth device 200 can manage the process of the application through the first application management service layer 220, where one application corresponds to one process. The fourth device 200 can also determine on which display screen the display content corresponding to the process is displayed through the first window management service layer 230. If the display content corresponding to the process is displayed on the display screen of the fifth device 300, the display content is processed through the first wireless display adapter 243 so that the display content is suitable for display on the display screen of the fifth device 300. Afterwards, the fourth device 200 can encode the adapted display content through the first encoding layer 260 and send the encoded display content to the fifth device 300. The fifth device 300 can decode the received display content through the first decoding layer 320 and display the decoded display content on the display screen through the second display layer 310.
[0076] Among them, heterogeneous screen projection is a screen projection method. Heterogeneous screen projection refers to an electronic device projecting part of the display content on another electronic device, and the display content displayed on the other electronic device is different from the display content displayed on the electronic device itself. Another screen projection method is homogeneous screen projection, which refers to an electronic device directly projecting the display content of the electronic device itself to another electronic device for display, that is, the display content displayed by the two electronic devices is the same.
[0077] Please refer to Figure 3, is a schematic diagram of a scenario of same-source screen projection display provided in an embodiment of the present application. In this scenario, the fourth device 200 is a mobile phone, and the fifth device 300 includes at least one of a smart TV and a laptop computer. The mobile phone currently displays a video playback screen, and the mobile phone projects the video playback screen to at least one of the smart TV and the laptop computer, so that at least one of the smart TV and the laptop computer also displays the video playback screen.
[0078] Please refer to Figure 4 , which is a schematic diagram of a scenario of heterogeneous screen projection display provided by an embodiment of the present application. In this scenario, the fourth device 200 is a mobile phone, and the fifth device 300 includes one of a laptop computer and an in-vehicle device. The mobile phone currently displays a video playback screen, and the mobile phone also displays a chat interface on the laptop screen. Similarly, the mobile phone can also display the music playback screen on the in-vehicle device.
[0079] It can be seen that there are at least the following problems in the above embodiments: First, since the same application corresponds to a process, and a process corresponds to a user, the fourth device 200 can display the display content of the process on the display screen of the fourth device 200 or the fifth device 300, that is, the display content of the fourth device 200 displayed through screen projection and the display content displayed on the local end are the same, and since the user of the first device may not be the same as the user viewing the display screen of the second device, for example, the first device may be a user's mobile phone, and the second device may be a public display screen in a company's conference room, the user of the first device may not want the user viewing the second device to see some private content through the second device, which may lead to user privacy leakage and low security. Secondly, since the physical characteristics of the display screens of different devices (such as resolution and DPI) are different, different display styles are required. It is difficult for the fourth device 200 to adapt the display content of the same process to different display screens at the same time. Therefore, when performing heterogeneous screen projection, it is difficult for the fourth device 200 and the fifth device 300 to display the same application at the same time, and when the display content of the application is switched from the fourth device 200 to the fifth device 300 or from the fifth device 300 to the fourth device 200 for display, the application may be reloaded, resulting in poor display performance and user experience. In addition, the fourth device 200 needs to set different projection display style data for different electronic devices in advance, which increases the cost of screen projection.
[0080] To solve at least some of the above technical problems, the present application provides another screen projection system. Figure 5 , is a structural diagram of another screen projection system provided in an embodiment of the present application, the screen projection system may include a first device 400 and at least one screen projection device ( Figure 5), a second device 500 and a third device 600 are shown in the figure, and a display may be provided in the screen projection device.
[0081] The first device 400 may include a second application layer 410, a second application management service layer 420, a user setting (user controller) module 422, a user management (user manager service) module 423, a device management module 424, a data storage (setting provider) module 425, a second window management service layer 430, a second display management service layer 440, a third display layer 450, and an encoding layer ( Figure 5 A second coding layer 460 and a third coding layer 470 are shown).
[0082] The second application layer 410 may include multiple user spaces, each of which may include application data and display style data. Each user space may correspond to a user, such as Figure 5 The first user space 411, the second user space 413 and the third user space 415 are shown in FIG. 4 , wherein the user identifier (userid) corresponding to the first user space 411 is 0 (i.e., userid=0), the first user space 411 includes the second application data 412C, the user identifier corresponding to the second user space 413 is 10 (i.e., userid=10), the first user space 413 includes the third application data 414C, the user identifier corresponding to the third user space 415 is 11 (userid=11), and the first user space 415 includes the fourth application data 416C. Each application data can be associated with Figure 2 Each display style data may be similar to the first application data 213 in FIG. Figure 2 Similar to the local display style data 211 or the projection display style data 212 of the fourth device 200, each display style data may correspond to a projection display device, such as Figure 5The first display style data 412, the second display style data 414, and the third display style data 416 are shown in the figure, wherein the first display style data 412 corresponds to the first device 400, and the first display style data 412 includes a third desktop 412A and a third system user interface 412B; the second display style data 414 corresponds to the second device 500, and the second display style data 414 includes a fourth desktop 414A and a fourth system user interface 414B; the third display style data 416 corresponds to the third device 600, and the third display style data 416 includes a third desktop 416A and a third system user interface 416B. Since each user space can correspond to a user, the first device 400 can run multiple processes to correspond to multiple users when running an application. Accordingly, when projecting the screen, the display content corresponding to different processes (i.e., different users) can be displayed on the display screens of different devices.
[0083] It should be noted that the user identifier in the embodiment of the present application may refer to the user identifier in the operating system of the electronic device. For example, userid=0 may represent the main user (i.e., user 0) in the operating system, and userid=10 and userid=11 may represent sub-users (i.e., user 10 and user 11) in the operating system.
[0084] It should also be noted that the first device 400 may include multiple user spaces, each of which is isolated from each other. The user space may include application data. In some embodiments, the application data may include user data (such as Figure 5 (as shown in the second application data 412C in the figure), user data may be data generated for the user by the first device 400 when running the application, such as chat records of instant messaging applications, pictures taken by the camera, etc. In some embodiments, the application data may also include the application body, and the first device may install the application in the user space corresponding to each user identifier based on different user identifiers; or, in other embodiments, the application data does not include the application body, and the application body is stored in a designated storage space outside the multiple user spaces, and the instruction storage space may be shared by users corresponding to the multiple user spaces. Among them, the user data of the same application in different user spaces may be different, so that the first device 400 can independently run multiple processes of the same application at the same time. For example, the address of the instruction storage space for installing the application in the first device 400 is " / data / app", and the first device includes two user spaces, and the addresses of the two user spaces are " / data / user / 0" and " / data / user / 10", respectively, wherein " / data / user / 0" is the user space of user 0,
[0085] " / data / user / 10" is the user space of user 10. Each user space includes user data of a communication application. Therefore, the first device 400 can independently run two processes of the communication application at the same time. For the user, two communication applications can be run on the first device 400, and different application accounts can be logged in to each communication application.
[0086] In some embodiments, each user space may not include display style data, but may be Figure 6 As shown, the application body 700 may include multiple types of display style data such as application desktop style 710 and application system user interface style 720, and each display style data may include styles adapted for different devices. Figure 6 As shown, the application desktop style 710 includes a mobile phone desktop style 710A, a computer desktop style 710B, and a vehicle desktop style 710C, so that the desktop of the application 700 can be normally displayed on the display screens of mobile phones, computers, and vehicle-mounted devices. Similarly, the application system user interface style 720 can include a mobile phone system user interface style 720A, a computer system user interface style 720B, and a vehicle desktop style 720C, so that the system user interface of the application 700 can be normally displayed on the display screens of mobile phones, computers, and vehicle-mounted devices. That is, the first device 400 can no longer pre-set different display style data for different devices, but can obtain display styles for different devices from each application, thereby reducing the cost of display.
[0087] The user setting module 422 can be used to configure the user or device, including responding to relevant user operations, thereby storing the corresponding relationship between a user identifier and a device identifier in the data module 425, that is, binding the user identifier and the device identifier.
[0088] The user management module 423 can be used to manage users, for example, including login, logout, and change of a user ID.
[0089] The device management module 424 can be used to manage the electronic device that performs screen projection, for example, it may include obtaining the device identification and deleting the device identification.
[0090] The data storage module 425 can be used to store the corresponding relationship between the user identification and the device identification. Of course, in actual applications, the data storage module 425 can also store other information related to the user or the device.
[0091] The second application management service layer 420 may include a second application management service module 421. The second application management service module 421 may be connected to the second application management service module 421. Figure 2In some embodiments, the second application management service module 421 can be used to search the data storage module 425 for a user identifier corresponding to a device identifier or an electronic device identifier corresponding to a user identifier.
[0092] The second window management service layer 430 may include multiple logical display screens, each of which may correspond to a real or virtual display screen. Figure 2 The first logical display screen 231 or the second logical display screen 232 is similar. Figure 3 In the embodiment, the second window management service layer 430 includes a third logical display screen 431 and a fourth logical display screen, wherein the first logical display screen 431 corresponds to the display screen of the first device 400, the second logical display screen 432 can correspond to the display screen of the second device 500, and the third logical display screen 433 can correspond to the display screen of the third device 600.
[0093] The second display management service layer 440 can be connected to Figure 2 The first display management service layer 240 is similar.
[0094] The second local display adapter 441 may be similar to the first local display adapter 241 , the second virtual display adapter 442 may be similar to the first virtual display adapter 242 , and the second wireless display adapter 443 may be similar to the first wireless display adapter 243 .
[0095] The third display layer 450, the fourth display layer 510 and the fifth display layer 610 in the third device 600 can be connected to Figure 2 Similar to the first display layer 241 in .
[0096] The second coding layer 460 and the third coding layer 470 can be Figure 2 The first coding layer 260 in FIG.
[0097] The second decoding layer 520 and the third decoding layer 620 can be connected with Figure 2 The first decoding layer 320 in is similar.
[0098] In some embodiments, the first device 400 may include a first mobile phone, and the second device 500 or the third device 600 may include a second mobile phone, a computer, a car device, or a smart TV.
[0099] In an embodiment of the present application, the first device can obtain the first display content corresponding to the first process of the first application and determine the second device based on the first user identifier corresponding to the first process. Since the first process corresponds to the first user identifier and the second device is determined based on the first user identifier, the first display content of the first process can be projected to the second device for display. That is, the first device can control the content projected and displayed on the second device through the first user identifier, reducing the problem of indiscriminately projecting all display content of the first application to the second device and improving the security of the display.
[0100] The following specific embodiments are used to describe the technical solution of the present application in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0101] Please refer to Figure 7 , is a flow chart of a screen projection method provided in an embodiment of the present application. It should be noted that this method does not Figure 7 The specific order described below is for limitation only. It should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0102] S701, the first device determines the second device for screen projection display.
[0103] The first device can establish a communication connection with the second device in a wireless or wired manner, thereby using the second device as another device for screen projection display.
[0104] In some embodiments, the first device may search for the second device upon receiving a screen projection operation from the user. If the first device finds multiple electronic devices, it may display a device list to the user, the device list including the device identifiers of the multiple electronic devices, and upon receiving a confirmation operation from the user based on at least one device identifier among the multiple electronic device identifiers, the electronic device corresponding to the at least one device identifier may be determined as the second device.
[0105] Of course, in actual applications, the first device can also determine the second device through other methods. The embodiment of the present application does not specifically limit the method by which the first device determines the second device for screen projection display.
[0106] In some embodiments, if the first device determines the second device, the first device can obtain the physical characteristics of the display screen of the second device through the second display management service layer to facilitate subsequent screen projection display on the second device.
[0107] S702: The first device determines a first user identifier corresponding to the second device.
[0108] In some embodiments, the first device may determine the first user identifier based on the device identifier of the second device from a stored correspondence between at least one device identifier and at least one user identifier. In some embodiments, the first device may provide a user list to the user, the user list including at least one user identifier, and upon receiving a user confirmation operation based on any user identifier, determine the user identifier as the first user identifier. In some embodiments, the first device may also receive the first user identifier submitted by the user.
[0109] The first device may obtain the first user identifier corresponding to the second device from the data storage module in the first device through the second application management service layer.
[0110] Of course, in actual applications, the first device may also determine the first user identifier corresponding to the second device in other ways. The embodiment of the present application does not specifically limit the way in which the first device determines the first user identifier corresponding to the second device.
[0111] It should be noted that, in actual applications, the execution order of S701 and S702 does not need to be limited, that is, the first device may determine the second device and the first user identifier sequentially, or may determine the second device and the first user identifier simultaneously.
[0112] S703: The first device determines whether the first user identifier is the same as the second user identifier corresponding to the first device. If they are different, it is determined to be a heterogeneous screen projection and S704 is executed; if they are the same, it is determined to be a homogeneous screen projection and S710 is executed.
[0113] As can be seen from the above, different users have different user data, and when the first device runs applications in different user data, the display content obtained will also be different, so the first device can compare the first user identifier with the second user identifier. If the second user identifier corresponding to the first device is the same as the first user identifier corresponding to the second device, the user may need to synchronously display the same display content on the display screens of the first device and the second device, so same-source screen projection can be performed. If the second user identifier corresponding to the first device is different from the first user identifier corresponding to the second device, the user may need to display different display content on the display screens of different devices, so different-source screen projection can be performed.
[0114] S704: The first device determines whether the user corresponding to the first user identifier exists. If not, execute S505; if yes, execute S706.
[0115] As can be seen from the foregoing, the first user ID may not be obtained by the first device from a stored user list. For example, it may be obtained by the first device after receiving a user submission after starting screen projection. Therefore, the first device can determine whether the first user ID exists in the user list. If so, it can be determined that the user corresponding to the first user ID is an existing user. Otherwise, it can be determined that the user corresponding to the first user ID does not exist.
[0116] In some embodiments, if the first device determines that the user corresponding to the first user identifier does not exist, S705 may not be executed, but the user may be prompted to resubmit a user identifier.
[0117] S705: The first device creates a user based on the first user identifier.
[0118] The first device may store the first user identifier in the user list, and may also store the first user identifier and the device identifier of the second device in a correspondence relationship between user identifiers and device identifiers.
[0119] In some embodiments, the first device may create a user space corresponding to the first user identifier.
[0120] The first device may create a user through the user management module, and bind the created user to the second device through the user setting module, that is, store the first user identification and the device identification of the second device in the data storage module in correspondence.
[0121] In some embodiments, S704 and S705 may be omitted, that is, the first device may directly execute S706 when determining that the second device corresponds to the first user identifier.
[0122] In some embodiments, the first device may first execute S704 to determine whether the user corresponding to the first user identifier exists. If the user corresponding to the first user identifier exists, the first device may then execute S703 to determine whether the first user identifier is the same as the second user identifier corresponding to the first device. If the user corresponding to the first user identifier does not exist, the first device may execute S705 to create the user based on the first user identifier, and then execute S703.
[0123] Through the above steps, the first device determines the second device and the first user identifier corresponding to the second device, and the first device also determines the second user identifier corresponding to the first device itself, that is, the first device can determine different user identifiers and the electronic devices corresponding to different user identifiers. Then, in the subsequent steps, the first device can determine which user identifier corresponds to a certain display content, and then determine on which electronic device's display screen to display the display content.
[0124] S706: The first device creates a first process of the first application based on the first user identifier.
[0125] The first application may be any application. In some embodiments, the first application may include a system application, which is used to provide a software environment necessary for the electronic device to operate or interact with the user. For example, the first application may include at least one of a desktop application and a system user interface application. In other embodiments, the first application may include a user application, which may be installed by the user and provide value-added services to the user, such as communication applications and games. The first device may manage each application according to a preset application management policy, such as creating or closing the first application.
[0126] In some embodiments, the first device may obtain user data of the first application from the user space corresponding to the first user identifier, and create the first process based on the user data of the first application. Specifically, the first device may obtain the application body of the application from a designated storage space or the user space corresponding to the first user identifier, obtain the user data of the first application from the user space corresponding to the first user identifier, and then create the first process based on the obtained application body and user data.
[0127] In some embodiments, the first device may store the process identifier of the first process and the first user identifier in a correspondence between the process identifier and the user identifier.
[0128] In some embodiments, the first device may further create a second process of the first application based on the second user identifier in a second manner similar to creating the first process, and the second user identifier may correspond to the first device.
[0129] For example, the first device can create process 1 and process 2 for application A, where process 1 corresponds to user 1 and process 2 corresponds to user 10. For the user, the first device runs two identical applications A and can log in to different application accounts in each application A.
[0130] S707: The first device obtains first display content corresponding to the first process of the first application.
[0131] The first device can obtain the first display content from the windows and sub-windows corresponding to each active component included in the first process through the second window management service layer. In some embodiments, the first device can obtain third display content in these windows and sub-windows, and then merge and render the obtained multiple third contents based on the positions and sizes of these windows and sub-windows to obtain the first display content.
[0132] It should be noted that, in actual applications, the first device may also obtain the first display content corresponding to the first process through other methods. The embodiment of the present application does not specifically limit the method in which the first device obtains the first display content corresponding to the first process of the first application.
[0133] In some embodiments, the first device may obtain the second display content corresponding to the second process of the first application in a manner similar to S707 .
[0134] S708: The first device determines the second device based on the first user identifier corresponding to the first process.
[0135] Since the first device may run different processes based on different user identifiers when running the first application, if there are multiple user identifiers, multiple processes may be run, and different user identifiers will also correspond to different devices. Therefore, in order to determine whether to display the first display content of the first application on the local end or to cast the screen, reduce the problem of user privacy leakage caused by indiscriminately casting the display content of the first application to an external device, and improve the security of the display, the first device can determine the device identifier of the second device based on the first user identifier corresponding to the first process, and determine the second device based on the device identifier of the second device.
[0136] In some embodiments, the first device may obtain an electronic device identifier corresponding to the electronic device identifier corresponding to the first user identifier from a stored correspondence between at least one user identifier and at least one device identifier, and determine the device corresponding to the device identifier as the second device. The at least one user identifier may include the first user identifier, and the at least one device identifier may include the device identifier of the second device.
[0137] It should be noted that the embodiments of the present application do not specifically limit the order in which the first device obtains the first display content corresponding to the first process and determines the second device based on the first user identifier corresponding to the first process. For example, in some embodiments, the first device may first determine the second device based on the first user identifier and then obtain the first display content corresponding to the first process.
[0138] In some embodiments, the first device can obtain the third display content corresponding to the first process of the first application, obtain the display style data corresponding to the second device from the application body (or user data) of the first application, and adapt the third display content based on the display style data corresponding to the second device to obtain the first display content. In other words, the first device no longer needs to set different projection display style data for different electronic devices in advance, reducing the cost of projection.
[0139] The first device can obtain the physical characteristics of the display screen of the second device from the second display management service layer, and then use the physical characteristics to obtain display style data corresponding to the second device. The first device then adapts the display style data to the third display content through the second virtual display adapter corresponding to the second device to obtain the first display content. Of course, in actual applications, the first device can also obtain the display style data corresponding to the second device through other methods. For example, the first device can also obtain the display style data corresponding to the second device based on the device identifier of the second device.
[0140] In some embodiments, the first device may determine the electronic device corresponding to the second user identifier based on the second user identifier corresponding to the second process in a manner similar to S708. In some embodiments, the electronic device corresponding to the second user identifier may be the first device.
[0141] S709: The first device projects the first display content onto a display screen of the second device for display.
[0142] Since the first display content corresponds to the first process of the first application, and the second device is determined based on the first user identifier corresponding to the first process, when the first device runs the first application, if it is determined that the first process corresponds to the first user identifier, the first display content corresponding to the first process can be projected to the second device determined based on the first user identifier for display. That is, the first device can control the content projected and displayed on the second device through the first user identifier, reducing the problem of indiscriminately projecting all display content of the first application to the second device and improving the security of the display.
[0143] Among them, the first device can encode the first display content through the second encoding layer and send the encoded first display content to the second device. The second device decodes the received data through the second decoding layer to obtain the first display content, and then controls the display to display the first display content through the fourth display layer.
[0144] S710: The first device projects the second display content currently displayed on the first device to the display screen of the second device for display.
[0145] When the first user identifier and the second user identifier are the same, the current screen projection can be a same-source screen projection, and the first process and the second process are the same process. Then the first device can project the second display content currently displayed by the first device to the display screen of the second device for display.
[0146] In some embodiments, the first device can display the second display content on the first device itself. Of course, if the second user identifier does not correspond to the first device, but corresponds to another third device, then the first device can project the second display content to the third device for display in a manner similar to S708. That is, the user can use multiple user identifiers to control the display content displayed on multiple different devices, thereby improving the flexibility and security of the display. In addition, since the first device displays the first display content corresponding to the first process of the first application on the second device when running the first application, and displays the second display content corresponding to the second process of the first application on the first device or the third device, and the two processes are independent, the first device can adapt the first display content and the second display content to the display screens of the second device and the first device (or the third device), respectively, thereby displaying the first display content and the second display content on the second device and the first device (or the third device), respectively. For the user, the first application can be displayed on the two devices at the same time, thereby improving the display performance and user experience.
[0147] In some embodiments, the first device may not adapt the style of the first display content according to the physical characteristics of the display screen of the second device, so that the first device and the second device maintain the same style when displaying the first application.
[0148] For example, see Figure 8 , the first device 400 is a mobile phone, and the second device 500 is a computer. The mobile phone currently displays a communication application, and its display content is user setting interface 1, which is derived from process 1 of the communication application and process 1 corresponds to user 0. The mobile phone also projects another display content of the communication application to the display screen of the computer for display. The other display content is user setting interface 2, which is derived from process 2 of the communication application and process 2 corresponds to user 10. Among them, the application account logged in by the communication application in the mobile phone is asd1, and the application account logged in by the communication application in the laptop is qwe1. The display interface of the mobile phone is consistent with the display interface style of the mobile phone projected on the laptop. Please refer to Figure 9 , Figure 9 and Figure 8The content displayed on the mobile phone is the same. Based on the user setting interface displayed on the laptop, the user clicks the chat icon in the lower left corner, so the mobile phone switches to the chat interface, generates display content 1 based on the chat interface, and obtains the display style data corresponding to the laptop from the application body in the communication application based on the device identifier of the laptop. The display content 1 is adapted according to the display style data to obtain display content 2. The mobile phone projects display content 2 to the laptop, thereby displaying the chat interface on the laptop screen, and the size of the chat interface matches the screen size of the laptop display screen, which is more conducive to the interaction between the laptop and the user.
[0149] It should be noted that the developer of each application can generate display style data corresponding to multiple devices in advance, and encapsulate the display style data for multiple devices in the application body or user data of the application.
[0150] In an embodiment of the present application, the first device can obtain the first display content corresponding to the first process of the first application and determine the second device based on the first user identifier corresponding to the first process. Since the first process corresponds to the first user identifier and the second device is determined based on the first user identifier, the first display content of the first process can be projected to the second device for display. That is, the first device can control the content projected and displayed on the second device through the first user identifier, reducing the problem of indiscriminately projecting all display content of the first application to the second device and improving the security of the display.
[0151] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0152] Based on the same inventive concept, an embodiment of the present application further provides an electronic device, which may be the first device, the second device or the third device mentioned above. Figure 10This is a schematic diagram of the structure of the electronic device 1000 provided in an embodiment of the present application, as shown in FIG. Figure 10 As shown, the electronic device provided by this embodiment includes: a memory 1010 and a processor 1020, the memory 1010 is used to store computer programs; the processor 1020 is used to execute the method described in the above method embodiment when calling the computer program.
[0153] The electronic device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.
[0154] Based on the same inventive concept, an embodiment of the present application further provides a chip system, which includes a processor coupled to a memory, and executes a computer program stored in the memory to implement the method described in the above method embodiment.
[0155] The chip system may be a single chip or a chip module composed of multiple chips.
[0156] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method described in the above method embodiment is implemented.
[0157] An embodiment of the present application further provides a computer program product, which, when executed on an electronic device, enables a terminal to implement the method described in the above method embodiment.
[0158] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may at least include: any entity or device that can carry the computer program code to the camera / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard drive, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0159] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0160] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0161] In the embodiments provided in this application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0162] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0163] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0164] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0165] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0166] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0167] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A screen projection method, characterized in that: include: The first device obtains first display content corresponding to the first process of the first application; The first device determines the second device based on a first user identifier corresponding to the first process; The first device projects the first display content onto a display screen of the second device for display.
2. The method according to claim 1, characterized in that The method further comprises: The first device obtains second display content corresponding to a second process of the first application, where the second process corresponds to a second user identifier, and the second user identifier corresponds to the first device; The first device displays the second display content on a display screen of the first device.
3. The method according to claim 2, characterized in that The first user identifier is the same as the second user identifier, the first process is the same as the second process, and the first display content is the same as the second display content.
4. The method according to any one of claims 1 to 3, characterized in that: The first device determines the second device based on the first user identifier corresponding to the first process, including: The first device determines, based on the first user identifier, a device identifier of the second device from a stored correspondence between at least one user identifier and at least one device identifier, the at least one user identifier including the first user identifier, and the at least one device identifier including the device identifier of the second device; The first device determines the second device according to the device identification of the second device.
5. The method according to any one of claims 1 to 4, characterized in that: The first device obtains first display content corresponding to the first process of the first application, including: The first device obtains third display content corresponding to the first process; The first device obtains display style data corresponding to the second device from the application body of the first application; The first device performs adaptation processing on the third display content based on the display style data corresponding to the second device to obtain the first display content.
6. The method according to any one of claims 1 to 5, characterized in that: Before the first device obtains the first display content corresponding to the first process of the first application, the method further includes: The first device creates the first process based on the first user identifier.
7. The method according to claim 6, characterized in that The first device creates the first process based on the first user identifier, including: If the first device determines that the user corresponding to the first user identifier exists, obtaining user data of the first application from the user space corresponding to the first user identifier; The first process is created based on the user data of the first application.
8. The method according to any one of claims 1 to 7, characterized in that: The first device includes a first mobile phone, and the second device includes a computer, a car-mounted device, a smart TV or a second mobile phone.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the method according to any one of claims 1 to 8 when calling the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.