Folding screen angle determination method and device, terminal equipment and storage medium

By determining the average angular velocity drift of the attitude sensor in the folding screen terminal device, and accurately calculating the angle of the folding screen in a folding screen, the problem of angle inaccurate caused by data drift is solved and the user experience is improved.

CN119496850APending Publication Date: 2025-02-21ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311048415.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-17
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In existing folding screen terminal devices, the attitude sensor data is easily drifted by changes in ambient temperature, resulting in inaccurate folding angles and affecting user experience.

Method used

When the terminal device is in a stationary state and the folding screen is in a closed state, the average angular velocity drift of each attitude sensor is determined; when the folding screen is detected to be open, the current angular velocity and initial angle collected by the attitude sensor are obtained, and the current folding screen is determined based on these data. angle.

Benefits of technology

It effectively eliminates the impact of attitude sensor data drift, accurately determines the angle of the folding screen, improves the user experience, and ensures that the series of functions related to the folding screen can be accurately implemented.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119496850A_ABST
    Figure CN119496850A_ABST
Patent Text Reader

Abstract

The folding screen angle determination method and device, the terminal equipment and the storage medium provided by the embodiment of the invention comprise the following steps: when the terminal equipment is in a static state and the folding screen is in a closed state, determining an average angular velocity drift distance of each attitude sensor of the terminal equipment within a first preset duration; when it is detected that the folding screen is opened, obtaining a first current angular velocity and an initial angle collected by each attitude sensor; and determining the angle of the folding screen at the current moment based on the initial angle and the first current angular velocity and the average angular velocity drift distance corresponding to each attitude sensor. According to the method, the average angular velocity drift distance of each attitude sensor can be obtained when the terminal equipment is in a static and closed state, the average angular velocity drift distance is subtracted when the attitude sensors are used for determining the angle of the folding screen so as to eliminate the influence generated by data drift, the angle of the folding screen is accurately obtained, and the user experience is improved. Therefore, a series of functions related to the folding screen can be accurately realized, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of terminal technology, and in particular, to a method, device, terminal device and storage medium for determining a folding screen angle. Background Art

[0002] Various existing terminal devices with folding functions need to utilize their own foldable characteristics in different usage scenarios, and adapt to various unfolding angle usage scenarios by changing the display effect with dynamic display state, thereby greatly improving the interactivity and usability of the terminal devices.

[0003] Generally speaking, the determination of the folding angle can be achieved by using multiple attitude sensors. However, in actual applications, the attitude sensor data is easily affected by changes in ambient temperature and causes data drift, resulting in inaccurate determination of the folding angle, affecting the user experience. Summary of the invention

[0004] The embodiments of the present invention provide a method, apparatus, terminal device and storage medium for determining the angle of a folding screen, so as to at least eliminate the influence of data drift when applying a posture sensor to determine the folding angle, so that a series of functions related to the folding screen can be accurately implemented, greatly improving the user experience.

[0005] In a first aspect, an embodiment of the present invention provides a method for determining a folding screen angle, wherein the method is applied to a terminal device, the terminal device includes a folding screen, and a posture sensor disposed on each folding surface of the folding screen, the method comprising:

[0006] When the terminal device is in a stationary state and the folding screen is in a closed state, determining an average angular velocity drift of each posture sensor of the terminal device within a first preset time period;

[0007] When the folding screen is detected to be opened, the first current angular velocity collected by each attitude sensor and the initial angle at which the folding screen opening action is recognized are obtained; wherein the initial angle is the critical angle at which the attitude sensor recognizes the folding screen opening action;

[0008] The angle of the folding screen at the current moment is determined based on the initial angle, the first current angular velocity corresponding to each posture sensor, and the average angular velocity drift.

[0009] In a second aspect, an embodiment of the present invention provides a device for determining a folding screen posture, wherein the device includes:

[0010] A first determination module is used to determine the average angular velocity drift of each posture sensor of the terminal device within a first preset time period when the terminal device is in a stationary state and the folding screen is in a closed state;

[0011] An acquisition module, used to acquire the first current angular velocity collected by each attitude sensor and the initial angle at which the folding screen opening action is recognized when the folding screen is detected to be opened; wherein the initial angle is the critical angle at which the attitude sensor recognizes the folding screen opening action;

[0012] The second determination module is used to determine the angle of the folding screen at the current moment based on the initial angle, and the first current angular velocity and average angular velocity drift corresponding to each posture sensor.

[0013] In a third aspect, an embodiment of the present invention provides a terminal device, which includes: a processor and a memory, the processor is used to execute a program for determining the folding screen angle stored in the memory to implement the above-mentioned method for determining the folding screen angle.

