Cursor display method and device, equipment, medium and program product

By automatically scrolling the page to prevent the cursor from being obscured by the input toolbar, the problem of cursor obscuration is solved, improving the user's input experience.

CN121934739APending Publication Date: 2026-04-28TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411507702.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Within an input box control, the cursor can easily be obscured by the input toolbar, affecting the user's input operation.

Method used

The input toolbar provides auxiliary input functions by automatically scrolling the page to prevent the cursor from being obscured by the input toolbar, ensuring that the cursor is displayed in an unobstructed position on the screen.

Benefits of technology

It reduces the need for users to manually scroll through the page, thus improving the input experience within input box controls.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121934739A_ABST
    Figure CN121934739A_ABST
Patent Text Reader

Abstract

The invention discloses a cursor display method and device, equipment, a medium and a program product, and belongs to the technical field of computers. The method comprises the following steps: displaying a first page, wherein the first page comprises an input box control; in response to the condition that the input box control receives a content input operation and the position of an input cursor corresponding to the content input operation is shielded by an input toolbar superposed on the first page, automatically scrolling the first page; and displaying a cursor located at the cursor position after the input on the screen position not shielded by the input toolbar, the input toolbar being used for providing at least one auxiliary input function. According to the method, the cursor in the input box control can be prevented from being shielded by the input toolbar after the content is input, and the operation that a user manually rolls the first page to move the cursor to a visual area is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a cursor display method, apparatus, device, medium, and program product. Background Technology

[0002] With the development of internet technology, some pages provide input box controls, where users can enter text. When a user enters text, a cursor will appear in the input box control.

[0003] In related technologies, there may also be some visual elements on the page. These visual elements do not change their display position as the user enters text. Therefore, as the user continues to input text into the input box control, the cursor in the input box control may be obscured by these visual elements, thus affecting the user's input operation. Summary of the Invention

[0004] This application provides a cursor display method, apparatus, device, medium, and program product. The method prevents the cursor in the input box control from being obscured by the input toolbar after content is entered, and avoids the need for the user to manually scroll the first page to move the cursor to the visible area. The technical solution is as follows:

[0005] According to one aspect of this application, a cursor display method is provided, the method comprising:

[0006] Display the first page, which includes input box controls;

[0007] In response to the input box control receiving a content input operation, and the cursor position being obscured by the input toolbar superimposed on the first page after the corresponding content input operation, the first page will automatically scroll.

[0008] On a screen position not obscured by the input toolbar, a cursor is displayed at the cursor position after input. The input toolbar is used to provide at least one auxiliary input function.

[0009] According to another aspect of this application, a cursor display device is provided, the device comprising:

[0010] The display module is used to display the first page, which includes input box controls.

[0011] The scrolling module is used to respond to the input box control receiving a content input operation, and the cursor position corresponding to the content input operation is obscured by the input toolbar superimposed on the first page, and automatically scroll the first page.

[0012] The display module is also used to display the cursor at the cursor position after input in a screen position not obscured by the input toolbar, and the input toolbar is used to provide at least one auxiliary input function.

[0013] According to one aspect of this application, a computer device is provided, the computer device comprising: a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the cursor display method as described above.

[0014] According to another aspect of this application, a computer-readable storage medium is provided, the storage medium storing a computer program that is loaded and executed by a processor to implement the cursor display method as described above.

[0015] According to another aspect of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the cursor display method provided in the above aspect.

[0016] The beneficial effects of the technical solutions provided in this application include at least the following:

[0017] In this application, an input box control is displayed on the first page. As the user inputs content, when the cursor in the input box control is about to be obscured by the input toolbar, the first page will be automatically scrolled to avoid the cursor being obscured by the input toolbar after content input. This reduces the user's manual scrolling of the first page to move the cursor to the visible area. The above embodiment can improve the user's input experience in the input box control and reduce the user's tedious operations. Attached Figure Description

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

[0019] Figure 1 A schematic diagram of a cursor display process provided by an exemplary embodiment is shown;

[0020] Figure 2 A schematic diagram of a computer system provided in an exemplary embodiment is shown;

[0021] Figure 3 A flowchart of a cursor display method provided by an exemplary embodiment is shown;

[0022] Figure 4 A flowchart of a cursor display method provided by an exemplary embodiment is shown;

[0023] Figure 5 A schematic diagram of a method for calculating the predicted position of the cursor after input, provided by an exemplary embodiment, is shown.

[0024] Figure 6 A flowchart of a cursor display method provided by an exemplary embodiment is shown;

[0025] Figure 7 A flowchart of a cursor display method provided by an exemplary embodiment is shown;

[0026] Figure 8 A schematic diagram illustrating a method for calculating the predicted position of the cursor after a hit, provided by an exemplary embodiment;

[0027] Figure 9 A flowchart of a cursor display method provided by an exemplary embodiment is shown;

[0028] Figure 10 A flowchart of a cursor display method provided by an exemplary embodiment is shown;

[0029] Figure 11 A structural block diagram of a cursor display device provided in an exemplary embodiment is shown;

[0030] Figure 12 A structural block diagram of a computer device provided in an exemplary embodiment is shown. Detailed Implementation

[0031] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0032] It should be understood that "several" in this article refers to one or more, and "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0033] It should be noted that the information (including but not limited to device information, personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the subject or fully authorized by all parties, and the collection, use and processing of related data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0034] First, a brief introduction to the terms used in the embodiments of this application:

[0035] A browser is an application that allows users to access HTML (Hypertext Markup Language) files on web servers or file systems via URLs and interact with those files. Typically, a browser includes a browser engine. Optionally, a browser can be a browser application primarily providing web browsing functionality, or a non-browser application with web browsing capabilities that can invoke a browser engine.

[0036] First page: Refers to the page displayed on the terminal. Optionally, the first page is an offline page displayed on the terminal, meaning it can be displayed even when the terminal is offline. Optionally, the first page is an online page displayed on the terminal, meaning it is only loaded and displayed when the terminal is connected to the internet.

[0037] Input toolbar: This refers to a toolbar that provides at least one auxiliary input function. For example, the input toolbar may provide features such as raising / lowering the virtual keyboard, navigation between input boxes, and changing text styles (e.g., bold, italic, underline). Optionally, the input toolbar is located above the virtual keyboard. When the user enters text in the input box controls on the first page, the virtual keyboard will appear at the bottom of the screen. To enhance the user's editing capabilities, an additional input toolbar will be rendered above the virtual keyboard.

[0038] Figure 1 This illustration shows a schematic diagram of a cursor display process provided in an exemplary embodiment of this application. Figure 1 Part (A) shows a first page 110 displayed in the browser. The first page 110 is a webpage provided by a third-party web server, which is a server provided by a third-party vendor and is different from the browser's own server. An input box control 120 is displayed on the first page 110, and at this time, the text content of "numbers 1 to 14" has been entered into the input box control 120.

[0039] In response to receiving an operation that hits the input box control 120, a cursor will be displayed at the corresponding cursor position after the hit operation, that is, the cursor will be displayed after "number 14". However, at this time, the cursor position after the hit overlaps with the screen position of the input toolbar 130. The terminal will automatically scroll the first page 110 to avoid the cursor position after the hit being obscured by the input toolbar 130. Figure 1 As shown in section (B), the terminal displays the cursor at the position of the cursor after the hit in a screen position that is not obscured by the input toolbar. It can be seen that the cursor after "number 14" is not obscured by the input toolbar 130 at this time.

