Interface display direction switching method, device, system, electronic equipment and medium

CN117555636BActive Publication Date: 2026-10-13VIVO MOBILE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311503439.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2026-10-13
Estimated Expiration
2043-11-10

AI Technical Summary

Technical Problem

[0003]本申请实施例的目的是提供一种界面显示方向的切换方法、装置、系统、电子设备及介质,用以解决应用内的横竖屏切换响应时间较长的问题

Benefits of technology

[0023]本申请的实施例,窗口管理服务系统在获取到窗口的界面显示方向切换需求时,可以预计算出待切换的界面显示方向,并给窗口对应的内容提供者发送该界面显示方向的信息,使内容提供者可以基于该界面显示方向的信息预加载资源。通过将需要切换显示方向的窗口对应的主窗口节点从窗口显示系统的树形结构中剥离出来,并建立独立节点对主窗口节点进行控制,从而完成界面显示方向的匹配,使其不会受到窗口显示系统的树形结构中父节点的影响,具有更高的处理自由度。本申请无需等待全局配置更新即可完成界面显示方向的切换,使得窗口内界面显示方向的切换响应速度更快,降低了显示时延提高显示方向切换的流畅度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117555636B_ABST
    Figure CN117555636B_ABST
Patent Text Reader

Abstract

The application discloses a switching method, device and system of interface display direction, electronic equipment and medium. The method comprises the following steps: in the case that the window management service system obtains the interface display direction switching demand of a first window, the interface display direction to be switched is determined; the configuration information of the interface display direction is sent to the content provider of the first window; the content provider preloads the resources required by the interface display direction according to the configuration information of the interface display direction; the window management service system peels off the branch where the main window node corresponding to the first window is located from the tree structure of the window display system and creates an independent node, and takes the independent node as the parent node of the main window node; the first window corresponding to the main window node is matched with the interface display direction through the independent node, and the information content is displayed in the interface display direction based on the resources provided by the content provider of the first window.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of display control technology, specifically relating to a method, device, system, electronic device, and medium for switching the display direction of an interface. Background Technology

[0002] On mobile devices, users frequently switch between portrait and landscape orientations within applications, such as changing the orientation of their hand or starting video playback. Current mobile devices require the following steps to complete this screen switching: freezing the screen (display frozen or surface frozen), waiting for the system's global configuration and coordinate system to update, sending the new configuration to the application process, the process receiving the new configuration, updating its resources, reloading and redrawing, and finally unfreezing and starting the rotation animation to display the refreshed interface. In this sequential logic, there is always a period of unresponsiveness before the switch, and this unresponsiveness increases with platform performance, resulting in a worse user experience. Summary of the Invention

[0003] The purpose of this application is to provide a method, apparatus, system, electronic device, and medium for switching the interface display orientation, so as to solve the problem of long response time when switching between portrait and landscape modes in an application.

[0004] In a first aspect, embodiments of this application provide a method for switching the display orientation of an interface, the method comprising:

[0005] Upon receiving a request from the first window to switch the display orientation, the window management service system determines the display orientation to be switched.

[0006] The window management service system sends the configuration information of the interface display direction to the content provider of the first window; the content provider preloads the resources required for the interface display direction according to the configuration information of the interface display direction;

[0007] The window management service system extracts the branch containing the main window node corresponding to the first window from the tree structure of the window display system and creates an independent node, which is then used as the parent node of the main window node.

[0008] The window management service system controls the first window corresponding to the main window node to match the interface display direction through the independent node, and displays information content in the interface display direction based on the resources provided by the content provider of the first window.

[0009] Secondly, embodiments of this application provide a system for switching the display direction of an interface, including: a window management service system and a content provider for the window;

[0010] The window management service system is used to determine the interface display direction to be switched when the interface display direction of the first window is requested to be switched; and to send the configuration information of the interface display direction to the content provider of the first window.

[0011] The content provider of the first window is used to preload the resources required for the interface display direction according to the configuration information of the interface display direction;

[0012] The window management service system is also used to: extract the branch containing the main window node corresponding to the first window from the tree structure of the window display system and create an independent node, and use the independent node as the parent node of the main window node; control the first window corresponding to the main window node to match the interface display direction through the independent node;

[0013] The content provider of the first window is further configured to: display information content in the interface display direction based on the resources provided by the content provider of the first window.

[0014] Thirdly, embodiments of this application provide a device for switching the display orientation of an interface, comprising:

