Landscape / portrait switching method, and electronic device and computer-readable medium

By obtaining detailed information about the user's touch operations to switch device screens, the problem of not being able to switch when the device is placed horizontally and the issue of automatic switching have been resolved, thus improving the user experience and freedom of choice.

WO2026061557A1PCT designated stage Publication Date: 2026-03-26HANGZHOU LINGBAN TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2026-03-26

AI Technical Summary

Technical Problem

In existing technologies, devices cannot switch between portrait and landscape orientations when placed horizontally, and the device automatically switches the screen orientation when not placed horizontally, resulting in a poor user experience.

Method used

By obtaining detailed information about the user's touch operation, including the touch initialization direction, swipe time, and swipe distance, it determines whether the preset screen switching conditions are met and responds to the user's touch operation to switch the screen.

Benefits of technology

It enables screen switching between portrait and landscape orientations when the device is placed horizontally, reducing automatic switching caused by accidental touches and improving user experience and freedom.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025131783_26032026_PF_FP_ABST
    Figure CN2025131783_26032026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the embodiments of the present disclosure are a landscape / portrait switching method, and an electronic device and a computer-readable medium. A specific embodiment of the method comprises: in response to determining that a touch operation meets a preset screen switching touch condition, acquiring touch detail information corresponding to the touch operation; on the basis of the touch detail information, determining whether the touch detail information meets a preset screen switching condition; and in response to determining that the touch detail information meets the preset screen switching condition, performing switching processing on a current display screen. By means of this embodiment, even if a device is horizontally placed, landscape / portrait switching of a screen can also be performed, the situation of landscape / portrait switching of the screen caused by an accidental touch of a user can be reduced, and the degree of freedom for the user to perform landscape / portrait switching is improved, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Screen switching method, electronic device and computer readable medium

[0001] Cross-reference to Related Applications

[0002] This application claims priority to Chinese Patent Application No. 202411329430.8, filed on September 23, 2024, the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0003] The present disclosure relates to the field of virtual vision, in particular to a screen switching method, an electronic device and a computer readable medium. BACKGROUND

[0004] Switching the horizontal and vertical screens of a device can facilitate the use of the device by a user, so as to improve the user experience. Currently, when switching the horizontal and vertical screens of a device, the commonly used method is to automatically switch the screen of the device based on the direction of the gravity acceleration of an inertial measurement unit (IMU).

[0005] However, in practice, it is found that when the screen of the device is switched based on the direction of the gravity acceleration of the IMU, the following technical problems often exist: when the device is placed horizontally, the user cannot switch the horizontal and vertical screens of the device; if the horizontal and vertical screen automatic switching logic of the device is activated when the device is placed in a non-horizontal state, the screen of the device will be automatically switched even if the user does not need to switch the direction of the horizontal and vertical screens, resulting in poor user experience.

[0006] The above information disclosed in the background section is only intended to enhance the understanding of the background of the present inventive concept and thus can include information that does not form the prior art that is known to those of ordinary skill in the art. SUMMARY

[0007] The summary section is provided to introduce briefly the concepts that will be described in more detail in the detailed description section. The summary section is not intended to identify key or essential features of the claimed technology nor is it intended to be used to limit the scope of the claimed technology.

[0008] Some embodiments of the present disclosure provide a screen switching method, an electronic device and a computer readable medium to solve one or more of the technical problems mentioned in the background section.

[0009] In a first aspect, some embodiments of the present disclosure provide a portrait-landscape screen switching method, which comprises: in response to determining that a touch operation meets a preset screen switching touch condition, acquiring touch detail information corresponding to the touch operation, wherein the touch detail information comprises a touch initialization direction, a touch sliding time and a touch sliding distance; determining whether the touch detail information meets a preset screen switching condition according to the touch detail information; and in response to determining that the touch detail information meets the preset screen switching condition, performing a switching process on a current display screen.

[0010] Optionally, the method further comprises: determining whether the touch sliding distance meets a preset sliding distance condition; in response to determining that the touch sliding distance meets the preset sliding distance condition, determining whether the touch sliding time meets a preset sliding time condition; and in response to determining that the touch sliding time meets the preset sliding time condition, determining that the touch detail information meets the preset screen switching condition.