[0040] Input toolbar 130 is a toolbar used to provide at least one auxiliary input function. Figure 1 In part (B), the input toolbar 130 is located above the virtual keyboard. The input toolbar 130 is displayed as a long bar, and the virtual keyboard is located at the bottom of the screen and superimposed on the first page 110.

[0041] Optionally, the input toolbar 130 is provided by a third-party web server, and the virtual keyboard is provided by a browser or operating system. When the browser or operating system displays the virtual keyboard, it will control the cursor in the input box control 120 to always be displayed above the virtual keyboard. The input toolbar 130 provided by the third-party web server will also be displayed above the virtual keyboard. At this time, the cursor in the input box control 120 may be obscured by the input toolbar 130. This application aims to automatically scroll the first page 110 when it is detected that the cursor is about to be obscured by the input toolbar 130, so as to avoid the cursor being obscured by the input toolbar 130.

[0042] like Figure 1 As shown in part (B), the input box control 120 of the first page 110 displays "numbers 1 to 14". In response to the input box control 120 receiving a content input operation, specifically an input operation of "newline character + number 15", and the cursor position being obscured by the input toolbar 130 after the corresponding input operation, the terminal automatically scrolls the first page 110. Figure 1 As shown in section (C), the terminal displays the cursor at the cursor position after input in a screen position not obscured by the input toolbar 130.

[0043] In summary, in this application, when the cursor in the input box control is about to be obscured by the input toolbar, the first page will be automatically scrolled to avoid the cursor in the input box control being obscured by the input toolbar, thereby reducing the user's manual scrolling of the first page to move the cursor to the visible area and improving the user experience.

[0044] Figure 2This is a block diagram of a computer system providing a cursor display method according to an exemplary embodiment of this application. The system includes a terminal 220 and a server 260. The terminal 220 and the server 260 are connected via a communication network 240, which can be a wired network or a wireless network.

[0045] Terminal 220 can be at least one of a smartphone, smartwatch, smart TV, tablet computer, wearable device, in-vehicle terminal, e-book reader, MP3 player, MP4 player, laptop computer, and desktop computer. The following embodiments use a smartphone as an example. Terminal 220 has an operating system and at least one browser installed. The operating system can be Android or iOS. Terminal 220 has a browser installed and running; this browser can be a browser program primarily providing web browsing functionality, or it can be a non-browser application with web browsing capabilities and the ability to call a browser kernel.

[0046] Server 260 can be a third-party web server. When the browser on terminal 220 receives the input of the URL of the first page, the third-party web server sends the first page, the input toolbar, and overlap detection code to terminal 220. Terminal 220 invokes the browser kernel to display the first page and the input toolbar, and runs the overlap detection code. If the browser kernel detects that the cursor is about to be obscured by the input toolbar, it displays the cursor on the screen in a position not obscured by the input toolbar. Optionally, server 260 includes at least one of the following: a single server, multiple servers, a cloud computing platform, and a virtualization center.

[0047] Figure 3 A flowchart of a cursor display method provided in an exemplary embodiment of this application is shown, illustrated by an example of the method being executed by a terminal. The method includes:

[0048] Step 320: Display the first page, which includes input box controls;

[0049] The first page refers to the page displayed on the terminal. Optionally, the first page can be an offline page displayed on the terminal, meaning it can be displayed even when the terminal is offline. Alternatively, the first page can be an online page displayed on the terminal, meaning it can only be loaded and displayed when the terminal is connected to the internet.

[0050] In one embodiment, the first page is the page of an application such as an instant messaging application, a smart spreadsheet application, a data statistics application, an office application, a game application, a video player, a music player, a news and information application, a lifestyle service application, a social sharing application, a payment application, or a map application. This application does not limit the application to which the first page belongs.

[0051] In one embodiment, the first page is a webpage provided by the browser's own server; that is, the first page can be referred to as a proprietary service webpage. A proprietary server refers to a web server provided by the browser vendor. Because this web server is provided by the browser vendor, the browser can display the proprietary service webpage as recommended content on its homepage. When displaying a proprietary service webpage, the browser may not display the address bar.

[0052] In another embodiment, the first page is a webpage provided by a third-party web server; that is, the first page can be referred to as a third-party webpage. A third-party web server refers to a webpage provided by a third-party vendor other than the browser provider, i.e., a webpage server in the conventional sense. When displaying a third-party webpage, the browser can display an address bar, which shows the webpage address.

[0053] Optionally, third-party vendors can be service providers of applications such as instant messaging applications, smart spreadsheet applications, data statistics applications, office applications, game applications, video players, music players, news and information applications, lifestyle service applications, social sharing applications, payment applications, and map applications. For illustration, in response to the browser receiving the URL of the first page being entered, the third-party web server sends the first page to the terminal, and the terminal displays the first page.

[0054] An input box control refers to a control on the first page that allows the user to enter content. Optionally, the input box control can be displayed as a box, rounded rectangle, ellipse, or rhombus. Optionally, the size of the input box control is fixed within the first page; that is, the size of the input box control does not increase as the user enters more content, nor does it expand its display area when the user clicks on the input box control.

[0055] Optionally, the size of the input box control can be dynamically changed. Illustratively, multiple visual elements to be selected are displayed on the first page, including the input box control. When the user does not select an input box control, the input box control on the first page is displayed as a small rectangle. When the user selects an input box control, it expands to become an input area to accommodate the user's input. Optionally, as more user input occurs, the input box control will automatically expand to accommodate more input.

[0056] In one embodiment, when an input box control is selected, a scroll bar will be displayed within the input box control. The scroll bar can be a sidebar scroll bar. Through the scroll bar, the user can scroll through the entered content within the input box control. The position of the scroll bar within the input box control is called the scroll height.

[0057] In one embodiment, the input box control supports user input of at least one of the following: text, emoticons, images, audio, and video. When the input box control is selected or receives user input, a cursor will appear within the control to indicate the current input position to the user.

[0058] Step 340: In response to the input box control receiving a content input operation, and the cursor position corresponding to the content input operation being obscured by the input toolbar superimposed on the first page, the first page is automatically scrolled.

[0059] Content input operation refers to the operation of entering content within an input box control. In one embodiment, the content input operation is performed by the user through a virtual keyboard. Optionally, a virtual keyboard is displayed overlaid on the first page, or the virtual keyboard is located at the bottom of the terminal screen.

[0060] In one embodiment, content input is performed by the user using a mouse, keyboard, controller, VR (Virtual Reality) / AR (Augmented Reality) device, etc.

[0061] An input toolbar refers to a toolbar that provides at least one auxiliary input function. For example, an input toolbar may provide features such as raising / lowering the virtual keyboard, navigation between input boxes, and changing text styles (e.g., bold, italic, underline). Optionally, the input toolbar is located above the virtual keyboard and is primarily used in conjunction with the virtual keyboard to assist the user in inputting content.

[0062] In one embodiment, the input toolbar is provided by an application, which may be an instant messaging application, a smart spreadsheet application, a data statistics application, an office application, a game application, a video player, a music player, a news and information application, a lifestyle service application, a social sharing application, a payment application, a map application, or other similar applications.

[0063] Optionally, the first page and the input toolbar are provided by the same application.