[0014] In a fourth aspect, an embodiment of the present invention provides a storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned method for determining the folding screen angle.

[0015] The method, apparatus, terminal device and storage medium for determining the angle of a folding screen provided by an embodiment of the present invention include, when the terminal device is in a stationary state and the folding screen is in a closed state, determining the average angular velocity drift of each attitude sensor of the terminal device within a first preset time period; when the folding screen is detected to be open, obtaining the first current angular velocity collected by each attitude sensor and the initial angle at the moment of identifying the folding screen opening action; determining the angle of the folding screen at the current moment based on the initial angle, and the first current angular velocity and the average angular velocity drift corresponding to each attitude sensor. The embodiment of the present invention can obtain the average angular velocity drift of each attitude sensor when the terminal device is in a stationary and closed state, and when the attitude sensor is used to determine the angle of the folding screen, the average angular velocity drift is subtracted to eliminate the influence of data drift, and the angle of the folding screen is accurately obtained, so that a series of functions related to the folding screen can be accurately implemented, greatly improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flow chart of an embodiment of a method for determining a folding screen angle provided by an embodiment of the present invention;

[0017] Figure 2 A flowchart of another method for determining a folding screen angle provided by an embodiment of the present invention;

[0018] Figure 3 A flow chart of an embodiment of a method for calibrating an initial angle and an average angular velocity drift provided by an embodiment of the present invention;

[0019] Figure 4A flowchart of another method for determining a folding screen angle provided by an embodiment of the present invention;

[0020] Figure 5 A block diagram of an embodiment of a device for determining a folding screen posture provided by an embodiment of the present invention;

[0021] Figure 6 A schematic diagram of the structure of a terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.

[0024] In actual application, the terminal device has different interface presentation modes and interaction modes when the folding screen is folded and unfolded, which brings different user experiences and adapts to the operation needs in different environments. For example, when folded, it is convenient for one-handed holding and operation, and convenient for processing instant messages and online social networking. When unfolded, there is a larger screen space, which can display richer content and is more suitable for two-handed operation or operation with a stylus, providing better effects for scenes such as film, television, games, reading, and painting. To switch the corresponding operation scene according to the state of the folding screen, it is necessary to accurately obtain the specific folding angle of the current folding screen. Therefore, an embodiment of the present invention provides a method for determining the angle of the folding screen, wherein the method is applied to a terminal device, and the terminal device includes a folding screen, and a posture sensor arranged on each folding surface of the folding screen.

[0025] The above-mentioned terminal devices are not limited to electronic devices such as mobile phones, tablets, computers, etc. with folding screens. In order to determine the folding angle of the terminal device, one or more attitude sensors need to be installed on each folding surface, such as gyroscopes, angular velocity sensors and other electronic devices that can measure angular velocity. The specific installation position and number of attitude sensors on the folding surface can be set according to actual needs and are not limited here.

[0026] See also Figure 1 , Figure 1 A flow chart of an embodiment of a method for determining a folding screen angle provided in an embodiment of the present invention. Figure 1 The process shown may include the following steps:

[0027] Step 101, when the terminal device is in a stationary state and the folding screen is in a closed state, determining an average angular velocity drift of each posture sensor of the terminal device within a first preset time period;

[0028] In one embodiment, the process of determining whether the terminal device is in a stationary state and whether the folding screen is in a closed state is as follows: obtaining a terminal device state change value and a folding screen state value; when the terminal device state change value is less than a preset change threshold, the terminal device is in a stationary state; when the folding screen state value is within a preset closed state threshold range, the folding screen is in a closed state.

[0029] The above-mentioned terminal device state change value is collected by one or more sensors such as acceleration sensors, magnetic field sensors, gyroscopes, etc. When the detection value change of the terminal device before and after the above-mentioned sensor is less than the preset change threshold, the terminal device is considered to be in a stationary state. This preset change threshold can be measured in advance when the terminal device is in a stationary state.

[0030] The above-mentioned folding screen status value can be collected by sensors capable of detecting approach and distance signals, such as Hall sensors, infrared proximity sensors, and capacitance change sensors. When the detection value of the folding screen detected by the above-mentioned sensors in real time, that is, the folding screen status value is within the preset closed state threshold range, the folding screen is considered to be in a closed state. This preset closed state threshold range can be determined by pre-measuring the changes in sensor values ​​when the terminal device is closed and opened to obtain a threshold range that just triggers the opening of the folding screen.