[0011] Optionally, the method further comprises: in response to determining that the touch operation meets a first touch operation condition, determining whether the touch initialization direction meets a first preset region direction condition; and in response to determining that the touch initialization direction meets the first preset region direction condition, switching the current display screen to a portrait screen.

[0012] Optionally, the method further comprises: in response to determining that the touch initialization direction does not meet the first preset region direction condition, determining whether the touch initialization direction meets a second preset region direction condition; and in response to determining that the touch initialization direction meets the second preset region direction condition, switching the current display screen to a landscape screen.

[0013] Optionally, the method further comprises: in response to determining that the touch operation meets a second touch operation condition, generating a touch fusion direction corresponding to the touch operation according to the touch initialization direction and a touch trajectory direction; determining whether the touch fusion direction meets a first preset region direction condition; and in response to determining that the touch fusion direction meets the first preset region direction condition, switching the current display screen to a portrait screen.

[0014] Optionally, the method further comprises: in response to determining that the touch fusion direction does not meet the first preset region direction condition, determining whether the touch fusion direction meets a second preset region direction condition; and in response to determining that the touch fusion direction meets the second preset region direction condition, switching the current display screen to a landscape screen.

[0015] In a second aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device configured to store one or more programs; a touch screen configured to detect a touch operation of a user; and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method as described in any implementation manner of the first aspect.

[0016] In a third aspect, some embodiments of the present disclosure provide a computer readable medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the method as described in any implementation manner of the first aspect.

[0017] The above-described embodiments of this disclosure have the following beneficial effects: Through the screen orientation switching methods of some embodiments of this disclosure, the screen orientation of the device can be switched even when the device is placed horizontally, and the occurrence of automatic screen orientation switching when the user does not need to switch the screen is reduced, thereby further improving the user experience. Specifically, the reason why the screen orientation cannot be switched when the device is placed horizontally, and why the screen automatically switches between horizontal and vertical orientations when the user does not need to switch the screen, is that: when the device is placed horizontally, the user cannot switch the screen orientation, and when the automatic screen orientation switching logic is activated, the screen will automatically switch even when the device is not in a horizontal position and the user does not need to switch the screen orientation, resulting in a poor user experience. Based on this, the screen orientation switching method of some embodiments of this disclosure firstly, in response to determining that the touch operation meets the preset screen switching touch conditions, obtains touch details information corresponding to the touch operation. The touch details information includes the touch initialization direction, touch sliding time, and touch sliding distance. Thus, details of the user's touch operation can be obtained, which can be used to determine whether the user's touch operation meets the screen switching conditions. Then, based on the aforementioned touch details, it is determined whether the touch details meet the preset screen switching conditions. This allows it to determine whether the user intends to switch between portrait and landscape modes. Secondly, in response to the determination that the touch details meet the preset screen switching conditions, the current display screen is switched. This further enables screen switching between portrait and landscape modes. Because the screen switching is not based on the direction of gravity acceleration from the IMU, but rather on the user's touch operation meeting the screen switching conditions, even when the device is horizontally positioned, switching can be achieved when the user's touch operation meets the aforementioned screen switching conditions. Furthermore, screen switching is only performed when the user's touch operation meets these conditions, reducing accidental screen switching caused by user touches. Since only the initial touch direction needs to be obtained, and the user's swipe direction and trajectory are not limited, the user's freedom in switching between portrait and landscape modes is increased, thereby improving the user experience. Therefore, even when the device is placed horizontally, the screen can be switched between portrait and landscape orientations, and the occurrence of screen switching due to accidental touches by the user can be reduced, further improving the user's freedom to switch between portrait and landscape orientations and thus enhancing the user experience. Attached Figure Description

[0018] The above and other features, aspects and advantages of the present disclosure will become more apparent after a reading of the following detailed description together with the accompanying drawings. Throughout the drawings, similar reference numerals are used to represent similar elements. It should be understood that the drawings are schematic and elements and features do not necessarily appear in proportion.

[0019] FIG. 1 is a flowchart of some embodiments of a portrait-landscape screen switching method according to the present disclosure;

[0020] FIGS. 2-3 are schematic diagrams of application scenarios of the portrait-landscape screen switching method according to the present disclosure;

[0021] FIG. 4 is a flowchart of some other embodiments of the portrait-landscape screen switching method according to the present disclosure;

