Cell switching method and electronic device

By displaying operation controls on the page of portable electronic devices and detecting changes in touch parameters to switch cells, the problem of high error rate in cell switching on touch screens is solved, achieving more efficient and accurate cell switching.

CN115639928BActive Publication Date: 2026-06-12DINGTALK (CHINA) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DINGTALK (CHINA) INFORMATION TECH CO LTD
Filing Date
2022-11-09
Publication Date
2026-06-12

Smart Images

  • Figure CN115639928B_ABST
    Figure CN115639928B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a cell switching method and an electronic device. The method comprises: displaying a page containing a table; displaying an operation control on the page; detecting a first touch operation performed on the operation control; and switching cells of the table according to a change parameter of a touch point of the first touch operation. The technical solution provided by the embodiments of the present application improves the accuracy of cell switching by using an operation control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and in particular to a cell switching method and an electronic device. Background Technology

[0002] With the development of electronic science and technology, portable and touch-screen electronic devices such as mobile phones, tablets, and smartwatches are commonly used and can install various types of apps, with increasingly powerful functions.

[0003] These portable electronic devices often have small touchscreens. When displaying pages containing tables, there is a need to switch between cells in the table. Currently, this is mainly achieved by selecting a cell through touch operation. However, because the area corresponding to the cell is small, it often leads to misoperation, thus failing to achieve accurate cell switching. Summary of the Invention

[0004] This application provides a cell switching method and an electronic device to solve the technical problem that the prior art cannot accurately achieve cell switching.

[0005] Firstly, this application provides a cell switching method, including:

[0006] Display the page containing the table;

[0007] The page displays operation controls;

[0008] Detect the first touch operation performed in the operation control;

[0009] Based on the change parameters of the touch point in the first touch operation, the table cells are switched.

[0010] Secondly, this application provides an electronic device including a storage component, a display component, and a processing component; the storage component stores one or more computer program instructions; the one or more computer program instructions are invoked and executed by the processing component to implement the cell switching method as described in the first aspect above.

[0011] In this embodiment, an operation control is displayed on a page containing a table, and a first touch operation performed on the operation control is detected. Based on the touch point change parameters of the first touch operation, cell switching in the table is performed. This embodiment, through the operation control and the first touch operation performed on the operation control, can achieve cell switching in the table based on touch point change parameters. Compared to a first touch operation targeting the area of ​​a cell, this significantly reduces the error rate and improves the accuracy of cell switching.

[0012] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 A flowchart of an embodiment of the cell switching method provided in this application is shown;

[0015] Figure 2 This illustration shows a structural diagram of an operation control provided in a practical application according to an embodiment of this application;

[0016] Figure 3 This illustration shows a schematic diagram of the directional region division of the operation controls provided in a practical application according to an embodiment of this application;

[0017] Figure 4 This illustration shows a structural diagram of yet another operation control provided in a practical application according to an embodiment of this application;

[0018] Figures 5a-5b The following are schematic diagrams illustrating the display of a touch interface in a practical application according to an embodiment of this application;

[0019] Figure 6 This illustration shows a structural schematic diagram of one embodiment of a cell switching device provided in this application.

[0020] Figure 7 This illustration shows a structural schematic diagram of one embodiment of an electronic device provided in this application. Detailed Implementation

[0021] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0022] In some of the processes described in the specification, claims, and accompanying drawings of this application, multiple operations appearing in a specific order are included. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The operation numbers, such as 101, 102, etc., are merely used to distinguish different operations and do not themselves represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first," "second," etc., in this document are used to distinguish different messages, devices, modules, etc., and do not represent a chronological order, nor do they limit "first" and "second" to different types.

[0023] The technical solutions of this application embodiment can be applied to portable electronic devices, which may include a touch screen to sense the user's touch operation in order to control the content displayed on the electronic device.

[0024] When displaying pages containing tables on electronic devices, there is a need to switch between cells to view or edit their content. Currently, this is mostly achieved by clicking on a cell within a range to select a cell. However, due to the size limitations of touchscreens on electronic devices, the cell areas within tables are relatively small, making accidental clicks easy and resulting in inaccurate and inefficient switching.

[0025] To improve the accuracy and efficiency of cell switching, the inventors, after a series of studies, proposed the technical solution of this application. In the embodiments of this application, a page containing a table is displayed; operation controls are displayed on the page; a first touch operation performed in the operation controls is detected; and cell switching is performed on the table based on the change parameters of the touch point of the first touch operation. This embodiment of the application, through operation controls and the first touch operation performed on the operation controls, can achieve cell switching in the table based on the change parameters of the touch point. Compared to clicking on the area of ​​a cell, this greatly reduces the error rate and improves the accuracy and efficiency of cell switching.