[0064] In one embodiment, the input toolbar is provided by a browser or operating system. The browser can be a browser application that primarily provides web browsing functionality, or a non-browser application that has web browsing functionality and the ability to invoke a browser kernel.

[0065] In one embodiment, the input toolbar is provided by a third-party web server. In response to the browser running on the terminal receiving an input operation for the URL of the first page, the third-party web server sends the first page and the input toolbar to the terminal, and the terminal invokes the browser kernel to render the first page and the input toolbar.

[0066] Cursor position after input: This refers to the cursor position displayed within the input box control after a content input operation is performed. For example, if the text displayed in the input box control includes "11 12 13 14", the cursor position is after "14". Similarly, if the text in the input box control includes "11 12 13 14 15", the cursor position is after "15".

[0067] In response to an input field being entered into the input field, a cursor will be displayed at the cursor position after input. If the cursor position is obscured by the input toolbar, the first page will be scrolled automatically. Optionally, the first page will be scrolled down to avoid the cursor position being obscured by the input toolbar.

[0068] Optionally, scroll down the first page until the cursor position is at a critical position where it is not obscured by the input toolbar after input, i.e., the cursor position is just above the input toolbar after scrolling. Optionally, scroll down the first page until the distance between the cursor position and the input toolbar reaches a first distance threshold, i.e., after scrolling, there is still a certain unobstructed area for the user to continue inputting content.

[0069] In one embodiment, in response to the input box control being selected for a preset duration threshold, the first page is scrolled down until the distance between the cursor position and the input toolbar after input reaches a first distance threshold. Illustratively, multiple controls are displayed on the first page, from which the user can select a target control for further interaction. If the input box control is selected for a duration threshold, it indicates that the user prefers continuous interaction with the input box control. In this case, scrolling the first page until the distance between the cursor position and the input toolbar reaches the first distance threshold provides the user with a larger unobstructed area for continuous input.

[0070] In one embodiment, in response to the input box control being selected for less than a preset duration threshold, the first page is scrolled down until the cursor position is at a critical position where it is not obscured by the input toolbar after input. Illustratively, multiple controls are displayed on the first page, from which the user can select a target control for further interaction. If the input box control is selected for less than the preset duration threshold, it indicates that the user does not yet intend to continuously interact with the input box control. In this case, the first page is simply scrolled until the cursor position is at a critical position where it is not obscured by the input toolbar after input. There is no need to reserve an unobscured area to allow the screen to display more preceding information, which the user can refer to and use to better input subsequent content.

[0071] Step 360: Display the cursor at the cursor position after input in a screen location not obscured by the input toolbar. The input toolbar is used to provide at least one auxiliary input function.

[0072] Reference Figure 1 From parts (B) and (C), it can be seen that after the first page 110 is scrolled, the cursor at the cursor position after input is displayed on the screen position that is not obscured by the input toolbar 130.

[0073] In summary, in this application, an input box control is displayed on the first page. As the user inputs content, when the cursor in the input box control is about to be obscured by the input toolbar, the first page will automatically scroll to avoid the cursor being obscured by the input toolbar after content input. This avoids the user having to manually scroll the first page to move the cursor to the visible area. The above embodiment can improve the user's input experience in the input box control and reduce the user's tedious operations.

[0074] based on Figure 3 In the optional embodiment shown, step 340 includes Figure 4 Steps 420 to 480 shown are, in order to Figure 4 The method is illustrated by example, executed by the terminal. This method includes:

[0075] Step 420: In response to the input box control receiving a content input operation, perform the first overlap detection;

[0076] In response to the detection by the JavaScript (an interpreted scripting language) engine that the input box control has received content input, it is determined that the first overlap detection will be performed.

[0077] In one embodiment, a first overlap detection is performed every time a content input operation is received, because the user inputting any character may trigger the cursor position to be obscured by the input toolbar after input.

[0078] Step 440: In the first overlap detection, obtain the predicted position of the cursor on the screen after input;

[0079] Predicted position refers to the predicted cursor position on the screen after input. It's a screen position calculated by the terminal during overlap detection. Upon receiving user input, the terminal can calculate the predicted cursor position on the screen based on the user's input. (Illustrative example follows.) Figure 1 In part (B), in response to the input box control 120 receiving the user's input operation of "newline character + number 15", the predicted position of the cursor (not shown in the figure) after input will be obscured by the input toolbar 130.

[0080] In one embodiment, the predicted position of the cursor after input is calculated through the following steps.

[0081] 1. Create the first element, whose style is the same as that of the input box control; insert the content before the first expected cursor in the input box control into the first element, where the first expected cursor refers to the cursor that will be displayed after the expected response content input operation.

[0082] In one embodiment, a first element is created by a JavaScript engine. The first element is an invisible element and its position on the screen is consistent with that of the input box control. After the response content input operation, the content before the expected cursor is inserted into the first element. It should be noted that the first expected cursor does not actually exist on the interface. The first expected cursor is an additional cursor generated when performing overlap detection.

[0083] like Figure 5 As shown, after responding to input, the input box control contains numbers 1 to 8. There is a newline character between 3 and 4, and between 5 and 6. After responding to input, the first expected cursor position in the input box control is after the number "5". Create a first element with the same style as the input box control; specifically, the first element and the input box control are identical in size and screen position. Insert "1 2 3 4 5" before the first expected cursor position into the first element.

[0084] 2. Create a second element and insert the content after the first cursor position in the input box control into the second element.

[0085] In one embodiment, a new second element is created using the JavaScript engine. The content expected to appear after the cursor in the input box control after the input operation is then inserted into this second element. If the content expected after the cursor in the first input box is empty, no content is inserted into the second element.

[0086] like Figure 5 As shown, create a second element. Insert "678" after the first expected cursor position in the input box control into the second element.

[0087] 3. Insert the second element at the end of the first element.

[0088] In one embodiment, the second element is inserted at the end of the first element, meaning the second element becomes a child element of the first element, immediately following the content within the first element.

[0089] like Figure 5 As shown, the second element is inserted at the end of the first element, at which point the second element becomes a child element of the first element.

[0090] 4. Obtain the first offset position of the second element relative to the first element.

[0091] In one embodiment, the offset position of the second element relative to the first element is obtained.

[0092] 5. Based on the screen position and the first offset position of the first element, obtain the predicted position of the cursor on the screen after input.

[0093] In one embodiment, the first element has the same style as the input box control, and the screen position of the first element is the same as the screen position of the input box control. Based on the screen position of the first element and the first offset position of the second element relative to the first element, the predicted position of the cursor on the screen after input can be obtained.

[0094] By obtaining the predicted cursor position after input using the above method, the problem of the terminal being unable to obtain the virtual cursor position is solved. In actual display, the cursor is not actually displayed at the predicted position; therefore, the terminal (optionally, the browser running on the terminal) cannot directly obtain the predicted cursor position after input. Furthermore, the calculation method for the predicted position is relatively simple and can be implemented using only front-end technology, making it less prone to errors when the terminal calculates the predicted cursor position after input.

[0095] Step 460: Obtain the screen position of the input toolbar;

[0096] Optionally, the position of the input toolbar on the screen is fixed, and the display position of the input toolbar on the screen remains unchanged as the user continuously enters content in the input box control.

[0097] In one embodiment, the input toolbar is elongated. The coordinates of the top-left corner of the input toolbar on the screen and its height are obtained; based on these coordinates, the screen position of the input toolbar is determined.

