Screen direction identification method and device, electronic equipment and storage medium
Data is collected through user touch operations, and the screen direction of the terminal device is identified, which solves the screen direction recognition problem caused by acceleration sensor failure, and achieves a more economical and user-friendly solution.
Patent Information
- Application Number
- CN202411540877.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-14
AI Technical Summary
Existing terminal devices cannot recognize screen direction when the acceleration sensor fails, which affects the user experience, and deploying acceleration sensors increases production costs.
Touch data is collected through user touch operations, split into touch cycles, determine the touch angle slope and touch angle, thereby identifying the screen direction without relying on an acceleration sensor.
It effectively avoids the problem of screen direction unrecognized due to damage to the acceleration sensor, saves production costs, and provides a better user experience.
Smart Images

Figure CN119440307A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of terminal devices, and in particular, to a method, device, electronic device and storage medium for identifying screen direction. Background Art
[0002] When using mobile phones or other terminal devices in daily life, the automatic recognition function of the screen direction can automatically adjust the screen direction according to the user's usage habits and environment to provide a better user experience. For example, when the user holds the phone horizontally to watch a video, the screen will automatically switch to horizontal mode to provide a wider field of view and a better viewing experience. In addition, some application interfaces will also adjust the interface layout according to the direction of the screen to adapt to different usage scenarios, such as meetings, reading, etc., thereby improving user convenience.
[0003] This automatic screen orientation recognition function usually relies on the device's built-in accelerometer, which can sense changes in the device's orientation. However, when the accelerometer fails, the screen orientation cannot be recognized, affecting the user experience. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method, device, electronic device and storage medium for screen direction recognition, which determines the touch angle only through the touch operation of the user touching the screen, and then recognizes the screen direction through the touch angle, without the need to identify the screen direction through an acceleration sensor, effectively avoiding the problem of screen direction being unable to be recognized due to damage to the acceleration sensor, and greatly saving production costs because there is no need to deploy an acceleration sensor.
[0005] In a first aspect, an embodiment of the present invention provides a method for identifying a screen direction, which is applied to a touch screen device, and the method includes:
[0006] For each operating finger of the same operating hand, the following steps are performed: when a touch operation of the operating finger is received, a first amount of touch data corresponding to the touch operation is collected at a preset time interval within a preset time period; wherein the touch data includes a touch state and a current time point;
[0007] Splitting the first amount of touch data based on the current time point and the touch state to obtain at least one touch cycle; wherein the touch cycle includes a second amount of touch data, and the second amount is less than or equal to the first amount;
[0008] For each touch cycle of at least one touch cycle, performing: determining a touch angle slope according to a second amount of touch data included in the touch cycle;
[0009] determining a touch angle of the operating finger based on at least one touch angle slope;
[0010] Identify the screen orientation of a touchscreen device based on the touch angle.
[0011] In one implementation, splitting the first amount of touch data based on the current time point and the touch state to obtain at least one touch cycle includes:
[0012] Traversing the touch states in the first amount of touch data according to the time sequence of the current time point;
[0013] The first amount of touch data is split with the touch state being the first touch state as a critical point to obtain at least one touch cycle.
[0014] In one embodiment, the touch data further includes touch point position coordinates; wherein the touch point position coordinates are pixel coordinates on a pixel coordinate system established with a coordinate origin on the touch screen device;
[0015] Before determining the touch angle slope according to the second amount of touch data included in the touch cycle, the method further includes:
[0016] determining whether the touch period is an abnormal touch period based on the touch point position coordinates and the touch state in the second amount of touch data;
[0017] In the case where it is determined that the touch cycle is an abnormal touch cycle, deleting the abnormal touch cycle;
[0018] In the case where it is determined that the touch cycle is not an abnormal touch cycle, determining whether each touch data is abnormal jitter data based on the touch point position coordinates in the second amount of touch data;
[0019] When it is determined that the touch data is abnormal jitter data, the abnormal jitter data is deleted from the touch cycle.
[0020] In one implementation, determining whether a touch cycle is an abnormal touch cycle based on the touch point position coordinates and the touch state in the second amount of touch data includes:
[0021] determining whether the second quantity exceeds a preset quantity threshold;
[0022] If it is determined that the second number does not exceed the preset number threshold, determining the touch period to be an abnormal touch period;
[0023] In the case where it is determined that the second number exceeds the preset number threshold, determining whether the touch state does not include the second touch state;
[0024] In a case where it is determined that the touch state does not include the second touch state, determining the touch period to be an abnormal touch period;
[0025] In a case where it is determined that the touch state includes the second touch state, determining whether the touch state includes the third touch state;
[0026] In a case where it is determined that the touch state includes the third touch state, determining the touch period to be an abnormal touch period;
[0027] In the case where it is determined that the touch state does not include the third touch state, determining the touch point position change trend by using a preset position change trend algorithm according to the position coordinates of each touch point;
[0028] Determine whether the change trend of the contact position conforms to the preset change trend;
[0029] When it is determined that the change trend of the contact point position does not conform to the preset change trend, the touch cycle is determined to be an abnormal touch cycle.
[0030] In one implementation, determining whether each touch data is abnormal jitter data based on the touch point position coordinates in the second amount of touch data includes:
[0031] Determine a first position interval based on the touch point position coordinates at a previous current time point and the touch point position coordinates at a next current time point according to the time sequence of the current time points;
[0032] Determining whether the first position spacing exceeds a preset spacing;
[0033] When it is determined that the first position interval exceeds the preset interval, the output data at the next current time point is determined as abnormal jitter data.
[0034] In one implementation, determining the touch angle slope according to a second amount of touch data included in the touch cycle includes:
[0035] The touch angle slope is determined based on the touch point position coordinates in the second amount of touch data according to a straight line least squares fitting criterion.
[0036] In one implementation, determining the touch angle of the operating finger based on at least one touch angle slope includes:
[0037] When the touch angle slope is one, determining the touch angle of the operating finger according to the touch angle slope based on an inverse tangent function criterion;
[0038] In the case where there are multiple touch angle slopes, determining a touch angle average slope based on the multiple touch angle slopes;
[0039] The touch angle of the operating finger is determined according to the touch angle mean slope based on the inverse tangent function criterion.
[0040] In one implementation, identifying a screen direction of a touch screen device according to a touch angle includes:
[0041] Determine the touch direction based on the touch point location coordinates;
[0042] Identify the screen orientation of a touch screen device based on the touch direction and touch angle.
[0043] In one implementation, determining the touch direction based on the touch point position coordinates includes:
[0044] Determine a second position spacing by using the position coordinates of each touch point and the position coordinates of the starting touch point corresponding to the first touch state;
[0045] determining a maximum position spacing from the plurality of second position spacings;
[0046] The vector orientation with the coordinates of the initial touch point position as the starting point and the coordinates of the touch point position corresponding to the maximum position interval as the end point is determined as the touch direction.
[0047] In one embodiment, the touch data further includes a touch pressure value;
[0048] Determine the touch direction based on the touch point position coordinates, including:
[0049] determining a maximum touch pressure value from the plurality of touch pressure values;
[0050] The vector orientation with the coordinates of the initial touch point position as the starting point and the coordinates of the touch point position corresponding to the maximum touch pressure value as the end point is determined as the touch direction.
[0051] In one embodiment, the operating hand is the right hand;
[0052] Identify the screen direction of the touch screen device based on the touch direction and touch angle, including:
[0053] When the touch angle is within the first angle range and the touch direction points to the interval between the positive direction of the X-axis and the positive direction of the Y-axis in the pixel coordinate system, the screen direction is identified as the first direction;
[0054] When the touch angle is within the second angle range and the touch direction points to the interval between the negative direction of the X axis and the positive direction of the Y axis in the pixel coordinate system, the screen direction is identified as the second direction;
[0055] When the touch angle is within the third angle range and the touch direction points to the interval between the negative direction of the X axis and the negative direction of the Y axis in the pixel coordinate system, the screen direction is identified as the third direction;
[0056] When the touch angle is within the fourth angle range and the touch direction points to the interval between the positive direction of the X axis and the negative direction of the Y axis in the pixel coordinate system, the screen direction is identified as the fourth direction.
[0057] In one embodiment, the operating hand is the left hand;
[0058] Identify the screen direction of the touch screen device based on the touch direction and touch angle, including:
[0059] When the touch angle is within the fourth angle range and the touch direction points to the interval between the positive direction of the X-axis and the positive direction of the Y-axis in the pixel coordinate system, the screen direction is identified as the fourth direction;
[0060] When the touch angle is within the third angle range and the touch direction points to the interval between the negative direction of the X axis and the positive direction of the Y axis in the pixel coordinate system, the screen direction is identified as the third direction;
[0061] When the touch angle is within the second angle range and the touch direction points to the interval between the negative direction of the X axis and the negative direction of the Y axis in the pixel coordinate system, the screen direction is identified as the second direction;
[0062] When the touch angle is within the first angle range and the touch direction points to a range between the positive direction of the X axis and the negative direction of the Y axis in the pixel coordinate system, the screen direction is identified as the first direction.
[0063] In a second aspect, an embodiment of the present invention provides a device for identifying screen direction, which is applied to a touch screen device, and the device includes:
[0064] A collection module, for each operating finger of the same operating hand, performs: when a touch operation of the operating finger is received, a first amount of touch data corresponding to the touch operation is collected at a preset time interval within a preset time period; wherein the touch data includes a touch state and a current time point;
[0065] A splitting module, configured to split the first amount of touch data based on the current time point and the touch state to obtain at least one touch cycle; wherein the touch cycle includes a second amount of touch data, and the second amount is less than or equal to the first amount;
[0066] A first determining module is configured to perform, for each touch cycle in at least one touch cycle: determining a touch angle slope according to a second amount of touch data included in the touch cycle;
[0067] A second determination module, configured to determine a touch angle of an operating finger based on at least one touch angle slope;
[0068] The recognition module is used to recognize the screen direction of the touch screen device according to the touch angle.
[0069] In a third aspect, an embodiment of the present invention provides an electronic device, which includes: a processor and a memory, the processor is used to execute a program for screen direction recognition stored in the memory to implement the above-mentioned screen direction recognition method.
[0070] 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 of screen direction recognition.
[0071] The method, device, electronic device and storage medium for screen direction recognition provided by the embodiment of the present invention include: executing for each operating finger of the same operating hand: when receiving a touch operation of the operating finger, collecting a first number of touch data corresponding to the touch operation at a preset time interval within a preset time period; wherein the touch data includes a touch state and a current time point; splitting the first number of touch data based on the current time point and the touch state to obtain at least one touch cycle; wherein the touch cycle includes a second number of touch data, and the second number is less than or equal to the first number; executing for each touch cycle in at least one touch cycle: determining a touch angle slope according to the second number of touch data included in the touch cycle; determining a touch angle of the operating finger based on at least one touch angle slope; and identifying the screen direction of the touch screen device according to the touch angle. The above technical solution determines the touch angle only through the touch operation of the user touching the screen, and then identifies the screen direction through the touch angle, without the need to identify the screen direction through an acceleration sensor, effectively avoiding the problem of being unable to identify the screen direction due to damage to the acceleration sensor, and greatly saving the manufacturing cost because no acceleration sensor needs to be deployed. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 A flowchart of an embodiment of a method for identifying screen direction provided by an embodiment of the present invention;
[0073] Figure 2 A display diagram of touch data provided by an embodiment of the present invention;
[0074] Figure 3 A schematic diagram of a pixel coordinate system of a touch screen device provided by an embodiment of the present invention;
[0075] Figure 4 A schematic diagram of a screen direction display provided by an embodiment of the present invention;
[0076] Figure 5 A graph showing changes in the coordinates of a contact point of a finger center point provided by an embodiment of the present invention;
[0077] Figure 6 A schematic diagram of a touch angle slope principle provided by an embodiment of the present invention;
[0078] Figure 7 A schematic diagram of a pixel coordinate system of another touch screen device provided by an embodiment of the present invention;
[0079] Figure 8 A schematic diagram of screen direction recognition provided by an embodiment of the present invention;
[0080] Fig. 9 A block diagram of an embodiment of a device for identifying screen direction provided by an embodiment of the present invention;
[0081] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0082] 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.
[0083] 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.
[0084] An embodiment of the present invention provides a method for identifying screen direction, which is applied to a touch device, wherein the touch screen device refers to a device including a touch screen. As an input device, the touch screen can realize human-computer interaction simply, conveniently and naturally, and is mainly used for public information query, industrial control, military command, electronic games, multimedia teaching, etc. In one embodiment of the present invention, the touch screen device includes one or more combinations of a smart phone, a tablet computer, an industrial computer, and a touch and display driver integration (TDDI) device.
[0085] See also Figure 1 , Figure 1 A flow chart of an embodiment of a method for identifying screen direction provided by an embodiment of the present invention. Figure 1 The process shown may include the following steps:
[0086] Step 101 is performed for each operating finger of the same operating hand: when a touch operation of the operating finger is received, a first amount of touch data corresponding to the touch operation is collected at a preset time interval within a preset time period; wherein the touch data includes a touch state and a current time point;
[0087] Typically, the duration of a touch operation is 0.4 seconds to 2 seconds. In this embodiment, in order to be able to fully collect touch data of the touch operation, in this embodiment, a collection time period, i.e., a preset time period, is pre-set. The preset time period can be set to a duration of 6 seconds, 7 seconds, or 8 seconds. The specific preset time period can be set according to actual needs and is not limited here. In addition, the touch data can be collected at the millisecond level at a preset time interval to ensure the accuracy and reliability of the data. In one embodiment, taking a screen touch sampling rate of 60 Hz as an example, the time interval for collecting touch data each time is 1 / 60 second, wherein the preset time interval can also be set according to actual needs and is not limited here.
[0088] The current time point is the current system moment when the touch data is collected. The current time point is also in milliseconds. The touch state is used to indicate the specific operation mode of the operating finger on the touch screen device. The touch state can be finger pressing, finger moving, finger staying (no change in position relative to the previous moment), finger lifting, and cancel (abnormal leaving the screen, unexpected interruption, such as incoming phone calls and other high-priority system events). In this embodiment, different touch states are represented by corresponding identifiers. For example, the identifier corresponding to finger pressing is 0, the identifier corresponding to finger moving is 1, the identifier corresponding to finger staying is 2, the identifier corresponding to finger lifting is 3, and the identifier corresponding to cancel is 4; in order to understand the touch data, such as Figure 2 As shown, each collected touch data is recorded in detail.
[0089] Step 102, splitting the first amount of touch data based on the current time point and the touch state to obtain at least one touch cycle; wherein the touch cycle includes a second amount of touch data, and the second amount is less than or equal to the first amount;
[0090] A touch cycle can be defined as the time from when the operating finger presses down and contacts the screen to when the finger leaves the screen. In actual applications, due to the long preset time period, the user may press down and leave the screen once or multiple times within the preset time period. Therefore, one or more touch cycles can be collected within the preset time point. In order to facilitate the analysis of the touch operations of each touch cycle, it is necessary to first split all the collected touch data to obtain one or more touch cycles.
[0091] If the user presses and releases the screen only once within the preset time period, then the first number of touch data collected is all the touch data included in the touch cycle, that is, the second number of touch data included in the touch cycle is the same as the first number of touch data collected in step 101.
[0092] If the user presses and releases the screen multiple times within a preset time period, the second number of touch data included in each touch cycle in the multiple touch cycles will be smaller than the first number of touch data collected in step 101, and since the touch durations of the various touch cycles are inconsistent, the second number of touch data included in the various touch cycles may also be inconsistent.
[0093] Specifically, the first number of touch data is split based on the current time point and the touch state to obtain at least one touch cycle, including: traversing the touch states in the first number of touch data according to the time sequence of the current time point; splitting the first number of touch data with the touch state as the first touch state as the critical point to obtain at least one touch cycle.
[0094] The first touch state is the state where the finger is pressed. Figure 2 As shown, since there are three marks 0 corresponding to finger pressing in the table, the first amount of touch data collected above can be split into three, and then three touch cycles can be obtained.
[0095] Step 103, for each touch cycle in at least one touch cycle, executing: determining a touch angle slope according to a second amount of touch data included in the touch cycle;
[0096] In this embodiment, the touch angle slope refers to the amount of inclination between the straight line fitted by each touch data in the touch cycle and the horizontal axis X-axis of the pixel coordinate system. The pixel coordinate system is established with the point on the upper left corner of the screen of the touch screen device as the coordinate origin, the horizontal direction as the X-axis, and the vertical direction as the Y-axis. Figure 3 shown.
[0097] Step 104, determining a touch angle of the operating finger based on at least one touch angle slope;
[0098] If the touch cycle is one, the touch angle is determined by one touch angle slope; if the touch cycle is multiple, the touch angle is determined by multiple touch angle slopes; wherein the touch angle can be used to characterize the angle between the operating finger and the above-mentioned horizontal coordinate X-axis.
[0099] Step 105: Identify the screen direction of the touch screen device according to the touch angle.
[0100] When the software content orientation on a touchscreen device is adapted to the hardware rotation, it usually includes Figure 4 The four situations shown, from left to right, are: vertical portrait, first horizontal, inverted, second horizontal, combined with Figure 3The screen directions are: positive direction of the Y axis, negative direction of the X axis, negative direction of the Y axis, and positive direction of the X axis. In this embodiment, the touch angle can be determined to identify which of the four directions the current screen is in, which facilitates the adaptation of software content to hardware directions and is convenient for users to use.
[0101] The method for screen direction identification provided by the embodiment of the present invention can determine the touch angle only through the touch operation of the user touching the screen, and then identify the screen direction through the touch angle. There is no need to use an acceleration sensor to identify the screen direction, which effectively avoids the problem of screen direction being unable to be identified due to damage to the acceleration sensor. In addition, since there is no need to deploy an acceleration sensor, the production cost is greatly saved.
[0102] Generally, after splitting and obtaining at least one touch cycle, in order to ensure the accuracy of determining the touch angle slope, it is necessary to perform integrity analysis on each touch cycle in at least one touch cycle, and remove abnormal touch cycles or abnormal touch data in the touch cycles. The specific implementation process is implemented through steps A1 to A4:
[0103] Step A1, determining whether a touch period is an abnormal touch period based on the touch point position coordinates and the touch state in the second amount of touch data;
[0104] The specific process of determining whether the touch cycle is abnormal can be implemented through steps B1 to B9:
[0105] Step B1, determining whether the second quantity exceeds a preset quantity threshold;
[0106] To ensure the accuracy of subsequent calculations, the number of valid touch data in each valid touch cycle cannot be less than a preset threshold, such as 10. If the number of touch data in a touch cycle is less than 10, the data set is unreliable and the touch cycle is deleted. Figure 2 As shown, since there are only 6 touch data less than 10 in the third touch cycle in the table, the third touch cycle in the table is determined as an abnormal touch cycle and is eliminated.
[0107] According to the above description, when it is determined that the second number does not exceed the preset number threshold, step B2 is executed, and when it is determined that the second number exceeds the preset number threshold, step B3 is executed to further determine whether there is any subsequent abnormality.
[0108] Step B2, determining that the touch cycle is an abnormal touch cycle;
[0109] Step B3, determining whether the touch state does not include the second touch state;
[0110] A complete touch cycle should include the states of finger pressing and finger lifting. The above-mentioned second touch state is the state of finger lifting. When it is determined that the touch state does not include the second touch state, that is, the state of finger lifting is not included, it means that the touch cycle is incomplete, and step B4 is executed to determine it as an abnormal touch cycle; when it is determined that the touch state includes the second touch state, it means that the state of finger lifting is included, and further determination is required to determine whether it is abnormal.
[0111] Step B4, determining that the touch cycle is an abnormal touch cycle;
[0112] Step B5, determining whether the touch state includes a third touch state;
[0113] The above-mentioned third touch state is a canceled state. If the touch cycle contains a canceled touch state, it means that a high-priority system event such as an incoming phone call has occurred during the touch process, thereby canceling the touch cycle. That is, when it is determined that the touch state includes the third touch state, step B6 is executed to determine that the touch cycle is an abnormal touch cycle; when it is determined that the touch state does not include the third touch state, further determination of whether it is abnormal is required.
[0114] Step B6, determining that the touch cycle is an abnormal touch cycle;
[0115] Step B7, determining the touch point position change trend by using a preset position change trend algorithm according to the position coordinates of each touch point;
[0116] The general touch operation process can be decomposed into two sub-processes: finger pressing process and finger lifting process. Since most users have an inclination angle between their fingers and the screen when they click on the screen, it can also be understood as the process of the finger center point changing. According to the different directions of the finger relative to the screen, several common directions of finger pressing the screen process are enumerated, and the changes of the horizontal and vertical coordinates X and Y of the finger center point are analyzed, such as Figure 5 As shown in the figure, the first figure shows the change of the contact position coordinates of the center point of the finger when the operating finger presses in the lower left direction, and the second figure shows the change of the contact position coordinates of the center point of the finger when the operating finger presses horizontally in the left direction. Through a large amount of data analysis, it is concluded that during the touch operation, there is at least one dimension of the horizontal and vertical coordinates, which changes from small to large and then from large to small compared to the absolute value of the initial coordinates when the finger is pressed. It can be deduced that during the entire touch operation, the change process of the contact position coordinates is analyzed in time sequence: compared with the contact position coordinates of the center point of the first finger that contacts the screen, the distance between the contact position coordinates corresponding to the subsequent touch data and the first contact position coordinates gradually increases, reaches a peak value, and then gradually decreases.
[0117] Through the above description, it is necessary to first determine the touch point position change trend through a preset position change trend algorithm according to each touch point position coordinate, and further perform step B8, wherein the touch point position coordinate is a pixel coordinate on a pixel coordinate system established with a coordinate origin on the touch screen device, that is, the touch point position coordinate is used to represent the x, y pixel value specifically corresponding to the finger center in the pixel coordinate system, such as Figure 2 shown.
[0118] The above-mentioned preset position change trend algorithm can be a trend analysis method, a moving average method, a statistical test method, a regression analysis method, a distance analysis method, etc., which can determine the position change trend through the contact position coordinates, and will not be described one by one here.
[0119] Now, we take the distance analysis method as an example to traverse all the touch data in the touch cycle, set the touch point position coordinates of the first finger pressed state as the first coordinate P (Xstart, Ystart), and calculate the distance S between the touch point position coordinates P (Xtemp, Ytemp) in all subsequent touch data and the first coordinate. The distance S calculation formula is:
[0120] (Xtemp-Xstart) 2 +(Ytemp-Ystart) 2 =S 2 ;
[0121] Then, the change trend of the contact point position is determined by using the obtained multiple distances S.
[0122] Step B8, determining whether the change trend of the contact position conforms to the preset change trend;
[0123] The preset change trend is a change trend in which the distance between the touch point position coordinates corresponding to each touch data within the touch cycle and the first touch point position coordinates gradually increases, reaches a peak value, and then gradually decreases.
[0124] When the contact position change trend determined by step B8 does not conform to the preset change trend, execute step B9 to determine that the touch cycle is an abnormal touch cycle; when it is determined that the contact position change trend conforms to the preset change trend, it indicates that the touch cycle determined by steps B1 to B9 meets the requirements and is not an abnormal touch cycle.
[0125] Step B9, determining that the touch cycle is an abnormal touch cycle.
[0126] Step A2, when the touch cycle is determined to be an abnormal touch cycle, deleting the touch cycle;
[0127] The abnormal touch period is deleted, and it is considered that the abnormal touch period does not participate in the calculation when the touch angle slope is determined subsequently.
[0128] Step A3, when it is determined that the touch cycle is not an abnormal touch cycle, determining whether each touch data is abnormal jitter data based on the touch point position coordinates in the second amount of touch data;
[0129] The specific process of determining whether the touch data is abnormal jitter data can be implemented through steps C1 to C3:
[0130] Step C1, determining a first position spacing based on the touch point position coordinates at a previous current time point and the touch point position coordinates at a next current time point in accordance with the time sequence of the current time points;
[0131] The touch point position coordinates at the previous current time point are P1 (X2, Y2), the touch point position coordinates at the next current time point are P2 (X1, Y1), and the calculation formula for the first position interval S1 is:
[0132]
[0133] Step C2, determining whether the first position spacing exceeds a preset spacing;
[0134] The preset spacing can be set to the maximum diameter of the current user's finger area. When the spacing at the first position exceeds the preset spacing, it indicates that the user's touch operation is abnormal and does not conform to normal click or slide operations, and is regarded as abnormal jitter data. The preset spacing can be set according to actual needs and is not limited here.
[0135] Step C3: when it is determined that the first position interval exceeds the preset interval, the output data at the next current time point is determined as abnormal jitter data.
[0136] Step A4: when it is determined that the touch data is abnormal jitter data, the abnormal jitter data is deleted from the touch cycle.
[0137] Through steps C1 to C3, when it is determined that the touch data in the touch cycle is abnormal jitter data, the abnormal jitter data is deleted from the touch cycle, which can effectively avoid the inaccuracy of subsequent calculations caused by the abnormal data.
[0138] In the case where no abnormal touch cycle and / or abnormal jitter data is determined through steps A1 to A4, there is no need to delete data. It can be seen from the description that in the case where no abnormal jitter data is deleted, the second amount of touch data for determining the touch angle slope remains unchanged, and in the case where abnormal jitter data is deleted, the second amount of touch data used for determining the touch angle slope is the amount of data after the abnormal jitter data is deleted. In the above step 103, determining the touch angle slope according to the second amount of touch data included in the touch cycle includes:
[0139] The touch angle slope is determined based on the touch point position coordinates in the second amount of touch data according to a straight line least squares fitting criterion.
[0140] The fitted straight line does not necessarily have to pass through all given points, but the straight line can represent the distribution of all touch points. The least squares fitting method of the straight line is used, and the "best" fitting criterion is to fit a "best" straight line through the touch point position coordinates to minimize the sum of the squares of the residuals of all touch points.
[0141] The formula of the fitting line is assumed to be: y=k*x+b; wherein k is the touch angle slope, x and y are the X-axis pixel coordinate and the Y-axis pixel coordinate in the touch point position coordinate, respectively, and b is the displacement.
[0142] Then the slope of the touch angle of the fitting line is Among them, x i represents the x-axis pixel coordinate of the i-th touch point position, y i represents the Y-axis pixel coordinate in the i-th touch point position coordinate, n represents the number of touch point position coordinates, i.e., the second number, represents the average value of the X-axis pixel coordinates in the second number of contact position coordinates, represents the average value of the Y-axis pixel coordinates in the second number of touch point position coordinates. The touch angle slope can be accurately determined by the above formula.
[0143] The process of determining the touch angle of the operating finger based on at least one touch angle slope in the above step 104 can be implemented through steps D1 to D3:
[0144] Step D1, when the touch angle slope is one, determining the touch angle of the operating finger according to the touch angle slope based on an inverse tangent function criterion;
[0145] like Figure 6 As shown, the touch angle slope is also called the "angle coefficient", which represents the degree of inclination of a straight line in a plane rectangular coordinate system to the horizontal axis X in the pixel coordinate system. The tangent value tanA of the inclination angle A of the straight line to the X-axis is called the "slope" of the straight line, and is recorded as k, and the formula is k=tanA.
[0146] The inverse tangent trigonometric function is a function that uses the ratio of the opposite side and the adjacent side of a known right triangle to find the angle between them. In trigonometry, the inverse tangent is defined as an angle, which is the inverse function of the tangent value. Since the inverse tangent function is defined as finding the angle between the known opposite side and the adjacent side, it can be regarded as the x-coordinate and y-coordinate of the rectangular coordinate system. According to the definition of the slope, the inverse tangent function can be used to find the angle between a straight line with a known slope on a plane and the coordinate axis. The touch angle A is obtained using the inverse tangent function criterion, A=Arctan k.
[0147] Step D2, when there are multiple touch angle slopes, determining a touch angle average slope based on the multiple touch angle slopes;
[0148] The touch angle mean slope is obtained by averaging multiple touch angle slopes.
[0149] Step D3, determining the touch angle of the operating finger according to the touch angle mean slope based on the inverse tangent function criterion.
[0150] Similarly, the touch angle is determined based on the touch angle mean slope using the process described in step D1, and this process will not be described in detail.
[0151] In another embodiment, after determining multiple touch cycles, one touch cycle can be selected from them, and the touch angle slope can be determined using the touch data in this touch cycle. Then, the touch angle can be determined. The specific method for determining the touch angle slope and the touch angle is the same as above and will not be repeated here.
[0152] In the above step 105, the screen direction of the touch screen device can be identified according to the touch angle through steps E1 to E2:
[0153] Step E1, determining the touch direction based on the touch point position coordinates;
[0154] In the previous step, after the touch angle is determined according to the touch data in the touch cycle, there are two directions in which the operating finger points to completely opposite directions, such as Figure 7 As shown, it is not possible to determine whether it is a touch angle alone. Figure 7 In the touch screen, the pointing direction of the operating finger 1 or the pointing direction of the operating finger 2 is determined, so the touch direction needs to be determined.
[0155] Since the fingertips of the operating fingers are ellipsoidal in shape and the muscles are elastic, during the touch operation, the operating fingers will change the pressing force as they are pressed, and at the same time change the contact area between the screen and the finger, that is, change the position of the finger center point. It can be understood that the pressing force gradually increases during the finger pressing process, and the contact area also continues to increase, that is, it gradually evolves from a smaller elliptical area to a larger elliptical area. Since most users have an inclined angle between their fingers and the screen when clicking the screen, the finger center point of the ellipse corresponding to the contact area between the finger and the screen is also constantly changing. When the finger is lifted, the pressing force gradually decreases, and the contact area also decreases, that is, it gradually evolves from a larger elliptical area to a smaller elliptical area, and the center point is also constantly changing.
[0156] Therefore, the touch direction can be determined by the pressing force or the position of the center point of the finger. In one embodiment, the process of determining the touch direction is: determining the second position spacing of each touch point position coordinate and the starting contact point position coordinate corresponding to the first touch state; determining the maximum position spacing from multiple second position spacings; and determining the touch direction as the vector orientation with the starting contact position coordinate as the starting point and the contact position coordinate corresponding to the maximum position spacing as the end point.
[0157] The calculation process of the second position spacing is the same as the calculation process of the distance S in step B7, and will not be described in detail here. If there are multiple maximum position spacings, the touch point position coordinates corresponding to the maximum position spacing in time are selected in chronological order, and the direction from the starting touch point position coordinates to the touch point position coordinates corresponding to the maximum position spacing is the touch direction.
[0158] If there is a pressure sensor on the touch screen terminal, the touch pressure value during the touch operation can also be collected, that is, the touch data also includes the touch pressure value, such as Figure 2 As shown. From the above description, it can be known that during the touch operation, the pressing force will have a peak value, and the touch direction of the operating finger can be determined by the pressing force of this peak value. The touch direction is determined based on the touch point position coordinates, specifically including: determining the maximum touch pressure value from multiple touch pressure values; taking the starting touch point position coordinates as the starting point and the touch point position coordinates corresponding to the maximum touch pressure value as the end point, the vector direction is determined as the touch direction. That is, the direction from the starting touch point position coordinates to the touch point position coordinates corresponding to the maximum touch pressure value is the touch direction.
[0159] Step E2: Identify the screen direction of the touch screen device according to the touch direction and the touch angle.
[0160] When the operator is the right hand, identifying the screen direction of the touch screen device according to the touch direction and the touch angle may be achieved through steps F1 to F4:
[0161] Step F1, when the touch angle is within a first angle range and the touch direction points to an interval between a positive direction of the X-axis and a positive direction of the Y-axis in a pixel coordinate system, identifying the screen direction as a first direction;
[0162] For ease of explanation, Figure 8 As shown, Figure 4 Taking the pixel coordinate system established when the screen is in vertical portrait orientation as an example, the first angle range is 0 to 90 degrees. Then, when the touch angle and the touch direction are both in the first quadrant 1, it is recognized that the screen direction is the first direction, that is, the screen is in vertical portrait orientation.
[0163] Step F2, when the touch angle is within the second angle range and the touch direction points to the interval between the negative direction of the X axis and the positive direction of the Y axis in the pixel coordinate system, identifying the screen direction as the second direction;
[0164] The second angle range is 90 to 180 degrees. If the touch angle and touch direction are both within the range of Figure 7 When the screen is in the second quadrant 2 in the horizontal direction, it is recognized that the screen direction is the second direction, that is, the first horizontal screen.
[0165] Step F3, when the touch angle is within the third angle range and the touch direction points to the interval between the negative direction of the X axis and the negative direction of the Y axis in the pixel coordinate system, identifying the screen direction as the third direction;
[0166] The third angle range is 180 to 270 degrees. If the touch angle and touch direction are both within the range of Figure 7 When the screen is in the third quadrant 3, it is recognized that the screen direction is the third direction, which is inverted.
[0167] Step F4, when the touch angle is within the fourth angle range and the touch direction points to the interval between the positive direction of the X axis and the negative direction of the Y axis in the pixel coordinate system, identifying the screen direction as the fourth direction.
[0168] The fourth angle range is 270 to 360 degrees. If the touch angle and touch direction are both within the range of Figure 7 When the screen is in the fourth quadrant 4, it is recognized that the screen direction is the fourth direction, that is, the second horizontal screen.
[0169] In the case where the operator is the left hand, identifying the screen direction of the touch screen device according to the touch direction and the touch angle may be achieved through steps G1 to G4:
[0170] Step G1, when the touch angle is within a fourth angle range and the touch direction points to an interval between a positive direction of the X axis and a positive direction of the Y axis in the pixel coordinate system, identifying the screen direction as a fourth direction;
[0171] Step G2, when the touch angle is within a third angle range and the touch direction points to an interval between the negative direction of the X axis and the positive direction of the Y axis in the pixel coordinate system, identifying the screen direction as the third direction;
[0172] Step G3, when the touch angle is within the second angle range and the touch direction points to the interval between the negative direction of the X axis and the negative direction of the Y axis in the pixel coordinate system, identifying the screen direction as the second direction;
[0173] Step G4: when the touch angle is within the first angle range and the touch direction points to the interval between the positive direction of the X axis and the negative direction of the Y axis in the pixel coordinate system, identify the screen direction as the first direction.
[0174] The first angle range, the second angle range, the third angle range and the fourth angle range in steps G1 to G4 are the same as the corresponding angle ranges described in the above steps F1 to F4, and the screen recognition method when the operating hand is the left hand is exactly the opposite of the screen recognition method when the operating hand is the right hand, which will not be repeated here.
[0175] The embodiment of the present invention provides a device for identifying screen direction, which is applied to a touch screen device. Fig. 9 , is a block diagram of an embodiment of a device for identifying screen direction provided by an embodiment of the present invention. Fig. 9 As shown, the device comprises:
[0176] The collection module 900 is used to perform the following steps for each operating finger of the same operating hand: when a touch operation of the operating finger is received, collect a first amount of touch data corresponding to the touch operation at a preset time interval within a preset time period; wherein the touch data includes a touch state and a current time point;
[0177] A splitting module 901 is used to split the first amount of touch data based on the current time point and the touch state to obtain at least one touch cycle; wherein the touch cycle includes a second amount of touch data, and the second amount is less than or equal to the first amount;
[0178] A first determining module 902 is configured to perform, for each touch cycle in at least one touch cycle: determining a touch angle slope according to a second amount of touch data included in the touch cycle;
[0179] A second determination module 903, configured to determine a touch angle of an operating finger based on at least one touch angle slope;
[0180] The identification module 904 is used to identify the screen direction of the touch screen device according to the touch angle.
[0181] The device for identifying the screen direction provided by the embodiment of the present invention determines the touch angle only through the touch operation of the user touching the screen, and then identifies the screen direction through the touch angle. There is no need to identify the screen direction through an acceleration sensor, which effectively avoids the problem of being unable to identify the screen direction due to damage to the acceleration sensor. In addition, since there is no need to deploy an acceleration sensor, the production cost is greatly saved.
[0182] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, Fig.10The electronic device 500 shown includes: at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503. The various components in the electronic device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 505 is not shown in FIG. Fig.10 Various buses are labeled as bus system 505 .
[0183] The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0184] It can be understood that the memory 502 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 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0185] In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and an application program 5022 .
[0186] The operating system 5021 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 5022 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 5022.
[0187] In the embodiment of the present invention, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the application 5022, the processor 501 is used to execute the method steps provided by each method embodiment.
[0188] The method disclosed in the above embodiment of the present invention can be applied to the processor 501, or implemented by the processor 501. The processor 501 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 501 or the instruction in the form of software. The above processor 501 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 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.
[0189] 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.
[0190] 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.
[0191] The electronic device provided in this embodiment may be Fig.10 The electronic device shown in FIG. 1 may perform the following steps: Figure 1 All steps of the method for screen direction recognition in , thereby realizing Figure 1 For details, please refer to the technical effect of the method for identifying screen direction shown in Figure 1 For the sake of brevity, the relevant description is not repeated here.
[0192] 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.
[0193] When one or more programs in the storage medium can be executed by one or more processors, the above-mentioned method of identifying the screen direction can be implemented.
[0194] The processor is used to execute the screen direction recognition program stored in the memory to implement the steps of the following screen direction recognition method.
[0195] 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.
[0196] 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.
[0197] 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 identifying screen direction, characterized in that: Applied to a touch screen device, the method comprises: For each operating finger of the same operating hand, the following steps are performed: when a touch operation of the operating finger is received, a first amount of touch data corresponding to the touch operation is collected at a preset time interval within a preset time period; wherein the touch data includes a touch state and a current time point; Splitting the first amount of touch data based on the current time point and the touch state to obtain at least one touch cycle; wherein the touch cycle includes a second amount of the touch data, and the second amount is less than or equal to the first amount; For each of the at least one touch cycle, performing: determining a touch angle slope according to the second amount of touch data included in the touch cycle; determining a touch angle of the operating finger based on at least one of the touch angle slopes; The screen direction of the touch screen device is identified according to the touch angle.
2. The method according to claim 1, characterized in that: The step of splitting the first amount of touch data based on the current time point and the touch state to obtain at least one touch cycle includes: Traversing the touch states in the first amount of touch data according to the time sequence of the current time point; The first number of touch data is split based on the touch state being a first touch state as a critical point to obtain at least one touch cycle.
3. The method according to claim 1, characterized in that The touch data also includes touch point position coordinates; wherein the touch point position coordinates are pixel coordinates on a pixel coordinate system established with a coordinate origin on the touch screen device; Before determining the touch angle slope according to the second amount of touch data included in the touch cycle, the method further includes: determining whether the touch period is an abnormal touch period based on the touch point position coordinates and the touch state in the second amount of touch data; In the case where it is determined that the touch cycle is an abnormal touch cycle, deleting the abnormal touch cycle; In a case where it is determined that the touch cycle is not an abnormal touch cycle, determining whether each of the touch data is abnormal jitter data based on the touch point position coordinates in the second number of touch data; When it is determined that the touch data is abnormal jitter data, the abnormal jitter data is deleted from the touch cycle.
4. The method according to claim 3, characterized in that The determining whether the touch cycle is an abnormal touch cycle based on the touch point position coordinates and the touch state in the second amount of touch data includes: determining whether the second quantity exceeds a preset quantity threshold; In the case where it is determined that the second number does not exceed the preset number threshold, determining that the touch cycle is an abnormal touch cycle; In the case where it is determined that the second number exceeds the preset number threshold, determining whether the touch state does not include the second touch state; In a case where it is determined that the touch state does not include the second touch state, determining that the touch period is an abnormal touch period; In a case where it is determined that the touch state includes the second touch state, determining whether the touch state includes a third touch state; In a case where it is determined that the touch state includes the third touch state, determining that the touch period is an abnormal touch period; In a case where it is determined that the touch state does not include the third touch state, determining a touch point position change trend according to each of the touch point position coordinates by using a preset position change trend algorithm; Determining whether the contact point position change trend conforms to a preset change trend; When it is determined that the change trend of the contact point position does not conform to the preset change trend, the touch cycle is determined to be an abnormal touch cycle.
5. The method according to claim 3, characterized in that: The determining whether each of the touch data is abnormal jitter data based on the touch point position coordinates in the second amount of touch data includes: Determine a first position spacing based on the touch point position coordinates at a previous current time point and the touch point position coordinates at a subsequent current time point according to the time sequence of the current time points; Determining whether the first position spacing exceeds a preset spacing; In the case where it is determined that the first position interval exceeds the preset interval, the output data at the next current time point is determined as abnormal jitter data.
6. The method according to claim 3, characterized in that The step of determining the touch angle slope according to the second amount of touch data included in the touch cycle comprises: The touch angle slope is determined based on the touch point position coordinates in the second amount of touch data according to a straight line least squares fitting criterion.
7. The method according to claim 1, characterized in that The determining the touch angle of the operating finger based on at least one touch angle slope includes: In a case where the touch angle slope is one, determining the touch angle of the operating finger according to the touch angle slope based on an inverse tangent function criterion; In the case where there are multiple touch angle slopes, determining a touch angle average slope based on the multiple touch angle slopes; The touch angle of the operating finger is determined according to the touch angle mean slope based on the inverse tangent function criterion.
8. The method according to claim 3, characterized in that The identifying the screen direction of the touch screen device according to the touch angle includes: Determining a touch direction based on the touch point position coordinates; The screen direction of the touch screen device is identified according to the touch direction and the touch angle.
9. The method according to claim 8, characterized in that The determining the touch direction based on the touch point position coordinates includes: Determine a second position spacing by using the coordinates of each of the contact point positions and the coordinates of the starting contact point position corresponding to the first touch state; determining a maximum position spacing from a plurality of said second position spacings; The vector orientation with the initial touch point position coordinate as the starting point and the touch point position coordinate corresponding to the maximum position interval as the end point is determined as the touch direction.
10. The method according to claim 8, characterized in that The touch data also includes a touch pressure value; The determining the touch direction based on the touch point position coordinates includes: determining a maximum touch pressure value from the plurality of touch pressure values; The vector orientation with the starting touch point position coordinates as the starting point and the touch point position coordinates corresponding to the maximum touch pressure value as the end point is determined as the touch direction.
11. The method according to claim 8, characterized in that The operating hand is the right hand; The identifying the screen direction of the touch screen device according to the touch direction and the touch angle includes: When the touch angle is within a first angle range and the touch direction points to an interval between a positive direction of an X-axis and a positive direction of a Y-axis in the pixel coordinate system, identifying the screen direction as a first direction; When the touch angle is within the second angle range and the touch direction points to the interval between the negative direction of the X axis and the positive direction of the Y axis in the pixel coordinate system, identifying the screen direction as the second direction; When the touch angle is within a third angle range and the touch direction points to an interval between a negative direction of the X axis and a negative direction of the Y axis in the pixel coordinate system, identifying the screen direction as a third direction; When the touch angle is within a fourth angle range and the touch direction points to a range between a positive direction of the X axis and a negative direction of the Y axis in the pixel coordinate system, the screen direction is identified as a fourth direction.
12. The method according to claim 8, characterized in that The operating hand is the left hand; The identifying the screen direction of the touch screen device according to the touch direction and the touch angle includes: When the touch angle is within a fourth angle range and the touch direction points to an interval between a positive direction of the X-axis and a positive direction of the Y-axis in the pixel coordinate system, identifying the screen direction as a fourth direction; When the touch angle is within a third angle range and the touch direction points to an interval between a negative direction of the X-axis and a positive direction of the Y-axis in the pixel coordinate system, identifying the screen direction as a third direction; When the touch angle is within the second angle range and the touch direction points to the interval between the negative direction of the X-axis and the negative direction of the Y-axis in the pixel coordinate system, identifying the screen direction as the second direction; When the touch angle is within a first angle range and the touch direction points to a range between a positive direction of the X axis and a negative direction of the Y axis in the pixel coordinate system, the screen direction is identified as a first direction.
13. A device for identifying screen direction, characterized in that: Applied to a touch screen device, the device comprises: a collection module, configured to perform, for each operating finger of the same operating hand: when a touch operation of the operating finger is received, collect a first quantity of touch data corresponding to the touch operation at a preset time interval within a preset time period; wherein the touch data includes a touch state and a current time point; a splitting module, configured to split the first amount of touch data based on the current time point and the touch state to obtain at least one touch cycle; wherein the touch cycle includes a second amount of the touch data, and the second amount is less than or equal to the first amount; A first determining module is configured to perform, for each of the at least one touch cycle: determining a touch angle slope according to the second amount of touch data included in the touch cycle; A second determination module, configured to determine a touch angle of the operating finger based on at least one touch angle slope; The recognition module is used to recognize the screen direction of the touch screen device according to the touch angle.
14. An electronic device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a program for screen direction recognition stored in the memory to implement the method for screen direction recognition according to any one of claims 1 to 12.
15. 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 screen direction recognition according to any one of claims 1 to 12.