[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0027] Figure 1 This is a flowchart illustrating one embodiment of a cell switching method provided in this application. The technical solution of this embodiment is executed by a client deployed in an electronic device. The electronic device is equipped with a touch screen, providing a touch interface to display the content output by the client. The electronic device is typically equipped with a touch sensor to sense touch operations on the touch interface. Touch operations can include direct contact with the touch interface or sensing operations at a certain distance from the touch interface. The contact object is typically a user's finger or a stylus used by the user, etc., and this application does not limit its use.

[0028] The client can be the factory-configured program of the electronic device, or it can be a program reinstalled on the electronic device. The client can be a browser, an app, a web application such as an H5 (HyperText Markup Language 5) application, a lightweight application (also known as a mini-program), or a cloud application. The client can be deployed on the electronic device and depends on the device or certain apps on the device to run. The electronic device may have a display screen and support information browsing, such as a portable personal mobile terminal like a mobile phone, tablet, or smartwatch. Various other types of applications can usually be configured on the electronic device, such as human-computer interaction applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, and social media platform software. The electronic device typically includes at least one processing component and at least one storage component. The electronic device may also include basic configurations such as a network card chip, I / O bus, and audio / video components; this application does not limit these components. Optionally, depending on the implementation of the electronic device, it may also include some peripheral devices, such as a keyboard, mouse, input pen, printer, etc., which are not limited in this application.

[0029] Furthermore, the client in this embodiment can also establish a network connection with the server, with the network providing a communication link between the client and the server. The network can include various connection types, such as wired or wireless communication links, or fiber optic cables, etc. Optionally, the server can communicate with the user through a mobile network. Correspondingly, the mobile network standard can be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ (LTE+), 5G, WiMax, etc. Optionally, the client can also establish a communication connection with the server via Bluetooth, WiFi, infrared, etc.

[0030] The server side can include servers that provide various services, such as servers that support the models used on the client side for background training, or servers that process interactive information sent by the user.

[0031] It should be noted that the server can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server in a distributed system, or a server combined with blockchain. The server can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0032] The method may include the following steps:

[0033] 101: Displays a page containing a table.

[0034] This page can be a webpage provided by the server or a local page provided by the client.

[0035] This could involve displaying a page containing tables on a touchscreen interface. The table can consist of multiple cells, each containing table content. Selecting a cell allows users to view, edit, copy, or paste the table content.

[0036] In the client-side instant messaging application, the table can be a local file uploaded by the user. The client can generate a table page to display the table and support operations such as viewing and editing the table.

[0037] 102: Display operation controls on the page.

[0038] 103: Detect the first touch operation performed in the operation control.

[0039] In this embodiment of the application, when displaying a page containing a table, operation controls can be displayed on the page, and the user can perform a first touch operation on the operation controls.

[0040] The point of contact between the first touch operation and the touch interface forms a touch point. This first touch operation can be a sliding operation where the touch point position continuously changes, or a clicking operation where the touch point position remains constant. Click operations can be categorized based on touch duration: a single click with a touch duration less than a certain amount or a long press with a touch duration greater than a certain amount; they can also be categorized based on interval duration: multi-click operations with interval durations less than a certain amount.

[0041] Of course, for sliding operations where the contact point position changes continuously, different types of sliding operations can be classified according to the different sliding trajectories.

[0042] 104: Switch the cells in the table based on the change parameters of the touch point of the first touch operation.

[0043] The parameters for touch point changes can include positional change parameters and / or temporal change parameters. Positional change parameters can include a series of position coordinates generated during the continuous change of the touch point's position. Temporal change parameters can include the duration of the touch event.

[0044] Through the above embodiments, the table cells can be switched simply by changing the parameters of the touch point, without having to perform the first touch operation on small and closely connected cell areas. This avoids accidental touch operations, improves switching accuracy, and increases switching efficiency.

[0045] The operation control can be implemented in various ways, and its shape, size, etc., can be set according to actual conditions. In some embodiments, the operation control can consist of a region prompt box and a prompt control; the prompt control can be implemented in the form of a slider. The prompt control can move according to the position change of the touch point. Therefore, in some embodiments, the method may further include:

[0046] Display a tooltip control at the location of the touch point, and control the tooltip control to move as the location of the touch point changes.

[0047] The tooltip in this area can be a circular box centered on the center point of the control, or it can be any other shape centered on the center point of the control, such as a square or a hexagon.

[0048] For ease of understanding, such as Figure 2As shown, a schematic diagram of an operation control is illustrated. The operation control may include an area prompt box 20 and a prompt control 21. The prompt control 21 can be displayed at the location of the touch point and move with the position change of the touch point during the touch operation, thereby forming a display effect that moves with the object (such as a finger) performing the touch operation.

[0049] In addition, the operation controls can correspond to an operation area, and a prompt box in this area can be used to prompt the user to perform the first touch operation in the operation area.

[0050] The area tooltip can be a transparent color or a target color with a certain degree of transparency.

