Reference attitude determination method and device, electronic equipment and computer readable storage medium

CN122884384APending Publication Date: 2026-10-09SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611135538.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

横竖屏识别方案通常基于传感器的出厂固定基准进行姿态判断,该基准在设备出厂时即已确定且不可调整,难以适配不同使用场景,导致基于该技术基准判断的显示设备横竖屏方向存在不准确的问题

Benefits of technology

响应于校准触发操作确定显示设备的基准姿态数据,替代了出厂时确定不可调整的基准姿态,使基准姿态数据能够根据显示设备的实际安装情况动态确定;提供了包括显示设备安装完成的确认操作和用户在安装方向选择界面对安装方向选项的选择操作这两种校准触发操作,其中前者在安装完成时即可自动触发校准,后者允许用户通过选择安装方向完成校准,适配不同的场景,提高了基准姿态数据确定的灵活性;基于校准后的基准姿态数据确定显示设备的物理屏幕方向,可以使显示设备的物理屏幕方向判断结果与实际安装姿态相匹配,解决了基于出厂固定基准判断导致横竖屏方向不准确的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122884384A_ABST
    Figure CN122884384A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a reference attitude determination method and device, electronic equipment and a computer readable storage medium, and relate to the technical field of attitude determination; the method comprises: in response to a calibration trigger operation, determining reference attitude data of a display device; wherein the calibration trigger operation comprises a confirmation operation of completed installation of the display device, and a selection operation of a user on an installation direction option in an installation direction selection interface; the reference attitude data is used to determine a physical screen direction of the display device. In this way, the reference attitude data of the display device can be accurately determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of attitude determination technology, specifically to a reference attitude determination method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] With the continuous expansion of application scenarios for display devices such as smart TVs, the ability to automatically switch between portrait and landscape orientations has become an important feature of display devices. Landscape / portrait recognition solutions typically rely on a fixed factory reference for sensor orientation determination. This reference is determined at the factory and cannot be adjusted, making it difficult to adapt to different usage scenarios. This results in inaccuracies in the landscape / portrait orientation of display devices determined based on this technical reference. Summary of the Invention

[0003] This application provides a reference attitude determination method, apparatus, electronic device, and computer-readable storage medium, which can accurately determine the reference attitude data of a display device.

[0004] In a first aspect, embodiments of this application provide a method for determining a reference attitude, including: In response to a calibration trigger operation, the reference attitude data of the display device is determined; The calibration triggering operation includes a confirmation operation for the completion of the installation of the display device, and a user's selection operation for the installation direction option on the installation direction selection interface. The reference attitude data is used to determine the physical screen orientation of the display device.

[0005] Secondly, embodiments of this application provide a reference attitude determination device, comprising: The reference determination module is used to determine the reference attitude data of the display device in response to the calibration trigger operation; The calibration triggering operation includes a confirmation operation for the completion of the installation of the display device, and a user's selection operation for the installation direction option on the installation direction selection interface. The reference attitude data is used to determine the physical screen orientation of the display device.

[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 aforementioned reference attitude determination 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 aforementioned reference attitude determination 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: The system determines the reference posture data of the display device in response to calibration trigger operations, replacing the factory-determined and unadjustable reference posture. This allows the reference posture data to be dynamically determined based on the actual installation of the display device. It provides two types of calibration trigger operations: a confirmation operation upon completion of display device installation and a user selection of the installation direction option on the installation direction selection interface. The former automatically triggers calibration upon installation completion, while the latter allows the user to complete calibration by selecting the installation direction, adapting to different scenarios and improving the flexibility of reference posture data determination. Determining the physical screen orientation of the display device based on the calibrated reference posture data ensures that the determined physical screen orientation matches the actual installation posture, resolving the issue of inaccurate horizontal and vertical screen orientation caused by using a fixed factory reference. 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 reference attitude determination method provided in an embodiment of this application; Figure 2 This is a schematic diagram of three axes provided in one embodiment of this application; Figure 3 This is a schematic flowchart of physical screen orientation determination provided in an embodiment of this application; Figure 4 This is a schematic diagram of the architecture of a reference attitude determination system provided in an embodiment of this application; Figure 5 This is a schematic flowchart of a reference attitude determination method provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a reference attitude determination device provided in an embodiment of this application; Figure 7 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 merely some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0013] In one embodiment, such as Figure 1 As shown, a reference attitude determination method is provided. Although the logical order 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 figures. Specifically, this reference attitude determination method can be applied to a display device whose screen supports rotation, and 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 motorized rotating TV, a wall-mounted rotating art TV, and a vertical touch TV.

[0014] 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.

[0015] according to Figure 1 The reference attitude determination method shown includes at least step S110. In step S110, in response to a calibration trigger operation, reference attitude data of the display device is determined. The calibration trigger operation includes a confirmation operation indicating that the display device installation is complete, and a user selection operation for the installation direction option on the installation direction selection interface; the reference attitude data is used to determine the physical screen orientation of the display device.

[0016] After the display device is installed, it can perform a calibration trigger operation, which in turn initiates the process of determining reference attitude data. Reference attitude data refers to a set of sensor reference values ​​saved after calibration, serving as the benchmark for subsequent screen orientation determination. The determined reference attitude data reflects the actual attitude of the display device in its current installation state, thus replacing the fixed and unadjustable benchmark values ​​at the factory, allowing subsequent attitude determination to be based on the actual installation state.

[0017] Calibration trigger operations can include two types. One is a confirmation operation upon completion of display device installation. This confirmation operation can be performed by relevant personnel entering confirmation information on the corresponding user interface of the display device after installation. When this confirmation operation is detected, the display device's attitude sensors (such as gravity sensors, gyroscopes, geomagnetic sensors, or cameras) can automatically collect the current attitude data of the display device. This attitude data can serve as reference attitude data.

[0018] Another approach is to display at least one installation direction option on the installation direction selection interface, allowing the user to choose the installation direction option from this interface.

[0019] In one embodiment, the corresponding reference attitude data can be determined based on the installation direction selected by the user; in another embodiment, the current attitude data of the display device can be collected in real time based on the sensor of the display device when the user selects the installation direction option, and the collected attitude data can be determined as the reference attitude data.

[0020] Baseline posture data serves as a reference standard to determine the physical screen orientation of a display device, ensuring the determination matches the actual installation orientation. Physical screen orientation refers to the orientation in which the display device is actually placed or rotated in physical space, and 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.

