Formula gesture input method and system

文档序号:1860753 发布日期:2021-11-19 浏览:7次 中文

阅读说明:本技术 一种公式手势输入方法及系统 (Formula gesture input method and system ) 是由 张昌凯 于 2021-07-29 设计创作,主要内容包括:本发明提供了人机交互技术领域的一种公式手势输入方法及系统,方法包括:步骤S10、创建选择模式控件、备选符号显示控件、备选修饰符号显示控件、备选格式显示控件;步骤S20、创建字符关联库,设定字符输入位置对应的格式位、备选位;步骤S30、获取并显示输入的公式,选择公式输入界面里对应的字符;步骤S40、基于字符关联库匹配与被选择字符关联的相似字符,在备选位以及备选符号显示控件显示相似字符;步骤S50、对备选符号显示控件、备选修饰符号显示控件、备选格式显示控件、格式位、备选位进行手势操作,完成字符的替换、增加修饰符号、格式转换或者格式嵌套。本发明的优点在于:极大地提升了在带有触摸屏或者手写笔的电子设备上输入公式的效率。(The invention provides a formula gesture input method and a system in the technical field of human-computer interaction, wherein the method comprises the following steps: step S10, creating a selection mode control, an alternative symbol display control, an alternative decoration symbol display control and an alternative format display control; step S20, creating a character association library, and setting a format bit and an alternative bit corresponding to the character input position; s30, acquiring and displaying the input formula, and selecting the corresponding character in the formula input interface; step S40, matching similar characters associated with the selected character based on the character association library, and displaying the similar characters on the alternative position and the alternative symbol display control; and step S50, performing gesture operation on the alternative symbol display control, the alternative decoration symbol display control, the alternative format display control, the format bit and the alternative bit to finish the replacement of characters, the addition of decoration symbols, the format conversion or the format nesting. The invention has the advantages that: the efficiency of formula input on the electronic equipment with a touch screen or a stylus is greatly improved.)

1. A formula gesture input method is characterized in that: the method comprises the following steps:

step S10, creating a selection mode control, an alternative symbol display control, an alternative decoration symbol display control and an alternative format display control on a formula input interface;

step S20, creating a character association library, and setting a plurality of format bits corresponding to each character input position, a format corresponding to each format bit and an alternative bit;

step S30, the formula input interface obtains and displays the input formula, and selects the corresponding character in the formula input interface based on the selection mode control and the received selection signal;

step S40, respectively matching similar characters associated with each selected character based on the character association library, displaying a preset number of similar characters on the alternative positions, and displaying the rest similar characters on an alternative symbol display control;

and step S50, performing gesture operation on the alternative symbol display control, the alternative decoration symbol display control, the alternative format display control, the format bit and the alternative bit to complete character replacement, decoration symbol addition, format conversion or format nesting.

2. The method of claim 1, wherein: in step S10, the selection mode control is configured to enter a full selection mode, where the full selection mode is configured to select all specific characters in the selection area;

the alternative symbol display control is used for displaying similar characters associated with the selected character;

the alternative decoration symbol display control is used for displaying decoration symbols;

the alternative format display control is used for displaying optional formats of the characters.

3. The method of claim 1, wherein: in step S20, the character association library stores similar characters associated with each character.

4. The method of claim 1, wherein: the step S30 specifically includes:

inputting a formula on a formula input interface through a touch screen, a stylus, a physical keyboard or a virtual keyboard, or recognizing a picture with the formula through an OCR technology to perform formula input and displaying the input formula;

when the selection mode control receives a trigger signal of a user, determining a selection area based on a click signal or a frame selection signal input by the user, acquiring a specific character selected by the user, and selecting all specific characters in the selection area;

and when the selection mode control does not receive a trigger signal of a user, determining a selection area based on a click signal or a frame selection signal input by the user, and selecting all characters in the selection area.

5. The method of claim 1, wherein: the step S50 specifically includes:

selecting similar characters in the alternative positions or the alternative symbol display controls, and automatically replacing the selected characters in batches;

selecting the decoration symbols in the alternative decoration symbol display control, and automatically adding the decoration symbols to the selected characters in batches;

dragging the selected characters to format bits, automatically converting the format into a format corresponding to the format bits, or selecting a selectable format in the alternative format display control, and automatically performing batch format conversion on the selected characters;

and dragging the selected character to a format bit corresponding to the character after format conversion, and performing format nesting.

6. A formula gesture input system, comprising: the system comprises the following modules:

the control creating module is used for creating a selection mode control, an alternative symbol display control, an alternative decoration symbol display control and an alternative format display control on the formula input interface;