[0015] The first determining module is used to determine the interface display direction to be switched when the interface display direction switching requirement of the first window is obtained.

[0016] A first sending module is used to send configuration information of the interface display direction to the content provider of the first window; the content provider preloads the resources required for the interface display direction according to the configuration information of the interface display direction;

[0017] The first processing module is used to extract the branch where the main window node corresponding to the first window is located from the tree structure of the window display system and create an independent node, and use the independent node as the parent node of the main window node.

[0018] The first control module is used to control the first window corresponding to the main window node to match the interface display direction through the independent node, and to display information content in the interface display direction based on the resources provided by the content provider of the first window.

[0019] Fourthly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method described in the first aspect.

[0020] Fifthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0021] In a sixth aspect, embodiments of this application also provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.

[0022] In a seventh aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.

[0023] In embodiments of this application, when the window management service system receives a request to switch the interface display direction of a window, it can pre-calculate the interface display direction to be switched and send this information to the content provider corresponding to the window, allowing the content provider to preload resources based on this information. By separating the main window node corresponding to the window whose display direction needs to be switched from the tree structure of the window display system and establishing an independent node to control the main window node, the matching of the interface display direction is completed, ensuring that it is not affected by the parent node in the tree structure of the window display system, thus providing greater processing freedom. This application can complete the switching of the interface display direction without waiting for a global configuration update, resulting in faster response speed for switching the interface display direction within the window, reducing display latency and improving the smoothness of the display direction switching. Attached Figure Description

[0024] Figure 1 This is one of the flowcharts illustrating the interface display direction switching method according to an embodiment of this application;

[0025] Figure 2 This is a schematic diagram of the tree structure of the window display system;

[0026] Figure 3 This is a schematic diagram illustrating the stripping of the main window node in an embodiment of this application;

[0027] Figure 4 This is a schematic diagram illustrating the switching process triggered in an embodiment of this application;

[0028] Figure 5 This is a second flowchart illustrating the method for switching the interface display direction according to an embodiment of this application;

[0029] Figure 6 This is a schematic diagram illustrating how a custom node controls the main window node according to an embodiment of this application;

[0030] Figure 7 This is a schematic diagram illustrating the restoration of the tree structure from the stripped main window in this embodiment of the application;

[0031] Figure 8 This is one of the structural schematic diagrams of the electronic device according to an embodiment of this application;

[0032] Figure 9 This is a second schematic diagram of the structure of the electronic device according to an embodiment of this application;

[0033] Figure 10 This is the third schematic diagram of the structure of the electronic device according to an embodiment of this application. Detailed Implementation

[0034] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0035] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0036] The network processing method, apparatus, and electronic device provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.

[0037] like Figure 1 As shown in the figure, this application provides a method for switching the interface display direction, applied to an electronic device, the method including:

[0038] Step 101: Upon receiving the request to switch the display orientation of the first window, the window management service system determines the display orientation to be switched.

[0039] In this embodiment, the electronic device may include a Window Management Service (WMS) system, a window content provider, and may also include a Sensor Manager and a Graphics Display Service (SurfaceFlinger). The Sensor Manager and Window Management Service are located in the framework layer of the electronic device; the Graphics Display Service is located in the native service layer; the content provider can be an application, or a third-party application, located in the application layer. If the window content is directly drawn by the system server, the content provider can also be in the framework layer.

[0040] This application embodiment addresses the switching between portrait and landscape display within an application. Within an Activity component adapted for portrait and landscape display, if the user changes their holding orientation (e.g., from portrait to landscape, or from landscape to portrait), or if the interface requests a change in orientation from portrait to landscape or vice versa, it indicates that the current Activity interface requires a switching function. This interface request may include, for example, the user clicking a button to switch display orientation or the system detecting that the current display interface needs to switch orientations.

[0041] When the window management service system receives a request to switch the display orientation, it can pre-calculate the future orientation state, that is, pre-calculate the orientation that the display interface needs to switch to.

[0042] Optionally, the window management service system can calculate the interface display orientation to be switched based on one or more of the following information: application request information (which can be dynamic or static), sensor data, and a settings switch database. The settings switch database may include, for example, settings such as portrait lock settings, landscape lock settings, and foldable / large screen orientation lock settings.

[0043] Step 102: The window management service system sends the configuration information of the interface display direction to the content provider of the first window; the content provider preloads the resources required for the interface display direction according to the configuration information of the interface display direction;