[0031] It should be noted that the terminal device obtains the angular velocity drift collected by the attitude sensor to determine the average angular velocity drift when the terminal device is in a stationary state. Therefore, the first preset time length is a period of time in a stationary state, but the "stationary state" can be a preset time length after the current terminal device is detected to be in a stationary state to collect the angular velocity drift, and then determine the average angular velocity drift to calculate the folding angle. The angular velocity drift collected within the preset time length after the terminal device remained in a stationary state last time can also be used as the average angular velocity drift for this folding angle calculation. Among them, the preset time length can be 5 seconds, 6 seconds, and 8 seconds. The specific preset time length can be set according to actual needs and is not limited here.

[0032] The above-mentioned average angular velocity drift is the average value of the angular velocity drift of the posture sensor within a first preset time period when the terminal device is in a stationary state and the folding screen is in a closed state.

[0033] In one implementation, the process of determining the average angular velocity drift of each attitude sensor may be implemented through steps A1 to A2:

[0034] Step A1, obtaining a first real-time angular velocity drift of each attitude sensor within a first preset time period;

[0035] Each attitude sensor collects the first real-time angular velocity drift in real time at each moment of the first preset time according to the preset sampling rate, and each attitude sensor sends all the first real-time angular velocity drift collected within the first preset time to the terminal device.

[0036] Step A2, performing the following processing for each attitude sensor: counting multiple first real-time angular velocity drift amounts to obtain a first data amount, and when the first data amount reaches a preset data threshold, determining an average angular velocity drift amount based on the multiple first real-time angular velocity drift amounts.

[0037] When determining the average angular velocity drift of each attitude sensor, for each attitude sensor, firstly, multiple first real-time angular velocity drifts are counted to obtain a first data amount. It can be understood that the first data amount is the total number of the multiple first real-time angular velocity drifts. Only when the first data amount reaches a preset sampling sample number, that is, a preset data threshold, the multiple first real-time angular velocity drifts are averaged to obtain the average angular velocity drift of the attitude sensor.

[0038] In actual use, if the first real-time angular velocity drift collected within the first preset time period is greater than the preset data threshold, only the first real-time angular velocity drift of the preset data threshold number collected in the last time is selected for average calculation. For example, the first preset time period is 5 seconds, the first real-time angular velocity drift collected per second is 20, and the preset data threshold is 60, then the 60 first real-time angular velocity drifts collected in the last 3 seconds are averaged to obtain the average angular velocity drift.

[0039] Among them, if the preset data threshold is too large, the collection time period will be too long and cannot reflect the latest data drift of the attitude sensor. If the preset data threshold is too small, it will cause the calculated mean to have large jitter. Therefore, the setting of the preset data threshold can be determined based on the actual test results.

[0040] Step 102, when the folding screen is detected to be opened, obtaining a first current angular velocity collected by each posture sensor and an initial angle at the time of identifying the folding screen opening action;

[0041] The folding screen being open indicates that the folding screen of the terminal device is being opened. To determine whether the folding screen is opened, the folding screen status value can be collected by sensors such as Hall sensors, infrared proximity sensors, and capacitance change sensors that can detect approach and distance signals. When the folding screen status value exceeds the preset closed state threshold range, the folding screen is considered to be open.

[0042] The first current angular velocity is a physical quantity used to characterize the speed and direction of rotation of the folding surface of the folding screen when it is opened. When only one attitude sensor is installed on each folding surface of the folding screen, the current angular velocity collected by the attitude sensor on each folding surface is the first current angular velocity corresponding to the folding surface. When multiple attitude sensors are installed on each folding surface of the folding screen, the multiple current angular velocities collected by the multiple attitude sensors on each folding surface are averaged to obtain the first current angular velocity corresponding to the folding surface.

[0043] The initial angle is the critical angle when the posture sensor recognizes the opening action of the folding screen. The critical angle can also be understood as the maximum threshold in the above-mentioned preset closed state threshold range. For example, if the preset closed state threshold range is [0, 0.1], then the critical angle is 0.1.

[0044] Step 103, determining the angle of the folding screen at the current moment based on the initial angle, and the first current angular velocity and the average angular velocity drift corresponding to each posture sensor.

[0045] Usually, the folding screen is folded along the folding edge to form a first folding surface and a second folding surface, that is, the folding screen of the terminal device includes the first folding surface and the second folding surface, the virtual axis where the folding edge is located is a common axis, the first folding surface may include an inner folding surface and an outer folding surface, and the second folding surface may also include an inner folding surface and an outer folding surface. Among them, the inner folding surface refers to the screen located inside when the folding screen is in a folded state, and the outer folding surface is the screen located outside when the folding screen is in a closed state. The angle between the first folding surface and the second folding surface is the angle of the folding screen.