[0051] In addition, the operation control may also include a button control located at the center point of the operation control to prompt the user to start the first touch operation from the button control. Of course, the user can also start the first touch operation from any position in the operation control.

[0052] The operation area corresponding to the operation control can be used to control the response to only the first touch operation occurring in that operation area. Therefore, in some embodiments, switching cells in the table based on the position change parameter of the first touch operation may include:

[0053] Determine whether the touch point of the first touch operation is within the operation area corresponding to the operation control; if the touch point is within the operation area, switch the cells of the table according to the position change parameters of the first touch operation.

[0054] The operating area can be a circular region with a target radius centered at a central point. This target radius can be set according to the actual situation. Whether the touch point is located within the operating area can be determined by calculating the distance between the touch point and the center point based on the position coordinates of the touch point and the center point of the operating control. If this distance is less than or equal to the target radius, the touch point is considered to be located within the operating area; otherwise, it is considered to be located outside the operating area.

[0055] Optionally, if the touch point is located outside the operation area, as an alternative, cell switching in the table can be stopped. This can prompt the user to perform the first touch operation on the content in the operation area, avoiding accidental touch operations on other areas of the page.

[0056] As an alternative, if the touch point moves outside the operation area, the table can be continuously switched according to the switching direction and speed of the most recent cell.

[0057] Furthermore, in some embodiments, where the operation control includes a prompt control and a region prompt box defining the operation area, the method may further include:

[0058] If the prompt control follows the touch point to the boundary position of the operating area, and the touch point moves outside the operating area, the prompt control can be controlled to remain unchanged at the boundary position.

[0059] In the case where the touch point moves outside the operation area and the prompt control reaches the boundary position of the operation area and remains unchanged, that is, if the touch point moves outside the operation area and the first touch operation has not ended, the table can be continuously switched according to the switching direction and speed of the most recent cell.

[0060] The switching direction can mainly include four directions: horizontal upward, horizontal downward, vertical left, and vertical right. The method for determining the switching direction is detailed in the corresponding embodiments below and will not be repeated here.

[0061] There are several ways to switch cells in a table based on the change parameters of the touch point during the first touch operation:

[0062] As one possible implementation, the first touch operation can refer to a sliding operation where the touch point position continuously changes. Then, based on the change parameters of the touch point in the first touch operation, switching cells in the table can include:

[0063] Based on the position change parameters of the touch point during the sliding operation, determine the sliding distance and direction; determine the table switching direction based on the sliding direction; and switch the table cells according to the switching direction and sliding distance.

[0064] The position change parameters may include at least the position coordinates of the initial touch point and the position coordinates of the current touch point during the sliding operation.

[0065] The center point of the control can be fixed. The position coordinates of the touch point can refer to the position coordinates in a Cartesian coordinate system formed by the center point of the control as the origin, the first horizontal coordinate axis, and the second vertical coordinate axis. The first coordinate axis is also known as the X-axis, and the second coordinate axis is also known as the Y-axis.

[0066] The sliding direction can be used as the switching direction. In this embodiment, the sliding direction can be divided into: horizontal upward (referred to as upward), horizontal downward (referred to as downward), vertical leftward (referred to as left), and vertical rightward (referred to as right).

[0067] The sliding distance can refer to the distance between the current touch point and the center point of the operation control. Therefore, in some embodiments, switching cells in a table according to the switching direction and the sliding distance can include:

[0068] The number of cells to be switched in the table is determined based on the sliding distance; the table is then switched according to the switching direction and the number of cells to be switched.

[0069] Of course, as other optional methods, determining the sliding distance and sliding direction based on the position change parameters of the touch point in the sliding operation can include: calculating the sliding distance and sliding direction based on the position coordinates of the current touch point and the position coordinates of the previous touch point;

[0070] The process of switching cells in a table according to the switching direction and the sliding distance can include: determining whether the sliding distance has reached the predetermined distance; if the sliding distance has reached the predetermined distance, switching one cell in the table according to the switching direction, resetting the sliding distance to zero, and returning to continue executing the steps of calculating the sliding distance and sliding direction based on the position coordinates of the current touch point and the position coordinates of the previous touch point; where the previous touch point refers to the touch point corresponding to the previous cell switching.

[0071] In other words, the sliding distance refers to the distance between the current touch point and the previous touch point. Using the above implementation, a cell can be switched every predetermined distance during the sliding operation; the faster the sliding speed, the faster the switching speed. Because a cell is switched every predetermined distance, a pause occurs after each cell switch, achieving the effect of cells moving one cell at a time.

[0072] Specifically, the initial touch point of the first touch operation can hit the target cell of the table. This target cell can be, for example, a pre-configured cell such as the cell in the first row and first column, or a cell hit during the previous switching operation in the table. Therefore, cell switching in the table can start from the target cell.