[0021] In one embodiment, a wall-mounted smart TV is used as an example. The TV is mounted on the wall using a wall mount bracket, and its built-in three-axis gravity sensor can output acceleration data in the X, Y, and Z axes in real time. After the TV is powered on, the system initializes the sensor data acquisition module and enters the installation calibration process. After the installer completes the wall mounting, a confirmation signal is triggered by operating the remote control. In response to this confirmation, the system acquires the data output by the current three-axis gravity sensor and saves it as reference attitude data. In another embodiment, the system displays an installation direction selection interface, which includes options such as landscape upright, portrait upright, landscape inverted, and portrait inverted. After the user selects the corresponding option according to the actual installation method, the system determines the attitude data matching the selected installation direction as the reference attitude data.

[0022] Regardless of which method is used to complete the calibration, the subsequent system will use the calibrated baseline posture data as the reference standard when determining the screen orientation, rather than the factory-fixed baseline. This ensures that the orientation determination result is consistent with the actual installation posture of the device, and that the screen orientation can be accurately identified under different installation methods.

[0023] The technical solution of this application determines the reference posture data of the display device in response to the calibration trigger operation, replacing the factory-determined and unadjustable reference posture. This allows the reference posture data to be dynamically determined according to the actual installation of the display device. It provides two calibration trigger operations: a confirmation operation upon completion of display device installation and a user selection operation for the installation direction on the installation direction selection interface. The former automatically triggers calibration upon installation completion, while the latter allows the user to complete calibration by selecting the installation direction, adapting to different scenarios and improving the flexibility of reference posture data determination. Determining the physical screen orientation of the display device based on the calibrated reference posture data ensures that the physical screen orientation judgment matches the actual installation posture, solving the problem of inaccurate horizontal and vertical screen orientation caused by factory-fixed reference judgment.

[0024] Based on the above technical solution, as an embodiment, step S110 may include: detecting a confirmation operation that the display device has been installed; when the confirmation operation is detected, collecting the attitude data of the display device; and determining the attitude data as the reference attitude data of the display device.

[0025] The system can detect confirmation actions indicating that the display device has been installed successfully. These confirmation actions can be initiated by the user via remote control, touch panel, or mobile terminal, or automatically generated by the display device itself when specific installation readiness conditions are detected. By detecting these confirmation actions, the system can accurately determine that the display device has been physically installed and is in a ready state, thus initiating the calibration process at the appropriate time.

[0026] Upon detecting the installation completion confirmation, the system immediately acquires the current attitude data from the three-axis gravity sensor. Since the confirmation occurs precisely when installation is complete, the acquired attitude data accurately reflects the actual physical attitude of the display device after installation. This acquired attitude data is saved as baseline attitude data, serving as a reference standard for subsequent screen orientation determination. Thereafter, when determining screen orientation (portrait or landscape), the system uses this baseline attitude data as the basis, rather than the sensor's factory default value.

[0027] In a specific embodiment, a wall-mounted smart TV is used as an example. After the installer fixes the TV to the wall mount, they press the "Installation Complete" confirmation button via remote control. Upon receiving this confirmation, the TV system immediately reads the current X-axis, Y-axis, and Z-axis acceleration values ​​from the three-axis gravity sensor and saves this set of values ​​as baseline attitude data. Subsequently, when the system needs to determine whether the TV is currently in landscape or portrait mode, it uses this baseline attitude data as a reference standard for comparison and calculation. Since the baseline attitude data is collected based on the actual installation posture at the moment of installation completion, it accurately reflects the TV's true posture in the wall-mounted state, avoiding recognition deviations caused by inconsistencies between the factory default baseline and the actual installation posture.

[0028] By adopting the technical solution of this application embodiment, the installation completion confirmation operation is detected and the attitude data is collected at that moment as the reference attitude data, so that the reference attitude data can truly reflect the actual attitude state of the display device after installation. No additional direction selection operation is required from the user, which simplifies the calibration process and ensures the accuracy and timeliness of the reference attitude data.

[0029] Based on the above technical solution, as an embodiment, step S110 may include: displaying an installation direction selection interface; the installation direction selection interface includes at least one installation direction option; when a user selects any installation direction option, acquiring the attitude data matching the installation direction selected by the user; and determining the attitude data as the reference attitude data of the display device.

[0030] An installation orientation selection interface can be displayed on the screen of the display device, including installation orientation options for the user to choose from. The installation orientation selection interface refers to the interactive interface displayed by the system that presents multiple installation orientation options, allowing the user to specify the actual installation method of the display device. Installation orientation options are identifiers for each available installation method displayed on the interface, representing a physical installation orientation of the display device. The selection operation refers to the user's confirmation action on the target installation orientation option in the installation orientation selection interface, such as clicking, touching, or confirming with a remote control.

[0031] The system detects user actions on the installation orientation selection interface. When it detects that the user has clicked, touched, or confirmed the selection of an installation orientation option via remote control, it can obtain posture data matching the selected installation orientation. The installation orientation can include one or more of the following: landscape upright, portrait upright, landscape inverted, portrait inverted, and custom orientations.

[0032] Landscape mounting refers to the display device being installed horizontally, with the top of the screen aligned with the physical top of the device. This is the most common wall-mounted or stand-mounted landscape mounting method.

[0033] Vertical screen mounting refers to a display device installed vertically, with the top of the screen aligned with the physical top of the device, and the screen in a normal vertical display state. This is commonly seen in vertical advertising machines or vertical screen information display terminals.

[0034] Horizontal inverted mounting refers to a display device that is installed horizontally, but the top of the screen is opposite to the physical top of the device. In other words, the screen is in a horizontal display state that is flipped up and down. This usually occurs in scenarios where the device is suspended or installed on a special bracket.

[0035] Vertical screen inverted mounting refers to a display device that is installed vertically, but the top of the screen is opposite to the physical top of the device. The screen is in a vertical display state that is flipped up and down. It is commonly used in vertical installations that require maintenance from the back or in special wall-mounted scenarios.

[0036] Custom orientation is a setting that users can customize based on the actual installation situation. The system determines the corresponding installation orientation based on the parameters entered by the user. This installation orientation is not one of the four standard types mentioned above and may include tilt installation or installation at a specific angle.

[0037] By providing multiple installation orientation options, the system can adapt to various installation methods, from conventional wall mounting to ceiling mounting and angled mounting. Users only need to select the corresponding option according to the actual installation situation to complete the calibration, which improves the coverage and applicability of the specified installation orientation.