[0022] FIG. 5 is a schematic diagram of the structure of an electronic device suitable for use in implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0023] Embodiments of the present disclosure will be described in more detail with reference to the drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure can be more thoroughly and completely understood. It should be understood that the drawings and embodiments of the present disclosure are merely for illustrative purposes and are not intended to limit the scope of protection of the present disclosure.

[0024] It should also be noted that, for ease of description, only the parts related to the present application are shown in the drawings. The embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0025] It should be noted that the terms "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not intended to limit the order or interdependence of the functions performed by these devices, modules or units.

[0026] It should be noted that the adjectives "one", "multiple" mentioned in the present disclosure are illustrative and not limiting, and those skilled in the art should understand that, unless otherwise explicitly stated in the context, it should be understood as "one or more".

[0027] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes and are not intended to limit the scope of the messages or information.

[0028] The present disclosure will be described in detail below with reference to the drawings and in conjunction with the embodiments.

[0029] FIG. 1 illustrates a flow 100 of some embodiments of the landscape-portrait screen switching method according to the present disclosure. The landscape-portrait screen switching method comprises the following steps:

[0030] At step 101, in response to determining that the touch operation satisfies the preset screen switching touch condition, the touch detail information corresponding to the touch operation is acquired.

[0031] In some embodiments, in response to determining that the touch operation satisfies the preset screen switching touch condition, the execution subject (e.g., the electronic device) of the landscape-portrait screen switching method can acquire the touch detail information corresponding to the touch operation. The touch detail information can represent the details of the user touching the touch screen. The touch operation can be the operation of the user touching the touch screen of the electronic device with the finger.

[0032] The touch detail information can include the touch initialization direction, the touch sliding time, and the touch sliding distance. The touch initialization direction can represent the vector of the initial direction of the finger of the user touching the touch screen (the touch initialization direction refers to the direction of the finger when it first contacts the screen, such as the direction of the finger when it first contacts the screen, which can be upward left, downward right, or other directions). The touch sliding time can represent the time of the finger of the user touching the touch screen. The touch sliding distance can represent the distance of the finger of the user sliding on the touch screen.

[0033] The preset screen switching touch condition can be that the number of fingers used by the user to touch the touch screen is a preset number of fingers. In this regard, the value of the preset number of fingers is not specifically limited. For example, the preset number of fingers can be 2.

[0034] In practice, the execution subject can acquire the touch detail information corresponding to the touch operation from a database storing the touch detail information corresponding to the touch operation.

[0035] It should be noted that the electronic device can be the electronic device described in FIG. 5, and the touch screen can be the touch screen included in the electronic device in FIG. 5.

[0036] However, it is found in practice that directly switching the landscape and portrait screens according to the acquired touch detail information does not consider preprocessing the acquired touch detail information, resulting in a large amount of noise in the acquired touch detail information, which leads to low accuracy of switching the landscape and portrait screens according to the acquired touch detail information and poor user experience. Therefore, the present disclosure adopts the following solution:

[0037] Optionally, after step 101, the execution subject can further perform the following steps:

[0038] In a first step, the touch detail information is wavelet transformed according to a preset transform coefficient to obtain first coefficient information and second coefficient information. The first coefficient information can be an approximation coefficient corresponding to the touch detail information. The second coefficient information can be a detail coefficient corresponding to the touch detail information. The preset transform coefficient can represent a preset reconstruction scale coefficient. For example, the preset transform coefficient can be 6. In practice, the execution subject can perform wavelet transform on the touch detail information by a discrete wavelet denoising algorithm to obtain the first coefficient information and the second coefficient information.

[0039] In a second step, the obtained second coefficient information is stored in a coefficient information set. The coefficient information set can include each first coefficient information and each second coefficient information.

[0040] In a third step, according to the obtained first coefficient information, the following decomposition steps are performed:

[0041] In a first decomposition step, the obtained first coefficient information is decomposed to obtain first decomposition coefficient information and detail coefficient information. The first decomposition coefficient information can represent an approximation coefficient corresponding to the first coefficient information. The detail coefficient information can represent a detail coefficient corresponding to the first coefficient information. In practice, the execution subject can perform decomposition on the obtained first coefficient information by a discrete wavelet transform algorithm to obtain the first decomposition coefficient information and the detail coefficient information.