[0073] The distance between the current contact point and the center point, as well as the distance between the current contact point and the previous contact point, can be calculated using the distance calculation method between two points, which will not be elaborated here.

[0074] The sliding direction can be determined based on the coordinate azimuth angle corresponding to the line connecting the current contact point and the center point. Therefore, in some embodiments, determining the sliding direction based on the position coordinates of the current contact point and the position coordinates of the previous contact point may include:

[0075] Establish a rectangular coordinate system consisting of the center point of the operation control as the origin, the first coordinate axis in the horizontal direction, and the second coordinate axis in the vertical direction;

[0076] The four directional regions obtained by dividing the rectangular coordinate system are determined; each quadrant of the rectangular coordinate system is divided into two sub-regions on average; each directional region corresponds to a switching direction and is composed of two adjacent sub-regions in two adjacent quadrants;

[0077] Calculate the coordinate azimuth angle corresponding to the line connecting the current contact point and the center point based on the current contact point's position coordinates and the center point's position coordinates;

[0078] Determine the corresponding sliding direction based on the directional region where the coordinate azimuth angle is located.

[0079] Specifically, the coordinate azimuth angle corresponding to the line connecting the current touch point and the center point can be the angle between the line connecting the current touch point and the center point and the positive direction of the first coordinate axis (i.e., X is greater than 0). Of course, it can also be the angle between the line and the positive direction of the second coordinate axis or the angle between the line and the negative direction of the first coordinate axis, etc., and this application does not limit it in this way.

[0080] For ease of understanding, such as Figure 3 In the schematic diagram of the region corresponding to the rectangular coordinate system shown, each quadrant of the rectangular coordinate system is divided into two sub-regions by a straight line drawn from the origin. Two adjacent sub-regions in two adjacent quadrants constitute a directional region. For example... Figure 3 The diagram shows direction regions A, B, C, and D. Direction region A corresponds to the rightward direction, direction region B corresponds to the upward direction, direction region C corresponds to the leftward direction, and direction region D corresponds to the downward direction. Assuming the positive direction of the first coordinate axis is taken as the starting point of the angle, direction region A can be a region defined by an azimuth angle of -45 degrees (315 degrees) to 45 degrees; direction region B can be a region defined by an azimuth angle of 45 degrees to 135 degrees; direction region C can be a region defined by an azimuth angle of 135 degrees to 225 degrees; and direction region D can be a region defined by an azimuth angle of 225 degrees to 315 degrees.

[0081] Therefore, the corresponding sliding direction can be determined by the directional region of the coordinate azimuth angle corresponding to the line connecting the current contact point and the center point.

[0082] The coordinate azimuth angle corresponding to the line connecting the current touch point and the center point can be calculated using the following formula:

[0083] dy = Math.abs(p2.y - p1.y);

[0084] dx = Math.abs(p2.x - p1.x);

[0085] radian = Math.atan(dy / dx);

[0086] degree = radial * 180 / PI.

[0087] Where (p1.x, p1.y) represent the position coordinates of the center point, (p2.x, p2.y) represent the position coordinates of the current touch point, Math.abs represents absolute value calculation, radian represents radians, degree represents coordinate azimuth, and PI represents pi.

[0088] In some embodiments, when the first touch operation is a swipe operation, the method may further include:

[0089] Determine whether the sliding operation has ended within the predetermined time;

[0090] If so, determine the sliding direction based on the position change parameters corresponding to the touch point of the sliding operation, and determine the sliding direction as the switching direction of the table, and switch one cell of the table according to the switching direction;

[0091] If not, determine the sliding distance and the sliding direction based on the position change parameters corresponding to the contact points of the sliding operation.

[0092] The predetermined time could be, for example, 200ms. That is, if the swipe operation ends within the predetermined time, it can be determined that a cell is to be switched, and the table can be switched one cell at a time according to the switching direction.

[0093] The specific implementation method for determining the sliding direction based on the position change parameters corresponding to the touch point of the sliding operation can be found above, and will not be repeated here.

[0094] If the sliding operation does not end within the predetermined time, the operation can be performed again to determine the sliding distance and direction based on the position change parameters corresponding to the touch point of the sliding operation, so as to switch the cells of the table according to the sliding direction and sliding distance.

[0095] In some embodiments, determining the sliding distance based on the position change parameters of the contact point during the sliding operation, and determining the sliding direction based on the position change parameters of the contact point during the sliding operation, may include:

[0096] During the continuous change of the position of the touch point in the first touch operation, the sliding distance is determined based on the position change parameters of the touch point in the sliding operation, and the sliding direction is determined based on the position change parameters of the touch point in the sliding operation.

[0097] Optionally, if the position of the touch point of the first touch operation changes continuously, and if it remains unchanged in any position for a first predetermined duration, the table can be continuously switched according to the switching direction and speed of the most recent cell.

