WO2019214181A1 - Document input control method and device - Google Patents

Document input control method and device Download PDF

Info

Publication number
WO2019214181A1
WO2019214181A1 PCT/CN2018/113419 CN2018113419W WO2019214181A1 WO 2019214181 A1 WO2019214181 A1 WO 2019214181A1 CN 2018113419 W CN2018113419 W CN 2018113419W WO 2019214181 A1 WO2019214181 A1 WO 2019214181A1
Authority
WO
WIPO (PCT)
Prior art keywords
display page
input line
current input
page
line
Prior art date
Application number
PCT/CN2018/113419
Other languages
French (fr)
Chinese (zh)
Inventor
彭骋
Original Assignee
天津字节跳动科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 天津字节跳动科技有限公司 filed Critical 天津字节跳动科技有限公司
Publication of WO2019214181A1 publication Critical patent/WO2019214181A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a method and an apparatus for controlling document input.
  • Document editing work is often required in daily work and life.
  • the position of the current input line is usually set at the bottom of the screen, and the overall space of the document input is very cramped, so that the user's line of sight is lowered, and the user experience is poor.
  • the present application provides a method and a device for controlling document input, which can solve the problem that the overall space of document input in the document editing process is very cramped and the user experience is poor.
  • the first aspect of the present application provides a method for controlling document input, including:
  • the method for controlling document input adjusts the position of the current input line in the display page according to the position of the current input line in the display page and the page content in the display page, so that the position of the input line is relatively Loose, comfortable space to enhance the user experience.
  • the second aspect of the present application provides a text input control apparatus, including:
  • a detecting module configured to detect a position of the current input line in the display page
  • An obtaining module configured to obtain page content in the display page
  • an adjustment module configured to adjust the position of the current input line in the display page according to the location and the content of the page.
  • the detecting module detects the position of the current input line in the display page
  • the acquiring module acquires the content of the page in the display page
  • the adjusting module detects the position detected by the detecting module and the content of the page acquired by the acquiring module. Adjust the position of the current input line in the display page so that the position of the input line is in a more relaxed and comfortable space, thereby improving the user experience.
  • An embodiment of the third aspect of the present application provides an electronic device including at least one processor; and a memory communicatively coupled to the at least one processor;
  • the memory stores instructions executable by the at least one processor, the instructions being set as a control method for performing document input as described in the first aspect of the present application.
  • the fourth aspect of the present application provides a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the first application of the present application described above.
  • FIG. 1 is a flowchart of a method of controlling document input according to an embodiment of the present application
  • FIG. 2 is a flow chart of a method of controlling document input according to an embodiment of the present application
  • FIG. 3 is a flowchart of a method for controlling document input according to another embodiment of the present application.
  • FIG. 4 is a flowchart of a method for controlling document input according to still another embodiment of the present application.
  • FIG. 5 is a block diagram showing a control apparatus for document input according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram showing the hardware structure of an electronic device that performs a method of controlling document input according to an embodiment of the present application.
  • FIG. 1 is a flowchart of a method of controlling document input according to an embodiment of the present application. As shown in FIG. 1, the control method of the document input includes the following steps:
  • the input line may decrease decreasing as the content input by the user increases. Specifically, when the user opens the document and has not started inputting, the input line may be located at the top of the page when the user After inputting certain content, the input line gradually decreases, for example, the middle position of the display page. When the user input content reaches one screen, the input line can be located at the bottom of the page. Alternatively, when the user inserts text or the like into the already input content, the position where the input cursor is inserted, that is, the position of the input line may be located at the bottom of the page.
  • the page content includes a combination of any one or more of the following: text content that has been input, inserted picture or table content, and paragraph structure.
  • the text content may include text information and blank lines
  • the paragraph structure may include a column structure form, etc.
  • the inserted picture may include an entire picture or a half picture.
  • adjusting the position of the current input line in the display page is to adjust the current input line to the set display area, and the set display area can be located in the middle of the display page.
  • the embodiment of the present application detects the position of the current input line in the display page and obtains the page content in the display page, and then adjusts the position of the current input line in the display page according to the position and the page content, so as to make the input line
  • the position is in a relatively loose and comfortable space, which is convenient for the user to observe, and can effectively protect the user's line of sight, prevent the user from lowering the head operation, thereby causing problems such as shoulder and neck discomfort, and effectively improving the user's input experience.
  • the embodiment of the present application obtains the position and page content of the current input line in the display page, and then adjusts the position of the input line according to the position and the page content.
  • the page content in the display page can be the input text content, in order to more accurately determine the location of the current input line, according to the current input line position and the input text content. , adjusts the position of the current input line in the display page.
  • the control method of the document input is specifically described.
  • control method of the document input may include the following steps:
  • step S1 in the foregoing embodiment may specifically include the following steps S101-S103.
  • S103 Determine the position of the current input line in the display page according to the number of lines in which the current input line is located and the total number of lines that can be displayed on the display page.
  • the current input line can be determined according to the number of lines in which the current input line is located and the total number of lines that can be displayed on the display page. The location in the page.
  • the display page may be divided into multiple lines, and the rows displayed in the display page are labeled, that is, the number of rows corresponding to each row is determined, wherein the row and the number of rows are in one-to-one correspondence, according to the last row in the displayed page.
  • the number of rows determines the total number of rows that can be displayed on the display page. For example, the total number of rows that can be displayed on the display page is 15. For example, the number of rows corresponding to the first row at the top of the display page is 1, and the last row at the bottom of the page is displayed.
  • the number of lines is 15.
  • the input line where the input cursor is currently located is detected in real time, and the number of lines corresponding to the input line where the input cursor is currently located is obtained.
  • the current line can be determined. Enter the location of the line in the display page. For example, when the total number of lines that can be displayed on the display page is 15, for example, when it is detected that the number of lines corresponding to the input line where the input cursor is currently located is 1-3, it can be determined that the current input line is at the top of the displayed page.
  • Step S2 in the above embodiment may specifically include the following step S104.
  • S104 Acquire a text content that has been input in the display page. For example, text or blank lines.
  • Step S3 in the above embodiment may specifically include the following steps S105-S108.
  • the setting area at the bottom of the display page can be set according to the size of the displayed page.
  • the setting position area can be set to display the last 1/3 of the total number of lines of the page.
  • the set position area can be set to display the last 1-2 lines of the total number of lines of the page.
  • the set position area can also be set to display the total number of lines of the page. The first line from the bottom of the line.
  • the determination may be made according to the text content acquired in step S104. Specifically, the content of the previous line of the current input line is obtained, and it is determined whether there is a text on the upper line of the current input line. If yes, it is determined that the previous line of the current input line is not a blank line, and if not, it is determined that the previous line of the current input line is a blank line.
  • the setting display area in the middle of the display page may be set to one or more lines.
  • the setting display area may be the 8th line.
  • the position of the current input line in the display page can be adjusted to the set display area.
  • the current input line is The position of the display page is adjusted to the middle line in the display area.
  • the control method of the embodiment of the present application determines the position of the current input line in the display page by detecting the number of rows of the current input line and the total number of lines of the display page, and acquires the content in the display page, and then determines the input line. Whether the position is in the set position area at the bottom of the display page.
  • the position of the input line is in the set position area at the bottom of the display page, it is judged whether the text content of the previous line of the current input line is empty, and if it is empty, the current input is performed.
  • the line is adjusted to the first line of the setting display area in the middle of the display page. If it is not empty, the current input line is adjusted to the middle line of the setting display area in the middle of the display page. Therefore, the input line can be effectively adjusted when the document content is text, and the time interval of the current input line position adjustment can be effectively extended by judging whether the current input line is empty or not.
  • the embodiment of the present application obtains the position and page content of the current input line in the display page, and then adjusts the position of the input line according to the position and the page content.
  • the page content in the display page may be an inserted picture or a table, in order to more accurately determine the location of the current input line, according to the current input line position and the inserted picture. Or the contents of the table, adjust the position of the current input line in the display page.
  • the following describes the control method of the document input when the content of the page of the application is the input picture or the table content, with reference to FIG. 3 .
  • control method of the document input may include the following steps:
  • step S1 in the foregoing embodiment may specifically include the following steps S201-S203.
  • the text, image or table can be composed of pixels, and the pixel coordinates are the positions of the pixels in the display page.
  • a coordinate system may be first defined for the display page.
  • the upper left corner of the display page is the coordinate system origin, and the origin is from the origin to the right X-axis positive direction, and the downward direction is the Y-axis positive direction.
  • the first direction coordinate may be an X-axis coordinate
  • the second direction coordinate may be a Y-axis coordinate
  • the first direction coordinate may be a Y-axis coordinate
  • the second direction coordinate may be an X-axis coordinate, which is in this embodiment. This is not specifically limited.
  • the pixel coordinate range of the display page may also be determined according to the size of the display page.
  • each pixel of the display page can be set with corresponding pixel coordinates, the pixel coordinates corresponding to the current position of the input cursor can be detected, and the range of the pixel coordinates of the display page can be obtained, that is, The position of the current input line in the display page can be determined according to the pixel coordinates of the input cursor and the pixel coordinate range of the display page.
  • Step S2 in the above embodiment may specifically include the following step S204.
  • S204 Acquire an image or a table content that has been inserted in the display page. For example, an entire picture or table, or a half picture or form.
  • Step S3 in the above embodiment may specifically include the following steps S205-S208.
  • the setting area at the bottom of the display page can be set according to the size of the displayed page.
  • the setting position area can be set to display the last 1/3 of the total number of lines of the page.
  • the set position area can be set to display the last 1-2 lines of the total number of lines of the page.
  • the set position area can also be set to display the total number of lines of the page. The first line from the bottom of the line.
  • the determination may be made according to the picture or table content acquired in step S204. Specifically, it is determined whether the four edges of the inserted picture or the table are all displayed in the page, and if any of the inserted pictures or any edge of the form is not in the displayed page, it is determined that the inserted picture or table is partially displayed, if The four edges of the inserted picture or table are within the display page.
  • the inserted picture or table content is partially displayed, the inserted part of the displayed picture or table content is determined to be above or below the current input line.
  • the partially displayed inserted picture content is located above or below the current input line.
  • the inserted picture or table is located above the current input line, and if the pixel coordinate of the input cursor is larger than the Y-axis value of the pixel coordinate of the inserted picture or the lower edge of the table. When it is determined, the inserted picture or table is located below the current input line.
  • the method for controlling document input in the embodiment of the present application determines the pixel coordinate range of the input cursor and obtains the pixel coordinate range of the display page, and then determines the position of the current input line in the display page according to the pixel coordinate and the pixel coordinate range, and determines Whether the location is in the set location area at the bottom of the display page. If the location of the input line is within the set location area at the bottom of the display page, it is determined whether the inserted picture or table content is partially displayed in the display page, and When the inserted picture or table is partially displayed, the inserted picture or table content displayed in the judgment part is located above or below the current input line, and if it is above the current input line, the position of the current input line in the display page is adjusted.
  • the last line of the setting display area to the middle of the display page if it is below the current input line, adjusts the position of the current input line in the display page to the first line of the set display area.
  • the partially displayed picture or table can be displayed as completely as possible, so that the user can view the content of the picture or the form.
  • the user can detect the position of the current input line in the display page according to the number of lines of the current input line or the pixel coordinates of the input cursor, and then according to the content of the displayed page (the input text) Content, inserted images, or table content) Adjust the position of the current input line to enhance the user experience.
  • the display page content further includes a paragraph structure.
  • step S3 in the above embodiment "adjusts the current position according to the position and the page content.
  • the location of the input line in the display page also includes the following steps:
  • the setting area at the bottom of the display page can be set according to the size of the displayed page.
  • the setting position area can be set to display the last 1/3 of the total number of lines of the page.
  • the set position area can be set to display the last 1-2 lines of the total number of lines of the page.
  • the set position area can also be set to display the total number of lines of the page. The first line from the bottom of the line.
  • whether the paragraph structure form is a column paragraph structure can be determined by obtaining a paragraph structure parameter of the document input program.
  • paragraph structure is a column-paragraph structure, it is determined that the current input line is located in the left column or the right column.
  • the intermediate value of the X-axis of the pixel coordinate of the display page is determined according to the pixel coordinate range of the display page. If the X-axis value of the pixel coordinate of the input cursor is smaller than the intermediate value of the X-axis of the pixel coordinate of the display page, it is determined that the input line is located in the left column. If the pixel coordinate of the input cursor is greater than the intermediate value of the X-axis of the pixel coordinate of the display page, it is determined that the input line is located in the right column.
  • the position of the input line may be adjusted only according to the adjustment method of the paragraph structure form, or may be performed according to the content type (text, picture or table) of the column in which the input line is located. Adjustment.
  • the method for determining whether the input line is located at the bottom of the display position at the bottom of the display page is determined by the method for controlling the input of the document.
  • the input line is located in the left column or the right column. If the current input line is in the left column, the position of the current input line in the display page is adjusted to the last line of the setting display area in the middle of the display page. If the current input line is in the right column, Then, the position of the current input line in the display page is adjusted to the first line of the set display area, so that the related content before and after the current input line is displayed as much as possible.
  • the method for controlling document input adjusts the position of the current input line in the display page according to the position of the current input line in the display page and the page content in the display page, so as to make the input line
  • the location is in a more relaxed and comfortable space to enhance the user experience.
  • FIG. 5 is a block schematic diagram of a control device for document input according to an embodiment of the present application.
  • the control device for document input in the embodiment of the present application includes: a detection module 10, an acquisition module 20, and an adjustment module 30.
  • the detecting module 10 is configured to detect the position of the current input line in the display page; the obtaining module 20 is configured to obtain the page content in the display page; the adjusting module 30 is configured to adjust the current input line in the display page according to the location and the page content. s position.
  • the detecting module 10 is further configured to: detect the number of rows in which the current input line is located; obtain the total number of rows that can be displayed on the display page; and according to the number of rows in which the current input row is located Displays the total number of rows that the page can display, determining where the current input line is in the display page.
  • the detecting module 10 is further configured to: detect pixel coordinates of the input cursor; acquire a pixel coordinate range of the display page; and select pixel coordinates of the input cursor and pixel coordinates of the display page Range determines the position of the current input line in the display page.
  • the page content includes a combination of any one or more of the following: the input text content, the inserted picture or table content, and the paragraph structure form.
  • the adjustment module 30 is further configured to: determine whether the location is located in a set location area at the bottom of the display page; if yes, Then, it is judged whether the text content of the line on the current input line is a blank line in the input text content; if the text content of the previous line of the current input line is a blank line, the position of the current input line in the display page is adjusted to The first line of the setting display area in the middle of the page is displayed; if the text content of the previous line of the current input line is not a blank line, the position of the current input line in the display page is adjusted to the middle row of the set display area.
  • the adjustment module 30 is further configured to: determine whether the location is located in a set location area at the bottom of the display page; If yes, it is determined whether the inserted picture or table content is partially displayed in the display page; if the inserted picture or table content is partially displayed, the determined part of the inserted picture or table content is located above the current input line. Or below; if it is above the current input line, adjust the position of the current input line in the display page to the last line of the setting display area in the middle of the display page; if it is below the current input line, the current input line In the position on the display page, adjust to the first line of the setting display area.
  • the adjustment module 30 is further configured to: determine whether the location is located in a set location area at the bottom of the display page; if yes, determine Whether the paragraph structure is a column paragraph structure; if the paragraph structure is a column paragraph structure, it is judged that the current input line is located in the left column or the right column; if the current input line is in the left column, the current input line is displayed in the display page Position, adjust to the last line of the setting display area in the middle of the display page; if the current input line is in the right column, adjust the position of the current input line in the display page to the first line of the set display area.
  • the detecting module detects the position of the current input line in the display page
  • the acquiring module acquires the content of the page in the display page
  • the adjusting module detects the position detected by the detecting module and the content of the page acquired by the acquiring module. Adjust the position of the current input line in the display page so that the position of the input line is in a more relaxed and comfortable space, thereby improving the user experience.
  • An embodiment of the present application further provides an electronic device including at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to use The control method of the document input of the above embodiment is executed.
  • the embodiment of the present application further provides a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the control method of the document input of the above embodiment.
  • FIG. 6 is a schematic diagram showing the hardware structure of an electronic device that performs a method of controlling document input according to an embodiment of the present application. As shown in FIG. 6, the electronic device includes:
  • the electronic device can also include an input device 630 and an output device 640.
  • the processor 610, the memory 620, the input device 630, and the output device 640 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • the memory 620 is used as a non-transitory computer readable storage medium, and can be used to store a non-transitory software program, a non-transitory computer executable program, and a module, such as a program instruction corresponding to the control method of document input in the embodiment of the present application. Modules (eg, detection module 10, acquisition module 20, and adjustment module 30 shown in FIG. 5).
  • the processor 610 performs various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 620, i.e., implements control of document input in the above method embodiments.
  • the memory 620 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to use of the control device input by the document, and the like.
  • memory 620 can include high speed random access memory, and can also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device.
  • memory 620 can optionally include memory remotely located relative to processor 610 that can be connected to the control device of the document input via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Input device 630 can receive input numeric or character information and generate key signal inputs related to user settings and function control of the control device for document input.
  • the output device 640 can include a display device such as a display screen.
  • One or more modules are stored in memory 620, and when executed by one or more processors 610, perform control methods for document entry in any of the method embodiments described above.
  • the electronic device of the embodiment of the present application exists in various forms, including but not limited to:
  • Mobile communication devices These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication.
  • Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
  • Ultra-mobile personal computer equipment This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access.
  • Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.
  • Portable entertainment devices These devices can display and play multimedia content. Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, and smart toys and portable in-vehicle devices.
  • the server consists of a processor, a hard disk, a memory, a system bus, etc.
  • the server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.

