Screen display control method, apparatus, electronic device, and storage medium
Patent Information
- Application Number
- HK42023072081
- Authority / Receiving Office
- HK · HK
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2041-09-22
AI Technical Summary
Existing dual-screen display devices cannot dynamically adjust the configuration of the main and secondary screens during hot-swapping, resulting in the main interface being unable to flexibly switch between the external screen and the main screen.
When a notification of external screen insertion or removal is received, the mapping relationship between the physical display device and the logical display device is established or adjusted. The target application side pre-sets the target logical display relationship and the mapping relationship between the target main logical display device and the target main logical display device. When the target application receives the mapping relationship notification, it determines the target external screen bound to the target main logical display device and maps the main interface to the target external screen.
It enables flexible and dynamic switching of the main interface without requiring a complete machine restart, meeting the business and operational needs of different scenarios.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a screen display control method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the rapid development of networking and intelligent technologies, electronic devices that support multiple displays have become a new development trend, where different displays can be used to show content corresponding to different services.
[0003] Taking dual-screen display devices as an example, under relevant technologies, the main interface is usually displayed on the main screen, and auxiliary content is displayed on the secondary screen. When the auxiliary content changes, the main screen is used to control the change logic and the new auxiliary content displayed after the change.
[0004] However, for most dual-screen display devices on the market, the configuration of the main and secondary screens is set in the firmware and cannot be changed. Therefore, when hot-swapping technology is used on dual-screen display devices, the configuration of the main and secondary screens cannot be adjusted, and the main interface cannot dynamically switch between the external screen and the main screen. Summary of the Invention
[0005] This application provides a screen display control method, apparatus, electronic device, and storage medium for dynamically switching the main interface on products that require hot-swappable screens.
[0006] The first screen display control method provided in this application includes:
[0007] Upon receiving a notification message indicating that an external screen has been inserted, identify at least one external screen that is currently in operation;
[0008] Identify the target external screen among the at least one external screens that serves as the main physical display device, and establish a first mapping relationship between the target external screen and the target main logical display device; the target main logical display device and the target application are bound together by a main interface display relationship.
[0009] The first mapping relationship is notified to the target application, so that the target application can determine the target external screen associated with the target main logic display device based on the first mapping relationship, and when the target application is running, the application's main interface is mapped to the target external screen for display.
[0010] Optionally, after notifying the target application of the first mapping relationship, the method further includes:
[0011] Upon receiving a notification message indicating that other external screens besides the target external screen have been unplugged, the unplugged external screen is unbound from the corresponding secondary logical display device based on the first mapping relationship.
[0012] Based on the obtained unbinding results, the first mapping relationship is adjusted to obtain the third mapping relationship;
[0013] The third mapping relationship is communicated to the target application so that the target application can determine the target external screen associated with the target main logic display device based on the third mapping relationship, and the application's main interface is mapped to the target external screen for display when the target application is running.
[0014] Optionally, the third mapping relationship further includes: a mapping relationship between each new secondary physical display device and each secondary logical display device, wherein the new secondary physical display device is an external screen or local screen other than the target external screen; the step of notifying the target application of the third mapping relationship further includes:
[0015] The third mapping relationship is communicated to the target application so that the target application can determine the new secondary physical display devices associated with each of the secondary logical display devices based on the third mapping relationship. When the target application is running, the application's secondary interfaces are mapped to the corresponding new secondary physical display devices for display. Each secondary logical display device and the target application are bound together by a secondary interface display relationship.
[0016] Optionally, the second screen display control method provided in this application embodiment includes:
[0017] The system receives a first mapping relationship between a target external screen and a target main logical display device. The first mapping relationship is generated and sent after receiving a notification message indicating that the external screen is to be inserted. The target external screen is an external screen that serves as the main physical display device among at least one external screen determined after receiving the notification message. The target main logical display device has a main interface display binding relationship with itself.
[0018] Based on the first mapping relationship, the target external screen associated with the target main logic display device is determined;
[0019] During runtime, the application's main interface is mapped to the target external screen for display.
[0020] The first screen display control device provided in this application embodiment includes:
[0021] The determining unit is configured to determine at least one external screen currently in operation upon receiving a notification message indicating that an external screen has been inserted.
[0022] An establishment unit is used to determine the target external screen that serves as the main physical display device among the at least one external screens, and to establish a first mapping relationship between the target external screen and the target main logical display device; the target main logical display device and the target application are bound together by a main interface display relationship.
[0023] The notification unit is used to notify the target application of the first mapping relationship, so that the target application can determine the target external screen associated with the target main logical display device based on the first mapping relationship, and map the application's main interface to the target external screen for display when the target application is running.
[0024] Optionally, the first mapping relationship further includes: a mapping relationship between each secondary physical display device and each secondary logical display device, wherein the secondary physical display device is an external screen or local screen other than the target external screen; the notification unit is further configured to:
[0025] The first mapping relationship is notified to the target application, so that the target application determines the secondary physical display device associated with each secondary logical display device based on the first mapping relationship, and the application's secondary interface is mapped to the corresponding secondary physical display device for display when the target application is running. Each secondary logical display device and the target application are bound together by a secondary interface display relationship.
[0026] Optionally, the establishment unit is specifically used for:
[0027] If the target main logic display device is currently bound to a local screen, then the local screen is unbound from the target main logic display device;
[0028] The target external screen is bound to the target main logical display device, and each of the secondary physical display devices is bound to a secondary logical display device.
[0029] Based on the obtained binding results, the first mapping relationship is generated.
[0030] Optionally, the establishment unit is specifically used for:
[0031] If the number of external screens inserted is one, then the external screen is used as the target external screen;
[0032] If there are multiple external screens inserted, one of the multiple external screens is randomly selected as the target external screen, or, in response to the input main physical display device indication information, the corresponding external screen is selected as the target external screen.
[0033] Optionally, the device further includes:
[0034] An adjustment unit is configured to, after the notification unit notifies the target application of the first mapping relationship, upon receiving a notification message instructing the target external screen to be unplugged, redetermine a new main physical display device, and adjust the first mapping relationship accordingly based on the new main physical display device to obtain an adjusted second mapping relationship;
[0035] The second mapping relationship is communicated to the target application, so that the target application can determine the new main physical display device associated with the target main logical display device based on the second mapping relationship, and when the target application is running, the application's main interface is mapped to the new main physical display device for display.
[0036] Optionally, the second mapping relationship further includes: a mapping relationship between each new secondary physical display device and each secondary logical display device, wherein the new secondary physical display device is an external screen or local screen other than the new primary physical display device; the adjustment unit is further configured to:
[0037] The second mapping relationship is notified to the target application, so that the target application determines the new secondary physical display device associated with each of the secondary logical display devices based on the second mapping relationship, and the application's secondary interface is mapped to the corresponding new secondary physical display device for display when the target application is running. Each secondary logical display device and the target application are bound together by a secondary interface display relationship.
[0038] Optionally, the adjustment unit is specifically used for:
[0039] Based on the first mapping relationship, the target external screen that has been pulled out is unbound from the target main logical display device, and the new main physical display device is unbound from the corresponding secondary logical display device;
[0040] Bind the new main physical display device to the target main logical display device;
[0041] Based on the new binding result, the first mapping relationship is adjusted to obtain the second mapping relationship.
[0042] Optionally, the adjustment unit is specifically used for:
[0043] If, based on the removed target external screen, it is determined that there is a currently working external screen, then one of the currently working external screens is selected as the new main physical display device.
[0044] If, based on the removed target external screen, it is determined that there is no currently working external screen, then one of at least one local screen is selected as the new main physical display device.
[0045] The second screen display control device provided in this application embodiment includes:
[0046] A receiving unit is used to receive a first mapping relationship between a target external screen and a target main logical display device. The first mapping relationship is generated and sent after receiving a notification message indicating that the external screen is inserted. The target external screen is an external screen that serves as the main physical display device among at least one external screen determined after receiving the notification message. The target main logical display device has a main interface display binding relationship with itself.
[0047] The determining unit is configured to determine the target external screen associated with the target main logic display device based on the first mapping relationship;
[0048] The display unit is used to map the application's main interface to the target external screen for display during runtime.
[0049] Optionally, the first mapping relationship further includes: a mapping relationship between each secondary physical display device and each secondary logical display device, wherein the secondary physical display device is an external screen or local screen other than the target external screen; the determining unit is further configured to:
[0050] Based on the first mapping relationship, a secondary physical display device is determined that is associated with each of the secondary logical display devices, and a secondary interface display binding relationship is set between each of the secondary logical display devices and itself;
[0051] The display unit is also used for:
[0052] During runtime, the application's secondary interface is mapped to the corresponding secondary physical display device for display.
[0053] Optionally, the device further includes:
[0054] An update unit is configured to receive a second mapping relationship obtained by adjusting the first mapping relationship, wherein the second mapping relationship is generated and sent after receiving a notification message indicating that the target external screen is unplugged;
[0055] Based on the second mapping relationship, the new main physical display device associated with the target main logical display device is determined;
[0056] During runtime, the application's main interface is mapped to the new main physical display device for display.
[0057] Optionally, the second mapping relationship further includes: a mapping relationship between each new secondary physical display device and each secondary logical display device, wherein the new secondary physical display device is an external screen or local screen other than the new primary physical display device; the updating unit is further configured to:
[0058] Based on the second mapping relationship, new sub-physical display devices are determined to be associated with each of the sub-logical display devices;
[0059] During runtime, the application's sub-interfaces are mapped to the corresponding new sub-physical display devices for display.
[0060] An electronic device provided in this application includes a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor performs the steps of any of the above-described screen control methods.
[0061] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of any of the screen control methods described above.
[0062] This application provides a computer-readable storage medium including program code. When the program product is run on an electronic device, the program code is used to cause the electronic device to perform the steps of any of the above-described screen control methods.
[0063] The beneficial effects of this application are as follows:
[0064] This application provides a screen display control method, apparatus, electronic device, and storage medium. When inserting an external screen, this application only requires selecting the main physical display device from the external screens and establishing a mapping relationship between the main physical display device and the target main logical display device. The target application side has a pre-set binding relationship between the target main logical display device and the target application's main interface display. Therefore, when the target application receives the mapping relationship notification, it only needs to identify the target external screen bound to the target main logical display device to map the main interface to that target external screen. That is, with the insertion of the external screen, the target application can switch from the local screen to the external screen to display the main interface based on the previously established mapping relationship between the physical and logical display devices. This method eliminates the need for a complete system restart to re-fix the mapping relationship. When business needs change or adjustments are required based on different scenarios, only the mapping relationship between the physical and logical display devices needs to be updated, enabling flexible and dynamic switching of the main interface.
[0065] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0066] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0067] Figure 1A This is an optional schematic diagram of a dual-screen display device according to an embodiment of this application;
[0068] Figure 1B This is an optional schematic diagram of a dual-screen display device according to an embodiment of this application;
[0069] Figure 2 This is an optional schematic diagram of an application scenario in an embodiment of this application;
[0070] Figure 3 This is a flowchart illustrating an implementation of a screen display control method according to an embodiment of this application.
[0071] Figure 4 This is a schematic diagram of an application main interface in an embodiment of this application;
[0072] Figure 5 This is a schematic diagram of an application sub-interface in an embodiment of this application;
[0073] Figure 6A This is a schematic diagram of the framework corresponding to a single-screen mode in an embodiment of this application;
[0074] Figure 6B This is a schematic diagram of the framework corresponding to a dual-screen mode in an embodiment of this application;
[0075] Figure 7 This is a schematic diagram of a mapping relationship update method in an embodiment of this application;
[0076] Figure 8 This is a schematic diagram of yet another mapping relationship update method in the embodiments of this application;
[0077] Figure 9 This is a schematic diagram illustrating the switching process between dual-screen display and single-screen display in an embodiment of this application;
[0078] Figure 10 This is a flowchart illustrating another screen display control method in this application embodiment;
[0079] Figure 11A This is a schematic diagram of the first type of main interface display in the embodiments of this application;
[0080] Figure 11B This is a schematic diagram of the second main interface display in the embodiments of this application;
[0081] Figure 11C This is a schematic diagram of the third main interface display in the embodiments of this application;
[0082] Figure 11D This is a schematic diagram of the fourth main interface display in the embodiments of this application;
[0083] Figure 12 This is a schematic diagram of the composition structure of a screen display control device according to an embodiment of this application;
[0084] Figure 13 This is a schematic diagram of the composition structure of another screen display control device in the embodiments of this application;
[0085] Figure 14 This is a schematic diagram of the hardware structure of an electronic device using an embodiment of this application;
[0086] Figure 15 This is a schematic diagram of the hardware structure of another electronic device using an embodiment of this application. Detailed Implementation
[0087] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.
[0088] The following describes some of the concepts involved in the embodiments of this application.
[0089] Dual-screen display: Dual-screen display refers to the ability to connect two external monitors simultaneously and display different content, controlled by a single host computer. It is widely used in various window service systems, information publishing systems, etc. Specifically, dual-screen display can be divided into simultaneous dual-screen display and discrete dual-screen display. Discrete dual-screen display refers to driving two screens simultaneously on the same hardware and software platform, where the content displayed on these two screens can be different. Simultaneous dual-screen display refers to driving two screens simultaneously on the same hardware and software platform, where the content displayed on these two screens is identical.
[0090] Hot-swapping, also known as "live plugging and unplugging," refers to the ability to insert or remove hardware while the computer is running. With appropriate software, hot-swappable peripherals can be inserted or removed without shutting down the power, preventing damage to the host computer or peripherals and allowing for real-time detection and use of new devices. Compared to plug-and-play, hot-swapping places additional requirements on the hardware and software, including the sequence of power, signal, and ground connections.
[0091] Display devices, also known as monitors, displays, screens, etc., are devices that output images or tactile information. In this embodiment, display devices are further divided into physical display devices and logical display devices. Physical display devices refer to hardware such as displays, while logical display devices refer to software used to map the interface to the display. The logical display device represents the relevant logic of the interface display; for example, the system input method can be displayed and operated normally, while system dialog boxes cannot be displayed or operated.
[0092] An application, or application program, is a computer program that can perform one or more tasks. It typically has a visual interface and can interact with the user; examples include electronic maps and calendars. Some applications require installation on the user's device, while others do not, such as mini-programs or web pages within certain social applications. Mini-programs do not require downloading or installation; users can open them by scanning a QR code or searching.
[0093] Application operation interface: This is the medium for interaction and information exchange between the application system and the user. It realizes the conversion between the internal form of information and a human-acceptable form, aiming to enable users to operate the application conveniently and efficiently to achieve two-way interaction and complete the tasks they wish to accomplish with the application. In this embodiment, the application operation interface includes human-computer interaction and graphical user interface. Different application operation interfaces are used to display different content to the user, realizing different information interactions between the user and the application. In this embodiment, the application operation interface can be divided into a main interface and a sub-interface according to actual needs or different functional characteristics. This division of interfaces is mainly for products that require hot-swappable screens. The main interface is used to display content of higher importance, and the sub-interface is used to display content of lower importance.
[0094] The design concept of the embodiments of this application is briefly introduced below:
[0095] Multi-display electronic devices typically include a main display screen and a secondary display screen. Users can configure the display screen according to their actual needs or different functional characteristics. For example, more important content can be displayed on the main display screen, and less important content on the secondary display screen. The main display screen, or main screen for short, is the primary physical display device used to display the main interface, while the secondary display screen, or secondary screen for short, is the secondary physical display device used to display secondary interfaces.
[0096] Taking dual-screen devices as an example, a dual-screen device has two screens, usually called the "main screen" and the "secondary screen." In related technologies, dual-screen display devices typically place the main interface and control on the main screen, while the secondary screen only provides auxiliary display. When the content on the secondary screen needs to be changed, the main screen controls the change logic and the content displayed after the change. However, in related technologies, the main and secondary screens are usually fixed.
[0097] by Figure 1A Taking the dual-screen device shown as an example, it is an optional schematic diagram of a dual-screen device shown in an embodiment of this application; this dual-screen device fixes the rear screen as the main screen and the front screen as the secondary screen. For example... Figure 1B As shown, this is an optional schematic diagram of another dual-screen device in the embodiments of this application. The dual-screen device is a product that requires hot-swappable screens. When an external device is connected, the host is fixed as the main screen and the external device is the secondary screen.
[0098] from Figure 1A and Figure 1B As can be seen, since the correspondence between the main screen and the secondary screen is usually fixed, the front screen (i.e., the host) or the back screen (i.e., the external screen) can only be set as the host by default. However, the main interface, which can be used to display the system input method, navigation bar, status bar, etc., can only be displayed on the main screen, and cannot be displayed on the secondary screen.
[0099] Specifically, in one extended implementation, the electronic device can display the main interface on the external screen when connected, and on the main screen when the external screen is disconnected. This requires switching the main interface between the external screen and the main screen whenever the external screen is plugged in or removed. For example, in products requiring hot-swappable screens, when the external screen is disconnected, the host computer acts as the main screen, displaying the system status bar, etc.; when the external screen is plugged in, it becomes the main screen. Switching between the main and secondary screens requires technically challenging implementation.
[0100] In view of this, embodiments of this application propose a screen display control method, apparatus, electronic device, and storage medium. Since this application only requires selecting the main physical display device from the external screens and establishing a mapping relationship between the main physical display device and the target main logical display device when inserting an external screen, and the target application side has pre-set the main interface display binding relationship between the target main logical display device and the target application, when the target application receives the mapping relationship notification, it only needs to determine the target external screen bound to the target main logical display device to map the main interface to that target external screen. That is, with the insertion of the external screen, the main interface can be switched from the local screen to the external screen display, realizing flexible and dynamic switching of the main interface.
[0101] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0102] like Figure 2 The diagram shown illustrates an application scenario of an embodiment of this application. The application scenario diagram includes a terminal device 210 and a server 220. In this embodiment, the terminal device 210 is a device that supports multi-screen display and can have the target application installed.
[0103] In this application, the target application can be software, webpage, mini-program, etc., and the server is a live streaming server corresponding to the software, webpage, mini-program, etc., without limiting the specific type of the target application.
[0104] It should be noted that the screen display control method in this application embodiment can be executed by the server or the terminal device alone, or by both the server and the terminal device together. When executed by both the server and the terminal device, for example, the terminal device can send the identifiers of each physical display device and logical display device to the server, which then establishes a mapping relationship and sends it to the target application; or, the terminal device can establish a mapping relationship and send it to the target application server, which then notifies the target application. In the following explanation, the example of the terminal device executing the method alone is used, and no specific limitations are made.
[0105] The following example uses an online payment scenario, where the terminal device can be an online payment device.
[0106] Specifically, based on the method in the embodiments of this application, dual-screen display devices can automatically switch between primary and secondary screens after hot-plugging. That is, the terminal device has a host (built-in display, also called the local screen). After plugging in an external screen, dual-screen display can be used; after unplugging the external screen, it switches to single-screen display. In single-screen display, the host acts as the primary screen; when an external screen is plugged in for dual-screen display, the external screen acts as the primary screen. This allows more content to be displayed on the primary screen facing the store clerk, enabling more operations. Taking one dual-screen business scenario as an example:
[0107] 1) When only the host is powered on, the terminal device acts as a single-screen device with a single-screen display. The host screen acts as the main screen, allowing for settings and input. Users can operate the navigation bar and access software installed in the operating system. This is mainly used in single-screen facial recognition scenarios.
[0108] 2) When the staff screen (i.e., the external screen) is connected to the terminal device, the terminal device becomes a dual-screen device, which can realize dual-screen simultaneous display and touch operation, and can also support dual-screen separate display and touch.
[0109] Dual-screen simultaneous display and touch refers to both screens displaying navigation bars and status bars, allowing for input, primarily used for system settings, system design, and launching Enterprise Resource Planning (ERP) applications. Dual-screen different display and touch refers to one screen acting as the primary display and the other as the secondary display, with each screen displaying different content and triggering different operations.
[0110] 3) After starting the merchant dual-screen ERP, the dual screens will display advertisements and the staff's screen will display the merchant's cashier interface.
[0111] 4) When a customer pays, the clerk enters the order information on the clerk's screen, and the facial recognition interface is displayed on the host screen, allowing the user to make a facial recognition payment on the host.
[0112] 5) After the facial recognition payment is completed, the host screen displays the order information, and then returns to the first screen advertising page, where the staff can continue to enter order information.
[0113] It should be noted that the above description is only one of the dual-screen business scenarios for online payment devices; there are many other scenarios in actual business operations.
[0114] In one alternative implementation, the terminal device 210 and the server 220 can communicate via a communication network.
[0115] In one alternative implementation, the communication network is a wired network or a wireless network.
[0116] In this embodiment, the terminal device 210 is a computer device used by a user. This computer device can be a personal computer, mobile phone, tablet computer, laptop, e-book reader, in-vehicle terminal, or any other computer device with a certain computing power that runs instant messaging software and websites or social networking software and websites. Each terminal device 210 is connected to the server 220 via a wireless network. The server 220 is a single server, a server cluster composed of several servers, a cloud computing center, or a virtualization platform.
[0117] It should be noted that, Figure 2 The examples shown are merely illustrative; in reality, the number of terminal devices and servers is unlimited and is not specifically limited in the embodiments of this application.
[0118] The video detection method provided by the exemplary embodiments of this application will be described below with reference to the accompanying drawings and the application scenarios described above. It should be noted that the application scenarios described above are only shown to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way in this respect.
[0119] In the embodiments of this application, the main logic display devices corresponding to different applications may be the same or different. In the embodiments, only one perspective is considered. This article mainly focuses on any one application, i.e., the target application. The main logic display device that has a pre-defined binding relationship with the target application can also be referred to as the target main logic display device. Specifically, the target main logic display device may also be the same as the main logic display device corresponding to other applications, and no specific limitation is made here.
[0120] See Figure 3 The diagram shown is a flowchart of an implementation of a screen display control method provided in this application. The method is described here using a terminal device as the execution subject. The specific implementation flow of the method is as follows:
[0121] S301: When the terminal device receives a notification message indicating that an external screen has been inserted, it determines that at least one external screen is currently in operation.
[0122] Specifically, the notification message refers to a hot-plug event notification, which is triggered when an external screen is inserted or removed.
[0123] In this embodiment, the terminal device may locally include at least one local screen, and may also support the insertion of at least one external screen, such as... Figure 1B As shown. That is, the method in the embodiments of this application can be applied not only to dual-screen display scenarios, but also to multi-screen display scenarios, which will be described in detail below.
[0124] S302: The terminal device identifies at least one target external screen as the main physical display device and establishes a first mapping relationship between the target external screen and the target main logical display device. A main interface display binding relationship is established between the target main logical display device and the target application.
[0125] In one alternative implementation, when determining the target external screen, the following two cases can be considered based on the number of currently active external screens:
[0126] Case 1: If only one external screen is inserted, then that external screen will be used as the target external screen.
[0127] Scenario 2: If multiple external displays are inserted, one of them will be randomly selected as the target external display. Alternatively, in response to the input instruction from the main physical display device, the corresponding external display will be selected as the target external display.
[0128] When multiple external screens are inserted, there can be multiple external screens currently in use. In this case, one of these external screens can be randomly selected as the target external screen.
[0129] Alternatively, it can be determined based on the user's instructions. Specifically, the terminal device responds to the user's input of the main physical display device instruction information, and based on the instruction information, determines an external screen that matches the instruction information as the target external screen. The instruction information may be the location information, number information, access time sequence, etc. of the external screen, which are not specifically limited here.
[0130] Based on the above implementation method, it can be defined as the main physical display device in different scenarios according to actual business needs, so as to meet business display and operation requirements.
[0131] S303: The terminal device notifies the target application of the first mapping relationship, so that the target application determines the target external screen associated with the target main logical display device based on the first mapping relationship, and maps the application's main interface to the target external screen for display when the target application is running.
[0132] In this context, the target application side has pre-set the main interface display binding relationship between the target main logic display device and the target application. Therefore, when the target application receives the first mapping relationship, it only needs to determine the external screen that has a mapping relationship with the target main logic display device, that is, the target external screen associated with the target main logic display device. Then, based on the display logic related to the target main logic display device, the application's main interface is mapped to the target external screen for display.
[0133] like Figure 4As shown, this is a schematic diagram of an application main interface in an embodiment of this application. This main interface is an order interface in an online payment scenario. The target application can be an application that supports online payment, displaying order information. Store clerks can input order information based on this interface to settle the payment for the user's purchased goods. Figure 4 As shown, a user purchases one item each of product A, B, and C, totaling 66. The user can make the payment via the secondary screen, for example... Figure 5 As shown.
[0134] When the target external screen changes or is unplugged, only the initial mapping relationship needs to be adjusted, and the target application needs to be notified. Based on this application, the primary and secondary screens have a more flexible mapping relationship, and the primary and secondary screens can be defined in different scenarios according to actual needs to meet business display and operation requirements.
[0135] Optionally, the first mapping relationship also includes: the mapping relationship between each secondary physical display device and each secondary logical display device. The secondary physical display device is an external screen or local screen other than the target external screen. The secondary logical display device and the target application are also bound to a secondary interface display.
[0136] Therefore, after the terminal device notifies the target application of the first mapping relationship, the target application can also determine the secondary physical display devices associated with each secondary logical display device based on the first mapping relationship, and map the application's secondary interface to the corresponding secondary physical display devices for display when the target application is running.
[0137] For example, there are three secondary physical display devices: external screen 1, external screen 2, and local screen 0. The corresponding three secondary logical display devices are: secondary logical display device 1, secondary logical display device 2, and secondary logical display device 3. For instance, if external screen 1 is associated with secondary logical display device 1, the target application can map its secondary interface to external screen 1 for display based on the display logic associated with that secondary logical display device. Similarly, the application's secondary interface can also be mapped to external screen 2 and the local screen for display.
[0138] It should be noted that the multiple secondary logical display devices in this application embodiment can be the same or different, depending on the actual needs. For example, in a payment scenario, multiple secondary logical display devices can be configured with the same display logic, all used to support the display of the facial recognition interface, and different users can make payments through different secondary physical display devices. As another example, in a dining scenario, multiple secondary logical display devices can be configured with partially or completely different display logic, with some used to support the display of the facial recognition interface, some to support the display of advertisements, and some to support the display of food pickup information, etc., without specific limitations.
[0139] like Figure 5 As shown, it is a schematic diagram of an application sub-interface in an embodiment of this application. The application sub-interface is a face recognition interface in an online payment scenario, and users can make face recognition payments based on this interface.
[0140] The main screen and secondary screen in the embodiments of this application are briefly described below.
[0141] Refer to Table 1, which is an example table of the capabilities corresponding to the main screen and the secondary screen in an embodiment of this application.
[0142] Table 1
[0143] System Input Method Normal display and operation Unable to display or operate System dialog box Normal display and operation Unable to display or operate System Toast Normal display and operation Unable to display or operate status bar Normal display and operation Unable to display or operate Navigation bar Normal display and operation Unable to display or operate System Application By default, it runs on the home screen and operates... It can be specified to run on the secondary screen, but custom development is required.
[0144] As shown in Table 1, this table displays the capabilities of the main screen and secondary screen listed in the embodiments of this application, that is, the display logic corresponding to the main logical display device and the secondary logical display device respectively. The capabilities corresponding to the main screen are implemented based on the display logic of the main logical display device, and correspondingly, the capabilities corresponding to the secondary screen are implemented based on the display logic of the secondary logical display device. Specifically, the main screen can normally display the system input method, system dialog boxes, system message boxes (such as system Toast, a type of message box), status bar, navigation bar, etc., and can be operated normally. Conversely, the secondary screen cannot display or operate the content listed above. Furthermore, for system applications, they run on the main screen by default and can be operated on the main screen, including settings, OTA (Over-the-Air Technology), and other related operations; of course, they can also be specified to run on the secondary screen according to requirements, which requires custom development.
[0145] It should be noted that the above are just examples. In this article, the display of the application interface is mainly used as an example for detailed introduction. Accordingly, the target main logical display device is the logical display device that can be used to map the application's main interface, and the secondary logical display device is the logical display device that can be used to map the application's secondary interface. Specifically, for different applications, the application's main interface can be different, and the corresponding main logical display device will also be different. Similarly, for different applications, the application's secondary interface can be different, and the corresponding secondary logical display device will also be different.
[0146] The following is a brief introduction to the framework corresponding to hot-swapping of external screens, taking a terminal device that contains only one local screen (host) and supports hot-swapping of external screens as an example.
[0147] See Figure 6A As shown, it is a schematic diagram of a single-screen mode in an embodiment of this application.
[0148] The application (APP) layer is used to display the user interface (UI). In this embodiment, it mainly refers to the main application interface and the secondary application interface, for example... Figure 4 The order interface shown is as follows. Figure 5 The face recognition interface shown is an example.
[0149] Specifically, according to the system's dual-screen architecture, dual-screen display and touch capabilities can be implemented using either presentations or activities. A presentation is a special dialog whose purpose is to display content on the second screen. When a presentation is created, it is associated with a target device to determine which device the presentation will be displayed on, and the presentation's context and resources are configured based on this device information.
[0150] In this embodiment, the hot-swappable main and secondary screen switching logic is mainly implemented at the terminal device system layer. The system layer only needs to send the corresponding mapping relationship to the APP. Therefore, the APP layer is completely unaware of the hot-swappable main and secondary screen switching logic.
[0151] System layer: responsible for the logical hot switching between the main and secondary screens, and realizing the mapping relationship between the physical screen (i.e., physical display device) and the logical screen (i.e., logical display device).
[0152] The system layer mainly comprises two parts: DisplayManagerService and DisplayAdapter. DisplayManagerService manages logical display devices, while DisplayAdapter manages physical display devices. It should be noted that in this embodiment, the system layer can refer to either the terminal device's system or the server system, depending on the executing entity. When the executing entity is a terminal device, it primarily refers to the terminal device's system.
[0153] exist Figure 6A In the single-screen mode shown, there is only one physical display device, namely the local display device LocalDisplayDevice0 (also known as the built-in display screen or local screen) of the terminal device. Correspondingly, there is also only one logical display device, namely logical display device 0 (LogicalDisplay0). At this time, LocalDisplayDevice0 serves as the main physical display device, while LogicalDisplay0 serves as the target main logical display device, and a mapping relationship is established between LocalDisplayDevice0 and LogicalDisplay0.
[0154] See Figure 6B As shown, it is a schematic diagram of a dual-screen mode in an embodiment of this application.
[0155] exist Figure 6B In the dual-screen mode shown, an external screen is connected, resulting in two physical display devices: the terminal device's local display (LocalDisplayDevice0) and the external display (LocalDisplayDevice1). Correspondingly, there are only two logical display devices: LogicalDisplay0 and LogicalDisplay1. In this mode, LocalDisplayDevice1 serves as the primary physical display device, and LogicalDisplay0 serves as the target primary logical display device; a mapping relationship is established between LocalDisplayDevice1 and LogicalDisplay0. Similarly, LocalDisplayDevice0 serves as the secondary physical display device, and LogicalDisplay1 serves as the secondary logical display device; a mapping relationship is also established between LocalDisplayDevice0 and LogicalDisplay1.
[0156] The process of establishing the first mapping relationship between each physical display device and the logical display device in the embodiments of this application is described below:
[0157] In this embodiment, by default, when no external screen is connected, one local screen of the terminal device serves as the main screen for displaying the main interface. Therefore, it is first necessary to determine whether the current target main logical display device is bound to a local screen. If so, the local screen is unbound from the target main logical display device. Then, the selected target external screen is bound to the target main logical display device, and each secondary physical display device is bound to a secondary logical display device. A first mapping relationship is generated based on the binding results.
[0158] It should be noted that this application uses a terminal device containing a local screen as an example for illustration. Therefore, when connecting an external screen, it is necessary to create configuration information related to the external screen and the logical display device locally, which can be understood as creating related software. Correspondingly, when the device is unplugged, the relevant configurations can also be deleted.
[0159] Based on the above implementation method, when the number of physical display devices changes, it is only necessary to set the mapping relationship between physical display devices and logical display devices, and the target application side only needs to display the interface based on the mapping relationship.
[0160] In this embodiment, the previously inserted external screen can be further unplugged. In this case, the corresponding mapping relationship between the physical display device and the logical display device will also change, which can be divided into the following two situations:
[0161] Scenario 1: The external screen that is unplugged is the target external screen.
[0162] Optionally, when the target external screen is unplugged, it can be based on Figure 7 The mapping relationship is updated in the manner shown, specifically including the following steps:
[0163] Step S701: When the terminal device receives a notification message indicating that the target external screen has been unplugged, it re-determines the new main physical display device and, based on the new main physical display device, adjusts the first mapping relationship accordingly to obtain the adjusted second mapping relationship.
[0164] In one alternative implementation, step S701 can be specifically implemented based on the process:
[0165] S7011: Based on the first mapping relationship, the terminal device unbinds the target external screen from the target main logical display device and unbinds the new main physical display device from the corresponding secondary logical display device.
[0166] S7012: The terminal device binds the new main physical display device to the target main logical display device.
[0167] S7013: Based on the new binding result obtained, the terminal device adjusts the first mapping relationship to obtain the second mapping relationship.
[0168] Step S702: The terminal device notifies the target application of the second mapping relationship, so that the target application determines the new main physical display device associated with the target main logical display device based on the second mapping relationship, and maps the application's main interface to the new main physical display device for display when the target application is running.
[0169] The new main physical display device can be selected from the remaining external screens or from the local screen, specifically in the following two cases:
[0170] Scenario 1: If, based on the removed target external screen, it is determined that there is an external screen currently in operation, then one of the currently operating external screens will be selected as the new main physical display device.
[0171] For example, besides the unplugged target external screen, the terminal device also has external screen 1 and external screen 2 plugged in, and these two external screens are currently in operation. One of these two external screens can be selected as the new main physical display device. The specific selection method is the same as the method listed above for selecting one of multiple external screens as the target external screen, such as random selection or selection according to instructions. Of course, selection can also be based on the external screen's operating time, location, etc., without specific limitations here.
[0172] Scenario 2: If, based on the removed target external screen, it is determined that there is no currently working external screen, then one of at least one local screen is selected as the new main physical display device.
[0173] In the embodiments of this application, the currently working external screen refers to an external screen that can work normally and is in an on or idle state. If a faulty external screen is inserted, or if the inserted external screen is not turned on, it can be regarded as a non-currently working external screen; or, only the faulty external screen can be regarded as a non-currently working external screen. The specific determination can be made according to the actual situation, and no specific limitation is made here.
[0174] Based on the above implementation method, when the external screen is unplugged, only the mapping relationship needs to be adjusted, and the target application can switch between the main and secondary screens based on the adjusted mapping relationship. When the business needs to change the correspondence between the main screen and the secondary screen or needs to be flexibly adjusted according to different scenarios, there is no need to restart the whole machine to fix the correspondence. Flexible and dynamic switching of the main interface can be achieved on products that require hot-swappable screens.
[0175] Optionally, the second mapping relationship in this application embodiment is obtained by adjusting the first mapping relationship. Similarly, the second mapping relationship may also include: the mapping relationship between each new secondary physical display device and each secondary logical display device, where the new secondary physical display device is an external screen or local screen other than the new main physical display device.
[0176] Similar to the external screen insertion scenario described above, after the terminal device notifies the target application of the second mapping relationship, the target application will also determine the new secondary physical display devices associated with each secondary logical display device based on the second mapping relationship, and when the target application is running, the application's secondary interface will be mapped to the corresponding new secondary physical display devices for display.
[0177] In this embodiment of the application, if only one external screen is unplugged, and the external screen is the target external screen that was previously used as the main physical display device, in this case, when adjusting the relationship between the secondary logical display device and the secondary physical display device in the first mapping relationship, it is only necessary to unbind the selected new main physical display device from the corresponding secondary logical display device.
[0178] For example, if the selected new physical display device is external screen 1, in the first mapping relationship, external screen 1 is bound to secondary logical display device 1. In addition, the target external screen (external screen 3) is bound to the target main logical display device. When adjusting the first mapping relationship, it mainly refers to: unbinding external screen 1 from secondary logical display device 1, unbinding external screen 3 from the target main logical display device, and then binding external screen 1 to the target main logical display device. Based on the binding result, the second mapping relationship can be obtained.
[0179] In fact, compared with the first mapping relationship, the change in the second mapping relationship is mainly between the main physical display device and the target main logical display device. Between the secondary physical display device and the secondary logical display device, except for the unbinding of external screen 1 from secondary logical display device 1, everything else remains unchanged; that is, external screen 2 is still associated with secondary logical display device 2, and local screen 0 is still associated with secondary logical display device 3. In this case, the relevant configurations of secondary logical display device 1 can be further deleted.
[0180] Of course, the mapping relationship between the secondary physical display device and the secondary logical display device can be further readjusted. For example, external screen 2 can be bound to secondary logical display device 1, and local screen 0 can be bound to secondary logical display device 2. In this case, the relevant configuration of secondary logical display device 3 can be further deleted.
[0181] It should be noted that the above are just examples, and adjustments can be made flexibly in actual applications. No specific limitations are set here.
[0182] Scenario 2: The external screen that is unplugged is not the target external screen.
[0183] Optionally, when other external screens besides the target external screen are unplugged, it can be based on Figure 8 The mapping relationship is updated as shown, specifically including the following steps:
[0184] S801: When the terminal device receives a notification message indicating that other external screens besides the target external screen have been unplugged, it unbinds the unplugged external screen from the corresponding secondary logical display device based on the first mapping relationship.
[0185] S802: Based on the obtained unbinding result, the terminal device adjusts the first mapping relationship to obtain the third mapping relationship.
[0186] S803: The terminal device notifies the target application of the third mapping relationship, so that the target application can determine the target external screen associated with the target main logical display device based on the third mapping relationship, and when the target application is running, the application's main interface is mapped to the target external screen for display.
[0187] In this case, since the external screen that is unplugged is a secondary physical display device used to display the secondary interface of the application, there is no need to switch to a new primary physical display device when the external screen is unplugged. You only need to unbind the unplugged external screen from the corresponding secondary logical display device.
[0188] For example, if the external screen 1 is unplugged, in the first mapping relationship, the external screen 1 is bound to the secondary logical display device 1. Adjusting the first mapping relationship mainly means: unbinding the external screen 1 from the secondary logical display device 1 to obtain the third mapping relationship.
[0189] In fact, compared to the first mapping relationship, the change in the third mapping relationship mainly involves the change between the secondary physical display device and the secondary logical display device, that is, unbinding the external screen 1 from the secondary logical display device 1; everything else remains unchanged. In this case, the relevant configurations of the secondary logical display device 1 can be further deleted.
[0190] Of course, the mapping relationship between other secondary physical display devices and secondary logical display devices can be further readjusted, or a new primary physical display device can be selected, etc. This application does not impose specific limitations.
[0191] Optionally, the third mapping relationship in the embodiments of this application is also obtained by adjusting the first mapping relationship. Similarly, the third mapping relationship may also include: the mapping relationship between each new sub-physical display device and each sub-logical display device, wherein the new sub-physical display device is an external screen or local screen other than the target external screen.
[0192] Similar to the external screen insertion scenario described above, after the terminal device notifies the target application of the third mapping relationship, the target application will also determine the new secondary physical display devices associated with each secondary logical display device based on the third mapping relationship, and when the target application is running, the application's secondary interface will be mapped to the corresponding new secondary physical display devices for display.
[0193] Of course, if the mapping relationship between the secondary logical display device and the secondary physical display device is not adjusted compared to the second mapping relationship in the third mapping relationship, that is, if the unbinding of the external screen from the corresponding secondary logical display device is ignored, the target application does not need to remap based on the third mapping relationship. Alternatively, in this case, the first mapping relationship does not need to be adjusted, and the external screen can be directly unplugged, and the target application does not need to remap.
[0194] Optionally, when the target application receives a second or third mapping relationship, it can compare it with the first mapping relationship it originally received, and only remap the physical display device corresponding to the logical display device whose binding relationship has changed. This method can effectively improve screen switching efficiency.
[0195] It should be noted that the above examples are based on unplugging one external screen. The same principle applies when unplugging multiple external screens. The first mapping relationship is adjusted based on the multiple external screens, and the second or third mapping relationship obtained after adjustment is sent to the target application. The specific implementation method is the same as above, and the repeated parts will not be repeated.
[0196] Additionally, when no external screen is plugged in or all external screens are unplugged, and the terminal device has only one display screen, this display screen can be used as the main screen, or as a secondary screen to display a secondary interface. The electronic device A (e.g., mobile phone, tablet, etc.) used by the user logging into the target application is used as the main screen to display the main interface. Specific embodiments will be described below. Figure 11A and Figure 11D Let's illustrate with examples.
[0197] The following is a brief summary of the screen display control method in the embodiments of this application, taking dual-screen display as an example.
[0198] See Figure 9 As shown, this is a schematic diagram of the switching process between dual-screen display and single-screen display in an embodiment of this application, specifically including two parts:
[0199] Part 1: Hot-swappable process for switching from single-screen to dual-screen mode:
[0200] a) The host is powered on and is in a single-screen scenario. When the staff screen is inserted at this time, the physical screen PD1 will be added in the driver layer.
[0201] In this embodiment, the driver layer is used to interact with the hardware, mainly to detect hot-plugging of the external screen and then notify the system layer. The system layer is used to interact with the software, establish a mapping relationship, and notify the APP.
[0202] b) The driver layer notifies the system layer of a hot-plug event, and the system layer creates a physical display device D1.
[0203] Among them, the physical display device created at the system layer mainly refers to the software configuration information related to the external screen created and inserted at the system layer.
[0204] c) The system layer unbinds the logical display device LD0 from the physical display device D0.
[0205] d) Bind the logical display device LD0 to the physical display device D1.
[0206] e) Create a logical display device LD1.
[0207] f) Bind the logical display device LD1 to the physical display device D0.
[0208] g) Notify the APP of screen changes, and the APP switches to dual-screen mode according to the number of screens.
[0209] Part Two: Hot-swap process for switching from dual-screen to single-screen mode:
[0210] a) When the staff screen is pulled out, the driver layer notifies the system layer that the screen has been pulled out.
[0211] b) The system layer unbinds the logical display device LD0 from the physical display device D1.
[0212] c) The system layer unbinds the logical display device LD1 from the physical display device D0.
[0213] d) Bind the logical display device LD0 to the physical display device D0.
[0214] e) Remove the logical display device LD1.
[0215] f) Remove the physical display device D1.
[0216] g) Remove the physical screen PD1.
[0217] h) Notify the APP of screen changes, and the APP switches to single-screen mode according to the number of screens.
[0218] It should be noted that, Figure 9 As shown, the main screen is fixedly mapped to logical display device LD0, and the secondary screen is fixedly mapped to logical display device LD1. That is, logical display device LD0 is the target main logical display device corresponding to the APP, while logical display device LD1 is the secondary logical display device corresponding to the APP. The main / secondary screen seen from the APP layer and other system modules is fixed.
[0219] Compared with related technologies, the display correspondence between the main screen and the secondary screen on dual-screen display devices is relatively fixed. When the business needs to change the correspondence between the two or needs to be flexibly adjusted according to different scenarios, the existing solutions often cannot achieve dynamic switching. The entire machine needs to be restarted to re-fix the correspondence, and plugging and unplugging requires a restart, resulting in a poor user experience.
[0220] Based on the method in this application embodiment, the main screen and the secondary screen have a more flexible correspondence. The two screens can be defined as main and secondary screens in different scenarios according to actual needs, meeting business display and operation requirements. With the plugging and unplugging of the external screen, the main interface can dynamically switch between the external screen and the main screen.
[0221] See Figure 10 The diagram shown is an implementation flowchart of another screen display control method provided in this application embodiment, applied to the target application. The specific implementation flow of this method is as follows:
[0222] S1001: The target application receives the first mapping relationship between the target external screen and the target main logical display device. The first mapping relationship is generated and sent after receiving a notification message indicating the insertion of the external screen. The target external screen is one of the at least one external screens determined after receiving the notification message, which is the external screen that serves as the main physical display device. The target main logical display device has a main interface display binding relationship with itself.
[0223] S1002: The target application determines the target external screen associated with the target main logic display device based on the first mapping relationship.
[0224] S1003: When the target application is running, the application's main interface is mapped to the target external screen for display.
[0225] Optionally, the first mapping relationship also includes: the mapping relationship between each secondary physical display device and each secondary logical display device, wherein the secondary physical display device is an external screen or local screen other than the target external screen; the method also includes:
[0226] Based on the first mapping relationship, the target application determines the secondary physical display devices associated with each secondary logical display device, and each secondary logical display device has a secondary interface display binding relationship with itself; when the target application runs, it maps the application's secondary interface to the corresponding secondary physical display device for display.
[0227] For example, after receiving the first mapping relationship, the target application determines that the target external screen associated with the target main logical display device is external screen 3. Therefore, based on the target main logical display device, the application's main interface can be mapped to external screen 3 for display. Similarly, if the target application determines that the secondary logical display device 1 is associated with external screen 1 based on the first mapping relationship, the application's secondary interface can be mapped to external screen 1 for display. Likewise, when it is determined that the secondary logical display device 2 is associated with external screen 2 and the secondary logical display device 3 is associated with local screen 0, the corresponding interface can also be displayed.
[0228] It should be noted that when the target application receives the first mapping relationship, it can perform interface mapping based on the mapping relationship. For specific implementation methods, please refer to the above embodiments. Repeated parts will not be described again.
[0229] In this embodiment, the target application pre-sets the main interface display binding relationship between the target main logical display device and the target application, as well as the secondary interface display binding relationship between the secondary logical display device and the target application. Therefore, when the target application receives the mapping relationship notification, it only needs to identify the target external screen bound to the target main logical display device to map the main interface to that target external screen. That is, with the insertion of the external screen, the main interface can switch from the local screen to the external screen, achieving dynamic switching between the main and secondary interfaces. Similarly, based on the mapping relationship, the secondary interface can also be mapped to other external screens or the local screen for display. Furthermore, when the external screen is removed, only the mapping relationship needs to be adjusted, and the target application can switch between the main and secondary screens based on the adjusted mapping relationship.
[0230] Optionally, if the first mapping relationship changes, the target application may also receive a second mapping relationship obtained by adjusting the first mapping relationship, wherein the second mapping relationship is generated and sent after receiving a notification message indicating that the target external screen is unplugged; then, based on the second mapping relationship, the target application determines a new main physical display device associated with the target main logical display device; when the target application is running, it maps the application's main interface to the new main physical display device for display.
[0231] Furthermore, since the second mapping relationship in this embodiment is obtained by adjusting the first mapping relationship, similarly, the second mapping relationship may also include: the mapping relationship between each new secondary physical display device and each secondary logical display device, wherein the new secondary physical display device is an external screen or local screen other than the new primary physical display device; the method further includes:
[0232] Based on the second mapping relationship, the target application determines the new sub-physical display devices associated with each sub-logical display device; when the target application is running, it maps the application sub-interfaces to the corresponding new sub-physical display devices for display.
[0233] For example, after receiving the second mapping relationship, the target application determines that the new physical display device associated with the target main logical display device is external screen 1. Therefore, based on the target main logical display device, the application's main interface can be mapped to external screen 1 for display. Similarly, if the target application determines that secondary logical display device 1 is associated with external screen 1 based on the first mapping relationship, the application's secondary interface can be mapped to external screen 1 for display. Likewise, when it determines that secondary logical display device 3 is associated with local screen 0, the corresponding interface can also be displayed.
[0234] It should be noted that the specific implementation methods can be found in the above embodiments, and repeated details will not be described again.
[0235] It should also be noted that the target application can also receive the third mapping relationship obtained by adjusting the first mapping relationship, and then adjust the screen display based on the third mapping relationship. Repeated points will not be elaborated further.
[0236] The following is a brief summary of the method in the embodiments of this application, using a set of main interface switching diagrams as an example.
[0237] Taking a terminal device containing only one local screen as an example, labeled as Local Screen 0. In the first stage, the main interface is displayed in Local Screen 0, such as... Figure 11A As shown.
[0238] In the second stage, two external screens are connected to the local screen, labeled as External Screen 1 and External Screen 2. At this point, one of External Screen 1 and External Screen 2 can be selected as the target external screen. For example, if External Screen 1 is selected as the target external screen, then the local screen 0, which was used to display the main interface in the first stage, will become the secondary physical display device for displaying the secondary interface in the second stage. External Screen 2 will be the other secondary physical display device. The main interface will be switched from local screen 0 to external screen 1 for display. Figure 11B As shown.
[0239] In the third stage, external screen 1 is disconnected. At this point, external screen 2 is selected as the new primary physical display device from local screen 0 and external screen 2. In this stage, local screen 0 becomes the secondary physical display device, used to display the secondary interface, while external screen 2 becomes the primary physical display device, used to display the primary interface. The primary interface is then switched from external screen 1 to external screen 2 for display. Figure 11C As shown.
[0240] In the fourth stage, external screen 2 is further disconnected. At this point, local screen 0 can be used as the main physical display device, meaning the main interface is switched back from external screen 2 to local screen 0 for display. Figure 11C As shown.
[0241] in, Figure 11A It can also represent an implementation where all external screens are disconnected and the terminal device has only one display screen (i.e., local screen 0), in which case this display screen is used as the main screen, displaying, for example... Figure 4 The main interface shown.
[0242] In another implementation, besides using the display screen as the main screen, it can also be used as a secondary screen to display a secondary interface, while the main interface is projected onto the store clerk's mobile phone that is logged into the target application, such as... Figure 11D As shown.
[0243] That is, when no external screen is plugged in or all external screens are unplugged, and the terminal device has only one display screen, the local screen previously used to display the main interface can be used by customers, while the staff's mobile phone can be extended to the main physical display device to display the main interface, realizing flexible and dynamic switching between the main interface and the secondary interface on products that require hot-swappable screens.
[0244] When inserting an external screen, this application only requires selecting the primary physical display device and establishing the mapping relationship between each physical display device and the logical display device. The target application side pre-sets the main interface display binding relationship between the target primary logical display device and the target application, as well as the secondary interface display binding relationship between the secondary logical display device and the target application. Therefore, when the target application receives the mapping relationship notification, it only needs to identify the target external screen bound to the target primary logical display device to map the main interface to that target external screen. That is, with the insertion of the external screen, the main interface can be switched from the local screen to the external screen, realizing dynamic switching between the main and secondary interfaces. Similarly, the secondary interface can also be mapped to other external screens or the local screen for display based on the mapping relationship. In addition, when removing the external screen, only the mapping relationship needs to be adjusted, and the target application can switch between the main and secondary screens based on the adjusted mapping relationship.
[0245] Based on the screen display control method, device, electronic device and storage medium proposed in this application, when the business needs to change the correspondence between the main screen and the secondary screen or needs to be flexibly adjusted according to different scenarios, there is no need to restart the whole machine to fix the correspondence. Flexible and dynamic switching of the main interface can be achieved on products that require hot-swappable screens.
[0246] Based on the same inventive concept, embodiments of this application also provide a screen display control device. For example... Figure 12 As shown, this is a schematic diagram of the structure of the screen display control device 1200, which may include:
[0247] The determining unit 1201 is used to determine at least one external screen currently in operation when it receives a notification message indicating that an external screen has been inserted.
[0248] Establishment unit 1202 is used to determine at least one target external screen that serves as the main physical display device, and to establish a first mapping relationship between the target external screen and the target main logical display device; a main interface display binding relationship is set between the target main logical display device and the target application;
[0249] The notification unit 1203 is used to notify the target application of the first mapping relationship, so that the target application can determine the target external screen associated with the target main logical display device based on the first mapping relationship, and map the application's main interface to the target external screen for display when the target application is running.
[0250] Optionally, the first mapping relationship also includes: the mapping relationship between each secondary physical display device and each secondary logical display device, wherein the secondary physical display device is an external screen or local screen other than the target external screen; the notification unit 1203 is also used for:
[0251] The first mapping relationship is notified to the target application so that the target application can determine the secondary physical display devices associated with each secondary logical display device based on the first mapping relationship. When the target application is running, the application's secondary interface is mapped to the corresponding secondary physical display device for display. A secondary interface display binding relationship is set between each secondary logical display device and the target application.
[0252] Optionally, unit 1202 is specifically used for:
[0253] If the current target main logical display device is bound to a local screen, then unbind the local screen from the target main logical display device;
[0254] Bind the target external screen to the target main logical display device, and bind each secondary physical display device to a secondary logical display device respectively;
[0255] Based on the obtained binding results, the first mapping relationship is generated.
[0256] Optionally, unit 1202 is specifically used for:
[0257] If only one external screen is inserted, then the external screen will be used as the target external screen.
[0258] If there are multiple external screens inserted, one of the multiple external screens will be randomly selected as the target external screen, or, in response to the input main physical display device indication information, the corresponding external screen will be selected as the target external screen.
[0259] Optionally, the device also includes:
[0260] The adjustment unit 1204 is used to, after the notification unit 1203 notifies the target application of the first mapping relationship, when receiving a notification message indicating that the target external screen is unplugged, redetermine the new main physical display device, and adjust the first mapping relationship accordingly based on the new main physical display device to obtain the adjusted second mapping relationship.
[0261] The second mapping relationship is notified to the target application so that the target application can determine the new main physical display device associated with the main logical display device based on the second mapping relationship, and the application's main interface is mapped to the new main physical display device for display when the target application is running.
[0262] Optionally, the second mapping relationship also includes: the mapping relationship between each new secondary physical display device and each secondary logical display device, wherein the new secondary physical display devices are external screens or local screens other than the new primary physical display device; the adjustment unit 1204 is also used for:
[0263] The second mapping relationship is notified to the target application so that the target application can determine the new secondary physical display devices associated with each secondary logical display device based on the second mapping relationship. When the target application is running, the application's secondary interface is mapped to the corresponding new secondary physical display devices for display. A secondary interface display binding relationship is set between each secondary logical display device and the target application.
[0264] Optionally, the adjustment unit 1204 is specifically used for:
[0265] Based on the first mapping relationship, the target external screen that was pulled out is unbound from the target main logical display device, and the new main physical display device is unbound from the corresponding secondary logical display device;
[0266] Bind the new main physical display device to the target main logical display device;
[0267] Based on the new binding result, the first mapping relationship is adjusted to obtain the second mapping relationship.
[0268] Optionally, the adjustment unit 1204 is specifically used for:
[0269] If, based on the removed target external screen, it is determined that there is an external screen currently in operation, then one of the currently in operation external screens is selected as the new main physical display device.
[0270] If, based on the removed target external screen, it is determined that there is no currently working external screen, then one of at least one local screen is selected as the new main physical display device.
[0271] Based on the same inventive concept, embodiments of this application also provide another screen display control device. For example... Figure 13 As shown, this is a schematic diagram of the structure of the screen display control device 1300, which may include:
[0272] The receiving unit 1301 is used to receive a first mapping relationship between the target external screen and the target main logical display device. The first mapping relationship is generated and sent after receiving a notification message indicating that the external screen is inserted. The target external screen is the external screen that serves as the main physical display device among at least one external screen determined after receiving the notification message. The target main logical display device has a main interface display binding relationship with itself.
[0273] The determining unit 1302 is used to determine the target external screen associated with the target main logic display device based on the first mapping relationship;
[0274] The display unit 1303 is used to map the main interface of the application to the target external screen for display during runtime.
[0275] Optionally, the first mapping relationship also includes: the mapping relationship between each secondary physical display device and each secondary logical display device, wherein the secondary physical display device is an external screen or local screen other than the target external screen; the determining unit 1302 is further used for:
[0276] Based on the first mapping relationship, the secondary physical display devices associated with each secondary logical display device are determined, and each secondary logical display device has a secondary interface display binding relationship with itself.
[0277] Display unit 1303 is also used for:
[0278] During runtime, the application's secondary interface is mapped to the corresponding secondary physical display device for display.
[0279] Optionally, the device also includes:
[0280] The update unit 1304 is configured to receive a second mapping relationship obtained by adjusting the first mapping relationship, wherein the second mapping relationship is generated and sent after receiving a notification message indicating that the target external screen is unplugged;
[0281] Based on the second mapping relationship, a new main physical display device is determined that is associated with the main logical display device;
[0282] At runtime, the application's main interface is mapped to the new main physical display device for display.
[0283] Optionally, the second mapping relationship also includes: the mapping relationship between each new secondary physical display device and each secondary logical display device, wherein the new secondary physical display devices are external screens or local screens other than the new primary physical display device; the update unit 1304 is also used for:
[0284] Based on the second mapping relationship, new sub-physical display devices are determined to be associated with each sub-logical display device;
[0285] During runtime, the application's sub-interfaces are mapped to the corresponding new sub-physical display devices for display.
[0286] For ease of description, the above sections are divided into modules (or units) according to their functions and described separately. Of course, in implementing this application, the functions of each module (or unit) can be implemented in one or more software or hardware components.
[0287] Having introduced the screen display control method and apparatus according to exemplary embodiments of this application, we will now introduce another exemplary embodiment of a screen display control apparatus according to this application.
[0288] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."
[0289] In some possible implementations, the screen display control device according to this application may include at least a processor and a memory. The memory stores program code that, when executed by the processor, causes the processor to perform the steps of the screen display control method according to various exemplary embodiments of this application described herein. For example, the processor may perform actions such as... Figure 3 The steps are shown in the figure.
[0290] Based on the same inventive concept as the above-described method embodiments, this application also provides an electronic device. In one embodiment, the electronic device may be a server, such as... Figure 2 The server 220 is shown. In this embodiment, the structure of the electronic device can be as follows: Figure 14 As shown, it includes a memory 1401, a communication module 1403, and one or more processors 1402.
[0291] The memory 1401 is used to store computer programs executed by the processor 1402. The memory 1401 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0292] Memory 1401 may be volatile memory, such as random-access memory (RAM); memory 1401 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 1401 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 1401 may be a combination of the above-described memories.
[0293] The processor 1402 may include one or more central processing units (CPUs) or digital processing units, etc. The processor 1402 is used to implement the aforementioned screen display control method when it calls a computer program stored in the memory 1401.
[0294] The communication module 1403 is used to communicate with terminal devices and other servers.
[0295] This application embodiment does not limit the specific connection medium between the memory 1401, communication module 1403, and processor 1402. This application embodiment... Figure 14 The memory 1401 and the processor 1402 are connected via a bus 1404, and the bus 1404 is in Figure 14 The diagram uses thick lines to describe the connections between other components; these are for illustrative purposes only and should not be considered limiting. The 1404 bus can be divided into address bus, data bus, control bus, etc. For ease of description, Figure 14 It is described using only a thick line, but does not indicate that there is only one bus or one type of bus.
[0296] The memory 1401 stores a computer storage medium, which in turn stores computer-executable instructions for implementing the screen display control method of this application embodiment. The processor 1402 is used to execute the aforementioned screen display control method, such as... Figure 3 As shown.
[0297] In another embodiment, the electronic device may also be other electronic devices, such as... Figure 2 The terminal device 210 is shown. In this embodiment, the electronic device can be structured as follows: Figure 15 As shown, it includes components such as: communication component 1510, memory 1520, display unit 1530, camera 1540, sensor 1550, audio circuit 1560, Bluetooth module 1570, processor 1580, etc.
[0298] The communication component 1510 is used to communicate with the server. In some embodiments, it may include a Circuit-Based Wireless Fidelity (WiFi) module, which is a short-range wireless transmission technology. Electronic devices can use the WiFi module to help users send and receive information.
[0299] The memory 1520 can be used to store software programs and data. The processor 1580 executes various functions of the terminal device 210 and performs data processing by running the software programs or data stored in the memory 1520. The memory 1520 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. The memory 1520 stores an operating system that enables the terminal device 210 to run. In this application, the memory 1520 can store the operating system and various applications, and may also store code that executes the screen display control method of the embodiments of this application.
[0300] The display unit 1530 can also be used to display information input by the user or information provided to the user, as well as various menus of the terminal device 210, forming a graphical user interface (GUI). Specifically, the display unit 1530 may include a display screen 1532 disposed on the front of the terminal device 210. The display screen 1532 may be configured as a liquid crystal display, a light-emitting diode, or the like. The display unit 1530 can be used to display the application operation interface, etc., as described in the embodiments of this application.
[0301] The display unit 1530 can also be used to receive input digital or character information and generate signal inputs related to user settings and function control of the terminal device 210. Specifically, the display unit 1530 may include a touch screen 1531 disposed on the front of the terminal device 210, which can collect touch operations of the user on or near it, such as clicking a button, dragging a scroll box, etc.
[0302] The touchscreen 1531 can be placed over the display screen 1532, or the touchscreen 1531 and the display screen 1532 can be integrated to realize the input and output functions of the terminal device 210. After integration, it can be referred to as a touch display screen. In this application, the display unit 1530 can display the application program and the corresponding operation steps.
[0303] Camera 1540 can be used to capture still images, which users can then post comments on via the application. There can be one or multiple cameras 1540. An object is projected onto a photosensitive element through a lens, generating an optical image. This photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to the processor 1580 for conversion into a digital image signal.
[0304] The terminal device may also include at least one sensor 1550, such as an accelerometer 1551, a proximity sensor 1552, a fingerprint sensor 1553, and a temperature sensor 1554. The terminal device may also be equipped with other sensors such as a gyroscope, barometer, hygrometer, thermometer, infrared sensor, light sensor, and motion sensor.
[0305] Audio circuitry 1560, speaker 1561, and microphone 1562 provide an audio interface between the user and terminal device 210. Audio circuitry 1560 converts received audio data into electrical signals, which are then transmitted to speaker 1561, where they are converted into sound signals for output. Terminal device 210 may also be equipped with volume buttons for adjusting the volume of the sound signal. Conversely, microphone 1562 converts collected sound signals into electrical signals, which are then received by audio circuitry 1560, converted back into audio data, and output to communication component 1510 for transmission to, for example, another terminal device 210, or to memory 1520 for further processing.
[0306] The Bluetooth module 1570 is used to interact with other Bluetooth devices that also have a Bluetooth module via the Bluetooth protocol. For example, a terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smartwatch) that also has a Bluetooth module through the Bluetooth module 1570, thereby exchanging data.
[0307] The processor 1580 is the control center of the terminal device, connecting various parts of the terminal through various interfaces and lines. It executes various functions and processes data by running or executing software programs stored in the memory 1520 and calling data stored in the memory 1520. In some embodiments, the processor 1580 may include one or more processing units; the processor 1580 may also integrate an application processor and a baseband processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the baseband processor mainly handles wireless communication. It is understood that the baseband processor may not be integrated into the processor 1580. In this application, the processor 1580 can run the operating system, applications, user interface display and touch response, and the screen display control method of this embodiment. Furthermore, the processor 1580 is coupled to the display unit 1530.
[0308] In some possible implementations, various aspects of the screen display control method provided in this application can also be implemented as a program product, which includes program code. When the program product is run on a computer device, the program code is used to cause the computer device to perform the steps in the screen display control method according to the various exemplary embodiments of this application described above. For example, the computer device can perform actions such as... Figure 3The steps are shown in the figure.
[0309] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0310] The program product of the embodiments of this application may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a computing device. However, the program product of this application is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with a command execution system, apparatus, or device.
[0311] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with a command execution system, apparatus, or device.
[0312] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0313] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0314] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0315] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0316] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A screen display control method, characterized in that, Applied to a terminal device, wherein the terminal device includes at least a driver layer, a system layer, and an application layer, and the application layer carries the target application, the method includes: The driver layer detects hot-plugging of external screens and, upon detecting an external screen being inserted, notifies the system layer to perform the following operations: Upon receiving a notification message indicating that an external screen has been inserted, identify at least one external screen that is currently in operation; Identify the target external screen among the at least one external screens that serves as the main physical display device, and establish a first mapping relationship between the target external screen and the target main logical display device; the target main logical display device is software that has a main interface display binding relationship with the target application. The first mapping relationship is notified to the target application, so that the target application can determine the target external screen associated with the target main logic display device based on the first mapping relationship, and when the target application is running, the application's main interface is mapped to the target external screen for display based on the display logic related to the target main logic display device.
2. The method as described in claim 1, characterized in that, The first mapping relationship further includes: the mapping relationship between each secondary physical display device and each secondary logical display device, wherein the secondary physical display device is an external screen or local screen other than the target external screen; notifying the target application of the first mapping relationship further includes: The first mapping relationship is notified to the target application, so that the target application determines the secondary physical display device associated with each secondary logical display device based on the first mapping relationship, and the application's secondary interface is mapped to the corresponding secondary physical display device for display when the target application is running. Each secondary logical display device is software that has a secondary interface display binding relationship with the target application.
3. The method as described in claim 2, characterized in that, Establishing the first mapping relationship between the target external screen and the target main logic display device includes: If the target main logic display device is currently bound to a local screen, then the local screen is unbound from the target main logic display device; The target external screen is bound to the target main logical display device, and each of the secondary physical display devices is bound to a secondary logical display device. Based on the obtained binding results, the first mapping relationship is generated.
4. The method as described in claim 1, characterized in that, The step of determining the target external screen among the at least one external screens as the main physical display device includes: If the number of external screens inserted is one, then the external screen is used as the target external screen; If there are multiple external screens inserted, one of the multiple external screens is randomly selected as the target external screen, or, in response to the input main physical display device indication information, the corresponding external screen is selected as the target external screen.
5. The method according to any one of claims 1 to 4, characterized in that, After notifying the target application of the first mapping relationship, the process also includes: When the driver layer detects that the external screen has been unplugged, it notifies the system layer to perform the following operation: Upon receiving a notification message instructing the target external screen to be unplugged, a new primary physical display device is determined, and based on the new primary physical display device, the first mapping relationship is adjusted accordingly to obtain the adjusted second mapping relationship. The second mapping relationship is communicated to the target application, so that the target application can determine the new main physical display device associated with the target main logical display device based on the second mapping relationship, and when the target application is running, the application's main interface is mapped to the new main physical display device for display.
6. The method as described in claim 5, characterized in that, The second mapping relationship also includes: the mapping relationship between each new secondary physical display device and each secondary logical display device, wherein the new secondary physical display device is an external screen or local screen other than the new primary physical display device; the step of notifying the target application of the second mapping relationship also includes: The second mapping relationship is notified to the target application, so that the target application determines the new secondary physical display device associated with each of the secondary logical display devices based on the second mapping relationship, and the application's secondary interface is mapped to the corresponding new secondary physical display device for display when the target application is running. Each secondary logical display device and the target application are bound together by a secondary interface display relationship.
7. The method as described in claim 6, characterized in that, The step of adjusting the first mapping relationship based on the new main physical display device to obtain the adjusted second mapping relationship includes: Based on the first mapping relationship, the target external screen that has been pulled out is unbound from the target main logical display device, and the new main physical display device is unbound from the corresponding secondary logical display device; Bind the new main physical display device to the target main logical display device; Based on the new binding result, the first mapping relationship is adjusted to obtain the second mapping relationship.
8. The method as described in claim 5, characterized in that, The process of re-determining the new primary physical display device includes: If, based on the removed target external screen, it is determined that there is a currently working external screen, then one of the currently working external screens is selected as the new main physical display device. If, based on the removed target external screen, it is determined that there is no currently working external screen, then one of at least one local screen is selected as the new main physical display device.
9. A screen display control method, characterized in that, Applied to a target application running at the application layer of a terminal device, the terminal device further includes at least a driver layer and a system layer. The driver layer is used to detect hot-plugging of an external screen and notify the system layer when an external screen is detected being inserted. The method includes: The system receives a first mapping relationship between a target external screen and a target main logical display device. The first mapping relationship is generated and sent by the system layer after receiving a notification message indicating that the external screen is to be inserted. The target external screen is an external screen that serves as the main physical display device among at least one external screen determined after receiving the notification message. The target main logical display device is software that has a main interface display binding relationship with the target application. Based on the first mapping relationship, the target external screen associated with the target main logic display device is determined; During runtime, based on the display logic related to the target main logic display device, the application's main interface is mapped to the target external screen for display.
10. The method as described in claim 9, characterized in that, The first mapping relationship further includes: the mapping relationship between each secondary physical display device and each secondary logical display device, wherein the secondary physical display device is an external screen or local screen other than the target external screen; the method further includes: Based on the first mapping relationship, the secondary physical display devices associated with each of the secondary logical display devices are determined. Each of the secondary logical display devices is software that has a secondary interface display binding relationship with the target application. During runtime, the application's secondary interface is mapped to the corresponding secondary physical display device for display.
11. The method as described in claim 9 or 10, characterized in that, The driver layer is also used to notify the system layer when an external screen is detected to be unplugged, and the method further includes: Receive a second mapping relationship obtained by adjusting the first mapping relationship, wherein the second mapping relationship is generated and sent after the system layer receives a notification message indicating that the target external screen is unplugged; Based on the second mapping relationship, a new main physical display device is determined that is associated with the target main logical display device; During runtime, the application's main interface is mapped to the new main physical display device for display.
12. The method as described in claim 11, characterized in that, The second mapping relationship also includes: the mapping relationship between each new secondary physical display device and each secondary logical display device, wherein the new secondary physical display device is an external screen or local screen other than the new primary physical display device; the method further includes: Based on the second mapping relationship, new sub-physical display devices are determined to be associated with each of the sub-logical display devices; During runtime, the application's sub-interfaces are mapped to the corresponding new sub-physical display devices for display.
13. A screen display control device, characterized in that, The device for the screen display control method according to any one of claims 1 to 8 comprises: The determining unit is configured to determine at least one external screen currently in operation upon receiving a notification message indicating that an external screen has been inserted. A setup unit is used to determine the target external screen among the at least one external screens that serves as the main physical display device, and to establish a first mapping relationship between the target external screen and the target main logical display device; the target main logical display device and the target application are bound together by a main interface display relationship. The notification unit is used to notify the target application of the first mapping relationship, so that the target application can determine the target external screen associated with the target main logical display device based on the first mapping relationship, and map the application's main interface to the target external screen for display when the target application is running.
14. A screen display control device, characterized in that, Applied to a target application running at the application layer of a terminal device, the terminal device further includes at least a driver layer and a system layer. The driver layer is used to detect hot-plugging of an external screen and notify the system layer when an external screen is detected being inserted. The device includes: A receiving unit is used to receive a first mapping relationship between a target external screen and a target main logical display device. The first mapping relationship is generated and sent by the system layer after receiving a notification message indicating that the external screen is inserted. The target external screen is an external screen that serves as the main physical display device among at least one external screen determined after receiving the notification message. The target main logical display device is software that has a main interface display binding relationship with the target application. The determining unit is configured to determine the target external screen associated with the target main logic display device based on the first mapping relationship; The display unit is used to map the main interface of the application to the target external screen for display based on the display logic related to the target main logic display device during runtime.
15. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the processor to perform the steps of any of the methods of claims 1 to 8 or any of the methods of claims 9 to 12.
16. A computer-readable storage medium, characterized in that, It includes program code that, when the storage medium is running on an electronic device, causes the electronic device to perform the steps of any of the methods of claims 1 to 8 or any of the methods of claims 9 to 12.
17. A computer program product, characterized in that, The method includes computer instructions, characterized in that, when executed by a processor, the computer instructions implement the steps of any of the methods described in claims 1 to 8 or any of the methods described in claims 9 to 12.