WO2021213120A1 - Screen projection method and apparatus, and electronic device - Google Patents

Screen projection method and apparatus, and electronic device Download PDF

Info

Publication number
WO2021213120A1
WO2021213120A1 PCT/CN2021/082506 CN2021082506W WO2021213120A1 WO 2021213120 A1 WO2021213120 A1 WO 2021213120A1 CN 2021082506 W CN2021082506 W CN 2021082506W WO 2021213120 A1 WO2021213120 A1 WO 2021213120A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
interface
control
user
layout information
Prior art date
Application number
PCT/CN2021/082506
Other languages
French (fr)
Chinese (zh)
Inventor
王勇
王欢
李�杰
李英浩
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021213120A1 publication Critical patent/WO2021213120A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04806Zoom, i.e. interaction techniques or interactors for controlling the zooming operation

Definitions

  • This application relates to the technical field of smart terminals, in particular to screen projection methods, devices and electronic equipment.
  • the user will use the method of projection to project the interface of the first electronic device (such as a mobile phone) to the second electronic device (such as a PC) for display.
  • the first electronic device and the second electronic device may include, but are not limited to, mobile terminals (mobile phones), PADs, PCs, wearable devices, electronic large screens, televisions, car central controls, etc.
  • the screen projection method between electronic devices mainly adopts the mirror mode, as shown in FIG. 1, that is, the interface on the first electronic device (eg, mobile phone) is completely projected onto the second electronic device (eg, PC).
  • the interface displayed by the first electronic device such as a mobile phone
  • the screen interface is deformed, or cannot be displayed completely, and the screen projection effect is poor, and the user experience is poor.
  • the embodiments of the present application provide a screen projection method, device, and electronic equipment, which can improve the screen projection effect and enhance the user experience.
  • an embodiment of the present application provides a screen projection method, including:
  • the first electronic device displays to the user various levels of controls of the source interface, and obtains the controls selected by the user from the various levels of controls; and, the first electronic device displays to the user a virtual screen generated based on the screen information of the second electronic device, and selects the user
  • the controls are displayed on the virtual screen, and the controls displayed on the virtual screen can be edited by the user;
  • the first electronic device After detecting the user's confirmation operation on the interface layout on the virtual screen, the first electronic device sends the interface layout information of the virtual screen to the second electronic device, and the interface layout information includes: the first control identifier of the first control placed on the virtual screen And layout information, so that the second electronic device displays the projection interface of the source interface according to the interface layout information.
  • the above-mentioned first electronic device or the second electronic device may be a mobile terminal (mobile phone), a smart screen, a drone, an intelligent connected vehicle (hereinafter referred to as ICV), or a smart/intelligent car. ) Or on-board equipment and other equipment.
  • This method can make the layout of the projection interface displayed on the second electronic device consistent with the interface layout on the virtual screen when the user confirms the operation, so that the visual effect of the projection interface is more similar to that of the native application interface of the second electronic device
  • the effect is not just the mirroring, copying, stretching, and scaling of the source interface in the first electronic device, so as to provide users with a more natural and native screen projection experience.
  • the first electronic device displays to the user various levels of controls of the source interface, including:
  • the first electronic device extracts first data from the interface data of the source interface, and the first data records the control identifiers of the controls in the active interface, the hierarchical relationship between the controls, and the control drawing instructions of the controls;
  • the first electronic device displays various levels of controls of the source interface to the user according to the first data.
  • the first electronic device extracts the first data from the interface data of the source interface, including:
  • the first electronic device extracts the view tree from the interface data of the source interface, the view tree records the control identifiers of the controls in the active interface and the hierarchical relationship between the controls, and extracts the control drawing instructions corresponding to the control identifiers recorded in the view tree from the interface data .
  • the first electronic device displays to the user various levels of controls of the source interface according to the first data, including:
  • the first electronic device uses the control drawing instruction of the control to draw each level control of the source interface according to the hierarchical relationship between the controls, and to show the drawn each level control to the user; and/or,
  • the first electronic device displays the control identification of the control and the hierarchical relationship between the controls to the user.
  • the screen of the first electronic device is divided into a first display area and a second display area;
  • the first electronic device displays to the user various levels of controls of the source interface, including:
  • the first electronic device displays various levels of controls of the source interface to the user in the first display area
  • the first electronic device shows the user a virtual screen generated based on the screen information of the second electronic device, including:
  • the first electronic device displays a virtual screen to the user in the second display area.
  • the first electronic device marks the first control identifier in the first data of the interface data sent to the source interface of the second electronic device according to the first control identifier in the interface layout information.
  • the first electronic device sends the acquired first control identifier and layout information to the second electronic device, including:
  • the first electronic device carries the acquired interface layout information in the interface data of the source interface and sends it to the second electronic device.
  • an embodiment of the present application provides a screen projection method, including:
  • the second electronic device receives the interface layout information sent by the first electronic device.
  • the interface layout information includes: the first control identifier and layout information; The interface layout information of the screen;
  • the second electronic device receives the interface data of the source interface sent by the first electronic device
  • the second electronic device displays the projection interface of the source interface according to the interface data and the interface layout information.
  • This aspect makes the layout of the projection interface displayed on the second electronic device consistent with the interface layout on the virtual screen when the user confirms the operation, so that the visual effect of the projection interface is more similar to the visual effect of the native application interface of the second electronic device , Not just the mirroring, copying, stretching, and zooming of the source interface in the first electronic device, so as to provide users with a more natural and native screen projection experience.
  • the second electronic device displays the projection interface of the source interface according to the interface data and the interface layout information, including:
  • the second electronic device obtains the first control identifier and the layout information corresponding to the first control identifier from the interface layout information; the second electronic device obtains the control drawing instruction corresponding to the first control identifier from the interface data according to the acquired first control identifier ;
  • the second electronic device draws the control corresponding to the first control identifier using the control drawing instruction corresponding to the first control identifier according to the layout information corresponding to the first control identifier.
  • the first control identifier in the interface data has a mark
  • the second electronic device displays the projection interface of the source interface according to the interface data and the interface layout information, including:
  • the second electronic device obtains the first control identifier and the layout information corresponding to the first control identifier from the interface layout information;
  • the second electronic device obtains, from the interface data, a control drawing instruction corresponding to the marked first control identifier
  • the second electronic device draws the control corresponding to the first control identifier using the control drawing instruction corresponding to the first control identifier according to the layout information corresponding to the first control identifier.
  • an embodiment of the present application provides a first electronic device, including:
  • the controls displayed on the virtual screen can be edited by the user;
  • the interface layout information includes: the first control identifier of the first control placed on the virtual screen and the layout information, So that the second electronic device displays the projection interface of the source interface according to the interface layout information.
  • the step of causing the user to show each level of control of the source interface includes:
  • the first data records the control identifiers of the controls in the active interface, the hierarchical relationship between the controls, and the control drawing instructions of the controls;
  • the step of causing the first data to be extracted from the interface data of the source interface includes:
  • the view tree is extracted from the interface data of the source interface, and the view tree records the control identifiers of the controls in the active interface and the hierarchical relationship between the controls; the control drawing instructions corresponding to the control identifiers recorded in the view tree are extracted from the interface data.
  • the step of causing the user to display each level of control of the source interface according to the first data includes:
  • control drawing instructions of the control to draw each level control of the source interface according to the hierarchical relationship between the controls, and show the drawn each level control to the user; and/or,
  • the screen of the first electronic device is divided into a first display area and a second display area;
  • the steps of causing the user to show the various levels of controls of the source interface include:
  • the various levels of controls of the source interface are displayed to the user;
  • the step of causing the user to show the virtual screen generated based on the screen information of the second electronic device includes:
  • the virtual screen is shown to the user in the second display area.
  • the first electronic device when the instruction is executed by the first electronic device, the first electronic device further executes the following steps:
  • the first control identifier in the interface layout information the first control identifier in the first data of the interface data sent to the source interface of the second electronic device is marked.
  • the step of causing the acquired control identifier and layout information to be sent to the second electronic device includes:
  • the obtained interface layout information is carried in the interface data of the source interface and sent to the second electronic device.
  • an embodiment of the present application provides a second electronic device, including:
  • the interface layout information includes: a first control identifier and layout information; the interface layout information is the interface layout of the virtual screen when the first electronic device detects the user's confirmation operation on the interface layout on the virtual screen information;
  • the projection interface of the source interface is displayed according to the interface layout information.
  • the step of causing the screen projection interface of the source interface to be displayed according to the first control identifier and layout information according to the interface data includes:
  • the control corresponding to the first control identifier is drawn using the control drawing instruction corresponding to the first control identifier.
  • the first control identifier in the interface data has a mark; when the instruction is executed by the second electronic device, the step of causing the screen projection interface of the source interface to be displayed according to the first control identifier and layout information according to the interface data includes:
  • the control corresponding to the first control identifier is drawn using the control drawing instruction corresponding to the first control identifier.
  • an embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and when it runs on a computer, the computer executes the method of the first aspect.
  • an embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and when the computer program is run on a computer, the computer executes the method of the second aspect.
  • this application provides a computer program, which is used to execute the method of the first aspect or the second aspect when the computer program is executed by a computer.
  • the program in the seventh aspect may be stored in whole or in part on a storage medium packaged with the processor, or may be stored in part or in a memory not packaged with the processor.
  • Fig. 1 is an example diagram of a screen projection method in a mirror image mode in the prior art
  • FIG. 2A is an example diagram of a screen projection function provided by the system according to an embodiment of the application.
  • FIG. 2B is an example diagram of the control hierarchy of the embodiment of this application.
  • 2C is an example diagram of instruction extraction according to an embodiment of the application.
  • FIG. 2D is an example diagram of a view tree according to an embodiment of the application.
  • FIG. 3 is a flowchart of an embodiment of the screen projection method of this application.
  • FIG. 4 is a flowchart of another embodiment of the screen projection method of this application.
  • FIG. 5 is a flowchart of another embodiment of the screen projection method according to this application.
  • FIG. 6 is a flowchart of another embodiment of the screen projection method according to this application.
  • FIG. 7 is a flowchart of another embodiment of the screen projection method according to this application.
  • FIG. 8 is a structural diagram of an embodiment of the screen projection device of this application.
  • FIG. 9 is a structural diagram of another embodiment of a screen projection device according to the present application.
  • FIG. 10 is a schematic structural diagram of an embodiment of an electronic device of this application.
  • Screen projection in the embodiments of the present application refers to transferring interface data on one electronic device to another electronic device for display.
  • first electronic device the above-mentioned “one electronic device”
  • second electronic device the above-mentioned “another electronic device”
  • the interface that needs to be projected is called the "source interface”
  • the interface displayed in the second electronic device after the first electronic device is projected is called the "projection interface”.
  • the screen projection function may be provided by the system or by the application, which is not limited in the embodiment of the present application.
  • FIG. 2A shows an example of the screen projection function provided by the system.
  • the user can realize the screen projection between two electronic devices through the following operations: the user brings up the system drop-down notification in the first electronic device-selects more shortcut tools-finds wireless projection or mirroring Entrance—Select a connectable device, and the selected connectable electronic device is used as the second electronic device in the embodiment of the present application.
  • the two electronic devices that perform screen projection can be directly connected, for example, the direct connection between the two electronic devices can be realized through Bluetooth, WiFi, etc.; or, the two electronic devices can also be connected to other electronic devices separately.
  • Electronic devices such as cloud servers are connected to achieve indirect connection.
  • the connection between the two electronic devices can be switched between direct connection and indirect connection, which is not limited in the embodiment of the present application.
  • the application program interface in the embodiment of the present application is a medium interface for interaction and information exchange between the application program and the user, and it realizes the conversion between the internal form of the information and the form acceptable to the user.
  • the commonly used form of application program interface is Graphic User Interface (GUI for short), which refers to a user interface related to computer operations that is displayed in a graphical manner.
  • GUI Graphic User Interface
  • the interface can be composed of visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets. These visual interface elements can be called application interface elements. Control.
  • the controls in the application interface are hierarchical. For example, the entire application interface can be considered as the lowest-level controls, that is, the first-level controls. The higher the level, the finer the controls and the greater the number of controls. For example, referring to Figure 2B, suppose there is an interface including button group 1 and button group 2, and each button group includes 3 buttons, then the interface can be considered as the lowest level control, button group 1 and Button group 2 is the second level of controls, and buttons 11-13 and 21-23 are the third level of controls.
  • the interface data of the source interface records the controls of the active interface and the hierarchical relationship between the controls.
  • the skia instructions can be extracted from the instruction layer skcanvas.
  • the skia instructions record the view tree (View Tree). ), control drawing instructions; among them,
  • the view tree records the hierarchical relationship between View and View.
  • View is the base class of all controls in the Android system. It is an abstraction of interface layer controls. View usually represents a control.
  • ViewGroup is a kind of A special View, which represents the combination relationship between different Views. Normally, the entire interface of the application is a ViewGroup, where each control is a separate View. Views and ViewGroups can be combined/nested, combined/embedded After the set, a complete View tree is formed.
  • the View tree also records the controls at different levels in the application interface and the hierarchical relationship between the controls. For example, the View tree generally uses the control identifier (ID) to identify the control. See the screenshot of the view tree shown in Figure 2D (View and ViewGroup will not be distinguished below).
  • ID control identifier
  • DecorView is the first-level view, and the IDs are respectively The IDs corresponding to the controls for action mode bar stub (ViewStub) and content (FrameLayout) are located in the second level; the IDs are action bar split action bar (HWToolBarMenuContainer), conversation list conversation list (FrameLayout), and toolbar container layout.
  • the IDs corresponding to the controls of (RelativeLayout) are located at the third level; the IDs are the start new conversation button (ImageView) and the corresponding IDs of the controls of the toolbar hwtoolbar (HwToolbar) are located at the fourth level. Therefore, the view tree records the controls at different levels in the application interface and the hierarchical relationship between the controls through the control identifier and the hierarchical relationship between the control identifiers.
  • Control drawing instructions are associated with the view tree, recording how the visual graphics of each control in the view tree are drawn, and recording the control display content of each control.
  • the control may only include visual graphics or control display content, or may include both visual graphics and control display content.
  • the electronic device can draw each level of the control in the view tree based on the control drawing instruction to obtain the visual graphics of each control and/or the display content of the control, thereby forming an application program interface.
  • the display content of the controls in the embodiments of the present application refers to data such as numbers and texts that need to be displayed for each control in the application program interface in addition to the visual graphics.
  • the control drawing instruction can draw the visual graphics of the control, such as the box representing the button in FIG. 2B, and can also draw the text displayed on the control, such as button 11, button 12, etc. at the same time.
  • the display content of the control may be constant or may be constantly changing.
  • the first electronic device may send the control ID of the control display content change and the changed control display content to the second electronic device, or may also send the control display content change to the second electronic device
  • the second electronic device updates the projection interface correspondingly to keep the content displayed on the source interface and the projection interface consistent.
  • the first electronic device When starting the screen projection, the first electronic device sends the interface data of the source interface to the second electronic device; during the screen projection process, the source interface of the first electronic device may change, for example, the user clicks a button in the source interface , To open another application interface, the source interface becomes the newly opened application interface. At this time, the first electronic device can re-send the interface data of the source interface to the second electronic device to maintain the projection interface and the source interface The displayed content is the same.
  • the screen projection method between electronic devices mainly adopts the mirror mode, as shown in FIG. 1, that is, the interface on the first electronic device (eg, mobile phone) is completely projected to the second electronic device (eg, PC).
  • superior. Take the Android-based Miracast and iOS-based AirPlay as examples.
  • the basic principles of both are: the interface data of the first electronic device is encoded with audio and video and then sent to the second electronic device.
  • the second electronic device performs decoding processing to obtain the interface data of the first electronic device for display.
  • the projection interface can only be stretched, zoomed, and cropped according to the screen size of the second electronic device, so that the projection interface displayed on the second electronic device is deformed or cannot be displayed completely. The projection effect is poor and the user experience is poor.
  • embodiments of the present application provide a screen projection method, device, and electronic equipment, which can improve the screen projection effect and enhance user experience.
  • Fig. 3 is a flowchart of an embodiment of a screen projection method according to this application. As shown in Fig. 3, the method may include:
  • Step 301 The first electronic device displays each level of control of the source interface to the user, and obtains the control selected by the user from each level of control.
  • the first electronic device when the first electronic device displays each level of control of the source interface to the user, it may display: the control and/or the hierarchical relationship between the control identifiers.
  • the controls in the application program interface are displayed as visual graphics in the application program interface.
  • most controls have the function of executing the function or triggering the code to run and complete the response through the "event". This function is used by the user Click and other operations can be triggered.
  • the first electronic device displays various levels of controls of the source interface to the user. The main function is to facilitate the user to intuitively select the required controls. Therefore, in the embodiment of the present application, the first electronic device may only display the controls. Display the visual graphics of the control and/or the display content of the control without providing a response operation for the function of the control.
  • buttons 11 in Figure 2B For example, suppose that the control display content of button 11 in Figure 2B is: Next page, when the user clicks with the mouse, the application can be triggered to open the application interface corresponding to the next page (that is, execute "Next page” "The function of this button). In this step, the control shown to the user can only show the visual graphic of button 11 and the display content of the "Next Page” control. The user can select the visual graphic by clicking with the mouse, but The response operation of opening the application program interface corresponding to the next page may no longer be provided.
  • control identifiers such as the view tree generally belongs to the internal properties of the interface, and does not intuitively reflect the specific control. Therefore, for most users who are not skilled in the art, the way to show the control to the user It is more intuitive and has a better user experience.
  • Step 302 The first electronic device displays a virtual screen generated based on the screen information of the second electronic device to the user, and displays the controls selected by the user on the virtual screen, and the controls displayed on the virtual screen can be edited by the user.
  • the screen information of the second electronic device may include: the horizontal size and the vertical size (or aspect ratio) of the display screen of the second electronic device.
  • the screen information of the second electronic device may also include: interactive mode and so on.
  • the interaction mode may include: whether the display screen supports touch control, etc.
  • the editing operation performed by the user on the control may include, but is not limited to: position movement, size change, display direction change, and/or deletion.
  • the first electronic device showing the virtual screen to the user in step 302 can be executed at the same time as the first electronic device showing each level of control of the source interface to the user in step 301, that is, the first electronic device simultaneously showing each level of control to the user and Virtual screen; or, in step 302, the first electronic device displays the virtual screen to the user, which can also be executed after step 301, which is not limited in the embodiment of the present application.
  • the controls displayed on the virtual screen may also be the visual graphics of the control and/or the display content of the control, without providing a response operation for the function of the control.
  • Step 303 The first electronic device detects the user's confirmation operation for the interface layout on the virtual screen, and sends the interface layout information of the virtual screen to the second electronic device.
  • the interface layout information includes: the first control of the first control placed on the virtual screen. Control identification and layout information, so that the second electronic device displays the projection interface of the source interface according to the interface layout information.
  • the first control refers to the control placed on the virtual screen, that is, the control that is still placed on the virtual screen after the user performs a series of editing operations on the control selected by the user displayed on the virtual screen in step 302.
  • Each first control corresponds to: a first control identifier, and layout information; the layout information may include information such as the position, size, and display direction of the control on the virtual screen.
  • a layout configuration file may be generated according to the foregoing interface layout information, and the layout configuration file may be sent to the second electronic device.
  • the first electronic device may directly send the interface layout information to the second electronic device; or, the first electronic device sending the interface layout information to the second electronic device may include: the first electronic device carries the interface layout information in The interface data of the source interface is sent to the second electronic device.
  • the first electronic device after the first electronic device sends the interface layout information to the second electronic device, it can compare the first data of the interface data sent to the source interface of the second electronic device according to the first control identifier in the interface layout information.
  • the first control identifier in the display screen is marked so that the second electronic device can draw the control in the projection interface according to the first control identifier with the mark when displaying the projection interface.
  • the first electronic device sends the interface layout information to the second electronic device, and the second electronic device can store the interface layout information.
  • the second electronic device can display the projection interface of the source interface according to the interface layout information. If the user wants to modify the interface layout information of the projection interface of the source interface in the second electronic device, he can trigger the above-mentioned method of the embodiment of the present application to re-edit the interface layout on the virtual screen and re-send the interface layout information to the second electronic device.
  • the second electronic device updates the locally stored interface layout information corresponding to the source interface, so that the user can modify the interface layout of the projection interface of the source interface in the second electronic device.
  • the first electronic device displays the controls in the source interface selected by the user on the virtual screen, and the user edits the displayed controls.
  • the virtual screen is displayed on the virtual screen.
  • the interface layout information is sent to the second electronic device, and the second electronic device displays the projection interface according to the interface layout information of the virtual screen, so that the layout of the projection interface displayed on the second electronic device is the same as the interface layout on the virtual screen when the user confirms the operation Consistent, so that the visual effect of the projection interface is more similar to the visual effect of the native application interface of the second electronic device, rather than just mirroring, copying, stretching, and zooming the source interface in the first electronic device, thereby providing users with A more natural and native screen projection experience.
  • FIG. 4 is a flowchart of another embodiment of the screen projection method according to this application. As shown in FIG. 4, the method may include:
  • Step 401 The second electronic device receives the interface layout information sent by the first electronic device, the interface layout information includes: the first control identifier and layout information; the interface layout information is the first electronic device detecting that the user confirms the interface layout on the virtual screen Interface layout information of the virtual screen during operation;
  • Step 402 The second electronic device receives the interface data of the source interface sent by the first electronic device;
  • Step 403 The second electronic device displays the screen projection interface of the source interface according to the interface layout information according to the received interface data of the source interface.
  • the second electronic device may first obtain the first control identifier and the layout information corresponding to the first control identifier from the interface layout information, and then obtain the first control identifier from the interface data from the interface data according to the first control identifier obtained from the interface layout information. Acquire the control drawing instruction corresponding to the first control identifier; according to the layout information corresponding to the first control identifier in the interface layout information, use the control drawing instruction corresponding to the first control identifier to draw the control corresponding to the first control identifier.
  • the screen projection interface displayed by the second electronic device only displays the control corresponding to the first control identifier included in the interface layout information, and the layout of the screen projection interface displayed by the second electronic device will be consistent with the interface layout on the virtual screen. Only the control display content in each control may be different (the content of the second device changes in real time with the interface of the first device).
  • the first control identifier in the first data of the interface data may have a mark.
  • the second electronic device does not need to obtain the first control identifier from the interface layout information first, and can more conveniently obtain the first control identifier from the interface data.
  • Each first control identifier and the control drawing instruction corresponding to the first control identifier are found.
  • step 403 may include: the second electronic device obtains the first control identifier and the layout information corresponding to the first control identifier from the interface layout information ; The second electronic device obtains from the interface data the control drawing instruction corresponding to the marked first control identifier; the second electronic device draws the first control drawing instruction corresponding to the first control identifier according to the layout information corresponding to the first control identifier The control identifies the corresponding control.
  • the layout of the projection interface displayed on the second electronic device is consistent with the interface layout on the virtual screen when the user confirms the operation, so that the visual effect of the projection interface is more similar to the native application of the second electronic device
  • the visual effect of the program interface is not just the mirroring, copying, stretching, and zooming of the source interface in the first electronic device, so as to provide users with a more natural and native screen projection experience.
  • FIG. 5 is a flowchart of another embodiment of the projection method of this application.
  • the first electronic device is a mobile phone
  • the second electronic device is a head-up display (HUD, Head Up Display) in a car as an example .
  • the source interface that needs to be screened in the first electronic device is the navigation interface.
  • the screen of the first electronic device (such as a mobile phone) is divided into a first display area 51 and a second display area 52.
  • the first electronic device displays the source interface to the user in the first display area 51.
  • the control selected by the user is displayed on the display.
  • the aspect ratio of the generated virtual screen 521 and the display screen of the second electronic device may be the same.
  • the first electronic device to display to the user each level of control of the source interface may include:
  • the first electronic device extracts first data from the interface data of the source interface, and the first data includes: the control identifiers of the controls in the source interface, the hierarchical relationship between the controls, and the control drawing instructions of the controls;
  • control drawing instructions of the control to draw each level of control according to the hierarchical relationship between the controls, and show the drawn each level of control to the user.
  • the above-mentioned first data may include: a view tree and a control drawing instruction corresponding to a control identifier recorded in the view tree.
  • the first electronic device extracting the first data from the interface data of the source interface may include: the first electronic device extracts a view tree from the interface data of the source interface, and the view tree records the control identifiers of the controls in the active interface and the hierarchy between the controls Relationship, extract the control drawing instruction corresponding to the control identifier recorded in the view tree from the interface data.
  • the user can select a control in the first display area 51 and drag the control to display on the virtual screen.
  • the first electronic device obtains the control selected by the user by detecting the above-mentioned operation of the user on the control. .
  • the user may perform a preset operation on the control in the first display area.
  • the foregoing preset operation may include, but is not limited to: double-clicking the control displayed in the first display area, etc., and the first electronic device detects that the user is targeting The above operations of the control obtain the control selected by the user.
  • the navigation interface is the first-level control
  • the navigation information display control group 511 on the left is the second-level control
  • the map route display control 512 on the right is also the second-level control
  • the navigation information is displayed.
  • the control group 511 includes: 4 text boxes shown by the dotted line and 5 third-level controls with turning arrows.
  • the control selected by the user is the text box showing the turning distance and the turning arrow as an example.
  • the user can perform editing operations on the controls displayed on the virtual screen to obtain the edited screen projection interface layout of the user.
  • section 520 take the user's editing operations such as zooming in and moving the position of the text showing the turning distance and turning arrow as an example.
  • the user edits the controls displayed on the virtual screen
  • the user performs a confirmation operation on the interface layout on the virtual screen; accordingly, the first electronic device detects that the user is on the virtual screen
  • the confirmation operation of the interface layout sends the interface layout information on the virtual screen to the second electronic device (such as HUD); the second electronic device stores the received interface layout information.
  • the first electronic device sends the interface data of the source interface to the second electronic device; the second electronic device receives the interface data of the source interface, and according to the interface data, displays the projection screen of the source interface according to the interface layout information interface.
  • the interface data of the source interface sent by the first electronic device to the second electronic device records the control identifiers of all controls in the active interface, the hierarchical relationship between the controls, the control drawing instructions, etc., and the interface layout information records the first A control identifier and the layout information corresponding to the first control identifier.
  • the interface layout information records the first A control identifier and the layout information corresponding to the first control identifier.
  • the hierarchical relationship between the first control identifiers and the control drawing of the first control identifier can be found from the interface data Instruction, according to the layout information corresponding to the first control identifier, the control corresponding to the first control identifier can be drawn by using the control drawing instruction corresponding to the first control identifier.
  • the control corresponding to each first control identifier in the interface layout information is displayed on the screen projection interface according to the hierarchical relationship according to the above method, and the screen projection interface is obtained.
  • the displayed screen projection interface will be similar to the interface displayed on the virtual screen when the user performs the above confirmation operation, except that the display content of the control displayed on each control may be different.
  • the screen of the first electronic device is divided into a third display area and a fourth display area.
  • the first electronic device displays the hierarchical relationship between control identifiers in the third display area and in the fourth display area. Displaying the visual graphics of each level of control (that is, the first electronic device displays each level of control of the source interface to the user).
  • a check box is set for each control identifier.
  • the user can select the control identifier by selecting the check box.
  • the first electronic device obtains the user's selection by detecting the check box selection operation described above.
  • the control ID (that is, to obtain the control selected by the user from each level of control).
  • the first electronic device displays a virtual screen on the screen, and displays the visual graphics of the control corresponding to the control identifier selected by the user on the virtual screen; the visual graphics of the control displayed on the virtual screen can be edited by the user operate.
  • the screen of the first electronic device is divided into a fifth display area and a sixth display area.
  • the first electronic device displays the hierarchical relationship between the control identifiers in the fifth display area (that is, the first electronic).
  • the device displays all levels of controls of the source interface to the user), displays the virtual screen in the sixth display area, displays the visual graphics and/or control display content of the corresponding control corresponding to the control identifier selected by the user on the virtual screen;
  • the visual graphics and/or the display content of the control can be edited by the user.
  • a check box is set for each control identifier, and the user can select the control identifier by selecting the check box.
  • the first electronic device obtains the user's selection by detecting the above-mentioned selection operation on the check box.
  • the control ID (that is, to obtain the control selected by the user from each level of control).
  • the visual graphic of the control displayed on the virtual screen can be drawn on the virtual screen by the first electronic device according to the control identifier selected by the user and using the control drawing instruction corresponding to the control identifier.
  • the method of the embodiment of the present application shows the user a virtual screen generated based on the screen information of the second electronic device.
  • the user can select the controls displayed on the virtual screen from the source interface according to personal needs and perform layout. Realize the optimization and editing of the projection interface displayed in the second electronic device, especially when the second electronic device has a special-shaped display screen, targeted optimization can be performed based on the special-shaped display screen, so that the visual effect of the projection interface is more similar to the first 2.
  • the visual effects of the native application program interface of the electronic device not just the mirroring, copying, stretching, and zooming of the source interface in the first electronic device, so as to provide users with a more natural and native screen projection experience; moreover, screen projection
  • the clarity of the interface is relatively better, and it will not be blurred by zooming in. For example, if you project the music playing interface in your phone to your watch, because the watch’s display screen is relatively small, you can only choose to play, and the three buttons of the previous song and the next song will be displayed on the projection screen; or if the phone is displayed on the screen.
  • the interface of the navigation application in is projected on the HUD display, and only key buttons such as direction indication can be displayed on the projection interface and so on.
  • FIG. 8 is a schematic structural diagram of an embodiment of a screen projection device according to this application. As shown in FIG. 8, the device 80 may include:
  • the first display unit 81 is used to display each level of control of the source interface to the user, and obtain the control selected by the user from each level of control;
  • the second display unit 82 is configured to display a virtual screen generated based on the screen information of the second electronic device to the user, and display the control selected by the user on the virtual screen, and the control displayed on the virtual screen can be edited by the user;
  • the sending unit 83 is configured to send the interface layout information of the virtual screen to the second electronic device after detecting the user's confirmation operation on the interface layout on the virtual screen.
  • the interface layout information includes: the first control of the first control placed on the virtual screen. Control identification and layout information, so that the second electronic device displays the projection interface of the source interface according to the interface layout information.
  • the first display unit 81 may be specifically used for:
  • the first data records the control identifiers of the controls in the active interface, the hierarchical relationship between the controls, and the control drawing instructions of the controls;
  • the first display unit 81 may be specifically used for:
  • the view tree is extracted from the interface data of the source interface, the view tree records the control identifiers of the controls in the active interface and the hierarchical relationship between the controls, and the control drawing instructions corresponding to the control identifiers recorded in the view tree are extracted from the interface data.
  • the first display unit 81 may be specifically used for:
  • control drawing instructions of the control to draw each level control of the source interface according to the hierarchical relationship between the controls, and show the drawn each level control to the user; and/or,
  • the screen of the device is divided into a first display area and a second display area;
  • the first display unit 81 may be specifically used to: display various levels of controls of the source interface to the user in the first display area;
  • the second display unit 82 may be specifically used for: the first electronic device displays a virtual screen to the user in the second display area.
  • the sending unit 83 may be further configured to mark the first control identifier in the interface data sent to the source interface of the second electronic device according to the control identifier of the control placed on the virtual screen.
  • the sending unit 83 may be specifically configured to carry the acquired interface layout information in the interface data of the source interface and send it to the second electronic device.
  • FIG. 9 is a schematic structural diagram of another embodiment of a screen projection device according to the present application. As shown in FIG. 9, the device 90 may include:
  • the receiving unit 91 is configured to receive interface layout information sent by the first electronic device, the interface layout information includes: a first control identifier and layout information; the interface layout information is the first electronic device detecting that the user confirms the layout of the interface on the virtual screen Interface layout information of the current virtual screen; receiving interface data of the source interface sent by the first electronic device;
  • the display unit 92 is configured to display the projection interface of the source interface according to the interface data and the interface layout information.
  • the display unit 82 may be specifically configured to: obtain the first control identifier and the layout information corresponding to the first control identifier from the interface layout information; obtain the first control identifier corresponding to the first control identifier from the interface data according to the acquired first control identifier According to the layout information corresponding to the first control identifier, use the control drawing instruction corresponding to the first control identifier to draw the control corresponding to the first control identifier.
  • the first control identifier in the interface data has a mark
  • the display unit 82 may be specifically used to: obtain the first control identifier and the layout information corresponding to the first control identifier from the interface layout information; obtain the mark from the interface data
  • the first control identifier corresponds to the control drawing instruction; according to the layout information corresponding to the first control identifier, the control corresponding to the first control identifier is drawn using the control drawing instruction corresponding to the first control identifier.
  • the above units may be one or more integrated circuits configured to implement the above methods, for example: one or more specific integrated circuits (Application Specific Integrated Circuit; hereinafter referred to as ASIC), or, one or more micro-processing DSP (Digital Singnal Processor; hereinafter referred to as DSP), or, one or more Field Programmable Gate Array (Field Programmable Gate Array; hereinafter referred to as FPGA), etc.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Singnal Processor
  • FPGA Field Programmable Gate Array
  • these units can be integrated together and implemented in the form of a System-On-a-Chip (hereinafter referred to as SOC).
  • SOC System-On-a-Chip
  • FIG. 10 is a schematic structural diagram of an embodiment of an electronic device of this application. As shown in FIG. 10, the above-mentioned electronic device may include: a display screen; one or more processors; a memory; and one or more computer programs.
  • the above-mentioned electronic equipment can be a mobile terminal (mobile phone), a smart screen, a drone, an intelligent connected vehicle (Intelligent Connected Vehicle; hereinafter referred to as ICV), a smart/intelligent car (smart/intelligent car), or in-vehicle equipment, etc. equipment.
  • ICV Intelligent Connected Vehicle
  • a smart/intelligent car smart/intelligent car
  • in-vehicle equipment etc. equipment.
  • the above-mentioned one or more computer programs are stored in the above-mentioned memory, and the above-mentioned one or more computer programs include instructions.
  • the above-mentioned instructions are executed by the above-mentioned device, the above-mentioned device executes the methods shown in FIGS. 3-7.
  • the foregoing electronic device may be the first electronic device described in the embodiments of the application, and when the foregoing instruction is executed by the first electronic device, the first electronic device is caused to perform the following steps:
  • the controls displayed on the virtual screen can be edited by the user;
  • the interface layout information includes: the first control identifier of the first control placed on the virtual screen and the layout information, So that the second electronic device displays the projection interface of the source interface according to the interface layout information.
  • the step of causing the user to show each level of control of the source interface includes:
  • the first data records the control identifiers of the controls in the active interface, the hierarchical relationship between the controls, and the control drawing instructions of the controls;
  • the step of causing the first data to be extracted from the interface data of the source interface includes:
  • the view tree is extracted from the interface data of the source interface, and the view tree records the control identifiers of the controls in the active interface and the hierarchical relationship between the controls; the control drawing instructions corresponding to the control identifiers recorded in the view tree are extracted from the interface data.
  • the step of causing the user to show the various levels of controls of the source interface according to the first data includes:
  • control drawing instructions of the control to draw each level control of the source interface according to the hierarchical relationship between the controls, and show the drawn each level control to the user; and/or,
  • the screen of the first electronic device is divided into a first display area and a second display area;
  • the steps of causing the user to show the various levels of controls of the source interface include:
  • the various levels of controls of the source interface are displayed to the user;
  • the step of causing the user to show the virtual screen generated based on the screen information of the second electronic device includes:
  • the virtual screen is shown to the user in the second display area.
  • the first electronic device when the above instruction is executed by the first electronic device, the first electronic device further executes the following steps:
  • the first control identifier in the interface layout information the first control identifier in the first data of the interface data sent to the source interface of the second electronic device is marked.
  • the step of causing the acquired control identifier and layout information to be sent to the second electronic device includes:
  • the obtained interface layout information is carried in the interface data of the source interface and sent to the second electronic device.
  • the above electronic device may be the second electronic device described in the embodiment of the application, and when the above instruction is executed by the second electronic device, the second electronic device is caused to perform the following steps:
  • the interface layout information includes: a first control identifier and layout information; the interface layout information is the interface layout of the virtual screen when the first electronic device detects the user's confirmation operation on the interface layout on the virtual screen information;
  • the projection interface of the source interface is displayed according to the interface layout information.
  • the step of causing the screen projection interface of the source interface to be displayed according to the first control identifier and layout information according to the interface data includes:
  • the control corresponding to the first control identifier is drawn using the control drawing instruction corresponding to the first control identifier.
  • the first control identifier in the interface data has a mark; when the above instruction is executed by the second electronic device, the step of causing the screen projection interface of the source interface to be displayed according to the first control identifier and layout information according to the interface data includes:
  • the control corresponding to the first control identifier is drawn using the control drawing instruction corresponding to the first control identifier.
  • the electronic device shown in FIG. 10 may be a terminal device or a circuit device built in the aforementioned terminal device.
  • the device can be used as the above-mentioned first electronic device or second electronic device to perform the functions/steps in the methods provided in the embodiments shown in FIG. 3 to FIG. 7 of this application.
  • the electronic device 1000 may include a processor 1010, an external memory interface 1020, an internal memory 1021, a universal serial bus (USB) interface 1030, a charging management module 1040, a power management module 1041, a battery 1042, an antenna 1, and an antenna 2.
  • Mobile communication module 1050 wireless communication module 1060, audio module 1070, speaker 1070A, receiver 1070B, microphone 1070C, earphone jack 1070D, sensor module 1080, buttons 1090, motor 1091, indicator 1092, camera 1093, display 1094, and Subscriber identification module (subscriber identification module, SIM) card interface 1095, etc.
  • SIM Subscriber identification module
  • the sensor module 1080 can include pressure sensor 1080A, gyroscope sensor 1080B, air pressure sensor 1080C, magnetic sensor 1080D, acceleration sensor 1080E, distance sensor 1080F, proximity light sensor 1080G, fingerprint sensor 1080H, temperature sensor 1080J, touch sensor 1080K, ambient light Sensor 1080L, bone conduction sensor 1080M, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 1000.
  • the electronic device 1000 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 1010 may include one or more processing units.
  • the processor 1010 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the different processing units may be independent devices or integrated in one or more processors.
  • the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
  • a memory may also be provided in the processor 1010 to store instructions and data.
  • the memory in the processor 1010 is a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 1010. If the processor 1010 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, the waiting time of the processor 1010 is reduced, and the efficiency of the system is improved.
  • the processor 1010 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter/receiver (universal asynchronous) interface.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter/receiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the processor 1010 may include multiple sets of I2C buses.
  • the processor 1010 may be coupled to the touch sensor 1080K, charger, flash, camera 1093, etc., respectively through different I2C bus interfaces.
  • the processor 1010 may couple the touch sensor 1080K through an I2C interface, so that the processor 1010 and the touch sensor 1080K communicate through the I2C bus interface to realize the touch function of the electronic device 1000.
  • the I2S interface can be used for audio communication.
  • the processor 1010 may include multiple sets of I2S buses.
  • the processor 1010 may be coupled with the audio module 1070 through an I2S bus to implement communication between the processor 1010 and the audio module 1070.
  • the audio module 1070 can transmit audio signals to the wireless communication module 1060 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • the audio module 1070 and the wireless communication module 1060 may be coupled through a PCM bus interface.
  • the audio module 1070 may also transmit audio signals to the wireless communication module 1060 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 1010 and the wireless communication module 1060.
  • the processor 1010 communicates with the Bluetooth module in the wireless communication module 1060 through the UART interface to realize the Bluetooth function.
  • the audio module 1070 may transmit audio signals to the wireless communication module 1060 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 1010 with the display screen 1094, the camera 1093 and other peripheral devices.
  • the MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and so on.
  • the processor 1010 and the camera 1093 communicate through a CSI interface to implement the shooting function of the electronic device 1000.
  • the processor 1010 and the display screen 1094 communicate through a DSI interface to realize the display function of the electronic device 1000.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 1010 with the camera 1093, the display screen 1094, the wireless communication module 1060, the audio module 1070, the sensor module 1080, and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 1030 is an interface that complies with the USB standard specifications, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
  • the USB interface 1030 can be used to connect a charger to charge the electronic device 1000, and can also be used to transfer data between the electronic device 1000 and peripheral devices. It can also be used to connect earphones and play audio through earphones. This interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely illustrative, and does not constitute a structural limitation of the electronic device 1000.
  • the electronic device 1000 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the charging management module 1040 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 1040 may receive the charging input of the wired charger through the USB interface 1030.
  • the charging management module 1040 may receive the wireless charging input through the wireless charging coil of the electronic device 1000. While the charging management module 1040 charges the battery 1042, it can also supply power to the electronic device through the power management module 1041.
  • the power management module 1041 is used to connect the battery 1042, the charging management module 1040 and the processor 1010.
  • the power management module 1041 receives input from the battery 1042 and/or the charging management module 1040, and supplies power to the processor 1010, internal memory 1021, display screen 1094, camera 1093, and wireless communication module 1060.
  • the power management module 1041 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 1041 may also be provided in the processor 1010.
  • the power management module 1041 and the charging management module 1040 may also be provided in the same device.
  • the wireless communication function of the electronic device 1000 can be realized by the antenna 1, the antenna 2, the mobile communication module 1050, the wireless communication module 1060, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 1000 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 1050 can provide wireless communication solutions including 2G/3G/4G/5G and the like applied to the electronic device 1000.
  • the mobile communication module 1050 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 1050 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 1050 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 1050 may be provided in the processor 1010.
  • at least part of the functional modules of the mobile communication module 1050 and at least part of the modules of the processor 1010 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the application processor outputs a sound signal through an audio device (not limited to a speaker 1070A, a receiver 1070B, etc.), or displays an image or video through the display screen 1094.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 1010 and be provided in the same device as the mobile communication module 1050 or other functional modules.
  • the wireless communication module 1060 can provide applications on the electronic device 1000 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 1060 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 1060 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 1010.
  • the wireless communication module 1060 can also receive the signal to be sent from the processor 1010, perform frequency modulation, amplify, and convert it into electromagnetic waves to radiate through the antenna 2.
  • the antenna 1 of the electronic device 1000 is coupled with the mobile communication module 1050, and the antenna 2 is coupled with the wireless communication module 1060, so that the electronic device 1000 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), broadband Code division multiple access (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, etc.
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the electronic device 1000 implements a display function through a GPU, a display screen 1094, and an application processor.
  • the GPU is a microprocessor for image processing, which is connected to the display screen 1094 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations and is used for graphics rendering.
  • the processor 1010 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 1094 is used to display images, videos, and so on.
  • the display screen 1094 includes a display panel.
  • the display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the electronic device 1000 may include one or N display screens 1094, and N is a positive integer greater than one.
  • the electronic device 1000 can realize a shooting function through an ISP, a camera 1093, a video codec, a GPU, a display 1094, and an application processor.
  • the ISP is used to process the data fed back by the camera 1093. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 1093.
  • the camera 1093 is used to capture still images or videos.
  • the object generates an optical image through the lens and is projected to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 1000 may include 1 or N cameras 1093, and N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 1000 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 1000 may support one or more video codecs. In this way, the electronic device 1000 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • MPEG2 MPEG2, MPEG3, MPEG4, and so on.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • applications such as intelligent cognition of the electronic device 1000 can be implemented, such as image recognition, face recognition, voice recognition, text understanding, and so on.
  • the external memory interface 1020 may be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 1000.
  • the external memory card communicates with the processor 1010 through the external memory interface 1020 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 1021 may be used to store computer executable program code, where the executable program code includes instructions.
  • the internal memory 1021 may include a program storage area and a data storage area.
  • the storage program area can store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function, and the like.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 1000.
  • the internal memory 1021 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • the processor 1010 executes various functional applications and data processing of the electronic device 1000 by running instructions stored in the internal memory 1021 and/or instructions stored in a memory provided in the processor.
  • the electronic device 1000 can implement audio functions through an audio module 1070, a speaker 1070A, a receiver 1070B, a microphone 1070C, a headphone interface 1070D, and an application processor. For example, music playback, recording, etc.
  • the audio module 1070 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 1070 can also be used to encode and decode audio signals.
  • the audio module 1070 may be provided in the processor 1010, or part of the functional modules of the audio module 1070 may be provided in the processor 1010.
  • the speaker 1070A also called a “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device 1000 can listen to music through the speaker 1070A, or listen to a hands-free call.
  • the receiver 1070B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the electronic device 1000 answers a call or voice message, it can receive the voice by bringing the receiver 1070B close to the human ear.
  • the microphone 1070C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 1070C through the human mouth, and input the sound signal into the microphone 1070C.
  • the electronic device 1000 may be provided with at least one microphone 1070C. In other embodiments, the electronic device 1000 may be provided with two microphones 1070C, which can implement noise reduction functions in addition to collecting sound signals. In some other embodiments, the electronic device 1000 may also be provided with three, four or more microphones 1070C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
  • the earphone interface 1070D is used to connect wired earphones.
  • the earphone interface 1070D may be a USB interface 1030, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 1080A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 1080A may be provided on the display screen 1094.
  • the capacitive pressure sensor may include at least two parallel plates with conductive materials.
  • the electronic device 1000 may also calculate the touched position according to the detection signal of the pressure sensor 1080A.
  • touch operations that act on the same touch position but have different touch operation strengths may correspond to different operation instructions. For example: when a touch operation whose intensity of the touch operation is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 1080B may be used to determine the movement posture of the electronic device 1000.
  • the angular velocity of the electronic device 100 around three axes ie, x, y, and z axes
  • the gyro sensor 1080B can be used for shooting anti-shake.
  • the gyro sensor 1080B detects the jitter angle of the electronic device 1000, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the jitter of the electronic device 1000 through reverse movement to achieve anti-shake.
  • the gyroscope sensor 1080B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 1080C is used to measure air pressure.
  • the electronic device 1000 calculates the altitude based on the air pressure value measured by the air pressure sensor 1080C to assist positioning and navigation.
  • the magnetic sensor 1080D includes a Hall sensor.
  • the electronic device 1000 can use the magnetic sensor 1080D to detect the opening and closing of the flip holster.
  • the electronic device 1000 can detect the opening and closing of the flip according to the magnetic sensor 1080D.
  • features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 1080E can detect the magnitude of the acceleration of the electronic device 1000 in various directions (generally three axes). When the electronic device 1000 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and apply to applications such as horizontal and vertical screen switching, pedometers, and so on.
  • the electronic device 1000 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 1000 may use the distance sensor 1080F to measure the distance to achieve fast focusing.
  • the proximity light sensor 1080G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device 1000 emits infrared light to the outside through the light emitting diode.
  • the electronic device 1000 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 1000. When insufficient reflected light is detected, the electronic device 1000 can determine that there is no object near the electronic device 1000.
  • the electronic device 1000 can use the proximity light sensor 1080G to detect that the user holds the electronic device 1000 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 1080G can also be used in leather case mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 1080L is used to perceive the brightness of the ambient light.
  • the electronic device 1000 can adaptively adjust the brightness of the display screen 1094 according to the perceived brightness of the ambient light.
  • the ambient light sensor 1080L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 1080L can also cooperate with the proximity light sensor 1080G to detect whether the electronic device 1000 is in the pocket to prevent accidental touch.
  • the fingerprint sensor 1080H is used to collect fingerprints.
  • the electronic device 1000 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
  • the temperature sensor 1080J is used to detect temperature.
  • the electronic device 1000 uses the temperature detected by the temperature sensor 1080J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 1080J exceeds a threshold value, the electronic device 1000 executes to reduce the performance of the processor located near the temperature sensor 1080J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 1000 when the temperature is lower than another threshold, the electronic device 1000 heats the battery 1042 to avoid abnormal shutdown of the electronic device 1000 due to low temperature.
  • the electronic device 1000 boosts the output voltage of the battery 1042 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 1080K also called “touch device”.
  • the touch sensor 1080K can be set on the display screen 1094, and the touch screen is composed of the touch sensor 1080K and the display screen 1094, which is also called a “touch screen”.
  • the touch sensor 1080K is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 1094.
  • the touch sensor 1080K may also be disposed on the surface of the electronic device 1000, which is different from the position of the display screen 1094.
  • the bone conduction sensor 1080M can acquire vibration signals.
  • the bone conduction sensor 1080M can obtain the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 1080M can also contact the human pulse and receive the blood pressure pulse signal.
  • the bone conduction sensor 1080M may also be provided in the earphone, combined with the bone conduction earphone.
  • the audio module 1070 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 1080M, and realize the voice function.
  • the application processor may analyze the heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor 1080M, and realize the heart rate detection function.
  • the button 1090 includes a power-on button, a volume button, and so on.
  • the button 1090 may be a mechanical button. It can also be a touch button.
  • the electronic device 1000 may receive key input, and generate key signal input related to user settings and function control of the electronic device 1000.
  • the motor 1091 can generate vibration prompts.
  • the motor 1091 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
  • touch operations applied to different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display screen 1094, the motor 1091 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminding, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 1092 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 1095 is used to connect to the SIM card.
  • the SIM card can be inserted into the SIM card interface 1095 or pulled out from the SIM card interface 1095 to achieve contact and separation with the electronic device 1000.
  • the electronic device 1000 may support 1 or N SIM card interfaces, and N is a positive integer greater than 1.
  • the SIM card interface 1095 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
  • the same SIM card interface 1095 can insert multiple cards at the same time. The types of the multiple cards can be the same or different.
  • the SIM card interface 1095 can also be compatible with different types of SIM cards.
  • the SIM card interface 1095 can also be compatible with external memory cards.
  • the electronic device 1000 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the electronic device 1000 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 1000 and cannot be separated from the electronic device 1000.
  • the electronic device 1000 shown in FIG. 10 can implement various processes of the methods provided in the embodiments shown in FIGS. 3 to 7 of this application.
  • the operation and/or function of each module in the electronic device 1000 are respectively for implementing the corresponding process in the foregoing method embodiment.
  • processor 1010 in the electronic device 1000 shown in FIG. 10 may be a system-on-chip SOC, and the processor 1010 may include a central processing unit (CPU), and may further include other types of processors. For example: Graphics Processing Unit (GPU), etc.
  • CPU central processing unit
  • GPU Graphics Processing Unit
  • each part of the processor or processing unit inside the processor 1010 can cooperate to implement the previous method flow, and the corresponding software program of each part of the processor or processing unit can be stored in the internal memory 121.
  • the device includes a storage medium and a central processing unit.
  • the storage medium may be a non-volatile storage medium.
  • a computer executable program is stored in the storage medium.
  • the central processing unit is connected to the The non-volatile storage medium is connected, and the computer executable program is executed to implement the method provided by the embodiments shown in FIG. 3 to FIG. 7 of this application.
  • the processors involved may include, for example, CPU, DSP, microcontroller or digital signal processor, and may also include GPU, embedded neural network processor (Neural-network Process Units; hereinafter referred to as NPU) and Image signal processing (Image Signal Processing; hereinafter referred to as ISP), which may also include necessary hardware accelerators or logic processing hardware circuits, such as ASIC, or one or more integrated circuits used to control the execution of the technical solutions of this application Circuit etc.
  • the processor may have a function of operating one or more software programs, and the software programs may be stored in a storage medium.
  • An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, which when running on a computer, causes the computer to execute the functions provided by the embodiments shown in Figs. 3 to 7 of the present application. method.
  • the embodiments of the present application also provide a computer program product.
  • the computer program product includes a computer program that, when running on a computer, causes the computer to execute the method provided by the embodiments shown in FIGS. 3 to 7 of the present application.
  • At least one refers to one or more
  • multiple refers to two or more.
  • And/or describes the association relationship of the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. Among them, A and B can be singular or plural.
  • the character “/” generally indicates that the associated objects before and after are in an “or” relationship.
  • the following at least one item” and similar expressions refer to any combination of these items, including any combination of single items or plural items.
  • At least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single, or There can be more than one.
  • any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as ROM), random access memory (Random Access Memory; hereinafter referred to as RAM), magnetic disks or optical disks, etc.
  • ROM read-only memory
  • RAM random access memory
  • magnetic disks or optical disks etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