[0038] In one embodiment, reference attitude data corresponding to different installation orientations can be preset, and the correspondence between installation orientations and reference attitude data can be stored in the local storage of the display device. This can be done during the factory manufacturing or system initialization phase, where the system pre-calibrates the sensor reference values ​​corresponding to each installation orientation. For example, in the reference attitude data corresponding to a landscape orientation, the X-axis acceleration is close to zero, the Y-axis acceleration points in the opposite direction of gravity, and the Z-axis acceleration points in the direction of the screen's front normal. In the reference attitude data corresponding to a portrait orientation, the X-axis and Y-axis acceleration distributions change accordingly as the device rotates 90 degrees. Landscape and portrait inverted orientations correspond to the expected sensor values ​​after the screen is flipped up and down, respectively. The system uses the installation orientation identifier as an index to store the reference attitude data corresponding to each installation orientation in the form of a mapping table in the local configuration file.

[0039] When a user selects an installation direction in the installation direction selection interface, the system determines the target installation direction identifier based on the user's selection and searches for the matching reference attitude data from a locally stored mapping table, loading it as the reference attitude data for the current calibration. Through this pre-mapped method, the system can quickly determine the reference attitude data without needing to collect sensor data in real time after the user's selection, improving calibration efficiency. Furthermore, since the pre-mapped reference attitude data is calibrated based on a standard installation state, it avoids deviations that might be introduced by data collected before the equipment is fully stable during installation, ensuring the accuracy of the reference attitude data.

[0040] For custom orientations, the system can dynamically calculate the reference attitude data corresponding to the user-inputted installation angle parameter and the preset conversion relationship between angle and sensor data. For example, if the user inputs a 30-degree tilt angle for the device, the system performs trigonometric function conversion on the sensor reference value for a standard horizontal installation based on this angle, generating reference attitude data that matches the 30-degree tilt installation. This allows for calibration of non-standard installation orientations without requiring manual data collection by the user.

[0041] In a specific embodiment, a vertical advertising display with an inverted screen is taken as an example. The display device is installed on a vertical bracket in an inverted position, meaning the screen's upward direction is opposite to the conventional direction. After the device is powered on, the system automatically pops up an installation direction selection interface, displaying five options: horizontal upright, vertical upright, horizontal inverted, vertical inverted, and custom direction. The installer selects the vertical inverted option via the touchscreen and confirms, based on the actual installation method. After detecting this selection, the system acquires the posture data matching the vertical inverted direction and determines this posture data as the baseline posture data. Subsequently, the system uses this baseline posture data as the standard to determine the horizontal or vertical screen orientation. Even when the device is in an inverted state, it can accurately identify the screen orientation, avoiding problems such as orientation reversal or identification errors due to inconsistencies between the factory default baseline and the actual inverted posture.

[0042] The technical solution of this application embodiment displays an installation direction selection interface for users to specify the actual installation direction, and obtains matching attitude data as a reference based on the user's selection. This enables the system to adapt to non-standard installation methods such as inverted and oblique installation. It can accurately complete the calibration after the user clearly specifies the installation direction without relying on automatic data collection, thereby improving the flexibility and applicability of the reference attitude data determination.

[0043] Based on the above technical solution, as an example, after determining the reference posture data, the current posture data of the display device can be collected; the difference between the current posture data and the reference posture data can be determined as the target posture data of the display device; and the physical screen orientation of the display device can be determined based on the target posture data of the display device.

[0044] The current attitude data of the display device can be continuously or periodically collected using a triaxial gravity sensor. This current attitude data reflects the real-time physical state of the display device during operation, including the acceleration values ​​of the device in each axis. The collection frequency can be set according to actual needs, such as collecting data every preset time interval, or triggering collection when a change in sensor data is detected.

[0045] The currently acquired attitude data is compared axis by axis with the determined reference attitude data, and the difference between the two along each axis is calculated. This difference is then used as the target attitude data. The target attitude data represents the offset of the display device's current attitude relative to the reference attitude data. By calculating the difference, the influence of the initial attitude at the calibration time is eliminated, allowing subsequent screen orientation determination to focus only on the attitude change relative to the reference, rather than the absolute value of the sensor.

[0046] Based on the attitude offset information represented by the target attitude data, it can be determined whether the display device is currently in landscape or portrait mode. Specific determination methods may include comparing the target attitude data with a preset orientation threshold and determining the physical screen orientation based on the comparison result. For example, when the offset along a specific axis in the target attitude data meets the landscape condition, the physical screen orientation is determined to be landscape; when the offset meets the portrait condition, the physical screen orientation is determined to be portrait.

[0047] In a specific embodiment, a smart TV installed in a vertical, upright orientation is taken as an example. During the installation and calibration phase, the system saves the attitude data collected at the calibration time as reference attitude data, where the X-axis reference value is X0, the Y-axis reference value is Y0, and the Z-axis reference value is Z0. During normal TV operation, the system collects the current attitude data from the three-axis gravity sensor every 100 milliseconds to obtain the current X-axis value X, Y-axis value Y, and Z-axis value Z. The system then calculates Xc=X... X0, Yc=Y Y0, Zc=Z Z0, obtain the target attitude data (Xc, Yc, Zc).

[0048] The technical solution of this application embodiment obtains the target posture data by subtracting the current posture data from the reference posture data, thereby eliminating the influence of the initial installation posture at the calibration time. This makes the screen orientation judgment depend only on the change in the device's posture relative to the calibration reference, and can accurately identify the horizontal and vertical screen orientations under different installation methods and angles, thus improving the versatility and accuracy of orientation judgment.

[0049] Based on the above technical solution, as an example, Figure 2 This is a three-axis schematic diagram provided in one embodiment of this application, as shown below. Figure 2 As shown, the attitude data (including current attitude data, reference attitude data, etc.) includes orientation data along three axes: fixed axes and non-fixed axes. Fixed axes are perpendicular to the plane of the display device's screen, such as the Z-axis. Since the plane of the screen remains essentially unchanged after installation, the data along the fixed axes stabilizes after installation and does not participate in determining the screen's orientation. Non-fixed axes refer to the other two axes besides the fixed axis, whose directions are parallel to the screen's plane. When the display device switches between landscape and portrait modes, the data along the non-fixed axes changes with the screen rotation and is the primary basis for determining the orientation. Therefore, physical screen orientation recognition can be completed using only the non-fixed axis data, while the fixed axis data is retained for subsequent stability verification, achieving a reasonable allocation of computing resources.