Abstract

A document input control method and device, the method comprising: detecting the position of a current input line in a display page (S1); acquiring the page content in the display page (S2); and according to the position and the page content, adjusting the position of the current input line in the display page (S3) so that the position of the input line is relatively relaxed and takes up a suitable space, thereby improving the user experience.

Description

文档输入的控制方法及装置Document input control method and device
相关申请的交叉引用Cross-reference to related applications
本申请要求天津字节跳动科技有限公司于2018年05月09日提交的、申请名称为“文档输入的控制方法及装置”的、中国专利申请号“201810436674.4”的优先权,该申请的全部内容通过引用结合在本申请中。The present application claims the priority of the Chinese Patent Application No. "201810436674.4" filed on May 09, 2018, which is filed on May 09, 2018, the entire contents of which is hereby incorporated by reference. This is incorporated herein by reference.
技术领域Technical field
本申请涉及通信技术领域,尤其涉及一种文档输入的控制方法及装置。The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for controlling document input.
背景技术Background technique
日常工作生活中经常需要进行文档编辑的工作。相关技术中,当文档内容超过一屏时,当前输入行的位置通常被设置于屏幕的底部,文档输入的整体空间非常局促,致使用户视线下降,用户体验较差。Document editing work is often required in daily work and life. In the related art, when the content of the document exceeds one screen, the position of the current input line is usually set at the bottom of the screen, and the overall space of the document input is very cramped, so that the user's line of sight is lowered, and the user experience is poor.
申请内容Application content
本申请提供一种文档输入的控制方法及装置,能够解决文档编辑过程中文档输入的整体空间非常局促,用户体验较差的问题。The present application provides a method and a device for controlling document input, which can solve the problem that the overall space of document input in the document editing process is very cramped and the user experience is poor.
本申请第一方面实施例提出了一种文档输入的控制方法,包括:The first aspect of the present application provides a method for controlling document input, including:
检测当前输入行在显示页面中的位置;Detecting the position of the current input line in the display page;
获取所述显示页面中的页面内容;Obtaining the content of the page in the display page;
根据所述位置和所述页面内容,调整所述当前输入行在所述显示页面中的所述位置。Adjusting the position of the current input line in the display page according to the location and the page content.
本申请实施例的文档输入的控制方法,根据当前输入行在显示页面中的位置和显示页面中的页面内容,对当前输入行在显示页面中的位置进行调整,以使输入行的位置处于较为宽松、舒适的空间,从而提高用户的体验。The method for controlling document input according to the embodiment of the present application adjusts the position of the current input line in the display page according to the position of the current input line in the display page and the page content in the display page, so that the position of the input line is relatively Loose, comfortable space to enhance the user experience.
本申请第二方面实施例提出了一种文字输入的控制装置,包括:The second aspect of the present application provides a text input control apparatus, including:
检测模块,用于检测当前输入行在显示页面中的位置;a detecting module, configured to detect a position of the current input line in the display page;
获取模块,用于获取所述显示页面中的页面内容;An obtaining module, configured to obtain page content in the display page;
调整模块,用于根据所述位置和所述页面内容,调整所述当前输入行在所述显示页面中的所述位置。And an adjustment module, configured to adjust the position of the current input line in the display page according to the location and the content of the page.
本申请实施例的文档输入的控制装置,检测模块检测当前输入行在显示页面中的位置, 获取模块获取显示页面中的页面内容,调整模块根据检测模块检测的位置和获取模块获取的页面内容,调整当前输入行在显示页面中的位置,以使输入行的位置处于较为宽松、舒适的空间,从而提高用户的体验。In the control device for document input of the embodiment of the present application, the detecting module detects the position of the current input line in the display page, and the acquiring module acquires the content of the page in the display page, and the adjusting module detects the position detected by the detecting module and the content of the page acquired by the acquiring module. Adjust the position of the current input line in the display page so that the position of the input line is in a more relaxed and comfortable space, thereby improving the user experience.
本申请第三方面实施例提出了一种电子设备,包括至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;An embodiment of the third aspect of the present application provides an electronic device including at least one processor; and a memory communicatively coupled to the at least one processor;
其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被设置为用于执行上述本申请第一方面实施例所述的文档输入的控制方法。Wherein the memory stores instructions executable by the at least one processor, the instructions being set as a control method for performing document input as described in the first aspect of the present application.
本申请第四方面实施例提出了一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使所述计算机执行上述本申请第一方面实施例所述的文档输入的控制方法。The fourth aspect of the present application provides a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the first application of the present application described above. A method of controlling document input as described in the embodiments.
本申请附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。The aspects and advantages of the present invention will be set forth in part in the description which follows.
附图说明DRAWINGS
为了更清楚地说明本公开实施例中的技术方案,下面将对一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,其中:In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, one or more embodiments will be exemplarily illustrated by the accompanying drawings in the accompanying drawings, which are not intended to limit the embodiments. ,among them:
图1为根据本申请实施例的文档输入的控制方法的流程图;1 is a flowchart of a method of controlling document input according to an embodiment of the present application;
图2为根据本申请一个实施例的文档输入的控制方法的流程图;2 is a flow chart of a method of controlling document input according to an embodiment of the present application;
图3为根据本申请另一个实施例的文档输入的控制方法的流程图;FIG. 3 is a flowchart of a method for controlling document input according to another embodiment of the present application; FIG.
图4为根据本申请又一个实施例的文档输入的控制方法的流程图;4 is a flowchart of a method for controlling document input according to still another embodiment of the present application;
图5为根据本申请实施例的文档输入的控制装置的方框示意图;FIG. 5 is a block diagram showing a control apparatus for document input according to an embodiment of the present application; FIG.
图6为根据本申请实施例的执行文档输入的控制方法的电子设备的硬件结构示意图。FIG. 6 is a schematic diagram showing the hardware structure of an electronic device that performs a method of controlling document input according to an embodiment of the present application.
具体实施方式detailed description
下面详细描述本申请的实施例,实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本申请,而不能理解为对本申请的限制。The embodiments of the present application are described in detail below, and examples of the embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are intended to be illustrative, and are not to be construed as limiting.
下面参考附图描述本申请实施例的文档输入的控制方法和装置。A method and apparatus for controlling document input according to an embodiment of the present application will be described below with reference to the accompanying drawings.
图1为根据本申请实施例的文档输入的控制方法的流程图。如图1所示,该文档输入的控制方法包括以下步骤:FIG. 1 is a flowchart of a method of controlling document input according to an embodiment of the present application. As shown in FIG. 1, the control method of the document input includes the following steps:
S1,检测当前输入行在显示页面中的位置。S1, detecting the position of the current input line in the display page.
需要说明的是,在用户进行文档输入过程中,输入行会随着用户输入的内容增加而逐 减下降,具体地,当用户打开文档尚未开始输入时,输入行可位于页面的顶端,当用户输入一定内容后输入行逐渐下降,例如显示页面的中间位置,当用户输入内容达到一屏时,输入行可位于页面的底部。或者,当用户在已输入的内容中插入文字等内容时,输入光标插入的位置即输入行的位置可能位于页面的底部。It should be noted that, in the process of the user inputting the document, the input line may decrease decreasing as the content input by the user increases. Specifically, when the user opens the document and has not started inputting, the input line may be located at the top of the page when the user After inputting certain content, the input line gradually decreases, for example, the middle position of the display page. When the user input content reaches one screen, the input line can be located at the bottom of the page. Alternatively, when the user inserts text or the like into the already input content, the position where the input cursor is inserted, that is, the position of the input line may be located at the bottom of the page.
S2,获取显示页面中的页面内容。S2, obtaining the content of the page in the display page.
具体地,页面内容包括以下内容中的任意一种或多种的组合:已输入的文字内容、已插入的图片或表格内容和段落结构形式。其中,文字内容可包括文字信息和空行,段落结构形式可包括分栏结构形式等,已插入的图片可包括整张图片或半张图片等。Specifically, the page content includes a combination of any one or more of the following: text content that has been input, inserted picture or table content, and paragraph structure. The text content may include text information and blank lines, and the paragraph structure may include a column structure form, etc., and the inserted picture may include an entire picture or a half picture.
S3,根据位置和页面内容,调整当前输入行在显示页面中的位置。S3, according to the position and page content, adjust the position of the current input line in the display page.
需要说明的是,调整当前输入行在显示页面中的位置即将当前输入行调整至设定显示区域,设定显示区域可位于显示页面的中部。It should be noted that adjusting the position of the current input line in the display page is to adjust the current input line to the set display area, and the set display area can be located in the middle of the display page.
由此,本申请实施例通过检测当前输入行在显示页面中的位置和获取显示页面中的页面内容,然后根据位置和页面内容,调整当前输入行在显示页面中的位置,以使输入行的位置处于较为宽松、舒适的空间,便于用户人眼观察,且能够有效保障用户的视线位置,防止用户低头操作,进而造成肩颈不适等问题,有效提升用户的输入体验。Therefore, the embodiment of the present application detects the position of the current input line in the display page and obtains the page content in the display page, and then adjusts the position of the current input line in the display page according to the position and the page content, so as to make the input line The position is in a relatively loose and comfortable space, which is convenient for the user to observe, and can effectively protect the user's line of sight, prevent the user from lowering the head operation, thereby causing problems such as shoulder and neck discomfort, and effectively improving the user's input experience.
通过上述分析可知,本申请实施例通过获取当前输入行在显示页面中的位置和页面内容,然后根据位置和页面内容对输入行的位置进行调整。在本申请的一个实施例中,由于显示页面中的页面内容可为已输入的文字内容,因此为了更准确的确定当前输入行所在的位置,从而根据当前输入行的位置和已输入的文字内容,调整当前输入行在显示页面中的位置。下面结合图2,对本申请页面内容为已输入的文字内容时,文档输入的控制方法进行具体说明。It can be seen from the above analysis that the embodiment of the present application obtains the position and page content of the current input line in the display page, and then adjusts the position of the input line according to the position and the page content. In an embodiment of the present application, since the page content in the display page can be the input text content, in order to more accurately determine the location of the current input line, according to the current input line position and the input text content. , adjusts the position of the current input line in the display page. In the following, in conjunction with FIG. 2, when the content of the page of the present application is the input text content, the control method of the document input is specifically described.
如图2所示,该文档输入的控制方法可包括以下步骤:As shown in FIG. 2, the control method of the document input may include the following steps:
作为一种可行实施方式,上述实施例中的步骤S1具体可包括以下步骤S101-S103。As a possible implementation manner, step S1 in the foregoing embodiment may specifically include the following steps S101-S103.
S101,检测当前输入行所在的行数。S101. Detect the number of rows where the current input line is located.
S102,获取显示页面可显示的总行数。S102. Obtain a total number of lines that can be displayed on the display page.
S103,根据当前输入行所在的行数和显示页面可显示的总行数,确定当前输入行在显示页面中的位置。S103. Determine the position of the current input line in the display page according to the number of lines in which the current input line is located and the total number of lines that can be displayed on the display page.
应当理解的是,显示页面的内容为已输入的文字时,显示页面由多行组成,因此,可根据当前输入行所在的行数和显示页面可显示的总行数,来确定当前输入行在显示页面中的位置。It should be understood that when the content of the displayed page is the input text, the display page is composed of multiple lines. Therefore, the current input line can be determined according to the number of lines in which the current input line is located and the total number of lines that can be displayed on the display page. The location in the page.
具体地,可将显示页面划分为多行,并对显示页面内显示的行进行标号,即确定每行所对应的行数,其中,行与行数一一对应,根据显示页面内最后一行的行数确定显示页面 可显示的总行数,例如,以显示页面可显示的总行数为15时为例,此时,显示页面顶部的第一行对应的行数为1,显示页面底部最后一行对应的行数为15。Specifically, the display page may be divided into multiple lines, and the rows displayed in the display page are labeled, that is, the number of rows corresponding to each row is determined, wherein the row and the number of rows are in one-to-one correspondence, according to the last row in the displayed page. The number of rows determines the total number of rows that can be displayed on the display page. For example, the total number of rows that can be displayed on the display page is 15. For example, the number of rows corresponding to the first row at the top of the display page is 1, and the last row at the bottom of the page is displayed. The number of lines is 15.
进一步地,实时检测输入光标当前所处的输入行,并获取输入光标当前所处的输入行对应的行数,根据当前输入行对应的行数和显示页面可显示的总行数,可确定出当前输入行在显示页面中的位置。例如,以显示页面可显示的总行数为15时为例,当检测到输入光标当前所处的输入行对应的行数为1-3时,可确定出当前输入行在显示页面中的顶部,当检测到输入光标当前所处的输入行对应的行数为7-9时,可确定出当前输入行在显示页面的中间部分,当检测到输入光标当前所处的输入行对应的行数为13-15时,可确定出当前输入行在显示页面的底部。Further, the input line where the input cursor is currently located is detected in real time, and the number of lines corresponding to the input line where the input cursor is currently located is obtained. According to the number of lines corresponding to the current input line and the total number of lines that can be displayed on the display page, the current line can be determined. Enter the location of the line in the display page. For example, when the total number of lines that can be displayed on the display page is 15, for example, when it is detected that the number of lines corresponding to the input line where the input cursor is currently located is 1-3, it can be determined that the current input line is at the top of the displayed page. When it is detected that the number of lines corresponding to the input line where the input cursor is currently located is 7-9, it can be determined that the current input line is in the middle part of the display page, and when the number of lines corresponding to the input line where the input cursor is currently detected is detected, At 13-15, it is determined that the current input line is at the bottom of the display page.
上述实施例中的步骤S2具体可包括以下步骤S104。Step S2 in the above embodiment may specifically include the following step S104.
S104,获取显示页面中已输入的文字内容。例如,文字或空行。S104. Acquire a text content that has been input in the display page. For example, text or blank lines.
上述实施例中的步骤S3具体可包括以下步骤S105-S108。Step S3 in the above embodiment may specifically include the following steps S105-S108.
S105,判断当前输入行在显示页面中的位置是否位于显示页面底部的设定位置区域内。S105. Determine whether the position of the current input line in the display page is located in a set position area at the bottom of the display page.
需要说明的是,显示页面底部的设定区域可根据显示页面的大小进行设定,例如,当显示页面为计算机显示器时,设定位置区域可设置为显示页面总行数中的倒数第1-3行,当显示页面为移动终端时,设定位置区域可设置为显示页面总行数中的倒数第1-2行,当文字输入字体较大时,设定位置区域还可设置为显示页面总行数中的倒数第1行。It should be noted that the setting area at the bottom of the display page can be set according to the size of the displayed page. For example, when the display page is a computer display, the setting position area can be set to display the last 1/3 of the total number of lines of the page. Line, when the display page is a mobile terminal, the set position area can be set to display the last 1-2 lines of the total number of lines of the page. When the text input font is large, the set position area can also be set to display the total number of lines of the page. The first line from the bottom of the line.
S106,若当前输入行在显示页面中的位置位于设定位置区域内,则判断已输入的文字内容中,位于当前输入行上一行的文字内容是否为空行。S106: If the position of the current input line in the display page is located in the set position area, determine whether the text content of the line on the current input line of the input text content is a blank line.
应当理解的是,可根据步骤S104所获取的文字内容进行确定。具体地,获取当前输入行上一行的内容,判断当前输入行上一行是否有文字,如果有,则判断当前输入行上一行不是空行,如果没有,则判断当前输入行上一行是空行。It should be understood that the determination may be made according to the text content acquired in step S104. Specifically, the content of the previous line of the current input line is obtained, and it is determined whether there is a text on the upper line of the current input line. If yes, it is determined that the previous line of the current input line is not a blank line, and if not, it is determined that the previous line of the current input line is a blank line.
S107,若当前输入行上一行的文字内容为空行,则将当前输入行在显示页面中的位置,调整至显示页面中部的设定显示区域的第一行。S107. If the text content of the previous line of the current input line is a blank line, adjust the position of the current input line in the display page to the first line of the setting display area in the middle of the display page.
需要说明的是,在本申请实施例中,显示页面中部的设定显示区域可设定为一行或多行,例如,当显示页面的总行数为15时,设定显示区域可为第8行,也可为第7-9行。It should be noted that, in the embodiment of the present application, the setting display area in the middle of the display page may be set to one or more lines. For example, when the total number of lines of the displayed page is 15, the setting display area may be the 8th line. , can also be lines 7-9.
也就是说,当输入行上一行的文字内容为空行时,则认为当前输入行的内容与上方已输入内容关联不大,因此,将当前输入行调整至设定显示区域时,可将当前输入行调整至设定显示区域的第一行,以便于输入内容较多时,距离下次当前输入行的位置调整的时间间隔较长。That is to say, when the text content of the previous line of the input line is a blank line, it is considered that the content of the current input line is not associated with the input content above, therefore, when the current input line is adjusted to the set display area, the current The input line is adjusted to the first line of the set display area, so that when the input content is large, the time interval from the position adjustment of the next current input line is longer.
S108,若当前输入行上一行的文字内容不为空行,将当前输入行在显示页面中的位置,调整至设定显示区域中的中间一行。S108: If the text content of the previous line of the current input line is not a blank line, adjust the position of the current input line in the display page to the middle row in the set display area.
应当理解的是,当设定显示区域为一行时,则将当前输入行在显示页面中的位置调整至设定显示区域即可,当设定显示区域为多行时,则将当前输入行在显示页面的位置调整至显示区域中的中间一行。It should be understood that when the display area is set to one line, the position of the current input line in the display page can be adjusted to the set display area. When the display area is set to multiple lines, the current input line is The position of the display page is adjusted to the middle line in the display area.
由此,本申请实施例的控制方法,通过检测当前输入行的行数和显示页面的总行数来确定当前输入行在显示页面中的位置,并获取显示页面中的内容,然后判断输入行的位置是否位于显示页面底部的设定位置区域内,在输入行的位置位于显示页面底部的设定位置区域时,判断当前输入行上一行的文字内容是否为空,如果为空,则将当前输入行调整至显示页面中部的设定显示区域的第一行,如果不为空,则将当前输入行调整至显示页面中部的设定显示区域的中间一行。从而能够在文档内容为文字时对输入行进行有效的调整,通过判断当前输入行上一行是否为空,还能够有效延长对当前输入行位置调整的时间间隔。Therefore, the control method of the embodiment of the present application determines the position of the current input line in the display page by detecting the number of rows of the current input line and the total number of lines of the display page, and acquires the content in the display page, and then determines the input line. Whether the position is in the set position area at the bottom of the display page. When the position of the input line is in the set position area at the bottom of the display page, it is judged whether the text content of the previous line of the current input line is empty, and if it is empty, the current input is performed. The line is adjusted to the first line of the setting display area in the middle of the display page. If it is not empty, the current input line is adjusted to the middle line of the setting display area in the middle of the display page. Therefore, the input line can be effectively adjusted when the document content is text, and the time interval of the current input line position adjustment can be effectively extended by judging whether the current input line is empty or not.
通过上述分析可知,本申请实施例通过获取当前输入行在显示页面中的位置和页面内容,然后根据位置和页面内容对输入行的位置进行调整。在本申请的一个实施例中,由于显示页面中的页面内容可为已插入的图片或表格,因此为了更准确的确定当前输入行所在的位置,从而根据当前输入行的位置和已插入的图片或表格内容,调整当前输入行在显示页面中的位置。下面结合图3,对本申请页面内容为已输入的图片或表格内容时,文档输入的控制方法进行具体说明。It can be seen from the above analysis that the embodiment of the present application obtains the position and page content of the current input line in the display page, and then adjusts the position of the input line according to the position and the page content. In an embodiment of the present application, since the page content in the display page may be an inserted picture or a table, in order to more accurately determine the location of the current input line, according to the current input line position and the inserted picture. Or the contents of the table, adjust the position of the current input line in the display page. The following describes the control method of the document input when the content of the page of the application is the input picture or the table content, with reference to FIG. 3 .
如图3所示,该文档输入的控制方法可包括以下步骤:As shown in FIG. 3, the control method of the document input may include the following steps:
作为另一种可行实施方式,上述实施例中的步骤S1具体可包括以下步骤S201-S203。As another possible implementation manner, step S1 in the foregoing embodiment may specifically include the following steps S201-S203.
S201,检测输入光标的像素坐标。S201. Detect pixel coordinates of the input cursor.
S202,获取显示页面的像素坐标范围。S202. Acquire a pixel coordinate range of the display page.
S203,根据输入光标的像素坐标和显示页面的像素坐标范围,确定当前输入行在显示页面中的位置。S203. Determine a position of the current input line in the display page according to the pixel coordinates of the input cursor and the pixel coordinate range of the display page.
需要说明的是,文字、图像或表格都可由像素点组成的,像素坐标是像素点在显示页面中的位置。具体地,可以首先为显示页面定义一个坐标系,比如显示页面的左上角为坐标系原点,由原点出发向右为X轴正方向,向下为Y轴正方向。相应的,上述第一方向坐标可以是X轴坐标,第二方向坐标可以是Y轴坐标;或者,第一方向坐标可以是Y轴坐标,第二方向坐标可以是X轴坐标,本实施例对此不作具体限定。It should be noted that the text, image or table can be composed of pixels, and the pixel coordinates are the positions of the pixels in the display page. Specifically, a coordinate system may be first defined for the display page. For example, the upper left corner of the display page is the coordinate system origin, and the origin is from the origin to the right X-axis positive direction, and the downward direction is the Y-axis positive direction. Correspondingly, the first direction coordinate may be an X-axis coordinate, and the second direction coordinate may be a Y-axis coordinate; or the first direction coordinate may be a Y-axis coordinate, and the second direction coordinate may be an X-axis coordinate, which is in this embodiment. This is not specifically limited.
进一步地,在确定显示页面的坐标系后,还可根据显示页面的大小确定显示页面的像素坐标范围。Further, after determining the coordinate system of the display page, the pixel coordinate range of the display page may also be determined according to the size of the display page.
也就是说,在本申请实施例中,可将显示页面的每个像素点设定对应的像素坐标,检测输入光标当前所处位置对应的像素坐标,并获取显示页面的像素坐标的范围,即可根据输入光标的像素坐标和显示页面的像素坐标范围,确定当前输入行在显示页面中的位置。That is to say, in the embodiment of the present application, each pixel of the display page can be set with corresponding pixel coordinates, the pixel coordinates corresponding to the current position of the input cursor can be detected, and the range of the pixel coordinates of the display page can be obtained, that is, The position of the current input line in the display page can be determined according to the pixel coordinates of the input cursor and the pixel coordinate range of the display page.
上述实施例中的步骤S2具体可包括以下步骤S204。Step S2 in the above embodiment may specifically include the following step S204.
S204,获取显示页面中已插入的图片或表格内容。例如,整张图片或表格、或半张图片或表格。S204. Acquire an image or a table content that has been inserted in the display page. For example, an entire picture or table, or a half picture or form.
上述实施例中的步骤S3具体可包括以下步骤S205-S208。Step S3 in the above embodiment may specifically include the following steps S205-S208.
S205,判断当前输入行在显示页面中的位置是否位于显示页面底部的设定位置区域内。S205. Determine whether the position of the current input line in the display page is located in a set position area at the bottom of the display page.
需要说明的是,显示页面底部的设定区域可根据显示页面的大小进行设定,例如,当显示页面为计算机显示器时,设定位置区域可设置为显示页面总行数中的倒数第1-3行,当显示页面为移动终端时,设定位置区域可设置为显示页面总行数中的倒数第1-2行,当文字输入字体较大时,设定位置区域还可设置为显示页面总行数中的倒数第1行。It should be noted that the setting area at the bottom of the display page can be set according to the size of the displayed page. For example, when the display page is a computer display, the setting position area can be set to display the last 1/3 of the total number of lines of the page. Line, when the display page is a mobile terminal, the set position area can be set to display the last 1-2 lines of the total number of lines of the page. When the text input font is large, the set position area can also be set to display the total number of lines of the page. The first line from the bottom of the line.
S206,若当前输入行在显示页面中的位置位于设定位置区域内,则判断已插入的图片或表格内容在显示页面中是否为部分显示。S206. If the position of the current input line in the display page is located in the set position area, determine whether the inserted picture or the table content is partially displayed in the display page.
应当理解的是,可根据步骤S204所获取的图片或表格内容进行确定。具体地,判断已插入的图片或表格的四个边缘是否均显示页面内,如果已插入的图片或表格的任意一个边缘未在显示页面内,则确定已插入的图片或表格为部分显示,如果已插入的图片或表格的四个边缘均在显示页面内。It should be understood that the determination may be made according to the picture or table content acquired in step S204. Specifically, it is determined whether the four edges of the inserted picture or the table are all displayed in the page, and if any of the inserted pictures or any edge of the form is not in the displayed page, it is determined that the inserted picture or table is partially displayed, if The four edges of the inserted picture or table are within the display page.
S207,若已插入的图片或表格内容为部分显示,则判断部分显示的已插入的图片或表格内容位于当前输入行的上方或下方。S207. If the inserted picture or table content is partially displayed, the inserted part of the displayed picture or table content is determined to be above or below the current input line.
具体而言,可通过判断当前输入光标的像素坐标与已插入的图片或表格的边缘像素坐标,来判断部分显示的已插入的图片后表格内容位于当前输入行的上方或下方。Specifically, by determining the pixel coordinates of the current input cursor and the edge pixel coordinates of the inserted picture or table, it is determined that the partially displayed inserted picture content is located above or below the current input line.
举例来说,以显示页面的左上角为坐标原点,由原点出发向右为X轴正方向,向下为Y轴正方向为例,若输入光标的像素坐标Y轴数值小于已插入的图片或表格的上边缘的像素坐标的Y轴数值时,则判断已插入的图片或表格位于当前输入行的上方,若输入光标的像素坐标大于已插入的图片或表格下边缘的像素坐标的Y轴数值时,则判断已插入的图片或表格位于当前输入行的下方。For example, taking the upper left corner of the display page as the coordinate origin, starting from the origin to the right is the X-axis positive direction, and the downward direction is the Y-axis positive direction. For example, if the input cursor's pixel coordinate Y-axis value is smaller than the inserted image or When the Y-axis value of the pixel coordinate of the upper edge of the table is used, it is judged that the inserted picture or table is located above the current input line, and if the pixel coordinate of the input cursor is larger than the Y-axis value of the pixel coordinate of the inserted picture or the lower edge of the table. When it is determined, the inserted picture or table is located below the current input line.
S208,若位于当前输入行的上方,则将当前输入行在显示页面中的位置,调整至显示页面中部的设定显示区域的最后一行,即使已插入的图片或表格位于显示页面的上部区域,上部区域为显示页面顶部与中部最后一行之间的区域。S208. If it is located above the current input line, adjust the position of the current input line in the display page to the last line of the setting display area in the middle of the display page, even if the inserted picture or table is located in the upper area of the display page. The upper area is the area between the top of the page and the last line in the middle.
S209,若位于当前输入行的下方,则将当前输入行在显示页面中的位置,调整至设定显示区域的第一行,即使已插入的图片或表格位于显示页面的下部区域,下部区域为显示页面中部第一行与底部之间的区域。S209, if located below the current input line, adjust the position of the current input line in the display page to the first line of the set display area, even if the inserted picture or table is located in the lower area of the display page, the lower area is Shows the area between the first row and the bottom of the middle of the page.
由此,本申请实施例的文档输入的控制方法,通过检测输入光标的像素坐标并获取显示页面的像素坐标范围,然后根据像素坐标与像素坐标范围确定当前输入行在显示页面中 的位置,判断位置是否位于显示页面底部的设定位置区域内,若输入行的位置在显示页面底部的设定位置区域内,则判断已插入的图片或表格内容在显示页面中是否为部分显示,并在已插入的图片或表格为部分显示时,判断部分显示的已插入的图片或表格内容位于当前输入行的上方或下方,如果位于当前输入行的上方,则将当前输入行在显示页面中的位置调整至显示页面中部的设定显示区域的最后一行,如果位于当前输入行的下方,则将当前输入行在显示页面中的位置调整至设定显示区域的第一行。从而能够是的部分显示的图片或表格尽可能的趋于完整显示,以便于用户查看图片或表格的内容。Therefore, the method for controlling document input in the embodiment of the present application determines the pixel coordinate range of the input cursor and obtains the pixel coordinate range of the display page, and then determines the position of the current input line in the display page according to the pixel coordinate and the pixel coordinate range, and determines Whether the location is in the set location area at the bottom of the display page. If the location of the input line is within the set location area at the bottom of the display page, it is determined whether the inserted picture or table content is partially displayed in the display page, and When the inserted picture or table is partially displayed, the inserted picture or table content displayed in the judgment part is located above or below the current input line, and if it is above the current input line, the position of the current input line in the display page is adjusted. The last line of the setting display area to the middle of the display page, if it is below the current input line, adjusts the position of the current input line in the display page to the first line of the set display area. Thus, the partially displayed picture or table can be displayed as completely as possible, so that the user can view the content of the picture or the form.
基于上述实施例,可在用户进行文档编辑过程中,按照当前输入行所在的行数或输入光标的像素坐标检测当前输入行在显示页面中的位置,进而再根据显示页面内容(已输入的文字内容、已插入的图片或表格内容)调整当前输入行的位置,以提升用户的体验。Based on the above embodiment, during the document editing process, the user can detect the position of the current input line in the display page according to the number of lines of the current input line or the pixel coordinates of the input cursor, and then according to the content of the displayed page (the input text) Content, inserted images, or table content) Adjust the position of the current input line to enhance the user experience.
在上述实施例的基础上,显示页面内容还包括由段落结构形式,如图4所示,当显示页面内容为段落结构形式时,上述实施例中的步骤S3“根据位置和页面内容,调整当前输入行在显示页面中的位置”还包括以下步骤:On the basis of the above embodiment, the display page content further includes a paragraph structure. As shown in FIG. 4, when the page content is displayed in a paragraph structure form, step S3 in the above embodiment "adjusts the current position according to the position and the page content. The location of the input line in the display page" also includes the following steps:
S301,判断当前输入行在显示页面中的位置是否位于显示页面底部的设定位置区域内。S301. Determine whether the position of the current input line in the display page is located in a set position area at the bottom of the display page.
需要说明的是,显示页面底部的设定区域可根据显示页面的大小进行设定,例如,当显示页面为计算机显示器时,设定位置区域可设置为显示页面总行数中的倒数第1-3行,当显示页面为移动终端时,设定位置区域可设置为显示页面总行数中的倒数第1-2行,当文字输入字体较大时,设定位置区域还可设置为显示页面总行数中的倒数第1行。It should be noted that the setting area at the bottom of the display page can be set according to the size of the displayed page. For example, when the display page is a computer display, the setting position area can be set to display the last 1/3 of the total number of lines of the page. Line, when the display page is a mobile terminal, the set position area can be set to display the last 1-2 lines of the total number of lines of the page. When the text input font is large, the set position area can also be set to display the total number of lines of the page. The first line from the bottom of the line.
S302,若当前输入行在显示页面中的位置位于显示页面底部的设定位置区域内,则判断段落结构形式是否为分栏段落结构。S302. If the position of the current input line in the display page is located in a set position area at the bottom of the display page, determine whether the paragraph structure is a column paragraph structure.
具体地,可通过获取文档输入程序的段落结构参数判断段落结构形式是否为分栏段落结构。Specifically, whether the paragraph structure form is a column paragraph structure can be determined by obtaining a paragraph structure parameter of the document input program.
S303,若段落结构形式为分栏段落结构,则判断当前输入行位于左栏或右栏。S303. If the paragraph structure is a column-paragraph structure, it is determined that the current input line is located in the left column or the right column.
举例来说,可通过判断输入光标的像素坐标来判断输入行位于左栏或右栏,以显示页面的左上角为坐标原点,由原点出发向右为X轴正方向,向下为Y轴正方向为例,根据显示页面像素坐标范围确定显示页面像素坐标X轴的中间值,若输入光标的像素坐标X轴数值小于显示页面像素坐标X轴的中间值时,则判断输入行位于左栏,若输入光标的像素坐标大于显示页面像素坐标X轴的中间值时,则判断输入行位于右栏。For example, by determining the pixel coordinates of the input cursor, it is determined that the input line is located in the left or right column, so that the upper left corner of the page is the coordinate origin, and the origin is from the origin to the right for the X-axis positive direction, and the downward for the Y-axis is positive. For example, the intermediate value of the X-axis of the pixel coordinate of the display page is determined according to the pixel coordinate range of the display page. If the X-axis value of the pixel coordinate of the input cursor is smaller than the intermediate value of the X-axis of the pixel coordinate of the display page, it is determined that the input line is located in the left column. If the pixel coordinate of the input cursor is greater than the intermediate value of the X-axis of the pixel coordinate of the display page, it is determined that the input line is located in the right column.
S304,若当前输入行位于左栏,则将当前输入行在显示页面中的位置,调整至显示页面中部的设定显示区域的最后一行。S304. If the current input line is in the left column, adjust the position of the current input line in the display page to the last line of the setting display area in the middle of the display page.
S305,若当前输入行位于右栏,则将当前输入行在显示页面中的位置,调整至设定区域的第一行。S305. If the current input line is in the right column, adjust the position of the current input line in the display page to the first line of the setting area.
应当理解的是,当显示页面内容包括段落结构形式时,可仅根据段落结构形式的调整方法对输入行的位置进行调整,也可根据输入行所在栏的内容类型(文字、图片或表格)进行调整。It should be understood that when the display page content includes the paragraph structure form, the position of the input line may be adjusted only according to the adjustment method of the paragraph structure form, or may be performed according to the content type (text, picture or table) of the column in which the input line is located. Adjustment.
由此,本申请实施例的文档输入的控制方法,在显示页面内容包括段落结构形式时,判断输入行的位置是否位于显示页面底部的设定位置区域,若位于设定位置区域,则判断当前输入行位于左栏或右栏,若当前输入行位于左栏,则将当前输入行在显示页面中的位置调整至显示页面中部的设定显示区域的最后一行,若当前输入行位于右栏,则将当前输入行在显示页面中的位置调整至设定显示区域第一行,以使得当前输入行前、后比较相关的内容尽可能多的显示。Therefore, when the display page content includes the paragraph structure form, the method for determining whether the input line is located at the bottom of the display position at the bottom of the display page is determined by the method for controlling the input of the document. The input line is located in the left column or the right column. If the current input line is in the left column, the position of the current input line in the display page is adjusted to the last line of the setting display area in the middle of the display page. If the current input line is in the right column, Then, the position of the current input line in the display page is adjusted to the first line of the set display area, so that the related content before and after the current input line is displayed as much as possible.
综上,本申请实施例的文档输入的控制方法,根据当前输入行在显示页面中的位置和显示页面中的页面内容,对当前输入行在显示页面中的位置进行调整,以使输入行的位置处于较为宽松、舒适的空间,从而提高用户的体验。In summary, the method for controlling document input according to the embodiment of the present application adjusts the position of the current input line in the display page according to the position of the current input line in the display page and the page content in the display page, so as to make the input line The location is in a more relaxed and comfortable space to enhance the user experience.
图5为根据本申请实施例的文档输入的控制装置的方框示意图。如图5所示,本申请实施例的文档输入的控制装置包括:检测模块10、获取模块20和调整模块30。FIG. 5 is a block schematic diagram of a control device for document input according to an embodiment of the present application. As shown in FIG. 5, the control device for document input in the embodiment of the present application includes: a detection module 10, an acquisition module 20, and an adjustment module 30.
其中,检测模块10用于检测当前输入行在显示页面中的位置;获取模块20用于获取显示页面中的页面内容;调整模块30用于根据位置和页面内容,调整当前输入行在显示页面中的位置。The detecting module 10 is configured to detect the position of the current input line in the display page; the obtaining module 20 is configured to obtain the page content in the display page; the adjusting module 30 is configured to adjust the current input line in the display page according to the location and the page content. s position.
进一步的,在本申请实施例一种可能的实现方式中,检测模块10还用于:检测当前输入行所在的行数;获取显示页面可显示的总行数;根据当前输入行所在的行数和显示页面可显示的总行数,确定当前输入行在显示页面中的位置。Further, in a possible implementation manner of the embodiment of the present application, the detecting module 10 is further configured to: detect the number of rows in which the current input line is located; obtain the total number of rows that can be displayed on the display page; and according to the number of rows in which the current input row is located Displays the total number of rows that the page can display, determining where the current input line is in the display page.
进一步的,在本申请实施例一种可能的实现方式中,检测模块10还用于:检测输入光标的像素坐标;获取显示页面的像素坐标范围;根据输入光标的像素坐标和显示页面的像素坐标范围,确定当前输入行在显示页面中的位置。Further, in a possible implementation manner of the embodiment of the present application, the detecting module 10 is further configured to: detect pixel coordinates of the input cursor; acquire a pixel coordinate range of the display page; and select pixel coordinates of the input cursor and pixel coordinates of the display page Range determines the position of the current input line in the display page.
进一步的,在本申请实施例一种可能的实现方式中,页面内容包括以下内容中的任意一种或多种的组合:已输入的文字内容、已插入的图片或表格内容和段落结构形式。Further, in a possible implementation manner of the embodiment of the present application, the page content includes a combination of any one or more of the following: the input text content, the inserted picture or table content, and the paragraph structure form.
进一步的,在本申请实施例一种可能的实现方式中,若页面内容包括已输入的文字内容,则调整模块30还用于:判断位置是否位于显示页面底部的设定位置区域内;若是,则判断已输入的文字内容中,位于当前输入行上一行的文字内容是否为空行;若当前输入行上一行的文字内容为空行,则将当前输入行在显示页面中的位置,调整至显示页面中部的设定显示区域的第一行;若当前输入行上一行的文字内容不为空行,将当前输入行在显示页面中的位置,调整至设定显示区域的中间一行。Further, in a possible implementation manner of the embodiment of the present application, if the page content includes the input text content, the adjustment module 30 is further configured to: determine whether the location is located in a set location area at the bottom of the display page; if yes, Then, it is judged whether the text content of the line on the current input line is a blank line in the input text content; if the text content of the previous line of the current input line is a blank line, the position of the current input line in the display page is adjusted to The first line of the setting display area in the middle of the page is displayed; if the text content of the previous line of the current input line is not a blank line, the position of the current input line in the display page is adjusted to the middle row of the set display area.
进一步的,在本申请实施例一种可能的实现方式中,若页面内容包括已插入的图片或 表格内容,则调整模块30还用于:判断位置是否位于显示页面底部的设定位置区域内;若是,则判断已插入的图片或表格内容在显示页面中是否为部分显示;若已插入的图片或表格内容为部分显示,则判断部分显示的已插入的图片或表格内容位于当前输入行的上方或下方;若位于当前输入行的上方,则将当前输入行在显示页面中的位置,调整至显示页面中部的设定显示区域的最后一行;若位于当前输入行的下方,则将当前输入行在显示页面中的位置,调整至设定显示区域的第一行。Further, in a possible implementation manner of the embodiment of the present application, if the page content includes the inserted picture or the table content, the adjustment module 30 is further configured to: determine whether the location is located in a set location area at the bottom of the display page; If yes, it is determined whether the inserted picture or table content is partially displayed in the display page; if the inserted picture or table content is partially displayed, the determined part of the inserted picture or table content is located above the current input line. Or below; if it is above the current input line, adjust the position of the current input line in the display page to the last line of the setting display area in the middle of the display page; if it is below the current input line, the current input line In the position on the display page, adjust to the first line of the setting display area.
进一步的,在本申请实施例一种可能的实现方式中,若页面内容包括段落结构形式,则调整模块30还用于:判断位置是否位于显示页面底部的设定位置区域内;若是,则判断段落结构形式是否为分栏段落结构;若段落结构形式为分栏段落结构,则判断当前输入行位于左栏或右栏;若当前输入行位于左栏,则将当前输入行在显示页面中的位置,调整至显示页面中部的设定显示区域的最后一行;若当前输入行位于右栏,则将当前输入行在显示页面中的位置,调整至设定显示区域的第一行。Further, in a possible implementation manner of the embodiment of the present application, if the page content includes a paragraph structure, the adjustment module 30 is further configured to: determine whether the location is located in a set location area at the bottom of the display page; if yes, determine Whether the paragraph structure is a column paragraph structure; if the paragraph structure is a column paragraph structure, it is judged that the current input line is located in the left column or the right column; if the current input line is in the left column, the current input line is displayed in the display page Position, adjust to the last line of the setting display area in the middle of the display page; if the current input line is in the right column, adjust the position of the current input line in the display page to the first line of the set display area.
需要说明的是,前述对文档输入的控制方法实施例的解释说明也适用于该实施例的文档输入的控制装置,此处不再赘述。It should be noted that the foregoing explanation of the embodiment of the method for controlling the input of the document is also applicable to the control device for the document input of the embodiment, and details are not described herein again.
本申请实施例的文档输入的控制装置,检测模块检测当前输入行在显示页面中的位置,获取模块获取显示页面中的页面内容,调整模块根据检测模块检测的位置和获取模块获取的页面内容,调整当前输入行在显示页面中的位置,以使输入行的位置处于较为宽松、舒适的空间,从而提高用户的体验。In the control device for document input of the embodiment of the present application, the detecting module detects the position of the current input line in the display page, and the acquiring module acquires the content of the page in the display page, and the adjusting module detects the position detected by the detecting module and the content of the page acquired by the acquiring module. Adjust the position of the current input line in the display page so that the position of the input line is in a more relaxed and comfortable space, thereby improving the user experience.
本申请实施例还提供了一种电子设备,包括至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被设置为用于执行上述实施例的文档输入的控制方法。An embodiment of the present application further provides an electronic device including at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to use The control method of the document input of the above embodiment is executed.
本申请实施例还提供了一种非暂态计算机可读存储介质,非暂态计算机可读存储介质存储计算机指令,计算机指令用于使计算机执行上述实施例的文档输入的控制方法。The embodiment of the present application further provides a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the control method of the document input of the above embodiment.
图6为根据本申请实施例的执行文档输入的控制方法的电子设备的硬件结构示意图。如图6所示,该电子设备包括:FIG. 6 is a schematic diagram showing the hardware structure of an electronic device that performs a method of controlling document input according to an embodiment of the present application. As shown in FIG. 6, the electronic device includes:
该电子设备还可以包括:输入装置630和输出装置640。The electronic device can also include an input device 630 and an output device 640.
处理器610、存储器620、输入装置630和输出装置640可以通过总线或者其他方式连接,图6中以通过总线连接为例。The processor 610, the memory 620, the input device 630, and the output device 640 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
存储器620作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序、非暂态计算机可执行程序以及模块,如本申请实施例中的文档输入的控制方法对应的程序指令/模块(例如,附图5所示的检测模块10、获取模块20和调整模块30)。处理器610通过运行存储在存储器620中的非暂态软件程序、指令以及模块,从而执行服务器的各种功能应 用以及数据处理,即实现上述方法实施例中的文档输入的控制。The memory 620 is used as a non-transitory computer readable storage medium, and can be used to store a non-transitory software program, a non-transitory computer executable program, and a module, such as a program instruction corresponding to the control method of document input in the embodiment of the present application. Modules (eg, detection module 10, acquisition module 20, and adjustment module 30 shown in FIG. 5). The processor 610 performs various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 620, i.e., implements control of document input in the above method embodiments.
存储器620可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据文档输入的控制装置的使用所创建的数据等。此外,存储器620可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施例中,存储器620可选包括相对于处理器610远程设置的存储器,这些远程存储器可以通过网络连接至文档输入的控制装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 620 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to use of the control device input by the document, and the like. Moreover, memory 620 can include high speed random access memory, and can also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 620 can optionally include memory remotely located relative to processor 610 that can be connected to the control device of the document input via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
输入装置630可接收输入的数字或字符信息,以及产生与文档输入的控制装置的用户设置以及功能控制有关的键信号输入。输出装置640可包括显示屏等显示设备。 Input device 630 can receive input numeric or character information and generate key signal inputs related to user settings and function control of the control device for document input. The output device 640 can include a display device such as a display screen.
一个或者多个模块存储在存储器620中,当被一个或者多个处理器610执行时,执行上述任意方法实施例中的文档输入的控制方法。One or more modules are stored in memory 620, and when executed by one or more processors 610, perform control methods for document entry in any of the method embodiments described above.
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。The above products can perform the methods provided by the embodiments of the present application, and have the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiments of the present application.
本申请实施例的电子设备以多种形式存在,包括但不限于:The electronic device of the embodiment of the present application exists in various forms, including but not limited to:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。(1) Mobile communication devices: These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication. Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。(2) Ultra-mobile personal computer equipment: This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access. Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.
(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载设备。(3) Portable entertainment devices: These devices can display and play multimedia content. Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, and smart toys and portable in-vehicle devices.
(4)服务器:提供计算服务的设备,服务器的构成包括处理器、硬盘、内存、系统总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。(4) Server: A device that provides computing services. The server consists of a processor, a hard disk, a memory, a system bus, etc. The server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.
(5)其他具有数据交互功能的电子装置。(5) Other electronic devices with data interaction functions.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述 技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如磁碟、光盘、只读存储记忆体(ROM)或随机存储记忆体(RAM)等等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the various embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on such understanding, the above technical solutions may be embodied in the form of software products in essence or in the form of software products, which may be stored in a computer readable storage medium such as a magnetic disk or a magnetic disk. Read only memory (ROM) or random access memory (RAM), etc., including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform various embodiments or embodiments Some of the methods described.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to explain the technical solutions of the present application, and are not limited thereto; although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still The technical solutions described in the foregoing embodiments are modified, or the equivalents of the technical features are replaced by the equivalents. The modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

  1. 一种文档输入的控制方法,其特征在于,包括以下步骤:A method for controlling document input, comprising the steps of:
    检测当前输入行在显示页面中的位置;Detecting the position of the current input line in the display page;
    获取所述显示页面中的页面内容;Obtaining the content of the page in the display page;
    根据所述位置和所述页面内容,调整所述当前输入行在所述显示页面中的所述位置。Adjusting the position of the current input line in the display page according to the location and the page content.
  2. 根据权利要求1所述的控制方法,其特征在于,所述检测当前输入行在显示页面中的位置,包括:The control method according to claim 1, wherein the detecting the position of the current input line in the display page comprises:
    检测所述当前输入行所在的行数;Detecting the number of rows in which the current input line is located;
    获取所述显示页面可显示的总行数;Obtaining the total number of lines that can be displayed on the display page;
    根据所述当前输入行所在的行数和所述显示页面可显示的总行数,确定所述当前输入行在所述显示页面中的所述位置。Determining the position of the current input line in the display page according to the number of rows in which the current input line is located and the total number of lines that the display page can display.
  3. 根据权利要求1所述的控制方法,其特征在于,所述检测当前输入行在显示页面中的位置,包括:The control method according to claim 1, wherein the detecting the position of the current input line in the display page comprises:
    检测输入光标的像素坐标;Detecting the pixel coordinates of the input cursor;
    获取所述显示页面的像素坐标范围;Obtaining a pixel coordinate range of the display page;
    根据所述输入光标的像素坐标和所述显示页面的像素坐标范围,确定所述当前输入行在所述显示页面中的所述位置。Determining the position of the current input line in the display page according to pixel coordinates of the input cursor and a pixel coordinate range of the display page.
  4. 根据权利要求1-3任一项所述的控制方法,其特征在于,所述页面内容包括以下内容中的任意一种或多种的组合:The control method according to any one of claims 1 to 3, wherein the page content comprises a combination of any one or more of the following:
    已输入的文字内容、已插入的图片或表格内容和段落结构形式。The text content that has been entered, the inserted image or table content, and the paragraph structure.
  5. 根据权利要求1-4任一项所述的控制方法,其特征在于,若所述页面内容包括所述已输入的文字内容,则所述根据所述位置和所述页面内容,调整所述当前输入行在所述显示页面中的所述位置,包括:The control method according to any one of claims 1 to 4, wherein if the page content includes the input text content, the adjusting the current according to the location and the page content The location of the input line in the display page includes:
    判断所述位置是否位于所述显示页面底部的设定位置区域内;Determining whether the location is located in a set location area at the bottom of the display page;
    若是,则判断所述已输入的文字内容中,位于所述当前输入行上一行的文字内容是否为空行;If yes, determining whether the text content of the line on the current input line of the input text content is a blank line;
    若所述当前输入行上一行的文字内容为空行,则将所述当前输入行在所述显示页面中的所述位置,调整至所述显示页面中部的设定显示区域的第一行;If the text content of the previous line of the current input line is a blank line, adjusting the position of the current input line in the display page to the first line of the setting display area in the middle of the display page;
    若所述当前输入行上一行的文字内容不为空行,将所述当前输入行在所述显示页面中的所述位置,调整至所述设定显示区域的中间一行。If the text content of the previous line of the current input line is not a blank line, the position of the current input line in the display page is adjusted to a middle row of the set display area.
  6. 根据权利要求1-4任一项所述的控制方法,其特征在于,若所述页面内容包括所述 已插入的图片或表格内容,则所述根据所述位置和所述页面内容,调整所述当前输入行在所述显示页面中的所述位置,包括:The control method according to any one of claims 1 to 4, wherein if the page content includes the inserted picture or table content, the adjusting the location according to the location and the page content Said location of the current input line in the display page, comprising:
    判断所述位置是否位于所述显示页面底部的设定位置区域内;Determining whether the location is located in a set location area at the bottom of the display page;
    若是,则判断所述已插入的图片或表格内容在所述显示页面中是否为部分显示;If yes, determining whether the inserted picture or table content is partially displayed in the display page;
    若所述已插入的图片或表格内容为部分显示,则判断部分显示的所述已插入的图片或表格内容位于所述当前输入行的上方或下方;If the inserted picture or table content is partially displayed, determining that the inserted picture or table content displayed in the portion is located above or below the current input line;
    若位于所述当前输入行的上方,则将所述当前输入行在所述显示页面中的所述位置,调整至所述显示页面中部的设定显示区域的最后一行;If located above the current input line, adjust the position of the current input line in the display page to the last line of the set display area in the middle of the display page;
    若位于所述当前输入行的下方,则将所述当前输入行在所述显示页面中的所述位置,调整至所述设定显示区域的第一行。If located below the current input line, adjust the position of the current input line in the display page to the first line of the set display area.
  7. 根据权利要求1-4任一项所述的控制方法,其特征在于,若所述页面内容包括所述段落结构形式,则所述根据所述位置和所述页面内容,调整所述当前输入行在所述显示页面中的所述位置,包括:The control method according to any one of claims 1 to 4, wherein if the page content includes the paragraph structure form, the adjusting the current input line according to the location and the page content The location in the display page includes:
    判断所述位置是否位于所述显示页面底部的设定位置区域内;Determining whether the location is located in a set location area at the bottom of the display page;
    若是,则判断所述段落结构形式是否为分栏段落结构;If yes, determining whether the paragraph structure is a column-paragraph structure;
    若所述段落结构形式为分栏段落结构,则判断所述当前输入行位于左栏或右栏;If the paragraph structure is a column-paragraph structure, it is determined that the current input line is located in a left column or a right column;
    若所述当前输入行位于左栏,则将所述当前输入行在所述显示页面中的所述位置,调整至所述显示页面中部的设定显示区域的最后一行;If the current input line is located in the left column, adjust the position of the current input line in the display page to the last line of the set display area in the middle of the display page;
    若所述当前输入行位于右栏,则将所述当前输入行在所述显示页面中的所述位置,调整至所述设定显示区域的第一行。If the current input line is located in the right column, the position of the current input line in the display page is adjusted to the first line of the set display area.
  8. 一种文档输入的控制装置,其特征在于,包括:A control device for document input, comprising:
    检测模块,用于检测当前输入行在显示页面中的位置;a detecting module, configured to detect a position of the current input line in the display page;
    获取模块,用于获取所述显示页面中的页面内容;An obtaining module, configured to obtain page content in the display page;
    调整模块,用于根据所述位置和所述页面内容,调整所述当前输入行在所述显示页面中的所述位置。And an adjustment module, configured to adjust the position of the current input line in the display page according to the location and the content of the page.
  9. 一种电子设备,其特征在于,包括至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor;
    其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被设置为用于执行上述权利要求1-7任一项所述的文档输入的控制方法。Wherein the memory stores instructions executable by the at least one processor, the instructions being arranged as a control method for performing the document input of any of the preceding claims 1-7.
  10. 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使所述计算机执行上述权利要求1-7任一项所述的文档输入的控制方法。A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform any of the claims 1-7 The control method for document input.
PCT/CN2018/113419 2018-05-09 2018-11-01 Document input control method and device WO2019214181A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810436674.4 2018-05-09
CN201810436674.4A CN108681531B (en) 2018-05-09 2018-05-09 Document input control method and device

Publications (1)

Publication Number Publication Date
WO2019214181A1 true WO2019214181A1 (en) 2019-11-14

Family

ID=63805882

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/113419 WO2019214181A1 (en) 2018-05-09 2018-11-01 Document input control method and device

Country Status (2)

Country Link
CN (1) CN108681531B (en)
WO (1) WO2019214181A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108681531B (en) * 2018-05-09 2020-11-13 天津字节跳动科技有限公司 Document input control method and device
CN111832262B (en) * 2019-03-29 2023-06-20 珠海金山办公软件有限公司 Document processing method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5467448A (en) * 1991-05-10 1995-11-14 Claris Corporation Text formatting by the direct selection of borders in an editing display
CN102270057A (en) * 2010-06-03 2011-12-07 株式会社Pfu Image reading apparatus and image processing method
CN104657040A (en) * 2015-02-13 2015-05-27 百度在线网络技术(北京)有限公司 Method and system for automatically regulating position of input frame in browser
CN106354369A (en) * 2016-08-30 2017-01-25 乐视控股(北京)有限公司 Character input interface display handling method and device
CN106648581A (en) * 2016-09-13 2017-05-10 百度在线网络技术(北京)有限公司 Page display method and apparatus
CN108681531A (en) * 2018-05-09 2018-10-19 天津字节跳动科技有限公司 The control method and device of document input

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9875013B2 (en) * 2009-03-16 2018-01-23 Apple Inc. Methods and graphical user interfaces for editing on a multifunction device with a touch screen display
US20120185787A1 (en) * 2011-01-13 2012-07-19 Microsoft Corporation User interface interaction behavior based on insertion point
US8661339B2 (en) * 2011-05-31 2014-02-25 Apple Inc. Devices, methods, and graphical user interfaces for document manipulation
WO2015005242A1 (en) * 2013-07-11 2015-01-15 シャープ株式会社 Display device
JP6575081B2 (en) * 2015-03-13 2019-09-18 富士ゼロックス株式会社 Display device, image processing device, and program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5467448A (en) * 1991-05-10 1995-11-14 Claris Corporation Text formatting by the direct selection of borders in an editing display
CN102270057A (en) * 2010-06-03 2011-12-07 株式会社Pfu Image reading apparatus and image processing method
CN104657040A (en) * 2015-02-13 2015-05-27 百度在线网络技术(北京)有限公司 Method and system for automatically regulating position of input frame in browser
CN106354369A (en) * 2016-08-30 2017-01-25 乐视控股(北京)有限公司 Character input interface display handling method and device
CN106648581A (en) * 2016-09-13 2017-05-10 百度在线网络技术(北京)有限公司 Page display method and apparatus
CN108681531A (en) * 2018-05-09 2018-10-19 天津字节跳动科技有限公司 The control method and device of document input

Also Published As

Publication number Publication date
CN108681531A (en) 2018-10-19
CN108681531B (en) 2020-11-13

Similar Documents

Publication Publication Date Title
US10884605B2 (en) Methods and systems for displaying hidden information on a web page
CN110100251B (en) Apparatus, method, and computer-readable storage medium for processing document
US10089957B2 (en) Page display method and terminal
CN109003194B (en) Comment sharing method, terminal and storage medium
CN106203254B (en) Method and device for adjusting photographing direction
US20160275649A1 (en) Method and Apparatus for Switching Display Mode of Screen of Terminal Device, and Terminal Device
US20150234558A1 (en) Information processing apparatus and method, information processing system, and program
CN107330347B (en) Display method, terminal and computer readable storage medium
US20210209404A1 (en) Method for Adjusting Thematic Color, Storage Medium, and Electronic Device
US11165950B2 (en) Method and apparatus for shooting video, and storage medium
US20210357106A1 (en) Information processing method and terminal device
KR20150138742A (en) Method for processing contents and electronic device thereof
US20150234461A1 (en) Display control device, display control method and recording medium
CN103076954B (en) The method of adjustment display effect and device
CN104461312A (en) Display control method and electronic equipment
WO2020134789A1 (en) Mobile terminal and method for controlling on and off of screen, and computer storage medium
WO2019214181A1 (en) Document input control method and device
US20190188370A1 (en) Device control method and apparatus
US9509733B2 (en) Program, communication apparatus and control method
CN108108095B (en) Electronic device, screenshot method and related product
CN107632985B (en) Webpage preloading method and device
CN105096355A (en) Image processing method and system
US20220300704A1 (en) Picture display method and apparatus, electronic device, and medium
KR20130121370A (en) Method for improving touch response and an electronic device thereof
CN106603384B (en) Session control method, device and system based on instant messaging software

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18918327

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18918327

Country of ref document: EP

Kind code of ref document: A1