Screen mirroring method and electronic device
By dynamically adjusting the resolution and DPI of the virtual screen, the display abnormality caused by mismatch in the virtual screen in heterogeneous projection is solved, and the screen projection effect is improved.
Patent Information
- Application Number
- PCT/CN2024/070806
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-13
- Filing Date
- 2024-01-05
- Publication Date
- 2024-12-19
AI Technical Summary
In the heterogeneous screen projection scheme, since the screen resolution of the virtual screen does not match the DPI, the screen projection screen on the target end of the screen projection is abnormal, and the screen projection effect is poor.
By obtaining the display mode of the application interface, dynamically adjust the resolution and DPI of the created virtual screen to correspond to the target screen resolution and DPI, thereby matching and solving the problem of abnormal display of the screen projection screen.
Improve the screen projection effect to ensure the normal display of the screen projection image at the target end of the screen projection, and avoid display abnormalities caused by mismatch between resolution and DPI.
Smart Images

Figure CN2024070806_19122024_PF_FP_ABST
Abstract
Description
Screen projection method and electronic device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on June 13, 2023, with application number 202310703571.0 and application name “Screen Projection Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the technical field of electronic devices, and in particular to a screen projection method and electronic devices. Background Art
[0003] With the development of device collaboration technology, screen projection has become a common technical means. Screen projection can refer to the process of projecting an image from a source device to a destination device for display.
[0004] Current screen projection solutions include heterogeneous screen projection solutions. In these solutions, the projection source creates a virtual display (VD) with the same screen resolution ratio and dots per inch (DPI) as the projection destination. The projection image is then drawn on the VD and transmitted to the projection destination for display. In this solution, the mismatch between the VD's screen resolution and DPI may cause the projection image on the projection destination to display abnormally, resulting in poor projection quality.
[0005] Summary of the Invention
[0006] The present application provides a screen projection method and electronic device, which can solve the problem of abnormal display of the projection screen on the projection destination end in a heterogeneous screen projection scenario and improve the screen projection effect.
[0007] To achieve the above objectives, this application adopts the following technical solutions:
[0008] In a first aspect, a screen projection method is provided, which is applied to a first electronic device, and the method includes: obtaining a display mode of an application interface of a first application running on the first electronic device when it is displayed on a second electronic device, the display mode including a horizontal mode and a vertical mode, the display mode of the application interface is used to determine a target screen resolution and a target dots per inch (DPI), and the target screen resolution corresponds to the target DPI; creating a virtual screen VD according to the target screen resolution and the target DPI; generating a projection screen on the VD according to the application interface; and sending the projection screen to the second electronic device.
[0009] Based on the above technical solution, the target screen resolution and target DPI for creating the VD are determined according to the display mode of the application interface on the projection destination, so that the created VD corresponds to the display mode of the application interface. The target screen resolution corresponds to the target DPI, and then when the VD is created using the corresponding target screen resolution and target DPI, the screen resolution and DPI of the created VD can be matched. In other words, the screen resolution and matching DPI of the created VD can be dynamically adjusted according to the display mode of the application interface. The problem of abnormal display of the projection screen on the projection destination due to the possible mismatch between the screen resolution and DPI of the VD can be solved, thereby improving the projection effect.
[0010] In some embodiments, the target screen resolution and the target DPI corresponding to each other may mean that the target screen resolution and the target DPI are the screen resolution and DPI of the same device, respectively.
[0011] In a possible implementation, the display mode of the application interface obtained by the first electronic device may be determined by the first electronic device, for example, the first electronic device may determine it according to a display mode supported by the application interface.
[0012] It is understood that the display mode of the application interface, that is, the display mode set by the application interface, can be included in the display modes supported by the application interface. If the application interface only supports one display mode, the display mode of the application interface can be the same as the display mode supported by the application interface. If the application interface supports multiple display modes, the display mode of the application interface can be one of them.
[0013] In another possible implementation, the display mode of the application interface obtained by the first electronic device may be determined by the second electronic device, and then the first electronic device receives it from the second electronic device. For example, the second electronic device may also determine the display mode of the application interface based on the display modes supported by the application interface. Optionally, in this implementation, the first electronic device may first send the display modes supported by the application interface to the second electronic device, and then receive the display mode of the application interface from the second electronic device.
[0014] Optionally, the first electronic device may determine the target screen resolution and target DPI according to the display mode of the application interface, or the second electronic device may determine the target screen resolution and target DPI according to the display mode of the application interface.
[0015] In one possible design, the display mode of the application interface is portrait mode, and the number of pixels included in the height of the target screen resolution is greater than the number of pixels included in the width. Based on this design, when the display mode of the application interface is portrait mode, the number of pixels included in the height of the target screen resolution is greater than the number of pixels included in the width. This can ensure that the height of the created VD is sufficient to display the application interface in portrait mode, avoiding the situation where the VD is not high enough to display the application interface in portrait mode, thereby causing display abnormalities and improving the screen projection effect.
[0016] In one possible design, the target screen resolution is the screen resolution of the target portrait device (i.e., the screen resolution of the target portrait device in portrait mode), and the target DPI is the DPI of the target portrait device. Based on this design, the screen resolution and DPI of the target portrait device are used as the target screen resolution and target DPI respectively, so that the target screen resolution and the target DPI correspond to each other, and thus the screen resolution and DPI of the created VD are matched. This can solve the problem of abnormal display of the projection screen on the projection destination due to the possible mismatch between the screen resolution and DPI of the VD, and improve the projection effect.
[0017] In one possible design, the first electronic device is a portrait screen device, the target portrait screen device is the first electronic device or the third electronic device, and the third electronic device is a portrait screen device of a different type or model than the first electronic device. It is understood that when the first electronic device and the third electronic device are portrait screen devices of different models, the first electronic device and the third electronic device can be the same type of portrait screen device, such as both are mobile phones, but the first electronic device is Huawei Mate 40 and the third electronic device is Huawei Mate 50, etc. When the first electronic device and the third electronic device are different types of portrait screen devices, for example, the first electronic device can be a mobile phone and the third electronic device can be a reader, etc.
[0018] Based on this design, the projection source is used as the target vertical screen device, that is, the screen resolution and DPI of the projection source in the vertical screen state are used as the target screen resolution and target DPI respectively. This can ensure that the screen resolution and DPI of the created VD match, so that after the application interfaces of the projection sources with different screen resolutions are projected to the same projection destination, the display effects are consistent with those of the respective projection sources.
[0019] A third electronic device of a different model or type from the projection source is used as the target vertical screen device, that is, the screen resolution and DPI of the third electronic device in the vertical screen state are used as the target screen resolution and target DPI respectively. This can ensure that the screen resolution and DPI of the created VD match, and the application interfaces of projection sources with different screen resolutions can have the same display effect after being projected to the same projection destination.
[0020] In one possible design, the target vertical screen device includes a mobile phone.
[0021] In one possible design, the application interface is displayed in landscape mode, and the number of pixels included in the height of the target screen resolution is smaller than the number of pixels included in the width. Based on this design, when the application interface is displayed in landscape mode, the target screen resolution uses a smaller number of pixels included in the height than the number of pixels included in the width. This allows the width of the created VD to meet the requirements for displaying the application interface in landscape mode, avoiding display anomalies caused by the VD being insufficiently wide to display the application interface in landscape mode, and improving the projection effect.
[0022] In one possible design, the target screen resolution is the screen resolution of the target horizontal screen device (i.e., the screen resolution of the target horizontal screen device in the horizontal state), and the target DPI is the DPI of the target horizontal screen device. Based on this design, the screen resolution and DPI of the target horizontal screen device are used as the target screen resolution and target DPI respectively, so that the target screen resolution and the target DPI correspond to each other, and then the screen resolution and DPI of the created VD are matched. This can solve the problem of abnormal display of the projection screen on the projection destination due to the possible mismatch between the screen resolution and DPI of the VD, and improve the projection effect.
[0023] In one possible design, the target horizontal screen device includes one or more of a tablet, a personal computer (PC), a smart screen, and a car screen.
[0024] In one possible design, a VD is created according to a target screen resolution and a target DPI, including: creating a VD according to at least one of the DPI of a first electronic device and the screen resolution of a second electronic device, as well as the target screen resolution and the target DPI. Based on this design, a VD is created using the DPI of a first electronic device and at least one of the screen resolutions of a second electronic device, as well as the target screen resolution and the target DPI. This can make the screen resolution of the VD match the DPI, and can also make the ratio of the screen resolution of the VD the same as the ratio of the screen resolution of the second electronic device. This further improves the screen projection effect while solving the problem of abnormal display of the projection screen on the projection destination due to the possible mismatch between the screen resolution of the VD and the DPI.
[0025] In some possible implementations, when the target screen resolution is the screen resolution of the first electronic device, the target DPI is the DPI of the first electronic device.
[0026] In one possible design, the number of pixels included in the height of the VD is determined based on the number of pixels included in the height of the target screen resolution. In this design, in some implementations, the number of pixels included in the height of the VD can be the same as the number of pixels included in the height of the target screen resolution. In other implementations, the number of pixels included in the height of the VD can be different from the number of pixels included in the height of the target screen resolution.
[0027] In one possible design, the number of pixels included in the height of VD satisfies the following formula: Among them, H is the number of pixels included in the height of VD, h is the number of pixels included in the height of the target screen resolution, DPI1 is the DPI of the first electronic device, and DPI2 is the target DPI. Based on this design, when the DPI of the projection source is used as the DPI of VD, the number of pixels included in the height of the target device is adjusted according to the proportional relationship between the DPI of the target device and the DPI of the projection source, and then the number of pixels included in the height of VD is obtained. The height of the created VD can be matched with the DPI. In view of the current situation where most application interfaces are displayed in portrait mode, by ensuring the height of VD, the problem of abnormal display when the application interface displayed in portrait mode is projected can be greatly solved.
[0028] In one possible design, the ratio of the screen resolution of the VD is the same as that of the screen resolution of the second electronic device. Based on this design, setting the ratio of the screen resolution of the VD to the same as that of the screen resolution of the projection destination can further improve the projection effect.
[0029] In one possible design, the number of pixels included in the width of VD satisfies the following formula: Where W is the number of pixels included in the width of the VD, H is the number of pixels included in the height of the VD, w1 is the number of pixels included in the width of the second electronic device, and h1 is the number of pixels included in the height of the second electronic device. Based on this design, the ratio of the screen resolution of the VD can be made the same as the ratio of the screen resolution of the target device.
[0030] In this design, in some implementations, H satisfies h is the number of pixels included in the target screen resolution, DPI1 is the DPI of the first electronic device, and DPI2 is the target DPI.
[0031] In some further implementations, H is the number of pixels included in the target screen resolution. Optionally, the target screen resolution may include the screen resolution of the first electronic device. Accordingly, the number of pixels included in the target screen resolution may refer to the number of pixels included in the target screen resolution of the first electronic device, that is, the number of pixels included in the target screen resolution of the first electronic device in a normal state.
[0032] In other implementations, the ratio of the screen resolution of the VD may also be the same as the ratio of the screen resolution of the first electronic device.
[0033] In one possible design, the DPI of the VD is the same as the DPI of the first electronic device.
[0034] In other implementations, the DPI of the VD may also be the same as the target DPI.
[0035] In one possible design, obtaining the display mode of the application interface includes: if the first application is a first preset application, determining that the display mode of the application interface is a landscape mode. Based on this design, the display mode of the application interface of the application can be determined based on whether the application is a preset application.
[0036] In one possible design, obtaining the display mode of the application interface includes: if the display modes supported by the application interface include landscape mode and portrait mode, then determining that the display mode of the application interface is the same as the display mode of the application interface that generated the previous frame of projection. Based on this design, if an application interface supports both landscape mode and portrait mode, the display mode of the application interface is set to the same display mode as the application interface that generated the previous frame of projection. Then, when the application interface is projected, the display abnormality problem caused by the dynamic switching of VD size when the transparent interface is superimposed can be solved.
[0037] In one possible design, obtaining the display mode of an application interface includes: sending a display mode supported by the application interface to a second electronic device; and receiving the display mode of the application interface from the second electronic device. Based on this design, the second electronic device determines the display mode of the application interface, which can save power consumption of the first electronic device.
[0038] In one possible design, after sending the projection screen to the second electronic device, the method further includes: after the display mode of the application interface changes, obtaining the changed display mode of the application interface; and adjusting the screen resolution and DPI of the VD according to the changed display mode of the application interface. Based on this design, after the display mode of the application interface changes, the screen resolution and DPI of the VD are adjusted accordingly. This can solve the problem of abnormal display of the projection screen on the projection destination due to the possible mismatch between the screen resolution and DPI of the VD, thereby improving the projection effect.
[0039] In one possible design, the change in the display mode of the application interface is triggered by a user operation. Optionally, the user operation can be a user operation received by the first electronic device or a user operation received by the second electronic device. For example, if the application interface is a video playback interface, the display mode of the video playback interface is portrait mode. The user can perform an operation such as clicking a full-screen play button. In response to this operation, the display mode of the video playback interface changes to landscape mode.
[0040] In a second aspect, a screen projection method is provided, which is applied to a second electronic device including a display screen, and the method includes: obtaining a display mode when an application interface of a first application running on a first electronic device is displayed on the second electronic device, the display mode including a horizontal mode and a vertical mode; instructing the first electronic device to create a first VD according to a target screen resolution and a target DPI according to the display mode of the application interface, the target screen resolution and the target DPI correspond to the display mode of the application interface, and the target screen resolution corresponds to the target DPI; receiving a first projection screen from the first electronic device, the first projection screen being generated on the first VD according to the application interface; and displaying the first projection screen.
[0041] In one possible implementation, the display mode of the application interface obtained by the second electronic device may be determined by the second electronic device, for example, the second electronic device may determine the display mode based on the display modes supported by the application interface. Optionally, in this implementation, before the second electronic device obtains the display mode of the application interface, the second electronic device may also receive the display mode of the application interface from the first electronic device.
[0042] Optionally, the second electronic device can adopt a method such as the first electronic device described in the first aspect above to determine the display mode of the application interface, such as whether it is a preset application, and determine the display mode of the application interface based on the display mode of the application interface that generated the previous frame of the projection screen.
[0043] In another possible implementation, the display mode of the application interface obtained by the second electronic device may be determined by the first electronic device and then sent to the second electronic device. For example, the first electronic device may also determine the display mode of the application interface based on the display modes supported by the application interface.
[0044] Optionally, the second electronic device may instruct the first electronic device to create the first VD according to the target screen resolution and the target DPI by sending instruction information to the first electronic device.
[0045] In one possible implementation, the indication information may include index information of the target screen resolution and target DPI, and the first electronic device may obtain the index information of the target screen resolution and target DPI from a local device or another device based on the index information. For example, the index information of the target screen resolution and target DPI may be directly identification information of the target screen resolution and target DPI, or may be a device identifier corresponding to the target screen resolution and target DPI, such as a device model.
[0046] In another possible implementation, the indication information may directly include the target screen resolution and target DPI.
[0047] In one possible design, the display mode of the application interface is portrait mode, and the number of pixels included in the height of the target screen resolution is greater than the number of pixels included in the width.
[0048] In one possible design, the target screen resolution is the screen resolution of the target portrait screen device (ie, the screen resolution of the target portrait screen device in portrait mode), and the target DPI is the DPI of the target portrait screen device.
[0049] In one possible design, the first electronic device is a vertical screen device, the target vertical screen device is the first electronic device or a third electronic device, and the third electronic device is a vertical screen device of a different type or model than the first electronic device.
[0050] In one possible design, the target vertical screen device includes a mobile phone.
[0051] In one possible design, the display mode of the application interface is horizontal mode, and the number of pixels included in the height of the target screen resolution is smaller than the number of pixels included in the width.
[0052] In one possible design, the target screen resolution is the screen resolution of the target horizontal screen device (ie, the screen resolution of the target horizontal screen device in the horizontal state), and the target DPI is the DPI of the target horizontal screen device.
[0053] In one possible design, the target horizontal screen device includes one or more of a tablet, a personal computer (PC), a smart screen, and a car screen.
[0054] In one possible design, instructing the first electronic device to create a first VD according to the target screen resolution and the target DPI according to the display mode of the application interface includes: instructing the first electronic device to create the first VD according to at least one of the DPI of the first electronic device and the screen resolution of the second electronic device, as well as the target screen resolution and the target DPI according to the display mode of the application interface.
[0055] In some possible implementations, when the target screen resolution is the screen resolution of the first electronic device, the target DPI is the DPI of the first electronic device.
[0056] In one possible design, the number of pixels included in the height of the first VD is determined based on the number of pixels included in the height of the target screen resolution. In some implementations, the number of pixels included in the height of the first VD can be the same as the number of pixels included in the height of the target screen resolution. In other implementations, the number of pixels included in the height of the first VD can be different from the number of pixels included in the height of the target screen resolution.
[0057] In one possible design, the number of pixels included in the height of the first VD satisfies the following formula: Wherein, H is the number of pixels included in the height of the first VD, h is the number of pixels included in the height of the target screen resolution, DPI1 is the DPI of the first electronic device, and DPI2 is the target DPI.
[0058] In one possible design, the ratio of the screen resolution of the first VD is the same as the ratio of the screen resolution of the second electronic device; the DPI of the first VD is the same as the DPI of the first electronic device. In other implementations, the DPI of the first VD can also be the same as the target DPI.
[0059] In one possible design, the number of pixels included in the width of VD satisfies the following formula: Wherein, W is the number of pixels included in the width of VD, H is the number of pixels included in the height of VD, w1 is the number of pixels included in the width of the second electronic device, and h1 is the number of pixels included in the height of the second electronic device.
[0060] In some implementations, H satisfies h is the number of pixels included in the target screen resolution, DPI1 is the DPI of the first electronic device, and DPI2 is the target DPI.
[0061] In yet other implementations, H is the number of pixels included in the target screen resolution.
[0062] In other implementations, the ratio of the screen resolution of the VD may also be the same as the ratio of the screen resolution of the first electronic device.
[0063] In one possible design, before receiving the first projection screen from the first electronic device, the method also includes: sending the screen resolution of the second electronic device to the first electronic device.
[0064] In one possible design, before obtaining the display mode of the application interface of the first application running on the first electronic device when it is displayed on the second electronic device, the method also includes: instructing the first electronic device to create a second VD based on the first screen resolution and the first DPI, the first screen resolution corresponds to the first DPI, and the number of pixels included in the height of the first screen resolution is greater than the number of pixels included in the width, that is, the first screen resolution can be the screen resolution of the target vertical screen device (that is, the screen resolution of the target vertical screen device in the vertical state); receiving the second projection screen from the first electronic device, the second projection screen is generated on the second VD according to the application interface; and displaying the second projection screen.
[0065] Based on this design, before obtaining the display mode of the application interface, the projection destination first instructs the projection source to use a screen resolution in which the number of pixels included in the height is greater than the number of pixels included in the width, and the DPI corresponding to the screen resolution to create a VD. In other words, the projection destination instructs the projection source to create a VD in portrait mode by default, and receives the projection screen display from the projection source. This can increase the speed at which the projection destination displays the projection screen, and avoid the projection destination not displaying the image all the time, which affects the user experience. In addition, given the current situation where most application interfaces are displayed in portrait mode, creating a VD in portrait mode by default can significantly solve the problem of display abnormality when projecting application interfaces displayed in portrait mode by ensuring the height of the VD.
[0066] In one possible design, the display mode of the application interface is landscape mode, the target screen resolution is the second screen resolution, the target DPI is the second DPI, the second screen resolution corresponds to the second DPI, the number of pixels included in the height of the second screen resolution is less than the number of pixels included in the width, that is, the second screen resolution is the screen resolution of the target landscape device (that is, the screen resolution of the target landscape device in landscape state). Based on this design, when the display mode of the application interface is landscape mode, the screen resolution and DPI of the VD in the default portrait mode are adjusted to the screen resolution and DPI in landscape mode. This can further improve the projection effect while solving the problem of abnormal display of the projection screen on the projection destination due to the possible mismatch between the VD's screen resolution and DPI.
[0067] In one possible design, after displaying the first projection screen, the method further includes: obtaining a display mode of the application interface after the change; and instructing the first electronic device to adjust the screen resolution and DPI of the first VD based on the display mode of the application interface after the change. Optionally, the change in the display mode of the application interface is triggered by a user operation.
[0068] Optionally, the changed display mode of the application interface may be locally acquired by the second electronic device, or may be sent by the first electronic device to the second electronic device.
[0069] It should be noted that the technical effects brought about by other designs in the above-mentioned second aspect can be referred to the technical effects brought about by the corresponding designs in the first aspect, and will not be repeated here.
[0070] According to a third aspect, a screen projection method is provided, which is applied to a first electronic device, and the method includes: creating a first VD using a target screen resolution and a target DPI according to instructions of a second electronic device; generating a first projection screen on the first VD according to an application interface, where the application interface is an application interface of a first application running on the first electronic device; and sending the first projection screen to the second electronic device.
[0071] In one possible design, before creating the first VD using the target screen resolution and target DPI according to the instructions of the second electronic device, the display mode supported by the application interface is sent to the second electronic device, and the display mode supported by the application interface is used to determine the display mode of the application interface, and the display mode of the application interface is used to determine the target screen resolution and target DPI.
[0072] In one possible design, before creating the first VD using the target screen resolution and target DPI according to the instructions of the second electronic device, the display mode of the application interface is determined and the display mode of the application interface is sent to the second electronic device. The display mode of the application interface is used to determine the target screen resolution and target DPI.
[0073] In one possible design, the display mode of the application interface is portrait mode, and the number of pixels included in the height of the target screen resolution is greater than the number of pixels included in the width.
[0074] In one possible design, the target screen resolution is the screen resolution of the target portrait screen device (ie, the screen resolution of the target portrait screen device in portrait mode), and the target DPI is the DPI of the target portrait screen device.
[0075] In one possible design, the first electronic device is a vertical screen device, the target vertical screen device is the first electronic device or a third electronic device, and the third electronic device is a vertical screen device of a different type or model than the first electronic device.
[0076] In one possible design, the target vertical screen device includes a mobile phone.
[0077] In one possible design, the display mode of the application interface is horizontal mode, and the number of pixels included in the height of the target screen resolution is smaller than the number of pixels included in the width.
[0078] In one possible design, the target screen resolution is the screen resolution of the target horizontal screen device (ie, the screen resolution of the target horizontal screen device in the horizontal state), and the target DPI is the DPI of the target horizontal screen device.
[0079] In one possible design, the target horizontal screen device includes one or more of a tablet, a personal computer (PC), a smart screen, and a car screen.
[0080] In one possible design, creating a first VD using a target screen resolution and a target DPI according to the instructions of the second electronic device includes: creating the first VD using at least one of the DPI of the first electronic device and the screen resolution of the second electronic device, as well as the target screen resolution and target DPI according to the instructions of the second electronic device.
[0081] In some possible implementations, when the target screen resolution is the screen resolution of the first electronic device, the target DPI is the DPI of the first electronic device.
[0082] In one possible design, the number of pixels included in the height of the first VD is determined based on the number of pixels included in the height of the target screen resolution. In some implementations, the number of pixels included in the height of the first VD can be the same as the number of pixels included in the height of the target screen resolution. In other implementations, the number of pixels included in the height of the first VD can be different from the number of pixels included in the height of the target screen resolution.
[0083] In one possible design, the number of pixels included in the height of the first VD satisfies the following formula: Wherein, H is the number of pixels included in the height of the first VD, h is the number of pixels included in the height of the target screen resolution, DPI1 is the DPI of the first electronic device, and DPI2 is the target DPI.
[0084] In one possible design, the ratio of the screen resolution of the first VD is the same as the ratio of the screen resolution of the second electronic device; the DPI of the first VD is the same as the DPI of the first electronic device. In other implementations, the DPI of the first VD can also be the same as the target DPI.
[0085] In one possible design, the number of pixels included in the width of VD satisfies the following formula: Wherein, W is the number of pixels included in the width of VD, H is the number of pixels included in the height of VD, w1 is the number of pixels included in the width of the second electronic device, and h1 is the number of pixels included in the height of the second electronic device.
[0086] In some implementations, H satisfies h is the number of pixels included in the target screen resolution, DPI1 is the DPI of the first electronic device, and DPI2 is the target DPI.
[0087] In yet other implementations, H is the number of pixels included in the target screen resolution.
[0088] In other implementations, the ratio of the screen resolution of the VD may also be the same as the ratio of the screen resolution of the first electronic device.
[0089] In one possible design, before creating the first VD according to the instructions of the second electronic device using at least one of the DPI of the first electronic device and the screen resolution of the second electronic device, as well as the target screen resolution and target DPI, the method also includes: receiving the screen resolution of the second electronic device from the second electronic device.
[0090] In one possible design, before creating the first VD using the target screen resolution and the target DPI according to the instructions of the second electronic device, the method also includes: creating a second VD using the first screen resolution and the first DPI according to the instructions of the second electronic device, the first screen resolution corresponds to the first DPI, and the number of pixels included in the height of the first screen resolution is greater than the number of pixels included in the width, that is, the first screen resolution is the screen resolution of the target vertical screen device (that is, the screen resolution of the target vertical screen device in the vertical state); generating a second projection screen on the second VD according to the application interface; and sending the second projection screen to the second electronic device.
[0091] In one possible design, the display mode of the application interface is landscape mode, the target screen resolution is the second screen resolution, the target DPI is the second DPI, the second screen resolution corresponds to the second DPI, and the number of pixels included in the height of the second screen resolution is less than the number of pixels included in the width, that is, the second screen resolution is the screen resolution of the target landscape device (i.e., the screen resolution of the target landscape device in landscape state).
[0092] In one possible design, after sending the first projection screen to the second electronic device, the method further includes: after the display mode of the application interface changes, adjusting the screen resolution and DPI of the first VD according to the instructions of the second electronic device. Optionally, the change in the display mode of the application interface can be triggered by a user operation.
[0093] In a fourth aspect, an electronic device is provided, wherein the electronic device has the function of implementing the method described in the first aspect, the second aspect, or the third aspect, and any of the designs therein. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions.
[0094] In a fifth aspect, an electronic device is provided, comprising: a processor, a memory and a communication interface, wherein the memory and the communication interface are coupled to the processor, the communication interface is used to communicate with other devices, the memory is used to store program code, the program code includes instructions, and the processor reads instructions from the memory so that the electronic device executes the method described in the first aspect or the third aspect and any design thereof.
[0095] Optionally, the memory may be coupled to the processor, or may be independent of the processor. Exemplarily, the communication interface may be a transceiver, an input / output interface, an interface circuit, an output circuit, an input circuit, a pin, or a related circuit.
[0096] Optionally, the electronic device may further include a display screen, which is used to support the electronic device in performing display operations.
[0097] In the sixth aspect, an electronic device is provided, comprising: a processor, a memory, a display screen and a communication interface, wherein the memory, the display screen and the communication interface are coupled to the processor, the memory is used to store program code, the program code includes instructions, and the processor reads instructions from the memory so that the electronic device executes the method described in the second aspect above and any one of the designs therein.
[0098] Optionally, the memory may be coupled to the processor, or may be independent of the processor. Exemplarily, the communication interface may be a transceiver, an input / output interface, an interface circuit, an output circuit, an input circuit, a pin, or a related circuit.
[0099] In the seventh aspect, a computer-readable storage medium is provided, which includes a computer program. When the computer program runs on an electronic device, the electronic device executes the method described in the first aspect, the second aspect, or the third aspect and any design thereof.
[0100] In an eighth aspect, a computer program product is provided, which includes: a computer program or instructions, which, when the computer program or instructions are run on a computer, enables the computer to execute the method described in the first aspect, the second aspect, or the third aspect and any one of the designs thereof.
[0101] In the ninth aspect, a chip system is provided, comprising at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor. When the at least one processor executes the instructions, the at least one processor executes the method described in the first aspect, the second aspect, or the third aspect and any design thereof.
[0102] In a tenth aspect, the present application provides a communication system, including a first electronic device and a second electronic device, wherein the first electronic device and the second electronic device cooperate to implement the method described in any design of any of the above aspects.
[0103] It should be noted that the technical effects brought about by any design in the above-mentioned third to tenth aspects can refer to the technical effects brought about by the corresponding design in the first or second aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0104] FIG1 is a schematic diagram of a scenario of an existing heterogeneous screen projection solution;
[0105] FIG2 is a schematic diagram of an electronic device provided in an embodiment of the present application;
[0106] FIG3 is a first schematic diagram of an interface provided in an embodiment of the present application;
[0107] FIG4 is a schematic diagram of the architecture of a communication system provided in an embodiment of the present application;
[0108] FIG5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0109] FIG6 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;
[0110] FIG7 is a software structure block diagram of an electronic device provided in an embodiment of the present application;
[0111] FIG8 is a flow chart of a screen projection method according to an embodiment of the present application;
[0112] FIG9 is a second schematic diagram of an interface provided in an embodiment of the present application;
[0113] FIG10 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;
[0114] FIG11a is a third schematic diagram of an interface provided in an embodiment of the present application;
[0115] FIG11b is a fourth schematic diagram of an interface provided in an embodiment of the present application;
[0116] FIG11c is a fifth schematic diagram of an interface provided in an embodiment of the present application;
[0117] FIG12 is a sixth schematic diagram of an interface provided in an embodiment of the present application;
[0118] FIG13 is a flow chart of another screen projection method provided in an embodiment of the present application;
[0119] FIG14 is a flow chart of another screen projection method provided in an embodiment of the present application;
[0120] FIG15 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;
[0121] FIG16 is a schematic structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0122] The technical solutions provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0123] The terms "including," "having," and any variations thereof mentioned in the description of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to the process, method, product, or apparatus.
[0124] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being more preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0125] In this application, unless otherwise specified, "plurality" means two or more. "And / or" in this document is simply a description of an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone.
[0126] In the embodiments of the present application, the electronic device that projects the screen projection image can be referred to as the screen projection source end, and the electronic device that receives the projection from the screen projection source end and displays the screen projection image can be referred to as the screen projection destination end. In some scenarios, such as but not limited to mirror projection scenarios, the screen projection image can be an interface displayed on the screen projection source end. In other scenarios, such as but not limited to super desktop projection scenarios, the screen projection image can be an interface that is not displayed on the screen projection source end.
[0127] The current screen projection solutions include same-source screen projection solutions and heterogeneous screen projection solutions. In the same-source screen projection solution, the screen projection source will directly transmit the currently displayed interface to the screen projection destination for display, and the display effect on the screen projection destination is consistent with the display effect on the screen projection source. In the heterogeneous screen projection solution, the screen projection source will create a VD with the same screen resolution ratio and the same DPI as the screen projection destination, and then draw the projection screen on the VD and transmit it to the screen projection destination for display. This heterogeneous screen projection solution can support users to directly operate the application projected from the screen projection source on the screen projection destination.
[0128] It is understood that in the embodiments of the present application, screen resolution may refer to the number of pixels (pix, P) displayed on the screen. Generally, screen resolution may be expressed as "number of vertical pixels × number of horizontal pixels" or as "number of pixels displayed high × number of pixels displayed wide." For example, if the screen resolution is "1920P × 1080P," it means that the number of pixels displayed high on the screen is 1920, and the number of pixels displayed wide on the screen is 1080.
[0129] Screen resolution ratio refers to the ratio of the number of vertical pixels to the number of horizontal pixels on the screen, or the ratio of the number of pixels displayed high to the number of pixels displayed wide. For example, if the screen resolution is "1920P×1080P", the screen resolution ratio can be expressed as "1920:1080".
[0130] DPI refers to the number of pixels per inch of an image, which can be understood as pixel density.
[0131] For example, the screen projection source is a mobile phone 100, and the screen projection destination is a smart screen 200. Figure 1 shows a scenario diagram of an existing heterogeneous screen projection solution. As shown in Figure 1, the interface of application A can be displayed on the mobile phone 100, where the interface of application A is drawn according to the DPI of the mobile phone 100, the screen resolution of the mobile phone 100, the direction of the mobile phone 100 (or the rotation direction of the mobile phone), etc. The mobile phone 100 can draw the interface of application B on the created VD, the DPI of the VD is the same as the DPI of the mobile phone 100, and the screen resolution ratio of the VD is the same as the screen resolution ratio of the smart screen 200. Among them, the interface of application B is drawn according to the DPI of the VD and the display mode of the interface of application B.
[0132] In the embodiments of the present application, whether a device is a landscape device or a portrait device can be determined based on the device's normal usage state (also known as the default usage state or the commonly used usage state). If the normal usage state of a device is the portrait state, then the device is a portrait device. If the normal usage state of a device is the landscape state, then the device is a landscape device.
[0133] In some embodiments, whether a device is a landscape or portrait device can be determined based on the device type. For example, portrait devices may include, but are not limited to, mobile phones, while landscape devices may include, but are not limited to, tablets, personal computers (PCs), smart screens, and car screens.
[0134] In some embodiments, if a device is used as a target device (e.g., a target landscape device, a target portrait device, etc.), the device's width, height, screen resolution, and screen resolution ratio are the same as those used for the device in normal use. A target device in normal use with the portrait mode is referred to as a target portrait device, while a target device in normal use with the landscape mode is referred to as a target landscape device. For more information about target devices, please refer to the following text.
[0135] It can be understood that in the embodiment of the present application, the height of the device may refer to the longitudinal dimension of the device, and the width of the device may refer to the lateral dimension of the device.
[0136] In this embodiment, for example, if a device is classified as a portrait device, the width, height, screen resolution, and screen resolution ratio of the device are all the width, height, screen resolution, and screen resolution ratio of the device in portrait mode. For example, if the mobile phone 100 shown in FIG1 is classified as a portrait device and the normal usage state of the mobile phone 100 is the portrait state shown in FIG1 , the width, height, screen resolution, and screen resolution ratio of the mobile phone 100 in the usage states shown in FIG1 and FIG2 are all the width and height in the portrait state shown in FIG1 . As shown in FIG1 , the long side of the mobile phone 100 is the height of the mobile phone 100, and the short side is the width of the mobile phone 100.
[0137] For example, if a device is classified as a landscape device, the width, height, screen resolution, and screen resolution ratio of the device are the width, height, screen resolution, and screen resolution ratio of the device in landscape mode.
[0138] In other embodiments, if a device is used as a screen projection destination, the width, height, screen resolution, and screen resolution ratio of the device are the width, height, screen resolution, and screen resolution ratio of the device in its current state. For example, if a device is currently in landscape mode, the width, height, screen resolution, and screen resolution ratio of the device are the width, height, screen resolution, and screen resolution ratio of the device in landscape mode. If a device is currently in portrait mode, the width, height, screen resolution, and screen resolution ratio of the device are the width, height, screen resolution, and screen resolution ratio of the device in portrait mode.
[0139] In this embodiment, for example, if the current usage state of the mobile phone 100 shown in FIG1 is the portrait state, the width, height, screen resolution, and screen resolution ratio of the mobile phone 100 are all the width, height, screen resolution, and screen resolution ratio of the mobile phone 100 in the portrait state shown in FIG1 , and the long side of the mobile phone 100 shown in FIG1 is the height, and the short side is the width. If the current usage state of the mobile phone 100 shown in FIG2 is the landscape state, the width, height, screen resolution, and screen resolution ratio of the mobile phone 100 are all the width, height, screen resolution, and screen resolution ratio of the mobile phone 100 in the landscape state shown in FIG2 , and the short side of the mobile phone 100 shown in FIG2 is the height, and the long side is the width.
[0140] For example: Taking the current usage state of the smart screen 200 shown in Figure 1 as the horizontal screen state, the width, height, screen resolution, screen resolution ratio, etc. of the smart screen 200 are all the width, height, screen resolution, screen resolution ratio, etc. in the horizontal screen state shown in Figure 1. The short side of the smart screen 200 shown in Figure 1 is the height and the long side is the width.
[0141] In some embodiments, a device may also be used as a target device and a screen projection destination at the same time. In this case, when the width, height, screen resolution, screen resolution ratio, etc. of the device are used to determine the height of the VD, the width, height, screen resolution, screen resolution ratio, etc. of the device are all the width, height, screen resolution, screen resolution ratio, etc. of the device in normal use; when the width, height, screen resolution, screen resolution ratio, etc. of the device are used to determine the width of the VD, the width, height, screen resolution, screen resolution ratio, etc. of the device are all the width, height, screen resolution, screen resolution of the device in the current use state.
[0142] For example: take the mobile phone 100 shown in Figure 2 as being used as both the target device and the screen projection destination, the normal usage state of the mobile phone 100 is the portrait state shown in Figure 1, and the current usage state is the landscape state shown in Figure 2 as an example, then when the width, height, screen resolution, screen resolution ratio, etc. of the mobile phone 100 shown in Figure 2 are used to determine the height of the VD, the width, height, screen resolution, screen resolution ratio, etc. of the mobile phone 100 shown in Figure 2 are all the width, height, screen resolution, screen resolution ratio, etc. in the portrait state shown in Figure 1; when the width, height, screen resolution, screen resolution ratio, etc. of the mobile phone 100 shown in Figure 2 are used to determine the width of the VD, the width, height, screen resolution, screen resolution ratio, etc. of the mobile phone 100 shown in Figure 2 are all the width, height, screen resolution, screen resolution ratio, etc. in the landscape state shown in Figure 2.
[0143] Exemplarily, the display mode corresponding to the interface of the application may include landscape mode and / or portrait mode. Among them, the interface of an application may support both landscape mode and portrait mode, or may only support one of them. Optionally, for different interfaces (or windows) of the same application, the supported display modes may be the same or different. It can be understood that the landscape mode may refer to that when the interface of the application is displayed on the display screen, the horizontal size is larger than the vertical size, or the width is larger than the height. The portrait mode may refer to that when the interface of the application is displayed on the display screen, the horizontal size is smaller than the vertical size, or the width is smaller than the height.
[0144] Optionally, if the interface of an application supports both landscape mode and portrait mode, the display mode of the interface may be set to landscape mode or portrait mode. For example: as shown in Figure 1, if the interface of application B is set to landscape mode, the interface of application B is drawn in the VD in the form of a full landscape screen. If the interface of application B is set to portrait mode, the interface of application B is drawn in the VD in the form of a vertically centered screen. After the drawing is completed, the mobile phone 100 can transmit the drawn data to the smart screen 200 for display. Similarly, as shown in Figure 1, the smart screen 200 can display the projection screen in the form of a full landscape screen or a vertically centered screen.
[0145] In the above-mentioned heterogeneous screen projection solution, since the screen resolution and DPI of the VD may not match, this may cause the projection screen on the projection destination to display abnormally and the projection effect to be poor.
[0146] For ease of understanding, the following example uses the mobile phone 100 as the source of screen projection and the smart screen 200 as the destination of screen projection. As shown in Figure 3, the screen resolution of the mobile phone 100 is "1920P×1080P" and the DPI is 360, and the screen resolution of the smart screen 200 is "900P×1600P" and the DPI is 180. As shown in Figure 3 (1), the resolution of the video interface 101 displayed on the mobile phone 100 is "1920P×1080P". As shown in Figure 3 (2), the resolution of the financial management interface 102 displayed on the mobile phone 100 is also "1920P×1080P".
[0147] In combination with the heterogeneous screen projection solution described above, take a button with a width of 32 density-independent pixels (dp) and a height of 32dp as an example. Assuming that the width and height of the button on a 180dpi screen are both 32P, then the width and height of the button on a 360dpi screen are both 64P. To ensure that the screen ratio occupied by the button on a 180dpi screen is the same as that on a 360dpi screen, the screen resolution of the created VD is "1800P×3200P" and the DPI is 360.
[0148] Assume that the display modes of the video interface 101 shown in (1) of FIG3 and the financial management interface 102 shown in (2) of FIG3 are both in portrait mode. Then for the video interface 101 and the financial management interface 102 displayed in portrait mode, the number of pixels included in the VD height (such as 1800P) is less than the number of pixels occupied by the height of the aforementioned two interfaces (such as 1920P). In this way, when the aforementioned two interfaces are drawn on the VD according to the DPI of the mobile phone 100, since the number of pixels included in the VD height is less than the number of pixels occupied by the height of the aforementioned two interfaces, it may cause the projection screen drawn on the VD to display abnormally, which may further cause the projection screen projected to the smart screen 200 to display abnormally, such as: the content in the projection screen appears to overlap, is missing, and other abnormal problems, resulting in a poor projection effect.
[0149] As shown in Figure 3 (1), after the mobile phone 100 projects the video interface 101 onto the smart screen 200, the smart screen displays the projected screen 201. The projected screen 201 has missing content relative to the video interface 101. As shown in Figure 3 (2), after the mobile phone 100 projects the financial management interface 102 onto the smart screen 200, the smart screen displays the projected screen 202. The content in the projected screen 202 is overlapping.
[0150] Based on this, an embodiment of the present application provides a screen projection method that can be applied to scenarios where a screen projection source projects a screen image onto a screen projection destination when multiple electronic devices are used in collaboration. This method can solve the problem of abnormal display of the screen image on the screen projection destination in heterogeneous screen projection scenarios and improve the screen projection effect.
[0151] For example, Figure 4 shows a schematic diagram of the architecture of a communication system for a screen projection method provided in an embodiment of the present application. As shown in Figure 4, the communication system 400 includes a first electronic device 401 and at least one second electronic device 402 (only two are shown in Figure 4).
[0152] The first electronic device 401 and the second electronic device 402 can establish a connection via a wired communication technology and / or a wireless communication technology. Based on the established connection, the first electronic device 401 and the second electronic device 402 can be used together. The wireless communication technology includes but is not limited to at least one of the following: a distributed soft bus, near field communication (NFC), Bluetooth (BT) (e.g., traditional Bluetooth or Bluetooth low energy (BLE)), wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) networks), Zigbee, frequency modulation (FM), infrared (IR), etc.
[0153] In some embodiments, both the first electronic device 401 and the second electronic device 402 support proximity discovery. For example, when the first electronic device 401 approaches the second electronic device 402, the first electronic device 401 and the second electronic device 402 can discover each other and then establish a wireless communication connection, such as a Wi-Fi peer-to-peer (P2P) connection or a Bluetooth connection. After the wireless communication connection is established, the first electronic device 401 and the second electronic device 402 can exchange signals via the wireless communication connection.
[0154] In some embodiments, the first electronic device 401 and the second electronic device 402 establish a wireless communication connection via a local area network. For example, the first electronic device 401 and the second electronic device 402 are connected to the same router.
[0155] In some embodiments, the first electronic device 401 and the second electronic device 402 establish a wireless communication connection via a cellular network, the Internet, or the like. For example, the second electronic device 402 accesses the Internet via a router, and the first electronic device 401 accesses the Internet via a cellular network; thus, the first electronic device 401 and the second electronic device 402 establish a wireless communication connection.
[0156] After the first electronic device 401 is connected to the second electronic device 402, the screen projection source in the first electronic device 401 and the second electronic device 402 can project the screen image onto the display screen of the screen projection destination for display. For example, taking the first electronic device 401 as the screen projection source and the second electronic device 402 as the screen projection destination, the first electronic device 401 can project the screen image onto the display screen of the second electronic device 402 for display.
[0157] The following embodiments are all introduced with the first electronic device as the screen projection source and the second electronic device as the screen projection destination.
[0158] Optionally, the electronic devices in the embodiments of the present application, such as the first electronic device 401 and the second electronic device 402, can be mobile phones, smart screens, smart cockpits, tablet computers, handheld computers, PCs, televisions, personal digital assistants (PDAs), wearable devices (such as smart watches), car computers, game consoles, and augmented reality (AR), virtual reality (VR) devices, smart home devices, smart city devices, etc. This embodiment does not impose any special restrictions on the specific form of the electronic devices. The operating systems installed on the electronic devices include but are not limited to Or other operating systems. In some embodiments, the electronic device can be a fixed device or a portable device. This application does not limit the specific type of electronic device or the installed operating system.
[0159] In FIG4 , the first electronic device 401 is shown as a mobile phone, and the second electronic device 402 is shown as a tablet computer or a smart screen.
[0160] In the embodiment of the present application, the electronic device is taken as a mobile phone as an example. Please refer to Figure 5, which is a structural diagram of a mobile phone provided in the embodiment of the present application.
[0161] The mobile phone may include a processor 510, an external memory interface 520, an internal memory 521, a universal serial bus (USB) interface 530, a charging management module 540, a power management module 541, a battery 542, an antenna 1, an antenna 2, a mobile communication module 550, a wireless communication module 560, an audio module 570, a sensor module 580, a button 590, a motor 591, an indicator 592, a camera 593, a display screen 594, and a subscriber identification module (SIM) card interface 595, etc.
[0162] The processor 510 may include one or more processing units. For example, the processor 510 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0163] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0164] Processor 510 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 510 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 510. If processor 510 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of processor 510, and thus improves system efficiency.
[0165] In some embodiments, processor 510 may include one or more interfaces.
[0166] The charging management module 540 is used to receive charging input from a charger, which can be a wireless charger or a wired charger.
[0167] The power management module 541 is used to connect the battery 542, the charging management module 540, and the processor 510. The power management module 541 receives input from the battery 542 and / or the charging management module 540 to provide power to the processor 510, the internal memory 521, the display 594, the camera 593, and the wireless communication module 560.
[0168] The wireless communication function of the mobile phone can be realized through antenna 1, antenna 2, mobile communication module 550, wireless communication module 560, modem processor and baseband processor.
[0169] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
[0170] The mobile communication module 550 can provide solutions for wireless communications, including 2G / 3G / 4G / 5G, used in mobile phones. The mobile communication module 550 may include at least one filter, a switch, a power amplifier, a low-noise amplifier (LNA), etc. In some embodiments, at least some of the functional modules of the mobile communication module 550 may be provided in the processor 510. In some embodiments, at least some of the functional modules of the mobile communication module 550 may be provided in the same device as at least some of the modules of the processor 510.
[0171] The wireless communication module 560 can provide wireless communication solutions for mobile phones, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The wireless communication module 560 can be one or more devices that integrate at least one communication processing module.
[0172] In some embodiments, antenna 1 of the mobile phone is coupled to mobile communication module 550, and antenna 2 is coupled to wireless communication module 560, so that the mobile phone can communicate with the network and other devices via wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology.
[0173] In some embodiments of the present application, the mobile communication module 550 and / or wireless communication module 560 may be used to transmit the projection screen. Taking a mobile phone as the projection source end as an example, the mobile communication module 550 and / or wireless communication module 560 may be used to send the projection screen to the projection destination end. Taking a mobile phone as the projection destination end as an example, the mobile communication module 550 and / or wireless communication module 560 may be used to receive the projection screen from the projection source end.
[0174] The mobile phone realizes display functions through a GPU, a display 594, and an application processor.
[0175] Display screen 594 is used to display images, videos, etc. Display screen 594 includes a display panel. In some embodiments, the mobile phone may include one or N display screens 594, where N is a positive integer greater than 1. In some embodiments of the present application, display screen 594 can be used to display a projection screen.
[0176] The mobile phone can realize the shooting function through the ISP, camera 593, video codec, GPU, display 594 and application processor.
[0177] The external memory interface 520 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone.
[0178] The internal memory 521 can be used to store computer executable program codes, which include instructions. The internal memory 521 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the mobile phone, etc. In addition, the internal memory 521 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 510 executes various functional applications and data processing of the mobile phone by running instructions stored in the internal memory 521 and / or instructions stored in a memory provided in the processor.
[0179] The mobile phone can implement audio functions through the audio module 570 and the application processor.
[0180] Optionally, the sensor module 580 may include one or more of a pressure sensor, a gyroscope sensor, an air 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, and the like.
[0181] The buttons 590 include a power button, a volume button, etc. The buttons 590 may be mechanical buttons or touch buttons.
[0182] Motor 591 can generate vibration prompts.
[0183] Indicator 592 can be an indicator light, which can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0184] The SIM card interface 595 is used to connect a SIM card.
[0185] It will be understood that the above only uses a mobile phone as an example to illustrate the structure of the electronic device in the embodiment of the present application, but does not constitute a limitation on the structure and form of the electronic device. The embodiment of the present application does not limit the structure and form of the electronic device. For example, Figure 5 shows another exemplary structure of the electronic device provided in the embodiment of the present application. As shown in Figure 6, the electronic device includes: a processor 601, a memory 602, a transceiver 603, and a display screen 604. The implementation of the processor 601, the memory 602, and the display screen 604 can refer to the implementation of the processor, memory, and display screen of the mobile phone described above. The transceiver 603 is used for the electronic device to interact with other devices (such as electronic devices). The transceiver 603 can be a device based on communication protocols such as Wi-Fi, Bluetooth, or other protocols.
[0186] In other embodiments of the present application, the electronic device may include more or fewer components than those shown in Figures 5 and 6, or may combine or separate certain components, or arrange the components differently. The components shown in the figures may be implemented in hardware, software, or a combination of software and hardware.
[0187] In some embodiments, the software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention uses the layered architecture as an example to illustrate the software structure of the electronic device.
[0188] FIG7 shows a software structure block diagram of an electronic device provided in an embodiment of the present application.
[0189] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, electronic devices, such as the first electronic device and the second electronic device, may each include an application layer and a system services layer.
[0190] The application layer includes a series of application packages. As shown in Figure 7, the application package may include desktop applications (launcher), video applications, WLAN applications, etc. Optionally, the applications included in the first electronic device and the second electronic device can be the same or different. Figure 7 takes the same as an example.
[0191] In some embodiments of the present application, one or more icons of other applications (such as but not limited to the aforementioned video application, WLAN, etc.) may be displayed on the desktop application running interface (hereinafter referred to as the desktop) of the first electronic device and the second electronic device. The application icon can be used to launch the running interface of the corresponding application.
[0192] In some embodiments of the present application, the desktop application 701 of the first electronic device or the desktop application 711 of the second electronic device can be used to receive a screen projection operation performed by the user. For example, in a super desktop projection scenario, the first electronic device and the second electronic device can construct a super terminal, that is, the desktop of the first electronic device can construct a super desktop with the desktop of the second electronic device. After the construction is completed, the desktop of the second electronic device can display the application icons included on the desktop of the first electronic device. In this way, the projection operation can be performed directly on the desktop of the second electronic device, such as clicking on the icon of the application included in the synchronized first electronic device on the desktop of the second electronic device.
[0193] The system service layer of the first electronic device includes a screen projection management module 702. The screen projection management module 702 can be used to manage screen projection events, such as but not limited to: calculating or adjusting the screen resolution of the VD according to the display mode of the application interface, sending screen projection data, etc.
[0194] In some embodiments, the screen projection management module 702 of the first electronic device may specifically include one or more of a collaborative configuration management module, a distributed window manager service (DWMS) module, a Cast+ module, etc. For example: the collaborative configuration management module can be used to interact with the second electronic device to achieve screen projection. The DWMS module can be used to manage distributed windows. The Cast+ module can be used to send screen projection data. In some embodiments, the collaborative configuration management module, the DWMS module, the Cast+ module, etc. of the first electronic device can cooperate to realize the functions of the screen projection management module 702 of the first electronic device.
[0195] In other embodiments, the screen projection management module 702 of the first electronic device may also be specifically implemented as one or more other modules, such as the Cast+ module may also be implemented as a Miracast module, etc. The embodiment of the present application does not impose any specific restrictions on the screen projection management module 702.
[0196] In some embodiments, the system service layer of the first electronic device may further include one or more of an activity manager service (AMS), a window manager service (WMS), etc. Among them, AMS can be used to start (or pull up), switch applications, and manage and schedule application processes. In some embodiments, AMS can be used to distribute configuration (config) information of the application interface, such as including but not limited to sending configuration information of the application interface to the screen projection management module 702 of the first electronic device. Exemplarily, the configuration information of the application interface may include but is not limited to the display mode of the application interface, the layout information of the application interface, etc.
[0197] In some embodiments, AMS can also be used to obtain the display mode of the projected screen. When the display mode of the projected screen changes, such as when the display mode of the projected screen is converted from portrait mode to landscape mode, AMS can notify the projection management module 702 of the first electronic device of the changed display mode of the projected screen.
[0198] WMS can be used to control the display area of the application interface. In some embodiments, during the screen projection process, if an application interface supports both landscape mode and portrait mode, WMS can determine the display mode of the application interface according to the display mode of the interface stack (i.e., activity stack) where the application interface is located. If the display mode of the interface stack where the application interface is located is landscape mode, the display mode of the application interface is also set to landscape mode. If the display mode of the interface stack where the application interface is located is portrait mode, the display mode of the application interface is also set to portrait mode. Among them, the interface stack includes one or more interfaces, and the display mode of the current interface stack can be understood as the display mode of the interface at the top of the stack, and the interface at the top of the stack is also the interface displayed on the screen. In other words, if an application interface supports both landscape mode and portrait mode, WMS can set the display mode of the application interface according to the display mode of the application interface displayed before the application interface, such as the same as the display mode of the application interface displayed before the application interface.
[0199] The system service layer of the second electronic device includes a screen projection management module 712. The screen projection management module 712 can be used to receive screen projection data and render the screen projection data on the screen of the second electronic device for display.
[0200] In some embodiments, the screen projection management module 712 may specifically include: one or more of a collaborative configuration management module, a DWMS module, a Cast+ module, a Hiwindow module, etc. For example: the collaborative configuration management module can be used to interact with the first electronic device to achieve screen projection. The DWMS module can be used to manage distributed windows. The Cast+ module can be used to receive screen projection data. The Hiwindow module can be used to render the projection data onto the screen of the second electronic device for display. In some embodiments, the collaborative configuration management module, the DWMS module, the Cast+ module, the Hiwindow module, etc. can cooperate to realize the functions of the screen projection management module 712 of the second electronic device.
[0201] In other embodiments, the screen projection management module 712 of the second electronic device may also be specifically implemented as one or more other modules, such as the Cast+ module may also be implemented as a Miracast module, etc. The embodiment of the present application does not impose any specific restrictions on the screen projection management module 712.
[0202] It is understood that the layers shown in FIG7 are merely illustrative. In actual applications, electronic devices may include more or fewer layers. It is also understood that the hierarchical division shown in FIG7 and the modules included in each layer are merely illustrative and do not constitute limitations of this application. In actual applications, other division methods may be used, and each module may be located at a different layer, or different modules may be integrated into a single module, etc., and this application does not limit these.
[0203] The technical solutions involved in the following embodiments can all appear in devices having structures as shown in Figures 5, 6, 7, etc., and in a system having the architecture as shown in Figure 4.
[0204] It is understood that in the embodiments of the present application, electronic devices, such as the first electronic device and / or the second electronic device, can perform some or all of the steps in the embodiments of the present application. These steps or operations are merely examples, and the embodiments of the present application can also perform other operations or variations of various operations. In addition, the various steps can be performed in a different order than those presented in the embodiments of the present application, and it is possible that not all operations in the embodiments of the present application need to be performed.
[0205] The following uses the example of a mobile phone as the first electronic device and a smart screen as the second electronic device to introduce the screen projection method provided in the embodiment of the present application in detail.
[0206] For example, FIG8 shows a flowchart of a screen projection method provided by an embodiment of the present application. As shown in FIG8, the method includes the following steps:
[0207] S801. Establish a connection between your mobile phone and the smart screen.
[0208] There are multiple ways to establish a connection between a mobile phone and a smart screen. In some embodiments, the mobile phone and the smart screen can be connected using wired communication technology. For example, the mobile phone and the smart screen can be connected via a data cable.
[0209] In some other embodiments, the mobile phone and the smart screen can establish a connection using wireless communication technology. In some examples, there are two possible ways to establish a connection between electronic devices using wireless communication: one way is that the electronic devices know each other's connection information, and the other way is that each electronic device has transmission capabilities.
[0210] The connection information may be a device identifier of the electronic device, such as an Internet Protocol (IP) address, a port number, or an account number used to log in to the electronic device. The account number used to log in to the electronic device may be an account provided by the operator to the user, such as a Huawei account number. The account number used to log in to the electronic device may also be an application account number, such as an account number for a social application or a video application.
[0211] The transmission capability of an electronic device may be a near-field communication capability or a long-distance communication capability. That is to say, the wireless communication protocol used to establish a connection between electronic devices, such as a mobile phone and a smart screen, may be a near-field communication protocol such as a Wi-Fi protocol, a Bluetooth protocol, or an NFC protocol, or a cellular network protocol. For example: a user can use a mobile phone to touch the NFC tag of a smart screen. The mobile phone reads the connection information saved in the NFC tag, such as the IP address of the smart screen included in the connection information. Afterwards, the mobile phone can use other protocols, such as the Bluetooth protocol, to establish a connection with the smart screen based on the IP address of the smart screen.
[0212] For another example, both the mobile phone and the smart screen have turned on the Bluetooth and Wi-Fi functions. The mobile phone can broadcast Bluetooth signals to discover surrounding electronic devices. For example, the mobile phone can display a list of discovered devices, which may include the identifiers of the devices discovered by the mobile phone, such as the identifier of the smart screen. During the device discovery process of the mobile phone, connection information, such as the IP address, can also be exchanged with the discovered devices. Afterwards, after the mobile phone receives the operation of the user selecting the identifier of the smart screen in the displayed device list, the mobile phone can use the Wi-Fi protocol to establish a connection with the smart screen based on the IP address of the smart screen. For another example, both the mobile phone and the smart screen are connected to the cellular network, and the mobile phone and the smart screen are logged in to the same Huawei account. The mobile phone and the smart screen can establish a connection based on the cellular network based on the Huawei account.
[0213] Optionally, the embodiment of the present application does not impose any restrictions on the method used to establish a connection between the mobile phone and the smart screen.
[0214] S802. The mobile phone receives a screen projection operation.
[0215] Among them, the screen casting operation can be used to project the screen to the smart screen for display. Exemplarily, the screen casting can include any application interface on the mobile phone side. The screen casting can be an application interface displayed on the mobile phone screen, or it can be an application interface not displayed on the mobile phone screen.
[0216] In some embodiments, the screen projection operation can be received by a mobile phone, as shown in Figure 8.
[0217] As a possible example, the user can perform the screen casting operation through an application with a screen casting function in the mobile phone. Take the application with the screen casting function as a video application as an example. As shown in (1) of Figure 9, the mobile phone can display a playback interface 900 of the video application, wherein a screen casting button 901 is displayed in the playback interface 900, and the user can perform the screen casting operation through the screen casting button 901. For example, the screen casting operation can be an operation such as clicking the screen casting button 901.
[0218] As another possible example, the user can also perform the screen projection operation through the screen projection function included in the mobile phone. For example, as shown in (2) in Figure 9, the mobile phone displays a control center 910, wherein the control center 910 includes a wireless screen projection button 911, and the user can perform the screen projection operation through the wireless screen projection button 911. For example, the screen projection operation can be such as clicking on the screen projection button 911. Optionally, the control center can also include one or more other function buttons, such as WLAN, mobile data, Bluetooth, etc., and these function buttons will not be introduced in detail in this application.
[0219] Of course, in other embodiments, the screen projection operation can also be performed on the mobile phone side, and other operations are used to start the screen projection function of the mobile phone, such as voice operation, button operation, gesture operation, etc.
[0220] In other embodiments, the screen projection operation can be received by a smart screen.
[0221] As a possible example, taking the scenario of building a super desktop with a mobile phone and a smart screen as an example, this application will not introduce in detail the way in which the mobile phone and the smart screen build a super desktop. After the mobile phone and the smart screen build a super desktop, the icons of one or more applications installed in the mobile phone can be displayed on the desktop of the smart screen. For example, as shown in (3) in Figure 9, the smart screen can display a desktop 920, which includes icons of applications installed in one or more mobile phones, such as icons for video applications, icons for weather applications, etc. The screen projection operation can be an operation performed in the desktop 920 to start the application installed in the mobile phone, such as clicking on the icon 921 of the video application.
[0222] Of course, in other embodiments, the screen projection operation can also be other operations performed on the smart screen side, other operations for starting the interface of the application installed in the mobile phone, such as voice operation, button operation, gesture operation, etc.
[0223] Optionally, the embodiment of the present application does not impose any specific limitation on the order in which the above steps S801 and S802 are executed.
[0224] S803. In response to the screen projection operation, the mobile phone creates a VD according to the display mode of the projected screen.
[0225] It is understood that in step S803, the projection screen may refer to the interface to be projected and displayed on the smart screen. The display mode of the projection screen may refer to the display mode when the projection screen is displayed on the second electronic device.
[0226] For example, the display mode of the projection screen may include but is not limited to landscape mode or portrait mode.
[0227] In some embodiments, the projection screen may only support one display mode, such as landscape mode or portrait mode. In this case, the display mode of the projection screen described in step S803 can be determined based on the display mode supported by the projection screen. For example, if the display mode supported by the projection screen is landscape mode, then the display mode of the projection screen described in step S803 can be determined to be landscape mode. For another example, if the display mode supported by the projection screen is portrait mode, then the display mode of the projection screen described in step S803 can be determined to be portrait mode.
[0228] In other embodiments, the projection screen may support both landscape mode and portrait mode. In this embodiment, the display mode of the projection screen can be determined based on the interface stack to which the projection screen belongs. For this specific implementation, please refer to the specific implementation described in Figure 7. For example: a projection screen supports both landscape mode and portrait mode. At this time, if the display mode of the interface stack to which the projection screen belongs is portrait mode, it can be determined that the display mode of the projection screen is also portrait mode. Alternatively, at this time, if the display mode of the interface stack to which the projection screen belongs is landscape mode, it can be determined that the display mode of the projection screen is also landscape mode.
[0229] In some other embodiments, if the application to which the projection screen belongs is on the whitelist, it can be determined that the display mode of the projection screen is landscape mode. The whitelist includes one or more applications whose interfaces support landscape display. Optionally, the whitelist can be stored on a mobile phone or on other devices (such as a smart screen). This application does not impose any restrictions on the storage location of the whitelist.
[0230] Optionally, the display mode of the projected screen can be determined by the mobile phone, or by other devices (such as a smart screen), and then notified to the mobile phone. This application does not specifically limit this. Optionally, the mobile phone or other device can determine the display mode of the projected screen based on the display modes supported by the projected screen and one or more of the methods described in the above embodiments.
[0231] In some embodiments, the target device can be determined according to the display mode of the projection screen (or the screen resolution of the target device can be directly determined), and then the screen resolution, DPI, etc. of the VD can be determined according to the screen resolution, DPI, etc. of the target device to complete the creation of the VD. It can be understood that the embodiment of the present application takes the screen resolution and DPI used to create the VD as an example of the target device. In other embodiments, the screen resolution and DPI used to create the VD can be a screen resolution and DPI that have a corresponding relationship. That is, when the DPI and the screen resolution that has a corresponding relationship with the DPI are used to display the image, there will be no display abnormality problem.
[0232] In some embodiments, if the display mode of the projection screen is a portrait mode, the target device can be determined to be a portrait device. Optionally, the portrait device can be a mobile phone as the projection source, or it can be a device with the same number of pixels as the height of the mobile phone, but the number of pixels included in the width is greater than the number of pixels included in the width of the mobile phone, or it can also be other portrait devices, such as a different model from the mobile phone at the projection source, or a vertical device of the same model, or a different type. In this way, for different projection sources, the screen resolution, DPI, etc. of the same target device (except the projection source) are used to calculate the screen resolution of VD, so that the application interface of the projection source with different screen resolutions can have the same display effect after being projected to the same projection destination. For different projection sources, the screen resolution of VD is calculated using their own screen resolution, DPI, etc., so that the display effect of the application interface of the projection source with different screen resolutions is consistent with the display effect of each projection source after being projected to the same projection destination.
[0233] For example, as shown in (1) in FIG10 , the other vertical screen devices may include, but are not limited to, various vertical screen devices such as a mobile phone 1001 and a foldable screen mobile phone 1002. For example, the screen resolution of the vertical screen device may be a standard screen resolution specified in the current protocol or future protocol, such as "1280P×720P", "1920P×1080P", "2400P×1080P", "1920Px1200P", etc.
[0234] In other embodiments, if the display mode of the projection screen is landscape mode, the target device can be determined to be a landscape device. Optionally, the landscape device can be a smart screen serving as the projection destination, or other landscape devices.
[0235] When the horizontal screen device is the aforementioned smart screen, that is, the smart screen is used as both the target device and the destination of the screen projection, when the height of the smart screen (or the number of pixels included in the height of the screen resolution) is used to determine the height of the VD according to the following formulas 1 and 3, the height of the smart screen is the height under normal use. When the width of the smart screen (or the number of pixels included in the width of the screen resolution) and the height are used to determine the width of the VD according to the following formulas 2 and 4, the width and height of the smart screen are the width and height under current use.
[0236] For example, taking the smart screen 200 shown in FIG1 , the normal usage state of the smart screen 200 is the landscape state shown in FIG1 , and the current usage state is the portrait state after the smart screen 200 shown in FIG1 is rotated 90 degrees to the left. When the height of VD is determined using the height of the smart screen 200 according to the following formulas 1 and 3, the height of the smart screen 200 is the height in the landscape state shown in FIG1 , that is, the short side of the smart screen 200 is the height. When the width and height of VD are determined using the width and height of the smart screen 200 according to the following formulas 2 and 4, the width and height of the smart screen 200 are the width and height in the portrait state, that is, the short side of the smart screen 200 is the width and the long side is the height.
[0237] For example, as shown in (2) in FIG10 , the horizontal screen device may include, but is not limited to, various types of horizontal screen devices such as a television 1011, a laptop computer 1012, and a tablet computer 1013. For example, the screen resolution of the horizontal screen device may also be a standard screen resolution specified by a current protocol or a future protocol, such as "768P×1024P", "768P×1366P", "1080P×1920P", "2160P×3840P", etc.
[0238] In some embodiments, the ratio of the screen resolution of the VD is the same as the ratio of the screen resolution of the smart screen.
[0239] As a possible implementation, the screen resolution of the VD can be determined based on the screen resolution of the target device (such as the number of pixels included in the height), the DPI of the target device, the DPI of the mobile phone, and the screen resolution of the smart screen. In this way, by creating a VD based on the screen resolution, DPI, and DPI of the target device, the screen resolution of the created VD can be matched with the DPI, thereby solving the problem of abnormal display of the screen on the projection destination due to the mismatch between the screen resolution and DPI of the VD, such as but not limited to the mismatch between the number of pixels included in the VD height and the DPI, and improving the projection effect.
[0240] In this implementation, as a possible example, the screen resolution of the VD can be determined according to Formula 1 and Formula 2.
[0241] In Formula 1, H is the number of pixels included in the height of VD, h is the number of pixels included in the height of the target device, DPI1 is the DPI of the mobile phone, and DPI2 is the DPI of the target device.
[0242] In Formula 2, W is the number of pixels included in the width of VD, H is the number of pixels included in the height of VD in Formula 1, w1 is the number of pixels included in the width of the smart screen, and h1 is the number of pixels included in the height of the smart screen.
[0243] For example, let's assume a phone has a screen resolution of 1920p x 1080p and a DPI of 360, the projection image in portrait mode also has a resolution of 1920p x 1080p, the portrait device has a screen resolution of 1280p x 720p and a DPI of 180, and the smart screen has a screen resolution of 900p x 1600p. Using Formulas 1 and 2 above, we can calculate that the VD's screen resolution is approximately 2560p x 4550p.
[0244] For example, let's assume a phone has a screen resolution of 1920p x 1080p and a DPI of 360, the projection screen in landscape mode has a resolution of 1080p x 1920p, the landscape device has a screen resolution of 768p x 1024p and a DPI of 180, and the smart screen has a screen resolution of 900p x 1600p. Using Formulas 1 and 2 above, we can calculate the VD's screen resolution to be 1536p x 2048p.
[0245] Optionally, in the above implementation, the DPI of the created VD is the same as the DPI of the mobile phone. In this way, when the DPI of the mobile phone is used as the DPI of the VD, the number of pixels included in the height of the target device is adjusted according to the proportional relationship between the DPI of the target device and the DPI of the mobile phone, thereby obtaining the number of pixels included in the height of the VD. The height of the created VD can be made to match the DPI. In view of the current situation where most application interfaces are displayed in portrait mode, by ensuring the height of the VD, the problem of abnormal display when projecting application interfaces displayed in portrait mode can be greatly solved.
[0246] As another possible implementation, the VD screen resolution can also be directly determined based on the screen resolution of the target device, the screen resolution of the smart screen, etc.
[0247] In this implementation, as a possible example, the screen resolution of the VD can be determined according to Formula 3 and Formula 4. H1=h2 Formula 3
[0248] In Formula 3, H1 is the number of pixels included in the height of VD, and h2 is the number of pixels included in the height of the target device.
[0249] Among them, in Formula 4, W1 is the number of pixels included in the width of VD, H1 is the number of pixels included in the height of VD in Formula 3, w1 is the number of pixels included in the width of the smart screen, and h1 is the number of pixels included in the height of the smart screen.
[0250] Optionally, in this implementation, the DPI of the created VD is the same as the DPI of the target device. Optionally, in this implementation, when the target device is a mobile phone as the source of the screen projection, the screen resolution of the created VD is the screen resolution of the mobile phone as the source of the screen projection, and the DPI of the created VD is the DPI of the mobile phone as the source of the screen projection. In this way, the number of pixels and DPI included in the height of the target device are directly used as the number of pixels and DPI included in the height of the VD, so that the height of the VD matches the DPI. In view of the current situation where most application interfaces are displayed in portrait mode, by ensuring the height of the VD, the problem of abnormal display when the application interface displayed in portrait mode is projected can be greatly solved.
[0251] In other embodiments, the ratio of the screen resolution of the VD may also be the same as the ratio of the screen resolution of the mobile phone serving as the screen projection source, or the same as the ratio of the screen resolution of the target device.
[0252] In other implementations, after obtaining the screen resolution and DPI of the VD according to the above implementation, the screen resolution and DPI may be simultaneously scaled up by the same ratio and then used as the screen resolution of the VD.
[0253] In some scenarios, when the projection screen supports both horizontal and vertical modes, if the display mode of the projection screen is set to a display mode different from that of the previous projection screen, when creating a VD based on the display mode of the projection screen as described above, due to the dynamic switching of the VD size, the new partially transparent projection screen may be superimposed on the old projection screen, resulting in display abnormalities.
[0254] For example, the display mode of the previous projection screen is horizontal mode, but the display mode of the current projection screen is set to vertical mode during projection.
[0255] For example, FIG11a (1) shows a schematic diagram of a mobile phone drawing the previous frame of the screen projection, that is, the video interface 1101, on a VD created according to the display mode of the previous frame of the screen projection. After the mobile phone projects the video interface 1101 to the smart screen, the smart screen can display the interface shown in FIG11a (2).
[0256] The mobile phone then projects the current projection screen onto the smart screen for display. For example, FIG11a (3) shows a schematic diagram of the mobile phone drawing the current projection screen, i.e., pop-up window 1102, which is a partially transparent projection screen, on a VD created according to the display mode of the current projection screen.
[0257] It can be understood that since the screen resolution of the VD created based on the projection screen in portrait mode is greater than the screen resolution of the VD created based on the projection screen in landscape mode, the screen resolution of the VD shown in (1) in Figure 11a is smaller than the screen resolution of the VD shown in (3) in Figure 11a.
[0258] Then, after the mobile phone projects the pop-up window 1102 to the smart screen, the smart screen can display the interface as shown in (4) in Figure 11a. As shown in (4) in Figure 11a, since the screen resolution of the created VD has changed compared to the previous frame of the projected screen, and the background of the pop-up window 1102 is transparent, display abnormalities such as black edges appear.
[0259] Therefore, in the above embodiment, when the projection screen supports both horizontal and vertical modes, the display mode of the projection screen is determined based on the interface stack to which the projection screen belongs, and then when the projection screen is projected, the display abnormality problem caused by the superposition of transparent interfaces due to the dynamic switching of VD size can be solved.
[0260] For example, in conjunction with the example shown in Figure 11a, when casting the screen, the mobile phone sets the display mode of the pop-up window 1102 to the same display mode as the video interface 1101. At this time, the screen resolution of the VD created according to the display mode of the pop-up window 1102 is the same as the screen resolution of the VD created according to the display mode of the video interface 1101. For example, (1) in Figure 11b shows a schematic diagram of the mobile phone drawing the pop-up window 1102 on the VD created. Subsequently, after the mobile phone casts the pop-up window 1102 to the smart screen, the smart screen can display the interface shown in (2) in Figure 11b. It can be seen that the cast screen displayed by the smart screen is normal and no black edges appear.
[0261] S804. The mobile phone generates a projection screen according to the VD.
[0262] In some embodiments, the mobile phone can draw the projection screen on the VD according to the screen resolution of the VD, the DPI of the VD, the display mode of the projection screen, etc., that is, a projection screen is generated. Exemplarily, if the display mode of the projection screen is vertical screen mode, the projection screen is the video interface 101 shown in Figure 3, and the VD created based on the projection screen is shown in (1) in Figure 11c, then the VD drawn with the projection screen can be shown in (2) in Figure 11c. If the display mode of the projection screen is horizontal screen mode, the projection screen is also the video interface 101 shown in Figure 3, and the VD created based on the projection screen is shown in (3) in Figure 11c, then the VD drawn with the projection screen can be shown in (4) in Figure 11c.
[0263] S805: The mobile phone sends the projected image to the smart screen. In response, the smart screen receives the projected image from the mobile phone.
[0264] S806. The smart screen displays the projection image.
[0265] In some embodiments, the smart screen can directly display the projected image on the screen. In other embodiments, to improve the display effect of the projected image, the smart screen can also enlarge or reduce the projected image, adapt it to the screen of the smart screen, and then display the projected image on the screen.
[0266] For example, in conjunction with the example shown in (2) of FIG11c , the projection screen displayed by the smart screen may be the projection screen 1200 shown in (1) of FIG12 . In conjunction with the example shown in (3) of FIG11c , the projection screen displayed by the smart screen may be the projection screen 1210 shown in (2) of FIG12 .
[0267] Based on the above technical solution, the screen resolution of the created VD is dynamically adjusted according to the display mode of the projection screen, which can solve the problem of abnormal display of the projection screen on the projection destination due to the mismatch between the screen resolution of the VD and the DPI, thereby improving the projection effect.
[0268] In conjunction with the architecture shown in FIG7 , as a specific embodiment, FIG13 shows a flow chart of another screen projection method provided by an embodiment of the present application. As shown in FIG13 , the method includes the following steps:
[0269] S1301. The desktop application of the smart screen receives the screen projection operation.
[0270] For the introduction of the screen projection operation in step S1301, please refer to the relevant introduction of step S801 mentioned above.
[0271] S1302. In response to the screen projection operation, the desktop application of the smart screen sends relevant information of the projection screen to the screen projection management module of the smart screen.
[0272] In some embodiments, the relevant information of the cast screen can be used to display the cast screen on the display screen of the smart screen. Exemplarily, the relevant information of the cast screen may include, but is not limited to, one or more of the identification of the cast screen and the identification (identity, ID) of the display device (display). The identification of the cast screen can be used by the mobile phone to determine which application interface to use as the cast screen, and / or which application the mobile phone uses as the cast application, etc. Exemplarily, the identification of the cast screen may include, but is not limited to, the package name of the application corresponding to the cast screen, or the identification of the cast screen (such as activity name), etc. For example, the smart screen can determine the identification of the cast screen based on the cast operation, or it can also determine the identification of the cast screen by other means.
[0273] Optionally, different projection destinations may have different corresponding display IDs. In some scenarios, a projection source may establish connections with multiple projection destinations. In this scenario, in order to facilitate the projection source to determine which projection destination to transmit the projection image to, the relevant information of the projection image may include the display ID, so that the projection source can determine the corresponding projection destination based on the display ID of the projection destination.
[0274] In other scenarios, a screen projection source may only establish a connection with one screen projection destination. In this scenario, the display ID may not be included in the related information of the screen projection.
[0275] S1303. The projection management module of the smart screen determines the screen resolution of the vertical screen device and the DPI determines the screen resolution of the VD.
[0276] Based on step S1303, the screen resolution and DPI of the vertical screen device are used by default to determine the screen resolution of the VD. For the projection screen displayed in vertical screen mode, there is no need to adjust the screen resolution of the VD, which can reduce the system power consumption of the projection source or the projection destination during the projection process.
[0277] It is understood that step S1303 defaults to using the screen resolution and DPI of the portrait device to determine the screen resolution of the VD. In other embodiments, the screen resolution and DPI of the landscape device may also be used by default to determine the screen resolution of the VD. In this way, for the projection screen displayed in landscape mode, there is no need to adjust the screen resolution of the VD, and the system power consumption of the projection source or the projection destination during the projection process can also be reduced.
[0278] In this way, by setting the default VD screen resolution as mentioned above, the parameters of the configuration information of the application interface sent down in the system can be reduced, and the system fluency can be improved while reducing the power consumption of the screen projection source or screen projection destination system.
[0279] It can also be understood that step S1303 is an example of the smart screen setting the default VD screen resolution. In other embodiments, the default VD screen resolution can also be set by the mobile phone. This embodiment of the present application does not specifically limit this. Of course, in other embodiments, the default VD screen resolution can also be not set.
[0280] S1304: The smart screen's projection management module sends projection parameters to the mobile phone's projection management module. Correspondingly, the mobile phone's projection management module receives the projection parameters from the smart screen.
[0281] In some embodiments, the screen projection parameters may include but are not limited to the screen resolution of the smart screen, and at least one of the screen resolution and DPI of the vertical screen device.
[0282] In other embodiments, when the above-mentioned step S1303 is implemented as the default use of the screen resolution, DPI, etc. of the horizontal screen device to determine the screen resolution of the VD, in step S1304, the screen projection parameters may include but are not limited to the screen resolution of the smart screen, and at least one of the screen resolution and DPI of the horizontal screen device.
[0283] It can be understood that the above embodiment is based on the example that the screen resolution, DPI, etc. of the vertical screen device do not exist on the mobile phone side, and / or the screen resolution, DPI, etc. of the horizontal screen device do not exist. When the screen resolution, DPI of the vertical screen device exists on the mobile phone side, or the screen resolution, DPI of the horizontal screen device exists, the above projection parameters may not include the screen resolution, DPI of the vertical screen device, or the screen resolution, DPI of the horizontal screen device.
[0284] S1305. The screen projection management module of the mobile phone creates a VD according to the screen projection parameters.
[0285] In some embodiments, the screen projection management module of the mobile phone can determine the screen resolution of the VD according to the DPI of the mobile phone and the screen projection parameters, and then create the VD. For the specific implementation of this step, please refer to the relevant implementation of step S803 described in Figure 8.
[0286] Optionally, the ratio of the screen resolution of the created VD is the same as the ratio of the screen resolution of the smart screen.
[0287] S1306: The smart screen's projection management module sends information about the projection screen to the mobile phone's projection management module. Correspondingly, the mobile phone's projection management module receives information about the projection screen from the smart screen's projection management module.
[0288] In some embodiments, the relevant information of the projection screen can be used to start the projection application on the mobile phone side, and the interface of the projection application is the projection screen described in step S1306.
[0289] Optionally, relevant information of the projection screen can also be sent at other times, such as before step S1304, or while executing step S1304. The embodiment of the present application does not limit the execution order of step S1304 and step S1306.
[0290] S1307. The screen projection management module of the mobile phone sends relevant information of the projection screen to the AMS of the mobile phone.
[0291] S1308. The AMS of the mobile phone starts the screen projection application.
[0292] In some embodiments, the AMS of the mobile phone can start the screen projection application based on the relevant information of the screen projection image.
[0293] In some embodiments, after executing step S1308, the mobile phone can also generate a projection screen based on the VD created in step S1305, and send the generated projection screen to the smart screen for display. At this time, the smart screen can first display the projection screen in a vertically centered manner, as shown in the interface (1) in Figure 12. Subsequently, when executing step S1311, if the display mode of the projection screen is not a vertical screen mode, the smart screen will convert the vertically centered display mode shown in Figure 12 (1) to a horizontally full display mode for the projection screen, as shown in the interface (2) in Figure 12.
[0294] S1309. The AMS of the mobile phone sends the configuration (config) information of the projection screen to the projection management module of the mobile phone.
[0295] For example, the configuration information of the projection screen may include, but is not limited to, the display mode of the projection screen, the layout information of the projection screen, etc. Alternatively, the configuration information of the projection screen described in step S1309 may only include the display mode of the projection screen. Alternatively, the configuration information of the projection screen may include the display modes supported by the projection screen.
[0296] In some embodiments, the configuration information of the projection screen may be used to draw the projection screen on the VD.
[0297] S1310: The mobile phone's screen projection management module sends the display mode of the projection screen to the smart screen's screen projection management module. Correspondingly, the smart screen's screen projection management module receives the display mode of the projection screen from the mobile phone's screen projection management module.
[0298] In some embodiments, when the configuration information includes the display modes supported by the projection screen, the projection management module may first determine which display mode the projection screen is set to. Of course, the display mode set for the projection screen may also be determined by other modules of the mobile phone. For example, in the AMS module, the configuration information may include the display mode of the projection screen after the setting.
[0299] Optionally, step S1310 is an example of a mobile phone determining the display mode of the projected screen and then sending the determined display mode of the projected screen to the smart screen. The mobile phone can also directly send the display mode supported by the projected screen to the smart screen, and the smart screen determines the display mode of the projected screen.
[0300] S1311. The projection management module of the smart screen determines whether the display mode of the projection screen is portrait mode.
[0301] If yes, no processing is performed, or step S1317 and subsequent steps are executed. If no, step S1312 and subsequent steps are executed.
[0302] It can be understood that in other embodiments, when step S1303 is implemented as the default use of the screen resolution, DPI, etc. of the horizontal screen device to determine the screen resolution of the VD, step S1311 can also be implemented as the projection management module of the smart screen to determine whether the display mode of the projection screen is the horizontal screen mode.
[0303] S1312. The projection management module of the smart screen determines and adjusts the screen resolution of the VD.
[0304] It can be understood that in the embodiment of the present application, after adjusting the screen resolution of the VD, the DPI of the VD can also be adjusted accordingly so that the adjusted screen resolution of the VD matches the DPI.
[0305] S1313. The smart screen's projection management module sends projection parameters to the mobile phone's projection management module.
[0306] In some embodiments, the screen projection parameters may be used to instruct the mobile phone to adjust the screen resolution of the VD.
[0307] In some embodiments, when the screen resolution of the VD is determined by the screen resolution, DPI, etc. of the portrait screen device by default in step S1303, the projection parameters may include but are not limited to the screen resolution of the smart screen, and at least one of the screen resolution and DPI of the landscape screen device.
[0308] In other embodiments, when step S1303 is implemented as the default use of the screen resolution and DPI of the horizontal screen device to determine the screen resolution of the VD, the projection parameters may include but are not limited to the screen resolution of the smart screen, and at least one of the screen resolution and DPI of the vertical screen device.
[0309] In other embodiments, the smart screen's projection management module may not execute step S1313. For example, after the mobile phone receives the projection parameters described in step S1303, it caches the projection parameters, or the mobile phone stores the screen resolution and DPI of the horizontal screen device and the screen resolution and DPI of the vertical screen device, then the smart screen's projection management module may not execute step S1313. Optionally, the smart screen can directly instruct the mobile phone to adjust the VD screen resolution through other messages.
[0310] It is understood that steps S1310 to S1313 are based on the example of a smart screen determining whether to adjust the screen resolution of the VD. In other embodiments, the mobile phone can also directly determine whether to adjust the screen resolution of the VD. For example, after obtaining the display mode of the projected screen, the screen projection management module of the mobile phone directly determines whether the screen resolution of the VD needs to be adjusted based on the display mode, and then determines whether to recreate the VD.
[0311] S1314. The screen projection management module of the mobile phone creates a VD according to the screen projection parameters.
[0312] It is understood that the screen resolution of the VD created in step S1305 is different from that of the VD created in step S1314. In some embodiments, the screen projection management module of the mobile phone can also determine the screen resolution of the VD based on the DPI of the mobile phone and the projection parameters, and then create the VD. For the specific implementation of this step, please refer to the relevant implementation of step S803 described in Figure 8.
[0313] S1315: The mobile phone's AMS sends the projection screen configuration information to the mobile phone's WMS. Correspondingly, the mobile phone's WMS receives the configuration information from the mobile phone's AMS.
[0314] Exemplarily, in step S1305, the configuration information of the projection screen may include but is not limited to the display mode of the projection screen, the layout information of the projection screen, etc.
[0315] S1316. The WMS of the mobile phone draws the projection screen on the VD according to the configuration information of the projection screen.
[0316] In some embodiments, if the display mode of the projection screen is horizontal mode, the WMS of the mobile phone can cover the entire VD with the projection screen in horizontal mode, as shown in (4) in Figure 11c.
[0317] In other embodiments, the display mode of the projection screen is vertical mode, and the WMS of the mobile phone can draw the projection screen vertically centered on the VD, as shown in (2) in Figure 11c.
[0318] The mobile phone can then transmit the projected image to the smart screen for display.
[0319] In some screen projection scenarios, the display mode of the projected screen may change after it is projected onto the smart screen. In this case, the screen resolution of the VD can be readjusted based on the changed display mode of the projected screen. Optionally, the change in the display mode of the projected screen can be triggered by a user operation, or it can be triggered by other means, such as automatic triggering by an application.
[0320] Therefore, taking the case where the display mode of the projection screen is switched from landscape mode to portrait mode as an example, in some embodiments, the method shown in FIG13 may further include the following steps:
[0321] S1317. The screen projection application requests the mobile phone's AMS to display the projection screen in landscape mode.
[0322] S1318: The AMS of the mobile phone sends the display mode of the projection screen to the projection management module of the mobile phone. Correspondingly, the projection management module of the mobile phone receives the display mode of the projection screen from the AMS of the mobile phone.
[0323] For example: in step S1318, the display mode of the projection screen is horizontal screen mode.
[0324] S1319: The mobile phone's screen projection management module sends the display mode of the projection screen to the smart screen's screen projection management module. Correspondingly, the smart screen's screen projection management module receives the display mode of the projection screen from the mobile phone's screen projection management module.
[0325] It can be understood that the display mode of the projection screen described in step S1318 and step S1319 refers to the display mode after the projection screen changes.
[0326] S1320. The projection management module of the smart screen determines and adjusts the screen resolution of the VD.
[0327] In some embodiments, after receiving the display mode of the projection screen, the projection management module of the smart screen can determine that the display mode of the projection screen has changed, and then execute step S1320.
[0328] In other embodiments, after receiving the display mode of the projection screen, the projection management module of the smart screen can also first determine whether the display mode of the projection screen has changed based on the received display mode of the projection screen, and if it has changed, execute step S1320.
[0329] In some embodiments, after step S1320, one or more steps from step S1313 to step S1316 may also be included.
[0330] It is understood that steps S1319 to S1320 are also based on the example of the smart screen determining whether to adjust the screen resolution of the VD. In other embodiments, the mobile phone can also directly determine whether to adjust the screen resolution of the VD. For example, after executing step S1318, the screen projection management module of the mobile phone can determine whether the display mode of the projected screen has changed based on the display mode of the projected screen. If so, it can determine to adjust the screen resolution of the VD.
[0331] As another specific embodiment, FIG14 shows a flow chart of another screen projection method provided in an embodiment of the present application. As shown in FIG14 , the method includes the following steps:
[0332] S1401. In response to the screen projection operation, the screen projection management module of the smart screen sends relevant information of the projection screen and projection parameters to the screen projection management module of the mobile phone.
[0333] For a detailed description of this step, please refer to step S1306 and the related description of step S1304 shown in FIG13 .
[0334] Optionally, before step S1401, step S1301 shown in FIG. 13 may also be included.
[0335] S1402. The screen projection management module of the mobile phone creates a VD according to the screen projection parameters.
[0336] For the relevant introduction of step S1402, please refer to the relevant introduction of step S1305 shown in Figure 13.
[0337] Optionally, before step S1402, step S1303 shown in FIG. 13 may also be included.
[0338] S1403. The screen projection management module of the mobile phone obtains the startup status of the screen projection application on the VD from the AMS of the mobile phone.
[0339] Exemplarily, the startup status of the screen projection application may include started, not started, etc. Optionally, the screen projection management module of the mobile phone can monitor the startup status of the screen projection application from the AMS of the mobile phone in real time or periodically.
[0340] In some embodiments, when the screen projection application is not started, the method shown in FIG14 may further include the following steps:
[0341] S1404. The screen projection management module of the mobile phone instructs the AMS of the mobile phone to start the screen projection application.
[0342] S1405. The AMS of the mobile phone starts the screen projection application.
[0343] Optionally, after the mobile phone executes step S1405, the mobile phone can also generate a projection screen based on the VD created in step S1402 and send it to the smart screen for display.
[0344] S1406. The screen projection management module of the mobile phone determines that a projection image exists on the VD.
[0345] In some embodiments, the mobile phone's screen projection management module can monitor the mobile phone's foreground application interface and the display corresponding to the application interface in real time or periodically from the mobile phone's AMS. When the mobile phone's screen projection management module determines that the display corresponding to the foreground application interface is the VD created in step S1402, the mobile phone's screen projection management module can determine that the projection image exists on the VD.
[0346] S1407. The screen projection management module of the mobile phone obtains the display mode of the projection image from the AMS of the mobile phone.
[0347] S1408. The screen projection management module of the mobile phone determines whether to adjust the screen resolution of the VD according to the display mode of the projection image.
[0348] In some embodiments, when the VD described in step S1402 is created based on the screen resolution, DPI, etc. of the portrait-screen device, in step S1408, if the display mode of the projected image is portrait mode, the screen projection management module of the mobile phone may not adjust the screen resolution of the VD. If the display mode of the projected image is landscape mode, the screen projection management module of the mobile phone may recreate the VD based on the screen resolution, DPI, etc. of the landscape-screen device.
[0349] In other embodiments, when the VD is created in step S1402 based on the screen resolution, DPI, etc. of the landscape device, in step S1408, if the display mode of the projected image is landscape mode, the mobile phone's screen projection management module may not adjust the screen resolution of the VD. If the display mode of the projected image is portrait mode, the mobile phone's screen projection management module may recreate the VD based on the screen resolution of the landscape device.
[0350] In this embodiment, after the projection screen is projected onto the smart screen, the display mode of the projection screen may also change. At this time, the mobile phone can also readjust the screen resolution of the VD according to the changed display mode of the projection screen. For example, the mobile phone can obtain the display mode of the projection screen after the change from the AMS, and then adjust the screen resolution of the VD according to the changed display mode of the projection screen.
[0351] For other implementations of this embodiment, please refer to the relevant implementations described in Figure 13.
[0352] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in this application, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present application.
[0353] The present application is an embodiment that can divide the functional modules of the electronic device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0354] As shown in Figure 15, a schematic diagram of the structure of an electronic device 1500 provided in an embodiment of the present application is provided. The electronic device 1500 can be used to implement the methods described in the above method embodiments. For example, the electronic device 1500 may include: a processing unit 1501, a display unit 1502, and a communication unit 1503.
[0355] In one possible example, taking the electronic device 1500 as a second electronic device (such as a smart screen), the processing unit 1501 is used to support the electronic device 1500 in performing the processing function performed by the second electronic device in any one of Figures 1 to 14. The display unit is used to support the electronic device 1500 in performing the display function performed by the second electronic device in any one of Figures 1 to 14. The communication unit is used to support the electronic device 1500 in performing the communication function performed by the second electronic device in any one of Figures 1 to 14.
[0356] In another possible example, taking the electronic device 1500 as a first electronic device (such as a mobile phone), the processing unit 1501 is used to support the electronic device 1500 in performing the processing function performed by the first electronic device in any one of Figures 1 to 14. The display unit is used to support the electronic device 1500 in performing the display function performed by the first electronic device in any one of Figures 1 to 14. The communication unit is used to support the electronic device 1500 in performing the communication function performed by the first electronic device in any one of Figures 1 to 14.
[0357] Optionally, the electronic device 1500 shown in FIG15 may further include a storage unit (not shown in FIG15 ) storing a program or instruction. When the processing unit 1501 executes the program or instruction, the electronic device 1500 shown in FIG15 may execute the method shown in the above method embodiment.
[0358] The technical effects of the electronic device 1500 shown in FIG15 can refer to the technical effects of the method described in the above method embodiment and will not be repeated here. The processing unit 1501 involved in the electronic device 1500 shown in FIG15 can be implemented by a processor or processor-related circuit components, and can be a processor or processing module. The communication unit 1503 can be implemented by a transceiver or transceiver-related circuit components, and can be a transceiver or transceiver module. The display unit 1502 can be implemented by display screen-related components.
[0359] An embodiment of the present application also provides a chip system, as shown in Figure 16, which includes at least one processor 1601 and at least one interface circuit 1602. The processor 1601 and the interface circuit 1602 can be interconnected via lines. For example, the interface circuit 1602 can be used to receive signals from other devices. For another example, the interface circuit 1602 can be used to send signals to other devices (such as the processor 1601). Exemplarily, the interface circuit 1602 can read instructions stored in the memory and send the instructions to the processor 1601. When the instructions are executed by the processor 1601, the electronic device can execute the various steps performed by the first electronic device or the second electronic device in the above embodiment. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.
[0360] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0361] Optionally, the memory in the chip system may be one or more memories. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in this application. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on different chips. This application does not specifically limit the type of memory or the configuration of the memory and the processor.
[0362] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0363] It should be understood that each step in the above method embodiment can be completed by hardware integrated logic circuits in a processor or by software instructions. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
[0364] An embodiment of the present application further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the method described in the above method embodiment.
[0365] An embodiment of the present application provides a computer program product, which includes: a computer program or instructions, which, when executed on a computer, causes the computer to execute the method described in the above method embodiment.
[0366] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory to enable the device to execute the methods in the above-mentioned method embodiments.
[0367] An embodiment of the present application also provides a communication system, including a first electronic device and a second electronic device, wherein the first electronic device is used to execute the method executed by the first electronic device in the above method embodiment, and the second electronic device is used to execute the method executed by the second electronic device in the above method embodiment.
[0368] Among them, the electronic device, computer storage medium, communication system, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0369] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0370] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The various embodiments can be combined with each other or referenced to each other without conflict. The device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, 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.
[0371] The units described as separate components may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, the functional units in the various embodiments of the present application may be integrated into a processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units.
[0372] If the 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 readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0373] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A screen projection method, It is characterized in that Applied to a first electronic device, the method includes: Obtaining a display mode when an application interface of a first application running on the first electronic device is displayed on the second electronic device, the display mode including a landscape mode and a portrait mode, the display mode of the application interface being used to determine a target screen resolution and a target dots per inch (DPI), the target screen resolution corresponding to the target DPI; Create a virtual screen VD according to the target screen resolution and the target DPI; Generate a projection screen on the VD according to the application interface; Send the projection screen to the second electronic device.
2. The method according to claim 1, It is characterized in that The display mode of the application interface is a vertical screen mode, and the number of pixels included in the height of the target screen resolution is greater than the number of pixels included in the width.
3. The method according to claim 2, It is characterized in that The target screen resolution is the screen resolution of the target vertical screen device, and the target DPI is the DPI of the target vertical screen device.
4. The method according to claim 3, It is characterized in that The first electronic device is a vertical screen device, the target vertical screen device is the first electronic device or a third electronic device, and the third electronic device is a vertical screen device of a different type or model from that of the first electronic device.
5. The method according to claim 3 or 4, It is characterized in that The target vertical screen device includes a mobile phone.
6. The method according to claim 1, It is characterized in that The display mode of the application interface is a horizontal screen mode, and the number of pixels included in the height of the target screen resolution is less than the number of pixels included in the width.
7. The method according to claim 6, It is characterized in that The target screen resolution is the screen resolution of the target horizontal screen device, and the target DPI is the DPI of the target horizontal screen device.
8. The method according to claim 7, It is characterized in that The target horizontal screen device includes one or more of a tablet, a personal computer PC, a smart screen, and a car screen.
9. The method according to any one of claims 1 to 8, It is characterized in that The creating a VD according to the target screen resolution and the target DPI includes: The target DPI creates the VD according to at least one of the DPI of the first electronic device and the screen resolution of the second electronic device, and the target screen resolution.
10. The method according to claim 9, It is characterized in that The number of pixels included in the height of the VD is determined according to the number of pixels included in the height of the target screen resolution.
11. The method according to claim 10, It is characterized in that The height of the VD includes the number of pixels that satisfy the following formula: Among them, H is the number of pixels included in the height of the VD, h is the number of pixels included in the height of the target screen resolution, DPI1 is the DPI of the first electronic device, and DPI2 is the target DPI.
12. The method according to any one of claims 9 to 11, It is characterized in that The ratio of the screen resolution of the VD is the same as the ratio of the screen resolution of the second electronic device.
13. The method according to claim 12, It is characterized in that The width of the VD includes the number of pixels that satisfies the following formula: Wherein, W is the number of pixels included in the width of the VD, H is the number of pixels included in the height of the VD, w1 is the number of pixels included in the width of the second electronic device, and h1 is the number of pixels included in the height of the second electronic device.
14. The method according to any one of claims 1 to 13, It is characterized in that The DPI of the VD is the same as the DPI of the first electronic device.
15. The method according to any one of claims 1 to 14, It is characterized in that The obtaining of the display mode of the application interface includes: If the first application is a first preset application, it is determined that the display mode of the application interface is a horizontal screen mode.
16. The method according to any one of claims 1 to 14, It is characterized in that The obtaining of the display mode of the application interface includes: If the display modes supported by the application interface include landscape mode and portrait mode, it is determined that the display mode of the application interface is the same as the display mode of the application interface that generated the previous frame of the projection screen.
17. The method according to any one of claims 1 to 14, It is characterized in that The obtaining of the display mode of the application interface includes: Sending the display mode supported by the application interface to the second electronic device; The display mode of the application interface is received from the second electronic device.
18. The method according to any one of claims 1 to 17, It is characterized in that After sending the projection screen to the second electronic device, the method further includes: After the display mode of the application interface changes, obtaining the changed display mode of the application interface; The screen resolution and DPI of the VD are adjusted according to the changed display mode of the application interface.
19. The method according to claim 18, It is characterized in that The change in the display mode of the application interface is triggered by a user operation.
20. A screen projection method, It is characterized in that Applied to a second electronic device including a display screen, the method includes: Acquire a display mode when an application interface of a first application running on the first electronic device is displayed on the second electronic device, where the display mode includes a horizontal screen mode and a vertical screen mode; Instructing the first electronic device to create a first VD according to a target screen resolution and a target DPI according to the display mode of the application interface, wherein the target screen resolution and the target DPI correspond to the display mode of the application interface, and the target screen resolution corresponds to the target DPI; Receiving a first projection screen from the first electronic device, where the first projection screen is generated on the first VD according to the application interface; Display the first projection screen.
21. The method according to claim 20, It is characterized in that The display mode of the application interface is a vertical screen mode, and the number of pixels included in the height of the target screen resolution is greater than the number of pixels included in the width.
22. The method according to claim 21, It is characterized in that The target screen resolution is the screen resolution of the target vertical screen device, and the target DPI is the DPI of the target vertical screen device.
23. The method according to claim 22, It is characterized in that The first electronic device is a vertical screen device, the target vertical screen device is the first electronic device or a third electronic device, and the third electronic device is a vertical screen device of a different type or model from that of the first electronic device.
24. The method according to claim 22 or 23, It is characterized in that The target vertical screen device includes a mobile phone.
25. The method according to claim 20, It is characterized in that The display mode of the application interface is a horizontal screen mode, and the number of pixels included in the height of the target screen resolution is less than the number of pixels included in the width.
26. The method according to claim 25, It is characterized in that The target screen resolution is the screen resolution of the target horizontal screen device, and the target DPI is the DPI of the target horizontal screen device.
27. The method according to claim 26, It is characterized in that The target horizontal screen device includes one or more of a tablet, a personal computer PC, a smart screen, and a car screen.
28. The method according to any one of claims 20 to 27, It is characterized in that The instructing the first electronic device to create a first VD according to a target screen resolution and a target DPI according to the display mode of the application interface includes: Instruct the first electronic device to create the first VD according to at least one of the DPI of the first electronic device and the screen resolution of the second electronic device, the target screen resolution, and the target DPI according to the display mode of the application interface.
29. The method according to claim 28, It is characterized in that The ratio of the screen resolution of the first VD is the same as that of the screen resolution of the second electronic device; the DPI of the first VD is the same as that of the first electronic device.
30. The method according to claim 28 or 29, It is characterized in that Before receiving the first projection picture from the first electronic device, the method further includes: The screen resolution of the second electronic device is sent to the first electronic device.
31. The method according to any one of claims 20 to 30, It is characterized in that Before acquiring the display mode of the application interface of the first application running on the first electronic device when displayed on the second electronic device, the method further includes: Instructing the first electronic device to create a second VD according to a first screen resolution and a first DPI, wherein the first screen resolution corresponds to the first DPI, and the number of pixels included in the height of the first screen resolution is greater than the number of pixels included in the width; Receiving a second projection screen from the first electronic device, where the second projection screen is generated on the second VD according to the application interface; Display the second projection screen.
32. The method according to claim 31, It is characterized in that The display mode of the application interface is a horizontal screen mode, the target screen resolution is a second screen resolution, the target DPI is a second DPI, the second screen resolution corresponds to the second DPI, and the number of pixels included in the height of the second screen resolution is less than the number of pixels included in the width.
33. The method according to any one of claims 20 to 32, It is characterized in that After displaying the first projection screen, the method further includes: Obtaining a display mode of the application interface after the change; Instruct the first electronic device to adjust the screen resolution and DPI of the first VD according to the changed display mode of the application interface.
34. A screen projection method, It is characterized in that Applied to a first electronic device, the method includes: Creating a first VD using a target screen resolution and a target DPI according to an instruction of the second electronic device; Generating a first projection screen on the first VD according to an application interface, where the application interface is an application interface of a first application running on the first electronic device; Send the first projection screen to the second electronic device.
35. An electronic device, It is characterized in that include: A processor, a memory and a communication interface, wherein the memory and the communication interface are coupled to the processor, the communication interface is used to communicate with other devices, the memory is used to store program code, the program code includes instructions, and the processor reads the instructions from the memory so that the electronic device executes the method as described in any one of claims 1-19, or so that the electronic device executes the method as described in claim 34.
36. An electronic device, It is characterized in that include: A processor, a memory, a display screen and a communication interface, wherein the memory, the display screen and the communication interface are coupled to the processor, the communication interface is used to communicate with other devices, the memory is used to store program code, the program code includes instructions, and the processor reads the instructions from the memory so that the electronic device executes the method as described in any one of claims 20-33.
37. A computer readable storage medium, It is characterized in that The computer-readable storage medium includes a computer program, which, when executed on an electronic device, enables the electronic device to execute the method as described in any one of claims 1 to 19, or enables the electronic device to execute the method as described in any one of claims 20 to 33, or enables the electronic device to execute the method as described in claim 34.
38. A computer program product, It is characterized in that The computer program product comprises: a computer program or instructions, which, when executed on a computer, causes the computer to execute the method as claimed in any one of claims 1 to 19, or causes the computer to execute the method as claimed in any one of claims 20 to 33, or causes the computer to execute the method as claimed in claim 34.
Citation Information
Patent Citations
Display method and electronic equipment
CN112015359A
Picture processing method and device
CN113411637A
Screen projection method and electronic equipment
CN114442972A
Screen projection method and device based on vehicle-mounted terminal virtual screen, vehicle-mounted terminal equipment and vehicle
CN116204144A
Adaptive data streaming based on virtual screen size
US20160366454A1