[0050] Based on the installation orientation, the reference orientation data for the fixed axis and the reference orientation data for the non-fixed axis can be determined from the reference attitude data; the orientation data of the display device currently on the non-fixed axis can be collected; the difference between the orientation data of the display device currently on the non-fixed axis and the reference orientation data of the non-fixed axis can be determined as the target orientation data of the display device; and the physical screen orientation of the display device can be determined based on the target orientation data.

[0051] Based on the installation orientation specified by the user during the calibration phase, the system can distinguish the reference orientation data corresponding to fixed and non-fixed axes from the reference attitude data. The specific orientation of the fixed axis may differ under different installation methods. The system can determine which axis is the fixed axis and which two axes are non-fixed axes under the current installation orientation based on the preset correspondence between the installation orientation and the axial division of labor, and extract the reference orientation data of each axis from the reference attitude data.

[0052] Because the fixed axis does not participate in determining the screen's orientation (landscape or portrait), only the current sensor data along the two non-fixed axis directions needs to be collected during operation, eliminating the need to simultaneously collect data from the fixed axis for physical screen orientation identification. The target orientation data is obtained by subtracting the currently collected non-fixed axis direction data from the reference non-fixed axis direction data determined during calibration, axis by axis. The target orientation data reflects the display device's attitude offset relative to the calibration reference within the screen's plane, eliminating the influence of the initial attitude at installation. Based on the offsets of the two non-fixed axes in the target orientation data, it is determined whether the display device is currently in landscape or portrait mode.

[0053] In a specific embodiment, a smart TV wall-mounted in a horizontal orientation is taken as an example. The TV's built-in three-axis gravity sensor defines three directions: X-axis, Y-axis, and Z-axis. The Z-axis is perpendicular to the plane of the screen, the X-axis is parallel to the left-right direction of the screen, and the Y-axis is parallel to the up-down direction of the screen. In the horizontal orientation, the Z-axis is a fixed axis, while the X and Y axes are non-fixed axes. During the installation and calibration phase, the user selects the horizontal orientation option through the installation orientation selection interface. The system acquires the reference posture data (X0, Y0, Z0) matching the installation orientation and, based on the axial division of labor in the horizontal orientation, determines that the Z-axis is the fixed axis, with its reference direction data being Z0; the X and Y axes are non-fixed axes, with their reference direction data being X0 and Y0, respectively.

[0054] During normal television operation, only the current orientation data of the non-fixed axes, i.e., the current X-axis value X and the current Y-axis value Y, need to be collected, without simultaneously collecting Z-axis data for orientation recognition. The system calculates Xc=X... X0 and Yc=Y Y0 is used to obtain the target orientation data (Xc, Yc). Then, the physical screen orientation is determined based on Xc and Yc. For example, when Xc = 90°, the physical screen has been rotated by 90°, so the physical screen orientation has changed. If the initial physical screen orientation is landscape, then the physical screen orientation is portrait.

[0055] By adopting the technical solution of the embodiments of this application, the three-axis data is divided into fixed axes and non-fixed axes, and only the non-fixed axis data is used for direction determination. This reduces the number of axes involved in the calculation, lowers the processor's computational load, and improves the switching response speed. At the same time, the fixed axis data is retained for attitude stability verification, thus realizing the functional division of axial data utilization.

[0056] Based on the above technical solution, as an embodiment, determining the physical screen orientation of the display device based on the target orientation data may include: obtaining a preset angle threshold; and determining whether the physical screen orientation of the display device is a landscape orientation or a portrait orientation based on the comparison result between the target orientation data and the preset angle threshold.

[0057] The preset angle threshold refers to the angle judgment boundary pre-configured by the system to distinguish between landscape and portrait modes. It can be flexibly adjusted according to different device models and application scenarios. The preset angle threshold can be stored in the system configuration file and loaded when the system starts up or enters the orientation judgment process. The setting of the angle threshold can take into account factors such as sensor accuracy, installation deviation tolerance, and actual usage requirements to ensure that orientation judgment is both sensitive and not prone to false triggering.

[0058] The target orientation data is compared with a preset angle threshold, and the current physical screen orientation of the display device is determined based on the comparison result. Specifically, the tilt angle of the display device relative to the calibration reference is calculated based on the target orientation data, and this tilt angle is compared with the preset angle threshold to determine whether the physical screen orientation of the display device has changed. Here, the tilt angle refers to the rotation angle of the display device relative to the calibration reference in the plane where the screen is located, calculated based on the target orientation data.

[0059] When the tilt angle exceeds a preset angle threshold, the system determines that the device has rotated sufficiently to switch directions and sets the physical screen orientation to correspond to the rotated state. When the tilt angle does not exceed the preset angle threshold, the system determines that the device is still within the normal offset range of the current orientation and maintains the original physical screen orientation. Through this threshold comparison mechanism, the system only performs a switch when the device undergoes a clear change in orientation, avoiding frequent erroneous switches caused by slight shaking or sensor fluctuations.

[0060] In a specific embodiment, taking a smart TV wall-mounted in a horizontal orientation as an example, the preset angle threshold is set to 45 degrees. In the aforementioned embodiment, the system has already determined the target direction data (Xc, Yc), where Xc and Yc are the differences between the current data and the reference data in the non-fixed axis direction, respectively. Based on Xc and Yc, the system calculates the tilt angle θ of the display device relative to the calibration reference using the arctangent function: θ = arctan(|Xc| / |Yc|). When the TV is in horizontal orientation, the device does not rotate significantly, and the tilt angle θ is close to 0 degrees, less than the preset angle threshold of 45 degrees; therefore, the system determines that the physical screen orientation remains horizontal. When the user rotates the TV to portrait orientation, the device rotates approximately 90 degrees, and the tilt angle θ is close to 90 degrees, greater than the preset angle threshold of 45 degrees; therefore, the system determines that the physical screen orientation has switched to portrait orientation. When the TV shifts slightly due to minor vibration or loose mounting bracket, with a tilt angle θ of only about 10 degrees, the system does not perform orientation switching because this angle is less than the preset angle threshold of 45 degrees. It maintains the current screen orientation, thus effectively filtering out unintentional slight shifts and avoiding frequent screen orientation changes.

[0061] By adopting the technical solution of this application embodiment, a preset angle threshold is obtained and compared with the target direction data. The direction switch is only performed when the tilt angle exceeds the threshold. This effectively filters out unintentional offsets caused by slight vibrations, slight installation tilts, or sensor fluctuations, avoids frequent erroneous switching between portrait and landscape screen orientations, and improves the user experience and device operation stability.