[0098] In some embodiments, the operation control may also include directional controls corresponding to the four switching directions, which are used to prompt the switching direction so that the user can perform a sliding operation according to the corresponding switching direction based on the directional controls.

[0099] Furthermore, the directional control can also support touch input, and in some embodiments, the method may further include:

[0100] Detect clicks on any directional control; switch cells in the table according to the switching direction corresponding to the directional control.

[0101] Optionally, switching cells in a table according to the switching direction corresponding to the direction control can include:

[0102] If the click duration is less than the second predetermined duration, the table will switch to one cell according to the switching direction corresponding to the direction control.

[0103] If the click duration exceeds the second predetermined duration, the table cells will be continuously switched according to the switching direction and speed corresponding to the directional control.

[0104] If the click duration is less than the second predetermined duration, it can be considered a single click, and the table will switch to one cell. If the click duration is greater than the second predetermined duration, it can be considered a long press, and the table will continuously switch cells, either according to the switching direction and speed. The switching speed can be preset.

[0105] As another possible implementation, the first touch operation can be a click operation, and the operation control can include directional controls corresponding to the four switching directions respectively;

[0106] Detecting the first touch operation performed in the operation control can include: detecting a click operation on any directional control;

[0107] The cell switching of the table based on the change parameters of the touch point of the first touch operation can include: determining the click duration based on the time change parameters of the touch point of the click operation; if the click duration is less than the second predetermined duration, switching the table to one cell according to the switching direction corresponding to the direction control.

[0108] If the click duration exceeds the second predetermined duration, the table cells will be continuously switched according to the switching direction and speed corresponding to the directional control.

[0109] If the click duration is less than the second predetermined duration, it can be considered a single click, and the table will switch to one cell. If the click duration is greater than the second predetermined duration, it can be considered a long press, and the table will continuously switch cells, either according to the switching direction and speed. The switching speed can be preset.

[0110] One way to implement this control is as follows: Figure 4 As described, the operation control may include a rightward direction control 41, an upward direction control 42, a leftward direction control 43, and a downward direction control 44. A click operation can be performed on any of the direction controls 44 to switch between cells in the table.

[0111] In addition, the operation control may also include a region prompt box 45, etc., to indicate the operation range of the operation control. Of course, sliding operations can also be performed within the region prompt box 45, and the specific implementation method is the same as that in the corresponding embodiments above, so it will not be repeated here.

[0112] In some embodiments, displaying operation controls on the page may include:

[0113] Display control tooltips on the page; in response to actions triggered by the tooltips, display the corresponding control on the page.

[0114] The control tooltip can be used to prompt the operation of the control, and the triggering operation can be, for example, a click operation on the control tooltip.

[0115] In some embodiments, displaying operation controls on the page may include:

[0116] The system detects editing operations on the table and displays the corresponding virtual keyboard; the operation controls are then displayed at the corresponding location on the virtual keyboard.

[0117] Optionally, control tooltips can be displayed at the corresponding display location of the virtual keyboard, such as in the toolbar corresponding to the keyboard. In response to a trigger operation on the control tooltips, an operation control can be displayed on the page. This operation control can be displayed at the corresponding display location of the virtual keyboard and can be superimposed on the virtual keyboard, at least covering part of the virtual keyboard area.

[0118] Among them, the editing operation for the table can be a click operation performed at any position in the table area, in which case the table can switch to the editing state and select the target cell; of course, it can also be a click operation at any position in the table area where any cell is located, in which case the table can switch to the editing state and select the clicked cell. In this case, due to possible accidental operation, the selected cell may not be the cell that the user wants to edit. That is, the cell can be switched through the operation control provided in the embodiment of this application.

[0119] For ease of understanding, see Figure 5a In the described touch interface diagram, a table page 51 and a virtual keyboard 52 are displayed on the touch interface, and control tooltips 53 are displayed in the toolbar position corresponding to the virtual keyboard 52. The control tooltips 53 indicate that a trigger operation can be performed. In response to this trigger operation, such as... Figure 5b As shown, an operation control 54 can be displayed at the corresponding position of the virtual keyboard 52 in the touch interface. A sliding operation or a clicking operation can be performed on the operation control 54, thereby generating touch point change parameters. Based on the touch point change parameters of the first touch operation in the operation control 54, the table cells can be switched, for example, from cell M to cell N.

[0120] In some embodiments, after the operation controls are displayed on the page, the method may further include

[0121] If no touch operation is detected on the operation controls within the specified time, the operation controls will be canceled from display.

[0122] The specified time can be, for example, 200ms.

[0123] In some embodiments, the method may further include:

[0124] A drag operation on the control was detected, and the display position of the control on the page was changed.

[0125] This drag operation can be, for example, a long press and slide operation targeting a specific position of the control, such as the center point. The ending position of the drag operation is the display position of the control after switching.