[0098] Optionally, the length of the input toolbar is equal to the width of the screen. After obtaining the coordinates of the top left corner of the input toolbar on the screen and the height of the input toolbar, the position occupied by the input toolbar on the screen can be calculated. For example, if the coordinates of the top left corner of the input toolbar on the screen are (0, 80), the height of the input toolbar is 10, and the width of the screen is 40, then the screen position of the input toolbar is the rectangular area enclosed by the coordinates (0, 80), (0, 70), (40, 80), and (40, 70).

[0099] The above embodiments provide a method for obtaining the screen position of an elongated input toolbar. These embodiments only obtain the coordinates of the top-left corner and the height of the input toolbar, resulting in less data and a lower probability of calculation errors. Furthermore, the screen position of the input toolbar calculated from its top-left corner coordinates and height is relatively accurate.

[0100] Step 480: If the cursor position on the screen overlaps with the screen position of the input toolbar after input, automatically scroll the first page.

[0101] If the predicted cursor position falls on the screen position of the input toolbar after the calculated input, the first page will automatically scroll.

[0102] In summary, the above embodiments first obtain the predicted position of the cursor after input and the screen position of the input toolbar, and then determine whether the predicted position of the cursor after input and the screen position of the input toolbar overlap. If they overlap, the first page is automatically scrolled. The above embodiments provide a solution for automatically scrolling the first page when the cursor is detected to be about to be obscured by the input toolbar. The solution is relatively simple and easy to implement on the front end.

[0103] Cost-saving plan

[0104] based on Figure 4 In the alternative embodiments shown, step 420 includes at least one of the following methods.

[0105] The first possible implementation: In response to the input box control receiving a content input operation and the current time falling within the first time range, perform the first overlap detection.

[0106] The current time refers to the time when the content input operation was received. The first time range refers to the time range within which the first overlap detection can be performed. Optionally, the first time range is a preset time range. Optionally, the time span and location of the first time range are preset.

[0107] Schematic illustration: In response to an input field control receiving content input and the current time falling within the time window for performing the first overlap detection, the first overlap detection is performed. For example, the terminal sets a first overlap detection time window every 400ms, with a window length of 200ms. In response to an input field control receiving content input and the current time falling within the first overlap detection time window, the first overlap detection is performed.

[0108] The above method achieves performance throttling. Since each character input by the user may cause the predicted cursor position to be obscured by the input toolbar, a first overlap detection needs to be performed after each input operation. Furthermore, since the first overlap detection requires obtaining both the predicted cursor position and the input toolbar position, it is a performance-intensive operation. Therefore, in the above embodiment, the first overlap detection is only performed when both the received input operation and the current time fall within the first time range are met. This avoids excessively frequent execution of the first overlap detection and saves terminal performance.

[0109] Furthermore, when a user quickly inputs content in the input box control, such as typing rapidly, it is not necessary to perform a first overlap detection after each content input operation. This is because the user does not need to know the position of the cursor during the short period of rapid input. Therefore, the above embodiment also sets the first overlap detection to be performed only when the current time falls within the first time range, which can avoid meaningless first overlap detection when the user inputs content rapidly.

[0110] The second possible implementation: In response to the input box control receiving a content input operation and the content input operation triggering a line break event, the first overlap detection is performed.

[0111] The first overlap detection is performed only when the input box control receives a content input operation and the content input operation triggers a line break event. In this way, the embodiment of this application can avoid performing the first overlap detection every time a content input operation is received, which can reduce the large amount of performance consumed by frequently performing the first overlap detection.

[0112] In one embodiment, the terminal continuously records the scroll height of the input box control during the user's input process. If the first scroll height is less than the second scroll height, it is determined that the content input operation has triggered a line break event. Here, the first scroll height refers to the scroll height of the input box control before responding to the content input operation, and the second scroll height refers to the scroll height of the input box control after responding to the content input operation.

[0113] Optionally, the input box control provides a scrollbar, which can be a sidebar scrollbar. As the user continuously enters content into the input box control, the scrollbar will continuously scroll. By detecting changes in the scrollbar's height, a line break event can be determined. In this embodiment, the present application provides a method for determining line break events. For the terminal, determining whether a line break event is triggered by the scrollbar's height does not consume much performance, and it is an easy-to-implement technical means.

[0114] In this embodiment, the first overlap detection is only performed when both the condition of receiving a content input operation and the content input operation triggering a line break event are met. This avoids performing the first overlap detection too frequently and saves terminal performance.

[0115] It should be noted that the first and second possible implementation methods described above can be used simultaneously, or only one of them can be used; this application is not limited in this regard. For example, in response to the input box control receiving a content input operation, and the current time falling within the first time range, and the content input operation triggering a line break event, the first overlap detection is performed. In this case, the frequent execution of the first overlap detection can be avoided to a greater extent, thus saving more terminal performance.

[0116] based on Figure 3 In the optional embodiments shown, it also includes Figure 6 Steps 620 and 640 are shown. Figure 6 Steps 620 and 640 are illustrated by example, executed by the terminal. The method includes:

[0117] Step 620: In response to the input box control receiving a hit operation, and the cursor position corresponding to the hit operation being located on the screen position of the input toolbar, the first page is automatically scrolled.

[0118] A hit operation refers to the action of selecting an input box control. Optionally, a hit operation includes selecting the input box control when it is not currently selected. Alternatively, a hit operation may include selecting another input location within the input box control. A cursor will be displayed within the input box control after a hit operation.

[0119] In one embodiment, the hit operation includes a trigger operation applied to the input box control, and the trigger operation includes, but is not limited to, at least one of the following: single click, double click, long press, pressure touch, two-finger press, knuckle double click, hover touch, and multiple clicks.

[0120] The cursor position after a hit refers to the position where the cursor appears within an input control after a hit operation is received on the first page. For example, if input controls A, B, and C are displayed on the first page, and input control B receives a hit operation, and previously displayed "1112 13 14", the cursor will appear after "14". The position after "14" is the cursor position after the hit operation.

[0121] To illustrate, the input box control B originally displayed "11 12 13 14", with a cursor appearing after "14". In response to a click operation that occurs in the input box control B at the position between "12" and "13", the cursor will appear after "12", and the position after "12" will be the cursor position after the click.

[0122] In response to a hit operation received by the input box control, a cursor will be displayed at the hit cursor position within the input box control. If the hit cursor position is located on the screen position of the input toolbar, the first page will be scrolled automatically. Optionally, the first page will be scrolled down to avoid the hit cursor position being obscured by the input toolbar.

[0123] Optionally, scroll down the first page until the cursor position after the hit is at a critical position that is not obscured by the input toolbar, that is, after scrolling, the cursor position after the hit is just above the input toolbar. Optionally, scroll down the first page until the distance between the cursor position after the hit and the input toolbar reaches a first distance threshold, that is, after scrolling, there is still a certain area that is not obscured for the user to input content.

[0124] In one embodiment, in response to the input box control being selected for a preset duration threshold, the first page is scrolled down until the distance between the cursor position and the input toolbar reaches a first distance threshold. Illustratively, multiple controls are displayed on the first page, from which the user can select a target control for further interaction. If the input box control is selected for a duration threshold, it indicates that the user prefers continuous interaction with the input box control. In this case, scrolling the first page until the distance between the cursor position and the input toolbar reaches the first distance threshold provides the user with a larger unobstructed area for continuous input.