[0062] Based on the above technical solution, as an embodiment, determining the physical screen orientation of a display device based on target orientation data may include: acquiring the current orientation data of the display device on a fixed axis; obtaining the stable orientation range of the fixed axis; acquiring the target difference between the current orientation data of the display device on the fixed axis and the reference orientation data of the fixed axis; and determining the physical screen orientation of the display device based on the target orientation data when the target difference is within the stable orientation range.

[0063] Before using the target direction data of the non-fixed axis for orientation determination, current data in the fixed axis direction can be collected from the triaxial gravity sensor. Since the fixed axis is perpendicular to the plane of the screen, the data in this axis direction should remain stable after installation. Therefore, the current data of the fixed axis can be used as a basis for measuring whether the device's installation posture is normal.

[0064] The system can obtain a pre-configured stable direction range for the fixed axis. The stable direction range refers to the allowable offset range of the fixed axis data; within this range, the equipment's installation posture is considered normal. The stable direction range defines the maximum allowable offset of the fixed axis data relative to a reference value. Within this range, the equipment's installation posture is normal; exceeding this range indicates potential abnormalities such as installation tilt, loose brackets, or external impact. The stable direction range can be preset at the factory based on product characteristics or adjusted by the user according to the actual installation environment.

[0065] The currently acquired fixed-axis orientation data is compared with the fixed-axis reference orientation data determined during calibration, and the difference between the two is calculated to obtain the target difference. The target difference reflects the degree of deviation of the current attitude relative to the calibration reference in the fixed-axis direction.

[0066] The target difference is compared with a stable direction range. If the target difference falls within the stable direction range, the current installation posture of the device is considered normal, and the physical screen orientation can then be determined based on the non-fixed axis target orientation data. If the target difference is not within the stable direction range, orientation determination is not performed to prevent incorrect orientation recognition results when the installation posture is abnormal.

[0067] In one embodiment, when the target difference is not in the stable direction range, the screen orientation switching function of the display device is disabled to maintain the current screen orientation of the display device.

[0068] When the target difference of the fixed axis exceeds the stable direction range, the screen orientation switching function can be disabled, actively shutting down or pausing the automatic screen orientation switching process. It temporarily stops responding to changes in sensor data to trigger the landscape / portrait orientation switching operation. Even if the target orientation data of the non-fixed axis meets the conditions for orientation switching, the system will not perform screen rotation. The system will lock the display device's screen orientation in the state before the disablement, without making any orientation changes. The screen's display content, interface layout, and rendering coordinate system remain unchanged to avoid unexpected screen flipping or layout errors due to abnormal orientation judgment.

[0069] Figure 3 This is a schematic flowchart illustrating the physical screen orientation determination process according to an embodiment of this application; see reference. Figure 3 After the display device is powered on, it enters the initialization phase. The system starts the sensor data acquisition module to complete the initialization configuration of the triaxial gravity sensor, enabling the sensor to enter normal working condition and output acceleration data of the X, Y, and Z axes in real time. After initialization, it enters the user-specified installation orientation phase. The system provides an installation orientation selection interface, displaying options such as landscape upright, portrait upright, landscape inverted, portrait inverted, and custom orientation. The user selects the corresponding option according to the actual installation method of the display device and confirms. The system determines the installation orientation based on the user's selection, providing a basis for subsequent calibration.

[0070] In response to the user's confirmation of the specified installation orientation, the system collects the X, Y, and Z-axis acceleration data output by the triaxial gravity sensor at the current moment and saves this data as reference attitude data. This reference attitude data reflects the baseline attitude of the display device after installation. All subsequent attitude calculations and orientation determinations are based on this reference attitude data, rather than the sensor's factory default values.

[0071] After the baseline attitude data is saved, the system enters the continuous data acquisition and offset calculation phase. The system periodically acquires the current triaxial data output by the triaxial gravity sensor and subtracts the current data from the baseline attitude data axis by axis to calculate the calibrated offset. By calculating the difference, the influence of the initial attitude at the time of installation is eliminated, allowing subsequent judgments to focus only on the attitude change relative to the calibration reference.

[0072] After the offset calculation is completed, the system enters the fixed reference axis interval verification stage. This stage determines whether the target difference between the current direction data of the display device on the fixed axis and the reference direction data of the fixed axis is within the stable direction interval. The system determines the fixed axis (the axis perpendicular to the plane of the screen) based on the installation direction, obtains the target difference between the current fixed axis direction data and the reference direction data, and determines whether this target difference is within the preset stable direction interval. If the target difference is within the stable direction interval, it indicates that the installation posture of the display device is normal, and the subsequent screen orientation determination process is allowed. If the target difference exceeds the stable direction interval, it indicates that the device may have abnormal conditions such as installation tilt, loose bracket, or external impact. The system disables the screen orientation switching function, maintaining the current screen orientation to prevent erroneous switching in case of abnormal posture.

[0073] After verification along a fixed reference axis, the system proceeds to the dual-axis attitude calculation and screen orientation determination stage. The system uses only calibrated offset data from two non-fixed axes (axes parallel to the screen plane) for attitude calculation. Based on the numerical relationship between the offsets of the two non-fixed axes or the comparison of the tilt angle with a preset angle threshold, the system determines whether the display device is currently in landscape or portrait mode. Once determined, the system drives the display module to perform corresponding screen rotation, interface adaptation, and window redrawing operations, completing the adaptive switching between landscape and portrait modes.

[0074] The fixed reference axis interval verification stage, as a crucial verification step before orientation determination, effectively filters out erroneous identifications when the installation posture is abnormal. The dual-axis posture calculation and screen orientation determination stage reduces computational complexity and improves response speed by using only non-fixed axis data for orientation identification. The overall process logic is clear, and the stages are closely connected, ensuring that the display device can achieve accurate and stable adaptive detection and switching between portrait and landscape orientations under different installation methods and usage environments.