A screen projection method and apparatus, and an electronic device. In the screen projection method, a first electronic device displays various levels of controls of a source interface to a user, and acquires a control selected by the user from the various levels of controls; the first electronic device displays a virtual screen generated on the basis of screen information of a second electronic device to the user, and displays the control selected by the user on the virtual screen, and the control displayed on the virtual screen may be used by the user to perform an edit operation; and after detecting a confirmation operation of the user on an interface layout on the virtual screen, the first electronic device sends interface layout information of the virtual screen to the second electronic device, so that the second electronic device displays a screen projection interface of the source interface according to control identification and the layout information, thereby improving the screen projection effect and improving the user experience.

Description

投屏方法、装置和电子设备Screen projection method, device and electronic equipment 技术领域Technical field
本申请涉及智能终端技术领域,特别涉及投屏方法、装置和电子设备。This application relates to the technical field of smart terminals, in particular to screen projection methods, devices and electronic equipment.
背景技术Background technique
为了达到大屏显示、娱乐等各种不同目的,用户会使用投屏的方式将第一电子设备(如,手机)的界面投屏到第二电子设备(如,PC)上进行显示,上述第一电子设备和第二电子设备可以包括但不限于移动终端(手机)、PAD、PC、可穿戴设备、电子大屏幕、电视、汽车中控等。In order to achieve various purposes such as large-screen display and entertainment, the user will use the method of projection to project the interface of the first electronic device (such as a mobile phone) to the second electronic device (such as a PC) for display. The first electronic device and the second electronic device may include, but are not limited to, mobile terminals (mobile phones), PADs, PCs, wearable devices, electronic large screens, televisions, car central controls, etc.
目前,电子设备之间的投屏方式主要采用镜像模式,如图1所示,即将第一电子设备(如,手机)上的界面完整的投射到第二电子设备(如,PC)上。镜像模式的投屏方式下,第一电子设备(如,手机)显示的界面只能根据第二电子设备的屏幕大小进行相应的拉伸、缩放及裁剪,从而使得第二电子设备上显示的投屏界面出现变形、或者无法完整显示等问题,投屏效果差,用户体验差。Currently, the screen projection method between electronic devices mainly adopts the mirror mode, as shown in FIG. 1, that is, the interface on the first electronic device (eg, mobile phone) is completely projected onto the second electronic device (eg, PC). In the projection mode of mirroring mode, the interface displayed by the first electronic device (such as a mobile phone) can only be stretched, zoomed, and cropped according to the screen size of the second electronic device, so that the projection displayed on the second electronic device The screen interface is deformed, or cannot be displayed completely, and the screen projection effect is poor, and the user experience is poor.
发明内容Summary of the invention
本申请实施例提供了一种投屏方法、装置和电子设备,能够改善投屏效果,提升用户体验。The embodiments of the present application provide a screen projection method, device, and electronic equipment, which can improve the screen projection effect and enhance the user experience.
第一方面,本申请实施例提供了一种投屏方法,包括:In the first aspect, an embodiment of the present application provides a screen projection method, including:
第一电子设备向用户展示源界面的各层级控件,获取用户从各层级控件中选择的控件;并且,第一电子设备向用户展示基于第二电子设备的屏幕信息生成的虚拟屏幕,将用户选择的控件展示在虚拟屏幕上,虚拟屏幕上展示的控件能够被用户执行编辑操作;The first electronic device displays to the user various levels of controls of the source interface, and obtains the controls selected by the user from the various levels of controls; and, the first electronic device displays to the user a virtual screen generated based on the screen information of the second electronic device, and selects the user The controls are displayed on the virtual screen, and the controls displayed on the virtual screen can be edited by the user;
第一电子设备检测到用户针对虚拟屏幕上界面布局的确认操作后,将虚拟屏幕的界面布局信息发送至第二电子设备,界面布局信息包括:虚拟屏幕上放置的第一控件的第一控件标识以及布局信息,以便第二电子设备根据界面布局信息显示源界面的投屏界面。After detecting the user's confirmation operation on the interface layout on the virtual screen, the first electronic device sends the interface layout information of the virtual screen to the second electronic device, and the interface layout information includes: the first control identifier of the first control placed on the virtual screen And layout information, so that the second electronic device displays the projection interface of the source interface according to the interface layout information.
上述第一电子设备或者第二电子设备可以为移动终端(手机),智慧屏,无人机,智能网联车(Intelligent Connected Vehicle;以下简称:ICV),智能(汽)车(smart/intelligent car)或车载设备等设备。The above-mentioned first electronic device or the second electronic device may be a mobile terminal (mobile phone), a smart screen, a drone, an intelligent connected vehicle (hereinafter referred to as ICV), or a smart/intelligent car. ) Or on-board equipment and other equipment.
该方法能够使得第二电子设备上显示的投屏界面的布局与用户确认操作时虚拟屏幕上的界面布局一致,从而使得投屏界面的视觉效果更类似第二电子设备的原生应用程序界面的视觉效果,而不仅仅是第一电子设备中源界面的镜像、拷贝、拉伸、 缩放,从而给用户提供更自然更原生的投屏体验。This method can make the layout of the projection interface displayed on the second electronic device consistent with the interface layout on the virtual screen when the user confirms the operation, so that the visual effect of the projection interface is more similar to that of the native application interface of the second electronic device The effect is not just the mirroring, copying, stretching, and scaling of the source interface in the first electronic device, so as to provide users with a more natural and native screen projection experience.
其中,第一电子设备向用户展示源界面的各层级控件,包括:Among them, the first electronic device displays to the user various levels of controls of the source interface, including:
第一电子设备从源界面的界面数据中提取第一数据,第一数据中记录有源界面中控件的控件标识、控件之间层级关系、以及控件的控件绘制指令;The first electronic device extracts first data from the interface data of the source interface, and the first data records the control identifiers of the controls in the active interface, the hierarchical relationship between the controls, and the control drawing instructions of the controls;
第一电子设备根据第一数据向用户展示源界面的各层级控件。The first electronic device displays various levels of controls of the source interface to the user according to the first data.
其中,第一电子设备从源界面的界面数据中提取第一数据,包括:Wherein, the first electronic device extracts the first data from the interface data of the source interface, including:
第一电子设备从源界面的界面数据中提取视图树,视图树记录有源界面中控件的控件标识以及控件之间层级关系,从界面数据中提取视图树中记录的控件标识对应的控件绘制指令。The first electronic device extracts the view tree from the interface data of the source interface, the view tree records the control identifiers of the controls in the active interface and the hierarchical relationship between the controls, and extracts the control drawing instructions corresponding to the control identifiers recorded in the view tree from the interface data .
其中,第一电子设备根据第一数据向用户展示源界面的各层级控件,包括:Wherein, the first electronic device displays to the user various levels of controls of the source interface according to the first data, including:
第一电子设备使用控件的控件绘制指令按照控件之间的层级关系绘制源界面的各层级控件,向用户展示绘制的各层级控件;和/或,The first electronic device uses the control drawing instruction of the control to draw each level control of the source interface according to the hierarchical relationship between the controls, and to show the drawn each level control to the user; and/or,
第一电子设备向用户展示控件的控件标识以及控件之间的层级关系。The first electronic device displays the control identification of the control and the hierarchical relationship between the controls to the user.
其中,第一电子设备的屏幕被划分为第一显示区域和第二显示区域;Wherein, the screen of the first electronic device is divided into a first display area and a second display area;
第一电子设备向用户展示源界面的各层级控件,包括:The first electronic device displays to the user various levels of controls of the source interface, including:
第一电子设备在第一显示区域向用户展示源界面的各层级控件;The first electronic device displays various levels of controls of the source interface to the user in the first display area;
第一电子设备向用户展示基于第二电子设备的屏幕信息生成的虚拟屏幕,包括:The first electronic device shows the user a virtual screen generated based on the screen information of the second electronic device, including:
第一电子设备在第二显示区域向用户展示虚拟屏幕。The first electronic device displays a virtual screen to the user in the second display area.
其中,还包括:Among them, it also includes:
第一电子设备根据界面布局信息中的第一控件标识,对发送至第二电子设备的源界面的界面数据的第一数据中的第一控件标识进行标记。The first electronic device marks the first control identifier in the first data of the interface data sent to the source interface of the second electronic device according to the first control identifier in the interface layout information.
其中,第一电子设备将获取到的第一控件标识以及布局信息发送至第二电子设备,包括:Wherein, the first electronic device sends the acquired first control identifier and layout information to the second electronic device, including:
第一电子设备将获取到的界面布局信息携带在源界面的界面数据中发送至第二电子设备。The first electronic device carries the acquired interface layout information in the interface data of the source interface and sends it to the second electronic device.
第二方面,本申请实施例提供一种投屏方法,包括:In the second aspect, an embodiment of the present application provides a screen projection method, including:
第二电子设备接收第一电子设备发送的界面布局信息,界面布局信息包括:第一控件标识以及布局信息;界面布局信息是第一电子设备检测到用户针对虚拟屏幕上界面布局的确认操作时虚拟屏幕的界面布局信息;The second electronic device receives the interface layout information sent by the first electronic device. The interface layout information includes: the first control identifier and layout information; The interface layout information of the screen;
第二电子设备接收第一电子设备发送的源界面的界面数据;The second electronic device receives the interface data of the source interface sent by the first electronic device;
第二电子设备根据界面数据,按照界面布局信息显示源界面的投屏界面。The second electronic device displays the projection interface of the source interface according to the interface data and the interface layout information.
该方面使得第二电子设备上显示的投屏界面的布局与用户确认操作时虚拟屏幕上的界面布局一致,从而使得投屏界面的视觉效果更类似第二电子设备的原生应用程序界面的视觉效果,而不仅仅是第一电子设备中源界面的镜像、拷贝、拉伸、缩放,从而给用户提供更自然更原生的投屏体验。This aspect makes the layout of the projection interface displayed on the second electronic device consistent with the interface layout on the virtual screen when the user confirms the operation, so that the visual effect of the projection interface is more similar to the visual effect of the native application interface of the second electronic device , Not just the mirroring, copying, stretching, and zooming of the source interface in the first electronic device, so as to provide users with a more natural and native screen projection experience.
其中,第二电子设备根据界面数据,按照界面布局信息显示源界面的投屏界面,包括:Wherein, the second electronic device displays the projection interface of the source interface according to the interface data and the interface layout information, including:
第二电子设备从界面布局信息中获取第一控件标识以及第一控件标识对应的布 局信息;第二电子设备根据获取到的第一控件标识从界面数据中获取第一控件标识对应的控件绘制指令;The second electronic device obtains the first control identifier and the layout information corresponding to the first control identifier from the interface layout information; the second electronic device obtains the control drawing instruction corresponding to the first control identifier from the interface data according to the acquired first control identifier ;
第二电子设备按照第一控件标识对应的布局信息,使用第一控件标识对应的控件绘制指令绘制第一控件标识对应的控件。The second electronic device draws the control corresponding to the first control identifier using the control drawing instruction corresponding to the first control identifier according to the layout information corresponding to the first control identifier.
其中,界面数据中的第一控件标识具有标记,第二电子设备根据界面数据,按照界面布局信息显示源界面的投屏界面,包括:Wherein, the first control identifier in the interface data has a mark, and the second electronic device displays the projection interface of the source interface according to the interface data and the interface layout information, including:
第二电子设备从界面布局信息中获取第一控件标识以及第一控件标识对应的布局信息;The second electronic device obtains the first control identifier and the layout information corresponding to the first control identifier from the interface layout information;
第二电子设备从界面数据中获取具有标记的第一控件标识对应的控件绘制指令;The second electronic device obtains, from the interface data, a control drawing instruction corresponding to the marked first control identifier;
第二电子设备按照第一控件标识对应的布局信息,使用第一控件标识对应的控件绘制指令绘制第一控件标识对应的控件。The second electronic device draws the control corresponding to the first control identifier using the control drawing instruction corresponding to the first control identifier according to the layout information corresponding to the first control identifier.
第三方面,本申请实施例提供一种第一电子设备,包括:In a third aspect, an embodiment of the present application provides a first electronic device, including:
显示屏;一个或多个处理器;存储器;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被第一电子设备执行时,使得第一电子设备执行以下步骤:Display screen; one or more processors; memory; and one or more computer programs, one or more computer programs are stored in the memory, one or more computer programs include instructions, when the instructions are executed by the first electronic device When the time, the first electronic device is caused to perform the following steps:
向用户展示源界面的各层级控件,获取用户从各层级控件中选择的控件;并且,向用户展示基于第二电子设备的屏幕信息生成的虚拟屏幕,将用户选择的控件展示在虚拟屏幕上,虚拟屏幕上展示的控件能够被用户执行编辑操作;Show the user each level of control of the source interface, obtain the control selected by the user from each level of control; and show the user a virtual screen generated based on the screen information of the second electronic device, and display the control selected by the user on the virtual screen, The controls displayed on the virtual screen can be edited by the user;
检测到用户针对虚拟屏幕上界面布局的确认操作后,将虚拟屏幕的界面布局信息发送至第二电子设备,界面布局信息包括:虚拟屏幕上放置的第一控件的第一控件标识以及布局信息,以便第二电子设备根据界面布局信息显示源界面的投屏界面。After detecting the user's confirmation operation on the interface layout on the virtual screen, the interface layout information of the virtual screen is sent to the second electronic device. The interface layout information includes: the first control identifier of the first control placed on the virtual screen and the layout information, So that the second electronic device displays the projection interface of the source interface according to the interface layout information.
其中,指令被第一电子设备执行时,使得向用户展示源界面的各层级控件的步骤包括:Wherein, when the instruction is executed by the first electronic device, the step of causing the user to show each level of control of the source interface includes:
从源界面的界面数据中提取第一数据,第一数据中记录有源界面中控件的控件标识、控件之间层级关系、以及控件的控件绘制指令;Extracting first data from the interface data of the source interface, the first data records the control identifiers of the controls in the active interface, the hierarchical relationship between the controls, and the control drawing instructions of the controls;
根据第一数据向用户展示源界面的各层级控件。According to the first data, various levels of controls of the source interface are displayed to the user.
其中,指令被第一电子设备执行时,使得从源界面的界面数据中提取第一数据的步骤包括:Wherein, when the instruction is executed by the first electronic device, the step of causing the first data to be extracted from the interface data of the source interface includes:
从源界面的界面数据中提取视图树,视图树记录有源界面中控件的控件标识以及控件之间层级关系;从界面数据中提取视图树中记录的控件标识对应的控件绘制指令。The view tree is extracted from the interface data of the source interface, and the view tree records the control identifiers of the controls in the active interface and the hierarchical relationship between the controls; the control drawing instructions corresponding to the control identifiers recorded in the view tree are extracted from the interface data.
其中,指令被第一电子设备执行时,使得根据第一数据向用户展示源界面的各层级控件的步骤包括:Wherein, when the instruction is executed by the first electronic device, the step of causing the user to display each level of control of the source interface according to the first data includes:
使用控件的控件绘制指令按照控件之间的层级关系绘制源界面的各层级控件,向用户展示绘制的各层级控件;和/或,Use the control drawing instructions of the control to draw each level control of the source interface according to the hierarchical relationship between the controls, and show the drawn each level control to the user; and/or,
向用户展示控件的控件标识以及控件之间的层级关系。Show the user the control ID of the control and the hierarchical relationship between the controls.
其中,第一电子设备的屏幕被划分为第一显示区域和第二显示区域;Wherein, the screen of the first electronic device is divided into a first display area and a second display area;
指令被第一电子设备执行时,使得向用户展示源界面的各层级控件的步骤包括:When the instruction is executed by the first electronic device, the steps of causing the user to show the various levels of controls of the source interface include:
在第一显示区域向用户展示源界面的各层级控件;In the first display area, the various levels of controls of the source interface are displayed to the user;
指令被第一电子设备执行时,使得向用户展示基于第二电子设备的屏幕信息生成的虚拟屏幕的步骤包括:When the instruction is executed by the first electronic device, the step of causing the user to show the virtual screen generated based on the screen information of the second electronic device includes:
在第二显示区域向用户展示虚拟屏幕。The virtual screen is shown to the user in the second display area.
其中,指令被第一电子设备执行时,使得第一电子设备还执行以下步骤:Wherein, when the instruction is executed by the first electronic device, the first electronic device further executes the following steps:
根据界面布局信息中的第一控件标识,对发送至第二电子设备的源界面的界面数据的第一数据中的第一控件标识进行标记。According to the first control identifier in the interface layout information, the first control identifier in the first data of the interface data sent to the source interface of the second electronic device is marked.
其中,指令被第一电子设备执行时,使得将获取到的控件标识以及布局信息发送至第二电子设备的步骤包括:Wherein, when the instruction is executed by the first electronic device, the step of causing the acquired control identifier and layout information to be sent to the second electronic device includes:
将获取到的界面布局信息携带在源界面的界面数据中发送至第二电子设备。The obtained interface layout information is carried in the interface data of the source interface and sent to the second electronic device.
第四方面,本申请实施例提供一种第二电子设备,包括:In a fourth aspect, an embodiment of the present application provides a second electronic device, including:
显示屏;一个或多个处理器;存储器;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被第二电子设备执行时,使得第二电子设备执行以下步骤:Display screen; one or more processors; memory; and one or more computer programs, one or more computer programs are stored in the memory, one or more computer programs include instructions, when the instructions are executed by the second electronic device When the time, the second electronic device is caused to perform the following steps:
接收第一电子设备发送的界面布局信息,界面布局信息包括:第一控件标识以及布局信息;界面布局信息是第一电子设备检测到用户针对虚拟屏幕上界面布局的确认操作时虚拟屏幕的界面布局信息;Receive interface layout information sent by the first electronic device, where the interface layout information includes: a first control identifier and layout information; the interface layout information is the interface layout of the virtual screen when the first electronic device detects the user's confirmation operation on the interface layout on the virtual screen information;
接收第一电子设备发送的源界面的界面数据;Receiving the interface data of the source interface sent by the first electronic device;
根据界面数据,按照界面布局信息显示源界面的投屏界面。According to the interface data, the projection interface of the source interface is displayed according to the interface layout information.
其中,指令被第二电子设备执行时,使得根据界面数据,按照第一控件标识以及布局信息显示源界面的投屏界面的步骤包括:Wherein, when the instruction is executed by the second electronic device, the step of causing the screen projection interface of the source interface to be displayed according to the first control identifier and layout information according to the interface data includes:
从界面布局信息中获取第一控件标识以及第一控件标识对应的布局信息;根据获取到的第一控件标识从界面数据中获取第一控件标识对应的控件绘制指令;Acquiring the first control identifier and the layout information corresponding to the first control identifier from the interface layout information; acquiring the control drawing instruction corresponding to the first control identifier from the interface data according to the acquired first control identifier;
按照第一控件标识对应的布局信息,使用第一控件标识对应的控件绘制指令绘制第一控件标识对应的控件。According to the layout information corresponding to the first control identifier, the control corresponding to the first control identifier is drawn using the control drawing instruction corresponding to the first control identifier.
其中,界面数据中的第一控件标识具有标记;指令被第二电子设备执行时,使得根据界面数据,按照第一控件标识以及布局信息显示源界面的投屏界面的步骤包括:Wherein, the first control identifier in the interface data has a mark; when the instruction is executed by the second electronic device, the step of causing the screen projection interface of the source interface to be displayed according to the first control identifier and layout information according to the interface data includes:
从界面布局信息中获取第一控件标识以及第一控件标识对应的布局信息;从界面数据中获取具有标记的第一控件标识对应的控件绘制指令;Acquiring the first control identifier and the layout information corresponding to the first control identifier from the interface layout information; acquiring the control drawing instruction corresponding to the marked first control identifier from the interface data;
按照第一控件标识对应的布局信息,使用第一控件标识对应的控件绘制指令绘制第一控件标识对应的控件。According to the layout information corresponding to the first control identifier, the control corresponding to the first control identifier is drawn using the control drawing instruction corresponding to the first control identifier.
第五方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行第一方面的方法。In the fifth aspect, an embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and when it runs on a computer, the computer executes the method of the first aspect.
第六方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行第二方面的方法。In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and when the computer program is run on a computer, the computer executes the method of the second aspect.
第七方面,本申请提供一种计算机程序,当计算机程序被计算机执行时,用于执行第一方面或第二方面的方法。In a seventh aspect, this application provides a computer program, which is used to execute the method of the first aspect or the second aspect when the computer program is executed by a computer.
在一种可能的设计中,第七方面中的程序可以全部或者部分存储在与处理器封装在一起的存储介质上,也可以部分或者全部存储在不与处理器封装在一起的存储器上。In a possible design, the program in the seventh aspect may be stored in whole or in part on a storage medium packaged with the processor, or may be stored in part or in a memory not packaged with the processor.
附图说明Description of the drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to explain the technical solutions of the embodiments of the present invention more clearly, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative work, other drawings can be obtained from these drawings.
图1为现有技术镜像模式下的投屏方式示例图;Fig. 1 is an example diagram of a screen projection method in a mirror image mode in the prior art;
图2A为本申请实施例系统提供投屏功能的示例图;FIG. 2A is an example diagram of a screen projection function provided by the system according to an embodiment of the application; FIG.
图2B为本申请实施例控件层级示例图;FIG. 2B is an example diagram of the control hierarchy of the embodiment of this application;
图2C为本申请实施例指令抽取示例图;2C is an example diagram of instruction extraction according to an embodiment of the application;
图2D为本申请实施例视图树示例图;FIG. 2D is an example diagram of a view tree according to an embodiment of the application;
图3为本申请投屏方法一个实施例的流程图;FIG. 3 is a flowchart of an embodiment of the screen projection method of this application;
图4为本申请投屏方法另一个实施例的流程图;FIG. 4 is a flowchart of another embodiment of the screen projection method of this application;
图5为本申请投屏方法又一个实施例的流程图;FIG. 5 is a flowchart of another embodiment of the screen projection method according to this application;
图6为本申请投屏方法又一个实施例的流程图;FIG. 6 is a flowchart of another embodiment of the screen projection method according to this application;
图7为本申请投屏方法又一个实施例的流程图;FIG. 7 is a flowchart of another embodiment of the screen projection method according to this application;
图8为本申请投屏装置一个实施例的结构图;FIG. 8 is a structural diagram of an embodiment of the screen projection device of this application;
图9为本申请投屏装置另一个实施例的结构图;FIG. 9 is a structural diagram of another embodiment of a screen projection device according to the present application;
图10为本申请电子设备一个实施例的结构示意图。FIG. 10 is a schematic structural diagram of an embodiment of an electronic device of this application.
具体实施方式Detailed ways
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。The terms used in the implementation mode part of this application are only used to explain specific embodiments of this application, and are not intended to limit this application.
以下,先对本申请实施例中涉及的名词以及相关技术原理进行示例性而非限定性的说明。Hereinafter, the terms and related technical principles involved in the embodiments of the present application will be described exemplarily but not limitedly.
本申请实施例中“投屏”是指,将一个电子设备上的界面数据传输至另一电子设备上进行显示。为了方便说明,本申请实施例中,将上述的“一个电子设备”称为“第一电子设备”;将上述“另一电子设备”称为“第二电子设备”;将第一电子设备中需要投屏的界面称为“源界面”,将第一电子设备投屏后显示在第二电子设备中的界面称为“投屏界面”。需要说明的是,投屏功能可以是由系统提供的,也可以是由应用提供的,本申请实施例不作限定。"Screen projection" in the embodiments of the present application refers to transferring interface data on one electronic device to another electronic device for display. For the convenience of description, in the embodiments of the present application, the above-mentioned "one electronic device" is referred to as the "first electronic device"; the above-mentioned "another electronic device" is referred to as the "second electronic device"; The interface that needs to be projected is called the "source interface", and the interface displayed in the second electronic device after the first electronic device is projected is called the "projection interface". It should be noted that the screen projection function may be provided by the system or by the application, which is not limited in the embodiment of the present application.
参见图2A所示,给出了投屏功能由系统提供的一种示例图。具体的,用户通过以下路径的操作,即可以实现两个电子设备之间的投屏:用户在第一电子设备中调出系统下拉通知——选择更多快捷工具——找到无线投屏或镜像入口——选择可连接设备,被选择的可连接的电子设备作为本申请实施例中的第二电子设备。Refer to Figure 2A, which shows an example of the screen projection function provided by the system. Specifically, the user can realize the screen projection between two electronic devices through the following operations: the user brings up the system drop-down notification in the first electronic device-selects more shortcut tools-finds wireless projection or mirroring Entrance—Select a connectable device, and the selected connectable electronic device is used as the second electronic device in the embodiment of the present application.
本申请实施例中进行投屏的两个电子设备之间可以直接连接,例如通过蓝牙、 WiFi等实现两个电子设备之间的直接连接;或者,两个电子设备之间也可以通过分别与其他电子设备例如云端服务器连接从而实现间接连接。在投屏的过程中,两个电子设备之间的连接可以在直接连接和间接连接之间进行切换,本申请实施例不作限定。In the embodiments of this application, the two electronic devices that perform screen projection can be directly connected, for example, the direct connection between the two electronic devices can be realized through Bluetooth, WiFi, etc.; or, the two electronic devices can also be connected to other electronic devices separately. Electronic devices such as cloud servers are connected to achieve indirect connection. During the screen projection process, the connection between the two electronic devices can be switched between direct connection and indirect connection, which is not limited in the embodiment of the present application.
本申请实施例中的应用程序界面是应用程序与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。应用程序界面常用的表现形式是图形用户界面(Graphic User Interface,以下简称GUI),是指采用图形方式显示的与计算机操作相关的用户界面。界面可以由图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、微件(Widget)等可视的界面元素组成,这些可视的界面元素可以称为应用程序界面的控件。The application program interface in the embodiment of the present application is a medium interface for interaction and information exchange between the application program and the user, and it realizes the conversion between the internal form of the information and the form acceptable to the user. The commonly used form of application program interface is Graphic User Interface (GUI for short), which refers to a user interface related to computer operations that is displayed in a graphical manner. The interface can be composed of visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets. These visual interface elements can be called application interface elements. Control.
应用程序界面中的控件是具有层级的,例如整个应用程序界面可以认为是最低层级的控件,也即第一层级的控件,层级越高,控件越精细,控件数量也越多。举例来说,参见图2B所示,假设有一个界面中包括按钮组1和按钮组2,每个按钮组中包括3个按钮,那么,该界面可以认为是最低层级的控件,按钮组1和按钮组2是第二层级的控件,按钮11~13、21~23是第三层级的控件。The controls in the application interface are hierarchical. For example, the entire application interface can be considered as the lowest-level controls, that is, the first-level controls. The higher the level, the finer the controls and the greater the number of controls. For example, referring to Figure 2B, suppose there is an interface including button group 1 and button group 2, and each button group includes 3 buttons, then the interface can be considered as the lowest level control, button group 1 and Button group 2 is the second level of controls, and buttons 11-13 and 21-23 are the third level of controls.
需要说明的是,源界面的界面数据中记录有源界面的控件以及控件之间的层级关系。例如在Android系统中,应用程序界面(Activity)的界面数据的Android framework层中有skia指令,如图2C所示,具体可以从指令层skcanvas抽取skia指令,skia指令中记录着视图树(View Tree)、控件绘制指令;其中,It should be noted that the interface data of the source interface records the controls of the active interface and the hierarchical relationship between the controls. For example, in the Android system, there are skia instructions in the Android framework layer of the application program interface (Activity) interface data, as shown in Figure 2C. Specifically, the skia instructions can be extracted from the instruction layer skcanvas. The skia instructions record the view tree (View Tree). ), control drawing instructions; among them,
视图树记录着View以及View之间的层级关系,View是Android系统中所有控件的基类,是界面层的控件的一种抽象,View通常代表一个控件,此外,视图组(ViewGroup)是一种特殊的View,它代表了不同View之间的组合关系,通常情况下应用程序的整个界面是一个ViewGroup,其中每个控件是单独的一个View,View和ViewGroup可以进行组合/嵌套,组合/嵌套后形成一棵完整View树,View树也即记录着应用程序界面中不同层级的控件以及控件之间的层级关系。举例来说,View树中一般通过控件标识(ID)来标识控件,参见图2D所示的视图树截图(以下不再区分View与ViewGroup),可以认为:DecorView为第一层级的view,ID分别为action mode bar stub(ViewStub)和content(FrameLayout)的控件对应的ID位于第二层级;ID分别为操作栏split action bar(HWToolBarMenuContainer)、会话列表converstion list(FrameLayout)和工具栏容器布局toolbar container layout(RelativeLayout)的控件对应的ID位于第三层级;ID分别为开始新对话按钮start new conversation button(ImageView)和工具栏hwtoolbar(HwToolbar)的控件对应的ID位于第四层级。因此,视图树通过控件标识以及控件标识之间的层级关系记录着应用程序界面中不同层级的控件以及控件之间的层级关系。The view tree records the hierarchical relationship between View and View. View is the base class of all controls in the Android system. It is an abstraction of interface layer controls. View usually represents a control. In addition, ViewGroup is a kind of A special View, which represents the combination relationship between different Views. Normally, the entire interface of the application is a ViewGroup, where each control is a separate View. Views and ViewGroups can be combined/nested, combined/embedded After the set, a complete View tree is formed. The View tree also records the controls at different levels in the application interface and the hierarchical relationship between the controls. For example, the View tree generally uses the control identifier (ID) to identify the control. See the screenshot of the view tree shown in Figure 2D (View and ViewGroup will not be distinguished below). It can be considered that DecorView is the first-level view, and the IDs are respectively The IDs corresponding to the controls for action mode bar stub (ViewStub) and content (FrameLayout) are located in the second level; the IDs are action bar split action bar (HWToolBarMenuContainer), conversation list conversation list (FrameLayout), and toolbar container layout. The IDs corresponding to the controls of (RelativeLayout) are located at the third level; the IDs are the start new conversation button (ImageView) and the corresponding IDs of the controls of the toolbar hwtoolbar (HwToolbar) are located at the fourth level. Therefore, the view tree records the controls at different levels in the application interface and the hierarchical relationship between the controls through the control identifier and the hierarchical relationship between the control identifiers.
控件绘制指令与视图树存在关联关系,记录着视图树中的各个控件的可视化图形是如何绘制的,并且记录着各个控件的控件显示内容。其中,针对于某一个控件,该控件可能仅包括可视化图形或者控件显示内容,也可能既包括可视化图形又包括控件显示内容。电子设备基于控件绘制指令可以将视图树中的各层级控件绘制出来,得到各个控件的可视化图形和/或控件显示内容,从而构成应用程序界面。Control drawing instructions are associated with the view tree, recording how the visual graphics of each control in the view tree are drawn, and recording the control display content of each control. Among them, for a certain control, the control may only include visual graphics or control display content, or may include both visual graphics and control display content. The electronic device can draw each level of the control in the view tree based on the control drawing instruction to obtain the visual graphics of each control and/or the display content of the control, thereby forming an application program interface.
本申请实施例中的控件显示内容是指应用程序界面中各个控件除可视化图形外所需展示的数字、文字等数据。以图2B所示,控件绘制指令可以绘制出控件的可视化图形,例如图2B中代表按钮的方框,也可以同时绘制出控件上展示的文字例如按钮11、按钮12等。控件显示内容可能是不变的,也可能是不断变化的。在控件显示内容发生变化时,第一电子设备可以向第二电子设备发送控件显示内容发生变化的控件ID、以及变化后的控件显示内容,或者也可以向第二电子设备发送控件显示内容发生变化后的源界面的界面数据,第二电子设备对应更新投屏界面,以保持源界面和投屏界面显示的内容一致。The display content of the controls in the embodiments of the present application refers to data such as numbers and texts that need to be displayed for each control in the application program interface in addition to the visual graphics. As shown in FIG. 2B, the control drawing instruction can draw the visual graphics of the control, such as the box representing the button in FIG. 2B, and can also draw the text displayed on the control, such as button 11, button 12, etc. at the same time. The display content of the control may be constant or may be constantly changing. When the control display content changes, the first electronic device may send the control ID of the control display content change and the changed control display content to the second electronic device, or may also send the control display content change to the second electronic device After the interface data of the source interface, the second electronic device updates the projection interface correspondingly to keep the content displayed on the source interface and the projection interface consistent.
在开始投屏时,第一电子设备将源界面的界面数据发送至第二电子设备;在投屏过程中,第一电子设备的源界面可能会发生变化,例如用户点击源界面中某一个按钮,从而打开另一个应用程序界面,则源界面变为新打开的应用程序界面,这时,第一电子设备可以重新向第二电子设备发送源界面的界面数据,以保持投屏界面和源界面显示的内容一致。When starting the screen projection, the first electronic device sends the interface data of the source interface to the second electronic device; during the screen projection process, the source interface of the first electronic device may change, for example, the user clicks a button in the source interface , To open another application interface, the source interface becomes the newly opened application interface. At this time, the first electronic device can re-send the interface data of the source interface to the second electronic device to maintain the projection interface and the source interface The displayed content is the same.
以下对本申请实施例投屏方法进行说明。The following describes the projection method of the embodiment of the present application.
现有技术中,电子设备之间的投屏方式主要采用镜像模式,如图1所示,即将第一电子设备(如,手机)上的界面完整的投射到第二电子设备(如,PC)上。以基于安卓的Miracast和基于iOS的AirPlay这两种投屏方法为例,此二者的基本原理均为:对第一电子设备的界面数据进行音视频编码处理后,发送到第二电子设备,第二电子设备进行解码处理,得到第一电子设备的界面数据进行显示。上述投屏方式中投屏界面只能根据第二电子设备的屏幕大小进行相应的拉伸、缩放及裁剪,从而使得第二电子设备上显示的投屏界面出现变形、或者无法完整显示等问题,投屏效果差,用户体验差。In the prior art, the screen projection method between electronic devices mainly adopts the mirror mode, as shown in FIG. 1, that is, the interface on the first electronic device (eg, mobile phone) is completely projected to the second electronic device (eg, PC). superior. Take the Android-based Miracast and iOS-based AirPlay as examples. The basic principles of both are: the interface data of the first electronic device is encoded with audio and video and then sent to the second electronic device. The second electronic device performs decoding processing to obtain the interface data of the first electronic device for display. In the above-mentioned projection method, the projection interface can only be stretched, zoomed, and cropped according to the screen size of the second electronic device, so that the projection interface displayed on the second electronic device is deformed or cannot be displayed completely. The projection effect is poor and the user experience is poor.
为此,本申请实施例提供一种投屏方法、装置和电子设备,能够改善投屏效果,提升用户体验。To this end, embodiments of the present application provide a screen projection method, device, and electronic equipment, which can improve the screen projection effect and enhance user experience.
图3为本申请投屏方法一个实施例的流程图,如图3所示,该方法可以包括:Fig. 3 is a flowchart of an embodiment of a screen projection method according to this application. As shown in Fig. 3, the method may include:
步骤301:第一电子设备向用户展示源界面的各层级控件,获取用户从各层级控件中选择的控件。Step 301: The first electronic device displays each level of control of the source interface to the user, and obtains the control selected by the user from each level of control.
其中,第一电子设备向用户展示源界面的各层级控件时,展示的可以是:控件,和/或,控件标识之间的层级关系。Wherein, when the first electronic device displays each level of control of the source interface to the user, it may display: the control and/or the hierarchical relationship between the control identifiers.
需要说明的是,应用程序界面中的控件在应用程序界面中显示为可视化图形,但是,大多数控件是具有执行功能或通过“事件”引发代码运行并完成响应的功能的,这种功能通过用户的点击等操作可以触发。在本申请实施例中,第一电子设备向用户展示源界面的各层级控件,主要作用在于方便用户直观选择所需要的控件,因此,本申请实施例中第一电子设备在展示控件时可以仅展示控件的可视化图形和/或控件显示内容,而不提供针对于控件的功能的响应操作。举例来说,假设图2B中的按钮11的控件显示内容为:下一页,当用户使用鼠标单击时,可以触发应用程序打开下一页对应的应用程序界面(也即执行“下一页”这一按钮的功能),在本步骤中向用户展示的控件,可以仅展示按钮11的可视化图形和“下一页”这一控件显示内容, 用户使用鼠标单击可以选中该可视化图形,但是可以不再提供上述打开下一页对应的应用程序界面这一响应操作。It should be noted that the controls in the application program interface are displayed as visual graphics in the application program interface. However, most controls have the function of executing the function or triggering the code to run and complete the response through the "event". This function is used by the user Click and other operations can be triggered. In the embodiment of the present application, the first electronic device displays various levels of controls of the source interface to the user. The main function is to facilitate the user to intuitively select the required controls. Therefore, in the embodiment of the present application, the first electronic device may only display the controls. Display the visual graphics of the control and/or the display content of the control without providing a response operation for the function of the control. For example, suppose that the control display content of button 11 in Figure 2B is: Next page, when the user clicks with the mouse, the application can be triggered to open the application interface corresponding to the next page (that is, execute "Next page" "The function of this button). In this step, the control shown to the user can only show the visual graphic of button 11 and the display content of the "Next Page" control. The user can select the visual graphic by clicking with the mouse, but The response operation of opening the application program interface corresponding to the next page may no longer be provided.
需要说明的是,例如视图树等控件标识之间的层级关系一般属于界面的内部属性,并不直观反应具体控件,因此,对于不是本领域技术人员的大多用户而言,向用户展示控件的方式更为直观,具有更好的用户体验。It should be noted that, for example, the hierarchical relationship between control identifiers such as the view tree generally belongs to the internal properties of the interface, and does not intuitively reflect the specific control. Therefore, for most users who are not skilled in the art, the way to show the control to the user It is more intuitive and has a better user experience.
步骤302:第一电子设备向用户展示基于第二电子设备的屏幕信息生成的虚拟屏幕,将用户选择的控件展示在虚拟屏幕上,所述虚拟屏幕上展示的控件能够被用户执行编辑操作。Step 302: The first electronic device displays a virtual screen generated based on the screen information of the second electronic device to the user, and displays the controls selected by the user on the virtual screen, and the controls displayed on the virtual screen can be edited by the user.
其中,第二电子设备的屏幕信息可以包括:第二电子设备的显示屏的横向尺寸和纵向尺寸(或者纵横比)。第二电子设备的屏幕信息还可以包括:交互方式等。交互方式可以包括:显示屏是否支持触控等。The screen information of the second electronic device may include: the horizontal size and the vertical size (or aspect ratio) of the display screen of the second electronic device. The screen information of the second electronic device may also include: interactive mode and so on. The interaction mode may include: whether the display screen supports touch control, etc.
其中,所述用户对控件执行的编辑操作可以包括但不限于:位置移动、尺寸变化、显示方向变化、和/或删除等。Wherein, the editing operation performed by the user on the control may include, but is not limited to: position movement, size change, display direction change, and/or deletion.
其中,步骤302中第一电子设备向用户展示虚拟屏幕,可以与步骤301中第一电子设备向用户展示源界面的各层级控件同时执行,也即第一电子设备同时向用户展示各层级控件以及虚拟屏幕;或者,步骤302中第一电子设备向用户展示虚拟屏幕,也可以在步骤301之后执行,本申请实施例不作限定。Wherein, the first electronic device showing the virtual screen to the user in step 302 can be executed at the same time as the first electronic device showing each level of control of the source interface to the user in step 301, that is, the first electronic device simultaneously showing each level of control to the user and Virtual screen; or, in step 302, the first electronic device displays the virtual screen to the user, which can also be executed after step 301, which is not limited in the embodiment of the present application.
可选地,虚拟屏幕上展示的控件也可以为控件的可视化图形和/或控件显示内容,而不提供针对于控件的功能的响应操作。Optionally, the controls displayed on the virtual screen may also be the visual graphics of the control and/or the display content of the control, without providing a response operation for the function of the control.
步骤303:第一电子设备检测到用户针对虚拟屏幕上界面布局的确认操作,将虚拟屏幕的界面布局信息发送至第二电子设备,界面布局信息包括:虚拟屏幕上放置的第一控件的第一控件标识以及布局信息,以便第二电子设备根据界面布局信息显示源界面的投屏界面。Step 303: The first electronic device detects the user's confirmation operation for the interface layout on the virtual screen, and sends the interface layout information of the virtual screen to the second electronic device. The interface layout information includes: the first control of the first control placed on the virtual screen. Control identification and layout information, so that the second electronic device displays the projection interface of the source interface according to the interface layout information.
其中,第一控件是指虚拟屏幕上放置的控件,也即是用户对步骤302中虚拟屏幕上展示的上述用户选择的控件进行一系列编辑操作后,仍然放置在虚拟屏幕上的控件。每个第一控件均对应着:第一控件标识,以及布局信息;所述布局信息可以包括:控件在虚拟屏幕上的位置、大小、显示方向等信息。The first control refers to the control placed on the virtual screen, that is, the control that is still placed on the virtual screen after the user performs a series of editing operations on the control selected by the user displayed on the virtual screen in step 302. Each first control corresponds to: a first control identifier, and layout information; the layout information may include information such as the position, size, and display direction of the control on the virtual screen.
可选地,可以根据上述界面布局信息生成布局配置文件,将布局配置文件发送至第二电子设备。Optionally, a layout configuration file may be generated according to the foregoing interface layout information, and the layout configuration file may be sent to the second electronic device.
可选地,第一电子设备可以将界面布局信息直接发送至第二电子设备;或者,第一电子设备将界面布局信息发送至第二电子设备可以包括:第一电子设备将界面布局信息携带在源界面的界面数据中发送至第二电子设备。Optionally, the first electronic device may directly send the interface layout information to the second electronic device; or, the first electronic device sending the interface layout information to the second electronic device may include: the first electronic device carries the interface layout information in The interface data of the source interface is sent to the second electronic device.
可选地,第一电子设备在将界面布局信息发送至第二电子设备之后,可以根据界面布局信息中的第一控件标识,对发送至第二电子设备的源界面的界面数据的第一数据中的第一控件标识进行标记,以方便第二电子设备在展示投屏界面时能够根据具有该标记的第一控件标识进行投屏界面中控件的绘制。Optionally, after the first electronic device sends the interface layout information to the second electronic device, it can compare the first data of the interface data sent to the source interface of the second electronic device according to the first control identifier in the interface layout information. The first control identifier in the display screen is marked so that the second electronic device can draw the control in the projection interface according to the first control identifier with the mark when displaying the projection interface.
需要说明的,第一电子设备将界面布局信息发送至第二电子设备,第二电子设备可以存储该界面布局信息,第一电子设备在后续将源界面投屏至第二电子设备时, 第二电子设备可以按照该界面布局信息显示源界面的投屏界面。如果用户希望修改源界面在第二电子设备中的投屏界面的界面布局信息,可以触发本申请实施例的上述方法,重新编辑虚拟屏幕上的界面布局,重新将界面布局信息发送至第二电子设备,第二电子设备更新本地存储的源界面对应的界面布局信息,达到用户修改源界面在第二电子设备中的投屏界面的界面布局的目的。It should be noted that the first electronic device sends the interface layout information to the second electronic device, and the second electronic device can store the interface layout information. When the first electronic device subsequently projects the source interface to the second electronic device, the second electronic device The electronic device can display the projection interface of the source interface according to the interface layout information. If the user wants to modify the interface layout information of the projection interface of the source interface in the second electronic device, he can trigger the above-mentioned method of the embodiment of the present application to re-edit the interface layout on the virtual screen and re-send the interface layout information to the second electronic device. Device, the second electronic device updates the locally stored interface layout information corresponding to the source interface, so that the user can modify the interface layout of the projection interface of the source interface in the second electronic device.
图3所示的方法中,第一电子设备将用户选择的源界面中的控件展示在虚拟屏幕上,由用户对展示的控件进行编辑操作,在用户编辑结束执行确认操作后,将虚拟屏幕的界面布局信息发送至第二电子设备,第二电子设备根据虚拟屏幕的界面布局信息显示投屏界面,从而第二电子设备上显示的投屏界面的布局与用户确认操作时虚拟屏幕上的界面布局一致,从而使得投屏界面的视觉效果更类似第二电子设备的原生应用程序界面的视觉效果,而不仅仅是第一电子设备中源界面的镜像、拷贝、拉伸、缩放,从而给用户提供更自然更原生的投屏体验。In the method shown in FIG. 3, the first electronic device displays the controls in the source interface selected by the user on the virtual screen, and the user edits the displayed controls. After the user performs the confirmation operation after editing, the virtual screen is displayed on the virtual screen. The interface layout information is sent to the second electronic device, and the second electronic device displays the projection interface according to the interface layout information of the virtual screen, so that the layout of the projection interface displayed on the second electronic device is the same as the interface layout on the virtual screen when the user confirms the operation Consistent, so that the visual effect of the projection interface is more similar to the visual effect of the native application interface of the second electronic device, rather than just mirroring, copying, stretching, and zooming the source interface in the first electronic device, thereby providing users with A more natural and native screen projection experience.
图4为本申请投屏方法另一个实施例的流程图,参见图4所示,该方法可以包括:FIG. 4 is a flowchart of another embodiment of the screen projection method according to this application. As shown in FIG. 4, the method may include:
步骤401:第二电子设备接收第一电子设备发送的界面布局信息,界面布局信息包括:第一控件标识以及布局信息;界面布局信息是第一电子设备检测到用户针对虚拟屏幕上界面布局的确认操作时虚拟屏幕的界面布局信息;Step 401: The second electronic device receives the interface layout information sent by the first electronic device, the interface layout information includes: the first control identifier and layout information; the interface layout information is the first electronic device detecting that the user confirms the interface layout on the virtual screen Interface layout information of the virtual screen during operation;
步骤402:第二电子设备接收第一电子设备发送的源界面的界面数据;Step 402: The second electronic device receives the interface data of the source interface sent by the first electronic device;
步骤403:第二电子设备根据接收到的源界面的界面数据,按照界面布局信息显示源界面的投屏界面。Step 403: The second electronic device displays the screen projection interface of the source interface according to the interface layout information according to the received interface data of the source interface.
具体的,第二电子设备可以先从界面布局信息中获取到第一控件标识以及该第一控件标识对应的布局信息,然后根据从界面布局信息中获取到的第一控件标识,从界面数据中获取第一控件标识对应的控件绘制指令;按照界面布局信息中第一控件标识对应的布局信息,使用第一控件标识对应的控件绘制指令绘制第一控件标识对应的控件。Specifically, the second electronic device may first obtain the first control identifier and the layout information corresponding to the first control identifier from the interface layout information, and then obtain the first control identifier from the interface data from the interface data according to the first control identifier obtained from the interface layout information. Acquire the control drawing instruction corresponding to the first control identifier; according to the layout information corresponding to the first control identifier in the interface layout information, use the control drawing instruction corresponding to the first control identifier to draw the control corresponding to the first control identifier.
从而,第二电子设备显示的投屏界面中仅展示界面布局信息中包括的第一控件标识对应的控件,而且第二电子设备显示的投屏界面的布局将与虚拟屏幕上的界面布局一致,仅各个控件中的控件显示内容可能不同(第二设备内容随第一设备界面实时变化)。Therefore, the screen projection interface displayed by the second electronic device only displays the control corresponding to the first control identifier included in the interface layout information, and the layout of the screen projection interface displayed by the second electronic device will be consistent with the interface layout on the virtual screen. Only the control display content in each control may be different (the content of the second device changes in real time with the interface of the first device).
可选地,界面数据的第一数据中的第一控件标识可以具有标记,相应的,第二电子设备无需先从界面布局信息中获取第一控件标识,即可更为便捷的从界面数据中查找到各个第一控件标识、以及第一控件标识对应的控件绘制指令,此时,步骤403可以包括:第二电子设备从界面布局信息中获取第一控件标识以及第一控件标识对应的布局信息;第二电子设备从界面数据中获取具有标记的第一控件标识对应的控件绘制指令;第二电子设备按照第一控件标识对应的布局信息,使用第一控件标识对应的控件绘制指令绘制第一控件标识对应的控件。Optionally, the first control identifier in the first data of the interface data may have a mark. Correspondingly, the second electronic device does not need to obtain the first control identifier from the interface layout information first, and can more conveniently obtain the first control identifier from the interface data. Each first control identifier and the control drawing instruction corresponding to the first control identifier are found. At this time, step 403 may include: the second electronic device obtains the first control identifier and the layout information corresponding to the first control identifier from the interface layout information ; The second electronic device obtains from the interface data the control drawing instruction corresponding to the marked first control identifier; the second electronic device draws the first control drawing instruction corresponding to the first control identifier according to the layout information corresponding to the first control identifier The control identifies the corresponding control.
图4所示的方法中,第二电子设备上显示的投屏界面的布局与用户确认操作时 虚拟屏幕上的界面布局一致,从而使得投屏界面的视觉效果更类似第二电子设备的原生应用程序界面的视觉效果,而不仅仅是第一电子设备中源界面的镜像、拷贝、拉伸、缩放,从而给用户提供更自然更原生的投屏体验。In the method shown in FIG. 4, the layout of the projection interface displayed on the second electronic device is consistent with the interface layout on the virtual screen when the user confirms the operation, so that the visual effect of the projection interface is more similar to the native application of the second electronic device The visual effect of the program interface is not just the mirroring, copying, stretching, and zooming of the source interface in the first electronic device, so as to provide users with a more natural and native screen projection experience.
以下,对上述投屏方法进行示例性说明。Hereinafter, the above-mentioned screen projection method will be exemplified.
图5为本申请投屏方法另一个实施例的流程图,在图5中以第一电子设备为手机,第二电子设备为汽车中的抬头显示/平视显示器(HUD,Head Up Display)为例。第一电子设备中需要投屏的源界面是导航界面。FIG. 5 is a flowchart of another embodiment of the projection method of this application. In FIG. 5, the first electronic device is a mobile phone, and the second electronic device is a head-up display (HUD, Head Up Display) in a car as an example . The source interface that needs to be screened in the first electronic device is the navigation interface.
参见图5中510部分所示,第一电子设备(如手机)的屏幕划分为第一显示区域51和第二显示区域52,第一电子设备在第一显示区域51向用户展示源界面的各层级控件,以供用户进行控件的选择;第一电子设备获取用户选择的控件;第一电子设备在第二显示区域52展示基于第二电子设备的屏幕信息生成的虚拟屏幕521,在虚拟屏幕521上展示用户选择的控件。As shown in part 510 in FIG. 5, the screen of the first electronic device (such as a mobile phone) is divided into a first display area 51 and a second display area 52. The first electronic device displays the source interface to the user in the first display area 51. Hierarchical controls for the user to select controls; the first electronic device obtains the controls selected by the user; the first electronic device displays the virtual screen 521 generated based on the screen information of the second electronic device in the second display area 52, and on the virtual screen 521 The control selected by the user is displayed on the display.
可选地,为了保证第二电子设备显示的投屏界面能够与第二电子设备的屏幕尺寸贴合,生成的虚拟屏幕521与第二电子设备的显示屏的纵横比可以相同。Optionally, in order to ensure that the screen projection interface displayed by the second electronic device can fit the screen size of the second electronic device, the aspect ratio of the generated virtual screen 521 and the display screen of the second electronic device may be the same.
可选地,第一电子设备向用户展示源界面的各层级控件可以包括:Optionally, the first electronic device to display to the user each level of control of the source interface may include:
第一电子设备从源界面的界面数据中提取第一数据,第一数据中包括:源界面中控件的控件标识、控件之间层级关系、以及控件的控件绘制指令;The first electronic device extracts first data from the interface data of the source interface, and the first data includes: the control identifiers of the controls in the source interface, the hierarchical relationship between the controls, and the control drawing instructions of the controls;
使用控件的控件绘制指令按照控件之间的层级关系绘制各层级控件,向用户展示绘制的各层级控件。Use the control drawing instructions of the control to draw each level of control according to the hierarchical relationship between the controls, and show the drawn each level of control to the user.
具体的,上述第一数据可以包括:视图树、视图树中记录的控件标识对应的控件绘制指令。第一电子设备从源界面的界面数据中提取第一数据,可以包括:第一电子设备从源界面的界面数据中提取视图树,视图树记录有源界面中控件的控件标识以及控件之间层级关系,从界面数据中提取视图树中记录的控件标识对应的控件绘制指令。Specifically, the above-mentioned first data may include: a view tree and a control drawing instruction corresponding to a control identifier recorded in the view tree. The first electronic device extracting the first data from the interface data of the source interface may include: the first electronic device extracts a view tree from the interface data of the source interface, and the view tree records the control identifiers of the controls in the active interface and the hierarchy between the controls Relationship, extract the control drawing instruction corresponding to the control identifier recorded in the view tree from the interface data.
可选地,用户可以在第一显示区域51中选中某一控件,将该控件拖拽至虚拟屏幕上展示,第一电子设备通过检测到用户针对于控件的上述操作,获取到用户选择的控件。Optionally, the user can select a control in the first display area 51 and drag the control to display on the virtual screen. The first electronic device obtains the control selected by the user by detecting the above-mentioned operation of the user on the control. .
可选地,用户可以在第一显示区域对控件执行预设操作,上述预设操作可以包括但不限于:双击在第一显示区域中展示的控件等,第一电子设备通过检测到用户针对于控件的上述操作,获取到用户选择的控件。Optionally, the user may perform a preset operation on the control in the first display area. The foregoing preset operation may include, but is not limited to: double-clicking the control displayed in the first display area, etc., and the first electronic device detects that the user is targeting The above operations of the control obtain the control selected by the user.
参见图5中510部分所示,导航界面是第一层级控件,左侧的导航信息显示控件组511为第二层级控件,右侧的地图路线显示控件512也为第二层级控件,导航信息显示控件组511中包括:虚线部分所示的4个文本框、以及转弯箭头共5个第三层级控件,以用户选择的控件为展示转弯距离的文本框、以及转弯箭头为例。As shown in part 510 in FIG. 5, the navigation interface is the first-level control, the navigation information display control group 511 on the left is the second-level control, and the map route display control 512 on the right is also the second-level control, and the navigation information is displayed. The control group 511 includes: 4 text boxes shown by the dotted line and 5 third-level controls with turning arrows. The control selected by the user is the text box showing the turning distance and the turning arrow as an example.
参见图5中520部分所示,用户可以对虚拟屏幕上展示的控件执行编辑操作,得到用户编辑后的投屏界面布局。As shown in part 520 in FIG. 5, the user can perform editing operations on the controls displayed on the virtual screen to obtain the edited screen projection interface layout of the user.
在520部分,以用户对展示转弯距离的文本、转弯箭头进行了放大,位置移动 等编辑操作为例。In section 520, take the user's editing operations such as zooming in and moving the position of the text showing the turning distance and turning arrow as an example.
参见图5中530部分所示,用户对虚拟屏幕上展示的控件的编辑操作完成后,执行针对所述虚拟屏幕上界面布局的确认操作;相应的,第一电子设备检测到用户针对虚拟屏幕上界面布局的确认操作,将虚拟屏幕上的界面布局信息发送至第二电子设备(如HUD);第二电子设备存储接收到的上述界面布局信息。As shown in part 530 in FIG. 5, after the user edits the controls displayed on the virtual screen, the user performs a confirmation operation on the interface layout on the virtual screen; accordingly, the first electronic device detects that the user is on the virtual screen The confirmation operation of the interface layout sends the interface layout information on the virtual screen to the second electronic device (such as HUD); the second electronic device stores the received interface layout information.
其中,上述确认操作的具体实现本申请实施例不作限定,例如参见图5中530部分所示,以用户点击屏幕上提供的确认按钮为例。Wherein, the specific implementation of the above confirmation operation is not limited in the embodiment of the present application. For example, referring to part 530 in FIG. 5, the user clicking the confirmation button provided on the screen is taken as an example.
参见图5中540部分所示,第一电子设备向第二电子设备发送源界面的界面数据;第二电子设备接收源界面的界面数据,根据界面数据,按照界面布局信息显示源界面的投屏界面。As shown in part 540 in FIG. 5, the first electronic device sends the interface data of the source interface to the second electronic device; the second electronic device receives the interface data of the source interface, and according to the interface data, displays the projection screen of the source interface according to the interface layout information interface.
具体的,第一电子设备向第二电子设备发送的源界面的界面数据中记录有源界面中所有控件的控件标识、控件之间层级关系、控件绘制指令等,而界面布局信息中记录有第一控件标识、以及第一控件标识对应的布局信息,通过界面布局信息中记录的第一控件标识,可以从界面数据中查找到第一控件标识之间的层级关系以及第一控件标识的控件绘制指令,根据第一控件标识对应的布局信息,使用第一控件标识对应的控件绘制指令即可以绘制第一控件标识对应的控件。将界面布局信息中每个第一控件标识对应的控件依照上述方法按照层级关系展示在投屏界面上,即得到投屏界面。Specifically, the interface data of the source interface sent by the first electronic device to the second electronic device records the control identifiers of all controls in the active interface, the hierarchical relationship between the controls, the control drawing instructions, etc., and the interface layout information records the first A control identifier and the layout information corresponding to the first control identifier. Through the first control identifier recorded in the interface layout information, the hierarchical relationship between the first control identifiers and the control drawing of the first control identifier can be found from the interface data Instruction, according to the layout information corresponding to the first control identifier, the control corresponding to the first control identifier can be drawn by using the control drawing instruction corresponding to the first control identifier. The control corresponding to each first control identifier in the interface layout information is displayed on the screen projection interface according to the hierarchical relationship according to the above method, and the screen projection interface is obtained.
这里,显示的投屏界面将与用户执行上述确认操作时虚拟屏幕上展示的界面相似,区别仅在于每个控件上展示的控件显示内容可能不同。Here, the displayed screen projection interface will be similar to the interface displayed on the virtual screen when the user performs the above confirmation operation, except that the display content of the control displayed on each control may be different.
区别于图5中通过绘制控件的可视化图形展示控件的方式,图6所示的本申请实施例中,还展示控件的控件标识之间的层级关系。具体的,Different from the way of displaying controls by drawing the visual graphics of the controls in FIG. 5, in the embodiment of the present application shown in FIG. 6, the hierarchical relationship between the control identifiers of the controls is also displayed. specific,
参见图6中610部分所示,第一电子设备的屏幕划分为第三显示区域和第四显示区域,第一电子设备在第三显示区域展示控件标识之间的层级关系且在第四显示区域展示各层级控件的可视化图形(也即第一电子设备向用户展示源界面的各层级控件)。As shown in part 610 in FIG. 6, the screen of the first electronic device is divided into a third display area and a fourth display area. The first electronic device displays the hierarchical relationship between control identifiers in the third display area and in the fourth display area. Displaying the visual graphics of each level of control (that is, the first electronic device displays each level of control of the source interface to the user).
可选地,在610部分,为每一个控件标识设置复选框,用户可以通过选中复选框选择控件标识,相应的,第一电子设备通过检测到上述对于复选框的选择操作获取用户选择的控件标识(也即获取用户从各层级控件中选择的控件)。Optionally, in section 610, a check box is set for each control identifier. The user can select the control identifier by selecting the check box. Correspondingly, the first electronic device obtains the user's selection by detecting the check box selection operation described above. The control ID (that is, to obtain the control selected by the user from each level of control).
参见图6中620部分所示,第一电子设备在屏幕上展示虚拟屏幕,在虚拟屏幕上展示用户选择的控件标识对应控件的可视化图形;虚拟屏幕上展示的控件的可视化图形可以被用户执行编辑操作。As shown in part 620 in FIG. 6, the first electronic device displays a virtual screen on the screen, and displays the visual graphics of the control corresponding to the control identifier selected by the user on the virtual screen; the visual graphics of the control displayed on the virtual screen can be edited by the user operate.
区别于图5中通过绘制控件的可视化图形展示控件的方式,图6中既绘制控件的可视化图形、还展示控件的控件标识之间的层级关系的展示控件方式,图7所示的本申请实施例中,仅展示控件的控件标识之间的层级关系,在用户选中控件标识时,直接在虚拟屏幕上绘制控件标识对应的控件的可视化图形。具体的,Different from the way of displaying controls by drawing the visual graphics of the controls in FIG. 5, the way of displaying controls in FIG. 6 that not only draws the visual graphics of the controls, but also displays the hierarchical relationship between the control identifiers of the controls, the implementation of this application shown in FIG. 7 In the example, only the hierarchical relationship between the control identifiers of the controls is displayed. When the user selects the control identifier, the visual graph of the control corresponding to the control identifier is directly drawn on the virtual screen. specific,
参见图7中710部分所示,第一电子设备的屏幕划分为第五显示区域和第六显示区域,第一电子设备在第五显示区域展示控件标识之间的层级关系(也即第一电子设备向用户展示源界面的各层级控件),在第六显示区域展示虚拟屏幕,在虚拟屏幕上展示用户选择的控件标识对应控件的可视化图形和/或控件显示内容;虚拟屏幕上展示的控件的可视化图形和/或控件显示内容可以被用户执行编辑操作。Referring to part 710 in FIG. 7, the screen of the first electronic device is divided into a fifth display area and a sixth display area. The first electronic device displays the hierarchical relationship between the control identifiers in the fifth display area (that is, the first electronic The device displays all levels of controls of the source interface to the user), displays the virtual screen in the sixth display area, displays the visual graphics and/or control display content of the corresponding control corresponding to the control identifier selected by the user on the virtual screen; The visual graphics and/or the display content of the control can be edited by the user.
可选地,在710部分,为每一个控件标识设置复选框,用户可以通过选中复选框选择控件标识,相应的,第一电子设备通过检测到上述对于复选框的选择操作获取用户选择的控件标识(也即获取用户从各层级控件中选择的控件)。Optionally, in section 710, a check box is set for each control identifier, and the user can select the control identifier by selecting the check box. Correspondingly, the first electronic device obtains the user's selection by detecting the above-mentioned selection operation on the check box. The control ID (that is, to obtain the control selected by the user from each level of control).
此时,在虚拟屏幕上展示的控件的可视化图形可以由第一电子设备根据用户选择的控件标识,使用控件标识对应的控件绘制指令在虚拟屏幕上绘制得到。At this time, the visual graphic of the control displayed on the virtual screen can be drawn on the virtual screen by the first electronic device according to the control identifier selected by the user and using the control drawing instruction corresponding to the control identifier.
需要说明的是,本申请实施例的方法为用户展示基于第二电子设备的屏幕信息生成的虚拟屏幕,用户可以根据个人需要从源界面中选择在该虚拟屏幕上展示的控件并进行布局,间接实现对于第二电子设备中显示的投屏界面的优化和编辑,尤其在第二电子设备具有异形显示屏时,可以基于异形显示屏进行针对性优化,从而使得投屏界面的视觉效果更类似第二电子设备的原生应用程序界面的视觉效果,而不仅仅是第一电子设备中源界面的镜像、拷贝、拉伸、缩放,从而给用户提供更自然更原生的投屏体验;而且,投屏界面的清晰度相对更好,不会因为放大而模糊。例如,如果将手机中的音乐播放界面投射到手表上,由于手表的显示屏相对较小,可只选择播放,上一曲,下一曲三个按钮显示在投屏界面上;或者如果将手机中的导航应用的界面投射到HUD显示器上,可以仅将方向指示等关键的按钮显示在投屏界面上等等。It should be noted that the method of the embodiment of the present application shows the user a virtual screen generated based on the screen information of the second electronic device. The user can select the controls displayed on the virtual screen from the source interface according to personal needs and perform layout. Realize the optimization and editing of the projection interface displayed in the second electronic device, especially when the second electronic device has a special-shaped display screen, targeted optimization can be performed based on the special-shaped display screen, so that the visual effect of the projection interface is more similar to the first 2. The visual effects of the native application program interface of the electronic device, not just the mirroring, copying, stretching, and zooming of the source interface in the first electronic device, so as to provide users with a more natural and native screen projection experience; moreover, screen projection The clarity of the interface is relatively better, and it will not be blurred by zooming in. For example, if you project the music playing interface in your phone to your watch, because the watch’s display screen is relatively small, you can only choose to play, and the three buttons of the previous song and the next song will be displayed on the projection screen; or if the phone is displayed on the screen. The interface of the navigation application in is projected on the HUD display, and only key buttons such as direction indication can be displayed on the projection interface and so on.
可以理解的是,上述实施例中的部分或全部步骤骤或操作仅是示例,本申请实施例还可以执行其它操作或者各种操作的变形。此外,各个步骤可以按照上述实施例呈现的不同的顺序来执行,并且有可能并非要执行上述实施例中的全部操作。It can be understood that some or all of the steps or operations in the above-mentioned embodiments are merely examples, and the embodiments of the present application may also perform other operations or variations of various operations. In addition, each step may be executed in a different order presented in the foregoing embodiment, and it may not be necessary to perform all operations in the foregoing embodiment.
图8为本申请投屏装置一个实施例的结构示意图,如图8所示,该装置80可以包括:FIG. 8 is a schematic structural diagram of an embodiment of a screen projection device according to this application. As shown in FIG. 8, the device 80 may include:
第一展示单元81,用于向用户展示源界面的各层级控件,获取用户从各层级控件中选择的控件;The first display unit 81 is used to display each level of control of the source interface to the user, and obtain the control selected by the user from each level of control;
第二展示单元82,用于向用户展示基于第二电子设备的屏幕信息生成的虚拟屏幕,将用户选择的控件展示在虚拟屏幕上,虚拟屏幕上展示的控件能够被用户执行编辑操作;The second display unit 82 is configured to display a virtual screen generated based on the screen information of the second electronic device to the user, and display the control selected by the user on the virtual screen, and the control displayed on the virtual screen can be edited by the user;
发送单元83,用于检测到用户针对虚拟屏幕上界面布局的确认操作后,将虚拟屏幕的界面布局信息发送至第二电子设备,界面布局信息包括:虚拟屏幕上放置的第一控件的第一控件标识以及布局信息,以便第二电子设备根据界面布局信息显示源界面的投屏界面。The sending unit 83 is configured to send the interface layout information of the virtual screen to the second electronic device after detecting the user's confirmation operation on the interface layout on the virtual screen. The interface layout information includes: the first control of the first control placed on the virtual screen. Control identification and layout information, so that the second electronic device displays the projection interface of the source interface according to the interface layout information.
可选地,第一展示单元81具体可以用于:Optionally, the first display unit 81 may be specifically used for:
从源界面的界面数据中提取第一数据,第一数据中记录有源界面中控件的控件标识、控件之间层级关系、以及控件的控件绘制指令;Extracting first data from the interface data of the source interface, the first data records the control identifiers of the controls in the active interface, the hierarchical relationship between the controls, and the control drawing instructions of the controls;
根据第一数据向用户展示源界面的各层级控件。According to the first data, various levels of controls of the source interface are displayed to the user.
可选地,第一展示单元81具体可以用于:Optionally, the first display unit 81 may be specifically used for:
从源界面的界面数据中提取视图树,视图树记录有源界面中控件的控件标识以及控件之间层级关系,从界面数据中提取视图树中记录的控件标识对应的控件绘制指令。The view tree is extracted from the interface data of the source interface, the view tree records the control identifiers of the controls in the active interface and the hierarchical relationship between the controls, and the control drawing instructions corresponding to the control identifiers recorded in the view tree are extracted from the interface data.
可选地,第一展示单元81具体可以用于:Optionally, the first display unit 81 may be specifically used for:
使用控件的控件绘制指令按照控件之间的层级关系绘制源界面的各层级控件,向用户展示绘制的各层级控件;和/或,Use the control drawing instructions of the control to draw each level control of the source interface according to the hierarchical relationship between the controls, and show the drawn each level control to the user; and/or,
向用户展示控件的控件标识以及控件之间的层级关系。Show the user the control ID of the control and the hierarchical relationship between the controls.
可选地,装置的屏幕被划分为第一显示区域和第二显示区域;Optionally, the screen of the device is divided into a first display area and a second display area;
第一展示单元81具体可以用于:在第一显示区域向用户展示源界面的各层级控件;The first display unit 81 may be specifically used to: display various levels of controls of the source interface to the user in the first display area;
第二展示单元82具体可以用于:第一电子设备在第二显示区域向用户展示虚拟屏幕。The second display unit 82 may be specifically used for: the first electronic device displays a virtual screen to the user in the second display area.
可选地,发送单元83还可以用于:根据虚拟屏幕上放置的控件的控件标识,对发送至第二电子设备的源界面的界面数据中的第一控件标识进行标记。Optionally, the sending unit 83 may be further configured to mark the first control identifier in the interface data sent to the source interface of the second electronic device according to the control identifier of the control placed on the virtual screen.
可选地,发送单元83具体可以用于:将获取到的界面布局信息携带在源界面的界面数据中发送至第二电子设备。Optionally, the sending unit 83 may be specifically configured to carry the acquired interface layout information in the interface data of the source interface and send it to the second electronic device.
图9为本申请投屏装置另一个实施例的结构示意图,如图9所示,该装置90可以包括:FIG. 9 is a schematic structural diagram of another embodiment of a screen projection device according to the present application. As shown in FIG. 9, the device 90 may include:
接收单元91,用于接收第一电子设备发送的界面布局信息,界面布局信息包括:第一控件标识以及布局信息;界面布局信息是第一电子设备检测到用户针对虚拟屏幕上界面布局的确认操作时虚拟屏幕的界面布局信息;接收第一电子设备发送的源界面的界面数据;The receiving unit 91 is configured to receive interface layout information sent by the first electronic device, the interface layout information includes: a first control identifier and layout information; the interface layout information is the first electronic device detecting that the user confirms the layout of the interface on the virtual screen Interface layout information of the current virtual screen; receiving interface data of the source interface sent by the first electronic device;
显示单元92,用于根据界面数据,按照界面布局信息显示源界面的投屏界面。The display unit 92 is configured to display the projection interface of the source interface according to the interface data and the interface layout information.
可选地,显示单元82具体可以用于:从界面布局信息中获取第一控件标识以及第一控件标识对应的布局信息;根据获取到的第一控件标识从界面数据中获取第一控件标识对应的控件绘制指令;按照第一控件标识对应的布局信息,使用第一控件标识对应的控件绘制指令绘制第一控件标识对应的控件。Optionally, the display unit 82 may be specifically configured to: obtain the first control identifier and the layout information corresponding to the first control identifier from the interface layout information; obtain the first control identifier corresponding to the first control identifier from the interface data according to the acquired first control identifier According to the layout information corresponding to the first control identifier, use the control drawing instruction corresponding to the first control identifier to draw the control corresponding to the first control identifier.
可选地,界面数据中的第一控件标识具有标记,显示单元82具体可以用于:从界面布局信息中获取第一控件标识以及第一控件标识对应的布局信息;从界面数据中获取具有标记的第一控件标识对应的控件绘制指令;按照第一控件标识对应的布局信息,使用第一控件标识对应的控件绘制指令绘制第一控件标识对应的控件。Optionally, the first control identifier in the interface data has a mark, and the display unit 82 may be specifically used to: obtain the first control identifier and the layout information corresponding to the first control identifier from the interface layout information; obtain the mark from the interface data The first control identifier corresponds to the control drawing instruction; according to the layout information corresponding to the first control identifier, the control corresponding to the first control identifier is drawn using the control drawing instruction corresponding to the first control identifier.
图8和图9所示实施例提供的装置可用于执行本申请图3~图7所示方法实施例 的技术方案,其实现原理和技术效果可以进一步参考方法实施例中的相关描述。The apparatuses provided in the embodiments shown in Figs. 8 and 9 can be used to implement the technical solutions of the method embodiments shown in Figs. 3 to 7 of this application. For the implementation principles and technical effects, please refer to the related descriptions in the method embodiments.
应理解以上图8~9所示装置的各个单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元通过硬件的形式实现。例如,显示单元可以为单独设立的处理元件,也可以集成在电子设备的某一个芯片中实现。其它单元的实现与之类似。此外这些单元全部或部分可以集成在一起,也可以独立实现。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。It should be understood that the division of the various units of the devices shown in Figures 8 to 9 above is only a division of logical functions, and may be fully or partially integrated into one physical entity in actual implementation, or may be physically separated. And these units can all be implemented in the form of software called by processing elements; they can also be implemented in the form of hardware; part of the units can also be implemented in the form of software called by the processing elements, and some of the units can be implemented in the form of hardware. For example, the display unit may be a separately established processing element, or it may be integrated in a certain chip of the electronic device. The implementation of other units is similar. In addition, all or part of these units can be integrated together or implemented independently. In the implementation process, each step of the above method or each of the above units can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
例如,以上这些单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit;以下简称:ASIC),或,一个或多个微处理器(Digital Singnal Processor;以下简称:DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array;以下简称:FPGA)等。再如,这些单元可以集成在一起,以片上系统(System-On-a-Chip;以下简称:SOC)的形式实现。For example, the above units may be one or more integrated circuits configured to implement the above methods, for example: one or more specific integrated circuits (Application Specific Integrated Circuit; hereinafter referred to as ASIC), or, one or more micro-processing DSP (Digital Singnal Processor; hereinafter referred to as DSP), or, one or more Field Programmable Gate Array (Field Programmable Gate Array; hereinafter referred to as FPGA), etc. For another example, these units can be integrated together and implemented in the form of a System-On-a-Chip (hereinafter referred to as SOC).
图10为本申请电子设备一个实施例的结构示意图,如图10所示,上述电子设备可以包括:显示屏;一个或多个处理器;存储器;以及一个或多个计算机程序。FIG. 10 is a schematic structural diagram of an embodiment of an electronic device of this application. As shown in FIG. 10, the above-mentioned electronic device may include: a display screen; one or more processors; a memory; and one or more computer programs.
其中,上述电子设备可以为移动终端(手机),智慧屏,无人机,智能网联车(Intelligent Connected Vehicle;以下简称:ICV),智能(汽)车(smart/intelligent car)或车载设备等设备。Among them, the above-mentioned electronic equipment can be a mobile terminal (mobile phone), a smart screen, a drone, an intelligent connected vehicle (Intelligent Connected Vehicle; hereinafter referred to as ICV), a smart/intelligent car (smart/intelligent car), or in-vehicle equipment, etc. equipment.
其中上述一个或多个计算机程序被存储在上述存储器中,上述一个或多个计算机程序包括指令,当上述指令被上述设备执行时,使得上述设备执行图3~图7所示的方法。The above-mentioned one or more computer programs are stored in the above-mentioned memory, and the above-mentioned one or more computer programs include instructions. When the above-mentioned instructions are executed by the above-mentioned device, the above-mentioned device executes the methods shown in FIGS. 3-7.
具体的,上述电子设备可以为本申请实施例中所述的第一电子设备,当上述指令被第一电子设备执行时,使得第一电子设备执行以下步骤:Specifically, the foregoing electronic device may be the first electronic device described in the embodiments of the application, and when the foregoing instruction is executed by the first electronic device, the first electronic device is caused to perform the following steps:
向用户展示源界面的各层级控件,获取用户从各层级控件中选择的控件;并且,向用户展示基于第二电子设备的屏幕信息生成的虚拟屏幕,将用户选择的控件展示在虚拟屏幕上,虚拟屏幕上展示的控件能够被用户执行编辑操作;Show the user each level of control of the source interface, obtain the control selected by the user from each level of control; and show the user a virtual screen generated based on the screen information of the second electronic device, and display the control selected by the user on the virtual screen, The controls displayed on the virtual screen can be edited by the user;
检测到用户针对虚拟屏幕上界面布局的确认操作后,将虚拟屏幕的界面布局信息发送至第二电子设备,界面布局信息包括:虚拟屏幕上放置的第一控件的第一控件标识以及布局信息,以便第二电子设备根据界面布局信息显示源界面的投屏界面。After detecting the user's confirmation operation on the interface layout on the virtual screen, the interface layout information of the virtual screen is sent to the second electronic device. The interface layout information includes: the first control identifier of the first control placed on the virtual screen and the layout information, So that the second electronic device displays the projection interface of the source interface according to the interface layout information.
其中,上述指令被第一电子设备执行时,使得向用户展示源界面的各层级控件的步骤包括:Wherein, when the above-mentioned instruction is executed by the first electronic device, the step of causing the user to show each level of control of the source interface includes:
从源界面的界面数据中提取第一数据,第一数据中记录有源界面中控件的控件标识、控件之间层级关系、以及控件的控件绘制指令;Extracting first data from the interface data of the source interface, the first data records the control identifiers of the controls in the active interface, the hierarchical relationship between the controls, and the control drawing instructions of the controls;
根据第一数据向用户展示源界面的各层级控件。According to the first data, various levels of controls of the source interface are displayed to the user.
其中,上述指令被第一电子设备执行时,使得从源界面的界面数据中提取第一 数据的步骤包括:Wherein, when the above instruction is executed by the first electronic device, the step of causing the first data to be extracted from the interface data of the source interface includes:
从源界面的界面数据中提取视图树,视图树记录有源界面中控件的控件标识以及控件之间层级关系;从界面数据中提取视图树中记录的控件标识对应的控件绘制指令。The view tree is extracted from the interface data of the source interface, and the view tree records the control identifiers of the controls in the active interface and the hierarchical relationship between the controls; the control drawing instructions corresponding to the control identifiers recorded in the view tree are extracted from the interface data.
其中,上述指令被第一电子设备执行时,使得根据第一数据向用户展示源界面的各层级控件的步骤包括:Wherein, when the above-mentioned instruction is executed by the first electronic device, the step of causing the user to show the various levels of controls of the source interface according to the first data includes:
使用控件的控件绘制指令按照控件之间的层级关系绘制源界面的各层级控件,向用户展示绘制的各层级控件;和/或,Use the control drawing instructions of the control to draw each level control of the source interface according to the hierarchical relationship between the controls, and show the drawn each level control to the user; and/or,
向用户展示控件的控件标识以及控件之间的层级关系。Show the user the control ID of the control and the hierarchical relationship between the controls.
其中,第一电子设备的屏幕被划分为第一显示区域和第二显示区域;Wherein, the screen of the first electronic device is divided into a first display area and a second display area;
上述指令被第一电子设备执行时,使得向用户展示源界面的各层级控件的步骤包括:When the above-mentioned instruction is executed by the first electronic device, the steps of causing the user to show the various levels of controls of the source interface include:
在第一显示区域向用户展示源界面的各层级控件;In the first display area, the various levels of controls of the source interface are displayed to the user;
上述指令被第一电子设备执行时,使得向用户展示基于第二电子设备的屏幕信息生成的虚拟屏幕的步骤包括:When the above instruction is executed by the first electronic device, the step of causing the user to show the virtual screen generated based on the screen information of the second electronic device includes:
在第二显示区域向用户展示虚拟屏幕。The virtual screen is shown to the user in the second display area.
其中,上述指令被第一电子设备执行时,使得第一电子设备还执行以下步骤:Wherein, when the above instruction is executed by the first electronic device, the first electronic device further executes the following steps:
根据界面布局信息中的第一控件标识,对发送至第二电子设备的源界面的界面数据的第一数据中的第一控件标识进行标记。According to the first control identifier in the interface layout information, the first control identifier in the first data of the interface data sent to the source interface of the second electronic device is marked.
其中,上述指令被第一电子设备执行时,使得将获取到的控件标识以及布局信息发送至第二电子设备的步骤包括:Wherein, when the above instruction is executed by the first electronic device, the step of causing the acquired control identifier and layout information to be sent to the second electronic device includes:
将获取到的界面布局信息携带在源界面的界面数据中发送至第二电子设备。The obtained interface layout information is carried in the interface data of the source interface and sent to the second electronic device.
具体的,上述电子设备可以为本申请实施例中所述的第二电子设备,当上述指令被第二电子设备执行时,使得第二电子设备执行以下步骤:Specifically, the above electronic device may be the second electronic device described in the embodiment of the application, and when the above instruction is executed by the second electronic device, the second electronic device is caused to perform the following steps:
接收第一电子设备发送的界面布局信息,界面布局信息包括:第一控件标识以及布局信息;界面布局信息是第一电子设备检测到用户针对虚拟屏幕上界面布局的确认操作时虚拟屏幕的界面布局信息;Receive interface layout information sent by the first electronic device, where the interface layout information includes: a first control identifier and layout information; the interface layout information is the interface layout of the virtual screen when the first electronic device detects the user's confirmation operation on the interface layout on the virtual screen information;
接收第一电子设备发送的源界面的界面数据;Receiving the interface data of the source interface sent by the first electronic device;
根据界面数据,按照界面布局信息显示源界面的投屏界面。According to the interface data, the projection interface of the source interface is displayed according to the interface layout information.
其中,上述指令被第二电子设备执行时,使得根据界面数据,按照第一控件标识以及布局信息显示源界面的投屏界面的步骤包括:Wherein, when the above instruction is executed by the second electronic device, the step of causing the screen projection interface of the source interface to be displayed according to the first control identifier and layout information according to the interface data includes:
从界面布局信息中获取第一控件标识以及第一控件标识对应的布局信息;根据获取到的第一控件标识从界面数据中获取第一控件标识对应的控件绘制指令;Acquiring the first control identifier and the layout information corresponding to the first control identifier from the interface layout information; acquiring the control drawing instruction corresponding to the first control identifier from the interface data according to the acquired first control identifier;
按照第一控件标识对应的布局信息,使用第一控件标识对应的控件绘制指令绘制第一控件标识对应的控件。According to the layout information corresponding to the first control identifier, the control corresponding to the first control identifier is drawn using the control drawing instruction corresponding to the first control identifier.
其中,界面数据中的第一控件标识具有标记;上述指令被第二电子设备执行时,使得根据界面数据,按照第一控件标识以及布局信息显示源界面的投屏界面的步骤包括:Wherein, the first control identifier in the interface data has a mark; when the above instruction is executed by the second electronic device, the step of causing the screen projection interface of the source interface to be displayed according to the first control identifier and layout information according to the interface data includes:
从界面布局信息中获取第一控件标识以及第一控件标识对应的布局信息;从界面数据中获取具有标记的第一控件标识对应的控件绘制指令;Acquiring the first control identifier and the layout information corresponding to the first control identifier from the interface layout information; acquiring the control drawing instruction corresponding to the marked first control identifier from the interface data;
按照第一控件标识对应的布局信息,使用第一控件标识对应的控件绘制指令绘制第一控件标识对应的控件。According to the layout information corresponding to the first control identifier, the control corresponding to the first control identifier is drawn using the control drawing instruction corresponding to the first control identifier.
图10所示的电子设备可以是终端设备也可以是内置于上述终端设备的电路设备。该设备可以作为上述的第一电子设备或者第二电子设备,执行本申请图3~图7所示实施例提供的方法中的功能/步骤。The electronic device shown in FIG. 10 may be a terminal device or a circuit device built in the aforementioned terminal device. The device can be used as the above-mentioned first electronic device or second electronic device to perform the functions/steps in the methods provided in the embodiments shown in FIG. 3 to FIG. 7 of this application.
电子设备1000可以包括处理器1010,外部存储器接口1020,内部存储器1021,通用串行总线(universal serial bus,USB)接口1030,充电管理模块1040,电源管理模块1041,电池1042,天线1,天线2,移动通信模块1050,无线通信模块1060,音频模块1070,扬声器1070A,受话器1070B,麦克风1070C,耳机接口1070D,传感器模块1080,按键1090,马达1091,指示器1092,摄像头1093,显示屏1094,以及用户标识模块(subscriber identification module,SIM)卡接口1095等。其中传感器模块1080可以包括压力传感器1080A,陀螺仪传感器1080B,气压传感器1080C,磁传感器1080D,加速度传感器1080E,距离传感器1080F,接近光传感器1080G,指纹传感器1080H,温度传感器1080J,触摸传感器1080K,环境光传感器1080L,骨传导传感器1080M等。The electronic device 1000 may include a processor 1010, an external memory interface 1020, an internal memory 1021, a universal serial bus (USB) interface 1030, a charging management module 1040, a power management module 1041, a battery 1042, an antenna 1, and an antenna 2. , Mobile communication module 1050, wireless communication module 1060, audio module 1070, speaker 1070A, receiver 1070B, microphone 1070C, earphone jack 1070D, sensor module 1080, buttons 1090, motor 1091, indicator 1092, camera 1093, display 1094, and Subscriber identification module (subscriber identification module, SIM) card interface 1095, etc. The sensor module 1080 can include pressure sensor 1080A, gyroscope sensor 1080B, air pressure sensor 1080C, magnetic sensor 1080D, acceleration sensor 1080E, distance sensor 1080F, proximity light sensor 1080G, fingerprint sensor 1080H, temperature sensor 1080J, touch sensor 1080K, ambient light Sensor 1080L, bone conduction sensor 1080M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备1000的具体限定。在本申请另一些实施例中,电子设备1000可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 1000. In other embodiments of the present application, the electronic device 1000 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
处理器1010可以包括一个或多个处理单元,例如:处理器1010可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 1010 may include one or more processing units. For example, the processor 1010 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc. Among them, the different processing units may be independent devices or integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
处理器1010中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器1010中的存储器为高速缓冲存储器。该存储器可以保存处理器1010刚用过或循环使用的指令或数据。如果处理器1010需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器1010的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 1010 to store instructions and data. In some embodiments, the memory in the processor 1010 is a cache memory. The memory can store instructions or data that have just been used or recycled by the processor 1010. If the processor 1010 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, the waiting time of the processor 1010 is reduced, and the efficiency of the system is improved.
在一些实施例中,处理器1010可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile  industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 1010 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter/receiver (universal asynchronous) interface. receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / Or Universal Serial Bus (USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器1010可以包含多组I2C总线。处理器1010可以通过不同的I2C总线接口分别耦合触摸传感器1080K,充电器,闪光灯,摄像头1093等。例如:处理器1010可以通过I2C接口耦合触摸传感器1080K,使处理器1010与触摸传感器1080K通过I2C总线接口通信,实现电子设备1000的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 1010 may include multiple sets of I2C buses. The processor 1010 may be coupled to the touch sensor 1080K, charger, flash, camera 1093, etc., respectively through different I2C bus interfaces. For example, the processor 1010 may couple the touch sensor 1080K through an I2C interface, so that the processor 1010 and the touch sensor 1080K communicate through the I2C bus interface to realize the touch function of the electronic device 1000.
I2S接口可以用于音频通信。在一些实施例中,处理器1010可以包含多组I2S总线。处理器1010可以通过I2S总线与音频模块1070耦合,实现处理器1010与音频模块1070之间的通信。在一些实施例中,音频模块1070可以通过I2S接口向无线通信模块1060传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 1010 may include multiple sets of I2S buses. The processor 1010 may be coupled with the audio module 1070 through an I2S bus to implement communication between the processor 1010 and the audio module 1070. In some embodiments, the audio module 1070 can transmit audio signals to the wireless communication module 1060 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块1070与无线通信模块1060可以通过PCM总线接口耦合。在一些实施例中,音频模块1070也可以通过PCM接口向无线通信模块1060传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 1070 and the wireless communication module 1060 may be coupled through a PCM bus interface. In some embodiments, the audio module 1070 may also transmit audio signals to the wireless communication module 1060 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器1010与无线通信模块1060。例如:处理器1010通过UART接口与无线通信模块1060中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块1070可以通过UART接口向无线通信模块1060传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 1010 and the wireless communication module 1060. For example, the processor 1010 communicates with the Bluetooth module in the wireless communication module 1060 through the UART interface to realize the Bluetooth function. In some embodiments, the audio module 1070 may transmit audio signals to the wireless communication module 1060 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器1010与显示屏1094,摄像头1093等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器1010和摄像头1093通过CSI接口通信,实现电子设备1000的拍摄功能。处理器1010和显示屏1094通过DSI接口通信,实现电子设备1000的显示功能。The MIPI interface can be used to connect the processor 1010 with the display screen 1094, the camera 1093 and other peripheral devices. The MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and so on. In some embodiments, the processor 1010 and the camera 1093 communicate through a CSI interface to implement the shooting function of the electronic device 1000. The processor 1010 and the display screen 1094 communicate through a DSI interface to realize the display function of the electronic device 1000.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器1010与摄像头1093,显示屏1094,无线通信模块1060,音频模块1070,传感器模块1080等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 1010 with the camera 1093, the display screen 1094, the wireless communication module 1060, the audio module 1070, the sensor module 1080, and so on. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口1030是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口1030可以用于连接充电器为电子设备1000充电,也可以用于电子设备1000与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 1030 is an interface that complies with the USB standard specifications, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on. The USB interface 1030 can be used to connect a charger to charge the electronic device 1000, and can also be used to transfer data between the electronic device 1000 and peripheral devices. It can also be used to connect earphones and play audio through earphones. This interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说 明,并不构成对电子设备1000的结构限定。在本申请另一些实施例中,电子设备1000也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely illustrative, and does not constitute a structural limitation of the electronic device 1000. In other embodiments of the present application, the electronic device 1000 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
充电管理模块1040用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块1040可以通过USB接口1030接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块1040可以通过电子设备1000的无线充电线圈接收无线充电输入。充电管理模块1040为电池1042充电的同时,还可以通过电源管理模块1041为电子设备供电。The charging management module 1040 is used to receive charging input from the charger. Among them, the charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 1040 may receive the charging input of the wired charger through the USB interface 1030. In some embodiments of wireless charging, the charging management module 1040 may receive the wireless charging input through the wireless charging coil of the electronic device 1000. While the charging management module 1040 charges the battery 1042, it can also supply power to the electronic device through the power management module 1041.
电源管理模块1041用于连接电池1042,充电管理模块1040与处理器1010。电源管理模块1041接收电池1042和/或充电管理模块1040的输入,为处理器1010,内部存储器1021,显示屏1094,摄像头1093,和无线通信模块1060等供电。电源管理模块1041还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块1041也可以设置于处理器1010中。在另一些实施例中,电源管理模块1041和充电管理模块1040也可以设置于同一个器件中。The power management module 1041 is used to connect the battery 1042, the charging management module 1040 and the processor 1010. The power management module 1041 receives input from the battery 1042 and/or the charging management module 1040, and supplies power to the processor 1010, internal memory 1021, display screen 1094, camera 1093, and wireless communication module 1060. The power management module 1041 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 1041 may also be provided in the processor 1010. In other embodiments, the power management module 1041 and the charging management module 1040 may also be provided in the same device.
电子设备1000的无线通信功能可以通过天线1,天线2,移动通信模块1050,无线通信模块1060,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 1000 can be realized by the antenna 1, the antenna 2, the mobile communication module 1050, the wireless communication module 1060, the modem processor, and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备1000中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 1000 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块1050可以提供应用在电子设备1000上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块1050可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块1050可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块1050还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块1050的至少部分功能模块可以被设置于处理器1010中。在一些实施例中,移动通信模块1050的至少部分功能模块可以与处理器1010的至少部分模块被设置在同一个器件中。The mobile communication module 1050 can provide wireless communication solutions including 2G/3G/4G/5G and the like applied to the electronic device 1000. The mobile communication module 1050 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 1050 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation. The mobile communication module 1050 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 1050 may be provided in the processor 1010. In some embodiments, at least part of the functional modules of the mobile communication module 1050 and at least part of the modules of the processor 1010 may be provided in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器1070A,受话器1070B等)输出声音信号,或通过显示屏1094显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器1010,与移动通信模块1050或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 1070A, a receiver 1070B, etc.), or displays an image or video through the display screen 1094. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 1010 and be provided in the same device as the mobile communication module 1050 or other functional modules.
无线通信模块1060可以提供应用在电子设备1000上的包括无线局域网(wireless  local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块1060可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块1060经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器1010。无线通信模块1060还可以从处理器1010接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 1060 can provide applications on the electronic device 1000 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 1060 may be one or more devices integrating at least one communication processing module. The wireless communication module 1060 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 1010. The wireless communication module 1060 can also receive the signal to be sent from the processor 1010, perform frequency modulation, amplify, and convert it into electromagnetic waves to radiate through the antenna 2.
在一些实施例中,电子设备1000的天线1和移动通信模块1050耦合,天线2和无线通信模块1060耦合,使得电子设备1000可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(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,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 1000 is coupled with the mobile communication module 1050, and the antenna 2 is coupled with the wireless communication module 1060, so that the electronic device 1000 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), broadband Code division multiple access (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, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
电子设备1000通过GPU,显示屏1094,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏1094和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器1010可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 1000 implements a display function through a GPU, a display screen 1094, and an application processor. The GPU is a microprocessor for image processing, which is connected to the display screen 1094 and the application processor. The GPU is used to perform mathematical and geometric calculations and is used for graphics rendering. The processor 1010 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏1094用于显示图像,视频等。显示屏1094包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备1000可以包括1个或N个显示屏1094,N为大于1的正整数。The display screen 1094 is used to display images, videos, and so on. The display screen 1094 includes a display panel. The display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 1000 may include one or N display screens 1094, and N is a positive integer greater than one.
电子设备1000可以通过ISP,摄像头1093,视频编解码器,GPU,显示屏1094以及应用处理器等实现拍摄功能。The electronic device 1000 can realize a shooting function through an ISP, a camera 1093, a video codec, a GPU, a display 1094, and an application processor.
ISP用于处理摄像头1093反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头1093中。The ISP is used to process the data fed back by the camera 1093. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye. ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 1093.
摄像头1093用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备1000可以包括1个或N个摄像头1093,N为大于1的正整数。The camera 1093 is used to capture still images or videos. The object generates an optical image through the lens and is projected to the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 1000 may include 1 or N cameras 1093, and N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备1000在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 1000 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备1000可以支持一种或多种视频编解码器。这样,电子设备1000可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 1000 may support one or more video codecs. In this way, the electronic device 1000 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备1000的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, for example, the transfer mode between human brain neurons, it can quickly process input information, and it can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the electronic device 1000 can be implemented, such as image recognition, face recognition, voice recognition, text understanding, and so on.
外部存储器接口1020可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备1000的存储能力。外部存储卡通过外部存储器接口1020与处理器1010通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 1020 may be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 1000. The external memory card communicates with the processor 1010 through the external memory interface 1020 to realize the data storage function. For example, save music, video and other files in an external memory card.
内部存储器1021可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器1021可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备1000使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器1021可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器1010通过运行存储在内部存储器1021的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备1000的各种功能应用以及数据处理。The internal memory 1021 may be used to store computer executable program code, where the executable program code includes instructions. The internal memory 1021 may include a program storage area and a data storage area. Among them, the storage program area can store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function, and the like. The data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 1000. In addition, the internal memory 1021 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like. The processor 1010 executes various functional applications and data processing of the electronic device 1000 by running instructions stored in the internal memory 1021 and/or instructions stored in a memory provided in the processor.
电子设备1000可以通过音频模块1070,扬声器1070A,受话器1070B,麦克风1070C,耳机接口1070D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 1000 can implement audio functions through an audio module 1070, a speaker 1070A, a receiver 1070B, a microphone 1070C, a headphone interface 1070D, and an application processor. For example, music playback, recording, etc.
音频模块1070用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块1070还可以用于对音频信号编码和解码。在一些实施例中,音频模块1070可以设置于处理器1010中,或将音频模块1070的部分功能模块设置于处理器1010中。The audio module 1070 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The audio module 1070 can also be used to encode and decode audio signals. In some embodiments, the audio module 1070 may be provided in the processor 1010, or part of the functional modules of the audio module 1070 may be provided in the processor 1010.
扬声器1070A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备1000可以通过扬声器1070A收听音乐,或收听免提通话。The speaker 1070A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 1000 can listen to music through the speaker 1070A, or listen to a hands-free call.
受话器1070B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备1000接听电话或语音信息时,可以通过将受话器1070B靠近人耳接听语音。The receiver 1070B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 1000 answers a call or voice message, it can receive the voice by bringing the receiver 1070B close to the human ear.
麦克风1070C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风1070C发声,将声音信号输入到麦克风1070C。电子设备1000可以设置至少一个麦克风1070C。在另一些实施例中,电子设备1000可以设置两个麦克风1070C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备1000还可以设置三个,四个或更多麦克风1070C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 1070C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending voice information, the user can make a sound by approaching the microphone 1070C through the human mouth, and input the sound signal into the microphone 1070C. The electronic device 1000 may be provided with at least one microphone 1070C. In other embodiments, the electronic device 1000 may be provided with two microphones 1070C, which can implement noise reduction functions in addition to collecting sound signals. In some other embodiments, the electronic device 1000 may also be provided with three, four or more microphones 1070C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
耳机接口1070D用于连接有线耳机。耳机接口1070D可以是USB接口1030,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 1070D is used to connect wired earphones. The earphone interface 1070D may be a USB interface 1030, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器1080A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器1080A可以设置于显示屏1094。压力传感器1080A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器1080A,电极之间的电容改变。电子设备1000根据电容的变化确定压力的强度。当有触摸操作作用于显示屏1094,电子设备1000根据压力传感器1080A检测所述触摸操作强度。电子设备1000也可以根据压力传感器1080A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 1080A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 1080A may be provided on the display screen 1094. There are many types of pressure sensors 1080A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors and so on. The capacitive pressure sensor may include at least two parallel plates with conductive materials. When a force is applied to the pressure sensor 1080A, the capacitance between the electrodes changes. The electronic device 1000 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 1094, the electronic device 1000 detects the intensity of the touch operation according to the pressure sensor 1080A. The electronic device 1000 may also calculate the touched position according to the detection signal of the pressure sensor 1080A. In some embodiments, touch operations that act on the same touch position but have different touch operation strengths may correspond to different operation instructions. For example: when a touch operation whose intensity of the touch operation is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
陀螺仪传感器1080B可以用于确定电子设备1000的运动姿态。在一些实施例中,可以通过陀螺仪传感器1080B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器1080B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器1080B检测电子设备1000抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备1000的抖动,实现防抖。陀螺仪传感器1080B还可以用于导航,体感游戏场景。The gyro sensor 1080B may be used to determine the movement posture of the electronic device 1000. In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y, and z axes) can be determined by the gyro sensor 1080B. The gyro sensor 1080B can be used for shooting anti-shake. Exemplarily, when the shutter is pressed, the gyro sensor 1080B detects the jitter angle of the electronic device 1000, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the jitter of the electronic device 1000 through reverse movement to achieve anti-shake. The gyroscope sensor 1080B can also be used for navigation and somatosensory game scenes.
气压传感器1080C用于测量气压。在一些实施例中,电子设备1000通过气压传感器1080C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 1080C is used to measure air pressure. In some embodiments, the electronic device 1000 calculates the altitude based on the air pressure value measured by the air pressure sensor 1080C to assist positioning and navigation.
磁传感器1080D包括霍尔传感器。电子设备1000可以利用磁传感器1080D检测翻盖皮套的开合。在一些实施例中,当电子设备1000是翻盖机时,电子设备1000可以根据磁传感器1080D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 1080D includes a Hall sensor. The electronic device 1000 can use the magnetic sensor 1080D to detect the opening and closing of the flip holster. In some embodiments, when the electronic device 1000 is a flip machine, the electronic device 1000 can detect the opening and closing of the flip according to the magnetic sensor 1080D. Furthermore, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.
加速度传感器1080E可检测电子设备1000在各个方向上(一般为三轴)加速度的大小。当电子设备1000静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 1080E can detect the magnitude of the acceleration of the electronic device 1000 in various directions (generally three axes). When the electronic device 1000 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and apply to applications such as horizontal and vertical screen switching, pedometers, and so on.
距离传感器1080F,用于测量距离。电子设备1000可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备1000可以利用距离传感器1080F测距以实现快速对焦。Distance sensor 1080F, used to measure distance. The electronic device 1000 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 1000 may use the distance sensor 1080F to measure the distance to achieve fast focusing.
接近光传感器1080G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备1000通过发光二极管向外发射红外光。电子设备1000使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备1000附近有物体。当检测到不充分的反射光时,电子设备1000可以确定电子设备1000附近没有物体。电子设备1000可以利用接近光传感器1080G检测用户手持电子设备1000贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器1080G也可用于皮套模式,口袋模式自动解锁与锁屏。The proximity light sensor 1080G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 1000 emits infrared light to the outside through the light emitting diode. The electronic device 1000 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 1000. When insufficient reflected light is detected, the electronic device 1000 can determine that there is no object near the electronic device 1000. The electronic device 1000 can use the proximity light sensor 1080G to detect that the user holds the electronic device 1000 close to the ear to talk, so as to automatically turn off the screen to save power. Proximity light sensor 1080G can also be used in leather case mode, pocket mode automatically unlocks and locks the screen.
环境光传感器1080L用于感知环境光亮度。电子设备1000可以根据感知的环境光亮度自适应调节显示屏1094亮度。环境光传感器1080L也可用于拍照时自动调节白平衡。环境光传感器1080L还可以与接近光传感器1080G配合,检测电子设备1000是否在口袋里,以防误触。The ambient light sensor 1080L is used to perceive the brightness of the ambient light. The electronic device 1000 can adaptively adjust the brightness of the display screen 1094 according to the perceived brightness of the ambient light. The ambient light sensor 1080L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 1080L can also cooperate with the proximity light sensor 1080G to detect whether the electronic device 1000 is in the pocket to prevent accidental touch.
指纹传感器1080H用于采集指纹。电子设备1000可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 1080H is used to collect fingerprints. The electronic device 1000 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
温度传感器1080J用于检测温度。在一些实施例中,电子设备1000利用温度传感器1080J检测的温度,执行温度处理策略。例如,当温度传感器1080J上报的温度超过阈值,电子设备1000执行降低位于温度传感器1080J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备1000对电池1042加热,以避免低温导致电子设备1000异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备1000对电池1042的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 1080J is used to detect temperature. In some embodiments, the electronic device 1000 uses the temperature detected by the temperature sensor 1080J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 1080J exceeds a threshold value, the electronic device 1000 executes to reduce the performance of the processor located near the temperature sensor 1080J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 1000 heats the battery 1042 to avoid abnormal shutdown of the electronic device 1000 due to low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 1000 boosts the output voltage of the battery 1042 to avoid abnormal shutdown caused by low temperature.
触摸传感器1080K,也称“触控器件”。触摸传感器1080K可以设置于显示屏1094,由触摸传感器1080K与显示屏1094组成触摸屏,也称“触控屏”。触摸传感器1080K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏1094提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器1080K也可以设置于电子设备1000的表面,与显示屏1094所处的位置不同。Touch sensor 1080K, also called "touch device". The touch sensor 1080K can be set on the display screen 1094, and the touch screen is composed of the touch sensor 1080K and the display screen 1094, which is also called a “touch screen”. The touch sensor 1080K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. The visual output related to the touch operation can be provided through the display screen 1094. In other embodiments, the touch sensor 1080K may also be disposed on the surface of the electronic device 1000, which is different from the position of the display screen 1094.
骨传导传感器1080M可以获取振动信号。在一些实施例中,骨传导传感器1080M可以获取人体声部振动骨块的振动信号。骨传导传感器1080M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器1080M也可以设置于耳机中,结合成骨传导耳机。音频模块1070可以基于所述骨传导传感器1080M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器1080M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 1080M can acquire vibration signals. In some embodiments, the bone conduction sensor 1080M can obtain the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 1080M can also contact the human pulse and receive the blood pressure pulse signal. In some embodiments, the bone conduction sensor 1080M may also be provided in the earphone, combined with the bone conduction earphone. The audio module 1070 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 1080M, and realize the voice function. The application processor may analyze the heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor 1080M, and realize the heart rate detection function.
按键1090包括开机键,音量键等。按键1090可以是机械按键。也可以是触摸式按键。电子设备1000可以接收按键输入,产生与电子设备1000的用户设置以及功能控制有关的键信号输入。The button 1090 includes a power-on button, a volume button, and so on. The button 1090 may be a mechanical button. It can also be a touch button. The electronic device 1000 may receive key input, and generate key signal input related to user settings and function control of the electronic device 1000.
马达1091可以产生振动提示。马达1091可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏1094不同区域的触摸操作,马达1091也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 1091 can generate vibration prompts. The motor 1091 can be used for incoming call vibration notification, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as photographing, audio playback, etc.) can correspond to different vibration feedback effects. Acting on touch operations in different areas of the display screen 1094, the motor 1091 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminding, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器1092可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 1092 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, and so on.
SIM卡接口1095用于连接SIM卡。SIM卡可以通过插入SIM卡接口1095,或从SIM卡接口1095拔出,实现和电子设备1000的接触和分离。电子设备1000可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口1095可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口1095可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口1095也可以兼容不同类型的SIM卡。SIM卡接口1095也可以兼容外部存储卡。电子设备1000通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备1000采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备1000中,不能和电子设备1000分离。The SIM card interface 1095 is used to connect to the SIM card. The SIM card can be inserted into the SIM card interface 1095 or pulled out from the SIM card interface 1095 to achieve contact and separation with the electronic device 1000. The electronic device 1000 may support 1 or N SIM card interfaces, and N is a positive integer greater than 1. The SIM card interface 1095 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. The same SIM card interface 1095 can insert multiple cards at the same time. The types of the multiple cards can be the same or different. The SIM card interface 1095 can also be compatible with different types of SIM cards. The SIM card interface 1095 can also be compatible with external memory cards. The electronic device 1000 interacts with the network through the SIM card to implement functions such as call and data communication. In some embodiments, the electronic device 1000 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 1000 and cannot be separated from the electronic device 1000.
应理解,图10所示的电子设备1000能够实现本申请图3~图7所示实施例提供的方法的各个过程。电子设备1000中的各个模块的操作和/或功能,分别为了实现上述方法实施例中的相应流程。具体可参见本申请图3~图7所示方法实施例中的描述,为避免重复,此处适当省略详细描述。It should be understood that the electronic device 1000 shown in FIG. 10 can implement various processes of the methods provided in the embodiments shown in FIGS. 3 to 7 of this application. The operation and/or function of each module in the electronic device 1000 are respectively for implementing the corresponding process in the foregoing method embodiment. For details, please refer to the descriptions in the method embodiments shown in Figs. 3 to 7 of this application. To avoid repetition, detailed descriptions are appropriately omitted here.
应理解,图10所示的电子设备1000中的处理器1010可以是片上系统SOC,该处理器1010中可以包括中央处理器(Central Processing Unit,CPU),还可以进一步包括其他类型的处理器,例如:图像处理器(Graphics Processing Unit,GPU)等。It should be understood that the processor 1010 in the electronic device 1000 shown in FIG. 10 may be a system-on-chip SOC, and the processor 1010 may include a central processing unit (CPU), and may further include other types of processors. For example: Graphics Processing Unit (GPU), etc.
总之,处理器1010内部的各部分处理器或处理单元可以共同配合实现之前的方法流程,且各部分处理器或处理单元相应的软件程序可存储在内部存储器121中。In short, each part of the processor or processing unit inside the processor 1010 can cooperate to implement the previous method flow, and the corresponding software program of each part of the processor or processing unit can be stored in the internal memory 121.
本申请还提供一种电子设备,所述设备包括存储介质和中央处理器,所述存储介质可以是非易失性存储介质,所述存储介质中存储有计算机可执行程序,所述中央处理器与所述非易失性存储介质连接,并执行所述计算机可执行程序以实现本申请图3~图7所示实施例提供的方法。This application also provides an electronic device. The device includes a storage medium and a central processing unit. The storage medium may be a non-volatile storage medium. A computer executable program is stored in the storage medium. The central processing unit is connected to the The non-volatile storage medium is connected, and the computer executable program is executed to implement the method provided by the embodiments shown in FIG. 3 to FIG. 7 of this application.
以上各实施例中,涉及的处理器可以例如包括CPU、DSP、微控制器或数字信号处理器,还可包括GPU、嵌入式神经网络处理器(Neural-network Process Units;以下简称:NPU)和图像信号处理器(Image Signal Processing;以下简称:ISP),该处理器还可包括必要的硬件加速器或逻辑处理硬件电路,如ASIC,或一个或多个用于控制本申请技术方案程序执行的集成电路等。此外,处理器可以具有操作一个或多个软件程序的功能,软件程序可以存储在存储介质中。In the above embodiments, the processors involved may include, for example, CPU, DSP, microcontroller or digital signal processor, and may also include GPU, embedded neural network processor (Neural-network Process Units; hereinafter referred to as NPU) and Image signal processing (Image Signal Processing; hereinafter referred to as ISP), which may also include necessary hardware accelerators or logic processing hardware circuits, such as ASIC, or one or more integrated circuits used to control the execution of the technical solutions of this application Circuit etc. In addition, the processor may have a function of operating one or more software programs, and the software programs may be stored in a storage medium.
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行本申请图3~图7所示实施例 提供的方法。An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, which when running on a computer, causes the computer to execute the functions provided by the embodiments shown in Figs. 3 to 7 of the present application. method.
本申请实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序,当其在计算机上运行时,使得计算机执行本申请图3~图7所示实施例提供的方法。The embodiments of the present application also provide a computer program product. The computer program product includes a computer program that, when running on a computer, causes the computer to execute the method provided by the embodiments shown in FIGS. 3 to 7 of the present application.
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a和b,a和c,b和c或a和b和c,其中a,b,c可以是单个,也可以是多个。In the embodiments of the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And/or" describes the association relationship of the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. Among them, A and B can be singular or plural. The character "/" generally indicates that the associated objects before and after are in an "or" relationship. "The following at least one item" and similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single, or There can be more than one.
本领域普通技术人员可以意识到,本文中公开的实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may be aware that the units and algorithm steps described in the embodiments disclosed herein can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory;以下简称:ROM)、随机存取存储器(Random Access Memory;以下简称:RAM)、磁碟或者光盘等各种可以存储程序代码的介质。In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as ROM), random access memory (Random Access Memory; hereinafter referred to as RAM), magnetic disks or optical disks, etc. A medium that can store program codes.
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application. Any person skilled in the art can easily conceive of changes or substitutions within the technical scope disclosed in this application, and they should all be covered by the protection scope of this application. The protection scope of this application shall be subject to the protection scope of the claims.

