Screen projection method and electronic equipment
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
- CN202310703571.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-13
- Publication Date
- 2024-12-13
AI Technical Summary
In heterogeneous screen projection scenes, because the screen resolution of the virtual screen does not match the DPI, the screen projection screen displays abnormally, and the screen projection effect is poor.
By obtaining the display mode of the application interface, dynamically adjusting the resolution and DPI of the created virtual screen to correspond to the target screen resolution and DPI, thereby matching, solving the abnormal display problem of screen projection screen on the target end.
Improve the screen projection effect to ensure the accurate 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 CN119127104A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic devices, and in particular to a screen projection method and electronic devices. Background Art
[0002] 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 the source end to the destination end for display.
[0003] The current screen projection solutions include heterogeneous screen projection solutions. In heterogeneous screen projection solutions, the projection source creates a virtual screen (virtual display, VD) with the same screen resolution ratio and dots per inch (DPI) as the projection destination, and then draws the projection image on the VD and transmits it to the projection destination for display. In this solution, since the screen resolution of the VD does not match the DPI, the projection image on the projection destination may display abnormally, resulting in poor projection effect. Summary of the invention
[0004] The present application provides a screen projection method and an electronic device, which can solve the problem of abnormal display of the projection picture on the projection destination end in a heterogeneous screen projection scenario and improve the screen projection effect.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions:
[0006] 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 modes including a horizontal screen mode and a vertical screen 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.
[0007] Based on the above technical solution, the target screen resolution and target DPI for creating VD are determined according to the display mode of the application interface on the screen projection destination, so that the created VD can correspond to the display mode of the application interface. The target screen resolution corresponds to the target DPI, and 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 screen projection destination due to the possible mismatch between the screen resolution and DPI of the VD can be solved, thereby improving the projection effect.
[0008] In some embodiments, the target screen resolution and the target DPI correspond to each other, which may mean that the target screen resolution and the target DPI are the screen resolution and DPI of the same device, respectively.
[0009] 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, such as the first electronic device may determine it according to a display mode supported by the application interface.
[0010] 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. In the case where 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. In the case where the application interface supports multiple display modes, the display mode of the application interface can be one of them.
[0011] 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 according to the display mode supported by the application interface. Optionally, in this implementation, the first electronic device may also first send the display mode 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.
[0012] Optionally, the target screen resolution and the target DPI may be determined by the first electronic device according to the display mode of the application interface, or by the second electronic device according to the display mode of the application interface.
[0013] 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, so that the height of the created VD can meet the display of the application interface in the portrait mode, avoiding the situation where the height of the VD is not enough to display the application interface in the portrait mode, thereby improving the projection effect.
[0014] 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 can be 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, thereby improving the projection effect.
[0015] In one possible design, the first electronic device is a vertical screen device, the target vertical screen device is the first electronic device or the third electronic device, and the third electronic device is a vertical screen device of a different type or model from the first electronic device. It can be understood that when the first electronic device and the third electronic device are vertical screen devices of different models, the first electronic device and the third electronic device can be vertical screen devices of the same type, such as both are mobile phones, but the first electronic device is Huawei mate40, and the third electronic device is Huawei mate50, etc. When the first electronic device and the third electronic device are vertical screen devices of different types, the first electronic device can be a mobile phone, and the third electronic device can be a reader, etc.
[0016] 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 make 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.
[0017] 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 make the screen resolution and DPI of the created VD match, and 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.
[0018] In one possible design, the target vertical screen device includes a mobile phone.
[0019] In one possible design, the display mode of the application interface is landscape 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. Based on this design, when the display mode of the application interface is landscape mode, the number of pixels included in the height of the target screen resolution is less than the number of pixels included in the width, so that the width of the created VD can meet the display of the application interface in landscape mode, avoiding the situation where the display is abnormal due to the insufficient width of the VD to display the application interface in landscape mode, and improving the projection effect.
[0020] 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 can be matched. 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.
[0021] 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.
[0022] In one possible design, creating a VD according to a target screen resolution and a target DPI includes: 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, creating a VD using the DPI of a first electronic device and at least one of the screen resolution of a second electronic device, as well as the target screen resolution and the target DPI, 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, further improving 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.
[0023] 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.
[0024] In one possible design, 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. 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.
[0025] 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, so as to obtain the number of pixels included in the height of VD. 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 vertical screen mode, by ensuring the height of VD, the problem of abnormal display when the application interface displayed in vertical screen mode is projected can be greatly solved.
[0026] In one possible design, the ratio of the screen resolution of the VD is the same as the ratio of the screen resolution of the second electronic device. Based on this design, setting the ratio of the screen resolution of the VD to be the same as the ratio of the screen resolution of the projection target terminal can further improve the projection effect.
[0027] 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. Based on this design, the ratio of the screen resolution of VD can be the same as the ratio of the screen resolution of the projection destination.
[0028] 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.
[0029] In some other 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, and accordingly, the number of pixels included in the target screen resolution may refer to the number of pixels included in the first electronic device, that is, the number of pixels included in the first electronic device in a common state.
[0030] 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.
[0031] In one possible design, the DPI of the VD is the same as the DPI of the first electronic device.
[0032] In other implementations, the DPI of the VD may also be the same as the target DPI.
[0033] In a 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 horizontal screen mode. Based on this design, the display mode of the application interface of the application can be determined according to whether the application is a preset application.
[0034] 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, when 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, and then when the application interface is projected, the display abnormality problem caused by the dynamic switching of the VD size when the transparent interface is superimposed can be solved.
[0035] In one possible design, obtaining the display mode of the application interface includes: sending the display mode supported by the application interface to the 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.
[0036] 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, which 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.
[0037] In one possible design, the change in the display mode of the application interface is triggered by a user operation. Optionally, the user operation may 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 a portrait mode, and the user can perform an operation such as clicking on a full-screen play button, and in response to the operation, the display mode of the video playback interface changes to a landscape mode.
[0038] 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 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, 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.
[0039] In a possible implementation, the display mode of the application interface obtained by the second electronic device may be determined by the second electronic device, such as the second electronic device may determine it according to the display mode 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.
[0040] Optionally, the second electronic device may adopt a method such as the first electronic device determining the display mode of the application interface as described in the first aspect above, such as whether it is a preset application, determining 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, etc.
[0041] 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 by the first electronic device. For example, the first electronic device may also determine the display mode of the application interface according to the display mode supported by the application interface.
[0042] 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.
[0043] In a possible implementation, the indication information may include index information of the target screen resolution and the target DPI, and the first electronic device may obtain the index information of the target screen resolution and the target DPI from a local device or another device according to the index information. Exemplarily, the index information of the target screen resolution and the target DPI may be directly the identification information of the target screen resolution and the target DPI, or may be the device identification corresponding to the target screen resolution and the target DPI, such as the device model, etc.
[0044] In another possible implementation, the indication information may directly include the target screen resolution and the target DPI.
[0045] In a possible design, 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.
[0046] 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.
[0047] 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 from the first electronic device.
[0048] In one possible design, the target vertical screen device includes a mobile phone.
[0049] In a possible design, 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 smaller than the number of pixels included in the width.
[0050] 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 screen state), and the target DPI is the DPI of the target horizontal screen device.
[0051] 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.
[0052] In one possible design, instructing the first electronic device to create a first VD according to a target screen resolution and a target DPI according to a display mode of an application interface, including: 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.
[0053] 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.
[0054] In one possible design, the number of pixels included in the height of the first VD is determined according to 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 may 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 may be different from the number of pixels included in the height of the target screen resolution.
[0055] In one possible design, the number of pixels included in the height of the first VD satisfies the following formula: Among them, 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.
[0056] 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 may also be the same as the target DPI.
[0057] 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.
[0058] 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.
[0059] In yet other implementations, H is the number of pixels included in the target screen resolution.
[0060] 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.
[0061] 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.
[0062] 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 according to the first screen resolution and the first DPI, the first screen resolution corresponds to the first DPI, 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 a 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.
[0063] Based on this design, before obtaining the display mode of the application interface, the projection destination first instructs the projection source to create a VD using 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. 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, in view of the current situation where most application interfaces are displayed in portrait mode, creating a VD in portrait mode by default can greatly solve the problem of abnormal display when projecting an application interface displayed in portrait mode by ensuring the height of the VD.
[0064] 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 (i.e., 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 portrait mode created by default are adjusted to the screen resolution and DPI in landscape mode, which 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 screen resolution and DPI of the VD.
[0065] 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 according to 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.
[0066] 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.
[0067] It should be noted that the technical effects brought about by other designs in the above-mentioned second aspect can refer to the technical effects brought about by the corresponding designs in the first aspect, and will not be repeated here.
[0068] 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 an instruction of a second electronic device; generating a first projection screen on the first VD according to an application interface, wherein 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.
[0069] 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.
[0070] 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.
[0071] In a possible design, 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.
[0072] 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.
[0073] 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 from the first electronic device.
[0074] In one possible design, the target vertical screen device includes a mobile phone.
[0075] In a possible design, 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 smaller than the number of pixels included in the width.
[0076] 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 screen state), and the target DPI is the DPI of the target horizontal screen device.
[0077] 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.
[0078] In one possible design, creating a first VD using a target screen resolution and a target DPI according to an instruction of a 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 the target DPI according to an instruction of the second electronic device.
[0079] 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.
[0080] In one possible design, the number of pixels included in the height of the first VD is determined according to 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 may 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 may be different from the number of pixels included in the height of the target screen resolution.
[0081] In one possible design, the number of pixels included in the height of the first VD satisfies the following formula: Among them, 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.
[0082] 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 may also be the same as the target DPI.
[0083] 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.
[0084] 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.
[0085] In yet other implementations, H is the number of pixels included in the target screen resolution.
[0086] 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.
[0087] 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.
[0088] 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 the 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, 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 (i.e., 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.
[0089] 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 (i.e., the screen resolution of the target landscape device in the landscape state).
[0090] 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 instruction of the second electronic device. Optionally, the change of the display mode of the application interface can be triggered by a user operation.
[0091] In a fourth aspect, an electronic device is provided, which has the function of implementing the method described in the first aspect, the second aspect, or the third aspect and any one of the designs thereof. 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 functions.
[0092] 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.
[0093] 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.
[0094] Optionally, the electronic device may further include a display screen, and the display screen is used to support the electronic device to perform display operations.
[0095] In a 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 and any one of the designs thereof.
[0096] 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.
[0097] In the seventh aspect, a computer-readable storage medium is provided, the computer-readable storage medium comprising a computer program, and 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 one of the designs thereof.
[0098] In an eighth aspect, a computer program product is provided, the computer program product comprising: a computer program or instructions, when the computer program or instructions are run on a computer, the computer executes the method described in the first aspect, the second aspect, or the third aspect and any one of the designs thereof.
[0099] 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 at least one processor, and 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.
[0100] 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.
[0101] 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
[0102] Figure 1 A schematic diagram of a scenario of an existing heterogeneous screen projection solution;
[0103] Figure 2 A schematic diagram of an electronic device provided in an embodiment of the present application;
[0104] Figure 3 Interface diagram provided for the embodiment of the present application Figure 1 ;
[0105] Figure 4 A schematic diagram of the architecture of a communication system provided in an embodiment of the present application;
[0106] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0107] Figure 6 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application;
[0108] Figure 7 A software structure block diagram of an electronic device provided in an embodiment of the present application;
[0109] Figure 8 A flowchart of a screen projection method provided in an embodiment of the present application;
[0110] Fig. 9 Interface diagram provided for the embodiment of the present application Figure 2 ;
[0111] Fig.10 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application;
[0112] Fig.11a Interface diagram provided for the embodiment of the present application Figure 3 ;
[0113] Fig.11b Interface diagram provided for the embodiment of the present application Figure 4 ;
[0114] Fig.11c Interface diagram provided for the embodiment of the present application Figure 5 ;
[0115] Fig.12 Interface diagram provided for the embodiment of the present application Figure 6 ;
[0116] Fig.13 A flowchart of another screen projection method provided in an embodiment of the present application;
[0117] Fig.14A flowchart of another screen projection method provided in an embodiment of the present application;
[0118] Fig.15 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application;
[0119] Fig.16 A schematic diagram of the structure of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0120] The technical solution provided by the embodiments of the present application is described in detail below in conjunction with the accompanying drawings.
[0121] The terms "including" and "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 device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0122] It should be noted that, in the embodiments of the present 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 the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0123] In the description of this application, unless otherwise specified, the meaning of "plurality" refers to two or more. "And / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0124] In the embodiment of the present application, the electronic device that projects the projection screen can be referred to as the projection source end, and the electronic device that receives the projection of the projection source end and displays the projection screen can be referred to as the projection destination end. In some scenarios, such as but not limited to the mirror projection scenario, the projection screen can be an interface displayed on the projection source end. In other scenarios, such as but not limited to the super desktop projection scenario, the projection screen can be an interface that is not displayed on the projection source end.
[0125] The current screen projection solutions include the same-source screen projection solution and the heterogeneous-source screen projection solution. 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.
[0126] It can be understood that in the embodiments of the present application, the screen resolution may refer to the number of pixels (pix, P) displayed on the screen. In general, the screen resolution may be expressed as "vertical pixel number × horizontal pixel number", or may be expressed as "number of pixels displayed in height × number of pixels displayed in width". For example, if the screen resolution is "1920P × 1080P", it means that the number of pixels displayed in height of the screen is 1920 and the number of pixels displayed in width is 1080.
[0127] The screen resolution ratio can refer 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 in the height of the screen to the number of pixels displayed in the width. For example, if the screen resolution is "1920P×1080P", the screen resolution ratio can be expressed as "1920:1080".
[0128] DPI refers to the number of pixels per inch of image length, which can be understood as pixel density.
[0129] For example, take the screen projection source end as the mobile phone 100 and the screen projection destination end as the smart screen 200. Figure 1 A schematic diagram of a scenario of an existing heterogeneous screen projection solution is shown. Figure 1 As shown, the interface of application A can be displayed on the mobile phone 100, wherein 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, etc.
[0130] In the embodiment of the present application, whether a device is a horizontal screen device or a vertical screen device can be determined according to the normal use state of the device (or the default use state, or the commonly used use state). If the normal use state of a device is the vertical screen state, then the device is a vertical screen device. If the normal use state of a device is the horizontal screen state, then the device is a horizontal screen device.
[0131] In some embodiments, whether a device is a horizontal screen device or a vertical screen device can be determined based on the type of the device. For example, vertical screen devices can include but are not limited to mobile phones and other device types, and horizontal screen devices can include but are not limited to one or more device types of tablets, personal computers (PCs), smart screens, and car screens.
[0132] In some embodiments, if a device is used as a target device (such as a target landscape device, a target portrait device, etc.), the width, height, screen resolution, screen resolution ratio, etc. of the device are the width, height, screen resolution, screen resolution ratio, etc. of the device in a normal use state. Among them, a target device in a portrait state in a normal use state is called a target portrait device, and a target device in a landscape state in a normal use state is called a target landscape device. For an introduction to the target device, please refer to the following description.
[0133] 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.
[0134] In this embodiment, for example, if a device is classified as a portrait device, 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 portrait mode. Figure 1 The mobile phone 100 shown is classified as a vertical screen device. The normal usage state of the mobile phone 100 is Figure 1 Taking the vertical screen state shown in the figure as an example, Figure 1 , Figure 2 The width, height, screen resolution, screen resolution ratio, etc. of the mobile phone 100 in the use state shown in the figure are Figure 1 The width and height in the vertical screen state are shown as follows: Figure 1 The long side of the mobile phone 100 shown is the height of the mobile phone 100 , and the short side is the width of the mobile phone 100 .
[0135] For another example, if a device is classified as a landscape device, 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 landscape mode.
[0136] In other embodiments, if a device is used as a screen projection destination, the width, height, screen resolution, screen resolution ratio, etc. of the device are the width, height, screen resolution, screen resolution ratio, etc. of the device in the current use state. For example, if the current use state of a device is the landscape state, the width, height, screen resolution, screen resolution ratio, etc. of the device are the width, height, screen resolution, screen resolution ratio, etc. in the landscape state. If the current use state of a device is the portrait state, the width, height, screen resolution, screen resolution ratio, etc. of the device are the width, height, screen resolution, screen resolution ratio, etc. in the portrait state.
[0137] In this embodiment, for example: Figure 1 The current use state of the mobile phone 100 shown is the vertical screen state, for example, the width, height, screen resolution, screen resolution ratio, etc. of the mobile phone 100 are Figure 1 The width, height, screen resolution, screen resolution ratio, etc. in the vertical screen state are shown. Figure 1 The mobile phone 100 shown has a long side as its height and a short side as its width. Figure 2 The current use state of the mobile phone 100 shown is the horizontal screen state, for example, the width, height, screen resolution, screen resolution ratio, etc. of the mobile phone 100 are Figure 2 The width, height, screen resolution, screen resolution ratio, etc. in the horizontal screen state are shown. Figure 2 The illustrated mobile phone 100 has a shorter side being the height and a longer side being the width.
[0138] Another example: Figure 1 The current use state of the smart screen 200 shown is the horizontal screen state. For example, the width, height, screen resolution, screen resolution ratio, etc. of the smart screen 200 are Figure 1 The width, height, screen resolution, screen resolution ratio, etc. in the horizontal screen state are shown. Figure 1 The short side of the smart screen 200 shown is high and the long side is wide.
[0139] 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 and screen resolution of the device in the current use.
[0140] For example: Figure 2The mobile phone 100 shown is used as both a target device and a screen projection destination. The normal usage state of the mobile phone 100 is Figure 1 The vertical screen state shown is currently in use. Figure 2 As an example, when the horizontal screen state is Figure 2 When the width, height, screen resolution, screen resolution ratio, etc. of the mobile phone 100 shown are used to determine the height of the VD, Figure 2 The width, height, screen resolution, screen resolution ratio, etc. of the mobile phone 100 shown are Figure 1 The width, height, screen resolution, screen resolution ratio, etc. in the vertical screen state are shown; when Figure 2 When the width, height, screen resolution, screen resolution ratio, etc. of the mobile phone 100 shown are used to determine the width of the VD, Figure 2 The width, height, screen resolution, screen resolution ratio, etc. of the mobile phone 100 shown are Figure 2 The width, height, screen resolution, screen resolution ratio, etc. in horizontal mode are shown.
[0141] Exemplarily, the display mode corresponding to the interface of the application may include a landscape mode and / or a 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.
[0142] Optionally, if an application interface supports both landscape mode and portrait mode, the display mode of the interface may be set to landscape mode or portrait mode. Figure 1 As shown in FIG. 1 , if the interface of application B is set to landscape mode, the interface of application B is drawn in VD in the form of full landscape. If the interface of application B is set to portrait mode, the interface of application B is drawn in VD in the form of vertical center. After drawing is completed, the mobile phone 100 can transmit the drawn data to the smart screen 200 for display. Similarly, Figure 1 As shown, the smart screen 200 can display the projected image in a full horizontal screen format or in a centered vertical screen format.
[0143] In the above-mentioned heterogeneous screen projection scheme, 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.
[0144] For ease of understanding, the following example is taken as an example where the screen projection source is a mobile phone 100 and the screen projection destination is a smart screen 200. Figure 3 As shown in the figure, 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. Figure 3 As shown in (1), the resolution of the video interface 101 displayed on the mobile phone 100 is "1920P×1080P". Figure 3 As shown in (2), the resolution of the financial management interface 102 displayed on the mobile phone 100 is also "1920P×1080P".
[0145] Combined 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, 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.
[0146] Assumptions Figure 3 The video interface 101 shown in (1) and Figure 3 The display mode of the financial management interface 102 shown in (2) is the portrait mode. 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: various abnormal problems such as overlapping and missing content in the projection screen, and the projection effect is poor.
[0147] like Figure 3 As shown in (1), after the mobile phone 100 projects the video interface 101 to the smart screen 200, the smart screen displays the projected screen 201. The projected screen 201 is missing content relative to the video interface 101. Figure 3 As shown in (2), after the mobile phone 100 projects the financial management interface 102 to the smart screen 200, the smart screen displays the projected screen 202. The content in the projected screen 202 overlaps.
[0148] Based on this, an embodiment of the present application provides a screen projection method, which can be applied to a scenario where a screen projection source end projects a screen projection image to a screen projection destination end when multiple electronic devices are used in coordination. This method can solve the problem of abnormal display of the screen projection image on the screen projection destination end in a heterogeneous screen projection scenario, and improve the screen projection effect.
[0149] For example, Figure 4 The schematic diagram of the architecture of a communication system for applying a screen projection method provided in an embodiment of the present application is shown. Figure 4 As shown, the communication system 400 includes a first electronic device 401 and at least one second electronic device 402 ( Figure 4 Only 2 are shown).
[0150] The first electronic device 401 and the second electronic device 402 can establish a connection through wired communication technology and / or 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: distributed soft bus, near field communication (NFC), Bluetooth (BT) (for example, traditional Bluetooth or low energy (BLE) Bluetooth), wireless local area network (WLAN) (such as wireless fidelity (Wi-Fi) network), Zigbee, frequency modulation (FM), infrared (IR), etc.
[0151] In some embodiments, both the first electronic device 401 and the second electronic device 402 support a proximity discovery function. Exemplarily, after 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, a Bluetooth connection, etc. After the wireless communication connection is established, the first electronic device 401 and the second electronic device 402 can implement signal interaction through the wireless communication connection.
[0152] 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.
[0153] In some embodiments, the first electronic device 401 and the second electronic device 402 establish a wireless communication connection through a cellular network, the Internet, etc. For example, the second electronic device 402 accesses the Internet through a router, and the first electronic device 401 accesses the Internet through a cellular network; then, the first electronic device 401 and the second electronic device 402 establish a wireless communication connection.
[0154] After the first electronic device 401 is connected to the second electronic device 402, the projection source in the first electronic device 401 and the second electronic device 402 can project the projection screen onto the display screen of the projection destination for display. For example, taking the first electronic device 401 as the projection source and the second electronic device 402 as the projection destination for example, the first electronic device 401 can project the projection screen onto the display screen of the second electronic device 402 for display.
[0155] 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.
[0156] 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, 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 in 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 the electronic device or the installed operating system.
[0157] in, Figure 4 In the figure, the first electronic device 401 is a mobile phone, and the second electronic device 402 is a tablet computer and a smart screen.
[0158] In the embodiment of the present application, the electronic device is taken as a mobile phone as an example. Figure 5 , is a structural diagram of a mobile phone provided in an embodiment of the present application.
[0159] 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.
[0160] 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 processor (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), etc. Different processing units may be independent devices or integrated into one or more processors.
[0161] 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.
[0162] The processor 510 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 510 is a cache memory. The memory may store instructions or data that the processor 510 has just used or cyclically used. If the processor 510 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 510, and thus improves the efficiency of the system.
[0163] In some embodiments, processor 510 may include one or more interfaces.
[0164] The charging management module 540 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.
[0165] 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 power the processor 510, the internal memory 521, the display screen 594, the camera 593, and the wireless communication module 560.
[0166] 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.
[0167] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
[0168] The mobile communication module 550 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to 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 functional modules of the mobile communication module 550 may be arranged in the processor 510. In some embodiments, at least some functional modules of the mobile communication module 550 may be arranged in the same device as at least some modules of the processor 510.
[0169] 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 (IR), etc. The wireless communication module 560 can be one or more devices integrating at least one communication processing module.
[0170] In some embodiments, the antenna 1 of the mobile phone is coupled to the mobile communication module 550, and the antenna 2 is coupled to the wireless communication module 560, so that the mobile phone can communicate with the network and other devices through wireless communication technology. The wireless communication technology 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.
[0171] In some embodiments of the present application, the mobile communication module 550 and / or the 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 the 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 the wireless communication module 560 may be further used to receive the projection screen from the projection source end.
[0172] The mobile phone realizes display functions through a GPU, a display screen 594, and an application processor.
[0173] The display screen 594 is used to display images, videos, etc. The display screen 594 includes a display panel. In some embodiments, the mobile phone may include 1 or N display screens 594, where N is a positive integer greater than 1. In some embodiments of the present application, the display screen 594 may be used to display a projection screen.
[0174] The mobile phone can realize the shooting function through the ISP, the camera 593, the video codec, the GPU, the display 594 and the application processor.
[0175] 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.
[0176] 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.
[0177] The mobile phone can implement audio functions through the audio module 570 and an application processor.
[0178] 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.
[0179] The buttons 590 include a power button, a volume button, etc. The buttons 590 may be mechanical buttons or touch buttons.
[0180] Motor 591 can generate vibration prompts.
[0181] Indicator 592 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0182] The SIM card interface 595 is used to connect a SIM card.
[0183] It is understandable 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. Figure 5 Another exemplary structure of the electronic device provided by the embodiment of the present application is shown. Figure 6As shown, 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 Wi-Fi, Bluetooth, or other communication protocols.
[0184] In some other embodiments of the present application, the electronic device may include Figure 5 , Figure 6 More or fewer components are shown, or some components are combined, or some components are separated, or different component arrangements are arranged. The components shown in the figure can be implemented in hardware, software, or a combination of software and hardware.
[0185] In some embodiments, the software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the layered architecture as an example to exemplify the software structure of the electronic device.
[0186] Figure 7 A software structure block diagram of an electronic device provided in an embodiment of the present application is shown.
[0187] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the electronic devices, such as the first electronic device and the second electronic device, may include an application layer and a system service layer.
[0188] The application layer includes a series of application packages. Figure 7 As shown, 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 may be the same or different. Figure 7 Take the same as an example.
[0189] In some embodiments of the present application, one or more icons of other applications (such as but not limited to the above-mentioned video application, WLAN, etc.) may be displayed on the running interface of the desktop application of the first electronic device and the second electronic device (referred to as the desktop). The application icon can be used to start the running interface of the corresponding application.
[0190] 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 the screen projection operation performed by the user. For example, in the super desktop projection scenario, the first electronic device and the second electronic device can build a super terminal, that is, the desktop of the first electronic device can build 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 screen projection operation can be performed directly on the desktop of the second electronic device, such as clicking the icon of the application included in the synchronized first electronic device on the desktop of the second electronic device.
[0191] 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.
[0192] 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 management (distribute 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.
[0193] 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. For example, 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.
[0194] In some embodiments, the system service layer of the first electronic device may also 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 information of the application interface, such as including but not limited to sending configuration information of the application interface to the 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.
[0195] 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 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.
[0196] 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.
[0197] 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.
[0198] 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.
[0199] 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. For example, 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.
[0200] Understandably, Figure 7 The layers shown are only exemplary. In actual applications, the electronic device may include more or fewer layers. Figure 7 The division of the levels and the modules included in each level are only exemplary and do not constitute a limitation of the present application. In practical applications, there may be other division methods, and each module may be located at a different level, or different modules may be integrated into one module, etc., and the present application does not limit this.
[0201] The technical solutions involved in the following embodiments can all be used in a Figure 5 , Figure 6 , Figure 7 The device of the structure shown in the above, and Figure 4 Appears in a system with the architecture shown.
[0202] It is understandable that in the embodiments of the present application, the electronic device, 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, and these steps or operations are only 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 different orders 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.
[0203] The following uses the example that the first electronic device is a mobile phone and the second electronic device is a smart screen to introduce the screen projection method provided in the embodiments of the present application in detail.
[0204] For example, Figure 8 FIG. 1 is a flow chart of a screen projection method provided in an embodiment of the present application. Figure 8 As shown, the method comprises the following steps:
[0205] S801. Establish a connection between the mobile phone and the smart screen.
[0206] There are many 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.
[0207] In some other embodiments, the mobile phone can establish a connection with the smart screen 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 capability.
[0208] 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 logged into the electronic device. The account number logged into the electronic device may be an account number provided by the operator to the user, such as a Huawei account number. The account number logged into the electronic device may also be an application account number, such as a social application account number, a video application account number, etc.
[0209] The transmission capability of an electronic device may be a near-field communication capability or a long-distance communication capability. In other words, 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 touch the NFC tag of a smart screen with a mobile phone. 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.
[0210] For another example, both the mobile phone and the smart screen have turned on the Bluetooth function and the Wi-Fi function. 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.
[0211] 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.
[0212] S802. The mobile phone receives a screen projection operation.
[0213] Among them, the screen projection operation can be used to project the projection screen onto the smart screen for display. Exemplarily, the projection screen can include any application interface on the mobile phone side. The projection screen 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.
[0214] In some embodiments, the screen projection operation may be received by a mobile phone. Figure 8 Take this as an example.
[0215] As a possible example, the user can perform the screen projection operation through an application with a screen projection function in the mobile phone. For example, the application with a screen projection function is a video application. Fig. 9 As shown in (1), the mobile phone can display a playback interface 900 of a video application, wherein a screen projection button 901 is displayed in the playback interface 900, and the user can perform a screen projection operation through the screen projection button 901. For example, the screen projection operation can be an operation such as clicking the screen projection button 901.
[0216] As another possible example, the user may also perform the screen projection operation through the screen projection function included in the mobile phone. Fig. 9 As shown in (2), 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 a screen projection operation through the wireless screen projection button 911. For example, the screen projection operation can be, for example, a click operation on the screen projection button 911. Optionally, the control center may also include one or more other function buttons, such as WLAN, mobile data, Bluetooth, etc., and these function buttons will not be described in detail in this application.
[0217] 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.
[0218] In other embodiments, the screen projection operation can be received by a smart screen.
[0219] 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 method of building a super desktop with a mobile phone and a smart screen. After the mobile phone and the smart screen build a super desktop, the desktop of the smart screen can display icons of one or more applications installed in the mobile phone. For example, Fig. 9 As shown in (3), the smart screen can display a desktop 920, which includes icons of one or more applications installed in the mobile phone, such as an icon of a video application, an icon of a weather application, etc. The screen projection operation can be, for example, an operation performed on the desktop 920 to start an application installed in the mobile phone, such as clicking on the icon 921 of the video application.
[0220] 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.
[0221] 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.
[0222] S803. In response to the screen projection operation, the mobile phone creates a VD according to the display mode of the projection screen.
[0223] It can be 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.
[0224] Exemplarily, the display mode of the projected image may include but is not limited to a horizontal mode or a vertical mode.
[0225] In some embodiments, the projection screen may only support one display mode, such as landscape mode or portrait mode. At this time, the display mode of the projection screen described in step S803 can be determined according to the display mode supported by the projection screen. For example: If the display mode supported by the projection screen is landscape mode, it can be determined that the display mode of the projection screen described in step S803 is landscape mode. For another example: If the display mode supported by the projection screen is portrait mode, it can be determined that the display mode of the projection screen described in step S803 is portrait mode.
[0226] 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 according to the interface stack to which the projection screen belongs. Figure 7 The specific implementation described. 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. Or, 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.
[0227] In some other embodiments, if the application to which the projection screen belongs is in the whitelist, it can be determined that the display mode of the projection screen is the horizontal screen mode. Among them, the whitelist includes one or more applications whose interfaces support horizontal screen display. Optionally, the whitelist can be stored in a mobile phone or in other devices (such as a smart screen). This application does not impose any restrictions on the storage location of the whitelist.
[0228] Optionally, the display mode of the projection screen can be determined by the mobile phone, or by other devices (such as smart screens), and then notified to the mobile phone. This application does not make specific limitations on this. Optionally, the mobile phone or other device can determine the display mode of the projection screen according to the display modes supported by the projection screen and one or more of the methods described in the above embodiments.
[0229] 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.
[0230] 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 different models, or the same model, or different types of portrait devices as the mobile phone at the projection source. 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 application interface of the projection source with different screen resolutions can be projected to the same projection destination, and the display effect is consistent with the display effect of each projection source.
[0231] For example, Fig.10 As shown in (1), the other vertical screen devices may include but are not limited to various vertical screen devices such as mobile phone 1001 and folding screen mobile phone 1002. Exemplarily, 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.
[0232] In other embodiments, if the display mode of the projection screen is a horizontal screen mode, it can be determined that the target device is a horizontal screen device. Optionally, the horizontal screen device can be a smart screen as the projection destination, or other horizontal screen devices.
[0233] Among them, when the horizontal screen device is the aforementioned smart screen, that is, the smart screen is used as both the target device and the screen projection destination, when the height of VD is determined by the height of the smart screen (or the number of pixels included in the height of the screen resolution) according to the following formula 1, formula 3, etc., the height of the smart screen is the height in the normal use state. When the width of VD is determined by the width (or the number of pixels included in the width of the screen resolution) and height of the smart screen according to the following formula 2, formula 4, etc., the width and height of the smart screen are the width and height in the current use state.
[0234] For example: Figure 1 The smart screen 200 shown in the figure is in normal use. Figure 1 The horizontal screen state shown is currently in use. Figure 1 Taking the vertical screen state of the smart screen 200 shown in the figure after rotating 90 degrees to the left as an example, when the height of VD is determined by using the height of the smart screen 200 according to the following formulas 1 and 3, the height of the smart screen 200 is Figure 1 The height in the horizontal screen state shown is the short side of the smart screen 200. When the width of VD is determined by the width and height of the smart screen 200 according to the following formula 2, formula 4, etc., the width and height of the smart screen 200 are the width and height in the vertical screen state, that is, the short side of the smart screen 200 is the width and the long side is the height.
[0235] For example, Fig.10 As shown in (2), the horizontal screen device may include, but is not limited to, various forms of horizontal screen devices such as a television 1011, a laptop computer 1012, and a tablet computer 1013. Exemplarily, the screen resolution of the horizontal screen device may also be a standard screen resolution specified by the current protocol or future protocol, such as "768P×1024P", "768P×1366P", "1080P×1920P", "2160P×3840P", etc.
[0236] 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.
[0237] 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 of the target device, and the DPI of the mobile phone, the screen resolution of the created VD can be matched with the DPI, thereby solving the problem of abnormal display of the projection 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 height of the VD and the DPI, and improving the projection effect.
[0238] In this implementation, as a possible example, the screen resolution of the VD can be determined according to Formula 1 and Formula 2.
[0239]
[0240] Wherein, 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.
[0241]
[0242] Among them, 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, if the screen resolution of a mobile phone is "1920P×1080P", the DPI is 360, the resolution of the projection screen displayed in portrait mode is also "1920P×1080P", the screen resolution of a portrait device is "1280P×720P", the DPI is 180, and the screen resolution of a smart screen is "900P×1600P". According to the above formulas 1 and 2, it can be calculated that the screen resolution of the VD is approximately "2560P×4550P".
[0244] For example, if the screen resolution of a mobile phone is "1920P×1080P", the DPI is 360, the resolution of the projection screen displayed in landscape mode is "1080P×1920P", the screen resolution of a landscape device is "768P×1024P", the DPI is 180, and the screen resolution of a smart screen is "900P×1600P". According to the above formulas 1 and 2, the screen resolution of the VD can be calculated to be "1536P×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 matched with 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.
[0248] H1=h2 Formula 3
[0249] 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.
[0250]
[0251] 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.
[0252] 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.
[0253] 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.
[0254] In other implementations, after the screen resolution and DPI of the VD are obtained according to the above implementation, the screen resolution and DPI may be simultaneously enlarged by the same ratio and then used as the screen resolution of the VD.
[0255] In some scenarios, when the projection screen supports both landscape mode and portrait mode, when projecting, if the display mode used by the projection screen is set to a display mode different from that of the previous projection screen, then when creating a VD according to 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.
[0256] 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.
[0257] For example, Fig.11a(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 following Fig.11a The interface shown in (2).
[0258] Then the phone will project the current screen to the smart screen for display. Fig.11a (3) shows a schematic diagram of a 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.
[0259] It can be understood that since the screen resolution of the VD created according to the projection screen in the portrait mode is greater than the screen resolution of the VD created according to the projection screen in the landscape mode, Fig.11a The screen resolution of the VD shown in (1) should be smaller than Fig.11a (3) The screen resolution of the VD shown.
[0260] Then, after the mobile phone projects the pop-up window 1102 to the smart screen, the smart screen can display the following Fig.11a The interface of (4) in the figure. Fig.11a As shown in (4), since the screen resolution of the created VD has changed relative to the previous projection frame, and the background of the pop-up window 1102 is transparent, display abnormalities such as black edges may occur.
[0261] Therefore, in the above embodiment, when the projection screen supports both the horizontal mode and the vertical mode, 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 dynamic switching of the VD size when the transparent interface is superimposed can be solved.
[0262] Exemplary, combined Fig.11a In the example shown, 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, Fig.11b (1) shows a schematic diagram of the mobile phone drawing the pop-up window 1102 on the VD. Later, after the mobile phone projects the pop-up window 1102 to the smart screen, the smart screen can display the following Fig.11b The interface shown in (2) in the figure. It can be seen that the projection image displayed by the smart screen is normal without any black edges.
[0263] S804. The mobile phone generates a projection screen according to the VD.
[0264] 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, generate the projection screen. Figure 3 The video interface 101 shown in FIG. 101 is a video interface 101 shown in FIG. 101 , and the VD created based on the projection screen is as follows: Fig.11c As shown in (1), the VD with the projection screen can be drawn as follows Fig.11c As shown in (2) in the figure. The display mode of the projection screen is horizontal screen mode, and the projection screen is also Figure 3 The video interface 101 shown in FIG. 101 is a video interface 101 shown in FIG. 101 , and the VD created based on the projection screen is as follows: Fig.11c As shown in (3), the VD with the projection screen can be drawn as follows Fig.11c As shown in (4).
[0265] S805: The mobile phone sends the projection screen to the smart screen. Correspondingly, the smart screen receives the projection screen from the mobile phone.
[0266] S806. The smart screen displays the projection image.
[0267] In some embodiments, the smart screen can directly display the projected image on the screen. In other embodiments, in order 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.
[0268] Exemplary, combined Fig.11c In the example shown in (2), the projection screen displayed on the smart screen can be as follows Fig.12 The projection screen 1200 shown in (1) is combined with Fig.11c In the example shown in (3), the projection screen displayed on the smart screen can be as follows Fig.12 The projection screen 1210 shown in (2).
[0269] 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.
[0270] Combine the following Figure 7 The architecture shown is a specific embodiment. Fig.13 FIG. 2 shows a flow chart of another screen projection method provided in an embodiment of the present application. Fig.13 As shown, the method comprises the following steps:
[0271] S1301. The desktop application of the smart screen receives the screen projection operation.
[0272] For the introduction of the screen projection operation in step S1301, please refer to the relevant introduction of step S801 mentioned above.
[0273] 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.
[0274] In some embodiments, the relevant information of the projected screen can be used to display the projected screen on the display screen of the smart screen. Exemplarily, the relevant information of the projected screen may include, but is not limited to, the identification of the projected screen, and one or more of the identification (identity, ID) of the display device (display). The identification of the projected screen can be used by the mobile phone to determine which application interface to use as the projected screen, and / or which application the mobile phone uses as the projected application, etc. Exemplarily, the identification of the projected screen may include, but is not limited to, the package name of the application corresponding to the projected screen, or the identification of the projected screen (such as activity name), etc. For example, the smart screen can determine the identification of the projected screen based on the projection operation, or it can also determine the identification of the projected screen by other means.
[0275] Optionally, different projection destinations may correspond to different 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 above projection image may include the display ID, so that the projection source can determine the corresponding projection destination according to the display ID of the projection destination.
[0276] In other scenarios, a screen projection source may only establish a connection with one screen projection destination. In this scenario, the above-mentioned screen projection information may not include the display ID.
[0277] 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.
[0278] 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 additionally, which can reduce the system power consumption of the projection source or the projection destination during the projection process.
[0279] It can be understood that step S1303 uses the screen resolution and DPI of the vertical screen device to determine the screen resolution of the VD by default. In other embodiments, the screen resolution and DPI of the horizontal screen device can also be used by default to determine the screen resolution of the VD. In this way, for the projection screen displayed in the horizontal screen mode, there is no need to adjust the screen resolution of the VD additionally, and the system power consumption of the projection source or the projection destination during the projection process can also be reduced.
[0280] In this way, by setting the default VD screen resolution as mentioned above, the parameters of changes in 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 system at the source or destination of the screen projection.
[0281] 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, and the embodiment of the present application does not specifically limit this. Of course, in other embodiments, the default VD screen resolution may not be set.
[0282] S1304. The projection management module of the smart screen sends projection parameters to the projection management module of the mobile phone. Correspondingly, the projection management module of the mobile phone receives the projection parameters from the smart screen.
[0283] 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.
[0284] In other embodiments, when the above step S1303 is implemented as the screen resolution, DPI, etc. of the horizontal screen device are used by default to determine the screen resolution of the VD, in step S1304, 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 horizontal screen device.
[0285] It can be understood that the above embodiment is based on the example that the screen resolution, DPI, etc. of the vertical screen device does not exist on the mobile phone side, and / or the screen resolution, DPI, etc. of the horizontal screen device does 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 screen resolution, DPI of the vertical screen device, or the screen resolution, DPI of the horizontal screen device may not be included in the above projection parameters.
[0286] S1305. The screen projection management module of the mobile phone creates a VD according to the screen projection parameters.
[0287] In some embodiments, the screen projection management module of the mobile phone can determine the screen resolution of the VD according to the DPI and screen projection parameters of the mobile phone, and then create the VD. For the specific implementation of this step, please refer to Figure 8 The relevant implementation of step S803.
[0288] 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.
[0289] S1306. The projection management module of the smart screen sends relevant information of the projection screen to the projection management module of the mobile phone. Correspondingly, the projection management module of the mobile phone receives relevant information of the projection screen from the projection management module of the smart screen.
[0290] 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.
[0291] Optionally, relevant information of the projection screen may 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.
[0292] S1307. The screen projection management module of the mobile phone sends relevant information of the screen projection image to the AMS of the mobile phone.
[0293] S1308. The AMS of the mobile phone starts the screen projection application.
[0294] 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.
[0295] In some embodiments, after the mobile phone executes step S1308, the mobile phone can also generate a projection screen according to 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, such as Fig.12 Then, when executing step S1311, if the display mode of the projection screen is not the vertical mode, the smart screen will Fig.12 The vertical screen center display mode shown in (1) is converted to a horizontal screen full display mode for the projection screen, such as Fig.12 The interface shown in (2).
[0296] 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.
[0297] Exemplarily, 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.
[0298] In some embodiments, the configuration information of the projection screen may be used to draw the projection screen on the VD.
[0299] S1310, the screen projection management module of the mobile phone sends the display mode of the projection screen to the screen projection management module of the smart screen. Correspondingly, the screen projection management module of the smart screen receives the display mode of the projection screen from the screen projection management module of the mobile phone.
[0300] 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, other modules of the mobile phone may also determine which display mode the projection screen is set to. Taking the AMS module as an example, the configuration information may include the display mode of the projection screen after setting.
[0301] Optionally, step S1310 is an example in which the mobile phone determines the display mode of the projection screen and then sends the determined display mode of the projection screen to the smart screen. The mobile phone can also directly send the display mode supported by the projection screen to the smart screen, and the smart screen determines the display mode of the projection screen.
[0302] S1311. The projection management module of the smart screen determines whether the display mode of the projection image is vertical mode.
[0303] If yes, no processing is performed, or step S1317 and subsequent steps are executed. If no, step S1312 and subsequent steps are executed.
[0304] 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.
[0305] S1312. The projection management module of the smart screen determines to adjust the screen resolution of the VD.
[0306] 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.
[0307] S1313. The screen projection management module of the smart screen sends the screen projection parameters to the screen projection management module of the mobile phone.
[0308] In some embodiments, the screen projection parameters may be used to instruct the mobile phone to adjust the screen resolution of the VD.
[0309] In some embodiments, when the screen resolution, DPI, etc. of the vertical screen device are used by default to determine the screen resolution of the VD 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 horizontal screen device.
[0310] 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.
[0311] In other embodiments, the projection management module of the smart screen may not execute step S1313. For example: after the mobile phone receives the projection parameters described in step S1303, the projection parameters are cached, or the screen resolution, DPI of the horizontal screen device, the screen resolution, DPI of the vertical screen device, etc. are stored on the mobile phone side, then the projection management module of the smart screen may not execute step S1313. Optionally, the smart screen can directly instruct the mobile phone to adjust the screen resolution of the VD through other messages.
[0312] It can be understood that steps S1310 to S1313 are 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 the screen projection management module of the mobile phone obtains the display mode of the projection screen, it directly determines whether the screen resolution of the VD needs to be adjusted according to the display mode, and then determines whether to recreate the VD.
[0313] S1314. The screen projection management module of the mobile phone creates a VD according to the screen projection parameters.
[0314] It can be 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 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 Figure 8 The relevant implementation of step S803.
[0315] S1315. The AMS of the mobile phone sends the configuration information of the projection screen to the WMS of the mobile phone. Correspondingly, the WMS of the mobile phone receives the configuration information from the AMS of the mobile phone.
[0316] 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.
[0317] S1316. The WMS of the mobile phone draws the projection screen on the VD according to the configuration information of the projection screen.
[0318] In some embodiments, if the display mode of the projection screen is horizontal mode, the WMS of the mobile phone can draw the projection screen horizontally over the VD, such as Fig.11c The display method shown in (4) in the figure.
[0319] In other embodiments, if the display mode of the projection screen is a vertical screen mode, the WMS of the mobile phone can draw the projection screen vertically centered on the VD, such as Fig.11c The display method shown in (2) in the figure.
[0320] The mobile phone can then transmit the projected image to the smart screen for display.
[0321] In some screen projection scenarios, after the projection screen is projected to the smart screen, the display mode of the projection screen may change. At this time, the screen resolution of the VD can also be readjusted according to the changed display mode of the projection screen. Optionally, the change in the display mode of the projection screen can be triggered by user operation, or it can be triggered by other methods, such as automatic triggering by the application.
[0322] Therefore, take the case where the display mode of the projection screen is switched from the horizontal mode to the vertical mode as an example. Fig.13 The method shown may also include the following steps:
[0323] S1317. The screen projection application requests the mobile phone's AMS to display the projection screen in landscape mode.
[0324] S1318. The AMS of the mobile phone sends the display mode of the projection screen to the projection screen management module of the mobile phone. Correspondingly, the projection screen management module of the mobile phone receives the display mode of the projection screen from the AMS of the mobile phone.
[0325] For example: in step S1318, the display mode of the projection screen is horizontal screen mode.
[0326] S1319, the screen projection management module of the mobile phone sends the display mode of the projection screen to the screen projection management module of the smart screen. Correspondingly, the screen projection management module of the smart screen receives the display mode of the projection screen from the screen projection management module of the mobile phone.
[0327] It can be understood that the display mode of the projection screen described in step S1318 and step S1319 refers to the display mode of the projection screen after the change.
[0328] S1320. The projection management module of the smart screen determines to adjust the screen resolution of the VD.
[0329] In some embodiments, after receiving the display mode of the projected screen, the projection management module of the smart screen can determine that the display mode of the projected screen has changed, and then execute step S1320.
[0330] In other embodiments, after receiving the display mode of the projected screen, the projection management module of the smart screen can also first determine whether the display mode of the projected screen has changed based on the received display mode of the projected screen, and if it has changed, execute step S1320.
[0331] In some embodiments, after step S1320, one or more steps from step S1313 to step S1316 etc. may also be included.
[0332] It can be 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 projection screen has changed according to the display mode of the projection screen. If it has changed, it can determine to adjust the screen resolution of the VD.
[0333] As another specific example, Fig.14 A schematic diagram of a process flow of another screen projection method provided in an embodiment of the present application is shown. Fig.14 As shown, the method comprises the following steps:
[0334] 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.
[0335] For details about this step, please refer to Fig.13 Step S1306 and the related introduction of step S1304 are shown.
[0336] Optionally, before step S1401, the following may also be included: Fig.13 Step S1301 etc. shown.
[0337] S1402. The screen projection management module of the mobile phone creates a VD according to the screen projection parameters.
[0338] For more information about step S1402, please refer to Fig.13 The relevant introduction of step S1305 is shown.
[0339] Optionally, before step S1402, the following may also be included: Fig.13 Step S1303 shown.
[0340] 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.
[0341] 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 may monitor the startup status of the screen projection application from the AMS of the mobile phone in real time or periodically.
[0342] In some embodiments, when the screen projection application is not started, Fig.14 The method shown may also include the following steps:
[0343] S1404. The screen projection management module of the mobile phone instructs the AMS of the mobile phone to start the screen projection application.
[0344] S1405. The AMS of the mobile phone starts the screen projection application.
[0345] 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.
[0346] S1406. The screen projection management module of the mobile phone determines that there is a projection screen on the VD.
[0347] In some embodiments, the screen projection management module of the mobile phone can monitor the application interface running in the foreground of the mobile phone and the display corresponding to the application interface from the AMS of the mobile phone in real time or periodically. When the screen projection management module of the mobile phone determines that the display corresponding to the application interface running in the foreground is the VD created in step S1402, the screen projection management of the mobile phone can determine that the projection screen exists on the VD.
[0348] 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.
[0349] 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.
[0350] In some embodiments, when the VD described in step S1402 is created according to the screen resolution, DPI, etc. of the portrait device, in step S1408, if the display mode of the projection screen is the portrait mode, the projection management module of the mobile phone may not adjust the screen resolution of the VD. If the display mode of the projection screen is the landscape mode, the projection management module of the mobile phone may re-create the VD according to the screen resolution, DPI, etc. of the landscape device.
[0351] In other embodiments, when the VD described in step S1402 is created according to the screen resolution, DPI, etc. of the horizontal screen device, in step S1408, if the display mode of the projection screen is the horizontal screen mode, the projection screen management of the mobile phone may not adjust the screen resolution of the VD. If the display mode of the projection screen is the vertical screen mode, the projection screen management module of the mobile phone may re-create the VD according to the screen resolution of the horizontal screen device.
[0352] In this embodiment, after the projection screen is projected to the smart screen for display, 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.
[0353] For other implementations of this embodiment, please refer to Fig.13 The related implementation described.
[0354] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the 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 implement 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.
[0355] 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 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.
[0356] like Fig.15 1 is a schematic diagram of the structure of an electronic device 1500 provided in an embodiment of the present application, and the electronic device 1500 can be used to implement the methods described in the above method embodiments. Exemplarily, the electronic device 1500 may specifically include: a processing unit 1501, a display unit 1502, and a communication unit 1503.
[0357] In a possible example, taking the electronic device 1500 as a second electronic device (such as a smart screen) as an example, the processing unit 1501 is used to support the electronic device 1500 to execute Figures 1 to 14 The processing function performed by the second electronic device described in any one of the above. The display unit is used to support the electronic device 1500 to perform Figures 1 to 14 The communication unit is used to support the electronic device 1500 to perform Figures 1 to 14 The communication function performed by the second electronic device described in any one of the above.
[0358] In another possible example, taking the electronic device 1500 as a first electronic device (such as a mobile phone) as an example, the processing unit 1501 is used to support the electronic device 1500 to execute Figures 1 to 14 The processing function performed by the first electronic device described in any one of the above. The display unit is used to support the electronic device 1500 to perform Figures 1 to 14 The communication unit is used to support the electronic device 1500 to perform Figures 1 to 14 The communication function performed by the first electronic device described in any one of the above.
[0359] Optional, Fig.15 The electronic device 1500 shown may also include a storage unit ( Fig.15 (not shown), the storage unit stores a program or instruction. When the processing unit 1501 executes the program or instruction, Fig.15 The electronic device 1500 shown can execute the method shown in the above method embodiment.
[0360] Fig.15 The technical effects of the electronic device 1500 shown can refer to the technical effects of the method described in the above method embodiment, and will not be repeated here. Fig.15 The processing unit 1501 involved in the electronic device 1500 shown can be implemented by a processor or a processor-related circuit component, which can be a processor or a processing module. The communication unit 1503 can be implemented by a transceiver or a transceiver-related circuit component, which can be a transceiver or a transceiver module. The display unit 1502 can be implemented by display screen-related components.
[0361] The present application also provides a chip system, such as Fig.16As shown, the chip system 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 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-mentioned embodiment. Of course, the chip system may also include other discrete devices, which are not specifically limited in the embodiments of the present application.
[0362] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0363] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be separately provided with the processor, which is not limited in the present application. Exemplarily, 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 may be provided on different chips. The present application does not specifically limit the type of memory and the arrangement of the memory and the processor.
[0364] 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.
[0365] It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. 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.
[0366] 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.
[0367] An embodiment of the present application provides a computer program product, which includes: a computer program or instructions, when the computer program or instructions are executed on a computer, the computer executes the method described in the above method embodiment.
[0368] 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 so that the device executes the methods in the above-mentioned method embodiments.
[0369] 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.
[0370] 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.
[0371] 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 assigned to 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.
[0372] In the several embodiments provided in the present 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.
[0373] The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be a physical unit or multiple physical units, that is, it may be located in one place, or it 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, each functional unit in each embodiment of the present application may be integrated in a processing unit, or each unit may exist physically separately, or two or more units may be integrated in one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0374] 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, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0375] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope 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.