[0044] After calculating the future direction to be switched, the window management service system can directly send the configuration for the interface display direction to be switched to the content provider (which can be a client or an application). This allows the content provider to update its local resources in advance and synchronously preload the corresponding layout resources. It should be noted that the configuration for the interface display direction to be switched sent to the application here is not the current global configuration of the system.

[0045] Step 103: The window management service system extracts the branch containing the main window node corresponding to the first window from the tree structure of the window display system and creates an independent node, and uses the independent node as the parent node of the main window node.

[0046] Step 105: The window management service system controls the first window corresponding to the main window node to match the interface display direction through the independent node, and displays information content in the interface display direction based on the resources provided by the content provider of the first window.

[0047] The window display system of an electronic device is a complete tree-structured management system, and its core structure is expressed as follows: Figure 2 As shown, the tree structure includes: Display Root, m Overlay Containers, m Window Containers, Display Area Root, and multiple child nodes, including the Default Task Display Area node and its child nodes Task A and Task B. Taking Task A node as an example, this node includes child nodes Activity A and Activity B; the child nodes of Activity A include Window State A and Window State B; Window State A includes the child node Buffer Queue Layer A.

[0048] Since child nodes are influenced by their parent nodes, to achieve greater processing flexibility, this embodiment of the application requires separating the relevant nodes corresponding to the first window (such as the main window node and cache nodes) from the entire tree structure. The main window node is the node of the first window in the window display system, and the branch where the main window node is located includes the main window node and its child nodes.

[0049] The window management service system creates a new independent node, which can be a custom node, and uses this independent node as the parent node of the main window node, severing the connection between the main window node and its parent node in the original tree structure. This independent node is used to control the main window node. The window management service system can use this independent node to control the main window node to match the interface display direction to be switched. The first window corresponding to the main window node then switches its interface display direction. This first window also matches the displayed content based on pre-loaded resources provided by the content provider.

[0050] It should be noted that steps 102 and 103 are not sequential and can be executed synchronously. In this way, while the window management service system separates the main window node and controls it by an independent node, the content provider can also provide preloaded resources to the first window. Then, the first window can switch to the interface display direction to be switched and display the content correctly under the control of the independent node.

[0051] The independent node is independent node X, and the main window node corresponding to the first window is... Figure 2 Taking window A (Window State A) in the tree structure shown as an example, as... Figure 3 As shown, window A is detached from the tree structure, and independent node X can control window A and its child cache node A. Independent node X can send control information to window A to make window A and its descendant nodes match the interface display direction to be switched, thus realizing the visual switching between horizontal and vertical display directions.

[0052] In this embodiment, the window management service system creates independent nodes to temporarily control the main window nodes that have been stripped of their tree structure, so that the connection of the main window nodes in the tree structure can be restored later.

[0053] In embodiments of this application, when the window management service system receives a request to switch the interface display direction of a window, it can pre-calculate the interface display direction to be switched and send the information of the interface display direction to be switched to the content provider corresponding to the window, so that the content provider can preload resources based on the information of the interface display direction. By separating the main window node corresponding to the window that needs to switch display direction from the tree structure of the window display system and establishing an independent node to control the main window node, the matching of the interface display direction is completed, so that it is not affected by the parent node in the tree structure of the window display system, and has a higher degree of processing freedom. This application can complete the switching of interface display direction without waiting for global configuration updates, making the response speed of switching interface display direction within the window faster, reducing display latency and improving the smoothness of display direction switching. By breaking the limitations of window tree structure management, this application reduces the time for the framework layer to wait for global configuration and coordinate system updates. Its mechanism of parallel operation with pre-updating within the activity effectively improves the smoothness of users switching between horizontal and vertical orientations within the application, while reducing display latency.

[0054] As an optional embodiment, the window management service system obtains the interface display orientation switching request of the first window, including at least one of the following:

[0055] Receive sensor data, including handheld data of the electronic device; and determine the interface display orientation switching requirements of the first window based on the handheld data;

[0056] Receive interface request information sent by the content provider of the first window, and determine the interface display direction switching requirement of the first window based on the interface request information.

[0057] In this embodiment, the handheld data refers to parameters such as the orientation, angle, and center of gravity of the electronic device when held by the user. This data can be used to determine the desired window display orientation. Examples include sensor angle data and user settings (such as portrait mode lock).