[0042] In a second decomposition step, the obtained first decomposition coefficient information and the detail coefficient information are stored in the coefficient information set.

[0043] In a third decomposition step, in response to determining that a decomposition number is less than a preset decomposition number, the obtained first decomposition coefficient information is taken as the first coefficient information, and the decomposition step is performed again. The decomposition number can represent a number of times of performing the decomposition step. The preset decomposition number can represent a set decomposition number. In this regard, a specific value of the preset decomposition number is not limited.

[0044] In a fourth decomposition step, in response to determining that the decomposition number is equal to the preset decomposition number, denoising-processed touch detail information is generated according to the coefficient information set.

[0045] In practice, the execution subject can select each coefficient information satisfying a preset selection condition from the coefficient information set as each first target coefficient information. The preset selection condition can be that the order of the coefficient information representing the detail coefficient is within a preset order range. The preset order range can represent a preset number of coefficient information. The preset number can be the number of preset transform coefficients. For example, there are 100 coefficients in the coefficient information set, and they are arranged in a certain order, the preset transform coefficient is 6, the first 6 coefficient information is the first 6 coefficient information, and the selection of the first target coefficient information is that the coefficient information representing the detail coefficient in the first 6 coefficient information is the first target coefficient information.

[0046] Then, each coefficient information representing the approximation coefficient in the coefficient information set is determined as each second target coefficient information.

[0047] After that, the execution subject can reconstruct the first target coefficient information and the second target coefficient information by an inverse discrete wavelet transform algorithm to obtain touch detail information after denoising processing.

[0048] The technical solution is one of the invention points of the embodiment of the present disclosure, which solves the technical problem that the accuracy of switching between horizontal and vertical screens according to the obtained touch detail information is low, and the user experience is poor. If the above factors are solved, the accuracy of switching between horizontal and vertical screens according to the obtained touch detail information can be improved, and the user experience can be improved. In order to achieve this effect, the present disclosure denoises the obtained touch detail information when switching between horizontal and vertical screens according to the obtained touch detail information, and then switches between horizontal and vertical screens according to the touch detail information after denoising, thereby reducing the noise in the touch detail information. Therefore, switching between horizontal and vertical screens according to the touch detail information after denoising can improve the accuracy of switching between horizontal and vertical screens, thereby improving the user experience.

[0049] Step 102, determining whether the touch detail information satisfies a preset screen switching condition according to the touch detail information.

[0050] In some embodiments, the execution subject can determine whether the touch detail information satisfies a preset screen switching condition according to the touch detail information. The preset screen switching condition can be that a touch sliding distance included in the touch detail information satisfies a preset sliding distance condition and a touch sliding time included in the touch detail information satisfies a preset sliding time condition. The preset sliding distance condition can be that the touch sliding distance included in the touch detail information is greater than a preset sliding distance. The preset sliding distance is not specifically limited. The preset sliding time condition can be that the touch sliding time included in the touch detail information is greater than a preset sliding time. The preset sliding time is not specifically limited.

[0051] In some optional implementations of some embodiments, the execution subject can determine whether the touch detail information satisfies a preset screen switching condition according to the touch detail information by the following steps:

[0052] Firstly, it is determined whether the touch sliding distance satisfies a preset sliding distance condition.

[0053] Secondly, in response to determining that the touch sliding distance satisfies the preset sliding distance condition, it is determined whether the touch sliding time satisfies a preset sliding time condition.

[0054] Thirdly, in response to determining that the touch sliding time satisfies the preset sliding time condition, it is determined that the touch detail information satisfies the preset screen switching condition.

[0055] Step 103, in response to determining that the touch detail information satisfies the preset screen switching condition, the current display screen is switched.

[0056] In some embodiments, in response to determining that the touch detail information satisfies the preset screen switching condition, the execution subject can switch the current display screen.

[0057] In some optional implementations of some embodiments, in response to determining that the touch detail information satisfies the preset screen switching condition, the execution subject can switch the current display screen by the following steps:

[0058] In a first step, in response to determining that the touch operation satisfies a first touch operation condition, it is determined whether the touch initialization direction satisfies a first preset region direction condition. The first touch operation condition can be that the touch detail information of the touch operation does not include a touch trajectory direction. The touch trajectory direction can represent a vector of the trajectory direction of the user's finger sliding on the touch screen (if the touch operation is a click type operation without sliding, the touch operation does not include a touch trajectory direction). The first preset region direction condition can be that the touch initialization direction translated to the origin of a target coordinate system or the touch fusion direction translated to the origin of the target coordinate system is located in a first target region. The touch fusion direction can represent a weighted direction between the touch initialization direction and the touch trajectory direction. (Therefore, when the touch operation satisfies the first touch operation condition, i.e., the touch detail information does not include the touch trajectory direction, it is only determined whether the touch initialization direction translated to the origin of the target coordinate system is located in the first target region to determine whether the touch initialization direction satisfies the first preset region direction condition.)

[0059] It should be noted that the touch initialization direction translated to the origin of the target coordinate system represents translating the starting point of the touch initialization direction to the origin of the target coordinate system. The touch fusion direction translated to the origin of the target coordinate system represents translating the starting point of the touch fusion direction to the origin of the target coordinate system.

[0060] The first target region can represent a preset range of screen regions of the touch screen. The target coordinate system can be a two-dimensional coordinate system created with the center point of the touch screen as the origin. The X-axis of the target coordinate system can be the symmetry axis of the horizontal screen direction of the touch screen. The Y-axis of the target coordinate system can be the symmetry axis of the vertical screen direction of the touch screen. As shown in FIG. 2, the angle β can be 45° (in one example, the range of the first target region is shown in FIG. 2). P in FIG. 2 can represent the touch initialization direction translated to the origin of the target coordinate system or the touch fusion direction translated to the origin of the target coordinate system. When P is located in the first target region, the touch initialization direction or the touch fusion direction represented by P satisfies the first preset region direction condition. In practice, when it is determined that the touch operation satisfies the first touch operation condition, i.e., the touch detail information does not include the touch trajectory direction, first, the execution subject can translate the touch initialization direction to the origin of the target coordinate system, and then determine whether the touch initialization direction satisfies the first preset region direction condition.

[0061] In a second step, in response to determining that the touch initialization direction satisfies the first preset region direction condition, the current display screen is switched to vertical screen.

[0062] Optionally, in response to determining that the touch initialization direction does not satisfy the first preset region direction condition, first, the execution subject can further determine whether the touch initialization direction satisfies a second preset region direction condition. The second preset region direction condition can be that the touch initialization direction after translation to the origin of the target coordinate system or the touch fusion direction after translation to the origin of the target coordinate system is located in a second target region. The second target region can be a preset range of the screen region of the touch screen. As shown in FIG. 3, the angle represented by β can be 45° (in an example, the range of the first target region is as shown in FIG. 3). A in FIG. 3 can represent the touch initialization direction after translation to the origin of the target coordinate system or the touch fusion direction after translation to the origin of the target coordinate system. When A is located in the second target region, the touch initialization direction or the touch fusion direction represented by A satisfies the second preset region direction condition. In practice, when it is determined that the touch operation satisfies the first touch operation condition, i.e., the touch detail information does not include the touch track direction, first, the execution subject can translate the touch initialization direction to the origin of the target coordinate system, and then determine whether the touch initialization direction satisfies the second preset region direction condition.

[0063] Finally, in response to determining that the touch initialization direction satisfies the second preset region direction condition, the current display screen can be switched to a landscape screen.

[0064] It can be understood that the screen ranges corresponding to the first target region and the second target region as shown in FIGS. 2 and 3 are only an example of the present disclosure, and in implementation, the ranges of the first target region and the second target region can be adjusted as needed.

