Display control method and device, electronic equipment and computer readable storage medium
Patent Information
- Application Number
- CN202611134586.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-27
AI Technical Summary
检测物理屏幕方向并确定软件屏幕方向,实现了物理屏幕方向与软件屏幕方向的解耦,使设备在物理竖屏状态下仍可为特定内容维持横屏软件环境,解决了物理屏幕方向与软件屏幕方向强制绑定导致的显示受限问题;基于目标内容的横竖屏属性,可以区分不同类型的内容的方向适配需求,避免对所有内容统一旋转造成的画面拉伸、变形或截断;如此,根据物理屏幕方向、软件屏幕方向和横竖屏属性综合确定显示策略,同时考虑了设备实际姿态、系统显示状态和内容自身方向特性,确保显示策略与当前使用场景精准匹配,无需用户手动干预即可自动匹配最优显示方式。
Smart Images

Figure CN122991109A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of content display technology, specifically to a display control method, device, electronic device, and computer-readable storage medium. Background Technology
[0002] With the increasing popularity of small-sized portable TVs and other products, televisions are no longer limited to fixed horizontal screens on living room walls. Their usage scenarios support moving to spaces such as bedrooms, studies, and kitchens, leading to a demand for vertical screen viewing. However, in related technologies, the screen-to-portrait switching logic of television screens largely follows that of mobile terminals such as smartphones. However, smartphones are for near-field viewing on small screens, which can tolerate a certain degree of stretching and distortion, and are easy for users to manually adjust. Televisions, on the other hand, are for far-field viewing on large screens. Content played horizontally will be stretched and distorted when used in portrait mode, resulting in a very poor viewing experience on a large screen, which is completely inconsistent with television viewing habits. Summary of the Invention
[0003] This application provides a display control method, device, electronic device, and computer-readable storage medium that can ensure that the display strategy is accurately matched with the current usage scenario.
[0004] In a first aspect, embodiments of this application provide a display control method, including: Detect the current physical screen orientation of the display device and determine the current software screen orientation of the display device; Get the landscape / portrait attributes of the target content; Based on the physical screen orientation, the software screen orientation, and the landscape / portrait screen attributes, a display strategy for the target content is determined, and the target content is displayed according to the display strategy.
[0005] Secondly, embodiments of this application provide a display control device, including: An orientation determination module is used to detect the current physical screen orientation of the display device and determine the current software screen orientation of the display device; The attribute acquisition module is used to obtain the landscape and portrait attributes of the target content; The strategy determination module is used to determine the display strategy of the target content based on the physical screen orientation, the software screen orientation, and the landscape / portrait screen attributes, and to display the target content according to the display strategy.
[0006] Thirdly, embodiments of this application also provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps in the above-described display control method.
[0007] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the above-described display control method.
[0008] Fifthly, embodiments of this application also provide a computer program product or computer program, which 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 methods provided in the various optional implementations described in embodiments of this application.
[0009] The embodiments of this application have the following beneficial effects: By detecting the physical screen orientation and determining the software screen orientation, the physical and software screen orientations are decoupled. This allows the device to maintain a landscape software environment for specific content even in physical portrait mode, resolving the display limitations caused by the forced binding of physical and software screen orientations. Based on the portrait / landscape attributes of the target content, the orientation adaptation requirements of different types of content can be distinguished, avoiding image stretching, distortion, or truncation caused by uniformly rotating all content. Thus, by comprehensively determining the display strategy based on the physical screen orientation, software screen orientation, and portrait / landscape attributes, while also considering the actual device posture, system display status, and the content's own orientation characteristics, the display strategy is ensured to accurately match the current usage scenario, automatically matching the optimal display method without manual user intervention. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a schematic diagram of the steps of a display control method provided in an embodiment of this application; Figure 2 This is a schematic diagram of a conventional landscape display, a conventional portrait display, and a portrait-landscape display provided in an embodiment of this application; Figure 3 This is a schematic diagram of adaptive landscape display and adaptive portrait display provided in an embodiment of this application; Figure 4 This is a schematic diagram illustrating forced proportional centering display according to an embodiment of this application; Figure 5 This is a schematic flowchart of physical screen orientation determination provided in an embodiment of this application; Figure 6 This is a schematic diagram of the process for obtaining landscape and portrait screen attributes according to an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a display control device provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0012] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0013] The mobile phone industry has been developing solutions for switching between portrait and landscape screens for many years, but mobile phone solutions cannot be directly adapted to TVs. The specific reasons can be found in Table 1, where there are fundamental differences between the two.
[0014] Table 1
[0015] Mobile phones support high-frequency, small-angle posture changes. However, the sensor data from mobile phones lacks filtering and image stabilization. The posture detection algorithm optimized for handheld mobile phone scenarios cannot be adapted to scenarios where TVs are fixed in place. If TVs directly adopt the posture detection algorithm of mobile phones, vibrations from speakers and collisions with people in the home environment can easily trigger erroneous screen orientation changes, resulting in extremely poor stability.
[0016] The mobile phone's screen orientation switching logic lacks a unified control mechanism for application launches, pop-ups, and button presses in TV portrait mode. This leads to frequent occurrences of irrelevant applications starting up automatically, pop-up interference, and accidental button touches, resulting in uncontrollable interaction and severely impacting the core experience of watching TV in landscape mode and casting in portrait mode.
[0017] The mobile phone's screen orientation switching logic does not have a mechanism for centering and adapting to the original aspect ratio of large TV screens. This causes apps that are not adapted to portrait mode to be stretched or truncated when the TV is in portrait mode, resulting in distorted images, incomplete display, and extremely poor viewing experience in the far field.
[0018] The phone's landscape / portrait switching logic lacks a landscape / portrait status management mechanism for TV-specific scenarios such as cold boot, SUspend To RAM (STR), boot wizard, and screen casting, which can easily lead to display abnormalities and functional failures.
[0019] If a third-party application is not adapted to portrait mode, even if the TV's physical screen orientation is portrait, the application will still be displayed in landscape mode, resulting in a poor viewing experience for the user.
[0020] Therefore, it is necessary to set up dedicated landscape / portrait switching logic for large-screen display devices such as televisions to determine the optimal display for these devices in different usage scenarios. To this end, in one embodiment, such as... Figure 1 As shown, a display control method is provided. Although the logical sequence is illustrated in the step diagram, in some cases, the steps shown or described may be performed in a different order than that shown in the diagram. Specifically, this display control method can be applied to a display device whose screen supports rotation. The physical screen orientation of the display device can include portrait and landscape orientations. For example, the display device may include, but is not limited to, one or more of the following: a rotatable smart TV, a portable floor-standing TV, a portable smart screen (such as a "friendship phone" or "flexible screen"), a large-screen electric rotating TV, a wall-mounted rotating art TV, and a standing touch TV.
[0021] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.
[0022] according to Figure 1 The display control method shown includes at least steps S110 to S130, which are described in detail below: In step S110, the current physical screen orientation of the display device is detected, and the current software screen orientation of the display device is determined.
[0023] In step S120, the landscape and portrait orientation attributes of the target content are obtained.
[0024] In step S130, the display strategy for the target content is determined based on the physical screen orientation, software screen orientation, and landscape / portrait screen attributes, and the target content is displayed according to the display strategy.
[0025] The physical screen orientation refers to the actual orientation of a display device in physical space, whether it is placed or rotated. This can include landscape and portrait orientations. For display devices such as televisions, when the long side of the screen is horizontal and the short side is vertical, the physical screen orientation is landscape; when the long side is vertical and the short side is horizontal, the physical screen orientation is portrait. The physical screen orientation can be determined using sensors such as gravity sensors, gyroscopes, geomagnetic sensors, or cameras.
[0026] Software screen orientation refers to the horizontal and vertical layout logic of the output screen at the software level of the display device. Software screen orientation can include both landscape and portrait modes. It is influenced by various factors such as foreground application display attributes, screen orientation locking functionality, user-forced switching of display content orientation, peripheral device configuration, and / or physical screen orientation. The system can automatically determine the software screen orientation of the display device.
[0027] The software screen orientation and the physical screen orientation can be the same or different. For example, when the physical screen orientation is portrait, the system can lock the software screen orientation to landscape, allowing content that is not adapted to portrait mode to still be displayed correctly in a landscape software environment. This decoupling of the physical screen orientation and the software screen orientation gives the system flexible display control capabilities in different usage scenarios.
[0028] Target content refers to objects that are being displayed or will be displayed on a display device, including but not limited to one or more of the following: application interfaces, system interfaces, pop-ups, video feeds, and boot animations. The landscape / portrait configuration rules for the target content can be obtained by parsing its configuration file, thus revealing the target content's landscape / portrait attributes.
[0029] The landscape / portrait orientation of target content refers to the screen orientation characteristics that the target content itself supports, reflecting the target content's orientation adaptation requirements and support capabilities for landscape or portrait display. The landscape / portrait orientation of target content can include: landscape only, portrait only, adaptive landscape / portrait, and forced landscape. Landscape only target content only supports display when the software screen orientation is landscape; portrait only target content only supports display when the software screen orientation is portrait; adaptive landscape / portrait target content sets different display layouts for landscape and portrait software screen orientations, and can adjust the layout of the target content synchronously according to the software screen orientation; forced landscape target content will force the target content to be displayed in landscape mode.
[0030] Alternatively, the landscape / portrait orientation of the target content can be determined by the window state information during the target content's runtime.
[0031] Display strategies can be preset for different combinations of physical screen orientation, software screen orientation, and landscape / portrait attributes. These display strategies can characterize the display orientation and layout of the target content. Based on this preset information, the display strategy for the target content can be determined, avoiding screen stretching, distortion, or content truncation caused by a one-size-fits-all rotation.
[0032] The technical solution of this application detects the physical screen orientation and determines the software screen orientation, thus decoupling the physical screen orientation from the software screen orientation. This allows the device to maintain a landscape software environment for specific content even in a physical portrait orientation, solving the display limitation problem caused by the forced binding of the physical screen orientation and the software screen orientation. Based on the portrait and landscape attributes of the target content, the orientation adaptation requirements of different types of content can be distinguished, avoiding screen stretching, distortion, or truncation caused by uniformly rotating all content. In this way, the display strategy is comprehensively determined based on the physical screen orientation, the software screen orientation, and the portrait and landscape attributes, while also considering the actual posture of the device, the system display state, and the orientation characteristics of the content itself. This ensures that the display strategy accurately matches the current usage scenario, and the optimal display method can be automatically matched without manual user intervention.
[0033] Based on the above technical solution, as an example, the landscape and portrait screen attributes of the target content may include, but are not limited to, one or more of the following: landscape only, portrait only, landscape-portrait adaptive, and forced landscape.
[0034] Landscape-only content is only allowed to display when the software screen orientation is landscape, and is blocked when the software screen orientation is portrait. Landscape-only content refers to content that only supports normal display in landscape mode; its layout and interaction logic are designed based on the landscape aspect ratio and lack portrait adaptation capabilities. For landscape-only content, the system allows it to display normally when the software screen orientation is landscape; when the software screen orientation is portrait, the system blocks requests to launch and / or display the content, preventing it from being presented and maintaining the current interface state. A floating notification can be output simultaneously during interception, informing the user that the content is not supported in the current portrait environment. This interception mechanism prevents landscape-only content from being forcibly stretched or truncated in portrait mode, ensuring the integrity of the user interface and the usability of the interaction.
[0035] Content intended for portrait orientation is only allowed to be displayed when both the physical screen orientation and the software screen orientation are portrait, and is blocked when the software screen orientation is landscape.
[0036] "Portrait-only" content refers to content that can only be displayed correctly in portrait mode on the software screen. Its layout and interaction logic are designed based on the portrait aspect ratio, typical examples being native portrait applications like TikTok and vertical web dramas. For portrait-only content, the system only allows it to display correctly when both the physical and software screen orientations are portrait. This requirement ensures that the content achieves the correct far-field viewing effect and remote control interaction experience in a true portrait physical environment. When the software screen orientation is landscape (regardless of whether the physical screen orientation is landscape or portrait), the system intercepts requests to launch or display portrait-only content. The system can block the launch and display a prompt; normal use is only possible after the user rotates the TV to portrait mode and the system completes the orientation switch.
[0037] The target content that adapts to both landscape and portrait orientations adjusts its layout synchronously with the software's screen orientation. This refers to target content that natively supports bidirectional adaptation, with its internal layout automatically rearranging according to screen orientation changes. For this type of content, the system doesn't require additional scaling, centering, or interception; instead, it sends a notification of the current software screen orientation to the target content, which then adjusts its layout accordingly, achieving full-screen adaptive display. In landscape orientation, the target content is arranged horizontally according to the aspect ratio; in portrait orientation, it is rearranged according to the aspect ratio, such as splitting single-line text into multiple lines or adjusting control positions. Typical application scenarios include screen mirroring applications like AirPlay and Miracast that have already achieved landscape / portrait adaptation, as well as system-level screen mirroring service interfaces.
[0038] The target content that is forced to be in landscape mode is allowed to be displayed when the software screen orientation is landscape, and is forced to be displayed proportionally centered when both the physical screen orientation and the software screen orientation are portrait.
[0039] Content that is forced to be in landscape mode refers to content designed for a landscape aspect ratio but which the system allows to continue to be presented in a specific way in portrait mode. Typical examples include video applications and desktop launchers. For content that is forced to be in landscape mode, the system allows the content to be displayed when the software screen orientation is landscape. When both the physical screen orientation and the software screen orientation are portrait, the system forces the original landscape image of the content to be displayed proportionally and centered.
[0040] The technical solution adopted in this application categorizes the landscape and portrait orientation attributes of target content into four types: landscape only, portrait only, adaptive landscape / portrait, and forced landscape. Differentiated display control strategies are set for each type. This allows for automatic matching of the optimal display method based on the content's own orientation adaptability. This includes ensuring that native landscape content is intercepted rather than forcibly distorted in portrait mode, native portrait content is properly managed in landscape mode, adapted content is freely and adaptively displayed, and non-adapted landscape content is proportionally centered and undistorted in portrait mode. This classification mechanism avoids the problems of image stretching, truncation, or interaction failure caused by uniformly rotating all content, achieving precise matching between display strategies and content characteristics.
[0041] In one embodiment, the display strategy may include regular landscape display, regular portrait display, portrait landscape display, adaptive landscape display, adaptive portrait display, forced proportional centering display, and interception. Interception refers to blocking the display of content, i.e., not displaying it.
[0042] Figure 2 This is a schematic diagram illustrating a conventional landscape display, a conventional portrait display, and a portrait-landscape display according to an embodiment of this application. A, B, and C are used to represent the direction and order of the displayed content. (Refer to...) Figure 2 Both regular landscape and regular portrait displays are display modes where the content and screen orientation are the same, the difference being the orientation. Portrait landscape display is a compromise solution when the content and screen orientation are different; the content itself is not rearranged, and the original landscape image is embedded in the portrait physical area.
[0043] Standard landscape display refers to the display of content in its original landscape layout (often a full-screen horizontal display) when the physical screen orientation is landscape. Text and images maintain a normal reading direction, and information extends horizontally. The layout of content in standard landscape display is adapted to the native aspect ratio of the physical screen. Standard landscape display is suitable for traditional wall-mounted TV viewing scenarios in living rooms, conforms to the visual habits of most people watching movies and horizontal text and images, and is the basic default display format for TVs.
[0044] Regular portrait display refers to displaying content in its original portrait layout (mostly full-screen vertical display) when the physical screen orientation is portrait. Text is stacked vertically line by line, the image is displayed in portrait mode, and the overall content maintains a normal reading orientation, with information extending vertically. The layout of the target content in regular portrait display is adapted to the native aspect ratio of the physical screen. Regular portrait display is suitable for browsing long articles with images, vertical screen mirroring content from mobile phones, and short vertical videos, visually conforming to the reading logic of mobile devices using portrait orientation.
[0045] Portrait-to-landscape display refers to a display mode where the physical screen orientation is portrait, but the software screen orientation is locked to landscape. The target content is still rendered according to the landscape software screen orientation. In essence, portrait-to-landscape display maintains the physical screen orientation while the displayed image retains the horizontal layout of a standard landscape display. The entire image is rotated 90° to maintain the original aspect ratio of the landscape content. The content itself is not changed to a portrait orientation; only the entire landscape image is rotated to fit the portrait physical screen.
[0046] Figure 3 This is a schematic diagram of adaptive landscape and adaptive portrait display according to an embodiment of this application. A, B, C, 1, 2, and 3 are used to represent the direction, order, and layout of the displayed content. (Refer to...) Figure 3 The target content that adapts to both landscape and portrait orientations natively supports switching between landscape and portrait modes. The system only needs to send the current software screen orientation notification to the target content, and the target content can automatically adapt the layout without any additional intervention from the system side, such as forced scaling, centering, or interception.
[0047] Adaptive landscape display means that when the software screen orientation is landscape, the target content is displayed in a landscape layout in full screen, automatically arranged according to the aspect ratio, and the text and images maintain a normal reading orientation. The difference from regular landscape display is that the target content in adaptive landscape display has the ability to adapt to both landscape and portrait orientations. Its layout can be the result of actively adjusting according to the software screen orientation, rather than a fixed and unchangeable static layout.
[0048] Adaptive portrait display means that when the software screen orientation is portrait, the target content actively rearranges its layout according to the screen orientation. Text and images automatically adjust their layout to the aspect ratio of the portrait screen. For example, single-line content in landscape mode can be split into multiple vertically stacked lines and presented adaptively in full screen. The target content itself undergoes a layout rearrangement, rather than a simple proportional scaling, ensuring readability and interactivity in portrait mode. The difference from regular portrait display is that adaptive portrait display has bidirectional adaptability to both landscape and portrait orientations. Its layout can be the result of actively adjusting according to the software screen orientation, rather than a fixed and unchangeable static layout.
[0049] Figure 4This is a schematic diagram of forced proportional centering display provided in an embodiment of this application. A, B, and C are mainly used to represent the direction and order of the displayed content. Forced proportional centering display, when the physical screen orientation is portrait and the software screen orientation is landscape, forces the landscape-oriented target content to be scaled proportionally according to its original aspect ratio. The scaled image width adapts to the shorter side width of the portrait screen and is vertically centered on the portrait screen, with black borders filling the uncovered display areas on the top and bottom. During forced proportional centering display, the target content itself does not undergo any layout rearrangement or cropping, maintaining the complete proportions and content integrity of the original landscape image. It is only embedded into the portrait physical display area through scaling and centering processing on the system side.
[0050] The design intent of forced proportional centering is to prevent the image from being stretched or distorted or the content from being cut off when the user rotates the TV to portrait mode and the currently running video or game application is not adapted to the portrait layout. At the same time, it ensures that the image ratio is correct and the visual experience is complete when viewing from the far field of the large screen. The black bars at the top and bottom are due to the natural difference between the original image ratio and the physical size of the portrait screen, and are not due to missing content.
[0051] Based on the above technical solution, as an embodiment, forcibly centering the target content proportionally may include: when the physical screen orientation is portrait, obtaining the screen width of the display device; obtaining the display width of the target content; determining the scaling ratio based on the display width and the screen width; scaling the target content according to the scaling ratio, and vertically centering the scaled target content.
[0052] When the physical screen orientation is portrait, the screen width of the display device refers to the horizontal dimension of the display device in portrait mode, i.e., the width of the shorter side of the screen. This screen width can be read through the system display service interface or obtained directly from the display device's hardware configuration information. For example, a television with a normal landscape resolution of 1920×1080 will have a physical screen width of 1080 pixels when rotated to portrait mode.
[0053] The system can obtain the display width of the target content, which refers to the horizontal dimension of the target content in its original landscape layout, i.e., the width value of the landscape image. This width value can be obtained by reading the window properties of the target content or extracted from the image metadata output by the content rendering engine. For example, a video rendered in a 16:9 landscape ratio has an original display width of 1920 pixels.
[0054] After obtaining the screen width and the display width of the target content, the scaling ratio can be calculated based on both. Dividing the screen width by the display width of the target content yields a proportional scaling factor. Continuing the example above, the scaling ratio is 1080 ÷ 1920 = 0.5625, meaning the target content needs to be reduced to 56.25% of its original size, so that the width of the scaled image is exactly equal to the horizontal width of a portrait-oriented physical screen. Since the scaling ratio applies to both the width and height of the image, the aspect ratio of the scaled image is exactly the same as the original image, without any stretching or compression distortion.
[0055] The target content is scaled proportionally according to the calculated scaling ratio, and then vertically centered on a portrait screen. Vertical centering means that the scaled image is placed centered along the long side of the portrait screen, with equal amounts of uncovered area at the top and bottom, filled with black borders or a system-preset fill color. The scaled image fills the entire screen width horizontally, without left or right black borders. This process forces landscape-oriented content (such as videos) to be displayed in its original aspect ratio in a portrait physical environment.
[0056] By adopting the technical solution of this application embodiment, forced proportional centering display can ensure that the aspect ratio of the screen is not destroyed and the content is not cropped. At the same time, the screen width is accurately adapted to the short side of the screen, and the top and bottom black borders are uniform and symmetrical, providing a display effect with correct proportion and visual integrity in the far field viewing scenario of large screen.
[0057] In one embodiment, the logic shown in Table 2 can be combined, and Figure 2 , Figure 3 and Figure 4 The display strategy for the target content is determined. For display devices such as televisions, there is typically no requirement for a physical screen orientation of landscape and a software screen orientation of portrait. Therefore, this application embodiment does not consider the scenario of a physical screen orientation of landscape and a software screen orientation of portrait. However, it is understood that if necessary, the display strategy for the target content can still be determined based on the physical screen orientation (landscape), the software screen orientation (portrait), and the landscape / portrait attributes of the target content.
[0058] Table 2
[0059] Based on the above technical solution, as an embodiment, referring to Table 2 above, when both the physical screen orientation and the software screen orientation of the display device are landscape, the determined display strategy may include: Display target content that is only meant to be displayed in landscape mode in a standard landscape orientation; Intercept target content that is only displayed in portrait mode; Adapt the landscape mode display to target content that is compatible with both portrait and landscape orientations. Display the target content that was forced into landscape mode in normal landscape mode.
[0060] When both the physical and software screen orientations of the display device are landscape, it indicates that the display device is in its normal landscape usage state. This means the user places or installs the display device in landscape mode, and the system software orientation matches the physical orientation. This is the most common usage scenario for televisions, covering most user behaviors such as watching live TV, watching long video content, and operating the desktop system. In this state, the following differentiated display strategies can be executed based on the landscape / portrait attributes of the target content.
[0061] For target content that is only displayed in landscape mode, you can follow Figure 2 The first image shows a standard landscape display. Since the physical screen orientation perfectly matches the content's orientation, the content can be presented in its optimal state. Typical scenarios include: when the TV is in landscape mode, the desktop launcher displays application icons and the system interface in full-screen landscape mode; when a user opens a video application that only supports landscape mode, the video plays in full-screen mode with the original landscape aspect ratio, and the remote control buttons respond normally.
[0062] For content that is only displayed in portrait mode, interception can be performed. Interception means that the system prevents the launch or display request of the target content, keeping the current interface unchanged and not displaying the target content. Because the layout and interaction logic of content that is only displayed in portrait mode are designed based on the portrait aspect ratio, if both the physical screen orientation and the software screen orientation are landscape, even if the content is forcibly displayed, it will cause severe image stretching or disordered control arrangement, resulting in extremely poor far-field viewing and inability to operate the remote control properly. Therefore, interception is performed. When performing interception, a floating prompt message (such as a Toast message) can be output simultaneously to inform the user that the current device is in landscape mode and that the TV needs to be rotated to portrait mode before it can be used. For example, if a user tries to launch a native portrait-oriented app like TikTok while watching TV in landscape mode, the system will intercept the launch request and pop up a prompt, guiding the user to rotate the TV to portrait mode before using it, thus avoiding display abnormalities of portrait-oriented apps in landscape mode.
[0063] For target content that adapts to both portrait and landscape orientations, it can be done according to... Figure 3The first image shows adaptive landscape display. Adaptive landscape display means that the system sends a notification that the current software screen orientation is landscape to the target content. Upon receiving the notification, the target content automatically adjusts its internal layout according to the landscape aspect ratio to display in full-screen landscape mode. Unlike simply landscape-oriented content, adaptive landscape content has bidirectional adaptation capabilities. Its landscape layout is the result of the application actively adjusting based on the orientation notification, rather than a fixed static image. For example, when a user uses AirPlay to cast their screen in landscape mode, the casting application receives the landscape orientation notification and displays the cast screen in full-screen landscape mode, with UI elements such as the video control bar and progress bar arranged in a widescreen layout.
[0064] For target content with a forced landscape orientation, you can follow... Figure 2 The first image shows a normal landscape display. When both the physical and software screen orientations are landscape, the display behavior of forced landscape content is the same as that of landscape-only content. The difference lies in portrait mode: landscape-only content is blocked in portrait mode, while forced landscape content can still be displayed (in a proportionally centered manner). In the current landscape state, both types of content can be displayed normally in full screen with no difference in display effect. For example, when a user watches a landscape video in landscape mode, the video plays in full screen with the original landscape aspect ratio; or when the desktop launcher is opened, the desktop is displayed normally in full-screen landscape mode.
[0065] The technical solution adopted in this application embodiment can ensure that all types of target content achieve the best display effect when both the physical screen orientation and the software screen orientation are landscape, while preventing the user experience from being degraded due to the incorrect display of portrait content in landscape mode.
[0066] Based on the above technical solution, as an embodiment, referring to Table 2 above, when the physical screen orientation of the display device is portrait and the software screen orientation is landscape, the determined display strategy may include: Intercept target content that is only displayed in portrait mode; All target content, whether it is only in landscape mode, automatically adapts to portrait mode, or is forced to be in landscape mode, will be displayed in portrait mode with landscape mode.
[0067] When the physical screen orientation of the display device is portrait and the software screen orientation is landscape, it indicates that the device has been physically rotated to a portrait position by the user, but the system has locked the software screen orientation to landscape and has not switched synchronously with the physical orientation. This state is a core manifestation of the decoupling design between physical and software orientations, and typically occurs in the following scenarios: during a cold boot, the device is powered on in portrait orientation, and the boot logo and boot animation need to be displayed in landscape mode; the boot wizard process is in progress, and the system forcibly locks the landscape orientation to ensure the continuity of the boot process; or the system determines that it is not appropriate to switch the software orientation based on the type of target content currently running, and chooses to maintain the landscape software environment. In this state, the actual display area of the physical screen is a narrow, portrait-oriented shape, while the system renders and outputs the image according to the aspect ratio of a landscape screen.
[0068] For content designed solely for portrait orientation, the system intercepts its launch or display requests, leaving the current interface unchanged. The layout and interaction logic of portrait-only content are designed based on the portrait aspect ratio. Their proper display requires the software screen orientation to also be portrait, allowing the content to be rendered according to the portrait layout and achieve the correct far-field viewing effect. However, in the current state, the software screen orientation is locked to landscape. Even if portrait-only content is allowed to launch, it will be forcibly compressed or presented at an incorrect aspect ratio in a landscape software environment, resulting in severe image distortion and abnormal remote control interaction. Therefore, the system intercepts this type of content and can simultaneously output a floating prompt informing the user that they must wait for the system to switch the software orientation to portrait before using it. For example, if the TV is in the boot wizard process (physical portrait, software landscape), and the user attempts to launch TikTok via remote control, the system will intercept the launch and indicate that boot setup is in progress and the user should try again later.
[0069] For target content that only supports landscape mode, adaptive landscape / portrait mode, or forced landscape mode, it is possible to perform... Figure 2 The third image shows a portrait-to-landscape display. Portrait-to-landscape display refers to a display where the physical screen orientation is portrait, but the software screen orientation is locked to landscape. The target content is still rendered according to the software screen's landscape orientation. It can be understood as the screen remaining physically vertical, but the displayed image maintains the horizontal layout of a standard landscape display, with the entire image rotated 90° to present the display mode. The content retains its original landscape aspect ratio without distortion. The layout of the target content itself is not changed to portrait; only the entire landscape image is rotated to fit the portrait physical screen. Therefore, the rendering logic for portrait-to-landscape display is the same as that for a standard landscape display.
[0070] For content designed for adaptive screen orientation, the system still processes it for landscape display. Although the content itself is designed for adaptive screen orientation and can theoretically adjust its layout to follow changes in the physical screen orientation, in the current state, the software screen orientation is locked to landscape by the system, and the orientation notification received by the content is still landscape. Therefore, the content is rendered according to the landscape layout.
[0071] For example, when a user is watching a landscape video with both the physical screen orientation of their display device and the software screen orientation in landscape mode, the video is played in full screen at the original landscape aspect ratio (normal landscape display). Then, the user manually locks the software screen orientation to landscape and rotates the physical screen of the display device to change the physical screen orientation to landscape. Since the layout of the portrait landscape display and the normal landscape display are completely the same, the rendering logic and display layout of the video remain completely unchanged.
[0072] By adopting the technical solution of this application embodiment, in the special state of physical portrait mode and software landscape mode, blocking portrait content can avoid incorrect display in the landscape software environment. By presenting landscape, adaptive, and forced landscape content in a unified portrait-landscape mode, the content screen can maintain the original landscape ratio without distortion. At the same time, adapting to the display area of the portrait physical screen can ensure the consistency of the display state in special scenarios such as boot process and wizard process, and avoid process interruption or interface disorder caused by forced switching of physical screen orientation.
[0073] Based on the above technical solution, as an embodiment, referring to Table 2 above, when both the physical screen orientation and the software screen orientation of the display device are portrait orientation, the determined display strategy may include: Intercept target content that is only displayed in landscape mode; Display target content that is only meant for portrait orientation in a standard portrait orientation; Adapt the target content to portrait orientation for content that is compatible with both landscape and portrait orientations; Force the target content that is forced to be displayed in landscape mode to be centered proportionally.
[0074] When both the physical screen orientation and the software screen orientation of the display device are portrait, it indicates that the device has been rotated to a portrait physical position by the user, and the system has completed the synchronous switching of the software screen orientation, ensuring consistency between the software and physical orientations. This state represents the core scenario for portrait screen usage. For example, after watching live TV or long video content in landscape mode, a user rotates the TV to a portrait position. The system detects the change in physical screen orientation and completes the software screen orientation switch, entering a portrait usage environment. The user can then perform operations such as screen mirroring from their phone, watching short videos, or displaying portrait content. In this state, the actual display area of the physical screen is a narrow, vertically oriented portrait shape, and the software screen orientation is also declared as portrait. The system needs to match the most suitable portrait display strategy for each type of content based on its respective landscape or portrait orientation attributes.
[0075] For content designed solely for landscape orientation, interception is performed. The layout and interaction logic of landscape-only content are entirely based on the landscape aspect ratio and lack any portrait-oriented adaptation capability. When both the physical and software screen orientations are portrait, forcibly displaying landscape-only content would result in severe vertical stretching or horizontal compression, distorted and unreadable text, misaligned controls, and incorrect remote control operation, leading to a poor far-field viewing experience. Therefore, requests to launch or display such content are intercepted, preventing its presentation and maintaining the current interface state. A floating notification can be simultaneously output during interception, informing the user that the application is not supported in the current portrait environment. For example, if a user attempts to open a video application that only offers a landscape layout while in portrait screen mirroring mode, the system intercepts the launch and displays a notification to prevent the application from being forcibly stretched in portrait mode.
[0076] For target content that is only displayed in portrait mode, you can follow Figure 2 The second image shows a standard portrait display. Standard portrait display means that the target content is displayed full-screen on a portrait screen in its original portrait layout. Text and images maintain a normal vertical reading direction, and the content is presented completely according to the aspect ratio of the portrait screen, without any scaling, centering, or rearrangement. Because the physical screen orientation, the software screen orientation, and the content's own orientation requirements are completely consistent, the content can be presented in its optimal state. For example, when a user opens a native portrait-oriented application such as a portrait-oriented web series app in portrait mode, the application is displayed in full-screen portrait mode, the short video completely fills the portrait display area, and the remote control's directional keys and confirmation button function normally. The far-field viewing experience is consistent with the portrait experience on a mobile device.
[0077] For target content that adapts to both portrait and landscape orientations, it can be done according to... Figure 3The second image shows adaptive portrait display processing. Adaptive portrait display means that the system sends a notification that the current software screen orientation is portrait to the target content. After receiving the notification, the target content automatically adjusts its internal layout according to the aspect ratio of the portrait screen to display in full-screen portrait mode. Unlike content that is only portrait-oriented, the portrait layout of content that is adapted between landscape and portrait orientations is the result of the application actively rearranging the layout based on the orientation notification. For example, splitting a single-line title in landscape mode into multiple lines, adjusting horizontal controls to vertical, and recalculating the adaptation ratio of the video screen, etc. For example, when a user uses AirPlay to cast in portrait mode, after receiving the portrait orientation notification, the casting application adaptively displays the cast screen in full-screen mode according to the portrait aspect ratio. The video control bar and progress bar are rearranged according to the portrait layout, allowing the user to have a complete casting viewing experience on a large portrait screen.
[0078] For target content that is forced to be in landscape mode, you can follow Figure 4 The method involves forced proportional centering. Content designed for landscape orientation is based on a landscape aspect ratio. When both the physical and software orientations are portrait, the system cannot directly display it in full-screen landscape mode (the physical screen is a narrow, portrait-oriented shape), nor can it be easily blocked (users may need to continue watching the video in portrait mode). Therefore, the system obtains the short side width of the current portrait screen (i.e., the horizontal width in portrait mode), uses this width as a baseline, calculates the scaling ratio according to the original aspect ratio of the target content's landscape image, and proportionally scales the image so that the scaled image width perfectly fits the short side of the screen. The scaled image is then vertically centered on the portrait screen, with black borders filling the uncovered display areas on the top and bottom. This method ensures that the original aspect ratio of the content is not disrupted, the content is complete and uncropped, and the correct visual proportions are maintained in far-field viewing scenarios on large screens. For example, when a user opens a landscape video application in portrait mode, the video is scaled proportionally to the original 16:9 aspect ratio and centered on the portrait screen, with black borders at the top and bottom. The video content is complete and viewable without any stretching or distortion. Alternatively, the desktop launcher is displayed proportionally and centered in portrait mode, with application icons and the system interface maintaining the correct proportions. Users can browse and operate the application normally using the remote control.
[0079] By adopting the technical solution of this application embodiment, in the core vertical screen usage state where both the physical and software orientations are vertical, the above display strategy can enable various types of content to obtain the best display effect in core scenarios such as vertical screen casting and short video viewing, achieving a user experience of no interference in vertical screen casting and no distortion of horizontal screen applications in vertical screen.
[0080] Based on the above technical solution, as an embodiment, detecting the current physical screen orientation of a display device may include: acquiring the original continuous posture sampling data of the display device; performing noise reduction processing on the original continuous posture sampling data to obtain continuous posture sampling data; when the continuous posture sampling data indicates a change in the physical screen orientation of the display device, filtering out valid continuous posture sampling data based on whether the continuous posture sampling data meets angle and time conditions; determining the change in physical screen orientation based on the valid continuous posture sampling data; the change indicating whether the physical screen orientation has changed; acquiring the original physical screen orientation of the display device, and determining the current physical screen orientation of the display device based on the original physical screen orientation and the change.
[0081] Raw continuous attitude sampling data refers to the sequence of attitude information of the display device continuously collected by the attitude detection device (such as gravity sensor, gyroscope, geomagnetic sensor and / or camera) at a preset sampling frequency. It may include, but is not limited to, raw sensor values such as gravitational acceleration component, angular velocity component, geomagnetic component and / or photos.
[0082] The system can continuously read the raw data output by each attitude detection device at a preset sampling frequency. In television scenarios, the attitude detection device is typically a gravity sensor, with a default sampling frequency of 10Hz, which can also be dynamically configured based on hardware capabilities. Each sample acquires a set of data containing triaxial gravitational acceleration components and arranges them in chronological order to form a continuous data sequence.
[0083] Because televisions are typically fixed on desktops, wall mounts, or mobile stands, noise is introduced into sensor data from various sources in the home environment, including low-frequency vibrations from speakers, slight table shaking caused by footsteps, continuous airflow from air conditioner vents, and minor deformations of wall mounts due to temperature changes. Therefore, denoising processing can be performed on the raw continuous attitude sampling data to obtain continuous attitude sampling data, which eliminates random jitter components caused by environmental noise. Denoising processing refers to the process of filtering or suppressing noise components caused by environmental interference in the raw continuous attitude sampling data. For example, it can involve applying filtering algorithms to the acquired raw sensor data to remove noise components caused by environmental interference. Denoising processing can employ algorithms such as low-pass filtering, moving average filtering, or Kalman filtering to filter out high-frequency random jitter components and retain low-frequency, trend-based attitude change signals. The continuous attitude sampling data obtained after denoising processing can accurately reflect whether the device is being actively rotated by the user. Environmental interference can include, but is not limited to, external disturbances caused by non-user-initiated rotation, such as speaker vibrations, desktop shaking, air conditioner blowing, wall mount deformation, and collisions.
[0084] When multiple consecutive posture sampling data obtained after denoising are inconsistent, it indicates a change in the physical screen orientation of the display device. Further validity screening of the posture sampling data can be performed based on dual judgment conditions. These dual judgment conditions can include angle and time conditions. The angle condition refers to the judgment condition that the single angle change corresponding to the consecutive posture sampling data is greater than a preset angle threshold, used to distinguish between valid angle changes caused by user-initiated rotation and invalid micro-offsets caused by environmental disturbances. The time condition refers to the judgment condition that the duration of the monotonic continuous change trend formed by the consecutive posture sampling data must be greater than a preset time threshold, used to confirm that the posture change has continuity and directional consistency, rather than a brief, instantaneous disturbance.
[0085] Only continuous attitude sampling data that simultaneously meets both angle and time conditions will be recognized as valid continuous attitude sampling data, representing that the user is actively rotating the display device. Valid continuous attitude sampling data refers to continuous attitude sampling data that simultaneously meets both angle and time conditions, representing the user's true intention to actively and continuously rotate the display device.
[0086] This dual-condition filtering strategy is a dedicated optimization for fixed-position TV scenarios. The mobile phone solution is optimized for high-frequency handheld jitter, with a short threshold and fast response; while the TV solution adopts strong filtering, strong anti-shake, and long stabilization time characteristics, only responding to the user's true rotation intention.
[0087] Based on the filtered and obtained valid continuous attitude sampling data, it can be determined whether the physical screen orientation of the device has undergone a substantial change, including whether it has changed or not. If the valid continuous attitude sampling data indicates that the display device has rotated from a landscape position to a portrait position or vice versa, the change is considered to have occurred; if the valid continuous attitude sampling data is insufficient to confirm a substantial change in orientation, the change is considered to have not occurred.
[0088] The system reads the original physical screen orientation, which refers to the previously confirmed physical screen orientation state recorded by the display device before the start of this attitude detection process. This serves as the reference benchmark for determining the orientation in this instance. Based on the current change, the system outputs the current physical screen orientation. If the change is positive, the current physical screen orientation is updated to the opposite direction of the original orientation (e.g., from landscape to portrait, or from portrait to landscape). If the change is negative, the original physical screen orientation is maintained.
[0089] By adopting the technical solution of this application embodiment, by acquiring the original posture data and applying noise reduction processing, and combining the dual filtering mechanism of angle conditions and time conditions, it can effectively filter out TV-specific interferences such as sound vibration, air conditioner blowing, and bracket shaking in the home environment, and only respond to the user's active and continuous rotation intention, reducing the false judgment rate, ensuring the stability and accuracy of physical screen orientation detection, avoiding false switching of horizontal and vertical screen states due to environmental noise, ensuring the accuracy and stability of orientation state switching, and avoiding frequent reversal of orientation state due to single data fluctuations.
[0090] Based on the above technical solution, as an example, Figure 5 This is a schematic flowchart illustrating the physical screen orientation determination process according to an embodiment of this application; see reference. Figure 5 Based on whether the continuous attitude sampling data meets the angle and time conditions, the effective continuous attitude sampling data is selected. This can include: determining that the continuous attitude sampling data meets the angle condition when the angle change corresponding to the continuous attitude sampling data is greater than the angle threshold; determining that the continuous attitude sampling data meets the time condition when the duration of the monotonous continuous change trend formed by the continuous attitude sampling data is greater than the time threshold; and determining the continuous attitude sampling data that simultaneously meets the angle and time conditions as effective continuous attitude sampling data.
[0091] Angle change refers to the difference in attitude angle between two adjacent frames of continuous attitude sampling data, reflecting the magnitude of angular offset that occurs between adjacent sampling times. Angle threshold is a preset critical value for angle determination, used to distinguish between valid angle changes caused by user-initiated rotation and invalid minute offsets caused by environmental disturbances. The angle threshold can be set according to actual needs; for example, it can be ±1°, or it can be dynamically configured based on sensor accuracy and installation method.
[0092] The system calculates the angle change between two adjacent frames in the continuous attitude sampling data frame by frame and compares the angle change with a preset angle threshold. When the angle change corresponding to a certain frame is greater than the angle threshold, the system determines that the frame data meets the angle condition, that is, the angle offset reflected by the frame data has reached the level of active user rotation, rather than residual jitter caused by environmental disturbances.
[0093] A monotonic continuous change trend refers to the angle value of continuous attitude sampling data showing a continuous increase or decrease in a single direction over a period of time, without any reversal of direction or significant regression, indicating that the device is being continuously rotated in one direction.
[0094] The time threshold refers to a preset duration threshold used by the system to confirm that a monotonous, continuous trend has sufficient persistence rather than being a brief, transient disturbance. The time threshold can be set according to actual needs; for example, it can be 1 second, or it can be adjusted based on the usage scenario of the television equipment and the damping characteristics of the rotating mechanism.
[0095] Based on the detected angle change meeting the angle condition, the system further tracks the trend of changes in multiple consecutive frames of data to determine whether the angle value exhibits a monotonous change of continuously increasing or decreasing, and records the duration of this monotonous trend. When the duration exceeds a preset time threshold, the system determines that the data segment meets the time condition, confirming that the device is being continuously rotated by the user in one direction. Conversely, if the angle value exceeds the angle threshold at a certain moment, but then reverses or regresses, causing the duration of the monotonous trend to fall short of the time threshold, then the data segment does not meet the time condition and is determined to be an instantaneous disturbance. In this way, transient impact interference can be eliminated, such as a sudden large-angle shift caused by a person bumping into the television. Although the single angle change of this type of interference may be large, it is not continuous and can be effectively identified and eliminated through the time condition.
[0096] When the angle change in each frame of a continuous attitude sampling data segment is greater than the angle threshold, and the duration of the monotonous continuous change trend formed by these frames is greater than the time threshold, the data segment is confirmed as valid continuous attitude sampling data.
[0097] In one embodiment, a rotatable smart TV equipped with a three-axis gravity sensor is fixedly placed on a rotatable base. The current physical screen orientation is landscape, and the user is watching live TV in landscape mode. The three-axis gravity sensor continuously collects three-axis gravitational acceleration data at a frequency of 10Hz. At a certain moment, the user pushes the TV to start rotating from landscape to portrait orientation. Before the rotation starts, the indoor air conditioner vent continuously blows air towards the TV, causing a slight wobbling of the wall-mounted base, resulting in high-frequency, small-amplitude jitter components in the original continuous attitude sampling data. The system applies a sliding mean filter to the original continuous attitude sampling data for noise reduction, filtering out the high-frequency noise caused by the air conditioner blowing and the base wobbling, resulting in smooth continuous attitude sampling data. After noise reduction, the system detects a monotonic trend in the continuous attitude sampling data, determining that the physical screen orientation may have changed, and then initiates dual-condition filtering. During the rotation, if the angle change in a particular frame is 0.5°, which is less than the preset angle threshold of 1°, this frame is considered residual jitter and discarded. Subsequent frames show angle changes greater than 1°, and this monotonous, continuous change trend has lasted for more than 1.2 seconds, exceeding the preset time threshold of 1 second. This data segment is then confirmed as valid continuous attitude sampling data, indicating that the user is actively rotating the TV from landscape to portrait mode. Based on the valid continuous attitude sampling data, the system determines that the change has occurred and reads the original physical screen orientation as landscape. Accordingly, the current physical screen orientation is updated to portrait. The system then synchronizes the portrait orientation result to the window management service, triggering subsequent software screen orientation switching and display strategy adjustment processes. Throughout the entire detection process, environmental interference such as air conditioning blasts, base shaking, and human movement / touching were effectively filtered out, preventing erroneous switching and ensuring accurate and reliable orientation judgment.
[0098] The technical solution adopted in this application eliminates invalid small-amplitude offsets caused by environmental disturbances by using angle conditions, and eliminates brief large-angle disturbances caused by collisions and impacts by using time conditions. The dual-condition screening mechanism ensures that only the user's true intention to actively and continuously rotate the device is confirmed. It effectively distinguishes between TV-specific interferences such as air conditioning blowing, sound vibration, and human touch and the user's true rotation operation, ensuring high reliability of physical screen orientation detection.
[0099] Based on the above technical solution, as an example, non-whitelisted content can be identified; non-whitelisted content includes one or more of the following: non-whitelisted applications, non-whitelisted pop-ups, and non-core buttons. When the physical screen orientation is portrait, startup interception is performed on non-whitelisted applications to prevent them from starting and automatically starting in the background, and a floating prompt message pops up when a non-whitelisted application attempts to start or attempt to automatically start in the background; when the physical screen orientation is portrait, display interception is performed on non-whitelisted pop-ups; when the physical screen orientation is portrait, commands triggered by non-core buttons are blocked, and a floating prompt message pops up when the command is blocked.
[0100] The system can preset a whitelist of content, and then identify content outside the whitelist as non-whitelisted content. Whitelisted content can be preset by the system or user-defined, and can also be dynamically updated via the cloud. Non-whitelisted content refers to any display object or interactive command that is not authorized by the system to run, be displayed, or respond in portrait mode, including one or more of the following: non-whitelisted applications, non-whitelisted pop-ups, and non-core buttons. Non-whitelisted applications are those not included in the portrait mode application whitelist; these applications are not allowed to start normally or auto-start in the background in portrait mode. Non-whitelisted pop-ups are pop-up interfaces not included in the portrait mode pop-up whitelist, and can include, but are not limited to, various third-party application push notifications, advertising pop-ups, and non-critical system prompt pop-ups; whitelisted pop-ups typically include system compliance pop-ups, volume adjustment pop-ups, and screen casting related pop-ups. Non-core buttons refer to physical buttons on the remote control or display device, which can include buttons other than core buttons such as the power button, home button, volume buttons, directional buttons, confirmation button, and back button. In portrait mode, the trigger commands of non-core buttons are blocked by the system.
[0101] Whitelist configurations can be stored in local system configuration files or dynamically retrieved and cached locally via cloud interfaces. Whitelist content can be pre-configured based on product needs or edited by users according to their personal habits. For example, parents can retain only specified video and screen-casting apps to prevent children from accidentally opening other apps in portrait mode.
[0102] When the physical screen orientation is portrait, the system can intercept the launch of all non-whitelisted applications at the application management level. Launch interception means preventing applications from making foreground launch requests or background auto-starting behaviors, thus preventing the application from displaying its interface or consuming system resources in portrait mode. When performing launch interception on non-whitelisted applications, a pop-up floating notification can be displayed to inform the user that the application has been blocked. This floating notification cannot be closed by the user and will automatically close after a preset duration (e.g., 2 seconds). The interception mechanism ensures that core scenarios such as portrait screen casting are not disturbed by the auto-start of irrelevant applications, maintaining a clean and controllable portrait usage environment.
[0103] When the physical screen orientation is portrait, display blocking can be implemented at the window management layer for non-whitelisted pop-ups. Display blocking means that the system blocks the pop-up's display request, preventing it from being overlaid on the screen in portrait mode. For example, various third-party application push notifications, advertising pop-ups, and non-critical system prompt pop-ups are all blocked by the system and are not displayed on the screen; only necessary whitelisted windows such as compliant system pop-ups, volume adjustment pop-ups, and screen mirroring connection status pop-ups are allowed. This mechanism can prevent pop-ups from suddenly appearing and obscuring the screen during portrait screen mirroring or short video viewing, ensuring that core usage scenarios are not interrupted.
[0104] When the physical screen orientation is portrait, trigger commands for non-core buttons can be blocked at the button event distribution level. In portrait mode, only core buttons such as power, home, volume up / down, up / down / left / right, confirmation, and back respond normally; trigger commands for other non-core buttons are blocked by the system and not passed to the application layer for processing. A floating notification can simultaneously pop up when a button is blocked, informing the user that the button is unavailable in portrait mode. This mechanism can reduce the probability of accidental remote control touches in multi-user home scenarios, preventing accidental presses from causing screen mirroring to exit or interface to change.
[0105] The technical solution adopted in this application embodiment uses a three-layer interception mechanism of application control, pop-up control, and button control to intercept the startup and auto-start of non-whitelisted applications, block the display of non-whitelisted pop-ups, and filter the trigger commands of non-core buttons. This builds a full-link control capability in portrait mode, ensuring that core scenarios such as portrait screen casting and short video viewing are not interfered with by irrelevant applications, pop-ups, and accidental touches. This achieves a clean and controllable portrait usage environment and solves the problems of high probability of accidental touches and frequent content interference in TV far-field interaction and family sharing scenarios.
[0106] Based on the above technical solutions, as an example, special operating scenarios of the display device can be identified. These special operating scenarios involve control logic for the screen orientation differing from the regular usage mode, requiring the display direction to be locked or limited according to preset rules. The display strategy for the target content in these special operating scenarios may differ from the display strategies described above. Special operating scenarios may include, but are not limited to, one or more of the following: cold start, standby wake-up, and boot-up. A cold start refers to the complete boot process of the display device from a completely power-off state, including firmware loading, system kernel initialization, system service startup, and finally, entering the user's desktop. During this process, system modules load sequentially, and the screen orientation management service is not yet fully ready. A standby wake-up refers to the process of the display device recovering from a low-power standby state to a normal operating state. During this process, the system restores context information from memory, but the physical screen orientation may have been changed by the user during standby, requiring re-detection and synchronization of the orientation state. Boot-up refers to the user initialization setup process entered by the display device after first use or a factory reset, including steps such as language selection, network configuration, and account login. This process typically requires a fixed landscape display orientation to ensure the correct layout of the boot interface.
[0107] By monitoring device operating status events, it's possible to determine whether the current operating scenario is a cold start, standby wake-up, or boot-up. Specifically, a cold start scenario can be identified by listening to system startup completion broadcasts (such as BOOT_COMPLETED); a standby wake-up scenario can be identified by listening to STR wake-up events or power management service state change callbacks; and a boot-up scenario can be identified by detecting system flags (such as whether it's the first boot or the first boot after a factory reset). Upon entering a special operating scenario, a special scenario-specific display strategy determination process is triggered, instead of using the direction judgment logic of the regular scenario.
[0108] In specific operating scenarios, when the physical screen orientation is landscape, the display strategy for the target content is determined to be standard landscape display; conversely, when the physical screen orientation is portrait, the display strategy is portrait-oriented landscape display. As mentioned earlier, the layout and rendering logic for standard landscape and portrait-oriented landscape displays are completely consistent. Therefore, it can be considered that regardless of the physical screen orientation, the rendering of the target content in specific operating scenarios is locked to the rendering logic corresponding to the landscape software screen orientation. For example, in the boot process, the boot interface is displayed in full-screen landscape mode, and this boot interface remains unchanged even if the screen is rotated to landscape or portrait mode.
[0109] By adopting the technical solution of this application embodiment, by identifying special operating scenarios such as cold start, standby wake-up and power-on boot, it is possible to determine that the corresponding target content maintains the display layout corresponding to the landscape screen direction under any physical posture for rapid presentation, ensuring the correct display of the target content under special operating scenarios.
[0110] Based on the above technical solution, as an example, when the target content is obtained, the landscape / portrait configuration rules of the target content can be obtained; the landscape / portrait configuration rules can be parsed to obtain the landscape / portrait attributes of the target content.
[0111] When the target content is an application, obtaining the target content can mean that the application is installed. Landscape / portrait configuration rules refer to the configuration information declared by the developer during the development phase of the target content, which describes the display capabilities and preferences of the content in different screen orientations. In the Android system, these landscape / portrait configuration rules are usually recorded in the application's AndroidManifest.xml manifest file and can be declared through the screenOrientation attribute.
[0112] For system-level content (such as boot animations and boot wizards), the landscape / portrait configuration rules can be pre-set in the system configuration file, which the system reads directly when loading the content. Furthermore, for external content sources accessed via screen mirroring protocols, the system can obtain their orientation information through the screen mirroring service, serving as a supplementary source for the landscape / portrait configuration rules. By obtaining configuration rules through multiple channels, the system ensures that the orientation adaptation requirements of all types of target content can be accurately identified before entering the display process.
[0113] Landscape / portrait configuration rules can be parsed to obtain landscape / portrait attributes, including landscape only, portrait only, forced landscape, and adaptive landscape / portrait. This involves semantic parsing and categorization of the obtained configuration rules, converting them into system-recognizable landscape / portrait attributes. These attributes can be stored for later retrieval when determining display strategies.
[0114] Figure 6 This is a schematic diagram of the process for obtaining landscape and portrait screen attributes according to an embodiment of this application; see reference. Figure 6 During application installation, the application's landscape / portrait configuration rules can be parsed to obtain landscape / portrait attributes. These attributes can then be stored so that they can be directly retrieved when determining the display strategy later.
[0115] The technical solution adopted in this application realizes the automatic identification of the landscape and portrait screen attributes of the target content, providing a reliable basis for the accurate matching of subsequent differentiated display strategies, and ensuring the consistency between display strategies and content characteristics from the source.
[0116] Based on the above technical solution, as an embodiment, after determining the current physical screen orientation and software screen orientation of the display device, the physical screen orientation and software screen orientation can also be synchronized to the global management service, so that the global management service can adjust the display control logic synchronously according to the physical screen orientation and software screen orientation; wherein, the global management service includes one or more of the following: window management service, application management service and screen projection service.
[0117] Global Management Service refers to a set of system-level services in the display device's operating system responsible for coordinating display control logic across modules. Its responsibility is to distribute the latest physical and software screen orientations to relevant service modules, ensuring that all system components maintain a consistent understanding of the current screen orientation. Window Management Service (WMS) is a core service in the operating system responsible for window creation, destruction, hierarchy management, and layout calculations. It determines the window's size, position, and rendering method based on the current software screen orientation. Application Management Service (AMS) is a core service in the operating system responsible for application lifecycle management, startup scheduling, and access control. It determines whether to allow or block application startup based on the current screen orientation and the application's portrait / landscape orientation. Screen Casting Service is a dedicated service module in the operating system responsible for managing external screen casting protocol access, screen casting rendering, and screen casting status maintenance. It adjusts the display strategy of the screen casting image based on the current screen orientation.
[0118] After determining the physical screen orientation and the software screen orientation, their latest states can be simultaneously distributed to all modules in the global management service. This synchronization operation can be triggered at the following times: after the system completes its initial orientation detection during a cold start; after the sensor detects a change in physical orientation and completes dual-condition filtering; after exiting a special operating scenario and entering normal mode; and after the software screen orientation is actively locked or unlocked by the system.
[0119] The synchronization mechanism can employ system broadcasting, where the direction detection module broadcasts a direction change, and each global management service registers to listen and receive it; or it can use inter-process communication, where the direction detection module directly calls the direction update interface of each service. Regardless of the method used, it is essential to ensure that the physical screen direction and the software screen direction are atomically synchronized to each service within the same transaction to avoid inconsistencies in direction states between services.
[0120] Upon receiving the orientation synchronization information, each global management service updates its respective display control logic based on the latest combination of physical and software orientations. The window management service recalculates window layout parameters and adjusts window size and rendering methods according to the software screen orientation; the application management service updates application launch interception policies based on the physical and software orientation combinations, deciding whether to allow or block applications from launching; and the projection service adjusts the rendering ratio and display strategy of the projected image based on the current orientation to ensure that the projected content matches the current screen orientation. These adjustments are performed in parallel across all service modules, completing all updates within the same orientation change cycle to ensure a seamless and consistent interface transition for the user.
[0121] In one embodiment, a rotatable smart TV is currently in landscape mode, and the user is watching a landscape video. The system window management service maintains the landscape window layout, the application management service manages the application lifecycle according to the landscape strategy, and the screen casting service is idle. When the user rotates the TV from landscape to portrait mode, the sensor detects the change in physical orientation and completes dual-condition filtering. The orientation detection module confirms that the physical screen orientation has been updated to portrait, and the system synchronously sets the software screen orientation to portrait. It also synchronizes the combination of physical and software portrait orientation information to the global management service via system broadcast. Upon receiving the orientation synchronization information, the window management service immediately recalculates the layout parameters of all current windows, adjusting the video window from a full-screen landscape layout to a forced proportionally centered portrait layout. The video image is scaled at a 16:9 ratio and vertically centered on the portrait screen. The application management service synchronously updates its startup interception policy, adding landscape-only applications to the interception list while allowing startup requests from portrait-only applications. After receiving the orientation synchronization information, the screen mirroring service detects that an AirPlay screen mirroring session is currently active in the background. It then notifies the AirPlay app that the screen orientation has changed to portrait mode, and the AirPlay app adjusts accordingly to a portrait full-screen adaptive layout. The adjustment operations of the above three services are completed in parallel within the same orientation change cycle. The entire process from rotating the TV to seeing the adjusted interface is smooth and seamless. The video image, the screen mirroring image, and the application management policies take effect simultaneously, and there are no inconsistent windows where one service has been updated while another has not yet responded.
[0122] By adopting the technical solution of this application embodiment, the physical screen orientation and software screen orientation are synchronized to the global management service. This allows the global management service to complete the adjustment of their respective display control logic in parallel within the same orientation change cycle, achieving system-level global state synchronization. This ensures that each service in a complex multi-module architecture maintains a consistent understanding of the current screen orientation, avoiding problems such as window layout disorder, application management lag, or abnormal screen projection display caused by state asynchrony. It also ensures the continuity and consistency of user experience during the switching between portrait and landscape modes.
[0123] To facilitate better implementation of the display control method of this application, this application also provides a display control device based on the above-described display control method. The meanings of the terms used are the same as in the above-described display control method, and specific implementation details can be found in the descriptions of the method embodiments.
[0124] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of the display control device provided in the embodiments of this application, wherein the display control device includes: The orientation determination module 701 is used to detect the current physical screen orientation of the display device and determine the current software screen orientation of the display device; The attribute acquisition module 702 is used to acquire the landscape and portrait attributes of the target content; The strategy determination module 703 is used to determine the display strategy of the target content based on the physical screen orientation, the software screen orientation and the landscape / portrait screen attributes, and to display the target content according to the display strategy.
[0125] In one embodiment, the landscape / portrait attributes of the target content include: landscape only, portrait only, landscape / portrait adaptive, and forced landscape. Specifically, target content that is only in landscape mode is allowed to be displayed only when the software screen orientation is landscape, and is blocked when the software screen orientation is portrait. The target content for portrait mode is only allowed to be displayed when both the physical screen orientation and the software screen orientation are portrait, and is blocked when the software screen orientation is landscape. The layout of the target content, which adapts to both portrait and landscape orientations, is adjusted synchronously with the software screen orientation. The target content that is forced to be in landscape mode is allowed to be displayed when the software screen orientation is landscape, and is forced to be displayed proportionally centered when both the physical screen orientation and the software screen orientation are portrait.
[0126] In one embodiment, the strategy determination module 703 is specifically used to perform: When both the physical screen orientation and the software screen orientation are landscape, determining the display strategy includes: Display target content that is only meant to be displayed in landscape mode in a standard landscape orientation; Intercept target content that is only displayed in portrait mode; Adapt the landscape mode display to target content that is compatible with both portrait and landscape orientations. Display the target content that was forced into landscape mode in normal landscape mode.
[0127] In one embodiment, the strategy determination module 703 is specifically used to perform the following: when the physical screen orientation is portrait and the software screen orientation is landscape, determining the display strategy includes: Intercept target content that is only displayed in portrait mode; All target content, whether it is only in landscape mode, automatically adapts to portrait mode, or is forced to be in landscape mode, will be displayed in portrait mode with landscape mode.
[0128] In one embodiment, the strategy determination module 703 is specifically used to perform: When both the physical screen orientation and the software screen orientation are portrait mode, determining the display strategy includes: Intercept target content that is only displayed in landscape mode; Display target content that is only meant for portrait orientation in a standard portrait orientation; Adapt the target content to portrait orientation for content that is compatible with both landscape and portrait orientations; Force the target content that is forced to be displayed in landscape mode to be centered proportionally.
[0129] In one embodiment, the target content is forced to be displayed in a proportionally centered position, including: When the physical screen orientation is portrait orientation, obtain the screen width of the display device; Obtain the display width of the target content; The scaling ratio is determined based on the display width and the screen width; The target content is scaled according to the stated scaling ratio, and the scaled target content is then displayed vertically centered.
[0130] In one embodiment, the direction determination module 701 is specifically used to perform: Acquire the original continuous attitude sampling data of the display device; The original continuous attitude sampling data is denoised to obtain continuous attitude sampling data; When the continuous posture sampling data represents a change in the physical screen orientation of the display device, valid continuous posture sampling data is obtained by filtering based on whether the continuous posture sampling data meets the angle condition and the time condition. Based on the effective continuous attitude sampling data, the change in the orientation of the physical screen is determined; the change indicates whether the orientation of the physical screen has changed. Obtain the original physical screen orientation of the display device, and determine the current physical screen orientation of the display device based on the original physical screen orientation and the changes.
[0131] In one embodiment, the step of filtering valid continuous attitude sampling data based on whether the continuous attitude sampling data meets angle and time conditions includes: When the angle change corresponding to the continuous attitude sampling data is greater than the angle threshold, it is determined that the continuous attitude sampling data satisfies the angle condition. When the duration of the monotonous continuous change trend formed by the continuous attitude sampling data is greater than a time threshold, it is determined that the continuous attitude sampling data satisfies the time condition. Continuous attitude sampling data that simultaneously satisfies the angle condition and the time condition are determined as the valid continuous attitude sampling data.
[0132] In one embodiment, the device further includes: The non-whitelist determination module is used to determine non-whitelist content; the non-whitelist content includes one or more of the following: non-whitelist applications, non-whitelist pop-ups, and non-core buttons; The blocking module is used to intercept the startup of non-whitelisted applications when the physical screen orientation is portrait, prevent the non-whitelisted applications from starting up and starting in the background, and pop up a floating prompt message when the non-whitelisted applications attempt to start up or attempt to start in the background. The interception module is used to intercept the display of non-whitelisted pop-ups when the physical screen orientation is portrait. The blocking module is used to block commands triggered by non-core buttons when the physical screen orientation is portrait, and to display a floating prompt message when the command is blocked.
[0133] In one embodiment, the device further includes: The scene recognition module is used to identify special operating scenarios of the display device, including one or more of cold start, standby wake-up, and power-on boot. A landscape display module is used to determine the display strategy of the target content as a regular landscape display when the physical screen orientation is landscape in the special operating scenario. The portrait display module is used to determine the display strategy of the target content as portrait-to-landscape display when the physical screen orientation is portrait in the special operating scenario.
[0134] In one embodiment, the attribute acquisition module 702 is specifically used to perform: When the target content is obtained, the landscape / portrait configuration rules of the target content are obtained; The landscape / portrait configuration rules are parsed to obtain the landscape / portrait attributes of the target content.
[0135] In one embodiment, the device further includes: A synchronization module is used to synchronize the physical screen orientation and the software screen orientation to the global management service, so that the global management service can adjust the display control logic synchronously according to the physical screen orientation and the software screen orientation; The global management service includes one or more of the following: window management service, application management service, and screen mirroring service.
[0136] The technical solution of this application detects the physical screen orientation and determines the software screen orientation, thus decoupling the physical screen orientation from the software screen orientation. This allows the device to maintain a landscape software environment for specific content even in a physical portrait orientation, solving the display limitation problem caused by the forced binding of the physical screen orientation and the software screen orientation. Based on the portrait and landscape attributes of the target content, the orientation adaptation requirements of different types of content can be distinguished, avoiding screen stretching, distortion, or truncation caused by uniformly rotating all content. In this way, the display strategy is comprehensively determined based on the physical screen orientation, the software screen orientation, and the portrait and landscape attributes, while also considering the actual posture of the device, the system display state, and the orientation characteristics of the content itself. This ensures that the display strategy accurately matches the current usage scenario, and the optimal display method can be automatically matched without manual user intervention.
[0137] For specific limitations regarding the display control device, please refer to the limitations on the display control method above, which will not be repeated here. Each module in the aforementioned display control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the computer device, or stored in software in the memory of the computer device, so that the processor can call and execute the operations corresponding to each module.
[0138] Furthermore, this application also provides an electronic device, which can be the display device described above. For example... Figure 8 As shown, it illustrates the structural diagram of the electronic device involved in this application, specifically: The electronic device may include components such as a processor 801 with one or more processing cores and a memory 802 with one or more computer-readable storage media. Those skilled in the art will understand that... Figure 8 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 801 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 802, and by calling data stored in the memory 802, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 801.
[0139] The memory 802 can be used to store software programs and modules. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 802 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. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.
[0140] In one embodiment, the electronic device further includes a power supply 803 that supplies power to the various components. Preferably, the power supply 803 can be logically connected to the processor 801 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 803 may also include one or more DC or AC power supplies, recharging systems, power equipment debugging circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0141] In one embodiment, the electronic device may further include an input unit 804, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0142] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 801 in the electronic device loads the executable files corresponding to the processes of one or more application programs into the memory 802 according to the following instructions, and the processor 801 runs the application programs stored in the memory 802, thereby implementing the steps in any of the display control methods provided in the embodiments of this application.
[0143] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0144] In one embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the methods described in any embodiment of this application.
[0145] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of this application.
[0146] In some embodiments, a computer program product is also provided, including a computer program or instructions that, when executed by a processor, implement the methods described in any embodiment of this application.
[0147] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0148] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0149] Therefore, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the display control methods provided in this application.
[0150] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0151] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0152] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the display control methods provided in this application, the beneficial effects that any of the display control methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0153] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device 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 terminal device. 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 terminal device that includes said element.
[0154] The above provides a detailed description of a display control method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A display control method, characterized in that, include: Detect the current physical screen orientation of the display device and determine the current software screen orientation of the display device; Get the landscape / portrait attributes of the target content; Based on the physical screen orientation, the software screen orientation, and the landscape / portrait screen attributes, a display strategy for the target content is determined, and the target content is displayed according to the display strategy.
2. The method according to claim 1, characterized in that, The target content's landscape and portrait orientation attributes include: landscape only, portrait only, landscape / portrait adaptive, and forced landscape. Specifically, target content that is only in landscape mode is allowed to be displayed only when the software screen orientation is landscape, and is blocked when the software screen orientation is portrait. The target content for portrait mode is only allowed to be displayed when both the physical screen orientation and the software screen orientation are portrait, and is blocked when the software screen orientation is landscape. The layout of the target content, which adapts to both portrait and landscape orientations, is adjusted synchronously with the software screen orientation. The target content that is forced to be in landscape mode is allowed to be displayed when the software screen orientation is landscape, and is forced to be displayed proportionally centered when both the physical screen orientation and the software screen orientation are portrait.
3. The method according to claim 2, characterized in that, The step of determining the display strategy for the target content based on the physical screen orientation, the software screen orientation, and the landscape / portrait orientation includes: When both the physical screen orientation and the software screen orientation are landscape, determining the display strategy includes: Display target content that is only meant to be displayed in landscape mode in a standard landscape orientation; Intercept target content that is only displayed in portrait mode; Adapt the landscape mode display to target content that is compatible with both portrait and landscape orientations. Display the target content that was forced into landscape mode in normal landscape mode.
4. The method according to claim 2, characterized in that, The step of determining the display strategy for the target content based on the physical screen orientation, the software screen orientation, and the landscape / portrait orientation includes: When the physical screen orientation is portrait and the software screen orientation is landscape, determining the display strategy includes: Intercept target content that is only displayed in portrait mode; All target content, whether it is only in landscape mode, automatically adapts to portrait mode, or is forced to be in landscape mode, will be displayed in portrait mode with landscape mode.
5. The method according to claim 2, characterized in that, The step of determining the display strategy for the target content based on the physical screen orientation, the software screen orientation, and the landscape / portrait orientation includes: When both the physical screen orientation and the software screen orientation are portrait mode, determining the display strategy includes: Intercept target content that is only displayed in landscape mode; Display target content that is only meant for portrait orientation in a standard portrait orientation; Adapt the target content to portrait orientation for content that is compatible with both landscape and portrait orientations; Force the target content that is forced to be displayed in landscape mode to be centered proportionally.
6. The method according to claim 2 or 5, characterized in that, Force the target content to be displayed in a proportionally centered manner, including: When the physical screen orientation is portrait orientation, obtain the screen width of the display device; Obtain the display width of the target content; The scaling ratio is determined based on the display width and the screen width; The target content is scaled according to the stated scaling ratio, and the scaled target content is then displayed vertically centered.
7. The method according to claim 1, characterized in that, The detection of the current physical screen orientation of the display device includes: Acquire the original continuous attitude sampling data of the display device; The original continuous attitude sampling data is denoised to obtain continuous attitude sampling data; When the continuous posture sampling data represents a change in the physical screen orientation of the display device, valid continuous posture sampling data is obtained by filtering based on whether the continuous posture sampling data meets the angle condition and the time condition. Based on the effective continuous attitude sampling data, the change in the orientation of the physical screen is determined; the change indicates whether the orientation of the physical screen has changed. Obtain the original physical screen orientation of the display device, and determine the current physical screen orientation of the display device based on the original physical screen orientation and the changes.
8. The method according to claim 7, characterized in that, The step of filtering valid continuous attitude sampling data based on whether the continuous attitude sampling data meets the angle and time conditions includes: When the angle change corresponding to the continuous attitude sampling data is greater than the angle threshold, it is determined that the continuous attitude sampling data satisfies the angle condition. When the duration of the monotonous continuous change trend formed by the continuous attitude sampling data is greater than a time threshold, it is determined that the continuous attitude sampling data satisfies the time condition. Continuous attitude sampling data that simultaneously satisfies the angle condition and the time condition are determined as the valid continuous attitude sampling data.
9. The method according to claim 1, characterized in that, The method further includes: Determine non-whitelist content; the non-whitelist content includes one or more of the following: non-whitelist applications, non-whitelist pop-ups, and non-core buttons. When the physical screen orientation is portrait, startup interception is performed on non-whitelisted applications to prevent them from starting and automatically starting in the background, and a floating prompt message is displayed when a non-whitelisted application attempts to start or attempt to automatically start in the background. When the physical screen orientation is portrait, display blocking is performed on non-whitelisted pop-ups; When the physical screen orientation is portrait, commands triggered by non-core buttons are blocked, and a floating prompt message is displayed when the command is blocked.
10. The method according to claim 1, characterized in that, The method further includes: Identify special operating scenarios of the display device, including one or more of cold start, standby wake-up, and power-on boot; In the specific operating scenario, when the physical screen orientation is landscape, the display strategy for the target content is determined to be regular landscape display; In the specific operating scenario, when the physical screen orientation is portrait, the display strategy for the target content is determined to be portrait-to-landscape display.
11. The method according to claim 1, characterized in that, The process of obtaining the landscape / portrait attributes of the target content includes: When the target content is obtained, the landscape / portrait configuration rules of the target content are obtained; The landscape / portrait configuration rules are parsed to obtain the landscape / portrait attributes of the target content.
12. The method according to claim 1, characterized in that, After determining the current physical screen orientation and software screen orientation of the display device, the method further includes: The physical screen orientation and the software screen orientation are synchronized to the global management service, so that the global management service can adjust the display control logic synchronously according to the physical screen orientation and the software screen orientation; The global management service includes one or more of the following: window management service, application management service, and screen mirroring service.
13. A display control device, characterized in that, include: An orientation determination module is used to detect the current physical screen orientation of the display device and determine the current software screen orientation of the display device; The attribute retrieval module is used to retrieve the landscape and portrait attributes of the target content; The strategy determination module is used to determine the display strategy of the target content based on the physical screen orientation, the software screen orientation, and the landscape / portrait screen attributes, and to display the target content according to the display strategy.
14. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the display control method as described in any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the display control method as described in any one of claims 1 to 12.