[0125] In one embodiment, in response to the input box control being selected for a duration that does not reach a preset duration threshold, the first page is scrolled down until the cursor position is at a critical position that is not obscured by the input toolbar after a selection is made. Illustratively, multiple controls are displayed on the first page, from which the user can select a target control to perform further interaction. If the input box control is selected for a duration that does not reach the preset duration threshold, it indicates that the user does not yet expect continuous interaction with the input box control. In this case, the first page is simply scrolled until the cursor position is at a critical position that is not obscured by the input toolbar after a selection is made. There is no need to reserve an unobscured area to allow the screen to display more preceding information, which the user can refer to and use to better input subsequent content.

[0126] Step 640: Display the cursor at the position of the hit cursor on the screen location that is not obscured by the input toolbar.

[0127] Reference Figure 1 From parts (A) and (B), it can be seen that after the first page 110 is scrolled, the cursor at the hit position is displayed on the screen position that is not obscured by the input toolbar 130.

[0128] In summary, the first page displays an input box control. In response to the input box control receiving a hit operation, and the input position corresponding to the hit operation being obscured by the input toolbar, the first page will automatically scroll. The above embodiment solves the problem of the cursor being obscured by the input toolbar after the input box control is hit, thereby avoiding the user's manual scrolling of the first page to move the cursor to the visible area. The above embodiment can improve the user's interactive experience with the input box control and reduce the user's tedious operations.

[0129] based on Figure 6 In the optional embodiment shown, step 620 includes Figure 7 Steps 720 to 780 shown are, in order to Figure 7 The method is illustrated by example, executed by the terminal. This method includes:

[0130] Step 720: In response to the input box control receiving a hit operation, perform the second overlap detection;

[0131] In response to the detection by the JavaScript (an interpreted scripting language) engine that the input box control has received a hit operation, it is determined that a second overlap detection will be performed.

[0132] In one embodiment, a second overlap detection is performed for each hit operation received, because any input position hit by the user may trigger the cursor position to be obscured by the input toolbar after the hit.

[0133] Step 740: In the second overlap detection, obtain the predicted position of the cursor on the screen after the hit;

[0134] The predicted position refers to the predicted cursor position on the screen after a hit. It's a screen position calculated by the terminal during overlap detection. Upon receiving a hit operation, the terminal can determine the predicted cursor position on the screen based on the user's hit operation. (Illustratively, in...) Figure 1 In part (A), in response to the input box control 120 receiving a hit operation from the user, the predicted position of the cursor after the hit (not shown) is located on the screen position of the input toolbar 130.

[0135] In one embodiment, the predicted position of the cursor after a hit is calculated through the following steps.

[0136] 1. Create a third element with the same style as the input box control; insert the content before the second expected cursor in the input box control into the third element. The second expected cursor refers to the cursor that will be displayed after the expected response hit operation.

[0137] In one embodiment, a third element is created by the JavaScript engine. The third element is an invisible element that is positioned on the screen in the same way as the input box control. The content before the cursor that is expected to be displayed after the response hit operation is inserted into the third element. It should be noted that the second expected cursor does not actually exist on the interface. The second expected cursor is an additional cursor generated when performing overlap detection.

[0138] like Figure 8 As shown, the input box control contains numbers 1 to 8. There is a newline character between 3 and 4, and between 5 and 6. After a hit operation, the second expected cursor in the input box control is positioned after the number "5". Create a third element with the same style as the input box control; specifically, the third element and the input box control are identical in size and screen position. Insert "1 2 3 4 5" before the second expected cursor into the third element.

[0139] 2. Create a fourth element and insert the content after the second cursor position in the input box control into the fourth element.

[0140] In one embodiment, a new fourth element is created using the JavaScript engine, and the content expected to appear after the cursor in the input box control after the response hit is inserted into the fourth element. If the content expected after the cursor is empty, no content is inserted into the fourth element.

[0141] like Figure 8As shown, create a fourth element. Insert "678" after the second cursor position in the input box control into the fourth element.

[0142] 3. Insert the fourth element at the end of the third element.

[0143] In one embodiment, the fourth element is inserted at the end of the third element, meaning the fourth element becomes a child element of the third element, immediately following the content within the third element.

[0144] like Figure 8 As shown, the fourth element is inserted at the end of the third element, at which point the fourth element becomes a child element of the third element.

[0145] 4. Obtain the second offset position of the fourth element relative to the third element.

[0146] In one embodiment, the offset position of the fourth element relative to the third element is obtained.

[0147] 5. Based on the screen position of the third element and the second offset position, obtain the predicted position of the cursor on the screen after the hit.

[0148] In one embodiment, the third element has the same style as the input box control, and the screen position of the third element is the same as the screen position of the input box control. Based on the screen position of the third element and the second offset position of the fourth element relative to the third element, the predicted position of the cursor on the screen after the hit can be obtained.

[0149] The method described above for obtaining the predicted cursor position after a hit solves the problem of the terminal being unable to obtain the virtual cursor position. In actual display, the cursor is not actually displayed at the predicted position; therefore, the terminal (optionally, the browser running on the terminal) cannot directly obtain the predicted cursor position after a hit. Furthermore, the calculation method for the predicted position is relatively simple and can be implemented using only front-end technology, making it less prone to errors when the terminal calculates the predicted cursor position after a hit.

[0150] Step 760: Obtain the screen position of the input toolbar;

[0151] Optionally, the input toolbar is positioned on the screen in a fixed location. When a user selects an input box control, the input toolbar will be overlaid on the first page. The position of the input toolbar is preset.

[0152] In one embodiment, the input toolbar is elongated. The coordinates of the top-left corner of the input toolbar on the screen and its height are obtained; based on these coordinates, the screen position of the input toolbar is determined.

[0153] Optionally, the length of the input toolbar is equal to the width of the screen. After obtaining the coordinates of the top left corner of the input toolbar on the screen and the height of the input toolbar, the position occupied by the input toolbar on the screen can be calculated. For example, if the coordinates of the top left corner of the input toolbar on the screen are (0, 80), the height of the input toolbar is 10, and the width of the screen is 40, then the screen position of the input toolbar is the rectangular area enclosed by the coordinates (0, 80), (0, 70), (40, 80), and (40, 70).

[0154] The above embodiments provide a method for obtaining the screen position of an elongated input toolbar. These embodiments only obtain the coordinates of the top-left corner and the height of the input toolbar, resulting in less data and a lower probability of calculation errors. Furthermore, the screen position of the input toolbar calculated from its top-left corner coordinates and height is relatively accurate.

[0155] Step 780: If the predicted position of the cursor on the screen overlaps with the screen position of the input toolbar after a hit, automatically scroll the first page.

[0156] If the predicted cursor position after a hit falls on the screen position of the input toolbar, the first page will automatically scroll.

[0157] In summary, the above embodiments first obtain the predicted position of the cursor after a hit and the screen position of the input toolbar, and then determine whether the predicted position of the cursor after a hit and the screen position of the input toolbar overlap. If they overlap, the first page is automatically scrolled. The above embodiments provide a solution for automatically scrolling the first page when the cursor is detected to be about to be obscured by the input toolbar. The solution is relatively simple and easy to implement on the front end.

[0158] Application Scenario Examples