[0065] The above various embodiments of the present disclosure have the following beneficial effects: through the landscape and portrait screen switching method of some embodiments of the present disclosure, when the device is placed horizontally, the landscape and portrait screen of the device can also be switched, and the situation that the screen automatically switches the landscape and portrait screen when the user does not need to switch the screen is reduced, thereby further improving the user experience. Specifically, the reason why the landscape and portrait screen of the device cannot be switched when the device is placed horizontally, and the screen automatically switches the landscape and portrait screen when the user does not need to switch the screen is that when the device is placed horizontally, the user cannot switch the landscape and portrait screen of the device, and when the landscape and portrait screen automatic switching logic of the device is activated, when the device is not in a horizontal placement state and the user does not need to switch the landscape and portrait screen direction of the screen, the screen of the device will automatically switch, causing poor user experience. Based on this, the landscape and portrait screen switching method of some embodiments of the present disclosure first, in response to determining that the touch operation meets the preset screen switching touch condition, the touch detail information corresponding to the above touch operation is obtained. The touch detail information includes touch initialization direction, touch sliding time and touch sliding distance. Thus, the details of the user's touch operation can be obtained, which can be used to determine whether the user's touch operation meets the screen switching condition. Then, according to the above touch detail information, it is determined whether the above touch detail information meets the preset screen switching condition. Thus, it can be determined whether the user wants to switch the landscape and portrait screen. Secondly, in response to determining that the above touch detail information meets the above preset screen switching condition, the current display screen is switched. Thus, the landscape and portrait screen switching can be further realized. Because the landscape and portrait screen switching of the screen is not based on the direction of the IMU's gravity acceleration, but the landscape and portrait screen switching of the screen is performed when it is detected that the user's touch operation meets the screen switching condition. Thus, when the device is placed horizontally, the device can also be switched when it is detected that the user's touch operation meets the above screen switching condition, and the landscape and portrait screen of the screen is switched only when the user's touch operation meets the above screen switching condition, thereby reducing the landscape and portrait screen switching caused by the user's accidental touch. Because only the initial touch direction of the user needs to be obtained, because the sliding direction and sliding track of the user are not limited, the degree of freedom of the user in switching the landscape and portrait screen is increased, thereby improving the user experience (the initial touch direction of the user refers to the direction of the user's finger when it first touches the screen, such as the direction of the finger when it first touches the screen, left up, right down or other directions, after the user's finger touches the screen, it does not matter whether it is "straight sliding", "curved sliding" or "even not sliding (only point)", the present disclosure does not require it, only according to the direction of the finger when it first touches the screen, compared with the prior art in which the user must strictly slide in the specified direction to trigger the switching, the degree of freedom is higher and the experience is better).Thus, when the device is placed horizontally, the horizontal and vertical screen switching of the screen can also be realized, and the case of horizontal and vertical screen switching of the screen caused by user mis-touch can be reduced, further improving the freedom of the user to switch the horizontal and vertical screen, and further improving the user experience.

[0066] Further referring to FIG. 4, a flow 400 of another embodiment of the horizontal and vertical screen switching method is shown. The flow 400 of the horizontal and vertical screen switching method includes the following steps:

[0067] Step 401, in response to determining that the touch operation meets the preset screen switching touch condition, obtaining touch detail information corresponding to the touch operation.

[0068] Step 402, determining whether the touch detail information meets the preset screen switching condition according to the touch detail information.

[0069] In some embodiments, the specific implementation of steps 401 and 402 and the resulting technical effects can refer to steps 101-102 in the corresponding embodiments of FIG. 1, which will not be repeated here.

[0070] Step 403, in response to determining that the touch detail information meets the preset screen switching condition, performing the following steps:

[0071] Step 4031, in response to determining that the touch operation meets the second touch operation condition, generating a touch fusion direction corresponding to the touch operation according to the touch initialization direction and the touch trajectory direction.

[0072] In some embodiments, in response to determining that the above-mentioned touch operation meets the second touch operation condition, the execution subject (for example, an electronic device) of the horizontal and vertical screen switching method can generate a touch fusion direction corresponding to the above-mentioned touch operation according to the above-mentioned touch initialization direction and the above-mentioned touch trajectory direction. Wherein, the above-mentioned second touch operation condition can be that the touch detail information of the touch operation includes the touch trajectory direction. In practice, first, the execution subject can determine the product of the first preset weight and the above-mentioned touch initialization direction as the first product. Then, the product of the second preset weight and the above-mentioned touch trajectory direction is determined as the second product. After that, the sum between the above-mentioned first product and the above-mentioned second product is determined as the touch fusion direction.

[0073] Step 4032, determining whether the touch fusion direction meets the first preset region direction condition.

[0074] In some embodiments, the execution subject can determine whether the touch fusion direction satisfies the first preset area direction condition. It should be noted that the manner of determining whether the touch fusion direction satisfies the first preset area direction condition is the same as that of determining whether the touch initialization direction satisfies the first preset area direction condition in FIG. 1, and thus will not be described herein again.