the parameter setting module is used for creating a character association library and setting a plurality of format bits corresponding to each character input position, a format corresponding to each format bit and an alternative bit;

the character selection module is used for acquiring and displaying an input formula on the formula input interface and selecting corresponding characters in the formula input interface based on the selection mode control and the received selection signal;

the similar character display module is used for respectively matching similar characters related to all selected characters based on the character association library, displaying a preset number of similar characters on the alternative positions, and displaying the rest similar characters on the alternative symbol display control;

and the gesture input module is used for performing gesture operation on the alternative symbol display control, the alternative decoration symbol display control, the alternative format display control, the format bit and the alternative bit to complete character replacement, decoration symbol addition, format conversion or format nesting.

7. The system of claim 6, wherein: in the control creating module, the selection mode control is used for entering a full selection mode, and the full selection mode is used for selecting all specific characters in a selection area;

the alternative symbol display control is used for displaying similar characters associated with the selected character;

the alternative decoration symbol display control is used for displaying decoration symbols;

the alternative format display control is used for displaying optional formats of the characters.

8. The system of claim 6, wherein: in the parameter setting module, the character association library stores similar characters associated with each character.

9. The system of claim 6, wherein: the character selection module specifically comprises:

inputting a formula on a formula input interface through a touch screen, a stylus, a physical keyboard or a virtual keyboard, or recognizing a picture with the formula through an OCR technology to perform formula input and displaying the input formula;

when the selection mode control receives a trigger signal of a user, determining a selection area based on a click signal or a frame selection signal input by the user, acquiring a specific character selected by the user, and selecting all specific characters in the selection area;

and when the selection mode control does not receive a trigger signal of a user, determining a selection area based on a click signal or a frame selection signal input by the user, and selecting all characters in the selection area.

10. The system of claim 6, wherein: the gesture input module is specifically as follows:

selecting similar characters in the alternative positions or the alternative symbol display controls, and automatically replacing the selected characters in batches;

selecting the decoration symbols in the alternative decoration symbol display control, and automatically adding the decoration symbols to the selected characters in batches;

dragging the selected characters to format bits, automatically converting the format into a format corresponding to the format bits, or selecting a selectable format in the alternative format display control, and automatically performing batch format conversion on the selected characters;

and dragging the selected character to a format bit corresponding to the character after format conversion, and performing format nesting.

Technical Field

The invention relates to the technical field of human-computer interaction, in particular to a formula gesture input method and system.

Background

With the progress of science and technology and the development of times, people increasingly rely on electronic equipment in life and work, and more electronic equipment is provided with a touch screen and a handwriting pen. However, when a formula is input by an electronic device with a touch screen or a stylus pen, a physical keyboard or a virtual keyboard needs to be used for inputting the formula, and formula rendering engines such as LaTeX and MathML need to use lengthy codes to mark the formula, which is very inconvenient and fails to take advantages of the touch screen or the stylus pen.

Therefore, how to provide a formula gesture input method and system to improve the efficiency of inputting a formula on an electronic device with a touch screen or a stylus becomes an urgent problem to be solved.

Disclosure of Invention

The technical problem to be solved by the invention is to provide a formula gesture input method and system, so that the efficiency of inputting a formula on an electronic device with a touch screen or a stylus is improved.

In a first aspect, the present invention provides a formula gesture input method, including the following steps:

step S10, creating a selection mode control, an alternative symbol display control, an alternative decoration symbol display control and an alternative format display control on a formula input interface;

step S20, creating a character association library, and setting a plurality of format bits corresponding to each character input position, a format corresponding to each format bit and an alternative bit;

step S30, the formula input interface obtains and displays the input formula, and selects the corresponding character in the formula input interface based on the selection mode control and the received selection signal;

step S40, respectively matching similar characters associated with each selected character based on the character association library, displaying a preset number of similar characters on the alternative positions, and displaying the rest similar characters on an alternative symbol display control;

and step S50, performing gesture operation on the alternative symbol display control, the alternative decoration symbol display control, the alternative format display control, the format bit and the alternative bit to complete character replacement, decoration symbol addition, format conversion or format nesting.

Further, in the step S10, the selection mode control is configured to enter a full selection mode, where the full selection mode is used to select all specific characters in the selection area;

the alternative symbol display control is used for displaying similar characters associated with the selected character;

the alternative decoration symbol display control is used for displaying decoration symbols;

the alternative format display control is used for displaying optional formats of the characters.

Further, in the step S20, the character association library stores similar characters associated with each character.

Further, the step S30 is specifically:

inputting a formula on a formula input interface through a touch screen, a stylus, a physical keyboard or a virtual keyboard, or recognizing a picture with the formula through an OCR technology to perform formula input and displaying the input formula;