[0046] In this embodiment, the angle of the folding screen at the current moment can be determined by the following formula:

[0047] The angle of the folding screen at the current moment = initial angle + ((the first current angular velocity of the first folding surface - the average angular velocity drift of the first folding surface) - (the first current angular velocity of the second folding surface - the average angular velocity drift of the second folding surface)) * sampling interval time;

[0048] The sampling interval time can be determined by a preset sampling rate at which the attitude sensor collects the angular velocity drift at each moment.

[0049] In specific implementation, when the terminal device is in a stationary state again and the folding screen is in a closed state, the average angular velocity drift of each attitude sensor is re-determined, and the average angular velocity drift of each attitude sensor determined when the terminal device was in a stationary state and the folding screen was in a closed state is updated using the re-determined average angular velocity drift of each attitude sensor. When it is detected that the folding screen is opened, the re-determined average angular velocity drift of each attitude sensor can be used to calculate the angle of the folding screen. This method of determining the angle of the folding screen by subtracting the corresponding average angular velocity drift from the first current angular velocity corresponding to each folding surface can effectively eliminate the influence of data drift, thereby improving the accuracy of the folding screen angle calculation.

[0050] The method for determining the angle of a folding screen provided by an embodiment of the present invention includes, when the terminal device is in a stationary state and the folding screen is in a closed state, determining the average angular velocity drift of each attitude sensor of the terminal device within a first preset time period; when the folding screen is detected to be open, obtaining the first current angular velocity collected by each attitude sensor and the initial angle at the moment of identifying the folding screen opening action; determining the angle of the folding screen at the current moment based on the initial angle, and the first current angular velocity and the average angular velocity drift corresponding to each attitude sensor. The embodiment of the present invention can obtain the average angular velocity drift of each attitude sensor when the terminal device is in a stationary and closed state, and when the attitude sensor is used to determine the angle of the folding screen, the average angular velocity drift is subtracted to eliminate the influence of data drift, and the angle of the folding screen is accurately obtained, so that a series of functions related to the folding screen can be accurately implemented, greatly improving the user experience.

[0051] In actual application, since the attitude sensor is used to determine the folding screen angle by an angle integration method, that is, the angle calculation of the folding screen this time needs to use the calculation result of the angle of the folding screen last time, this method will cause the cumulative error due to the inaccurate angle of the folding screen calculated last time, resulting in a more inaccurate angle of the folding screen calculated this time. To solve the above problem, in one implementation, see Figure 2 , Figure 2 A flowchart of another embodiment of a method for determining a folding screen angle provided in an embodiment of the present invention. Figure 2 The process shown may include the following steps:

[0052] Step 201, when the folding screen is in an open state, detecting in real time whether the terminal device is in a stationary state;

[0053] The open state can be determined by whether the folding screen state value exceeds the preset closed state threshold range. If it is determined that the folding screen state value exceeds the preset closed state threshold range, the folding screen is deemed to be in an open state. The open state can be a state in which the folding screen is being opened or a state in which the folding screen remains open.

[0054] Whether the terminal device is in a stationary state can be detected by determining whether the terminal device state change value is less than a preset change threshold. When the terminal device state change value is less than the preset change threshold, the terminal device is determined to be in a stationary state. When the terminal device state change value is greater than or equal to the preset change threshold, the terminal device is determined to be in a non-stationary state. The non-stationary state refers to a state in which the terminal device is shaking but the folding screen angle does not change, or a state in which the folding screen angle changes and is opened.

[0055] Step 202: When it is detected that the terminal device is in a stationary state, the initial angle and the average angular velocity drift corresponding to each posture sensor are calibrated to obtain a calibration angle and a calibration average angular velocity drift.

[0056] In this embodiment, the above-mentioned technical problems can be eliminated by calibrating the angle of the last folding screen. Specifically, the calibration angle obtained by calibrating the initial angle is used to replace the initial angle to calculate the angle of the folding screen this time. The initial angle here refers to the calculation result of the angle of the folding screen last calculated.

[0057] Since the data drift of the attitude sensor exists in real time, when the terminal device is in a stationary state, it is also necessary to calibrate the average angular velocity drift corresponding to each attitude sensor, that is, to re-determine the calibrated average angular velocity drift corresponding to each attitude sensor, so as to subtract the calibrated average angular velocity drift during the calculation of the angle of the folding screen to eliminate the influence of data drift and accurately obtain the angle of the folding screen.