[0058] The electronic device may include a sensor management system. When the sensor management system detects a change in the handheld orientation of the user's electronic device, it may report sensor data to a window management service system. The window management service system may determine the need to switch the interface display orientation based on the sensor data. And / or, the application may monitor the display requirements of the current display interface. For example, if the current display interface is in portrait mode, when it detects that the video to be played needs to be played in landscape mode, it may send an interface request message to the window management service system to request a switch of display orientation.

[0059] Upon receiving a switching request, the window management service system can pre-calculate the display direction of the interface to be switched and notify the relevant scene switching (Shell Transition) module to trigger the switching process without waiting for a global configuration update. For example... Figure 4 As shown, when the sensor management system detects a change in the handheld orientation of the user's electronic device, it notifies the phone window management system. The window orientation listener then notifies the shell transition module in the system user interface (system UI) component. Upon receiving the notification, the system UI needs to prepare for the orientation rotation. Compared to freezing the screen when a transition request is detected, this embodiment avoids interface errors or black screens caused by freezing.

[0060] As an optional embodiment, the step of using the independent node as the parent node of the main window node includes:

[0061] Instrument the independent node in front of the main window node;

[0062] The method further includes:

[0063] Record the pile location information of the independent node.

[0064] Optionally, after sending the interface display orientation configuration information to the content provider of the first window, the method further includes:

[0065] Receive resources sent by the content provider of the first window, wherein the resources are display resources corresponding to the interface display direction;

[0066] The step of controlling the first window corresponding to the main window node to match the interface display direction through the independent node, and displaying information content in the interface display direction based on the resources provided by the content provider of the first window, includes:

[0067] The configuration information for the interface display direction is sent from the independent node to the main window node;

[0068] The main window node changes the coordinate parameters of the first window based on the configuration information of the interface display direction, and displays the content of the resource information sent by the content provider of the first window.

[0069] In this embodiment, after the window management service system separates the branch containing the main window node corresponding to the first window from the tree structure, it controls the branch by creating an independent node. Specifically, the independent node is inserted between the tree structure and the separated main window node, and the insertion point information is recorded. The independent node is not a child node of the tree structure. Subsequently, the window management service system can use the `setTransform` procedure to control the main window node and its descendant nodes to match the interface display direction to be switched.

[0070] The first window can match the display direction of the interface to be switched based on the pre-loaded resources provided by the content provider and the control instructions of the independent node.

[0071] Specifically, the content provider for the first window may be a third party or it may be directly provided by the system service. The process of switching the display orientation of the main window based on control commands from independent nodes and pre-loaded resources varies in different scenarios.

[0072] In scenario 1, the System Server in the framework layer is the direct content provider, meaning the content of the first window is provided by the system service. This part directly treats the application startup page (surface) as an independent parent node container, which is managed independently of its internal buffer. The application startup page (surface) is still controlled by the window tree structure, while its internal buffer can act as the main window and, under the control of the independent node, independently switch the frame content according to the interface display direction calculated by the window management service system, so that the displayed content matches the interface display direction.

[0073] Scenario 2: If a third-party application layer acts as the content provider, the window management service system needs to notify the third-party client process after calculating the interface display orientation to be switched. The third-party client process then sends configuration information to the main window. Nodes independent of the tree structure control the switching of frame content for their main windows, thus changing the interface display orientation.

[0074] As an optional embodiment, after determining the configuration information of the interface display direction to be switched, the method further includes:

[0075] The window management service system updates the global configuration;

[0076] The window management service system sends the updated global configuration to the graphics display service system;

[0077] The graphics display service system updates the global coordinate system according to the global configuration.

[0078] In this embodiment, the window management service system, upon determining the interface display direction to be switched, can control the main window of the display interface to match the new direction state through an independent node, triggering the switch in advance, without waiting for a global configuration update. However, the global coordinate system remains in the original direction's coordinate system at this time. Therefore, the window management service system needs to update the global configuration locally and notify the graphics display server to complete the coordinate system and information update on the system side. The graphics display server holds a global lock during the process of updating the system coordinate system and information. The global lock protects the accessed object from simultaneous access and modification by multiple threads; only one thread can read and write at a time, while other threads must queue. Lock contention is severe and time-consuming. This application's method allows the updating of the global configuration and the switching of the interface display direction to be executed in parallel, effectively improving response time.

[0079] Optionally, after the graphics display service system updates the global coordinate system according to the global configuration, the method further includes: the window management service system deleting or caching the independent node, and restoring the connection of the branch where the main window node is located in the tree structure.