[0126] In some embodiments, the method may further include:

[0127] If a zoom-out or zoom-in operation is detected for the operation control, adjust the display size of the operation control.

[0128] Zooming out can be an example of a long press on a specific location of a control, such as a border position, and a swipe towards the center. Zooming in can be an example of a long press on a specific location of a control, such as a border position, and a swipe away from the center.

[0129] Of course, the above-mentioned drag-and-drop operation, zoom-out operation, or zoom-in operation can also be other types of touch operation, and this application does not specifically limit them.

[0130] The operation controls in this embodiment of the application allow for convenient, quick, and accurate cell switching in a table. The operation controls can be implemented as a virtual joystick for cell switching.

[0131] Figure 6 This is a schematic diagram of one embodiment of a cell switching device provided in this application. The device may include:

[0132] Display module 601 is used to display a page containing tables; and to display operation controls on the page;

[0133] Detection module 602 is used to detect the first touch operation performed in the operation control;

[0134] The switching module 603 is used to switch cells in the table based on the change parameters of the touch point of the first touch operation.

[0135] In some embodiments, the first touch operation includes a swipe operation; the switching module can be specifically used to determine the swipe distance based on the position change parameters of the touch point of the swipe operation, and to determine the swipe direction based on the position change parameters of the touch point of the swipe operation; to determine the switching direction of the table based on the swipe direction; and to switch the cells of the table according to the switching direction and the swipe distance.

[0136] In some embodiments, the switching module determines the sliding distance based on the position change parameters of the touch point of the sliding operation, which may include: calculating the sliding distance based on the position coordinates of the current touch point and the position coordinates of the previous touch point;

[0137] The switching module can switch cells in a table according to the switching direction and the sliding distance. This can include: determining whether the sliding distance has reached a predetermined distance; if the sliding distance has reached the predetermined distance, switching one cell in the table according to the switching direction, resetting the sliding distance to zero, and returning to continue executing the steps of calculating the sliding distance and sliding direction based on the position coordinates of the current touch point and the position coordinates of the previous touch point; where the previous touch point is the touch point corresponding to the previous cell switching.

[0138] In some embodiments, the switching module switches cells in the table according to the switching direction and the sliding distance, including: determining the number of cells to be switched in the table according to the sliding distance; and switching cells in the table according to the switching direction and the number of cells to be switched.

[0139] In some embodiments, the device may further include:

[0140] The processing module is used to determine whether the sliding operation ends within a predetermined time. If so, it determines the sliding direction based on the position change parameters corresponding to the touch point of the sliding operation, and sets the sliding direction as the switching direction of the table, and switches one cell of the table according to the switching direction. If not, it triggers the execution of the switching module.

[0141] In some embodiments, the switching module, based on the position change parameters of the touch point during the sliding operation, may include the following sliding direction: determining a Cartesian coordinate system consisting of a first horizontal coordinate axis and a second vertical coordinate axis, with the center point of the operation control as the origin; determining four directional regions obtained by dividing the Cartesian coordinate system; wherein each quadrant of the Cartesian coordinate system is divided into two sub-regions; each directional region corresponds to a switching direction and is composed of two adjacent sub-regions in two adjacent quadrants; calculating the coordinate azimuth angle corresponding to the line connecting the current touch point and the center point based on the position coordinates of the current touch point and the center point; and determining the corresponding sliding direction based on the directional region where the coordinate azimuth angle is located.

[0142] In some embodiments, the operation control corresponds to an operation area, and the switching module can be specifically used to determine whether the touch point of the first touch operation is within the operation area corresponding to the operation control; if the touch point is within the operation area, the table is switched according to the position change parameter of the first touch operation.

[0143] In some embodiments, the switching module is also used to stop switching cells in the table if the touch point is located outside the operating area.

[0144] In some embodiments, the operation control comprises a prompt control and a region prompt box that defines the operation area;

[0145] The display module is also used to display a prompt control at the location of the touch point and control the prompt control to move as the position of the touch point changes; if the touch point moves outside the operation area after the prompt control follows the touch point to the boundary position, the prompt control is controlled to remain unchanged at the boundary position.

[0146] In some embodiments, the switching module is also used to continuously switch the table cells according to the switching direction and speed of the most recent cell if the touch point moves outside the operation area and the prompt control reaches the boundary position of the operation area and remains unchanged.

[0147] In some embodiments, the switching module may specifically determine the sliding distance and the sliding direction based on the position change parameters of the touch point during the continuous change of the touch point position.

[0148] The switching module is also used to continuously switch cells in the table according to the switching direction and speed of the most recent cell, provided that the touch point remains unchanged in any position for a first predetermined duration.

[0149] In some embodiments, the display module may display operation controls on the page by: displaying control tooltips on the page; and displaying operation controls on the page in response to a triggering operation on the control tooltips.