[0058] In one embodiment, the above step 202 can be performed by Figure 3 The process shown is implemented as follows:

[0059] Step 301, acquiring the collected data of the angle sensor and the second real-time angular velocity drift of each posture sensor within a third preset time period after the terminal device is opened from the folding screen and enters a stationary state;

[0060] The angle sensor may be one or more sensors capable of measuring angles, such as an acceleration sensor, a geomagnetic sensor, etc., and the collected data may be data capable of characterizing the angle of the folding screen.

[0061] The third preset time period may be a period of time after the terminal device is opened from the folding screen and enters a stationary state, wherein the specific duration of the third preset time period may be set according to actual needs. Each attitude sensor collects the second real-time angular velocity drift in real time at a preset sampling rate at each moment of the third preset time period, and each attitude sensor sends all the second real-time angular velocity drift collected within the third preset time period to the terminal device.

[0062] Step 302, determining the current angle based on the collected data;

[0063] If the angle sensor is a variety of different sensors that can measure angles, the collected data of each sensor is fused to obtain the current angle of the folding screen; if the angle sensor is a single sensor that can measure angles, the collected data is regarded as the current angle.

[0064] Step 303, using the current angle to update the initial angle to obtain a calibration angle;

[0065] Step 304, performing the following processing for each attitude sensor: counting multiple second real-time angular velocity drift amounts to obtain a second data amount, and when the second data amount reaches a preset data threshold, determining a calculated average angular velocity drift amount based on multiple second real-time angular velocity drift amounts, and using the calculated average angular velocity drift amount to update the average angular velocity drift amount to obtain a calibrated average angular velocity drift amount.

[0066] When determining the calibrated average angular velocity drift of each attitude sensor, for each attitude sensor, firstly, multiple second real-time angular velocity drifts are counted to obtain a second data amount. It can be understood that the second data amount is the total number of the multiple second real-time angular velocity drifts. Only when the second data amount reaches a preset sampling sample number, that is, a preset data threshold, the multiple second real-time angular velocity drifts are averaged to obtain the calibrated average angular velocity drift of the attitude sensor.

[0067] In actual use, if the second real-time angular velocity drift collected within the third preset time is greater than the preset data threshold, only the second real-time angular velocity drift of the preset data threshold number collected at the last time is selected for average calculation. For example, if the third preset time is 4 seconds, the second real-time angular velocity drift collected per second is 30, and the preset data threshold is 60, then the 60 second real-time angular velocity drifts collected in the last 2 seconds are averaged to obtain the calibrated average angular velocity drift. In this embodiment, the execution order of step 304 and step 302 is not limited, that is, step 304 can be executed before step 302, or step 302 and step 304 are executed simultaneously, or step 302 is executed before step 304.

[0068] In the process of real-time monitoring whether the angle changes when the terminal device is in the open state, if the terminal device is only shaken by external force and does not cause the angle of the folding screen to change, the posture sensor is easily disturbed by external forces, making the terminal device easily misjudge the folding screen angle calculation process, resulting in a waste of device resources. To solve the above problem, in one implementation, see Figure 4 , Figure 4 A flowchart of another embodiment of a method for determining a folding screen angle provided in an embodiment of the present invention. Figure 4 The process shown may include the following steps:

[0069] Step 401, when it is detected that the folding screen is in an open state and the terminal device is in a non-stationary state, obtaining an angular velocity time waveform or a real-time angular velocity of each posture sensor within a second preset time period after the terminal device enters the non-stationary state;

[0070] It should be noted that the terminal device obtains the angular velocity time waveform or real-time angular velocity of the attitude sensor when the terminal device is in a non-stationary state. Therefore, the second preset time length is a period of time after the non-stationary state, wherein the specific duration of the second preset time length can be set according to actual needs and is not limited here.

[0071] In this embodiment, the angular velocity time waveform or the real-time angular velocity can be used to determine whether the angle of the folding screen is actually changing. The details are explained in the following content and will not be described in detail here.

[0072] Step 402, determining whether the folding screen has an angle change based on the angular velocity time waveform or multiple real-time angular velocities corresponding to each posture sensor;

[0073] In one possible implementation, the process of determining whether to send an angle change may be: determining a waveform correlation value based on the angular velocity time waveform corresponding to each attitude sensor; determining an average real-time angular velocity for each attitude sensor based on multiple real-time angular velocities; determining an average error value based on the average real-time angular velocity corresponding to each attitude sensor; and determining that the angle of the folding screen has changed when the waveform correlation value is less than a preset correlation threshold or the average error value is greater than a preset average error threshold.