[0080] In this embodiment, after a global update is completed, the branch containing the main window node of the activity is restored to the system's native tree structure, allowing it to be automatically controlled by the tree management system and no longer requiring separate maintenance. Custom nodes created by the window management service system can be destroyed accordingly, or the objects and layers of the custom nodes can be cached and retrieved directly when needed next time.

[0081] The following example illustrates the implementation process of the interface display orientation switching method.

[0082] like Figure 5 As shown, it includes:

[0083] Step 501: When the sensor management system detects a change in the handheld orientation of the electronic device, it reports the data and triggers the process of switching the display orientation on the interface.

[0084] Alternatively, if the application detects that the display orientation of the interface in the first window needs to be switched, it can send an interface request to the window management service system to trigger the interface display orientation switching process.

[0085] Step 502: The window management service system receives the reported data and pre-calculates its future direction state, i.e. the interface display direction to be switched, based on the reported data and information such as the setting switch database.

[0086] Optionally, in step 503: the window management service system can compare the calculated future direction state with the members in the current window tree structure to further determine the switching requirements.

[0087] Step 504: The window management service system sends the configuration information of the future direction state to the content provider, so that the content provider can update the local resources in advance based on the configuration information and preload the corresponding layout resources synchronously.

[0088] Extract the branch containing the main window node corresponding to the first window from the tree structure of the window display system and create an independent node. Instrument the independent node between the tree structure and the extracted main window node, and record the instrumentation information. Use the independent node to control the extracted main window node to match its future orientation state.

[0089] In this embodiment, the window display system is a complete tree structure management system. Since child nodes are affected by their parent nodes, to achieve higher processing freedom, it is necessary to first separate the relevant nodes from the entire tree structure, such as... Figure 3 As shown, the main window node A is separated from the tree structure management system, and an independent node X is created and placed on top of it to control A.