[0075] In a specific embodiment, a smart TV wall-mounted in a horizontal, upright mounting configuration is taken as an example. In this horizontal, upright mounting configuration, the Z-axis is a fixed axis, its reference direction data is Z0, and the stable direction range is set to […]. [0.1g, +0.1g], where g is the acceleration due to gravity. Before performing direction determination, the system first collects the current Z-axis direction data Z and calculates the target difference Zc = Z. Z0. When the TV is securely installed and in normal condition, the Z-axis data is basically stable, with the target difference Zc being approximately 0.02g, falling within the stable direction range. Within the range of [0.1g, +0.1g], the system determines the installation posture is normal and allows entry into the physical screen orientation determination process based on non-fixed axis target direction data. When the wall mount bracket becomes loose due to long-term use, causing the TV to tilt slightly forward, the Z-axis direction data changes, and the target difference Zc increases to 0.18g, exceeding the upper limit of the stable orientation range of +0.1g. The system determines the current installation posture is abnormal, immediately disables the screen orientation switching function, and locks the screen orientation in the current landscape orientation. Even if the non-fixed axis data changes due to tilting at this time, the system will not trigger landscape / portrait switching, and the screen image will always remain in landscape display mode. When the installer re-fixes the bracket and the TV returns to its normal installation posture, the Z-axis target difference falls back to the stable orientation range, and the system can automatically restore the screen orientation switching function.

[0076] By adopting the technical solution of this application embodiment, a verification step of fixed axis target difference and stable direction interval is added before direction judgment. The horizontal and vertical screen direction judgment is only performed when the installation posture is normal. This effectively filters out erroneous identification due to abnormal conditions such as bracket loosening, equipment tilting or external impact, prevents frequent screen direction jumps, and significantly improves the reliability of direction detection and user experience.

[0077] Based on the above technical solution, as an example, the stable direction range can be configured according to one or more of the following: the model and size of the display device; the installation method of the display device; and the application scenario of the display device.

[0078] Different display models use triaxial gravity sensors that vary in accuracy, sensitivity, and noise levels. Furthermore, display devices of different sizes also exhibit varying mechanical stability under the same installation conditions. Generally, larger display devices, due to their greater weight and larger center-of-gravity offset after installation, have a correspondingly larger normal fluctuation range for fixed-axis data, requiring a relatively lenient stable direction range. Smaller display devices, with their compact structure and more stable posture after installation, have a smaller normal fluctuation range for fixed-axis data, allowing for a more stringent stable direction range setting. By pre-setting the range parameters corresponding to different models and sizes, the appropriate stable direction range can be automatically loaded during the factory manufacturing process or upon initial device startup.

[0079] Installation method refers to the physical fixation method of the display device, such as wall mounting, stand mounting, or ceiling mounting. Different installation methods provide varying degrees of stability. For example, wall mounting secures the device to the wall with bolts, offering high stability and minimal fluctuations in the fixed axis data. Stand mounting, on the other hand, only supports the device with a base, resulting in relatively lower stability, and the fixed axis data may fluctuate significantly due to slight touches or table vibrations. Ceiling mounting, affected by the cantilever structure, may cause slight swaying of the device. The system configures different stability direction ranges based on the stability characteristics of different installation methods, ensuring that the verification logic matches the actual installation conditions.

[0080] Application scenario refers to the type of environment in which the display device is used, such as home, commercial or industrial scenarios.

[0081] Different application scenarios have different environmental vibration levels and stability requirements. For example, the environment of a home living room is relatively stable with less environmental vibration, so the stable direction range can be set more strictly to improve the sensitivity of direction judgment. In commercial environments such as shopping malls or exhibition halls, there is frequent flow of people and greater environmental vibration, so the stable direction range needs to be set more leniently to avoid frequent false shielding. In industrial workshops or vehicle environments, the vibration is more intense, so the stable direction range needs to be further widened to ensure the normal use of the direction switching function.