[0159] Figure 9 A flowchart illustrating a cursor display method provided in an exemplary embodiment of this application is shown, in which the method is... Figure 2 The method is illustrated by example, executed by terminal 220 in the example, and includes:

[0160] Step 920: Display the mobile webpage, which includes an input box control;

[0161] Mobile web pages refer to web pages displayed on browsers installed and running on mobile devices. These mobile web pages are provided by third-party web servers. A third-party web server is a web server provided by a vendor other than the browser provider; it is a web server in the conventional sense. When displaying a third-party web page, the browser may show an address bar containing the web page's URL.

[0162] An input box control refers to a control on a mobile webpage that allows users to input content. Optionally, the input box control can be displayed as a box, rounded rectangle, ellipse, or rhombus. Optionally, the size of the input box control is fixed on the mobile webpage; that is, the size of the input box control does not increase as the user inputs more content, nor does it expand its displayed area when the user clicks on the input box control.

[0163] Optionally, the size of the input box control can be dynamically changed. For illustration, when the user does not click on the input box control, it appears as a small rectangle on the mobile webpage. When the user clicks on the input box control, it will display a larger input area to accommodate the user's input. Optionally, as more user input is entered, the input box control will automatically expand to accommodate more input.

[0164] Step 940: In response to the input box control receiving a content input operation, and the cursor position corresponding to the content input operation being obscured by the input toolbar superimposed on the mobile webpage, the mobile webpage is automatically scrolled.

[0165] Content input operation refers to the operation of entering content into an input box control. In one embodiment, the content input operation is performed by the user through a virtual keyboard. Optionally, a virtual keyboard provided by the browser or operating system is overlaid on the mobile webpage. Optionally, the virtual keyboard is located at the bottom of the terminal screen.

[0166] In response to an input field being entered into the input field, a cursor will be displayed at the cursor position after input. If the cursor position is obscured by the input toolbar, the mobile webpage will automatically scroll. Optionally, the mobile webpage can be scrolled down to avoid the cursor position being obscured by the input toolbar.

[0167] Optionally, scroll down the mobile webpage until the cursor position is at a critical position where it is not obscured by the input toolbar after input, i.e., the cursor position is just above the input toolbar after scrolling. Optionally, scroll down the mobile webpage until the distance between the cursor position and the input toolbar reaches a first distance threshold, i.e., after scrolling, there is still a certain unobstructed area for the user to continue inputting content.

[0168] In one embodiment, in response to receiving a content input operation in the input box control, a first overlap detection is performed; in the first overlap detection, the predicted position of the cursor on the screen after input is obtained; and the screen position of the input toolbar is obtained; and if the predicted position of the cursor on the screen after input overlaps with the screen position of the input toolbar, the mobile webpage is automatically scrolled.

[0169] Specifically, the predicted position of the cursor on the screen after input is obtained through the following 6 steps.

[0170] 1. Create the first element, whose style is the same as that of the input box control;

[0171] 2. Insert the content before the first expected cursor in the input box control into the first element. The first expected cursor refers to the cursor that will be displayed after the expected response content input operation.

[0172] 3. Create a second element and insert the content after the cursor in the first input box control into the second element;

[0173] 4. Insert the second element at the end of the first element;

[0174] 5. Obtain the first offset position of the second element relative to the first element;

[0175] 6. Based on the screen position and the first offset position of the first element, obtain the predicted position of the cursor on the screen after input.

[0176] Specifically, the input toolbar is a long bar. You can find the screen position of the input toolbar using the following two steps.

[0177] 1. Obtain the coordinates of the top-left corner of the input toolbar on the screen and the height of the input toolbar;

[0178] 2. Based on the coordinates of the top left corner and the height, obtain the screen position of the input toolbar.

[0179] In one embodiment, a first overlap detection is performed in response to an input field control receiving content input and the current time falling within a first time range. Illustratively, the first overlap detection is performed in response to an input field control receiving content input and the current time falling within the time window for performing the first overlap detection.

[0180] In one embodiment, a first overlap detection is performed in response to an input field control receiving a content input operation and the content input operation triggering a line break event. The first overlap detection is only performed when the input field control receives a content input operation and the content input operation triggers a line break event. In this way, the embodiments of this application avoid performing the first overlap detection every time a content input operation is received, thus reducing the significant performance consumption caused by frequently performing the first overlap detection.

[0181] Specifically, during the user's input process, the terminal will continuously record the scroll height of the input box control. If the first scroll height is less than the second scroll height, it will determine that the content input operation has triggered a line break event. Here, the first scroll height refers to the scroll height of the input box control before responding to the content input operation, and the second scroll height refers to the scroll height of the input box control after responding to the content input operation.

[0182] Step 960: Display the cursor at the cursor position after input on a screen location not obscured by the input toolbar. The input toolbar is a toolbar provided by the mobile web service provider to assist with input.

[0183] After the mobile webpage scrolls automatically, the cursor will be displayed in the position of the cursor after input on the screen where it is not obscured by the input toolbar.

[0184] In summary, the above embodiments provide a solution for automatically scrolling the mobile webpage when the cursor in an input box control on a mobile webpage is about to be obscured by a toolbar provided by the mobile webpage service provider, thereby preventing the cursor from being obscured by the input toolbar. These embodiments avoid the need for users to manually scroll the mobile webpage to move the cursor to the visible area, improving the user's input experience within the input box control.

[0185] based on Figure 9 The optional embodiments shown, Figure 10 A flowchart of a cursor display method provided in an exemplary embodiment of this application is shown, in which the method is... Figure 2 The terminal 220 shown is used to illustrate, for example, the method includes:

[0186] Step 1020: In response to the input box control receiving a hit operation, and the cursor position corresponding to the hit operation being located on the screen position of the input toolbar, the mobile webpage is automatically scrolled.

[0187] In one embodiment, in response to the input box control receiving a hit operation, a second overlap detection is performed; in the second overlap detection, the predicted position of the cursor on the screen after the hit is obtained; and the screen position of the input toolbar is obtained; if the predicted position of the cursor on the screen after the hit overlaps with the screen position of the input toolbar, the mobile webpage is automatically scrolled.

[0188] Specifically, the predicted position of the cursor on the screen after a hit is obtained through the following 6 steps.

[0189] 1. Create a third element, whose style is the same as that of the input box control;

[0190] 2. Insert the content before the second expected cursor in the input box control into the third element. The second expected cursor refers to the cursor that will be displayed after the expected response hit operation.

[0191] 3. Create a fourth element and insert the content after the second cursor position in the input box control into the fourth element;

[0192] 4. Insert the fourth element at the end of the third element;

[0193] 5. Obtain the second offset position of the fourth element relative to the third element;

[0194] 6. Based on the screen position of the third element and the second offset position, obtain the predicted position of the cursor on the screen after the hit.

[0195] Specifically, the screen position of the input toolbar can be obtained through the following two steps.

[0196] 1. Obtain the coordinates of the top-left corner of the input toolbar on the screen and the height of the input toolbar;

[0197] 2. Based on the coordinates of the top left corner and the height, obtain the screen position of the input toolbar.

[0198] Step 1040: Display the cursor at the position of the hit cursor on the screen location that is not obscured by the input toolbar.

[0199] After the mobile webpage is automatically scrolled, the cursor will be displayed at the position of the hit cursor in a screen location that is not obscured by the input toolbar.