Claims (22)

  1. 一种投屏方法,其特征在于,包括:A method for projecting a screen, which is characterized in that it includes:
    第一电子设备向用户展示源界面的各层级控件,获取所述用户从所述各层级控件中选择的控件;并且,所述第一电子设备向所述用户展示基于第二电子设备的屏幕信息生成的虚拟屏幕,将所述用户选择的控件展示在所述虚拟屏幕上,所述虚拟屏幕上展示的控件能够被所述用户执行编辑操作;The first electronic device displays to the user various levels of controls of the source interface, and obtains the controls selected by the user from the various levels of controls; and, the first electronic device displays to the user screen information based on the second electronic device The generated virtual screen displays the controls selected by the user on the virtual screen, and the controls displayed on the virtual screen can be edited by the user;
    所述第一电子设备检测到所述用户针对所述虚拟屏幕上界面布局的确认操作后,将所述虚拟屏幕的界面布局信息发送至所述第二电子设备,所述界面布局信息包括:所述虚拟屏幕上放置的第一控件的第一控件标识以及布局信息,以便所述第二电子设备根据所述界面布局信息显示所述源界面的投屏界面。After detecting the user's confirmation operation on the interface layout on the virtual screen, the first electronic device sends the interface layout information of the virtual screen to the second electronic device, and the interface layout information includes: The first control identifier and layout information of the first control placed on the virtual screen, so that the second electronic device displays the projection interface of the source interface according to the interface layout information.
  2. 根据权利要求1所述的方法,其特征在于,所述第一电子设备向用户展示所述源界面的各层级控件,包括:The method according to claim 1, wherein the first electronic device to show the user each level of control of the source interface comprises:
    所述第一电子设备从所述源界面的界面数据中提取第一数据,所述第一数据中记录有所述源界面中控件的控件标识、控件之间层级关系、以及控件的控件绘制指令;The first electronic device extracts first data from the interface data of the source interface, and the first data records the control identifiers of the controls in the source interface, the hierarchical relationship between the controls, and the control drawing instructions of the controls ;
    所述第一电子设备根据所述第一数据向所述用户展示所述源界面的各层级控件。The first electronic device displays each level control of the source interface to the user according to the first data.
  3. 根据权利要求2所述的方法,其特征在于,所述第一电子设备从所述源界面的界面数据中提取第一数据,包括:The method according to claim 2, wherein the first electronic device extracting the first data from the interface data of the source interface comprises:
    所述第一电子设备从所述源界面的界面数据中提取视图树,所述视图树记录有所述源界面中控件的控件标识以及控件之间层级关系,从所述界面数据中提取所述视图树中记录的控件标识对应的控件绘制指令。The first electronic device extracts a view tree from the interface data of the source interface, the view tree records the control identifiers of the controls in the source interface and the hierarchical relationship between the controls, and extracts the view tree from the interface data The control drawing instruction corresponding to the control identifier recorded in the view tree.
  4. 根据权利要求2所述的方法,其特征在于,所述第一电子设备根据所述第一数据向所述用户展示所述源界面的各层级控件,包括:The method according to claim 2, wherein the first electronic device presents to the user various levels of controls of the source interface according to the first data, comprising:
    所述第一电子设备使用所述控件的控件绘制指令按照所述控件之间的层级关系绘制所述源界面的各层级控件,向所述用户展示绘制的所述各层级控件;和/或,The first electronic device uses the control drawing instruction of the control to draw each level control of the source interface according to the hierarchical relationship between the controls, and displays the drawn level control to the user; and/or,
    所述第一电子设备向所述用户展示所述控件的控件标识以及所述控件之间的层级关系。The first electronic device displays the control identifier of the control and the hierarchical relationship between the controls to the user.
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述第一电子设备的屏幕被划分为第一显示区域和第二显示区域;The method according to any one of claims 1 to 4, wherein the screen of the first electronic device is divided into a first display area and a second display area;
    所述第一电子设备向用户展示所述源界面的各层级控件,包括:The first electronic device to display to the user each level of control of the source interface includes:
    所述第一电子设备在所述第一显示区域向所述用户展示所述源界面的各层级控件;Displaying, by the first electronic device, each level of control of the source interface to the user in the first display area;
    所述第一电子设备向所述用户展示基于第二电子设备的屏幕信息生成的虚拟屏幕,包括:The first electronic device displaying to the user a virtual screen generated based on screen information of the second electronic device includes:
    所述第一电子设备在所述第二显示区域向所述用户展示所述虚拟屏幕。The first electronic device displays the virtual screen to the user in the second display area.
  6. 根据权利要求1至4任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1 to 4, further comprising:
    所述第一电子设备根据所述界面布局信息中的第一控件标识,对发送至所述第 二电子设备的源界面的界面数据中的所述第一控件标识进行标记。The first electronic device marks the first control identifier in the interface data sent to the source interface of the second electronic device according to the first control identifier in the interface layout information.
  7. 根据权利要求1至4任一项所述的方法,其特征在于,所述第一电子设备将获取到的第一控件标识以及布局信息发送至所述第二电子设备,包括:The method according to any one of claims 1 to 4, wherein the first electronic device sending the acquired first control identifier and layout information to the second electronic device comprises:
    所述第一电子设备将获取到的所述界面布局信息携带在源界面的界面数据中发送至所述第二电子设备。The first electronic device carries the acquired interface layout information in the interface data of the source interface and sends it to the second electronic device.
  8. 一种投屏方法,其特征在于,包括:A method for projecting a screen, which is characterized in that it includes:
    第二电子设备接收第一电子设备发送的界面布局信息,所述界面布局信息包括:第一控件标识以及布局信息;所述界面布局信息是所述第一电子设备检测到用户针对虚拟屏幕上界面布局的确认操作时所述虚拟屏幕的界面布局信息;The second electronic device receives the interface layout information sent by the first electronic device, where the interface layout information includes: a first control identifier and layout information; the interface layout information is that the first electronic device detects that the user is targeting the interface on the virtual screen The interface layout information of the virtual screen during the layout confirmation operation;
    所述第二电子设备接收所述第一电子设备发送的源界面的界面数据;Receiving, by the second electronic device, the interface data of the source interface sent by the first electronic device;
    所述第二电子设备根据所述界面数据,按照所述界面布局信息显示所述源界面的投屏界面。The second electronic device displays the screen projection interface of the source interface according to the interface data and the interface layout information.
  9. 根据权利要求8所述的方法,其特征在于,所述第二电子设备根据所述界面数据,按照所述界面布局信息显示所述源界面的投屏界面,包括:The method according to claim 8, wherein the second electronic device displays the projection interface of the source interface according to the interface layout information according to the interface data, comprising:
    所述第二电子设备从所述界面布局信息中获取第一控件标识以及所述第一控件标识对应的布局信息;所述第二电子设备根据获取到的所述第一控件标识从所述界面数据中获取所述第一控件标识对应的控件绘制指令;The second electronic device obtains the first control identifier and the layout information corresponding to the first control identifier from the interface layout information; the second electronic device obtains the first control identifier from the interface according to the acquired first control identifier Acquiring the control drawing instruction corresponding to the first control identifier from the data;
    所述第二电子设备按照所述第一控件标识对应的布局信息,使用所述第一控件标识对应的控件绘制指令绘制所述第一控件标识对应的控件。The second electronic device draws the control corresponding to the first control identifier using the control drawing instruction corresponding to the first control identifier according to the layout information corresponding to the first control identifier.
  10. 根据权利要求8所述的方法,其特征在于,所述界面数据中的所述第一控件标识具有标记,所述第二电子设备根据所述界面数据,按照所述界面布局信息显示所述源界面的投屏界面,包括:The method according to claim 8, wherein the first control identifier in the interface data has a mark, and the second electronic device displays the source according to the interface layout information according to the interface data. The screen projection interface of the interface, including:
    所述第二电子设备从所述界面布局信息中获取第一控件标识以及所述第一控件标识对应的布局信息;Obtaining, by the second electronic device, a first control identifier and layout information corresponding to the first control identifier from the interface layout information;
    所述第二电子设备从所述界面数据中获取具有标记的第一控件标识对应的控件绘制指令;Acquiring, by the second electronic device, a control drawing instruction corresponding to the marked first control identifier from the interface data;
    所述第二电子设备按照所述第一控件标识对应的布局信息,使用所述第一控件标识对应的控件绘制指令绘制所述第一控件标识对应的控件。The second electronic device draws the control corresponding to the first control identifier using the control drawing instruction corresponding to the first control identifier according to the layout information corresponding to the first control identifier.
  11. 一种第一电子设备,其特征在于,包括:A first electronic device, characterized in that it comprises:
    显示屏;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述第一电子设备执行时,使得所述第一电子设备执行以下步骤:A display screen; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, when the When the instruction is executed by the first electronic device, the first electronic device is caused to execute the following steps:
    向用户展示源界面的各层级控件,获取所述用户从所述各层级控件中选择的控件;并且,向所述用户展示基于第二电子设备的屏幕信息生成的虚拟屏幕,将所述用户选择的控件展示在所述虚拟屏幕上,所述虚拟屏幕上展示的控件能够被用户执行编辑操作;Show the user the various levels of controls of the source interface, obtain the controls selected by the user from the various levels of controls; and, show the user a virtual screen generated based on the screen information of the second electronic device, and select the user The controls displayed on the virtual screen are displayed on the virtual screen, and the controls displayed on the virtual screen can be edited by the user;
    检测到所述用户针对所述虚拟屏幕上界面布局的确认操作后,将所述虚拟屏幕的界面布局信息发送至所述第二电子设备,所述界面布局信息包括:所述虚拟屏幕上放置的第一控件的第一控件标识以及布局信息,以便所述第二电子设备根据所述界面布局信息显示所述源界面的投屏界面。After detecting the user's confirmation operation on the interface layout on the virtual screen, the interface layout information of the virtual screen is sent to the second electronic device, and the interface layout information includes: The first control identifier and layout information of the first control, so that the second electronic device displays the screen projection interface of the source interface according to the interface layout information.
  12. 根据权利要求11所述的第一电子设备,其特征在于,所述指令被所述第一电子设备执行时,使得所述向用户展示所述源界面的各层级控件的步骤包括:11. The first electronic device according to claim 11, wherein, when the instruction is executed by the first electronic device, the step of causing the step of showing each level control of the source interface to the user comprises:
    从所述源界面的界面数据中提取第一数据,所述第一数据中记录有所述源界面中控件的控件标识、控件之间层级关系、以及控件的控件绘制指令;Extracting first data from the interface data of the source interface, where the first data records the control identifiers of the controls in the source interface, the hierarchical relationship between the controls, and the control drawing instructions of the controls;
    根据所述第一数据向所述用户展示所述源界面的各层级控件。The various levels of controls of the source interface are displayed to the user according to the first data.
  13. 根据权利要求12所述的第一电子设备,其特征在于,所述指令被所述第一电子设备执行时,使得所述从所述源界面的界面数据中提取第一数据的步骤包括:The first electronic device according to claim 12, wherein when the instruction is executed by the first electronic device, the step of causing the first data to be extracted from the interface data of the source interface comprises:
    从所述源界面的界面数据中提取视图树,所述视图树记录有所述源界面中控件的控件标识以及控件之间层级关系;从所述界面数据中提取所述视图树中记录的控件标识对应的控件绘制指令。Extracting a view tree from the interface data of the source interface, the view tree recording the control identifiers of the controls in the source interface and the hierarchical relationship between the controls; extracting the controls recorded in the view tree from the interface data Identifies the corresponding control drawing instruction.
  14. 根据权利要求12任一项所述的第一电子设备,其特征在于,所述指令被所述第一电子设备执行时,使得所述根据所述第一数据向所述用户展示所述源界面的各层级控件的步骤包括:The first electronic device according to any one of claims 12, wherein when the instruction is executed by the first electronic device, the source interface is displayed to the user according to the first data The steps of each level of control include:
    使用所述控件的控件绘制指令按照所述控件之间的层级关系绘制所述源界面的各层级控件,向所述用户展示绘制的所述各层级控件;和/或,Use the control drawing instruction of the control to draw each level control of the source interface according to the hierarchical relationship between the controls, and show the drawn each level control to the user; and/or,
    向所述用户展示所述控件的控件标识以及所述控件之间的层级关系。The control identifier of the control and the hierarchical relationship between the controls are shown to the user.
  15. 根据权利要求11至14任一项所述的第一电子设备,其特征在于,所述第一电子设备的屏幕被划分为第一显示区域和第二显示区域;The first electronic device according to any one of claims 11 to 14, wherein the screen of the first electronic device is divided into a first display area and a second display area;
    所述指令被所述第一电子设备执行时,使得所述向用户展示所述源界面的各层级控件的步骤包括:When the instruction is executed by the first electronic device, the step of causing the user to show each level control of the source interface includes:
    在所述第一显示区域向所述用户展示所述源界面的各层级控件;Displaying each level of control of the source interface to the user in the first display area;
    所述指令被所述第一电子设备执行时,使得所述向所述用户展示基于第二电子设备的屏幕信息生成的虚拟屏幕的步骤包括:When the instruction is executed by the first electronic device, the step of causing the user to show the virtual screen generated based on the screen information of the second electronic device includes:
    在所述第二显示区域向所述用户展示所述虚拟屏幕。The virtual screen is displayed to the user in the second display area.
  16. 根据权利要求11至14任一项所述的第一电子设备,其特征在于,所述指令被所述第一电子设备执行时,使得所述第一电子设备还执行以下步骤:The first electronic device according to any one of claims 11 to 14, wherein when the instruction is executed by the first electronic device, the first electronic device further executes the following steps:
    根据所述界面布局信息中的第一控件标识,对发送至第二电子设备的源界面的界面数据的第一数据中的所述第一控件标识进行标记。Mark the first control identifier in the first data of the interface data sent to the source interface of the second electronic device according to the first control identifier in the interface layout information.
  17. 根据权利要求11至14任一项所述的第一电子设备,其特征在于,所述指令被所述第一电子设备执行时,使得所述将获取到的控件标识以及布局信息发送至所述第二电子设备的步骤包括:The first electronic device according to any one of claims 11 to 14, wherein when the instruction is executed by the first electronic device, it causes the acquired control identifier and layout information to be sent to the The steps of the second electronic device include:
    将获取到的所述界面布局信息携带在源界面的界面数据中发送至所述第二电子设备。The obtained interface layout information is carried in the interface data of the source interface and sent to the second electronic device.
  18. 一种第二电子设备,其特征在于,包括:A second electronic device, characterized by comprising:
    显示屏;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述第二电子设备执行时,使得所述第二电子设备执行以下步骤:A display screen; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, when the When the instruction is executed by the second electronic device, the second electronic device is caused to execute the following steps:
    接收第一电子设备发送的界面布局信息,所述界面布局信息包括:第一控件标识以及布局信息;所述界面布局信息是所述第一电子设备检测到用户针对虚拟屏幕上界面布局的确认操作时所述虚拟屏幕的界面布局信息;Receive interface layout information sent by a first electronic device, where the interface layout information includes: a first control identifier and layout information; the interface layout information is a user's confirmation operation on the interface layout on the virtual screen detected by the first electronic device Interface layout information of the virtual screen at time;
    接收所述第一电子设备发送的源界面的界面数据;Receiving the interface data of the source interface sent by the first electronic device;
    根据所述界面数据,按照所述界面布局信息显示所述源界面的投屏界面。According to the interface data, the screen projection interface of the source interface is displayed according to the interface layout information.
  19. 根据权利要求18所述的第二电子设备,其特征在于,所述指令被所述第二电子设备执行时,使得所述根据所述界面数据,按照所述第一控件标识以及布局信息显示所述源界面的投屏界面的步骤包括:The second electronic device according to claim 18, wherein, when the instruction is executed by the second electronic device, the interface data is displayed according to the first control identifier and layout information. The steps of the projection interface of the source interface include:
    从所述界面布局信息中获取第一控件标识以及所述第一控件标识对应的布局信息;根据获取到的所述第一控件标识从所述界面数据中获取所述第一控件标识对应的控件绘制指令;Obtain a first control identifier and layout information corresponding to the first control identifier from the interface layout information; acquire the control corresponding to the first control identifier from the interface data according to the acquired first control identifier Drawing instructions
    按照所述第一控件标识对应的布局信息,使用所述第一控件标识对应的控件绘制指令绘制所述第一控件标识对应的控件。According to the layout information corresponding to the first control identifier, the control corresponding to the first control identifier is drawn using the control drawing instruction corresponding to the first control identifier.
  20. 根据权利要求18所述的第二电子设备,其特征在于,所述界面数据中的所述第一控件标识具有标记;所述指令被所述第二电子设备执行时,使得所述根据所述界面数据,按照所述第一控件标识以及布局信息显示所述源界面的投屏界面的步骤包括:The second electronic device according to claim 18, wherein the first control identifier in the interface data has a mark; when the instruction is executed by the second electronic device, the For interface data, the step of displaying the projection interface of the source interface according to the first control identifier and layout information includes:
    从所述界面布局信息中获取第一控件标识以及所述第一控件标识对应的布局信息;从所述界面数据中获取具有标记的第一控件标识对应的控件绘制指令;Acquiring a first control identifier and layout information corresponding to the first control identifier from the interface layout information; acquiring a control drawing instruction corresponding to the marked first control identifier from the interface data;
    按照所述第一控件标识对应的布局信息,使用所述第一控件标识对应的控件绘制指令绘制所述第一控件标识对应的控件。According to the layout information corresponding to the first control identifier, the control corresponding to the first control identifier is drawn using the control drawing instruction corresponding to the first control identifier.
  21. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行权利要求1至7任一项所述的方法。A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which when running on a computer, causes the computer to execute the method according to any one of claims 1 to 7.
  22. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行权利要求8至10任一项所述的方法。A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which when running on a computer, causes the computer to execute the method according to any one of claims 8 to 10.