[0090] Since the content provider has received the configuration information for the future orientation and preloaded resources, but the global coordinate system is still in the original orientation coordinate system (without waiting for the system's global configuration and coordinate system update), the display of the entire server-side window layer still refers to the original coordinate system. Therefore, it is necessary to use an independent node X instrumented before the stripped-out main window A to control this node to match the future orientation, such as... Figure 6 As shown, the information updated and loaded by the application is consistent with the orientation of the main window, and the content can be loaded correctly after the reference coordinate system is matched.

[0091] Specifically, the content provider can be a third party or a system service. If the content provider is a system service, the window management service system can directly send the future orientation configuration information to its internal buffer. After updating and preloading resources, the internal buffer can switch the frame content under the control of independent nodes to match the displayed content with the orientation of the interface to be switched.

[0092] If the content provider is a third party, the window management service system needs to send the future orientation configuration information to the third-party application layer. The third-party application layer then updates and preloads resources. Its nodes, independent of the tree structure, serve as the main window nodes, and can control the switching of frame content based on these independent nodes to match the displayed content with the orientation of the interface to be switched. This completes the visual switching between portrait and landscape display within the interface.

[0093] Step 505: After the window management service system calculates the interface display direction to be switched, the server in the framework layer updates the global configuration and window management system information locally.

[0094] Step 506: After updating the information, the window management service system notifies the native layer's graphics display service system, which then updates the coordinate system and information on the system side. This access process holds a Global lock.

[0095] Step 507: After handing over the stake, disconnect the stake connection and restore the control of the branch where the main window is located in the tree structure according to the recorded stake position information for management.

[0096] This step restores the activity's main window node back to the system's native tree structure, allowing it to be automatically controlled by the tree management system and no longer requiring separate maintenance. Created X nodes can be destroyed, or their objects and layers can be cached for later retrieval. For example... Figure 7 As shown.

[0097] This application breaks through the limitations of window tree structure management, reducing the time the framework layer spends waiting for global configuration and coordinate system updates. Its mechanism, which combines horizontal and vertical switching with in-activity pre-updates, effectively improves the smoothness and display latency experience for users switching between portrait and landscape modes within the application. It is compatible with both System Server as a content provider and third-party content providers, providing broader application coverage. Furthermore, the independent portrait and landscape management solution within the interface offers strong scenario scalability, the instrumentation method causes minimal disruption to the native system architecture, and instrumentation can be quickly removed after the scenario is completed.

[0098] In embodiments of this application, when the window management service system receives a request to switch the interface display direction of a window, it can pre-calculate the interface display direction to be switched and send this information to the content provider corresponding to the window, allowing the content provider to preload resources based on this information. By separating the main window node corresponding to the window whose display direction needs to be switched from the tree structure of the window display system and establishing an independent node to control the main window node, the matching of the interface display direction is completed, ensuring that it is not affected by the parent node in the tree structure of the window display system, thus providing greater processing freedom. This application can complete the switching of the interface display direction without waiting for a global configuration update, resulting in faster response speed for switching the interface display direction within the window, reducing display latency and improving the smoothness of the display direction switching.

[0099] The interface display orientation switching method provided in this application can be executed by an electronic device. This application uses an electronic device executing a network processing method as an example to illustrate the electronic device provided in this application.

[0100] This application embodiment also provides an interface display direction switching system, including: a window management service system and a window content provider;

[0101] The window management service system is used to determine the interface display direction to be switched when the interface display direction of the first window is requested to be switched; and to send the configuration information of the interface display direction to the content provider of the first window.

[0102] The content provider of the first window is used to preload the resources required for the interface display direction according to the configuration information of the interface display direction;

[0103] The window management service system is also used to: extract the branch containing the main window node corresponding to the first window from the tree structure of the window display system and create an independent node, and use the independent node as the parent node of the main window node; control the first window corresponding to the main window node to match the interface display direction through the independent node;

[0104] The content provider of the first window is further configured to: display information content in the interface display direction based on the resources provided by the content provider of the first window.

[0105] Optionally, the system further includes: a graphics display service system;

[0106] The window management service system is also used for: updating the global configuration; and sending the updated global configuration to the graphics display service system.

[0107] The graphics display service system is used to update the global coordinate system according to the global configuration.

[0108] Optionally, the window management service system is also used to: delete or cache the independent node, and restore the connection of the branch where the main window node is located in the tree structure.

[0109] Optionally, the window management service system is specifically used to perform at least one of the following:

[0110] Receive sensor data, including handheld data of the electronic device, and determine the interface display orientation switching requirements of the first window based on the handheld data;

[0111] Receive interface request information sent by the content provider of the first window, and determine the interface display direction switching requirement of the first window based on the interface request information.

[0112] Optionally, the window management service system is specifically used for: inserting the independent node in front of the main window node; and recording the position information of the independent node.

[0113] Optionally, the content provider is further configured to: provide resources to the first window, wherein the resources are display resources corresponding to the interface display direction;

[0114] The window management service system is also used to: send the configuration information of the interface display direction to the main window node through the independent node;

[0115] The first window changes its coordinate parameters based on the configuration information of the interface display direction, and displays content based on the resource information sent by the content provider of the first window.

[0116] It should be noted that in this system embodiment, the window management service system can implement all the steps implemented by the window management service system in the embodiment applied to electronic devices and achieve the corresponding technical effects. The content provider can implement all the steps implemented by the content provider in the embodiment applied to electronic devices and achieve the corresponding technical effects, which will not be elaborated upon here.

[0117] like Figure 8 As shown in the figure, this application embodiment also provides an interface display direction switching device 800, including:

[0118] The first determining module is used to determine the interface display direction to be switched when the interface display direction switching requirement of the first window is obtained.

[0119] A first sending module is used to send configuration information of the interface display direction to the content provider of the first window; the content provider preloads the resources required for the interface display direction according to the configuration information of the interface display direction;

[0120] The first processing module is used to extract the branch where the main window node corresponding to the first window is located from the tree structure of the window display system and create an independent node, and use the independent node as the parent node of the main window node.

[0121] The first control module is used to control the first window corresponding to the main window node to match the interface display direction through the independent node, and to display information content in the interface display direction based on the resources provided by the content provider of the first window.

[0122] Optionally, the device further includes:

[0123] The update module is used to update the global configuration;

[0124] The second sending module is used to send the updated global configuration to the graphics display service system; the graphics display service system updates the global coordinate system according to the global configuration.

[0125] Optionally, the device further includes:

[0126] The second processing module is used to delete or cache the custom node and restore the connection of the branch where the main window node is located in the tree structure.

[0127] Optionally, the apparatus further includes: an acquisition module, specifically configured to perform at least one of the following:

[0128] Receive sensor data, including handheld data of the electronic device; and determine the switching requirements for the interface display orientation of the first window based on the handheld data;

[0129] Receive interface request information sent by the content provider of the first window, and determine the switching requirement of the interface display direction of the first window based on the interface request information.

[0130] Optionally, the first processing module is specifically used for:

[0131] Instrument the independent node in front of the main window node;

[0132] The device further includes:

[0133] Record the pile location information of the independent node.

[0134] Optionally, the device further includes:

[0135] The receiving module is used to receive resources sent by the content provider of the first window, wherein the resources are display resources corresponding to the interface display direction;

[0136] The first control module is specifically used to: send the configuration information of the interface display direction to the main window node through the independent node; the main window node changes the coordinate parameters of the first window based on the configuration information of the interface display direction, and displays the resource information content sent by the content provider of the first window.

[0137] In embodiments of this application, when the window management service system receives a request to switch the interface display direction of a window, it can pre-calculate the interface display direction to be switched and send this information to the content provider corresponding to the window, allowing the content provider to preload resources based on this information. By separating the main window node corresponding to the window whose display direction needs to be switched from the tree structure of the window display system and establishing an independent node to control the main window node, the matching of the interface display direction is completed, ensuring that it is not affected by the parent node in the tree structure of the window display system, thus providing greater processing freedom. This application can complete the switching of the interface display direction without waiting for a global configuration update, resulting in faster response speed for switching the interface display direction within the window, reducing display latency and improving the smoothness of the display direction switching.

[0138] The electronic device in this application embodiment can also be a component of an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the scope of the electronic device.

[0139] The electronic device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.

[0140] The electronic device provided in this application embodiment can achieve... Figures 1 to 7 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0141] Optional, such as Figure 9 As shown, this application embodiment also provides an electronic device 900, including a processor 901, a memory 902, and a program or instructions stored in the memory 902 and executable on the processor 901. When the program or instructions are executed by the processor 901, they implement the various processes of the above-described interface display direction switching method embodiment and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0142] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0143] Figure 10 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0144] The electronic device 1000 includes, but is not limited to, components such as: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, and processor 1010.