[0082] In one specific embodiment, the system has a built-in configuration strategy table for stable orientation intervals. This configuration strategy table includes stable orientation intervals corresponding to combinations of different display models, sizes, installation methods, and / or application scenarios. For example, when the display device is a 65-inch home television and is wall-mounted in a family living room, the system loads the configuration corresponding to "large size—wall-mounted—home," and the stable orientation interval is set to [ [0.08g, +0.08g], a narrow range to ensure high judgment sensitivity. When the same 65-inch TV is installed on a stand in a shopping mall display area, the system loads the configuration corresponding to "Large Size - Stand - Commercial", and the stable direction range is set to [ [0.15g, +0.15g], the range is appropriately widened to accommodate conditions with lower base installation stability and greater vibration in commercial environments. When the display device is a 32-inch small advertising machine and is suspended in an industrial workshop, the system loads the configuration corresponding to "small size - suspended - industrial", and the stability direction range is set to [ The range [0.2g, +0.2g] is further widened to accommodate the combined effects of hoisting sway and workshop vibration. Users or maintenance personnel can also manually adjust the upper and lower limits of the stable direction range through the system settings interface to meet the personalized needs of special installation environments. Through the above multi-dimensional configuration methods, the stable direction range can be flexibly adapted to different equipment conditions and usage environments, avoiding the problems of overly sensitive or overly sluggish verification caused by using a single fixed range.

[0083] By adopting the technical solution of this application embodiment, the stable direction range is configured according to one or more of the following: model and size, installation method, and application scenario. This allows the stable direction range to adapt to different equipment conditions and usage environments, avoiding the problem of overly sensitive or overly sluggish verification caused by using a single fixed range. This improves the accuracy and applicability of the fixed axis verification mechanism.

[0084] In one embodiment, the reference attitude determination method can be applied to, for example... Figure 4 The reference attitude determination system is shown. Figure 4 As shown, the reference attitude determination system may include a sensor data acquisition module, an installation direction calibration module, a fixed axis verification module, a dual-axis attitude calculation module, a parameter configuration module, and a display control execution module. The sensor data acquisition module is responsible for real-time acquisition of X-axis, Y-axis, and Z-axis acceleration data output from a triaxial gravity sensor, providing raw data input for subsequent modules. The installation direction calibration module receives sensor data, acquires and saves reference attitude data according to the user-specified installation direction or a confirmation operation upon installation completion, completing the calibration process. The fixed axis verification module calculates the target difference in the fixed axis direction based on the calibrated data and compares it with the stable direction range to determine if the installation attitude is normal, disabling the direction switching function when the attitude is abnormal. The dual-axis attitude calculation module uses the target direction data of the non-fixed axes to perform attitude calculations, determining whether the display device is currently in landscape or portrait mode. The parameter configuration module provides configuration interfaces for parameters such as stable direction range and angle thresholds, supporting flexible adjustments based on device size, installation method, and application scenario. The display control execution module drives the system to perform operations such as screen rotation, interface adaptation, and window redrawing based on the attitude recognition results, completing the landscape / portrait display switching. The modules described above have clear division of labor and are connected sequentially, together realizing a complete processing link from data acquisition to display switching.

[0085] Figure 5 This is a flowchart illustrating a reference attitude determination method provided in an embodiment of this application; see reference. Figure 5 The determination of the reference attitude can include the following stages: user-specified installation direction and automatic calibration, attitude legality verification, dual-axis horizontal and vertical screen recognition and display direction execution. In addition, a parameter configurable stage can provide range parameter support for attitude legality verification.

[0086] During the user-specified installation orientation and automatic calibration phase, the system displays installation orientation options such as landscape upright, portrait upright, landscape inverted, portrait inverted, and custom orientation through the user interface. The user selects the corresponding option based on the actual installation method of the display device and confirms. After user confirmation, the system immediately samples the acceleration data output by the current three-axis gravity sensor and saves it as reference attitude data (X0, Y0, Z0). All subsequent attitude calculations are based on this set of reference attitude data, rather than the sensor's factory default values.

[0087] After calibration, the system enters the attitude validity verification phase. The system calculates the target difference Zc=Z after calibration along the fixed axis (Z-axis). The system calculates Z0 and determines whether Zc is within a preset stable orientation range. If Zc is within the stable orientation range, it indicates that the display device is installed correctly, allowing the system to proceed to the subsequent dual-axis landscape / portrait screen recognition stage. If Zc exceeds the stable orientation range, it indicates that the device may have an installation error or be subject to severe shaking. In this case, the system disables the screen orientation switching function and maintains the current screen display orientation. The upper and lower limits of the stable orientation range are provided by a configurable parameter section, allowing for flexible configuration based on the display device's model, size, installation method, and application scenario. This ensures that the verification threshold can adapt to different device conditions and usage environments.

[0088] After passing the posture validity verification, the system enters the dual-axis landscape / portrait screen recognition stage. This stage only uses the offset Xc=X after non-fixed axis calibration. X0 and Yc=Y The tilt angle is calculated using Y0, and the result is compared with a preset threshold to determine whether the display device is currently in landscape or portrait mode. Because orientation recognition is performed using only data from two non-fixed axes, the computational complexity is significantly reduced compared to a three-axis full-scale calculation method.

[0089] After orientation recognition is complete, the system enters the display orientation execution phase. Based on the determination results from the dual-axis landscape / portrait recognition phase, the system drives the display module to perform corresponding operations, including screen rotation, window layout adjustment, and interface redrawing, to complete the adaptive switching between landscape and portrait orientations.

[0090] The technical solution adopted in this application simplifies the calculation by using only two non-fixed axes, effectively reducing CPU load and improving screen switching response speed. The algorithm has excellent anti-interference capabilities, filtering abnormal posture data by relying on fixed axis intervals, which can avoid erroneous switching caused by slight tilting of the device during installation or vibration during operation. It also supports user-defined installation modes, allowing users to freely set any device installation direction and complete one-click calibration, perfectly adapting to various deployment scenarios such as inverted, angled, and vertical advertising machines. After calibration, the actual installation posture of the device is used as the judgment benchmark, fundamentally solving the problems of inverted recognition direction and recognition errors. The overall adaptability is wide, and the relevant judgment intervals and thresholds can be flexibly configured, making it compatible with TVs and commercial display devices of different sizes and installation forms. No additional hardware investment is required; the device's built-in three-axis gravity sensor is directly reused, and all functions are achieved through pure algorithm optimization, resulting in zero hardware cost. The operation stability is excellent, performing screen switching operations only when a legal posture is detected, greatly optimizing the user experience and simultaneously improving the overall reliability of the machine.

[0091] To facilitate better implementation of the reference attitude determination method of this application, this application also provides a reference attitude determination device based on the above-described reference attitude determination method. The meanings of the terms used are the same as in the above-described reference attitude determination method, and specific implementation details can be found in the descriptions of the method embodiments.

[0092] Please see Figure 6 , Figure 6 This is a schematic diagram of the reference attitude determination device provided in an embodiment of this application, wherein the reference attitude determination device includes: The reference determination module 601 is used to determine the reference attitude data of the display device in response to the calibration trigger operation; The calibration triggering operation includes a confirmation operation for the completion of the installation of the display device, and a user's selection operation for the installation direction option on the installation direction selection interface. The reference attitude data is used to determine the physical screen orientation of the display device.

[0093] In one embodiment, the benchmark determination module 601 is specifically configured to perform: A confirmation operation is performed to detect whether the display device has been installed successfully; When the confirmation operation is detected, the attitude data of the display device is collected; The attitude data is determined as the reference attitude data of the display device.

[0094] In one embodiment, the benchmark determination module 601 is specifically configured to perform: The installation direction selection interface is displayed; the installation direction selection interface includes at least one installation direction option. When a user selects any of the installation direction options, the attitude data matching the installation direction selected by the user is obtained; The attitude data is determined as the reference attitude data of the display device.

[0095] In one embodiment, the installation orientation includes one or more of the following: landscape orientation, portrait orientation, landscape inverted orientation, portrait inverted orientation, and custom orientation.

[0096] In one embodiment, the device further includes: The data acquisition module is used to acquire the current attitude data of the display device; The target posture determination module is used to determine the difference between the current posture data and the reference posture data as the target posture data of the display device; An orientation determination module is used to determine the physical screen orientation of the display device based on the target posture data of the display device.

[0097] In one embodiment, the attitude data includes orientation data along three axes, including a fixed axis and a non-fixed axis; the fixed axis is an axis perpendicular to the plane of the display device's screen; the device further includes: A fixed axis determination module is used to determine the reference direction data of the fixed axis and the reference direction data of the non-fixed axis from the reference attitude data according to the installation direction. A non-fixed data acquisition module is used to acquire the current orientation data of the display device on a non-fixed axis; The target direction determination module is used to determine the difference between the current direction data of the display device on a non-fixed axis and the reference direction data of the non-fixed axis as the target direction data of the display device. The screen orientation determination module is used to determine the physical screen orientation of the display device based on the target orientation data.

[0098] In one embodiment, determining the physical screen orientation of the display device based on the target orientation data includes: Obtain the preset angle threshold; Based on the comparison results between the target direction data and the preset angle threshold, the physical screen orientation of the display device is determined to be either landscape or portrait.

[0099] In one embodiment, determining the physical screen orientation of the display device based on the target orientation data includes: Collect the current orientation data of the display device on the fixed axis; Obtain the stable direction range of the fixed axis; Obtain the target difference between the current orientation data of the display device on the fixed axis and the reference orientation data of the fixed axis; When the target difference is within the stable direction range, the physical screen orientation of the display device is determined based on the target direction data.

[0100] In one embodiment, the device further includes: The shielding module is used to shield the screen orientation switching function of the display device when the target difference is not in the stable direction range, so as to maintain the current screen orientation of the display device.

[0101] In one embodiment, the stable direction interval is configured according to one or more of the following: The model and size of the display device; The installation method of the display device; And the application scenarios of the display device.

[0102] The technical solution of this application determines the reference posture data of the display device in response to the calibration trigger operation, replacing the factory-determined and unadjustable reference posture. This allows the reference posture data to be dynamically determined according to the actual installation of the display device. It provides two calibration trigger operations: a confirmation operation upon completion of display device installation and a user selection operation for the installation direction on the installation direction selection interface. The former automatically triggers calibration upon installation completion, while the latter allows the user to complete calibration by selecting the installation direction, adapting to different scenarios and improving the flexibility of reference posture data determination. Determining the physical screen orientation of the display device based on the calibrated reference posture data ensures that the physical screen orientation judgment matches the actual installation posture, solving the problem of inaccurate horizontal and vertical screen orientation caused by factory-fixed reference judgment.

[0103] Specific limitations regarding the reference attitude determination device can be found in the limitations of the reference attitude determination method above, and will not be repeated here. Each module in the aforementioned reference attitude determination device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0104] In addition, this application also provides an electronic device, such as Figure 7 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 701 with one or more processing cores and a memory 702 with one or more computer-readable storage media. Those skilled in the art will understand that... Figure 7 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 701 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 702, and by calling data stored in the memory 702, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 701 may include one or more processing cores; preferably, the processor 701 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 701.

[0105] The memory 702 can be used to store software programs and modules. The processor 701 executes various functional applications and data processing by running the software programs and modules stored in the memory 702. The memory 702 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 702 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 702 may also include a memory controller to provide the processor 701 with access to the memory 702.

[0106] In one embodiment, the electronic device further includes a power supply 703 that supplies power to the various components. Preferably, the power supply 703 can be logically connected to the processor 701 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 703 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.

[0107] In one embodiment, the electronic device may further include an input unit 704, 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.

[0108] 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 701 in the electronic device loads the executable files corresponding to the processes of one or more application programs into the memory 702 according to the following instructions, and the processor 701 runs the application programs stored in the memory 702, thereby implementing the steps in any of the reference attitude determination methods provided in the embodiments of this application.

[0109] Those skilled in the art will understand that Figure 7 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.

[0110] 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.

[0111] 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.

[0112] 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.

[0113] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0114] 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.

[0115] To this end, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps in any of the reference attitude determination methods provided in this application.

[0116] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0117] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0118] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the reference attitude determination methods provided in this application, the beneficial effects that any of the reference attitude determination methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0119] 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.