[0200] In summary, the above embodiments provide a solution for automatically scrolling the mobile webpage when the cursor in an input box control on a mobile webpage is about to be obscured by a toolbar provided by the mobile webpage service provider, thereby preventing the cursor from being obscured by the input toolbar. These embodiments avoid the need for users to manually scroll the mobile webpage to move the cursor to the visible area, improving the user's interactive experience with the input box control.

[0201] Figure 11 This application shows a structural block diagram of a cursor display device provided in an exemplary embodiment. The device includes:

[0202] Display module 1110 is used to display the first page, which includes an input box control;

[0203] The scrolling module 1120 is used to automatically scroll the first page in response to the input box control receiving a content input operation and the cursor position being obscured by the input toolbar superimposed on the first page after the content input operation is performed.

[0204] The display module 1110 is also used to display the cursor located at the cursor position after input in a screen position not obscured by the input toolbar, wherein the input toolbar is used to provide at least one auxiliary input function.

[0205] In an optional embodiment, the scrolling module 1120 is further configured to perform a first overlap detection in response to the input box control receiving a content input operation;

[0206] In the first overlap detection, the predicted position of the cursor on the screen after input is obtained;

[0207] And, get the screen position of the input toolbar;

[0208] If the cursor position overlaps with the predicted position on the screen after input and the screen position of the input toolbar, the first page will automatically scroll.

[0209] In an optional embodiment, the scrolling module 1120 is further configured to create a first element, the style of which is the same as that of the input box control; and to insert the content before the first expected cursor in the input box control into the first element, the first expected cursor referring to the cursor that will be displayed after the expected response content input operation;

[0210] And, create a second element, insert the content after the first expected cursor position in the input box control into the second element; insert the second element at the end of the first element;

[0211] Get the first offset position of the second element relative to the first element;

[0212] Based on the screen position and the first offset position of the first element, the predicted position of the cursor on the screen after input is obtained.

[0213] In an optional embodiment, the input toolbar is elongated; the scrolling module 1120 is also used to obtain the coordinates of the upper left corner of the input toolbar on the screen and the height of the input toolbar;

[0214] Based on the coordinates of the top left corner and the height, the screen position of the input toolbar is obtained.

[0215] In an optional embodiment, the scrolling module 1120 is further configured to perform a first overlap detection in response to the input box control receiving a content input operation and the current time falling within a first time range.

[0216] In an optional embodiment, the scrolling module 1120 is further configured to perform a first overlap detection in response to the input box control receiving a content input operation and the content input operation triggering a line break event.

[0217] In an optional embodiment, the scrolling module 1120 is also configured to continuously record the scroll height of the input box control;

[0218] If the first scroll height is less than the second scroll height, the input operation triggers a line break event;

[0219] The first scroll height refers to the scroll height of the input box control before responding to the content input operation, and the second scroll height refers to the scroll height of the input box control after responding to the content input operation.

[0220] In an optional embodiment, the scrolling module 1120 is further configured to automatically scroll the first page in response to the input box control receiving a hit operation, and the cursor position corresponding to the hit operation being located on the screen position of the input toolbar.

[0221] The display module 1110 is also used to display the cursor at the position of the hit cursor in a screen position not obscured by the input toolbar.

[0222] In an optional embodiment, the scrolling module 1120 is further configured to perform a second overlap detection in response to the input box control receiving a hit operation;

[0223] In the second overlap detection, the predicted position of the cursor on the screen after a hit is obtained;

[0224] And, get the screen position of the input toolbar;

[0225] If the predicted position of the cursor on the screen overlaps with the screen position of the input toolbar after a hit, the first page will automatically scroll.

[0226] In an optional embodiment, the scrolling module 1120 is further configured to create a third element, the style of which is the same as that of the input box control; and to insert the content before the second expected cursor in the input box control into the third element, the second expected cursor referring to the cursor to be displayed after the expected response hit operation;

[0227] And, create a fourth element, insert the content after the second expected cursor position in the input box control into the fourth element; insert the fourth element at the end of the third element;

[0228] Get the second offset position of the fourth element relative to the third element;

[0229] Based on the screen position of the third element and the second offset position, the predicted position of the cursor on the screen after a hit is obtained.

[0230] In an optional embodiment, the scrolling module 1120 is further configured to obtain the coordinates of the upper left corner of the input toolbar on the screen and the height of the input toolbar;

[0231] Based on the coordinates of the top left corner and the height, the screen position of the input toolbar is obtained.

[0232] In an optional embodiment, the input toolbar is positioned above the virtual keyboard on the screen, with the virtual keyboard superimposed on the bottom of the screen on the first page.

[0233] In summary, in this application, an input box control is displayed on the first page. As the user inputs content, when the cursor in the input box control is about to be obscured by the input toolbar, the first page will automatically scroll to avoid the cursor being obscured by the input toolbar after content input. This avoids the user having to manually scroll the first page to move the cursor to the visible area. The above embodiment can improve the user's input experience in the input box control and reduce the user's tedious operations.

[0234] Figure 12 A structural block diagram of a computer device 1200 provided in an exemplary embodiment of this application is shown. The computer device 1200 may be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The computer device 1200 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.

[0235] Typically, computer device 1200 includes a processor 1201 and a memory 1202.

[0236] Processor 1201 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1201 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1201 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1201 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1201 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0237] The memory 1202 may include one or more computer-readable storage media, which may be non-transitory. The memory 1202 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1202 are used to store at least one instruction, which is executed by the processor 1201 to implement the cursor display method provided in the method embodiments of this application.

[0238] In some embodiments, the computer device 1200 may also optionally include a peripheral device interface 1203 and at least one peripheral device. The processor 1201, memory 1202, and peripheral device interface 1203 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1203 via a bus, signal line, or circuit board. For example, the peripheral device may include at least one of the following: a radio frequency circuit 1204, a display screen 1205, a camera assembly 1206, an audio circuit 1207, and a power supply 1208.

[0239] Peripheral device interface 1203 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1201 and memory 1202. In some embodiments, processor 1201, memory 1202 and peripheral device interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1201, memory 1202 and peripheral device interface 1203 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0240] The radio frequency (RF) circuit 1204 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1204 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1204 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1204 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1204 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1204 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0241] Display screen 1205 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1205 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1201 for processing. In this case, display screen 1205 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1205, disposed on the front panel of computer device 1200; in other embodiments, there may be at least two display screens, disposed on different surfaces of computer device 1200 or in a folded design; in still other embodiments, display screen 1205 may be a flexible display screen, disposed on a curved or folded surface of computer device 1200. Furthermore, display screen 1205 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1205 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0242] The camera assembly 1206 is used to acquire images or videos. Optionally, the camera assembly 1206 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1206 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0243] The audio circuit 1207 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1201 for processing, or input to the radio frequency circuit 1204 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located at a different part of the computer device 1200. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1201 or the radio frequency circuit 1204 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1207 may also include a headphone jack.

[0244] Power supply 1208 is used to supply power to the various components in computer device 1200. Power supply 1208 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1208 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0245] In some embodiments, the computer device 1200 further includes one or more sensors 1209. The one or more sensors 1209 include, but are not limited to, an accelerometer 1210, a gyroscope 1211, a pressure sensor 1212, an optical sensor 1213, and a proximity sensor 1214.