[0075] In step 4033, the current display screen is switched to a portrait screen in response to determining that the touch fusion direction satisfies the first preset area direction condition.

[0076] In some embodiments, in response to determining that the touch fusion direction satisfies the first preset area direction condition, the execution subject can switch the current display screen to a portrait screen.

[0077] In step 4034, it is determined whether the touch fusion direction satisfies a second preset area direction condition in response to determining that the touch fusion direction does not satisfy the first preset area direction condition.

[0078] In some embodiments, in response to determining that the touch fusion direction does not satisfy the first preset area direction condition, the execution subject can determine whether the touch fusion direction satisfies a second preset area direction condition. It should be noted that the manner of determining whether the touch fusion direction satisfies the second preset area direction condition is the same as that of determining whether the touch initialization direction satisfies the second preset area direction condition in FIG. 1, and thus will not be described herein again.

[0079] In step 4035, the current display screen is switched to a landscape screen in response to determining that the touch fusion direction satisfies the second preset area direction condition.

[0080] In some embodiments, in response to determining that the touch fusion direction satisfies the second preset area direction condition, the execution subject can switch the current display screen to a landscape screen.

[0081] As can be seen from FIG. 4, compared with the description of some embodiments corresponding to FIG. 1, the flow 400 of the landscape / portrait screen switching method in some embodiments corresponding to FIG. 4 embodies that the current display screen can be switched to a landscape screen or a portrait screen according to the touch fusion direction between the touch initialization direction and the touch trajectory direction, enriches the diversity of the manner of switching the landscape / portrait screen for the user, improves the experience of the user, and further fuses the touch trajectory direction of the user, so as to improve the accuracy of switching the landscape / portrait screen and reduce the situation of switching the landscape / portrait screen due to the user's mis-touch, so as to further improve the experience of the user.

[0082] Reference is now made to Fig. 5, which shows a structural schematic of an electronic device (e.g., electronic device) 500 suitable for use in implementing some embodiments of the present disclosure. The electronic device shown in Fig. 5 is merely one example, and should not be taken as limiting the functionality or use of embodiments of the present disclosure.

[0083] As shown in Fig. 5, electronic device 500 can include a processing device (e.g., central processor, graphics processor, etc.) 501 that can perform various appropriate acts and processes in accordance with programs stored in read only memory (ROM) 502 or loaded from storage device 508 into random access memory (RAM) 503. Various programs and data required for operation of electronic device 500 are also stored in RAM 503. Processing device 501, ROM 502, and RAM 503 are connected to each other by bus 504. Input / output (I / O) interface 505 is also connected to bus 504.

[0084] Generally, the following devices can be connected to I / O interface 505: input device 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output device 507 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 508 including, for example, a magnetic tape, hard disk, etc.; and communication device 509. Communication device 509 can allow electronic device 500 to communicate wirelessly or via wire with other devices to exchange data. While Fig. 5 shows electronic device 500 with various devices, it should be understood that not all of the shown devices are required to be implemented or present. More or fewer devices can alternatively be implemented or present. Each block shown in Fig. 5 can represent a device or, as desired, multiple devices.

[0085] In particular, processes described above with reference to the flowcharts can be implemented as a computer software program according to some embodiments of the present disclosure. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In some such embodiments, the computer program can be downloaded and installed from a network via communication device 509, or installed from storage device 508, or installed from ROM 502. When the computer program is executed by processing device 501, the above-described functions defined in the methods of some embodiments of the present disclosure are performed.

[0086] Note that the computer readable medium in some embodiments of the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination thereof. The computer readable storage medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the foregoing. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus or device. In some embodiments of the present disclosure, the computer readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave in a propagated data signal, in which the computer readable program code is contained. Such propagated data signal can take a variety of forms, including but not limited to electro-magnetic, optical or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate or transport program for use by or in connection with an instruction execution system, apparatus or device. Program code contained in the computer readable medium can be transmitted by any suitable medium, including but not limited to wire, cable, RF (radio frequency), etc., or any suitable combination of the foregoing.

[0087] In some embodiments, the client, server, or both can communicate using any current known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any current known or future developed networks.