[0145] Those skilled in the art will understand that the electronic device 1000 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1010 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 10 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0146] The processor 1010 is used to: determine the interface display direction to be switched when the interface display direction switching requirement of the first window is obtained;

[0147] The radio frequency unit 1001 is used to: send configuration information of the interface display direction to the content provider of the first window; and the content provider preloads the resources required for the interface display direction according to the configuration information of the interface display direction.

[0148] The processor 1010 is further configured to: extract the branch containing the main window node corresponding to the first window from the tree structure of the window display system and create an independent node, and use the independent node as the parent node of the main window node;

[0149] The independent node controls the first window corresponding to the main window node to match the interface display direction, and displays information content in the interface display direction based on the resources provided by the content provider of the first window.

[0150] Optionally, the processor 1010 is further configured to: update the global configuration; send the updated global configuration to the graphics display service system; and update the global coordinate system according to the global configuration.

[0151] Optionally, the processor 1010 is further configured to: delete or cache the independent node, and restore the connection of the branch where the main window node is located in the tree structure.

[0152] Optionally, the processor 1010 is specifically configured to perform one of the following:

[0153] Receive sensor data, including handheld data of the electronic device; determine the switching requirements for the interface display orientation of the first window based on the handheld data;

[0154] Receive interface request information sent by the content provider of the first window, and determine the interface display direction switching requirement of the first window based on the interface request information.

[0155] Optionally, the processor 1010 is specifically used for:

[0156] Instrument the custom node before the main window node;

[0157] Record the pile location information of the independent node.

[0158] Optionally, the radio frequency unit 1001 is further configured to: receive resources sent by the content provider of the first window, wherein the resources are display resources corresponding to the interface display direction;

[0159] The processor 1010 is specifically used to: send the configuration information of the interface display direction to the main window node through the independent node;

[0160] The main window node changes the coordinate parameters of the first window based on the configuration information of the interface display direction, and displays the content of the resource information sent by the content provider of the first window.

[0161] The embodiments of this application can complete the switching of the interface display direction without waiting for a global configuration update, which makes the switching response speed within the application faster, reduces display latency, and improves the smoothness of the display direction switching.

[0162] It should be understood that, in this embodiment, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042. The GPU 10041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0163] The memory 1009 can be used to store software programs and various data. The memory 1009 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1009 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1009 in this embodiment includes, but is not limited to, these and any other suitable types of memory.

[0164] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor 1010.

[0165] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described interface display direction switching method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0166] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0167] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described interface display direction switching method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0168] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0169] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the interface display direction switching method embodiment described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0170] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0171] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

Claims