[0150] In some embodiments, the operation control includes directional controls corresponding to the four switching directions;

[0151] The detection module can specifically detect click operations on any directional control;

[0152] The switching module can specifically determine the click duration based on the time change parameters of the touch point during the click operation. If the click duration is less than a second predetermined duration, the table will switch to one cell according to the switching direction corresponding to the directional control. If the click duration is greater than the second predetermined duration, the table will continuously switch cells according to the switching direction and speed corresponding to the directional control.

[0153] In some embodiments, the display module may include the following when displaying operation controls on the page: detecting an editing operation on the table and displaying the corresponding virtual keyboard; and displaying operation controls at the corresponding display position of the virtual keyboard.

[0154] In some embodiments, the device may further include:

[0155] The control module is used to detect drag operations on the operation controls and switch the display position of the operation controls on the page;

[0156] or,

[0157] If a zoom-out or zoom-in operation is detected for the operation control, adjust the display size of the operation control.

[0158] or,

[0159] If no touch operation is detected on the operation controls within the specified time, the operation controls will be canceled from display.

[0160] Figure 6 The cell switching device can perform Figure 1The implementation principle and technical effects of the cell switching method described in the illustrated embodiment will not be repeated here. The specific methods by which each module and unit of the cell switching device in the above embodiments performs its operations have been described in detail in the embodiments related to this method, and will not be elaborated upon here.

[0161] This application also provides an electronic device, such as... Figure 7 As shown, the electronic device may include a storage component 701, a display component 702, and a processing component 703;

[0162] Storage component 701 stores one or more computer instructions, wherein the one or more computer instructions are invoked and executed by processing component 703 to achieve, for example, Figure 1 The cell switching method shown.

[0163] Of course, electronic devices may also include other components, such as input / output interfaces and communication components. They may also include basic configurations such as network interface cards (NICs), I / O buses, and audio / video components; this application does not limit this. Optionally, depending on the implementation of the electronic device, it may also include some peripheral devices, such as a keyboard, mouse, stylus, and printer; this application does not limit this.

[0164] The processing components in this computing device are used to achieve, for example Figure 4 In the case of the information display method shown, the computing device may also include a display component to perform the corresponding display operation.

[0165] The processing component 703 may include one or more processors to execute computer instructions to complete all or part of the steps in the above-described method. Alternatively, the processing component may be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described method.

[0166] Storage component 701 is configured to store various types of data to support operations at the terminal. The storage component can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0167] Display component 702 may be an electroluminescent (EL) element, a liquid crystal display or a microdisplay with a similar structure, or a retina-direct display or a similar laser scanning display.

[0168] It should be noted that the aforementioned electronic devices can function as servers, such as physical devices or elastic computing hosts provided by cloud computing platforms. They can be implemented as a distributed cluster of multiple servers or terminal devices, or as a single server or a single terminal device.

[0169] Of course, the aforementioned electronic devices can also refer to devices used by users that have the computing, internet access, and communication functions required by the user, such as mobile phones, tablets, personal computers, wearable devices, etc.

[0170] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, can perform the above-described functions. Figure 1 The illustrated embodiment describes a cell switching method. This computer-readable medium may be included in the electronic device described in the above embodiments; alternatively, it may exist independently and not be incorporated into the electronic device.

[0171] This application also provides a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program, when executed by a computer, can perform the above-described functions. Figure 1 The illustrated embodiment describes a cell switching method. In such an embodiment, the computer program may be downloaded and installed from a network, and / or installed from a removable medium. When the computer program is executed by a processor, it performs the various functions defined in the system of this application.

[0172] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0173] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0174] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0175] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A cell switching method, characterized in that, include: Display the page containing the table; The page displays operation controls; Detect the first touch operation performed in the operation control; The operation control includes an operation area, which is used to control the response to only the first touch operation occurring in the operation area; Based on the change parameters of the touch point in the first touch operation, the table cells are switched; The first touch operation includes a swipe operation; the step of switching cells in the table based on the change parameters of the touch point of the first touch operation includes: The sliding distance is determined based on the position change parameters of the touch points in the sliding operation, and the sliding direction is determined based on the position change parameters of the touch points in the sliding operation; the sliding distance includes the distance between the current touch point and the previous touch point, and the previous touch point includes the touch point corresponding to the previous cell switch; The switching direction of the table is determined based on the sliding direction; The table cells are switched according to the switching direction and the sliding distance; The step of switching cells in the table according to the switching direction and the sliding distance includes: When the sliding distance reaches the predetermined distance, the table is switched to one cell according to the switching direction, the sliding distance is reset to zero, and the steps of determining the sliding distance and the sliding direction based on the position change parameters of the touch point of the sliding operation are continued.