[0074] The above waveform correlation value can be obtained by performing correlation detection on the angular velocity time waveform using a Pearson correlation coefficient detection method or a deep learning correlation algorithm. The correlation detection can also be performed using other methods, which are not limited here.

[0075] In actual use, if multiple attitude sensors are installed on each folding surface, the real-time angular velocity collected by a attitude sensor is selected from each folding surface to determine the average error value. It can be understood that the average error value is obtained by comparing the mean difference of the real-time angular velocity of a attitude sensor detected on each folding surface within the same time period. Therefore, for a attitude sensor on each folding surface, it is first necessary to calculate the average of multiple real-time angular velocities collected by each attitude sensor to obtain the average real-time angular velocity, and then calculate the difference between the average real-time angular velocities obtained by the two attitude sensors to obtain the average error value.

[0076] In actual use, if any one of the waveform correlation value and the average error value meets the angle change determination condition, it is determined that the folding screen has an angle change, that is, when the waveform correlation value is less than the preset correlation threshold, or, when the average error value is greater than the preset average error threshold, it is determined that the folding screen has an angle change. Therefore, the angular velocity time waveform or real-time angular velocity of each attitude sensor is obtained within the second preset time length, that is, if the waveform correlation value is determined to be less than the preset correlation threshold after obtaining the angular velocity time waveform, it is not necessary to obtain the real-time angular velocity; if the average error value is determined to be greater than the preset average error threshold after obtaining the real-time angular velocity, it is not necessary to obtain the angular velocity time waveform.

[0077] The above-mentioned preset correlation threshold and preset average error threshold can be obtained based on experimental measurements and are not limited here.

[0078] Step 403, when it is determined that the folding screen has an angle change, obtaining a second current angular velocity collected by each posture sensor;

[0079] Step 404 , determining the angle of the folding screen at the current moment based on the calibration angle, the second current angular velocity corresponding to each posture sensor, and the calibration average angular velocity drift.

[0080] In a possible implementation, the calculation formula described in step 103 can be used to calculate the angle of the folding screen at the current moment, which will not be described in detail here; wherein the above-mentioned calibration angle and calibration average angular velocity drift are determined by step 202.

[0081] The method for determining the folding screen angle provided in the present embodiment can determine whether the angle of the folding screen has actually changed based on the angular velocity time waveform or the real-time angular velocity of each posture sensor when the terminal device is in a non-stationary state. This allows for no need to calculate the angle of the folding screen when it is determined that the angle of the folding screen has not changed. However, when it is determined that the angle of the folding screen has actually changed, the angle of the folding screen is calculated, thereby effectively alleviating the waste of equipment resources caused by angle calculation due to misjudgment caused by external shaking, so that the angle of the folding screen can be determined more accurately when the angle actually changes.

[0082] To facilitate understanding of the overall process of determining the above-mentioned folding screen angle, in this embodiment, a brief description will be given in combination with the specific usage scenario of the terminal device.

[0083] Scenario 1: The process of displaying a dynamic wallpaper on a terminal device by determining the angle of the folding screen:

[0084] 1. The terminal device is initially in a closed state. At this time, it is detected whether the terminal device is in a stationary state. If it is in a stationary state, the drift average angular velocity drift amount is determined to be used for the subsequent unfolding of the folding screen of the terminal device to determine the angle.

[0085] 2. After unfolding the folding screen, obtain the initial angle and current angular velocity, start calculating the angle of the folding screen at the current moment based on the initial angle, current angular velocity and average angular velocity drift, and report the initial angle to the wallpaper application to display the initial animation on the terminal device.

[0086] 3. When it is detected that the folding screen is in the open state and the terminal device is relatively stationary, the initial angle and average angular velocity drift are calibrated, and the dynamic wallpaper state is corrected at this time.

[0087] 4. As the unfolding angle of the folding screen changes, the angle is calculated based on the calibrated initial angle and average angular velocity drift and reported to the wallpaper application. The dynamic wallpaper changes dynamically according to the unfolding angle.

[0088] 5. When the terminal device shakes or trembles (for example, when running with the terminal device), the angle is judged to have not changed based on the waveform correlation value and the average error value, and the angle of the folding screen calculated last time is directly reported. At this time, the dynamic wallpaper remains unchanged.

[0089] 6. If the folding screen is closed at this time, go to step 1 and display the dynamic wallpaper status corresponding to the initial angle.

[0090] Scenario 2: The process of determining the angle of the folding screen through the protractor function on the terminal device:

[0091] 1. The terminal device is initially in a closed state. At this time, it is detected whether the terminal device is in a stationary state. If it is in a stationary state, the drift average angular velocity drift amount is determined to be used for the subsequent unfolding of the folding screen of the terminal device to determine the angle.

[0092] 2. After unfolding the folding screen, obtain the initial angle and current angular velocity, and start calculating the angle of the folding screen at the current moment based on the initial angle, current angular velocity and average angular velocity drift.

[0093] 3. When it is detected that the folding screen is in the open state and the terminal device is relatively stationary, calibrate the initial angle and average angular velocity drift.

[0094] 4. When adjusting the folding screen to be consistent with the angle to be measured, the angle is judged to have not changed according to the waveform correlation value and the average error value, and the angle of the folding screen calculated last time is directly reported. If the angle has changed, the angle is calculated based on the calibrated initial angle and the average angular velocity drift, and finally the angle to be measured is output.

[0095] The method for determining the folding screen angle provided in the present embodiment can obtain the average angular velocity drift of each attitude sensor when the terminal device is in a stationary and closed state, and subtract the average angular velocity drift when using the attitude sensor to determine the angle of the folding screen to eliminate the influence of data drift. In addition, when the terminal device is in a stationary state and the folding screen is in an open state, the calibration angle obtained by calibrating the initial angle is used to replace the initial angle to perform the next folding screen angle calculation, thereby effectively eliminating the problem of inaccurate angle calculation caused by cumulative errors. In addition, when it is determined based on the angular velocity time waveform or multiple real-time angular velocities that the folding angle terminal device is only shaken by external force and the angle of the folding screen has not changed, there is no need to calculate the angle of the folding screen, thereby effectively alleviating the waste of equipment resources caused by angle calculation due to misjudgment caused by external force shaking, so that the angle of the folding screen can be determined more accurately when the angle change actually occurs.

[0096] See also Figure 5 , is a block diagram of an embodiment of a device for determining a folding screen posture provided by an embodiment of the present invention. Figure 5 As shown, the device comprises:

[0097] A first determination module 501 is used to determine an average angular velocity drift of each posture sensor of the terminal device within a first preset time period when the terminal device is in a stationary state and the folding screen is in a closed state;

[0098] The acquisition module 502 is used to acquire the first current angular velocity collected by each posture sensor and the initial angle at which the folding screen opening action is recognized when the folding screen is detected to be opened; wherein the initial angle is the critical angle at which the posture sensor recognizes the folding screen opening action;

[0099] The second determination module 503 is used to determine the angle of the folding screen at the current moment based on the initial angle, and the first current angular velocity and the average angular velocity drift corresponding to each posture sensor.

[0100] Figure 6 A schematic diagram of the structure of a terminal device provided by an embodiment of the present invention, Figure 6The terminal device 600 shown includes: at least one processor 601, a memory 602, at least one network interface 604 and other user interfaces 603. The various components in the terminal device 600 are coupled together via a bus system 605. It is understood that the bus system 605 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 605 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 605 is not shown in FIG. Figure 6 Various buses are labeled as bus system 605 .

[0101] The user interface 603 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).

[0102] It can be understood that the memory 602 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 602 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0103] In some implementations, the memory 602 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 6021 and an application 6022 .

[0104] The operating system 6021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 6022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present invention can be included in the application 6022.

[0105] In the embodiment of the present invention, by calling the program or instruction stored in the memory 602, specifically, the program or instruction stored in the application 6022, the processor 601 is used to execute the method steps provided by each method embodiment.

[0106] The method disclosed in the above embodiment of the present invention can be applied to the processor 601, or implemented by the processor 601. The processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 601 or the instruction in the form of software. The above processor 601 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602 and completes the steps of the above method in combination with its hardware.

[0107] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.

[0108] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0109] The terminal device provided in this embodiment may be as follows Figure 6 The terminal device shown in FIG. 1 can execute the following Figure 1-4 All the steps in order to achieve Figure 1-4 For details of the technical effects shown, please refer to Figure 1-4 For the sake of brevity, the relevant description is not repeated here.

[0110] The embodiment of the present invention also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.

[0111] When one or more programs in the storage medium can be executed by one or more processors to implement the above-mentioned method for determining the folding screen angle.

[0112] The processor is used to execute a program for determining the folding screen angle stored in the memory to implement the steps of the method for determining the folding screen angle.