1. A method for switching the display orientation of an interface, characterized in that, The method includes: Upon receiving a request from the first window to switch the display orientation, the window management service system determines the display orientation to be switched. The window management service system sends the configuration information of the interface display direction to the content provider of the first window; the content provider preloads the resources required for the interface display direction according to the configuration information of the interface display direction; The window management service system extracts the branch containing the main window node corresponding to the first window from the tree structure of the window display system and creates an independent node, which is then used as the parent node of the main window node. The window management service system controls the first window corresponding to the main window node to match the interface display direction through the independent node, and displays information content in the interface display direction based on the resources provided by the content provider of the first window. The step of using the independent node as the parent node of the main window node includes: Instrument the independent node in front of the main window node; The step of controlling the first window corresponding to the main window node to match the interface display direction through the independent node, and displaying information content in the interface display direction based on the resources provided by the content provider of the first window, includes: The configuration information for the interface display direction is sent from the independent node to the main window node; The main window node changes the coordinate parameters of the first window based on the configuration information of the interface display direction, and displays the content of the resource information sent by the content provider of the first window.

2. The method according to claim 1, characterized in that, After determining the configuration information for the interface display orientation to be switched, the following is also included: The window management service system updates the global configuration; The window management service system sends the updated global configuration to the graphics display service system; The graphics display service system updates the global coordinate system according to the global configuration.

3. The method according to claim 2, characterized in that, After the graphics display service system updates the global coordinate system according to the global configuration, the method further includes: The window management service system deletes or caches the independent node and restores the connection of the branch where the main window node is located in the tree structure.

4. The method according to claim 1, characterized in that, The window management service system obtains the interface display orientation switching request of the first window, including at least one of the following: Receive sensor data, including handheld data of the electronic device, and determine the interface display orientation switching requirements of the first window based on the handheld data; Receive interface request information sent by the content provider of the first window, and determine the interface display direction switching requirement of the first window based on the interface request information.

5. The method according to claim 1, characterized in that, The method further includes: Record the pile location information of the independent node.

6. The method according to claim 1, characterized in that, After sending the interface display orientation configuration information to the content provider of the first window, the method further includes: Receive resources sent by the content provider of the first window, wherein the resources are display resources corresponding to the interface display direction.

7. A system for switching the orientation of an interface display, characterized in that, include: Window management service system and window content providers; The window management service system is used to determine the interface display direction to be switched when the interface display direction of the first window is requested to be switched; and to send the configuration information of the interface display direction to the content provider of the first window. The content provider of the first window is used to preload the resources required for the interface display direction according to the configuration information of the interface display direction; The window management service system is also used to: extract the branch containing the main window node corresponding to the first window from the tree structure of the window display system and create an independent node, and use the independent node as the parent node of the main window node; control the first window corresponding to the main window node to match the interface display direction through the independent node; The content provider of the first window is further configured to: display information content in the interface display orientation based on resources provided by the content provider of the first window; The window management service system is also used to: instrument the independent node in front of the main window node; The window management service system is also used to: send the configuration information of the interface display direction to the main window node through the independent node; The first window changes its coordinate parameters based on the configuration information of the interface display direction, and displays content based on the resource information sent by the content provider of the first window.

8. The system according to claim 7, characterized in that, The system also includes: a graphics display service system; The window management service system is also used for: updating the global configuration; and sending the updated global configuration to the graphics display service system. The graphics display service system is used to update the global coordinate system according to the global configuration.

9. A device for switching the orientation of an interface display, characterized in that, include: The first determining module is used to determine the interface display direction to be switched when the interface display direction switching requirement of the first window is obtained. The first sending module is used to send the configuration information of the interface display direction to the content provider of the first window; The content provider preloads the resources required for the interface display direction according to the configuration information of the interface display direction; The first processing module is used to extract the branch where the main window node corresponding to the first window is located from the tree structure of the window display system and create an independent node, and use the independent node as the parent node of the main window node. The first control module is used to control the first window corresponding to the main window node to match the interface display direction through the independent node, and to display information content in the interface display direction based on the resources provided by the content provider of the first window. The first processing module is specifically used to: instrument the independent node in front of the main window node; The first control module is specifically used to: send the configuration information of the interface display direction to the main window node through the independent node; the main window node changes the coordinate parameters of the first window based on the configuration information of the interface display direction, and displays the resource information content sent by the content provider of the first window.

10. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the interface display orientation switching method as described in any one of claims 1-6.

11. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions, which, when executed by a processor, implement the steps of the interface display orientation switching method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Method and device for switching screen display direction

    CN103777760A

  • Interface display method and electronic equipment

    CN116841658A