when the selection mode control receives a trigger signal of a user, determining a selection area based on a click signal or a frame selection signal input by the user, acquiring a specific character selected by the user, and selecting all specific characters in the selection area;

and when the selection mode control does not receive a trigger signal of a user, determining a selection area based on a click signal or a frame selection signal input by the user, and selecting all characters in the selection area.

Further, the step S50 is specifically:

selecting similar characters in the alternative positions or the alternative symbol display controls, and automatically replacing the selected characters in batches;

selecting the decoration symbols in the alternative decoration symbol display control, and automatically adding the decoration symbols to the selected characters in batches;

dragging the selected characters to format bits, automatically converting the format into a format corresponding to the format bits, or selecting a selectable format in the alternative format display control, and automatically performing batch format conversion on the selected characters;

and dragging the selected character to a format bit corresponding to the character after format conversion, and performing format nesting.

In a second aspect, the present invention provides a formula gesture input system, which includes the following modules:

the control creating module is used for creating a selection mode control, an alternative symbol display control, an alternative decoration symbol display control and an alternative format display control on the formula input interface;

the parameter setting module is used for creating a character association library and setting a plurality of format bits corresponding to each character input position, a format corresponding to each format bit and an alternative bit;

the character selection module is used for acquiring and displaying an input formula on the formula input interface and selecting corresponding characters in the formula input interface based on the selection mode control and the received selection signal;

the similar character display module is used for respectively matching similar characters related to all selected characters based on the character association library, displaying a preset number of similar characters on the alternative positions, and displaying the rest similar characters on the alternative symbol display control;

and the gesture input module is used for performing gesture operation on the alternative symbol display control, the alternative decoration symbol display control, the alternative format display control, the format bit and the alternative bit to complete character replacement, decoration symbol addition, format conversion or format nesting.

Further, in the control creating module, the selection mode control is used for entering a full selection mode, and the full selection mode is used for selecting all specific characters in a selection area;

the alternative symbol display control is used for displaying similar characters associated with the selected character;

the alternative decoration symbol display control is used for displaying decoration symbols;

the alternative format display control is used for displaying optional formats of the characters.

Further, in the parameter setting module, the character association library stores similar characters associated with each character.

Further, the character selection module specifically includes:

inputting a formula on a formula input interface through a touch screen, a stylus, a physical keyboard or a virtual keyboard, or recognizing a picture with the formula through an OCR technology to perform formula input and displaying the input formula;

when the selection mode control receives a trigger signal of a user, determining a selection area based on a click signal or a frame selection signal input by the user, acquiring a specific character selected by the user, and selecting all specific characters in the selection area;

and when the selection mode control does not receive a trigger signal of a user, determining a selection area based on a click signal or a frame selection signal input by the user, and selecting all characters in the selection area.

Further, the gesture input module specifically includes:

selecting similar characters in the alternative positions or the alternative symbol display controls, and automatically replacing the selected characters in batches;

selecting the decoration symbols in the alternative decoration symbol display control, and automatically adding the decoration symbols to the selected characters in batches;

dragging the selected characters to format bits, automatically converting the format into a format corresponding to the format bits, or selecting a selectable format in the alternative format display control, and automatically performing batch format conversion on the selected characters;

and dragging the selected character to a format bit corresponding to the character after format conversion, and performing format nesting.

The invention has the advantages that:

setting format positions and alternative positions corresponding to the input positions of the characters by creating a selection mode control, an alternative symbol display control, an alternative decoration symbol display control, an alternative format display control and a character association library; whether a full selection mode is entered or not can be selected by selecting the mode control, namely, specific characters are selected or selected in full in the selection area, related similar characters in the character association library are displayed on the alternative position and the alternative symbol display control, all the selected characters can be replaced in batch in a unified mode by clicking the similar characters, a replacement frame does not need to be called out manually in the prior art, and replacement words are input manually for replacement; by clicking the decoration symbols or the selectable formats in the alternative decoration symbol display control and the alternative format display control, the selected characters can be quickly added with decoration symbols or subjected to format conversion in batches; the format can be automatically converted into the format corresponding to the format bit by dragging the selected character to the format bit of the target character, the format nesting is supported, the whole process is finished at one step, a mouse does not need to be moved to a toolbar to click a corresponding format button after the character is selected like a traditional frame, and finally the efficiency of inputting the formula on the electronic equipment with a touch screen or a handwriting pen is greatly improved.

Drawings

The invention will be further described with reference to the following examples with reference to the accompanying drawings.

FIG. 1 is a flow chart of a formula gesture input method of the present invention.