[0120] The foregoing has provided a detailed description of a reference attitude determination 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 descriptions of the above embodiments are 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, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for determining a reference attitude, characterized in that, include: In response to a calibration trigger operation, the reference attitude data of the display device is determined; The calibration triggering operation includes a confirmation operation for the completion of the installation of the display device, and a user's selection operation for the installation direction option on the installation direction selection interface. The reference attitude data is used to determine the physical screen orientation of the display device.

2. The method according to claim 1, characterized in that, The step of determining the reference attitude data of the display device in response to the calibration trigger operation includes: A confirmation operation is performed to detect whether the display device has been installed successfully; When the confirmation operation is detected, the attitude data of the display device is collected; The attitude data is determined as the reference attitude data of the display device.

3. The method according to claim 1, characterized in that, The step of determining the reference attitude data of the display device in response to the calibration trigger operation includes: The installation direction selection interface is displayed; the installation direction selection interface includes at least one installation direction option. When a user selects any of the installation direction options, the attitude data matching the installation direction selected by the user is obtained; The attitude data is determined as the reference attitude data of the display device.

4. The method according to claim 1 or 3, characterized in that, The installation orientation includes one or more of the following: landscape orientation, portrait orientation, landscape inverted orientation, portrait inverted orientation, and custom orientation.

5. The method according to claim 1, characterized in that, The method further includes: Collect the current attitude data of the display device; The difference between the current posture data and the reference posture data is determined as the target posture data of the display device; Based on the target posture data of the display device, the physical screen orientation of the display device is determined.

6. The method according to claim 1, characterized in that, The attitude data includes orientation data along three axes, namely a fixed axis and a non-fixed axis; the fixed axis is an axis perpendicular to the plane of the display device's screen; the method further includes: Based on the installation direction, determine the reference orientation data for the fixed axis and the reference orientation data for the non-fixed axis from the reference attitude data; Collect the current orientation data of the display device on a non-fixed axis; The difference between the current orientation data of the display device on a non-fixed axis and the reference orientation data of the non-fixed axis is determined as the target orientation data of the display device. Based on the target orientation data, the physical screen orientation of the display device is determined.

7. The method according to claim 6, characterized in that, Determining the physical screen orientation of the display device based on the target orientation data includes: Obtain the preset angle threshold; Based on the comparison results between the target direction data and the preset angle threshold, the physical screen orientation of the display device is determined to be either landscape or portrait.

8. The method according to claim 6, characterized in that, Determining the physical screen orientation of the display device based on the target orientation data includes: Collect the current orientation data of the display device on the fixed axis; Obtain the stable direction range of the fixed axis; Obtain the target difference between the current orientation data of the display device on the fixed axis and the reference orientation data of the fixed axis; When the target difference is within the stable direction range, the physical screen orientation of the display device is determined based on the target direction data.

9. The method according to claim 8, characterized in that, The method further includes: When the target difference is not within the stable direction range, the screen orientation switching function of the display device is disabled, and the current screen orientation of the display device is maintained.

10. The method according to claim 8 or 9, characterized in that, The stable direction interval is configured according to one or more of the following: The model and size of the display device; The installation method of the display device; And the application scenarios of the display device.

11. A reference attitude determination device, characterized in that, include: The reference determination module is used to determine the reference attitude data of the display device in response to the calibration trigger operation; The calibration triggering operation includes a confirmation operation for the completion of the installation of the display device, and a user's selection operation for the installation direction option on the installation direction selection interface. The reference attitude data is used to determine the physical screen orientation of the display device.

12. 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 in the reference attitude determination method as described in any one of claims 1 to 10.

13. 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 reference attitude determination method as described in any one of claims 1 to 10.