PCT/CN2021/082506 2020-04-23 2021-03-24 Screen projection method and apparatus, and electronic device WO2021213120A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010328653.8 2020-04-23
CN202010328653.8A CN111443884A (en) 2020-04-23 2020-04-23 Screen projection method and device and electronic equipment

Publications (1)

Publication Number Publication Date
WO2021213120A1 true WO2021213120A1 (en) 2021-10-28

Family

ID=71654354

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/082506 WO2021213120A1 (en) 2020-04-23 2021-03-24 Screen projection method and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN111443884A (en)
WO (1) WO2021213120A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599335A (en) * 2022-12-13 2023-01-13 佳瑛科技有限公司(Cn) Method and system for sharing layout file based on multi-screen mode
CN116089256A (en) * 2022-05-13 2023-05-09 荣耀终端有限公司 Terminal testing method, device and storage medium
CN117707715A (en) * 2023-05-25 2024-03-15 荣耀终端有限公司 Application management method and electronic device

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111443884A (en) * 2020-04-23 2020-07-24 华为技术有限公司 Screen projection method and device and electronic equipment
CN114363678A (en) * 2020-09-29 2022-04-15 华为技术有限公司 Screen projection method and equipment
CN112000410B (en) * 2020-08-17 2024-03-19 努比亚技术有限公司 Screen projection control method, device and computer readable storage medium
CN114816294A (en) 2020-09-02 2022-07-29 华为技术有限公司 Display method and device
CN112286477B (en) * 2020-11-16 2023-12-08 Oppo广东移动通信有限公司 Screen projection display method and related product
CN114816158A (en) * 2021-01-11 2022-07-29 华为技术有限公司 Interface control method and device, electronic equipment and readable storage medium
CN113438526A (en) * 2021-06-25 2021-09-24 维沃移动通信有限公司 Screen content sharing method, screen content display device, screen content equipment and storage medium
CN115686401A (en) * 2021-07-28 2023-02-03 华为技术有限公司 Screen projection method, electronic equipment and system
CN113778360B (en) * 2021-08-20 2022-07-22 荣耀终端有限公司 Screen projection method and electronic equipment
CN113891167B (en) * 2021-08-27 2023-07-04 荣耀终端有限公司 Screen projection method and electronic equipment
CN115016702B (en) * 2021-09-10 2023-10-27 荣耀终端有限公司 Control method and system for selecting application program display screen in extended screen mode
CN113805827B (en) * 2021-09-14 2024-05-07 北京百度网讯科技有限公司 Screen projection display method and device, electronic equipment and storage medium
CN115914700A (en) * 2021-09-30 2023-04-04 上海擎感智能科技有限公司 Screen projection processing method and system, electronic equipment and storage medium
WO2023103948A1 (en) * 2021-12-08 2023-06-15 华为技术有限公司 Display method and electronic device
CN114579231A (en) * 2022-02-15 2022-06-03 北京优酷科技有限公司 Page display method and device and electronic equipment
CN114610434A (en) * 2022-03-28 2022-06-10 联想(北京)有限公司 Output control method and electronic equipment
CN114884990A (en) * 2022-05-06 2022-08-09 亿咖通(湖北)技术有限公司 Screen projection method and device based on virtual screen
CN115209213B (en) * 2022-08-23 2023-01-20 荣耀终端有限公司 Wireless screen projection method and mobile device
CN117850715A (en) * 2022-09-30 2024-04-09 华为技术有限公司 Screen-throwing display method, electronic equipment and system
CN115562539A (en) * 2022-11-09 2023-01-03 维沃移动通信有限公司 Control display method and device, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105915978A (en) * 2015-12-14 2016-08-31 乐视致新电子科技(天津)有限公司 Vehicle-mounted display control method and device thereof
CN107273083A (en) * 2017-06-30 2017-10-20 百度在线网络技术(北京)有限公司 Exchange method, device, equipment and storage medium between a kind of terminal device
CN110381195A (en) * 2019-06-05 2019-10-25 华为技术有限公司 A kind of throwing screen display methods and electronic equipment
CN110688042A (en) * 2019-09-29 2020-01-14 百度在线网络技术(北京)有限公司 Interface display method and device
CN111443884A (en) * 2020-04-23 2020-07-24 华为技术有限公司 Screen projection method and device and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176797B (en) * 2013-02-21 2015-12-09 用友网络科技股份有限公司 Interface layout's device and quick interface arrangement method
CN103645906B (en) * 2013-12-25 2018-04-10 上海斐讯数据通信技术有限公司 The method and system that interface is laid out again are realized based on fixed interface layout files
CN109753315A (en) * 2018-11-22 2019-05-14 广州小鸡快跑网络科技有限公司 A kind of smart machine interactive content editor implementation method and storage medium
CN110554816B (en) * 2019-07-25 2024-05-07 华为技术有限公司 Interface generation method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105915978A (en) * 2015-12-14 2016-08-31 乐视致新电子科技(天津)有限公司 Vehicle-mounted display control method and device thereof
CN107273083A (en) * 2017-06-30 2017-10-20 百度在线网络技术(北京)有限公司 Exchange method, device, equipment and storage medium between a kind of terminal device
CN110381195A (en) * 2019-06-05 2019-10-25 华为技术有限公司 A kind of throwing screen display methods and electronic equipment
CN110688042A (en) * 2019-09-29 2020-01-14 百度在线网络技术(北京)有限公司 Interface display method and device
CN111443884A (en) * 2020-04-23 2020-07-24 华为技术有限公司 Screen projection method and device and electronic equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116089256A (en) * 2022-05-13 2023-05-09 荣耀终端有限公司 Terminal testing method, device and storage medium
CN116089256B (en) * 2022-05-13 2024-03-12 荣耀终端有限公司 Terminal testing method, device and storage medium
CN115599335A (en) * 2022-12-13 2023-01-13 佳瑛科技有限公司(Cn) Method and system for sharing layout file based on multi-screen mode
CN115599335B (en) * 2022-12-13 2023-08-22 佳瑛科技有限公司 Method and system for sharing layout files based on multi-screen mode
CN117707715A (en) * 2023-05-25 2024-03-15 荣耀终端有限公司 Application management method and electronic device