FIG. 2 is a schematic structural diagram of a formula gesture input system according to the present invention.

FIG. 3 is a schematic diagram of an alternative bit of the present invention showing similar characters.

FIG. 4 is a schematic diagram of the present invention selecting all v within a selection region.

Fig. 5 is a schematic diagram of format conversion in accordance with the present invention.

FIG. 6 is a schematic diagram of format nesting in accordance with the present invention.

Detailed Description

The technical scheme in the embodiment of the application has the following general idea: similar characters related in the character association library are displayed on the alternative positions and the alternative symbol display control, and all selected characters can be replaced in a unified batch mode by clicking the similar characters, so that the character replacement efficiency is improved; by clicking the decoration symbols or the selectable formats in the alternative decoration symbol display control and the alternative format display control, batch decoration symbol adding or format conversion can be carried out on the selected characters, so that the decoration symbol adding and format conversion efficiency is improved; the format can be automatically converted into the format corresponding to the format bit by dragging the selected character to the format bit of the target character, and the format nesting is supported, so that the efficiency of format conversion is further improved, and the efficiency of formula input on electronic equipment with a touch screen or a handwriting pen is further improved.

Referring to fig. 1 to 6, a preferred embodiment of a formula gesture input method according to the present invention includes the following steps:

step S10, creating a selection mode control, an alternative symbol display control, an alternative decoration symbol display control and an alternative format display control on a formula input interface;

step S20, creating a character association library, and setting a plurality of format bits corresponding to each character input position, a format corresponding to each format bit and an alternative bit; setting the format position based on a specific format, for example, setting an upper mark position at the upper right corner of the character input position, setting a lower mark position at the lower right corner of the character input position, setting a format corresponding to the upper mark position as an upper mark format, and setting a format corresponding to the lower mark position as a lower mark format; when the characters are dragged to the upper mark position or the lower mark position, the format is automatically converted into the upper mark format or the lower mark format; because the position of the alternative position is limited, only a preset number of similar characters can be displayed, and the rest of similar characters are displayed in the alternative symbol display control;

step S30, the formula input interface acquires and displays the input formula, and selects the corresponding characters in the formula input interface based on the selection mode control and the received selection signal, namely, one of the characters can be selected singly, all the characters in a selection area can be selected in a frame, and all the specific characters in the selection area can be selected in the frame;

step S40, respectively matching similar characters associated with each selected character based on the character association library, displaying a preset number of similar characters on the alternative positions, and displaying the rest similar characters on an alternative symbol display control;

and step S50, performing gesture operation on the alternative symbol display control, the alternative decoration symbol display control, the alternative format display control, the format bit and the alternative bit to complete character replacement, decoration symbol addition, format conversion or format nesting.

In step S10, the selection mode control is configured to enter a full selection mode, where the full selection mode is configured to select all specific characters in the selection area;

the alternative symbol display control is used for displaying similar characters associated with the selected character;

the alternative modifier display control is for displaying modifier symbols that are symbols added to characters, such as those added to the letter a:

the alternative format display control is used for displaying optional formats of each character, such as bold, italic and other optional formats.

In step S20, the character association library stores similar characters associated with each character, and is used as candidates for replacing the similar characters.

The step S30 specifically includes:

inputting a formula on a formula input interface through a touch screen, a stylus, a physical keyboard or a virtual keyboard, or recognizing a picture with the formula through an OCR technology to perform formula input and displaying the input formula;

when the selection mode control receives a trigger signal of a user, determining a selection area based on a click signal or a frame selection signal input by the user, acquiring a specific character selected by the user, and selecting all specific characters in the selection area;

and when the selection mode control does not receive a trigger signal of a user, determining a selection area based on a click signal or a frame selection signal input by the user, and selecting all characters in the selection area.

The step S50 specifically includes:

selecting similar characters in the alternative positions or the alternative symbol display controls, and automatically replacing the selected characters in batches;

selecting the decoration symbols in the alternative decoration symbol display control, and automatically adding the decoration symbols to the corresponding positions of the selected characters in batches;

dragging the selected characters to format bits, automatically converting the format into a format corresponding to the format bits, or selecting a selectable format in the alternative format display control, and automatically performing batch format conversion on the selected characters;

and dragging the selected character to a format bit corresponding to the character after format conversion, and performing format nesting. For example, when a certain character is dragged to a subscript position, the format is automatically converted into a subscript format, and then when a certain character is dragged to a subscript position corresponding to a subscript, the format is automatically converted into a subscript of the subscript, that is, format nesting is performed.

The invention discloses a preferred embodiment of a formula gesture input system, which comprises the following modules:

the control creating module is used for creating a selection mode control, an alternative symbol display control, an alternative decoration symbol display control and an alternative format display control on the formula input interface;

the parameter setting module is used for creating a character association library and setting a plurality of format bits corresponding to each character input position, a format corresponding to each format bit and an alternative bit; setting the format position based on a specific format, for example, setting an upper mark position at the upper right corner of the character input position, setting a lower mark position at the lower right corner of the character input position, setting a format corresponding to the upper mark position as an upper mark format, and setting a format corresponding to the lower mark position as a lower mark format; when the characters are dragged to the upper mark position or the lower mark position, the format is automatically converted into the upper mark format or the lower mark format; because the position of the alternative position is limited, only a preset number of similar characters can be displayed, and the rest of similar characters are displayed in the alternative symbol display control;

the character selection module is used for acquiring and displaying an input formula on the formula input interface, and selecting corresponding characters in the formula input interface based on the selection mode control and the received selection signal, so that one character can be selected singly, all characters in a selection area can be selected in a frame mode, and all specific characters in the selection area can be selected in the frame mode;

the similar character display module is used for respectively matching similar characters related to all selected characters based on the character association library, displaying a preset number of similar characters on the alternative positions, and displaying the rest similar characters on the alternative symbol display control;

and the gesture input module is used for performing gesture operation on the alternative symbol display control, the alternative decoration symbol display control, the alternative format display control, the format bit and the alternative bit to complete character replacement, decoration symbol addition, format conversion or format nesting.

In the control creating module, the selection mode control is used for entering a full selection mode, and the full selection mode is used for selecting all specific characters in a selection area;

the alternative symbol display control is used for displaying similar characters associated with the selected character;

the alternative modifier display control is for displaying modifier symbols that are symbols added to characters, such as those added to the letter a:

the alternative format display control is used for displaying optional formats of each character, such as bold, italic and other optional formats.

In the parameter setting module, the character association library stores similar characters associated with each character, and is used as candidates for replacing the similar characters.

The character selection module specifically comprises:

inputting a formula on a formula input interface through a touch screen, a stylus, a physical keyboard or a virtual keyboard, or recognizing a picture with the formula through an OCR technology to perform formula input and displaying the input formula;

when the selection mode control receives a trigger signal of a user, determining a selection area based on a click signal or a frame selection signal input by the user, acquiring a specific character selected by the user, and selecting all specific characters in the selection area;

and when the selection mode control does not receive a trigger signal of a user, determining a selection area based on a click signal or a frame selection signal input by the user, and selecting all characters in the selection area.

The gesture input module is specifically as follows:

selecting similar characters in the alternative positions or the alternative symbol display controls, and automatically replacing the selected characters in batches;

selecting the decoration symbols in the alternative decoration symbol display control, and automatically adding the decoration symbols to the corresponding positions of the selected characters in batches;

dragging the selected characters to format bits, automatically converting the format into a format corresponding to the format bits, or selecting a selectable format in the alternative format display control, and automatically performing batch format conversion on the selected characters;

and dragging the selected character to a format bit corresponding to the character after format conversion, and performing format nesting. For example, when a certain character is dragged to a subscript position, the format is automatically converted into a subscript format, and then when a certain character is dragged to a subscript position corresponding to a subscript, the format is automatically converted into a subscript of the subscript, that is, format nesting is performed.

In summary, the invention has the advantages that:

setting format positions and alternative positions corresponding to the input positions of the characters by creating a selection mode control, an alternative symbol display control, an alternative decoration symbol display control, an alternative format display control and a character association library; whether a full selection mode is entered or not can be selected by selecting the mode control, namely, specific characters are selected or selected in full in the selection area, related similar characters in the character association library are displayed on the alternative position and the alternative symbol display control, all the selected characters can be replaced in batch in a unified mode by clicking the similar characters, a replacement frame does not need to be called out manually in the prior art, and replacement words are input manually for replacement; by clicking the decoration symbols or the selectable formats in the alternative decoration symbol display control and the alternative format display control, the selected characters can be quickly added with decoration symbols or subjected to format conversion in batches; the format can be automatically converted into the format corresponding to the format bit by dragging the selected character to the format bit of the target character, the format nesting is supported, the whole process is finished at one step, a mouse does not need to be moved to a toolbar to click a corresponding format button after the character is selected like a traditional frame, and finally the efficiency of inputting the formula on the electronic equipment with a touch screen or a handwriting pen is greatly improved.

As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

Although specific embodiments of the invention have been described above, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, and that equivalent modifications and variations can be made by those skilled in the art without departing from the spirit of the invention, which is to be limited only by the appended claims.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种增强现实的人机交互方法及设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类