2. The method according to claim 1, characterized in that, Determining the sliding distance based on the position change parameters of the contact point during the sliding operation includes: Calculate the sliding distance based on the position coordinates of the current contact point and the position coordinates of the previous contact point; The step of switching cells in the table according to the switching direction and the sliding distance includes: Determine whether the sliding distance has reached the predetermined distance; If the sliding distance reaches the predetermined distance, the table is switched to one cell according to the switching direction, the sliding distance is reset to zero, and the process returns to continue executing the step of calculating the sliding distance and sliding direction based on the position coordinates of the current touch point and the position coordinates of the previous touch point; The previous touch point is the touch point corresponding to the previous cell switch.

3. The method according to claim 1, characterized in that, The step of switching cells in the table according to the switching direction and the sliding distance includes: The number of cells to be switched for the corresponding table is determined based on the sliding distance. The table is switched according to the switching direction and the number of cells switched.

4. The method according to claim 1, characterized in that, Also includes: Determine whether the sliding operation ends within a predetermined time. If so, determine the sliding direction based on the position change parameters corresponding to the touch point of the sliding operation, and determine the sliding direction as the switching direction of the table, and switch one cell of the table according to the switching direction; If not, perform the following steps: determine the sliding distance based on the position change parameters corresponding to the contact point of the sliding operation, and determine the sliding direction based on the position change parameters corresponding to the contact point of the sliding operation.

5. The method according to claim 1, characterized in that, The sliding direction, based on the position change parameter of the contact point during the sliding operation, includes: A rectangular coordinate system is established, consisting of the center point of the operation control as the origin, a first coordinate axis in the horizontal direction, and a second coordinate axis in the vertical direction; The four directional regions obtained by dividing the rectangular coordinate system are determined; wherein each quadrant of the rectangular coordinate system is divided into two sub-regions on average; each directional region corresponds to a switching direction and is composed of two adjacent sub-regions in two adjacent quadrants; Calculate the coordinate azimuth angle corresponding to the line connecting the current contact point and the center point based on the current contact point's position coordinates and the center point's position coordinates; The corresponding sliding direction is determined based on the directional region where the coordinate azimuth angle is located.

6. The method according to claim 1, characterized in that, The operation control corresponds to an operation area, and the step of switching cells in the table based on the position change parameter of the first touch operation includes: Determine whether the touch point of the first touch operation is within the operation area corresponding to the operation control; If the touch point is located within the operation area, the table cells are switched according to the position change parameters of the first touch operation.

7. The method according to claim 6, characterized in that, Also includes: If the touch point is located outside the operation area, stop switching cells in the table, or continuously switch cells in the table according to the direction and speed of the most recent cell switching.

8. The method according to claim 6, characterized in that, The operation control includes a prompt control and a region prompt box that defines the operation area; the method further includes: The prompt control is displayed at the location of the touch point, and the prompt control is controlled to move as the position of the touch point changes; If the prompt control follows the touch point to the boundary position of the operation area, and the touch point moves outside the operation area, the prompt control is controlled to remain at the boundary position.

9. The method according to claim 1, characterized in that, The steps of determining the sliding distance and the sliding direction based on the position change parameters of the contact point in the sliding operation include: During the continuous change of the position of the contact point, the sliding distance is determined based on the position change parameters of the contact point in the sliding operation, and the sliding direction is determined based on the position change parameters of the contact point in the sliding operation. The method further includes: If the touch point remains unchanged in any position for a first predetermined duration, the table is continuously switched according to the switching direction and speed of the most recent cell.

10. The method according to claim 1, characterized in that, The operation control includes directional controls corresponding to four switching directions; The detection of the first touch operation performed in the operation control includes: Detect clicks on any directional control; The step of switching cells in the table based on the touch point change parameters of the first touch operation includes: The click duration is determined based on the time change parameters of the touch point in the click operation; If the click duration is less than the second predetermined duration, the table will be switched by one cell according to the switching direction corresponding to the direction control; If the click duration exceeds the second predetermined duration, the table cells are continuously switched according to the switching direction and switching speed corresponding to the directional control.

11. The method according to claim 1, characterized in that, The operation controls displayed on the page include: Detect editing operations performed on the table and display the corresponding virtual keyboard; Display control prompts at the corresponding display positions on the virtual keyboard; In response to a triggering action that provides a prompt message for the control, the operation control is displayed on the page.

12. The method according to claim 1, characterized in that, Also includes: Upon detecting a drag operation on the control, the display position of the control on the page is switched. Alternatively, if a zoom-out or zoom-in operation is detected for the operation control, the display size of the operation control is adjusted; Alternatively, if no touch operation is detected on the operation control within a specified time, the operation control will be canceled from display.

13. An electronic device, characterized in that, It includes a storage component, a display component, and a processing component; the storage component stores one or more computer program instructions; the one or more computer program instructions are invoked and executed by the processing component to implement the cell switching method as described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • CN103699316A

  • CN114610192A