[0088] The computer readable medium can be included in the electronic device, or exist separately from the electronic device. The computer readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: in response to determining that the touch operation satisfies a preset screen switching touch condition, acquire touch detail information corresponding to the touch operation, wherein the touch detail information includes a touch initialization direction, a touch sliding time, and a touch sliding distance; determine, according to the touch detail information, whether the touch detail information satisfies a preset screen switching condition; and in response to determining that the touch detail information satisfies the preset screen switching condition, perform a switching process on a current display screen.

[0089] Computer program code for carrying out operations of some embodiments of the disclosure can be written in any one or more of a variety of programming languages or combinations of languages, including an object-oriented programming language such as Java, Smalltalk, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0090] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by a dedicated hardware-based system that carries out specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0091] The functionality described herein above can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program- specific Integrated Circuits (ASICs), Program- specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.

[0092] The above description is merely exemplary of the disclosure and the application made use of the principles of the technology. It is to be understood that the application scope of the embodiments of the disclosure is not limited to the specific combinations of technical features described above, and should also cover other technical solutions formed by any combination of the above technical features or equivalent features thereof without departing from the inventive concept. For example, the technical solutions formed by replacing the above features with technical features having similar functions disclosed in the embodiments of the disclosure (but not limited to) with each other.

Claims

1. A method for switching between a portrait screen and a landscape screen, comprising: in response to determining that a touch operation meets a preset screen switching touch condition, obtaining touch detail information corresponding to the touch operation, wherein the touch detail information comprises a touch initialization direction, a touch sliding time and a touch sliding distance; determining, according to the touch detail information, whether the touch detail information meets a preset screen switching condition; in response to determining that the touch detail information meets the preset screen switching condition, performing a switching process on a current display screen.

2. The method of claim 1, wherein, The determining, according to the touch detail information, whether the touch detail information meets a preset screen switching condition, comprises: determining whether the touch sliding distance meets a preset sliding distance condition; in response to determining that the touch sliding distance meets the preset sliding distance condition, determining whether the touch sliding time meets a preset sliding time condition; in response to determining that the touch sliding time meets the preset sliding time condition, determining that the touch detail information meets the preset screen switching condition.

3. The method of claim 1, wherein, The in response to determining that the touch detail information meets the preset screen switching condition, performing a switching process on a current display screen, comprises: in response to determining that the touch operation meets a first touch operation condition, determining whether the touch initialization direction meets a first preset region direction condition; in response to determining that the touch initialization direction meets the first preset region direction condition, switching the current display screen to a portrait screen.

4. The method of claim 3, wherein, The method further comprises: in response to determining that the touch initialization direction does not meet the first preset region direction condition, determining whether the touch initialization direction meets a second preset region direction condition; in response to determining that the touch initialization direction meets the second preset region direction condition, switching the current display screen to a landscape screen.

5. The method of claim 1, wherein, The touch detail information comprises a touch trajectory direction; and the in response to determining that the touch detail information meets the preset screen switching condition, performing a switching process on a current display screen, comprises: in response to determining that the touch operation meets a second touch operation condition, generating a touch fusion direction corresponding to the touch operation according to the touch initialization direction and the touch trajectory direction; determining whether the touch fusion direction meets a first preset region direction condition; in response to determining that the touch fusion direction meets the first preset region direction condition, switching the current display screen to a portrait screen. The method further comprises:

6. The method of claim 5, wherein, in response to determining that the touch fusion direction does not meet the first preset region direction condition, determining whether the touch fusion direction meets a second preset region direction condition; in response to determining that the touch fusion direction meets the second preset region direction condition, switching the current display screen to a landscape screen.

7. An electronic device, comprising: one or more processors; a storage device for storing one or more programs; a touch screen for detecting a touch operation of a user; when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1-6. ​ 8. A computer readable medium having stored thereon a computer program, wherein, The computer program, which is executed by a processor, implements the method as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for controlling screen picture to move based on gestures

    CN104063170A

  • Switching method and device for screen modes

    CN105843531A

  • Mobile terminal and method for controlling screen

    CN106657659A

  • Mobile terminal and method of controlling screen

    CN107071140A

  • Transverse and vertical screen switching method, electronic equipment and computer readable medium

    CN119292510A