[0246] Accelerometer 1210 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by computer device 1200. For example, accelerometer 1210 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1201 can control display screen 1205 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1210. Accelerometer 1210 can also be used for games or for acquiring user motion data.

[0247] The gyroscope sensor 1211 can detect the orientation and rotation angle of the computer device 1200. The gyroscope sensor 1211 can work in conjunction with the accelerometer sensor 1212 to acquire 3D motion data from the user on the computer device 1200. Based on the data acquired by the gyroscope sensor 1211, the processor 1201 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0248] The pressure sensor 1212 can be disposed on the side bezel of the computer device 1200 and / or on the lower layer of the display screen 1205. When the pressure sensor 1212 is disposed on the side bezel of the computer device 1200, it can detect the user's grip signal on the computer device 1200, and the processor 1201 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 1212. When the pressure sensor 1212 is disposed on the lower layer of the display screen 1205, the processor 1201 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 1205. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0249] Optical sensor 1213 is used to collect ambient light intensity. In one embodiment, processor 1201 can control the display brightness of display screen 1205 based on the ambient light intensity collected by optical sensor 1213. For example, when the ambient light intensity is high, the display brightness of display screen 1205 is increased; when the ambient light intensity is low, the display brightness of display screen 1205 is decreased. In another embodiment, processor 1201 can also dynamically adjust the shooting parameters of camera assembly 1206 based on the ambient light intensity collected by optical sensor 1213.

[0250] The proximity sensor 1214, also known as a distance sensor, is typically installed on the front panel of the computer device 1200. The proximity sensor 1214 is used to detect the distance between the user and the front of the computer device 1200. In one embodiment, when the proximity sensor 1214 detects that the distance between the user and the front of the computer device 1200 is gradually decreasing, the processor 1201 controls the display screen 1205 to switch from a screen-on state to a screen-off state; when the proximity sensor 1214 detects that the distance between the user and the front of the computer device 1200 is gradually increasing, the processor 1201 controls the display screen 1205 to switch from a screen-off state to a screen-on state.

[0251] Those skilled in the art will understand that Figure 12 The structure shown does not constitute a limitation on the computer device 1200 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0252] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the cursor display method provided in the above method embodiments.

[0253] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the cursor display method provided in the above-described method embodiments.

[0254] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0255] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0256] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A cursor display method, characterized in that, The method includes: Display a first page, which includes an input box control; In response to the input box control receiving a content input operation, and the cursor position corresponding to the content input operation being obscured by the input toolbar superimposed on the first page, the first page is automatically scrolled. A cursor is displayed at the cursor position after the input on a screen location not obscured by the input toolbar, the input toolbar being used to provide at least one auxiliary input function.

2. The method according to claim 1, characterized in that, The step of automatically scrolling the first page in response to the input box control receiving a content input operation, and the cursor position corresponding to the content input operation being obscured by the input toolbar superimposed on the first page, includes: In response to the input box control receiving the content input operation, a first overlap detection is performed; In the first overlap detection, the predicted position of the cursor on the screen after the input is obtained; and the screen position of the input toolbar is obtained. If the predicted position of the cursor on the screen after input overlaps with the screen position of the input toolbar, the first page will automatically scroll.

3. The method according to claim 2, characterized in that, The step of obtaining the predicted position of the cursor on the screen after the input includes: Create a first element whose style is the same as that of the input box control; insert the content before the first expected cursor in the input box control into the first element, where the first expected cursor refers to the cursor that is expected to be displayed after responding to the content input operation; And, create a second element, insert the content after the first expected cursor in the input box control into the second element; insert the second element at the end of the first element; Obtain the first offset position of the second element relative to the first element; Based on the screen position of the first element and the first offset position, the predicted position of the cursor on the screen after the input is obtained.

4. The method according to claim 2, characterized in that, The input toolbar is elongated; obtaining the screen position of the input toolbar includes: Obtain the coordinates of the top left corner of the input toolbar on the screen and the height of the input toolbar; The screen position of the input toolbar is obtained based on the coordinates of the top left corner and the height.

5. The method according to any one of claims 2 to 4, characterized in that, The step of performing a first overlap detection in response to the input box control receiving the content input operation includes: In response to the input box control receiving the content input operation and the current time falling within the first time range, the first overlap detection is performed.

6. The method according to any one of claims 2 to 4, characterized in that, The step of performing a first overlap detection in response to the input box control receiving the content input operation includes: In response to the input box control receiving the content input operation and the content input operation triggering a line break event, the first overlap detection is performed.

7. The method according to claim 6, characterized in that, The method further includes: Continuously record the scroll height of the input box control; If the first scroll height is less than the second scroll height, it is determined that the content input operation triggered the line break event; Wherein, the first scroll height refers to the scroll height of the input box control before responding to the content input operation, and the second scroll height refers to the scroll height of the input box control after responding to the content input operation.

8. The method according to any one of claims 1 to 4, characterized in that, The method further includes: In response to the input box control receiving a hit operation, and the cursor position corresponding to the hit operation being located on the screen position of the input toolbar, the first page is automatically scrolled; The cursor is displayed at the position of the cursor after the hit on a screen location that is not obscured by the input toolbar.

9. The method according to claim 8, characterized in that, The step of automatically scrolling the first page in response to the input box control receiving a hit operation, and the cursor position corresponding to the hit operation being located on the screen position of the input toolbar, includes: In response to the input box control receiving the hit operation, a second overlap detection is performed; In the second overlap detection, the predicted position of the cursor on the screen after the hit is obtained; And, obtain the screen position of the input toolbar; If the predicted position of the cursor on the screen after the hit overlaps with the screen position of the input toolbar, the first page will automatically scroll.

10. The method according to claim 9, characterized in that, The step of obtaining the predicted position of the cursor on the screen after the hit includes: Create a third element whose style is the same as that of the input box control; insert the content before the second expected cursor in the input box control into the third element, where the second expected cursor refers to the cursor that is expected to be displayed after the hit operation; And, create a fourth element, insert the content after the second expected cursor in the input box control into the fourth element; insert the fourth element at the end of the third element; Obtain the second offset position of the fourth element relative to the third element; Based on the screen position of the third element and the second offset position, the predicted position of the cursor on the screen after the hit is obtained.

11. The method according to claim 9, characterized in that, The input toolbar is elongated; obtaining the screen position of the input toolbar includes: Obtain the coordinates of the top left corner of the input toolbar on the screen and the height of the input toolbar; The screen position of the input toolbar is obtained based on the coordinates of the top left corner and the height.

12. The method according to any one of claims 1 to 4, characterized in that, The input toolbar is positioned above the virtual keyboard on the screen, while the virtual keyboard is positioned at the bottom of the screen and is overlaid on the first page.

13. A cursor display device, characterized in that, The device includes: A display module is used to display a first page, which includes an input box control. The scrolling module is used to automatically scroll the first page in response to the input box control receiving a content input operation and the cursor position corresponding to the content input operation being obscured by the input toolbar superimposed on the first page. The display module is also used to display a cursor located at the cursor position after input in a screen position not obscured by the input toolbar, wherein the input toolbar is used to provide at least one auxiliary input function.

14. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the cursor display method as described in any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is loaded and executed by a processor to implement the cursor display method as described in any one of claims 1 to 12.

16. A computer program product, characterized in that, The computer program product stores a computer program that is loaded and executed by a processor to implement the cursor display method as described in any one of claims 1 to 12.