Also Published As

Publication number Publication date
CN111443884A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
WO2021213120A1 (en) Screen projection method and apparatus, and electronic device
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
WO2021017889A1 (en) Display method of video call appliced to electronic device and related apparatus
WO2020168965A1 (en) Method for controlling electronic device having folding screen, and electronic device
WO2021000807A1 (en) Processing method and apparatus for waiting scenario in application
WO2021213164A1 (en) Application interface interaction method, electronic device, and computer readable storage medium
WO2021052214A1 (en) Hand gesture interaction method and apparatus, and terminal device
WO2021036585A1 (en) Flexible screen display method and electronic device
CN112399390B (en) Bluetooth connection method and related device
WO2021036770A1 (en) Split-screen processing method and terminal device
WO2020029306A1 (en) Image capture method and electronic device
CN113885759A (en) Notification message processing method, device, system and computer readable storage medium
WO2021180089A1 (en) Interface switching method and apparatus and electronic device
WO2021057673A1 (en) Image display method and electronic device
WO2020118490A1 (en) Automatic screen-splitting method, graphical user interface, and electronic device
WO2021208723A1 (en) Full-screen display method and apparatus, and electronic device
WO2022001258A1 (en) Multi-screen display method and apparatus, terminal device, and storage medium
WO2020056684A1 (en) Method and device employing multiple tws earpieces connected in relay mode to realize automatic interpretation
WO2023241209A9 (en) Desktop wallpaper configuration method and apparatus, electronic device and readable storage medium
WO2021057626A1 (en) Image processing method, apparatus, device, and computer storage medium
WO2022022319A1 (en) Image processing method, electronic device, image processing system and chip system
WO2020062304A1 (en) File transmission method and electronic device
WO2021037034A1 (en) Method for switching state of application, and terminal device
CN112532508B (en) Video communication method and video communication device
WO2023029916A1 (en) Annotation display method and apparatus, terminal device, and readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21792808

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21792808

Country of ref document: EP

Kind code of ref document: A1