[0113] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0114] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0115] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for determining a folding screen angle, characterized in that: The method is applied to a terminal device, the terminal device includes a folding screen, and a gesture sensor arranged on each folding surface of the folding screen, and the method includes: When the terminal device is in a stationary state and the folding screen is in a closed state, determining an average angular velocity drift of each of the posture sensors of the terminal device within a first preset time period; When the folding screen is detected to be opened, the first current angular velocity collected by each of the posture sensors and the initial angle at which the folding screen opening action is recognized are obtained; wherein the initial angle is the critical angle at which the posture sensor recognizes the folding screen opening action; The angle of the folding screen at the current moment is determined based on the initial angle, and the first current angular velocity and the average angular velocity drift corresponding to each of the posture sensors.

2. The method according to claim 1, characterized in that: The method further comprises: Get the terminal device status change value and folding screen status value; When the value of the terminal device state change is less than a preset change threshold, the terminal device is in a stationary state; When the folding screen state value is within a preset closed state threshold range, the folding screen is in a closed state.

3. The method according to claim 1, characterized in that The determining the average angular velocity drift of each of the posture sensors of the terminal device within a first preset time period includes: Acquire a first real-time angular velocity drift of each of the attitude sensors within the first preset time period; The following processing is performed for each of the posture sensors: a plurality of the first real-time angular velocity drift amounts are counted to obtain a first data amount, and when the first data amount reaches a preset data threshold, an average angular velocity drift amount is determined based on the plurality of the first real-time angular velocity drift amounts.

4. The method according to claim 1, characterized in that: The method further comprises: When the folding screen is in an open state, detecting in real time whether the terminal device is in a stationary state; When it is detected that the terminal device is in a stationary state, the initial angle and the average angular velocity drift corresponding to each of the posture sensors are calibrated to obtain a calibration angle and a calibration average angular velocity drift.

5. The method according to claim 4, characterized in that The step of calibrating the initial angle and the average angular velocity drift corresponding to each of the posture sensors to obtain a calibration angle and a calibration average angular velocity drift includes: Acquire the collected data of the angle sensor and the second real-time angular velocity drift of each of the posture sensors within a third preset time period after the terminal device is opened from the folding screen and enters a stationary state; determining a current angle based on the collected data; Using the current angle to update the initial angle, to obtain a calibration angle; The following processing is performed for each of the posture sensors: multiple second real-time angular velocity drift amounts are counted to obtain a second data amount; when the second data amount reaches a preset data threshold, an average angular velocity drift amount is determined based on multiple second real-time angular velocity drift amounts; the average angular velocity drift amount is updated using the calculated average angular velocity drift amount to obtain a calibrated average angular velocity drift amount.

6. The method according to claim 4, characterized in that The method further comprises: When it is detected that the folding screen is in an open state and the terminal device is in a non-stationary state, obtaining the angular velocity time waveform or real-time angular velocity of each of the posture sensors within a second preset time period after the terminal device enters the non-stationary state; Determining whether the angle of the folding screen changes based on the angular velocity time waveform or the multiple real-time angular velocities corresponding to each of the posture sensors; When it is determined that the folding screen has an angle change, obtaining a second current angular velocity collected by each of the posture sensors; The angle of the folding screen at the current moment is determined based on the calibration angle, the second current angular velocity corresponding to each of the posture sensors, and the calibration average angular velocity drift.

7. The method according to claim 6, characterized in that The determining whether the angle of the folding screen changes based on the angular velocity time waveform or the multiple real-time angular velocities corresponding to each of the posture sensors includes: Determine a waveform correlation value based on the angular velocity time waveform corresponding to each of the posture sensors; For each of the posture sensors, determining an average real-time angular velocity based on a plurality of the real-time angular velocities; Determine an average error value based on the average real-time angular velocity corresponding to each of the posture sensors; When the waveform correlation value is less than a preset correlation threshold or the average error value is greater than a preset average error threshold, it is determined that the angle of the folding screen changes.

8. A device for determining the posture of a folding screen, characterized in that: The device comprises: A first determination module is used to determine the average angular velocity drift of each posture sensor of the terminal device within a first preset time period when the terminal device is in a stationary state and the folding screen is in a closed state; an acquisition module, for acquiring, when detecting that the folding screen is opened, a first current angular velocity collected by each of the posture sensors and an initial angle at which the folding screen opening action is recognized; wherein the initial angle is a critical angle at which the posture sensor recognizes the folding screen opening action; The second determination module is used to determine the angle of the folding screen at a current moment based on the initial angle, and the first current angular velocity and the average angular velocity drift corresponding to each of the posture sensors.

9. A terminal device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a program for determining a folding screen angle stored in the memory to implement the method for determining a folding screen angle according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method for determining the folding screen angle according to any one of claims 1 to 7.