[go: up one dir, main page]

CN115480659A - Handwriting pen editing gesture recognition method, medium and electronic device - Google Patents

Handwriting pen editing gesture recognition method, medium and electronic device Download PDF

Info

Publication number
CN115480659A
CN115480659A CN202110602320.4A CN202110602320A CN115480659A CN 115480659 A CN115480659 A CN 115480659A CN 202110602320 A CN202110602320 A CN 202110602320A CN 115480659 A CN115480659 A CN 115480659A
Authority
CN
China
Prior art keywords
character
electronic device
gesture
area
characters
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110602320.4A
Other languages
Chinese (zh)
Inventor
李淑玲
胡月
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110602320.4A priority Critical patent/CN115480659A/en
Priority to PCT/CN2022/085895 priority patent/WO2022252821A1/en
Publication of CN115480659A publication Critical patent/CN115480659A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03545Pens or stylus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0412Digitisers structurally integrated in a display

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Character Discrimination (AREA)

Abstract

本申请涉及终端技术领域,公开了一种手写笔编辑笔势识别方法、介质及电子设备。该方法包括:电子设备在检测到用户利用手写笔在电子设备的屏幕上所产生的笔势轨迹,与屏幕上显示的字符产生重叠的情况下,确定重叠的字符的第一字符区域和笔势轨迹;电子设备确定笔势轨迹与第一字符区域之间的重叠关系是否满足第一预定条件;在满足第一预定条件的情况下,电子设备确定笔试轨迹对应的编辑操作为删除操作,并删除重叠的字符。从而在一定程度上避免了将手写笔在所选中的目标印刷体字符上画波浪线的删除笔势误识别为选中笔势的问题。

Figure 202110602320

The application relates to the field of terminal technology, and discloses a method, medium and electronic equipment for recognizing gestures of editing gestures with a stylus. The method includes: when the electronic device detects that the gesture track generated by the user using a stylus on the screen of the electronic device overlaps with the characters displayed on the screen, determining the first character area and the gesture track of the overlapping character; The electronic device determines whether the overlapping relationship between the gesture trajectory and the first character area satisfies the first predetermined condition; if the first predetermined condition is satisfied, the electronic device determines that the editing operation corresponding to the written test trajectory is a deletion operation, and deletes the overlapping characters . Thus, to a certain extent, the problem of misrecognition of the deletion gesture that the stylus pen draws a wavy line on the selected target printed character as the selected gesture is avoided.

Figure 202110602320

Description

一种手写笔编辑笔势识别方法、介质及电子设备A kind of stylus pen editing gesture recognition method, medium and electronic equipment

技术领域technical field

本申请涉及终端技术领域,特别涉及一种手写笔编辑笔势识别方法、介质及电子设备。The present application relates to the field of terminal technology, in particular to a method, medium and electronic device for recognizing editing gestures with a stylus.

背景技术Background technique

随着触控类电子设备的不断迭代更新,很多触控类电子设备都配备了手写笔作为提升办公效率的方式,手写笔除了基础的字符或图形输入功能外,一些手写笔产品中加入了快捷笔势编辑的功能。With the continuous iterative update of touch electronic devices, many touch electronic devices are equipped with a stylus as a way to improve office efficiency. In addition to the basic character or graphic input functions of the stylus, some stylus products have added shortcuts. Features of Gesture Editing.

例如,用户利用手写笔书写手写体字符后,手写体字符即时转化为印刷体字符,在用户利用手写笔对印刷体字符进行编辑操作的情况下,用户可以利用手写笔在选中的目标印刷体字符上画波浪线实现删除目标印刷体字符的功能,也可以利用手写笔在所选中的目标印刷体字符上画直线实现选中目标印刷体字符的功能。For example, after a user writes a handwritten character with a stylus, the handwritten character is immediately converted into a printed character. When the user uses the stylus to edit the printed character, the user can use the stylus to draw on the selected target printed character. The wavy line realizes the function of deleting the target printed character, and the function of selecting the target printed character can also be realized by drawing a straight line on the selected target printed character by using the stylus.

但是,目前的手写笔删除快捷笔势判断方法仍存在一定的识别痛点问题:当用户想要删除印刷体字符中的部分字符,利用手写笔在所选中的目标印刷体字符上画波浪线,电子设备容易将手写笔在所选中的目标印刷体字符上画波浪线的删除笔势误识别为选中笔势,进而对手写笔所选中的目标印刷体字符进行选中显示而不是删除目标印刷体字符,如此,存在手写笔删除快捷笔势误识别的情形,用户体检较差。However, the current stylus pen deletion shortcut gesture judgment method still has certain recognition pain points: when the user wants to delete some characters in the printed characters, use the stylus to draw a wavy line on the selected target printed characters, and the electronic device It is easy to misidentify the deletion gesture of drawing a wavy line on the selected target printed character by the stylus as the selected gesture, and then select and display the target printed character selected by the stylus instead of deleting the target printed character. In this way, there is The situation where the stylus deletes the shortcut gesture is misrecognized, and the user's physical examination is poor.

发明内容Contents of the invention

本申请实施例提供了一种手写笔编辑笔势识别方法、介质及电子设备。Embodiments of the present application provide a stylus pen editing gesture recognition method, medium and electronic equipment.

第一方面,本申请实施例提供了一种手写笔编辑笔势识别方法,该方法包括:In the first aspect, the embodiment of the present application provides a method for recognizing a stylus editing gesture, the method comprising:

所述电子设备在检测到用户利用手写笔在所述电子设备的屏幕上所产生的笔势轨迹,与所述屏幕上显示的字符产生重叠的情况下,确定重叠的所述字符的第一字符区域和笔势轨迹;When the electronic device detects that the gesture trajectory generated by the user using the stylus on the screen of the electronic device overlaps with the characters displayed on the screen, determine the overlapping first character area of the character and gesture trajectory;

所述电子设备确定所述笔势轨迹与所述第一字符区域之间的重叠关系是否满足第一预定条件;The electronic device determines whether the overlapping relationship between the gesture track and the first character area satisfies a first predetermined condition;

在满足第一预定条件的情况下,所述电子设备确定所述笔势轨迹对应的编辑操作为删除操作,并删除重叠的所述字符。If the first predetermined condition is satisfied, the electronic device determines that the editing operation corresponding to the gesture track is a deletion operation, and deletes the overlapping characters.

在对笔势轨迹显示的规则上,本申请实施例考虑了真实纸笔的书写编辑场景,达到文字符编辑的感知一致性。对于删除操作的笔势轨迹,在纸笔书写中,用户经常采用涂抹的方式对部分文字符进行删除,即采用“所见即所得”的心理感知。因此,在电子设备的书写过程中,删除功能可以用在文字符上方进行覆盖的方式实现,即在文字符上画不同的线形,如横线、斜线、波浪线等,只要覆盖率达到某一参数区间,即可实现快速删除。而选中功能,可采用文字符凸显的设置规则,可采用圈选、文字符下方横线或波浪线的方式等。这样的设置规则更符合用户手写编辑的心理预期,有更好的易学易记性。从而在一定程度上避免了将手写笔在所选中的目标印刷体字符上画波浪线的删除笔势误识别为选中笔势的问题。In terms of the rules for displaying gesture trajectories, the embodiment of the present application considers the writing and editing scene of real pen and paper writing, so as to achieve the perceptual consistency of character editing. For the gesture trajectory of the delete operation, in pen and paper writing, users often delete some characters by smearing, that is, using the psychological perception of "what you see is what you get". Therefore, in the writing process of electronic devices, the deletion function can be realized by covering the text characters, that is, drawing different line shapes on the text characters, such as horizontal lines, oblique lines, wavy lines, etc., as long as the coverage rate reaches a certain level. A parameter range can be quickly deleted. As for the selection function, the setting rule of character highlighting can be adopted, and the method of circle selection, horizontal line or wavy line under the character can be used, etc. Such a setting rule is more in line with the psychological expectation of the user's handwriting editor, and it is easier to learn and remember. Therefore, to a certain extent, the problem of misrecognition of the delete gesture that the stylus pen draws a wavy line on the selected target printed character as the selected gesture is avoided.

在上述第一方面的一种可能的实现中,上述方法还包括:所述第一字符区域为分别包含重叠的所有所述字符高度方向的最高点坐标和最低点坐标且平行于宽度方向的两条直线,以及分别包含所述字符宽度方向的最左侧坐标和最右侧坐标且平行于高度方向的两条直线,围成的矩形区域。In a possible implementation of the above-mentioned first aspect, the above-mentioned method further includes: the first character area is two overlapping coordinates of the highest point and the lowest point in the height direction of all the characters that are parallel to the width direction. a straight line, and two straight lines that respectively include the leftmost coordinate and the rightmost coordinate in the width direction of the character and are parallel to the height direction, enclosing a rectangular area.

在上述第一方面的一种可能的实现中,所述电子设备确定所述笔势轨迹与所述第一字符区域之间的重叠关系是否满足第一预定条件,包括:In a possible implementation of the first aspect above, the electronic device determines whether the overlapping relationship between the gesture trajectory and the first character area satisfies a first predetermined condition, including:

在所述笔势轨迹类型为曲线类型的情况下,所述电子设备确定所述笔势轨迹的第一轨迹区域的面积和所述第一字符区域的面积的第一比值;其中,所述第一轨迹区域为分别包含所述第一字符区域中笔势轨迹的字符高度方向的最高点坐标和最低点坐标且平行于宽度方向的两条直线,以及分别包含字符宽度方向的最左侧坐标和最右侧坐标且平行于高度方向的两条直线,围成的矩形区域;In the case where the gesture trajectory type is a curve type, the electronic device determines a first ratio of the area of the first trajectory region of the gesture trajectory to the area of the first character region; wherein, the first trajectory The areas are two straight lines that respectively contain the highest point coordinates and the lowest point coordinates of the character height direction of the gesture track in the first character area and are parallel to the width direction, and respectively contain the leftmost coordinates and the rightmost coordinates of the character width direction The rectangular area surrounded by two straight lines parallel to the height direction;

所述电子设备在判断出所述第一比值在第一参数区间的情况下,确定满足第一预定条件。The electronic device determines that the first predetermined condition is met when it is determined that the first ratio is within the first parameter interval.

可以理解,第一参数区间可以为曲线覆盖率的设定参数区间。It can be understood that the first parameter interval may be a set parameter interval of the curve coverage ratio.

在上述第一方面的一种可能的实现中,上述方法还包括:所述电子设备确定所述笔势轨迹与所述第一字符区域之间的重叠关系是否满足第一预定条件,包括:在所述笔势轨迹类型为直线类型的情况下,所述电子设备获取直线笔势轨迹与所述第一字符区域的字符宽度方向的倾斜角度;In a possible implementation of the above first aspect, the above method further includes: the electronic device determining whether the overlapping relationship between the gesture trajectory and the first character area satisfies a first predetermined condition, including: In the case where the gesture track type is a straight line type, the electronic device acquires the inclination angle between the straight line gesture track and the character width direction of the first character area;

所述电子设备在判断出所述倾斜角度在第二参数区间的情况下,获取第二轨迹区域的面积和第二字符区域的面积的第三比值;When the electronic device determines that the inclination angle is in the second parameter interval, it obtains a third ratio of the area of the second trajectory area to the area of the second character area;

其中,所述第二字符区域为分别包含所述字符的字符高度方向的最高点坐标和最低点坐标且平行于直线方向的两条直线,以及分别包含字符宽度方向的最左侧坐标和最右侧坐标且平行于直线法线方向的两条直线,围成的矩形区域;Wherein, the second character area is two straight lines that respectively include the highest point coordinate and the lowest point coordinate of the character height direction of the character and are parallel to the straight line direction, and respectively include the leftmost coordinate and the rightmost coordinate in the character width direction. The rectangular area surrounded by two straight lines with side coordinates and parallel to the normal direction of the straight line;

所述第二轨迹区域为所述第一字符区域中笔势轨迹的字符高度方向的最高点坐标和最低点坐标所在的平行于直线方向的两条直线,以及字符宽度方向的最左侧坐标和最右侧坐标所在的平行于直线法线方向的两条直线,围成的矩形区域;The second trajectory area is two straight lines parallel to the straight line direction where the highest point coordinate and the lowest point coordinate of the character height direction of the gesture trajectory in the first character area are located, and the leftmost coordinate and the lowest point coordinate in the character width direction. The rectangular area surrounded by two straight lines parallel to the normal direction of the straight line where the coordinates on the right are located;

所述电子设备在判断出所述第三比值在第三参数区间的情况下,确定满足第一预定条件。The electronic device determines that the first predetermined condition is met when it is determined that the third ratio is in the third parameter interval.

可以理解,第二参数区间可以为直线倾角的设定参数区间,第三参数区间可以为直线覆盖率的设定参数区间。It can be understood that the second parameter interval may be a set parameter interval of the straight line inclination, and the third parameter interval may be a set parameter interval of the straight line coverage.

在上述第一方面的一种可能的实现中,上述方法还包括:所述电子设备确定所述笔势轨迹与所述第一字符区域之间的重叠关系是否满足第一预定条件,包括:In a possible implementation of the above first aspect, the above method further includes: the electronic device determining whether the overlapping relationship between the gesture trajectory and the first character area satisfies a first predetermined condition, including:

在所述笔势轨迹类型为折线类型的情况下,所述电子设备确定第一轨迹区域的面积和所述第一字符区域的面积的第二比值;其中,所述第一轨迹区域为分别包含所述第一字符区域中笔势轨迹的字符高度方向的最高点坐标和最低点坐标且平行于宽度方向的两条直线,以及分别包含字符宽度方向的最左侧坐标和最右侧坐标且平行于高度方向的两条直线,围成的矩形区域;In the case that the gesture trajectory type is a broken line type, the electronic device determines a second ratio between the area of the first trajectory area and the area of the first character area; wherein, the first trajectory area contains the The coordinates of the highest point and the coordinates of the lowest point in the character height direction of the gesture track in the first character area and two straight lines parallel to the width direction, and the leftmost coordinates and rightmost coordinates in the character width direction respectively and parallel to the height The rectangular area surrounded by two straight lines in the direction;

所述电子设备在判断出所述第二比值在第四参数区间的情况下,确定满足第一预定条件。The electronic device determines that the first predetermined condition is met when it is determined that the second ratio is within the fourth parameter interval.

可以理解,第四参数区间可以为折线的设定参数区间。It can be understood that the fourth parameter interval may be a set parameter interval of the polyline.

在上述第一方面的一种可能的实现中,上述方法还包括:在所述笔势轨迹类型为曲线类型的情况下,所述电子设备采用快速傅里叶变化获取所述曲线笔势轨迹的正弦波集合;In a possible implementation of the above first aspect, the above method further includes: if the type of the gesture trajectory is a curve type, the electronic device adopts fast Fourier transformation to obtain the sine wave of the curved gesture trajectory gather;

所述电子设备获取所述正弦波集合中按照频率值由大至小排在前的预设条正弦波的频率;The electronic device obtains the frequency of the preset sine waves in the sine wave set according to the frequency value from large to small;

所述电子设备在判断出所述预设条正弦波的频率在第五参数区间的情况下,确定满足第一预定条件。When the electronic device determines that the frequency of the preset sine wave is within the fifth parameter interval, it determines that the first predetermined condition is satisfied.

可以理解,第五参数区间可以为曲线频域的设定参数区间。It can be understood that the fifth parameter interval may be a set parameter interval in the frequency domain of the curve.

在上述第一方面的一种可能的实现中,上述方法还包括:在所述笔势轨迹类型为曲线类型的情况下,所述电子设备获取所述曲线笔势轨迹在所述第一字符区域的高度方向的最高点坐标和最低点坐标;In a possible implementation of the above first aspect, the above method further includes: if the type of the gesture trajectory is a curve type, the electronic device acquires the height of the curved gesture trajectory in the first character area The highest point coordinates and the lowest point coordinates of the direction;

所述电子设备根据所述最高点坐标和最低点坐标确定所述最高点和所述最低点之间的连线与所述高度方向的倾斜角度;The electronic device determines an inclination angle between a line between the highest point and the lowest point and the height direction according to the coordinates of the highest point and the lowest point;

所述电子设备在判断出所述倾斜角度在第六参数区间的情况下,确定满足第一预定条件。When the electronic device determines that the inclination angle is in the sixth parameter interval, it determines that the first predetermined condition is met.

可以理解,第六参数区间可以为曲线角度的设定参数区间。It can be understood that the sixth parameter interval may be a set parameter interval of the curve angle.

在上述第一方面的一种可能的实现中,上述方法还包括:所述电子设备判断出重叠的所述字符的数量为多个,并且所述电子设备在确定所述笔势轨迹与所述第一字符区域之间的重叠关系满足第一预定条件的情况下,还判断重叠的所述多个字符中的每个字符上的笔势轨迹与每个字符的单第一字符区域之间的重叠关系是否满足第二预定条件,并在判断出满足所述第二预定条件的情况下,删除满足所述第二预定条件的字符。In a possible implementation of the above-mentioned first aspect, the above-mentioned method further includes: the electronic device determines that the number of overlapping characters is multiple, and the electronic device determines that the gesture track and the first When the overlapping relationship between a character area satisfies the first predetermined condition, the overlapping relationship between the gesture trajectory on each character of the overlapping characters and the single first character area of each character is also judged Whether the second predetermined condition is satisfied, and if it is judged that the second predetermined condition is satisfied, delete the characters satisfying the second predetermined condition.

可以理解,电子设备可以判断笔势轨迹在每个字符上的覆盖率是否符合参考标准,从而删除满足参考标准(第二预定条件)的字符,降低误删率,达到删除操作的精准识别。It can be understood that the electronic device can determine whether the coverage rate of the gesture track on each character meets the reference standard, thereby deleting characters meeting the reference standard (the second predetermined condition), reducing the rate of mistaken deletion, and achieving accurate identification of the deletion operation.

在上述第一方面的一种可能的实现中,上述方法还包括:所述第一字符区域为分别包含单个字符高度方向的最高点坐标和最低点坐标且平行于高度方向的两条直线,以及分别包含单个字符宽度方向的最左侧坐标和最右侧坐标且平行于宽度方向的两条直线,围成的矩形区域。In a possible implementation of the above-mentioned first aspect, the above-mentioned method further includes: the first character area is two straight lines that respectively contain the coordinates of the highest point and the coordinates of the lowest point in the height direction of a single character and are parallel to the height direction, and Respectively contain the leftmost coordinates and rightmost coordinates of a single character in the width direction and are parallel to the width direction, a rectangular area surrounded by two straight lines.

在上述第一方面的一种可能的实现中,上述方法还包括:判断重叠的所述多个字符中的每个字符上的笔势轨迹与每个字符的单第一字符区域之间的重叠关系是否满足第二预定条件,包括:In a possible implementation of the above-mentioned first aspect, the above-mentioned method further includes: judging the overlapping relationship between the gesture trajectory on each of the multiple overlapping characters and the single first character area of each character Whether the second predetermined condition is met, including:

所述电子设备确定重叠的所述字符中每个字符的宽度值与所述第一字符区域宽度值的宽度比值,以及重叠的所述字符中每个字符的高度值与所述第一字符区域高度值的高度比值,所述电子设备在判断出所述宽度比值在第七参数区间,所述高度比值在第八参数区间的情况下,确定满足第一预定条件。The electronic device determines the width ratio of the width value of each character in the overlapping characters to the width value of the first character area, and the height value of each character in the overlapping characters and the width value of the first character area A height ratio of the height value, the electronic device determines that the first predetermined condition is satisfied when the electronic device determines that the width ratio is in the seventh parameter interval and the height ratio is in the eighth parameter interval.

可以理解,第七参数区间可以为单字符横方向覆盖率的设定参数区间,第八参数区间可以为单字符纵方向覆盖率的设定参数区间。It can be understood that the seventh parameter interval may be the setting parameter interval of the single character coverage in the horizontal direction, and the eighth parameter interval may be the setting parameter interval of the single character vertical coverage.

在上述第一方面的一种可能的实现中,上述方法还包括:所述电子设备确定所述笔势轨迹与所述第一字符区域之间的重叠关系是否满足预定条件,包括:In a possible implementation of the above first aspect, the above method further includes: the electronic device determining whether the overlapping relationship between the gesture trajectory and the first character area satisfies a predetermined condition, including:

所述电子设备判断出所述字符是第一语言字符还是第二语言字符;The electronic device determines whether the character is a first language character or a second language character;

所述电子设备在判断出是第一语言字符的情况下,获取所述第一语言字符对应的预定条件,并确定所述笔势轨迹与所述第一字符区域之间的重叠关系是否满足所述第一语言字符对应的预定条件;If the electronic device determines that it is a character in the first language, it acquires a predetermined condition corresponding to the character in the first language, and determines whether the overlapping relationship between the gesture track and the first character area satisfies the a predetermined condition corresponding to the first language character;

所述电子设备在判断出是第二语言字符的情况下,获取所述第二语言字符对应的预定条件,并确定所述笔势轨迹与所述第一字符区域之间的重叠关系是否满足所述第一语言类型对应的预定条件。In the case that the electronic device determines that it is a character in the second language, it acquires a predetermined condition corresponding to the character in the second language, and determines whether the overlapping relationship between the gesture trajectory and the first character area satisfies the The predetermined condition corresponding to the first language type.

目前,手写笔快捷笔势编辑功能尚未考虑到不同文字符呈现效果下的识别参数区别,可以理解,本申请实施例通过对编辑操作所选中的印书体字符的语言类型进行判断,即中文还是英文,之后对不同语种采用差异化的笔势类型参数识别,提高了手写笔快捷笔势的识别准确率,提升了用户体验。At present, the short-cut gesture editing function of the stylus has not considered the difference in recognition parameters under the rendering effect of different characters. It can be understood that the embodiment of the present application judges the language type of the printed character selected in the editing operation, that is, Chinese or English , and then use differentiated gesture type parameter recognition for different languages, which improves the recognition accuracy of stylus shortcut gestures and improves user experience.

在上述第一方面的一种可能的实现中,所述第一语言包括中文、英文、德文、法文中的任意一种,所述第二语言包括中文、英文、德文、法文中的任意一种。In a possible implementation of the first aspect above, the first language includes any one of Chinese, English, German, and French, and the second language includes any one of Chinese, English, German, and French. A sort of.

在上述第一方面的一种可能的实现中,所述字符为手写体字符转化后的印书体字符。In a possible implementation of the first aspect above, the characters are printed characters converted from handwritten characters.

在上述第一方面的一种可能的实现中,所述字符在所述电子设备上的预设应用程序的操作界面显示,所述预设应用程序为备忘录、笔写计算器、Nebo for Huawei、随手写中的任意一种。In a possible implementation of the first aspect above, the characters are displayed on the operation interface of a preset application program on the electronic device, and the preset application program is memo, pen calculator, Nebo for Huawei, Any kind of handwriting.

第二方面,本申请实施例还提供了一种可读介质,所述可读介质上存储有指令,该指令在电子设备上执行时使电子设备实现第一方面种中任一项所述的手写笔编辑笔势识别方法。In the second aspect, the embodiment of the present application also provides a readable medium, and instructions are stored on the readable medium, and when the instructions are executed on the electronic equipment, the electronic equipment realizes any one of the above described in the first aspect. Stylus editing gesture recognition method.

第三方面,本申请实施例还提供了一种电子设备,包括:存储器,用于存储由电子设备的一个或多个处理器执行的指令,以及In a third aspect, an embodiment of the present application further provides an electronic device, including: a memory configured to store instructions executed by one or more processors of the electronic device, and

处理器,是所述电子设备的处理器之一,用于执行第一方面中任一项所述的手写笔编辑笔势识别方法。The processor is one of the processors of the electronic device, configured to execute the method for recognizing editing gestures with a stylus according to any one of the first aspect.

附图说明Description of drawings

图1A至1J根据本申请的一些实施例,示出了一种手写笔编辑笔势识别方法的应用场景示意图。1A to 1J are schematic diagrams showing application scenarios of a method for recognizing editing gestures with a stylus according to some embodiments of the present application.

图2根据本申请实施例,示出了一种实现本申请技术方案的平板100的软件结构框图。FIG. 2 shows a software structural block diagram of a tablet 100 implementing the technical solution of the present application according to an embodiment of the present application.

图3示出了一种平板利用手写笔快捷笔势识别的应用场景示意图。FIG. 3 shows a schematic diagram of an application scenario of a tablet using a stylus for quick gesture recognition.

图4根据本申请实施例,示出了一种对于曲线笔势轨迹的多字符覆盖率的示意图。Fig. 4 shows a schematic diagram of multi-character coverage for curved gesture trajectories according to an embodiment of the present application.

图5根据本申请实施例,示出了一种曲线笔势轨迹的曲线频域变化的示意图。Fig. 5 shows a schematic diagram of changes in the frequency domain of a curve of a curve gesture trajectory according to an embodiment of the present application.

图6根据本申请实施例,示出了一种曲线笔势轨迹的曲线角度的示意图。Fig. 6 shows a schematic diagram of a curve angle of a curve gesture trajectory according to an embodiment of the present application.

图7根据本申请实施例,示出了一种单字符覆盖率的示意图。Fig. 7 shows a schematic diagram of single-character coverage according to an embodiment of the present application.

图8根据本申请的一些实施例,示出了对于中文字符,当用户的删除笔势轨迹为曲线时进行识别的方法的流程示意图。Fig. 8 shows a schematic flowchart of a method for recognizing Chinese characters when the trajectory of the user's delete gesture is a curve, according to some embodiments of the present application.

图9根据本申请实施例,示出了一种对应于折线笔势轨迹的多字符覆盖率的示意图。FIG. 9 shows a schematic diagram of multi-character coverage corresponding to a polyline gesture trajectory according to an embodiment of the present application.

图10根据本申请实施例,示出了一种对应于折线笔势轨迹的单字符覆盖率的示意图。Fig. 10 shows a schematic diagram of coverage of a single character corresponding to a polyline gesture trajectory according to an embodiment of the present application.

图11根据本申请的一些实施例,示出了对于中文字符,当用户的删除笔势轨迹为折线时进行识别的方法的流程示意图。Fig. 11 shows a schematic flowchart of a method for recognizing Chinese characters when the trace of the user's delete gesture is a broken line, according to some embodiments of the present application.

图12根据本申请的一些实施例,示出了一种在“目标字”上画直线以及直线倾角参数区间的示意图。Fig. 12 shows a schematic diagram of drawing a straight line on a "target character" and a parameter range of the inclination angle of the line according to some embodiments of the present application.

图13根据本申请的一些实施例,示出了一种在“目标字”上画直线以及直线覆盖率的示意图。Fig. 13 shows a schematic diagram of drawing a straight line on a "target word" and the coverage of the straight line according to some embodiments of the present application.

图14根据本申请的一些实施例,示出了对于中文字符,当用户的删除笔势轨迹为直线时进行识别的方法的流程示意图。Fig. 14 shows a schematic flowchart of a method for recognizing Chinese characters when the trace of the user's delete gesture is a straight line, according to some embodiments of the present application.

图15根据本申请的一些实施例,示出了对于英文字符,当用户的删除笔势轨迹为曲线时进行识别的方法的流程示意图。Fig. 15 shows a schematic flowchart of a method for recognizing English characters when the trajectory of the user's delete gesture is a curve, according to some embodiments of the present application.

图16根据本申请的实施例示出了图1所示的电子设备100的一种可能的结构框图。FIG. 16 shows a possible structural block diagram of the electronic device 100 shown in FIG. 1 according to an embodiment of the present application.

具体实施方式detailed description

本申请的说明性实施例包括但不限于一种手写笔编辑笔势识别方法、介质及电子设备。Illustrative embodiments of the present application include, but are not limited to, a stylus pen editing gesture recognition method, medium, and electronic device.

为了解决背景技术中提到的技术问题,本申请实施例公开了一种手写笔编辑笔势识别方法。具体地,用户利用手写笔书写的字符转化为印刷体字符后,如果用户在转化后的印刷体字符上画设定的线条轨迹,例如,横线、斜线、折线、波浪线等,使设定的线条轨迹与印刷体字符重叠,则可以根据线条轨迹和与线条轨迹重叠的印刷体字符所在的字符区域之间的覆盖关系,确定用户的操作是否为删除操作,如果确定是删除操作,则将与线条轨迹重叠的印刷体字符删除。从而在一定程度上避免了将手写笔在所选中的目标印刷体字符上画波浪线的删除笔势误识别为选中笔势的问题。具体方案将在下文进行描述。In order to solve the technical problems mentioned in the background art, an embodiment of the present application discloses a method for recognizing editing gestures of a stylus. Specifically, after the characters written by the user with a stylus are converted into printed characters, if the user draws a set line trajectory on the converted printed characters, for example, a horizontal line, an oblique line, a folded line, a wavy line, etc., the set If the specified line track overlaps with printed characters, then it can be determined whether the user's operation is a delete operation according to the coverage relationship between the line track and the character area where the printed character overlapping with the line track is located. If it is determined to be a delete operation, then Printed characters overlapping with line traces are deleted. Therefore, to a certain extent, the problem of misrecognition of the delete gesture that the stylus pen draws a wavy line on the selected target printed character as the selected gesture is avoided. The specific scheme will be described below.

下面通过附图和实施例,对本申请实施例的技术方案做进一步的详细描述。The technical solutions of the embodiments of the present application will be described in further detail below with reference to the drawings and embodiments.

本申请实施例提供的手写笔编辑笔势识别方法应用在具有手写笔书写和编辑功能的各种软件中,例如备忘录、笔写计算器、Nebo for Huawei、随手写等。本申请实施例适用于电子设备系统中的全局手写、手写转印刷体等多种输入编辑场景。The stylus editing gesture recognition method provided in the embodiment of the present application is applied to various software with stylus writing and editing functions, such as memo, pen calculator, Nebo for Huawei, handwriting, etc. The embodiments of the present application are applicable to various input and editing scenarios such as global handwriting and handwriting transferred to printed form in an electronic device system.

下文将以具有手写笔书写和编辑功能的软件为备忘录,电子设备系统中的手写转印刷体输入编辑场景为例,对本申请实施例提供的手写笔笔势识别方法进行进一步说明。The stylus gesture recognition method provided by the embodiment of the present application will be further described below by taking the software with stylus writing and editing functions as a memo and the scene of handwriting-to-printed input and editing in an electronic device system as an example.

图1A至1J根据本申请的一些实施例,示出了一种手写笔编辑笔势识别方法的应用场景示意图。1A to 1J are schematic diagrams showing application scenarios of a method for recognizing editing gestures with a stylus according to some embodiments of the present application.

该应用场景中包括电子设备100,假设用户想要在电子设备100中的备忘录中做笔记,用户先要打开备忘录,然后,用户创建一个新的备忘录,并在开启备忘录的手写功能后,进行手写笔记操作。This application scenario includes the electronic device 100. Assuming that the user wants to make notes in the memo in the electronic device 100, the user first needs to open the memo, then, the user creates a new memo, and after turning on the handwriting function of the memo, perform handwriting Note operation.

例如,如图1A所示,电子设备100的显示界面显示备忘录控件10,用户可以通过点击备忘录控件10打开备忘录。在用户点击备忘录控件10后,电子设备 100进入备忘录的操作界面。如图1B所示,备忘录的操作界面包括创建按钮11。用户在点击创建按钮21后,电子设备100显示新建的备忘录。如图1C所示,新建的备忘录界面包括手写控件12和手写体转印刷体控件13。在用户想要使用电子设备100的手写功能、手写字符转化为印刷体字符功能、以及手写笔直接对手写字符转化后的印刷体字符的编辑操作功能的情况下,用户可以点击手写控件 12和手写体转印刷体控件13,此时,电子设备100显示手写界面,如图1D所示,该手写界面包括手写区域14和印刷体显示区域15。For example, as shown in FIG. 1A , the display interface of the electronic device 100 displays a memo control 10 , and the user can open the memo by clicking the memo control 10 . After the user clicks on the memo control 10, the electronic device 100 enters the operation interface of the memo. As shown in FIG. 1B , the operation interface of the memo includes a create button 11 . After the user clicks the create button 21, the electronic device 100 displays the newly created memo. As shown in FIG. 1C , the newly created memo interface includes a handwriting control 12 and a handwriting-to-print control 13 . When the user wants to use the handwriting function of the electronic device 100, the function of converting handwritten characters into printed characters, and the editing operation function of the printed characters directly converted from handwritten characters by the stylus, the user can click the handwriting control 12 and the handwriting Turn to the printed text control 13 , at this time, the electronic device 100 displays a handwriting interface, as shown in FIG. 1D , the handwriting interface includes a handwriting area 14 and a printed text display area 15 .

继续参阅图1D,该应用场景中还包括手写笔200,在一些应用场景中,手写笔200可以通过蓝牙与电子设备100建立通信连接,从而在电子设备100上进行触控操作,触控操作包括编辑操作和手写操作等。此外,在其他应用场景中,用户也可以直接打开手写笔200的电源键,便可以在电子设备100上进行触控操作,但不限于此。Continuing to refer to FIG. 1D, the application scenario also includes a stylus 200. In some application scenarios, the stylus 200 can establish a communication connection with the electronic device 100 through Bluetooth, so as to perform touch operations on the electronic device 100. The touch operations include Editing operations and handwriting operations, etc. In addition, in other application scenarios, the user can also directly turn on the power button of the stylus 200 to perform touch operations on the electronic device 100 , but it is not limited thereto.

在该应用场景中,用户手持手写笔200在手写区域14写的字符可以实时转化成印刷体字符,显示在印刷体显示区域15。手写区域14悬浮在印刷体显示区域15上,或者手写区域14与印刷体显示区域15部分重叠,但不限于此。In this application scenario, the characters written by the user in the handwriting area 14 with the stylus 200 can be converted into printed characters in real time and displayed in the printed display area 15 . The handwriting area 14 is floating on the print display area 15, or the handwriting area 14 partially overlaps the print display area 15, but not limited thereto.

用户在对印刷体显示区域15上的印刷体字符进行编辑时,如果想要对部分印刷体字符进行删除操作,可以直接利用手持的手写笔200对印刷体显示区域 15中所想要删除的印刷体字符上画删除线,删除线可以为直线或者曲线,电子设备100检测到此操作,即删除被画线的印刷体字符。When the user edits the printed characters on the printed display area 15, if he wants to delete part of the printed characters, he can directly use the hand-held stylus 200 to print the printed characters that he wants to delete in the printed display area 15. Draw a strikethrough on the block character, and the strikethrough can be a straight line or a curve, and the electronic device 100 detects this operation, that is, deletes the printed block character with the line drawn.

在手写笔200在电子设备100上书写并编辑的过程中,删除功能可以用在文字符上方进行覆盖的方式实现,即在文字符上画不同的线形,如横线、斜线、波浪线等,可实现删除功能。下面介绍几种对中文字符的删除操作。During the writing and editing process of the stylus 200 on the electronic device 100, the delete function can be realized by covering the text characters, that is, drawing different line shapes on the text characters, such as horizontal lines, oblique lines, wavy lines, etc. , which can realize the delete function. The following describes several operations for deleting Chinese characters.

例如,如图1E所示,该手写操作界面包括中文字符16,手写笔200在中文字符16中的部分字符161上画波浪线17,对部分字符161进行删除操作。部分字符161的内容可以为“而所谓的”。电子设备100可以根据波浪线17对“而所谓的”这4个字符的覆盖率来确定用户的操作是否为删除操作,并确定删除的字符为“而所谓的”这4个字符。在确定为是删除操作的情况下,将部分字符 161删除。如图1F所示,电子设备100将部分字符161删除后,将光标18停留在部分字符161前一个字符或标点右侧的位置,部分字符161后面的字符前移至光标右侧。For example, as shown in FIG. 1E , the handwriting operation interface includes Chinese characters 16 , and the stylus 200 draws wavy lines 17 on some of the characters 161 in the Chinese characters 16 , and performs a deletion operation on some of the characters 161 . The content of the partial character 161 may be "and the so-called". The electronic device 100 may determine whether the user's operation is a deletion operation according to the coverage of the wavy line 17 on the four characters "and the so-called", and determine that the deleted characters are the four characters "the so-called". If it is determined to be a deletion operation, some characters 161 are deleted. As shown in FIG. 1F , after the electronic device 100 deletes the partial character 161 , the cursor 18 stays on the right side of the character or punctuation before the partial character 161 , and the character behind the partial character 161 moves forward to the right side of the cursor.

又如,如图1G所示,手写笔200在中文字符16中的部分字符161上画折线 19,对部分字符161进行删除操作。部分字符161的内容可以为“而所谓的”。电子设备100可以根据折线19对“而所谓的”这4个字符的覆盖率来确定用户的操作是否为删除操作,并确定删除的字符为“而所谓的”这4个字符。在确定为是删除操作的情况下,将部分字符161删除。如图1F所示,电子设备100将部分字符161删除后,将光标18停留在部分字符161前一个字符或标点右侧的位置,部分字符161后面的字符前移至光标右侧。For another example, as shown in FIG. 1G , the stylus 200 draws a broken line 19 on a part of the character 161 in the Chinese character 16, and performs a deletion operation on the part of the character 161. The content of the partial character 161 may be "and the so-called". The electronic device 100 may determine whether the user's operation is a deletion operation according to the coverage of the broken line 19 on the four characters "and the so-called", and determine that the deleted characters are the four characters "the so-called". If it is determined to be a deletion operation, some characters 161 are deleted. As shown in FIG. 1F , after the electronic device 100 deletes the partial character 161 , the cursor 18 stays on the right side of the character or punctuation before the partial character 161 , and the character behind the partial character 161 moves forward to the right side of the cursor.

又如,如图1H所示,手写笔200在中文字符16中的部分字符161上画直线20,对部分字符161进行删除操作。部分字符161的内容可以为“而所谓的”。电子设备100可以根据横线20对“而所谓的”这4个字符的覆盖率来确定用户的操作是否为删除操作,并确定删除的字符为“而所谓的”这4个字符。在确定为是删除操作的情况下,删除部分字符161。如图1F所示,电子设备100将部分字符161删除后,将光标18停留在部分字符161前一个字符或标点右侧的位置,部分字符161后面的字符前移至光标右侧。For another example, as shown in FIG. 1H , the stylus 200 draws a straight line 20 on a part of the character 161 in the Chinese character 16 , and deletes the part of the character 161 . The content of the partial character 161 may be "and the so-called". The electronic device 100 may determine whether the user's operation is a deletion operation according to the coverage of the horizontal line 20 on the four characters "and the so-called", and determine that the deleted characters are the four characters "and the so-called". If it is determined to be a delete operation, part of the characters 161 are deleted. As shown in FIG. 1F , after the electronic device 100 deletes the partial character 161 , the cursor 18 stays on the right side of the character or punctuation before the partial character 161 , and the character behind the partial character 161 moves forward to the right side of the cursor.

又如,如图1I所示,手写笔200在中文字符16中的部分字符161上画斜线21,对部分字符161进行删除操作。部分字符161的内容可以为“而所谓的”。电子设备100可以根据斜线21对“而所谓的”这4个字符的覆盖率来确定用户的操作是否为删除操作,并确定删除的字符为“而所谓的”这4个字符。在确定为是删除操作的情况下,删除部分字符161。如图1F所示,电子设备100将部分字符161删除后,将光标18停留在部分字符161前一个字符或标点右侧的位置,部分字符161后面的字符前移至光标右侧。For another example, as shown in FIG. 1I , the stylus 200 draws oblique lines 21 on part of the characters 161 in the Chinese characters 16 , and deletes the part of the characters 161 . The content of the partial character 161 may be "and the so-called". The electronic device 100 may determine whether the user's operation is a deletion operation according to the coverage of the slash 21 on the four characters "and the so-called", and determine that the deleted characters are the four characters "and the so-called". If it is determined to be a delete operation, part of the characters 161 are deleted. As shown in FIG. 1F , after the electronic device 100 deletes the partial character 161 , the cursor 18 stays on the right side of the character or punctuation before the partial character 161 , and the character behind the partial character 161 moves forward to the right side of the cursor.

曲线、直线和斜线、折线与印刷体字符所在的字符区域之间的覆盖关系的定义不同,可以理解,曲线的覆盖率是曲线围成的区域与目标印书体字符所在字符区域之间的关系度。折线的覆盖率是折线围成的面积与目标印书体字符的面积之间的关系度。而直线和斜线则是根据直线和斜线与目标印刷体宽度方向的倾斜角度。下文将具体介绍。The definitions of the coverage relationship between curves, straight lines, oblique lines, broken lines, and the character area where printed characters are located are different. It can be understood that the coverage rate of a curve is the ratio between the area surrounded by the curve and the character area where the target printed characters are located. degree of relationship. The coverage of the polyline is the degree of relationship between the area enclosed by the polyline and the area of the target typographic characters. The straight line and oblique line are based on the inclination angle between the straight line and oblique line and the width direction of the target printed body. It will be introduced in detail below.

下面再介绍一种对英文字符体的删除操作,例如,如图1J所示,该手写操作界面包括英文字符22,手写笔200在英文字符22中的部分字符221上画波浪线23,对部分字符221进行删除操作。部分字符221的内容可以为“implicit positive”。电子设备100检测到该删除操作,将部分字符221删除。Introduce a kind of deletion operation to English character font again below, for example, as shown in Fig. Character 221 performs a delete operation. The content of some characters 221 may be "implicit positive". The electronic device 100 detects the deletion operation, and deletes part of the characters 221 .

英文和中文因为字符体特征差异比较大,曲线、直线和斜线、折线覆盖率的判断阈值也不同,英文设定参数区间的上限值小于等于中文设定参数区间的上限值,下文将具体介绍。Due to the large difference in character font characteristics between English and Chinese, the thresholds for judging the coverage of curves, straight lines, oblique lines, and broken lines are also different. The upper limit of the English setting parameter range is less than or equal to the upper limit value of the Chinese setting parameter range. The following will Specific introduction.

手写笔200在英文字符22中的部分字符221上画折线、直线、斜线的判断方式与手写笔200在中文字符的部分字符上画折线、直线、斜线的判断方式相同,在此不再赘述。The judging method of the stylus 200 drawing broken lines, straight lines, and oblique lines on some characters 221 of the English characters 22 is the same as that of the stylus 200 drawing broken lines, straight lines, and oblique lines on some characters of the Chinese characters, and will not be repeated here. repeat.

适用于本身实施例的电子设备100为具有手写笔书写和编辑功能的各种终端设备,例如,平板、手机、电脑等,但不限于此。The electronic device 100 applicable to this embodiment is a variety of terminal devices with writing and editing functions with a stylus, such as a tablet, a mobile phone, a computer, etc., but is not limited thereto.

适用于本身实施例的手写笔200为具有在电子设备上书写和编辑功能的各种类型的手写笔,例如,主动式电容笔和被动式电容笔等,但不限于此。The stylus 200 applicable to the embodiment itself is various types of stylus with writing and editing functions on electronic devices, such as active capacitive pens and passive capacitive pens, etc., but not limited thereto.

为了便于说明,下文以电子设备100为平板100,平板上的具有手写笔书写和编辑功能的软件为备忘录为例,结合附图详细介绍本申请的技术方案。For the convenience of explanation, the electronic device 100 is the tablet 100, and the software with writing and editing functions on the tablet is the memo as an example, and the technical solution of the present application will be introduced in detail with reference to the accompanying drawings.

图2根据本申请实施例,示出了一种实现本申请技术方案平板100的软件结构框图,如图2所示,分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,系统库和内核层。Fig. 2 shows a software structure block diagram for implementing the technical solution of the present application tablet 100 according to the embodiment of the present application. As shown in Fig. 2, the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces. In some embodiments, the Android system is divided into four layers, which are application program layer, application program framework layer, system library and kernel layer from top to bottom.

应用程序层可以包括一系列应用程序。例如备忘录应用程序21。The application layer can include a series of applications. For example the memo application 21 .

应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。应用程序框架层可以包括窗口管理器22,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. The application framework layer may include a window manager 22, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.

视图系统22包括可视控件,例如显示文字符的控件,显示图片的等。视图系统可用于构建应用程序。界面可以由一个或多个视图组成的。例如,包括短信通知图标的界面,可以包括显示文字符的视图以及显示图片的视图。The view system 22 includes visual controls, such as controls for displaying text, for displaying pictures, and so on. The view system can be used to build applications. An interface can consist of one or more views. For example, an interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.

系统层包括安卓运行时(Android Runtime)23,安卓运行时23用于负责安卓系统的调度和管理。The system layer includes an Android Runtime (Android Runtime) 23, and the Android Runtime 23 is responsible for the scheduling and management of the Android system.

内核层是硬件和软件之间的层。内核层至少包含显示驱动24,传感器驱动 25。The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver 24 and a sensor driver 25 .

本申请实施例中,在用户利用手写笔200对备忘录应用程序21显示界面中的手写体字符转化后的印刷体字符进行编辑操作的情况下,电子设备100的传感器驱动26可以驱动触摸传感器,接收手写笔200与电子设备100的触控显示屏接触发射的信号,从而确定手写笔200在触控显示屏上进行编辑操作(例如滑动、点击)所行成的笔势轨迹(可以简称笔势)对应的坐标数据,根据笔势轨迹坐标数据确定手写笔200对所选中的目标印刷体字符的编辑操作的笔势类型。例如,备忘录应用程序21可以根据手写笔200对所选中的目标印刷体字符的笔势操作的坐标进行回归拟合预测操作,识别笔势类型,例如,若笔势操作的坐标拟合成直线,则为直线类型,如果有波峰和波谷,则为曲线类型。例如,如图1E所示,备忘录应用程序21根据波浪线17的坐标,判断波浪线17为曲线类型。In the embodiment of the present application, when the user uses the stylus 200 to edit the printed characters converted from the handwritten characters in the display interface of the memo application 21, the sensor driver 26 of the electronic device 100 can drive the touch sensor to receive handwritten characters. The signal transmitted by the pen 200 in contact with the touch screen of the electronic device 100 is used to determine the coordinates corresponding to the gesture trajectory (may be referred to as gesture) formed by the stylus 200 on the touch screen for editing operations (such as sliding and clicking). data, according to the gesture track coordinate data to determine the gesture type of the editing operation of the stylus 200 on the selected target printed character. For example, the memo application 21 can perform a regression fitting prediction operation on the coordinates of the gesture operation of the selected target printed character according to the stylus 200 to identify the gesture type, for example, if the coordinates of the gesture operation are fitted into a straight line, then it is a straight line type, or curve type if there are peaks and troughs. For example, as shown in FIG. 1E , the memo application 21 determines that the wavy line 17 is a curve type according to the coordinates of the wavy line 17 .

备忘录应用程序21根据编辑操作对应的笔势轨迹坐标数据确定的笔势类型,判断手写笔200的触控操作是否是删除操作,在判断手写笔200的触控操作是删除操作的情况下,向视图系统22发送删除目标印刷体字符指令,视图系统22 根据删除目标印刷体字符指令得到删除目标印刷体字符的视图数据,并将该删除目标印刷体字符的视图数据发送给安卓运行时23,安卓运行时23将删除目标印刷体字符的视图数据发送给内核层的显示驱动24,从而驱动触控显示屏显示删除目标印书体字符的显示界面,例如,如图1F所示,电子设备100将部分字符 161删除后,显示将光标18停留在部分字符161前一个字符或标点右侧的位置,部分字符161后面的字符前移至光标右侧的显示界面。The memo application 21 judges whether the touch operation of the stylus 200 is a delete operation according to the gesture type determined by the gesture trajectory coordinate data corresponding to the edit operation, and if it is judged that the touch operation of the stylus 200 is a delete operation, sends a message to the view system 22 Send the delete target printed character instruction, the view system 22 obtains the view data of the deleted target printed character according to the deleted target printed character instruction, and sends the view data of the deleted target printed character to the Android runtime 23, and the Android runtime 23. Send the view data of the deleted target printed character to the display driver 24 of the kernel layer, thereby driving the touch screen to display the display interface of the deleted target printed character. For example, as shown in FIG. 1F, the electronic device 100 displays part of the character After 161 is deleted, it is displayed that the cursor 18 stays on the position on the right side of the previous character or punctuation point of the part character 161, and the characters behind the part character 161 move forward to the display interface on the right side of the cursor.

可以理解,图2只是实现本申请技术方案平板100的一种软件结构框图,但不限于此结构框图,图2所示的软件结构中的各功能模块均集成在平板100中,下面将以平板100为步骤的执行主体具体介绍本申请的技术方案。It can be understood that Fig. 2 is only a block diagram of a software structure for implementing the technical solution of the present application, but is not limited to this block diagram, and each functional module in the software structure shown in Fig. 100 is the subject of execution of the steps, which specifically introduces the technical solution of the present application.

可以理解,字符可以包括文字符、符号或者字符和符号,本申请实施例的笔势类型判断中加入文化差异这一参考因素,考虑了不同语种的识别,中文与英文在文字符排版上存在很大的差异,单个中文字符占据空间较大且中文字符之间间距较窄,而英文单个字符母占据空间较小,且英文以单词为组成单元,单词之间存在空格,有一定的文字符间距。这样的文字符呈现方式,在进行文字符编辑时,如果采用同样的参数识别区间,则很容易出现误操作的情况。比如用波浪线进行删除时,英文字符的目标文字符(要删除的字符)前后因为有空格存在,所以可以精准删除某个单词,但中文间距较小,很容易对目标文字符的前后文字符进行划线覆盖,从而造成误删除的现象。It can be understood that characters can include text characters, symbols, or both characters and symbols. The reference factor of cultural differences is added to the judgment of the gesture type in the embodiment of the present application, and the recognition of different languages is considered. There is a big difference between Chinese and English in text and character layout The difference is that a single Chinese character occupies a large space and the space between Chinese characters is narrow, while a single English letter occupies a small space, and English is composed of words, there are spaces between words, and there is a certain space between characters. In such a text character presentation mode, if the same parameter identification interval is used when editing text characters, it is easy to misuse. For example, when using a wavy line to delete, because there are spaces before and after the target text character (the character to be deleted) in English characters, a certain word can be accurately deleted, but the Chinese space is small, so it is easy to correct the text characters before and after the target text character. Carry out cross-line coverage, resulting in the phenomenon of accidental deletion.

例如,图3示出了一种平板利用手写笔快捷笔势识别的应用场景示意图,如图3所示,在该应用场景中,包括触控电子设备200和手写笔200,触控电子设备200的触控界面包括书写区20和印刷体文字符显示区31,触控电子设备200 检测到用户在书写区20输入文字符后,即时将手写文字符转印刷体文字符显示在印刷体文字符显示区31。以在印刷体文字符显示区31显示的英文字符32和中文字符35为例,英文字符32的内容为:Culturedifference in editing,中文字符35的内容为:中英字符展示文化差异。For example, FIG. 3 shows a schematic diagram of an application scenario in which a tablet utilizes a stylus for quick gesture recognition. As shown in FIG. The touch interface includes a writing area 20 and a printed character display area 31. After the touch electronic device 200 detects that the user has input characters in the writing area 20, it immediately converts the handwritten characters into printed characters and displays them on the printed character display. District 31. Taking the English characters 32 and Chinese characters 35 displayed in the printed character display area 31 as an example, the content of the English characters 32 is: Culture difference in editing, and the content of the Chinese characters 35 is: Chinese and English characters show cultural differences.

假设用户利用手写笔200在英文单词321(例如Culture)上画曲线31(波浪线),删除英文单词321(例如Culture)。用户利用手写笔200在中文词语 351(例如文化)上画曲线37(波浪线),删除中文词语351(例如文化)。由于英文词与词的间距d1较大,而中文字符与字符的间距d2较小,当用户利用手写笔200画的波浪线部分落在与用户所想要删除的中文词语351(例如文化)相邻的字符(例如示)上时,存在误将与中文词语351相邻的字符删除的问题,即当前手写笔删除快捷笔势存在误识别的情形,用户体检较差。Assume that the user uses the stylus 200 to draw a curved line 31 (wavy line) on an English word 321 (eg Culture) to delete the English word 321 (eg Culture). The user uses the stylus 200 to draw a curved line 37 (wavy line) on the Chinese word 351 (such as culture) to delete the Chinese word 351 (such as culture). Since the distance d1 between English words and words is relatively large, and the distance d2 between Chinese characters and characters is relatively small, when the wavy line part drawn by the user using the stylus 200 falls on the Chinese word 351 (such as culture) that the user wants to delete When the adjacent characters (such as shown) are on, there is a problem of mistakenly deleting the characters adjacent to the Chinese word 351, that is, the current stylus delete shortcut gestures are misrecognized, and the user's physical examination is poor.

目前,手写笔快捷笔势编辑功能尚未考虑到不同文字符呈现效果下的识别参数区别,可以理解,本申请实施例通过对编辑操作所选中的印书体字符的语言类型进行判断,即中文还是英文,之后对不同语种采用差异化的笔势类型参数识别,提高了手写笔快捷笔势的识别准确率,提升了用户体验。At present, the short-cut gesture editing function of the stylus has not considered the difference in recognition parameters under the rendering effect of different characters. It can be understood that the embodiment of the present application judges the language type of the printed character selected in the editing operation, that is, Chinese or English , and then use differentiated gesture type parameter recognition for different languages, which improves the recognition accuracy of stylus shortcut gestures and improves user experience.

可以理解,印刷体字符的语言类型可以为中文、英文、日语等中任意一种或多种,但不限于此。印刷体字符可以包括文字符和公式。本文将以中文和英文为例说明本申请的技术方案。It can be understood that the language type of printed characters may be any one or more of Chinese, English, Japanese, etc., but is not limited thereto. Printed characters can include literal characters and formulas. This article will take Chinese and English as examples to illustrate the technical solution of this application.

对于中文字符,当笔势轨迹为曲线时,判定曲线笔势轨迹是否为删除操作,与笔势轨迹为直线、斜线或者折线时不同。为了说明曲线的覆盖率,先介绍一下被选中的目标印刷体字符所在的字符区域的定义,例如,如图4所示,假设本申请实施例中,被选中的目标印刷体字符内容为:“目标字”,在当前xy坐标系下,x方向是指“目标字”从左至右的宽度方向,y方向是指“目标字”从上至下的高度方向。For Chinese characters, when the gesture trajectory is a curved line, determining whether the curved gesture trajectory is a delete operation is different from when the gesture trajectory is a straight line, an oblique line or a broken line. In order to illustrate the coverage of the curve, first introduce the definition of the character area where the selected target printed characters are located. For example, as shown in Figure 4, assume that in the embodiment of this application, the content of the selected target printed characters is: " Target character", in the current xy coordinate system, the x direction refers to the width direction of the "target character" from left to right, and the y direction refers to the height direction of the "target character" from top to bottom.

其中,首先根据“目标字”在触控显示屏内所有点的坐标集合,确定坐标集合中y方向的最高点的坐标和最低点的坐标,同时x方向筛选出最左侧的坐标和最右侧的坐标,进而确定目标印刷体字符所在的字符区域。Among them, firstly, according to the coordinate set of all points of the "target word" in the touch display screen, determine the coordinates of the highest point and the lowest point in the coordinate set in the y direction, and at the same time filter out the leftmost coordinates and the rightmost coordinates in the x direction. The coordinates of the side, and then determine the character area where the target printed character is located.

例如,“目标字”在y方向最高点的坐标为(0,y11),在y方向最低点的坐标为(0,y12),以及“目标字”在x方向的最右侧的坐标为(x12,0),最左边的坐标为(x11,0)。目标印刷体字符所在的字符区域被定义为:包含坐标(0,y12) 且平行于x轴的直线、包含坐标(0,y11)且平行于x轴的直线、包含坐标(x11,0) 且平行于y轴的直线,以及包含坐标为(x12,0)且平行于y轴的直线围成的区域。For example, the coordinates of the highest point of the "target word" in the y direction are (0,y 11 ), the coordinates of the lowest point in the y direction are (0,y 12 ), and the rightmost coordinates of the "target word" in the x direction is (x 12 ,0), and the leftmost coordinate is (x 11 ,0). The character area where the target print character is located is defined as: a straight line including coordinates (0,y 12 ) and parallel to the x-axis, a straight line including coordinates (0,y 11 ) and parallel to the x-axis, including coordinates (x 11 , 0) and parallel to the y-axis, and the area enclosed by a line with coordinates (x 12 ,0) and parallel to the y-axis.

然后,计算两者纵坐标差值(y12-y11),并计算两者横坐标差值(x12-x11),之后将纵坐标差值与横坐标差值的乘积作为字符区域1的面积,即“目标字”面积。Then, calculate the difference between the two ordinates (y 12 -y 11 ), and calculate the difference between the two abscissas (x 12 -x 11 ), and then use the product of the difference between the ordinate and the difference between the abscissa as character area 1 The area, that is, the "target word" area.

可以理解,手写笔200在目标印刷体字符上所画的曲线对应的曲线覆盖率越高,则表明编辑操作为删除操作的概率越高,曲线覆盖率越低,则表明编辑操作为在目标印刷体字符下的选中操作的概率越高。同理,手写笔200在目标印刷体字符上所画的曲线对应的曲线频域越高和曲线角度越高,则表明手写笔200在目标印刷体字符上所画的曲线对应的曲线覆盖率越高,则表明编辑操作为删除操作的概率越高,因此,本申请实施例可以根据手写笔200在目标印刷体字符上所画的曲线对应的曲线覆盖率、曲线频域和曲线角度作为判断该编辑操作是否是删除操作的依据,满足至少一种条件即判定编辑操作为删除操作。It can be understood that the higher the coverage rate of the curve corresponding to the curve drawn by the stylus 200 on the target printed character, the higher the probability that the editing operation is a deletion operation, and the lower the coverage rate of the curve, it indicates that the editing operation is a deletion operation. The probability of the selected operation under the font character is higher. Similarly, the higher the frequency domain of the curve corresponding to the curve drawn by the stylus 200 on the target printed character and the higher the curve angle, the higher the coverage of the curve corresponding to the curve drawn by the stylus 200 on the target printed character. Higher, it indicates that the probability that the editing operation is a deletion operation is higher. Therefore, in the embodiment of the present application, the curve coverage rate, curve frequency domain, and curve angle corresponding to the curve drawn by the stylus 200 on the target printed character can be used as the judgment method. Whether the edit operation is the basis for the delete operation, if at least one condition is satisfied, the edit operation is determined to be a delete operation.

为了提高删除操作识别的精确度,下面引入手写笔200在目标印刷体字符上所画的曲线在字符区域1中的曲线覆盖率及其判断规则、曲线频域及其判断规则和曲线角度及其判断规则。In order to improve the accuracy of the deletion operation recognition, the following introduces the curve coverage and its judgment rule, the curve frequency domain and its judgment rule, the curve angle and its Judgment rules.

下面先介绍曲线覆盖率的定义,首先,根据字符区域内的曲线所有点的坐标集合中,筛选出曲线笔势高度方向的最高点坐标、高度方向的最低点坐标、宽度方向最右侧的坐标、宽度方向最左侧的坐标,确定曲线所在的轨迹区域。例如,如图4所示,曲线在y方向的最低点坐标为(0,y22),在y方向的最高点坐标为 (0,y21),以及“目标字”在x方向的最左侧的坐标为(x21,0),最右侧的坐标为 (x22,0)。曲线所在的轨迹区域2被定义为:包含坐标(0,y22)且平行于y轴的直线、包含坐标(0,y21)且平行于y轴的直线、包含坐标(x21,0)且平行于x轴的直线,以及包含坐标为(x22,0)且平行于x轴的直线围成的区域。The following introduces the definition of curve coverage. First, according to the coordinate set of all points of the curve in the character area, filter out the coordinates of the highest point in the height direction of the curve gesture, the lowest point coordinate in the height direction, the rightmost coordinate in the width direction, The leftmost coordinate in the width direction, which determines the track area where the curve is located. For example, as shown in Figure 4, the coordinates of the lowest point of the curve in the y direction are (0, y 22 ), the coordinates of the highest point in the y direction are (0, y 21 ), and the “target word” is at the leftmost point in the x direction The side coordinates are (x 21 , 0), and the rightmost coordinates are (x 22 , 0). The trajectory area 2 where the curve is located is defined as: a straight line including coordinates (0, y 22 ) and parallel to the y-axis, a straight line including coordinates (0, y 21 ) and parallel to the y-axis, including coordinates (x 21 , 0) and a straight line parallel to the x-axis, and an area enclosed by a straight line with coordinates (x 22 , 0) parallel to the x-axis.

然后,计算出纵坐标差值(y22-y21)与横坐标差值(x22-x21),两者乘积作为曲线的覆盖面积。Then, the ordinate difference (y 22 -y 21 ) and the abscissa difference (x 22 -x 21 ) are calculated, and the product of the two is used as the coverage area of the curve.

曲线覆盖面积与“目标字”面积的比值作为面积覆盖率S,定义覆盖率Q为最小面积覆盖率。The ratio of the curve coverage area to the "target word" area is taken as the area coverage rate S, and the coverage rate Q is defined as the minimum area coverage rate.

如图4所示,在该坐标系下,覆盖率计算方式为:As shown in Figure 4, under this coordinate system, the coverage calculation method is:

Figure RE-GDA0003208634860000111
Figure RE-GDA0003208634860000111

下面再介绍曲线覆盖率的判断规则:若曲线覆盖率在设定参数区间,即曲线笔势类型的面积覆盖率S在面积覆盖率判断区间Q,则确定用户的编辑操作为删除操作。The judgment rule of curve coverage is introduced below: if the curve coverage is within the set parameter interval, that is, the area coverage S of the curve gesture type is within the area coverage judgment interval Q, then the user's editing operation is determined to be a delete operation.

下面介绍曲线频域的定义和判断规则。可以理解,傅里叶原理表明:任何连续测量的时序或信号,都可以表示为不同频率的正弦波信号的无限叠加。在本申请实施例中,图5根据本申请实施例,示出了一种曲线笔势轨迹的曲线频域变化的示意图。如图5所示,首先根据上述方法确定“目标字”的字符区域1,然后确定字符区域1中的曲线,并采用快速傅里叶变换(Fast Fourier Transform,FFT) 的方法,将曲线转换为一些具有固定规律周期频率的波形集合,在周期频率集合中采用频率区间范围作为判断标准,例如5Hz到30Hz。如果笔势曲线的波形集合中的任意一个分支的周期频率在这个区间内,则认为符合删除笔势的判断条件。The following introduces the definition and judgment rules of the frequency domain of the curve. It can be understood that Fourier's principle shows that any continuous measurement sequence or signal can be expressed as an infinite superposition of sine wave signals of different frequencies. In the embodiment of the present application, FIG. 5 shows a schematic diagram of changes in the frequency domain of a curve of a curved gesture trajectory according to the embodiment of the present application. As shown in Figure 5, first determine the character area 1 of the "target word" according to the above method, then determine the curve in the character area 1, and use the Fast Fourier Transform (FFT) method to convert the curve into For some waveform sets with fixed regular periodic frequencies, the frequency interval range is used as the judgment standard in the periodic frequency sets, for example, 5Hz to 30Hz. If the cycle frequency of any branch in the waveform set of the gesture curve is within this interval, it is deemed to meet the judgment condition of deleting the gesture.

例如,图5是将左侧字符区域1中的一条不规则波形采用快速傅里叶变分解为右侧至少三个周期的波形的示意图,具体地,将周期性采集的曲线笔势上的轨迹坐标数据输入到FFT公式中,输出结果至少包括FFT变化分支1中的周期频率 f1的波形、FFT变化分支2中的周期频率f2的波形、FFT变化分支3中的周期频率f3的波形,如果周期频率f1、周期频率f2和周期频率f3中任意一个在设定频率区间内,则认为符合删除笔势的判断条件。For example, Fig. 5 is a schematic diagram of decomposing an irregular waveform in the character area 1 on the left into waveforms of at least three cycles on the right using Fast Fourier Transformation, specifically, the trajectory coordinates on the periodically collected curve gestures The data is input into the FFT formula, and the output results include at least the waveform of the periodic frequency f1 in the FFT variation branch 1, the waveform of the periodic frequency f2 in the FFT variation branch 2, and the waveform of the periodic frequency f3 in the FFT variation branch 3. If the periodic frequency If any one of f1, period frequency f2 and period frequency f3 is within the set frequency range, it is deemed to meet the judgment condition of the delete gesture.

下面介绍曲线角度的定义和判断规则。The following introduces the definition and judgment rules of the curve angle.

图6根据本申请实施例,示出了一种曲线笔势轨迹的曲线角度的示意图。如图6所示,首先根据上述方法确定“目标字”的字符区域1,然后确定字符区域 1中的曲线,根据曲线笔势的所有点集合进行判断,确定曲线笔势轨迹中的y方向的最高点的坐标(x0,y0)和最低点的坐标(x1,y1),最高点的坐标和最低点的坐标连线与x方向的角度作为曲线角度,定位Q为曲线角度区间,如果笔势曲线的角度在此区间内则认为符合判断条件。Fig. 6 shows a schematic diagram of a curve angle of a curve gesture trajectory according to an embodiment of the present application. As shown in Figure 6, first determine the character area 1 of the "target word" according to the above method, then determine the curve in the character area 1, judge according to all point sets of the curve gesture, and determine the highest point in the y direction of the curve gesture trajectory The coordinates (x 0 , y 0 ) of the lowest point and the coordinates of the lowest point (x 1 , y 1 ), the angle between the line connecting the coordinates of the highest point and the coordinates of the lowest point and the x direction is used as the curve angle, and positioning Q is the curve angle interval, if If the angle of the gesture curve is within this interval, it is considered to meet the judgment condition.

表1示例性的说明各个参数类型对应的设定参数区间:Table 1 exemplarily illustrates the setting parameter range corresponding to each parameter type:

Figure RE-GDA0003208634860000121
Figure RE-GDA0003208634860000121

表1中示出,曲线覆盖率的设定参数区间可以为0.35至1,曲线角度参数的设定参数区间可以为:上斜线(波谷至波峰连线角度)为0.27至10.83,下斜线(波峰至波谷连线角度为-0.24至-10.15,曲线频域的设定参数区间可以为 5Hz至30Hz。As shown in Table 1, the setting parameter interval of the curve coverage rate can be 0.35 to 1, and the setting parameter interval of the curve angle parameter can be: the upper slash (the angle connecting the trough to the peak) is 0.27 to 10.83, and the lower slash (The angle between the peak and the trough is -0.24 to -10.15, and the setting parameter interval of the frequency domain of the curve can be 5Hz to 30Hz.

为了降低误删率,达到删除操作的精准识别,还可以判断编辑操作的编辑笔势在每个字符上的覆盖率,若编辑笔势在每个字符上的覆盖率大于设定覆盖率或在设定覆盖率区间,则确定为编辑笔势所选定的“目标字”符。例如,如图3 所示,当用户利用手写笔200画的波浪线37部分落在与用户所想要删除的中文词语351(例如“文化”)相邻的字符(例如“示”)上时,由于波浪线37在与用户所想要删除的中文词语351(例如“文化”)相邻的字符(例如示)的覆盖率不在预设区间,则不会误将与中文词语351相邻的字符删除,提高用户体检。In order to reduce the rate of mistaken deletion and achieve accurate identification of deletion operations, it is also possible to judge the coverage of each character by the editing gestures of the editing operation. If the coverage of each character is greater than the set coverage or the set coverage interval, it is determined as the selected "target character" character of the editing gesture. For example, as shown in FIG. 3 , when the wavy line 37 drawn by the user with the stylus 200 partially falls on a character (such as "show") adjacent to the Chinese word 351 (such as "culture") that the user wants to delete , because the coverage of the wavy line 37 in the characters (such as shown) adjacent to the Chinese word 351 (such as "culture") that the user wants to delete is not in the preset interval, then the character adjacent to the Chinese word 351 will not be mistaken. Characters removed to improve user health.

下面介绍单字符横向覆盖率和单字符纵坐标覆盖率概念。可以理解,横纵方向即字符的宽度方向和高度方向。单字符横纵方向覆盖率是指,编辑操作在目标印刷体字符中每个字符上形成的笔势在每个字符的字符区域的横纵方向覆盖率。The concepts of single-character horizontal coverage and single-character vertical coverage are introduced below. It can be understood that the horizontal and vertical directions refer to the width direction and the height direction of the characters. The horizontal and vertical coverage ratio of a single character refers to the horizontal and vertical coverage ratio of the gesture formed on each character in the target print character by the editing operation in the character area of each character.

图7根据本申请实施例,示出了一种单字符覆盖率的示意图。如图7所示,首先根据上述方法确定“目标字”中每个字符的字符区域,然后确定每个字符区域1中的曲线,如图7所示,根据上述方法确定“目标字”中“字”字符的字符区域1,字符区域1中的曲线的轨迹区域2。Fig. 7 shows a schematic diagram of single-character coverage according to an embodiment of the present application. As shown in Figure 7, first determine the character area of each character in the "target word" according to the above method, and then determine the curve in each character area 1, as shown in Figure 7, determine the "target word" in the "target word" according to the above method The character area 1 of the "word" character, and the track area 2 of the curve in character area 1.

单字符横向覆盖率,即“目标字”中每个字符上的曲线笔势轨迹的最右侧坐标和最左侧坐标的横坐标差值(x22-x11)与“目标字”中每个字符上的最右侧坐标和最左侧坐标的横坐标差值(x12-x11)的比率,定义Qx为单字符横坐标覆盖率判断区间。例如,Qx为0.42至1。Horizontal coverage of a single character, that is, the abscissa difference (x 22 -x 11 ) between the rightmost coordinate and the leftmost coordinate of the curve gesture track on each character in the "target word" and each character in the "target word" The ratio of the abscissa difference (x 12 −x 11 ) between the rightmost coordinate and the leftmost coordinate on a character defines Qx as the judgment interval of the abscissa coverage rate of a single character. For example, Qx is 0.42 to 1.

同理,单字符纵向覆盖率,即单个“目标字”中每个字符的上的曲线笔势轨迹最高点坐标和最低点坐标的纵坐标差值(y12-y11)与“目标字”中每个字符的最高点坐标和最低点坐标的纵坐标差值(y22-y21)比率,定义Qy为单字符纵坐标覆盖率判断区间。例如,Qy为0.35至1。In the same way, the vertical coverage of a single character, that is, the vertical coordinate difference (y 12 -y 11 ) of the highest point coordinates and the lowest point coordinates of the curve gesture trajectory on each character in a single "target word" is the same as that in the "target word" The ratio of the ordinate difference (y 22 -y 21 ) between the highest point coordinate and the lowest point coordinate of each character defines Qy as the judgment interval of the ordinate coverage rate of a single character. For example, Qy is 0.35 to 1.

单字符横坐标覆盖率是否在判断区间Qx,即大于或等于判断区间Qx的上限值,小于等于判断区间Qx的下限值,单字符纵坐标覆盖率是在判断区间Qy,即大于或等于判断区间Qy的上限值,小于等于判断区间Qy的下限值,如果S≥Q,即同时满足单字符横坐标覆盖率在判断区间Qx,单字符纵坐标覆盖率在判断区间Qy,则认为符合条件的目标印刷体字符对应的该编辑操作为删除操作。Whether the single-character abscissa coverage is in the judgment interval Qx, that is, greater than or equal to the upper limit of the judgment interval Qx, less than or equal to the lower limit of the judgment interval Qx, and the single-character ordinate coverage is in the judgment interval Qy, that is, greater than or equal to The upper limit value of the judgment interval Qy is less than or equal to the lower limit value of the judgment interval Qy. If S≥Q, that is, the coverage rate of the single character abscissa is in the judgment interval Qx, and the coverage rate of the single character ordinate is in the judgment interval Qy, then it is considered The editing operation corresponding to the target printed character that meets the conditions is a deletion operation.

实施例一Embodiment one

图8根据本申请的一些实施例,示出了对于中文字符,当用户的删除笔势轨迹为曲线时进行识别的方法的流程示意图。如图8所示,该方法包括:Fig. 8 shows a schematic flowchart of a method for recognizing Chinese characters when the trajectory of the user's delete gesture is a curve, according to some embodiments of the present application. As shown in Figure 8, the method includes:

步骤801:检测到用户利用手写笔200对备忘录应用程序显示界面中的手写体字符转化后的印刷体字符进行编辑操作,识别出该编辑操作所选中的目标印刷体字符的语言类型。Step 801: Detect that the user uses the stylus 200 to edit the printed characters converted from the handwritten characters in the display interface of the memo application program, and identify the language type of the target printed characters selected by the editing operation.

可以理解,平板100可以获取用户利用手写笔200对目标印刷体字符所画的笔势轨迹的坐标集合,以及目标印刷体字符的坐标集合,若笔势轨迹的坐标集合与目标印刷体字符中的每个字符的坐标集合存在部分相同的坐标(横纵坐标值),则确定笔势轨迹与目标印刷体字符重叠,从而确定手写笔200的触控操作为编辑操作。It can be understood that the tablet 100 can obtain the coordinate set of the gesture trajectory drawn by the user with the stylus 200 on the target printed character, and the coordinate set of the target printed character, if the coordinate set of the gesture trajectory is consistent with each of the target printed characters If the coordinate sets of characters have partially identical coordinates (horizontal and vertical coordinate values), it is determined that the gesture track overlaps with the target printed character, thereby determining that the touch operation of the stylus 200 is an editing operation.

平板100对目标印刷体字符对应的目标手写字符进行笔触打点采集,得到目标手写字符的笔势轨迹坐标,并将目标手写字符的笔势轨迹坐标输入语言类型识别模型,得到目标手写字符的语言类型,即得到印刷体字符的语言类型。语言类型识别模型可以基于神经网络模型实现,例如卷积神经网络模型、深度稀疏卷积神经网络模型、深度递归神经网络模型等进行数据预处理、特征提取和文字分类等操作。The tablet 100 collects the strokes of the target handwritten characters corresponding to the target printed characters to obtain the gesture trajectory coordinates of the target handwritten characters, and inputs the gesture trajectory coordinates of the target handwritten characters into the language type recognition model to obtain the language type of the target handwritten characters, namely Get the language type of printed characters. Language type recognition models can be implemented based on neural network models, such as convolutional neural network models, deep sparse convolutional neural network models, deep recurrent neural network models, etc. for data preprocessing, feature extraction, and text classification.

例如,如图1F所示,该备忘录应用程序的手写操作界面包括手写体字符转化后的印刷体字符,例如中文字符16,手写笔200在中文字符16中的部分字符 161上进行编辑操作,例如画波浪线17。部分字符261的内容可以为“而所谓的”。平板100识别到部分字符261的语言类型为中文。For example, as shown in FIG. 1F, the handwriting operation interface of the memo application program includes printed characters converted from handwritten characters, such as Chinese characters 16, and the stylus 200 performs editing operations on some characters 161 in Chinese characters 16, such as drawing wavy line17. The content of part character 261 can be "and the so-called". The tablet 100 recognizes that the language type of some characters 261 is Chinese.

步骤802:识别手写笔200对所选中的目标印刷体字符的编辑操作的笔势类型。Step 802: Identify the gesture type of the editing operation of the stylus 200 on the selected target print character.

如上所述,不同的笔势类型对应不同的判断依据,因此,需要平板100识别手写笔200对所选中的目标印刷体字符的编辑操作的笔势类型。笔势类型可以为曲线、直线和折线等。As mentioned above, different gesture types correspond to different judgment criteria. Therefore, the tablet 100 needs to recognize the gesture type of the editing operation of the stylus 200 on the selected target print character. The gesture type can be curve, straight line, polyline, etc.

步骤803:如果识别出手写笔200对所选中的目标印刷体字符的编辑操作的笔势类型为曲线类笔势,则获取手写笔200在目标印刷体字符上所画的曲线在目标印刷体字符所在的字符区域的曲线覆盖率、曲线频域和曲线角度。Step 803: If it is recognized that the gesture type of the editing operation of the stylus 200 on the selected target printed character is a curved gesture, then obtain the curve drawn by the stylus 200 on the target printed character at the location of the target printed character. Curve coverage, curve frequency domain, and curve angle for character regions.

例如,如图1E所示,平板100判断中文语种对应的波浪线17在部分字符 161上的覆盖率、波浪线17在部分字符161上的覆盖率、波浪线17在部分字符 161上的曲线频域参数或曲线角度是否分别在设定参数区间。For example, as shown in FIG. 1E , the tablet 100 judges the coverage rate of the wavy line 17 corresponding to the Chinese language on some characters 161, the coverage rate of the wavy line 17 on some characters 161, and the curve frequency of the wavy line 17 on some characters 161. Whether the domain parameter or the curve angle is within the setting parameter interval.

步骤804:判断获取的曲线覆盖率、曲线频域和曲线角度中任意一种参数是否在设定参数区间。若是,则转至步骤805。若否,则转至步骤806。Step 804: Judging whether any one of the acquired curve coverage, curve frequency domain and curve angle is within the set parameter range. If yes, go to step 805. If not, go to step 806.

步骤805:无法确定该编辑操作的类型,向用户显示再次进行编辑操作的提示信息。Step 805: The type of the editing operation cannot be determined, and a prompt message to perform the editing operation again is displayed to the user.

可以理解,在一些实施例中,平板100在无法确定该编辑操作的类型的情况下,会显示用户再次进行编辑操作的提示信息。在用户再次执行该编辑操作后,平板100再次执行步骤801至步骤805。It can be understood that, in some embodiments, when the type of the editing operation cannot be determined, the tablet 100 will display a prompt message for the user to perform the editing operation again. After the user performs the editing operation again, the tablet 100 performs step 801 to step 805 again.

步骤806:获取目标印刷体字符上中单个字符的单字符横纵方向覆盖率。Step 806: Obtain the horizontal and vertical coverage ratio of a single character of a single character on the target printed character.

可以理解,为了降低误删率,需要获取目标印刷体字符上中单个字符的单字符横纵方向覆盖率。It can be understood that, in order to reduce the false deletion rate, it is necessary to obtain the horizontal and vertical coverage ratio of a single character of a single character on the target printed character.

步骤806:判断获取的单字符横纵方向覆盖率是否在设定参数区间,若是,则转至步骤808,若否,则转至809。Step 806: Judging whether the acquired horizontal and vertical coverage of a single character is within the set parameter range, if yes, go to step 808, if not, go to 809.

此外,在其它一些实施例中,为了降低误删率,平板100在执行步骤803 之后,还可以直接获取并判断编辑操作形成的编辑笔势在每个字符上的覆盖率,若所选中的目标字符中编辑笔势在每个字符上的覆盖率大于设定覆盖率或者在设定覆盖率区间,则确定为编辑笔势所选定的目标字符。In addition, in some other embodiments, in order to reduce the rate of mistaken deletion, after performing step 803, the tablet 100 can also directly obtain and judge the coverage rate of the editing gesture formed by the editing operation on each character, if the selected target character If the coverage rate of the editing gesture on each character is greater than the set coverage rate or within the set coverage rate range, then it is determined as the target character selected by the editing gesture.

步骤808:确定该编辑操作为删除操作,删除所选中的印刷体字符,光标停留在所选中的印刷体字符前一个字符右侧的位置,所选中的印刷体字符后面的文字符前移至光标处。Step 808: Determine that the editing operation is a delete operation, delete the selected printed character, the cursor stays on the right side of the character before the selected printed character, and the text character behind the selected printed character moves forward to the cursor place.

步骤809:删除所选中的符合单字符覆盖率的印书体字符。Step 809: Delete the selected typographical characters that meet the single-character coverage.

实施例二Embodiment two

可以理解,此处的折线为沿着字符体或者公式从上至下的多条线段顺次首尾依次相接组成的曲折连线。与实施例一不同的是,实施例二在折线类笔势操作中应用到的判断依据是平板100获取手写笔200在目标印刷体字符上所画的折线对应的折线覆盖率和目标印刷体字符中单字符折线覆盖率,根据折线覆盖率和目标印刷体字符中单字符折线覆盖率确定该编辑操作是删除操作。例如,如图9所示,假设本申请实施例中,被选中的目标印刷体字符内容为:“目标字”,在当前 xy坐标系下,y方向是指“目标字”从左至右的宽度方向,x方向是指“目标字”从上至下的高度方向。It can be understood that the broken line here is a zigzag connection composed of a plurality of line segments from top to bottom along the character font or formula connected in sequence from end to end. The difference from Embodiment 1 is that the basis for judging in Embodiment 2 in the polyline gesture operation is that the tablet 100 acquires the polyline coverage corresponding to the polyline drawn by the stylus 200 on the target printed character and the target printed character. The single-character polyline coverage rate. According to the polyline coverage rate and the single-character polyline coverage rate in the target printed character, it is determined that the editing operation is a deletion operation. For example, as shown in Figure 9, assume that in the embodiment of the present application, the content of the selected target printed character is: "target word", under the current xy coordinate system, the y direction refers to the "target word" from left to right In the width direction, the x direction refers to the height direction of the "target word" from top to bottom.

例如,“目标字”在y方向最高点的坐标为(0,y11),在y方向最低点的坐标为(0,y12),以及“目标字”在x方向的最右侧的坐标为(x12,0),最左边的坐标为(x11,0)。目标印刷体字符所在的字符区域被定义为:包含坐标(0,y12) 且平行于x轴的直线、包含坐标(0,y11)且平行于x轴的直线、包含坐标(x11,0) 且平行于y轴的直线,以及包含坐标为(x12,0)且平行于y轴的直线围成的区域。For example, the coordinates of the highest point of the "target word" in the y direction are (0, y 11 ), the coordinates of the lowest point in the y direction are (0, y 12 ), and the rightmost coordinates of the "target word" in the x direction is (x 12 , 0), and the leftmost coordinate is (x 11 , 0). The character area where the target print character is located is defined as: a straight line including coordinates (0, y 12 ) and parallel to the x-axis, a straight line including coordinates (0, y 11 ) and parallel to the x-axis, including coordinates (x 11 , 0) and a straight line parallel to the y-axis, and the area surrounded by a line with coordinates (x 12 , 0) and parallel to the y-axis.

然后,计算两者纵坐标差值(y12-y11),并计算两者横坐标差值(x12-x11),之后将纵坐标差值与横坐标差值的乘积作为字符区域1的面积,即“目标字”面积。Then, calculate the difference between the two ordinates (y 12 -y 11 ), and calculate the difference between the two abscissas (x 12 -x 11 ), and then use the product of the difference between the ordinate and the difference between the abscissa as character area 1 The area, that is, the "target word" area.

为了提高删除操作识别的精确度,下面引入手写笔200在目标印刷体字符上所画的折线在字符区域1中的折线覆盖率及其判断规则。In order to improve the accuracy of the deletion operation recognition, the coverage ratio of the fold line drawn by the stylus 200 on the target printed character in the character area 1 and its judgment rules are introduced below.

下面先介绍折线覆盖率的定义,首先,根据字符区域内的折线所有点的坐标集合中,筛选出折线笔势高度方向的最高点坐标、高度方向的最低点坐标、宽度方向最右侧的坐标、宽度方向最左侧的坐标,确定折线所在的轨迹区域。例如,如图4所示,折线在y方向的最低点坐标为(0,y22),在y方向的最高点坐标为 (0,y21),以及“目标字”在x方向的最左侧的坐标为(x21,0),最右侧的坐标为 (x22,0)。折线所在的轨迹区域2被定义为:包含坐标(0,y22)且平行于y轴的直线、包含坐标(0,y21)且平行于y轴的直线、包含坐标(x21,0)且平行于x轴的直线,以及包含坐标为(x22,0)且平行于x轴的直线围成的区域。The following introduces the definition of polyline coverage. First, according to the coordinate set of all points of the polyline in the character area, filter out the coordinates of the highest point in the height direction of the polyline gesture, the lowest point in the height direction, the rightmost coordinate in the width direction, The leftmost coordinate in the width direction, which determines the track area where the polyline is located. For example, as shown in Figure 4, the coordinates of the lowest point of the polyline in the y direction are (0, y 22 ), the coordinates of the highest point in the y direction are (0, y 21 ), and the "target word" is at the far left in the x direction The side coordinates are (x 21 , 0), and the rightmost coordinates are (x 22 , 0). The trajectory area 2 where the polyline is located is defined as: a straight line containing coordinates (0, y 22 ) and parallel to the y-axis, a straight line containing coordinates (0, y 21 ) and parallel to the y-axis, and a straight line containing coordinates (x 21 , 0) and a straight line parallel to the x-axis, and an area enclosed by a straight line with coordinates (x 22 , 0) parallel to the x-axis.

然后,计算出纵坐标差值(y22-y21)与横坐标差值(x22-x21),两者乘积作为折线的覆盖面积。Then, the ordinate difference (y 22 -y 21 ) and the abscissa difference (x 22 -x 21 ) are calculated, and the product of the two is used as the coverage area of the polyline.

折线覆盖面积与“目标字”面积的比值作为面积覆盖率S,定义覆盖率Q为最小面积覆盖率。The ratio of the polyline coverage area to the "target word" area is taken as the area coverage S, and the coverage Q is defined as the minimum area coverage.

如图10所示,在该坐标系下,覆盖率计算方式为:As shown in Figure 10, under this coordinate system, the coverage calculation method is:

Figure RE-GDA0003208634860000151
Figure RE-GDA0003208634860000151

下面再介绍折线覆盖率的判断规则:若折线覆盖率在设定参数区间,即折线笔势类型的面积覆盖率S在面积覆盖率判断区间Q,则确定用户的编辑操作为删除操作。The judgment rule of polyline coverage is introduced below: if the polyline coverage is within the set parameter interval, that is, the area coverage S of the polyline gesture type is within the area coverage judgment interval Q, then the user's editing operation is determined to be a delete operation.

为了降低误删率,还可以判断编辑操作的编辑笔势在每个字符上的覆盖率,若编辑笔势在每个字符上的覆盖率大于设定覆盖率,则确定为编辑笔势所选定的“目标字”符。In order to reduce the mistaken deletion rate, it is also possible to judge the coverage rate of the editing gesture of the editing operation on each character. If the coverage rate of the editing gesture on each character is greater than the set coverage rate, it is determined as the selected " target character".

与上文中提到的折线的单字符横向覆盖率和单字符纵坐标覆盖率的概念相同。It is the same concept as the single-character horizontal coverage and single-character vertical coverage of polylines mentioned above.

图10根据本申请实施例,示出了一种单字符覆盖率的示意图。如图10所示,首先根据上述方法确定“目标字”中每个字符的字符区域,然后确定每个字符区域1中的曲线,如图10所示,根据上述方法确定“目标字”中“字”字符的字符区域1,字符区域1中的曲线的轨迹区域2。Fig. 10 shows a schematic diagram of single character coverage according to an embodiment of the present application. As shown in Figure 10, first determine the character area of each character in the "target word" according to the above method, and then determine the curve in each character area 1, as shown in Figure 10, determine the "target word" in the "target word" according to the above method The character area 1 of the "word" character, and the track area 2 of the curve in character area 1.

单字符横向覆盖率,即“目标字”中每个字符上的曲线笔势轨迹的最右侧坐标和最左侧坐标的横坐标差值(x22-x11)与“目标字”中每个字符上的最右侧坐标和最左侧坐标的横坐标差值(x12-x11)的比率,定义Qx为单字符横坐标覆盖率判断区间。例如,Qx为0.42至1。Horizontal coverage of a single character, that is, the abscissa difference (x 22 -x 11 ) between the rightmost coordinate and the leftmost coordinate of the curve gesture track on each character in the "target word" and each character in the "target word" The ratio of the abscissa difference (x 12 -x 11 ) between the rightmost coordinate and the leftmost coordinate on the character, and Qx is defined as the single-character abscissa coverage judgment interval. For example, Qx is 0.42 to 1.

同理,单字符纵向覆盖率,即单个“目标字”中每个字符的上的曲线笔势轨迹最高点坐标和最低点坐标的纵坐标差值(y12-y11)与“目标字”中每个字符的最高点坐标和最低点坐标的纵坐标差值(y22-y21)比率,定义Qy为单字符纵坐标覆盖率判断区间。例如,Qy为0.35至1。In the same way, the longitudinal coverage of a single character, that is, the vertical coordinate difference (y 12 -y 11 ) of the highest point coordinates and the lowest point coordinates of the curve gesture trajectory on each character in a single "target word" is the same as that in the "target word". The ratio of the ordinate difference (y 22 -y 21 ) between the highest point coordinate and the lowest point coordinate of each character defines Qy as the judgment interval of the ordinate coverage rate of a single character. For example, Qy is 0.35 to 1.

单字符横坐标覆盖率是否在判断区间Qx,即大于或等于判断区间Qx的上限值,小于等于判断区间Qx的下限值,单字符纵坐标覆盖率是在判断区间Qy,即大于或等于判断区间Qy的上限值,小于等于判断区间Qy的下限值,如果S≥Q,即同时满足单字符横坐标覆盖率在判断区间Qx,单字符纵坐标覆盖率在判断区间Qy,则认为符合条件的目标印刷体字符对应的该编辑操作为删除操作。Whether the single-character abscissa coverage is in the judgment interval Qx, that is, greater than or equal to the upper limit of the judgment interval Qx, less than or equal to the lower limit of the judgment interval Qx, and the single-character ordinate coverage is in the judgment interval Qy, that is, greater than or equal to The upper limit value of the judgment interval Qy is less than or equal to the lower limit value of the judgment interval Qy. If S≥Q, that is, the coverage rate of the single character abscissa is in the judgment interval Qx, and the coverage rate of the single character ordinate is in the judgment interval Qy, then it is considered The editing operation corresponding to the target printed character that meets the conditions is a deletion operation.

图11根据本申请的一些实施例,示出了对于中文字符,当用户的删除笔势轨迹为折线时进行识别的方法的流程示意图。如图11所示,该方法包括:Fig. 11 shows a schematic flowchart of a method for recognizing Chinese characters when the trace of the user's delete gesture is a broken line, according to some embodiments of the present application. As shown in Figure 11, the method includes:

步骤1101和步骤1102与实施例一中的步骤801和802的技术手段相同,在此不在赘述。Step 1101 and step 1102 have the same technical means as steps 801 and 802 in Embodiment 1, and will not be repeated here.

步骤1103:在识别出手写笔700对所选中的目标印刷体字符的编辑操作的笔势类型为折线类笔势的情况下,则获取手写笔700在目标印刷体字符上所画的折线在目标印刷体字符所在的字符区域的折线覆盖率。Step 1103: When it is recognized that the gesture type of the editing operation of the stylus 700 on the selected target printed character is a folded line gesture, then obtain the fold line drawn by the stylus 700 on the target printed character in the target printed character. The polyline coverage of the character area where the character is located.

步骤1104:判断获取的折线覆盖率是否在设定参数区间。若否,则转至步骤1105。若是,则转至步骤1106。Step 1104: Determine whether the obtained polyline coverage is within the set parameter range. If not, go to step 1105. If yes, go to step 1106.

步骤1105:无法确定该编辑操作的类型,向用户显示再次进行编辑操作的提示信息。Step 1105: The type of the editing operation cannot be determined, and a prompt message to perform the editing operation again is displayed to the user.

可以理解,在一些实施例中,平板110在无法确定该编辑操作的类型的情况下,会显示用户再次进行编辑操作的提示信息。在用户再次执行该编辑操作后,平板110再次执行步骤1101至步骤1104。It can be understood that, in some embodiments, if the type of the editing operation cannot be determined, the tablet 110 will display a prompt message for the user to perform the editing operation again. After the user performs the editing operation again, the tablet 110 performs steps 1101 to 1104 again.

步骤1106至步骤1109与实施例一中的步骤306和309的技术手段相同,在此不在赘述。Steps 1106 to 1109 have the same technical means as steps 306 and 309 in Embodiment 1, and will not be repeated here.

如此,降低由于折线在与用户所想要删除的文字符相邻的字符的覆盖率不在预设区间,则不会误将与用户所想要删除的相邻的文字符删除,提高用户体检。In this way, since the coverage rate of the broken line in the character adjacent to the character that the user wants to delete is not within the preset range, the character adjacent to the character that the user wants to delete will not be deleted by mistake, which improves the user experience.

此外,在其他实施例中,为了降低误删率,在执行步骤1102之后,可以直接判断编辑操作所选中的目标字符中编辑笔势在每个字符上的横纵方向的覆盖率,若所选中的目标字符中编辑笔势在每个字符上的覆盖率在设定覆盖率区间,则确定为编辑笔势所选定的目标字符。In addition, in other embodiments, in order to reduce the rate of mistaken deletion, after step 1102 is executed, the horizontal and vertical coverage of the editing gestures on each character in the target character selected by the editing operation can be directly judged, if the selected If the coverage rate of the editing gesture on each character in the target character is within the set coverage range, then it is determined as the target character selected by the editing gesture.

实施例三Embodiment Three

可以将用户在转化后的印刷体字符上画设定的线条轨迹,例如,横线、斜线,使设定的线条轨迹与印刷体字符重叠,设定为删除操作。下面将横线和斜线统称为直线,说明删除操作的判断方法。The user may draw a set line track on the converted printed character, for example, a horizontal line or an oblique line, so that the set line track overlaps the printed character, which is set as a delete operation. In the following, the horizontal line and the oblique line are collectively referred to as a straight line, and the method for judging the deletion operation will be described.

可以理解,若直线的倾斜角度趋于90度的时候,则是延印刷体字符高度方向竖线,而不是删除笔势。因此,可以先判断直线的倾角是否在直线区间内,在一定程度上,排出趋向竖线的情况。It can be understood that if the inclination angle of the straight line tends to 90 degrees, it is to extend the vertical line in the height direction of the printed character instead of deleting the gesture. Therefore, it can be judged first whether the inclination angle of the straight line is within the straight line interval, and to a certain extent, the case of tending to the vertical line can be ruled out.

例如,图12根据本申请的一些实施例,示出了一种在“目标字”上画直线以及直线倾角参数区间的示意图,如图12所示,假设本申请实施例中,被选中的目标印刷体字符内容为:“目标字”,在当前xy坐标系下,y方向是指“目标字”从左至右的宽度方向,x方向是指“目标字”从上至下的高度方向。For example, according to some embodiments of the present application, Fig. 12 shows a schematic diagram of drawing a straight line on the "target character" and the parameter range of the inclination angle of the line. As shown in Fig. 12, it is assumed that in the embodiment of the present application, the selected target The content of the printed characters is: "target word". Under the current xy coordinate system, the y direction refers to the width direction of the "target word" from left to right, and the x direction refers to the height direction of the "target word" from top to bottom.

根据上述描述确定“目标字”的字符区域1。然后确定直线在字符区域1中两端的坐标(x3,y3)和(x4,y4),计算出纵坐标差值(y4-y3)与横坐标差值 (x4-x3),然后计算纵坐标差值(y4-y3)与横坐标差值(x4-x3)的比值,然后根据该比值的反正切值,确定直线在字符区域1的倾斜角度。y表示,x表示。直线倾角采用的区间范围Y可以为-45度至45度、-50度至50度、-55度至55 度或者-75度至75度等。Determine the character area 1 of the "target word" according to the above description. Then determine the coordinates (x 3 , y 3 ) and (x 4 , y 4 ) of the two ends of the straight line in the character area 1, and calculate the ordinate difference (y 4 -y 3 ) and the abscissa difference (x 4 -x 3 ), then calculate the ratio of the ordinate difference (y 4 -y 3 ) to the abscissa difference (x 4 -x 3 ), and then determine the inclination angle of the straight line in the character area 1 according to the arc tangent of the ratio. y means, x means. The range Y used for the inclination of the line may be -45° to 45°, -50° to 50°, -55° to 55°, or -75° to 75°, etc.

下面再介绍直线覆盖率的定义:The following describes the definition of straight line coverage:

图13根据本申请的一些实施例,示出了一种在“目标字”上画直线以及直线覆盖率的示意图,如图13所示,假设本申请实施例中,被选中的目标印刷体字符内容为:“目标字”,在当前xy坐标系下,x方向是指“目标字”从左至右的宽度方向,y方向是指“目标字”从上至下的高度方向。D方向为直线所在的方向,F为直线笔势轨迹的法线方向,如图13所示,直线在字符区域1中两端点的坐标(x3,y3)和(x4,y4),“目标字”在y方向的最高点坐标为(x5,y5),在y方向的最低点坐标为(x6,y6)。“目标字”在x方向的最左侧的坐标为(x7,y7),在x方向的最右侧的坐标为(x8,y8)。Figure 13, according to some embodiments of the present application, shows a schematic diagram of drawing a straight line on the "target word" and the coverage of the straight line, as shown in Figure 13, assuming that in the embodiment of the present application, the selected target printed character The content is: "target character", under the current xy coordinate system, the x direction refers to the width direction of the "target character" from left to right, and the y direction refers to the height direction of the "target character" from top to bottom. D direction is the direction of the straight line, F is the normal direction of the gesture trajectory of the straight line, as shown in Figure 13, the coordinates (x 3 , y 3 ) and (x 4 , y 4 ) of the two ends of the straight line in the character area 1, The coordinates of the highest point of the "target word" in the y direction are (x 5 , y 5 ), and the coordinates of the lowest point in the y direction are (x 6 , y 6 ). The leftmost coordinate of the "target word" in the x direction is (x 7 , y 7 ), and the rightmost coordinate in the x direction is (x 8 , y 8 ).

“目标字”所在的字符区域3被定义为:包含坐标(x5,y5)且平行于D方向的直线,包含坐标(x6,y6)且平行于D方向的直线,包含坐标(x7,y7)且平行于 F方向的直线,包含坐标(x8,y8)且平行于F方向的直线围成的矩形区域。The character area 3 where the "target word" is located is defined as: a straight line including coordinates (x 5 , y 5 ) parallel to the D direction, a straight line including coordinates (x 6 , y 6 ) and parallel to the D direction, including the coordinates ( x 7 , y 7 ) and a straight line parallel to the F direction, including the rectangular area enclosed by the coordinates (x 8 , y 8 ) and parallel to the F direction.

直线所在的字符区域4被定义为:包含坐标(x5,y5)且平行于D方向的直线,包含坐标(x6,y6)且平行于D方向的直线,包含坐标(x3,y3)且平行于F方向的直线,包含坐标(x4,y4)且平行于F方向的直线围成的矩形区域。The character area 4 where the straight line is located is defined as: a straight line including the coordinates (x 5 , y 5 ) parallel to the D direction, a straight line including the coordinates (x 6 , y 6 ) and parallel to the D direction, including the coordinates (x 3 , y 3 ) and parallel to the F direction, including the rectangular area enclosed by the coordinates (x 4 , y 4 ) and parallel to the F direction.

字符区域4的面积和字符区域3的面积的比值作为面积覆盖率J。面积覆盖率的判断区间为K,在面积覆盖率J在判断区间K,则判断该编辑操作为删除操作。The ratio of the area of the character area 4 to the area of the character area 3 is taken as the area coverage J. The judgment interval of the area coverage ratio is K, and if the area coverage ratio J is in the judgment interval K, it is judged that the editing operation is a deletion operation.

同理,直线、直线的单字符覆盖率的定义与上述曲线和折线相同,单字符横向覆盖率是指编辑操作在每个字符上的曲线的最大、最小横坐标差值与每个字符上的最大、最小横坐标差值的比率。单字符纵向覆盖是指每个字符的上的曲线最大、最小纵坐标差值与每个字符的最大、最小纵坐标差值比率。判断规则也与上述相同。在此不在赘述。Similarly, the definition of single-character coverage of straight lines and straight lines is the same as that of the above-mentioned curves and polylines. Single-character horizontal coverage refers to the difference between the maximum and minimum abscissa difference of the curve on each character and the The ratio of the maximum and minimum abscissa difference. The vertical coverage of a single character refers to the ratio of the maximum and minimum ordinate difference of each character on the curve to the maximum and minimum ordinate difference of each character. The judgment rule is also the same as above. I won't go into details here.

图14根据本申请的一些实施例,示出了对于中文字符,当用户的删除笔势轨迹为直线时进行识别的方法的流程示意图。如图14所示,该方法包括:Fig. 14 shows a schematic flowchart of a method for recognizing Chinese characters when the trace of the user's delete gesture is a straight line, according to some embodiments of the present application. As shown in Figure 14, the method includes:

步骤1401和步骤1402与实施例二中的步骤701和步骤702技术手段相同,在此不再赘述。The technical means of step 1401 and step 1402 are the same as those of step 701 and step 702 in the second embodiment, and will not be repeated here.

步骤1403:在识别出手写笔200对所选中的目标印刷体字符的编辑操作的笔势类型为直线类笔势的情况下,获取手写笔200在目标印刷体字符上所画的直线在目标印刷体字符所在的字符区域与印书体字符左右水平方向的倾斜角。Step 1403: When it is recognized that the gesture type of the editing operation of the stylus 200 on the selected target printed character is a straight line gesture, obtain the straight line drawn by the stylus 200 on the target printed character. The inclination angle between the character area where it is located and the left and right horizontal direction of the printed characters.

步骤1404:判断获取的倾斜角是否在预设倾斜角区间。若否,则转至步骤 1405。若是,则转至步骤1406。Step 1404: Determine whether the acquired inclination angle is within a preset inclination angle interval. If not, go to step 1405. If yes, go to step 1406.

当判断为是直线时,调出对应的直线倾角参数区间,如果识别结果在参数区间内,则判定本次的编辑操作为删除操作,否则操作失败,笔势线型消失,用户可重新进行操作。When it is judged to be a straight line, call out the corresponding straight line inclination parameter range. If the recognition result is within the parameter range, it is judged that the current editing operation is a deletion operation. Otherwise, the operation fails, the gesture line disappears, and the user can perform the operation again.

步骤1406:获取手写笔200在目标印刷体字符上所画的直线在目标印刷体字符所在的字符区域的直线覆盖率;Step 1406: Obtain the straight line coverage rate of the straight line drawn by the stylus 200 on the target printed character in the character area where the target printed character is located;

1407:判断获取的直线覆盖率是否在设定参数区间,若是,则转至步骤1408,若否,则转至步骤1405。1407: Determine whether the acquired straight line coverage is within the set parameter interval, if yes, go to step 1408, if not, go to step 1405.

步骤1408至步骤1410与实施例一中的步骤706和709的技术手段相同,在此不在赘述。Steps 1408 to 1410 have the same technical means as steps 706 and 709 in Embodiment 1, and will not be repeated here.

实施例四Embodiment Four

与实施例一不同的是,由于中文的字符中的字之间无间距,而英文的字符中的字(词)之间存在间距,英文设定参数区间的上限值小于等于中文设定参数区间的上限值。Different from Embodiment 1, since there is no space between the words in the Chinese characters, but there is a space between the words (words) in the English characters, the upper limit of the English setting parameter interval is less than or equal to the Chinese setting parameter The upper limit of the interval.

图15根据本申请的一些实施例,示出了一种手写笔编辑笔势识别方法的流程示意图。如图15所示,该方法包括:Fig. 15 shows a schematic flowchart of a method for recognizing editing gestures with a stylus according to some embodiments of the present application. As shown in Figure 15, the method includes:

步骤1501至步骤1509与步骤701至步骤709的技术手段相同,只是与实施例一种步骤304的设定参数区间的取值范围不一样,即如果识别为书写语言为英文,则上述各个参数区间根据英文的字符体大小和间距,选择对应的差异化区间范围进行操作判断。Steps 1501 to 1509 have the same technical means as steps 701 to 709, except that the value range of the set parameter interval in step 304 of the embodiment is different, that is, if it is recognized that the written language is English, each of the above parameter intervals According to the font size and spacing of English characters, select the corresponding differentiated interval range for operation judgment.

同理,可以理解,手写笔200在英文字符中的部分字符上画折线、直线、斜线的判断方式与手写笔200在中文字符的部分字符上画折线、直线、斜线的判断方式相同,可参见实施例二和实施例三中的技术手段。只是英文设定参数区间的上限值小于等于中文设定参数区间的上限值。例如,如图6所示,在中文和英文为同样字号等间距的情况下,确定英文单个字的宽度值,和中文单个字的宽度值与单个字的宽度值之和的比值1,确定中文单个字的宽度值,和中文单个字的宽度值与单个字的宽度值之和的比值2,比值1和比值2之间相除得到比值3,比值3乘以中文的下限值得到英文的下限值。Similarly, it can be understood that the judging method of the stylus 200 for drawing broken lines, straight lines, and oblique lines on some characters in English characters is the same as that of the stylus 200 for drawing broken lines, straight lines, and oblique lines on some characters of Chinese characters. Refer to the technical means in Embodiment 2 and Embodiment 3. It is just that the upper limit value of the English setting parameter interval is less than or equal to the upper limit value of the Chinese setting parameter interval. For example, as shown in Figure 6, in the case of Chinese and English being the same font size and equal spacing, determine the width value of a single English word, and the ratio of the width value of a single Chinese word to the sum of the width values of a single word 1, determine the Chinese The width value of a single character, and the ratio 2 of the width value of a single Chinese character to the sum of the width values of a single character, the ratio 1 and the ratio 2 are divided to obtain a ratio 3, and the ratio 3 is multiplied by the lower limit value of Chinese to obtain the lower limit of English limit.

表1示例性的说明中英文各个参数类型对应的设定参数区间:Table 1 exemplifies the setting parameter intervals corresponding to each parameter type in Chinese and English:

Figure RE-GDA0003208634860000181
Figure RE-GDA0003208634860000181

Figure RE-GDA0003208634860000191
Figure RE-GDA0003208634860000191

图16根据本申请的实施例示出了图1所示的电子设备100的一种可能的结构框图。该电子设备100能够执行本申请实施例提供的手写笔编辑笔势识别方法。具体地,如图16所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器111,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。FIG. 16 shows a possible structural block diagram of the electronic device 100 shown in FIG. 1 according to an embodiment of the present application. The electronic device 100 can execute the method for recognizing a stylus editing gesture provided by the embodiment of the present application. Specifically, as shown in FIG. 16 , the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 111, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, and a power management module 141 , battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192 , a camera 193, a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.

可以理解的是,本申请的实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.

处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字符信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU) 等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor ( image signal processor (ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.

控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.

处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.

在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频 (inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output, GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or A universal serial bus (universal serial bus, USB) interface, etc.

MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。 MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(displayserial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . The MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (displayserial interface, DSI), and the like. In some embodiments, the processor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device 100 .

USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。The USB interface 130 is an interface conforming to the USB standard specification, specifically, it may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.

可以理解的是,本申请的实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.

充电管理模块140用于从充电器接收充电输入。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/ 或充电管理模块140的输入,为处理器110,内部存储器111,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。The charging management module 140 is configured to receive a charging input from a charger. The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 111 , the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).

电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.

天线1和天线2用于发射和接收电磁波信号。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.

移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150 的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.

调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Wherein, the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is passed to the application processor after being processed by the baseband processor. The application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In some other embodiments, the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.

无线通信模块160可以提供应用在电子设备100上的包括无线局域网 (wirelesslocal area networks,WLAN)(如Wi-Fi网络),蓝牙(bluetooth, BT),全球导航卫星系统(global navigation satellite system,GNSS),调频 (frequency modulation,FM),近距离无线通信技术(near field communication, NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2 接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器 110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。本申请实施例中,电子设备100可以通过无线通信模块160中的蓝牙(bluetooth,BT)与手写笔200建立通信连接关系。The wireless communication module 160 can provide wireless local area network (wireless local area networks, WLAN) (such as Wi-Fi network), Bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS) applied on the electronic device 100. , frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation. In the embodiment of the present application, the electronic device 100 can establish a communication connection with the stylus 200 through Bluetooth (BT) in the wireless communication module 160 .

在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2 和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(codedivision multiple access,CDMA),宽带码分多址(wideband code division multipleaccess,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述 GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidounavigation satellite system,BDS),准天顶卫星系统 (quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (codedivision multiple access, CDMA), wideband code Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou satellite navigation system (beidounavigation satellite system, BDS), a quasi-zenith satellite system (quasi- zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).

电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU 为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light emitting diode). AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.

电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194 以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.

外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110 通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.

内部存储器111可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器111可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器111可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器111的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备 100的各种功能应用以及数据处理。内部存储器111可以用于存储应用程序对应的Overlay配置文件。The internal memory 111 may be used to store computer-executable program codes including instructions. The internal memory 111 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like. The storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like. In addition, the internal memory 111 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 111 and/or instructions stored in a memory provided in the processor. The internal memory 111 can be used to store the Overlay configuration file corresponding to the application program.

电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风 170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.

音频模块170用于将数字符音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字符音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块 170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be set in the processor 110, or some functional modules of the audio module 170 can be set in the processor 110.

触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏 194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控显示屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。本申请实施例中,电子设备100可以通过触摸传感器180K接收手写笔200与电子设备100的触控显示屏接触发射的信号,从而得知手写笔200在触控显示屏上的坐标,电子设备100 根据手写笔200在触控显示屏上走过的轨迹对应的坐标数据判断手该用户操作是否为删除操作,若是,则删除被画线的字符。The touch sensor 180K is also called "touch device". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 . In the embodiment of the present application, the electronic device 100 can receive the signal transmitted by the stylus 200 in contact with the touch display screen of the electronic device 100 through the touch sensor 180K, so as to know the coordinates of the stylus 200 on the touch display screen, and the electronic device 100 According to the coordinate data corresponding to the trajectory of the stylus 200 on the touch display screen, it is judged whether the user operation of the hand is a deletion operation, and if so, the character drawn by the line is deleted.

按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power key, a volume key and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .

马达191可以产生振动提示。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。The motor 191 can generate a vibrating reminder. The indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like. The SIM card interface 195 is used for connecting a SIM card.

本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The essence of the technical solution of the embodiment of the present application or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions It is used to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods in the various embodiments of the present application. The above-mentioned storage medium includes: U disk, mobile hard disk, read only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk, and other various media that can store program codes.

虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。Although this application has been shown and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and details may be made therein without departing from this disclosure. The spirit and scope of the application.

Claims (16)

1.一种手写笔编辑笔势识别方法,应用于电子设备,其特征在于,所述方法包括:1. A stylus editing gesture recognition method, applied to electronic equipment, is characterized in that the method comprises: 所述电子设备在检测到用户利用手写笔在所述电子设备的屏幕上所产生的笔势轨迹,与所述屏幕上显示的字符产生重叠的情况下,确定重叠的所述字符的第一字符区域和笔势轨迹;When the electronic device detects that the gesture trajectory generated by the user using the stylus on the screen of the electronic device overlaps with the characters displayed on the screen, determine the overlapping first character area of the character and gesture trajectory; 所述电子设备确定所述笔势轨迹与所述第一字符区域之间的重叠关系是否满足第一预定条件;The electronic device determines whether the overlapping relationship between the gesture track and the first character area satisfies a first predetermined condition; 在满足第一预定条件的情况下,所述电子设备确定所述笔势轨迹对应的编辑操作为删除操作,并删除重叠的所述字符。If the first predetermined condition is satisfied, the electronic device determines that the editing operation corresponding to the gesture track is a deletion operation, and deletes the overlapping characters. 2.根据权利要求1所述的方法,其特征在于,所述第一字符区域为分别包含重叠的所有所述字符高度方向的最高点坐标和最低点坐标且平行于宽度方向的两条直线,以及分别包含所述字符宽度方向的最左侧坐标和最右侧坐标且平行于高度方向的两条直线,围成的矩形区域。2. The method according to claim 1, wherein the first character area is two straight lines that respectively include the highest point coordinates and the lowest point coordinates of all overlapping characters in the height direction and are parallel to the width direction, And a rectangular area surrounded by two straight lines that respectively include the leftmost coordinate and the rightmost coordinate in the width direction of the character and are parallel to the height direction. 3.根据权利要求2所述的方法,其特征在于,所述电子设备确定所述笔势轨迹与所述第一字符区域之间的重叠关系是否满足第一预定条件,包括:3. The method according to claim 2, wherein the electronic device determines whether the overlapping relationship between the gesture trajectory and the first character area satisfies a first predetermined condition, comprising: 在所述笔势轨迹类型为曲线类型的情况下,所述电子设备确定所述笔势轨迹的第一轨迹区域的面积和所述第一字符区域的面积的第一比值;其中,所述第一轨迹区域为分别包含所述第一字符区域中笔势轨迹的字符高度方向的最高点坐标和最低点坐标且平行于宽度方向的两条直线,以及分别包含字符宽度方向的最左侧坐标和最右侧坐标且平行于高度方向的两条直线,围成的矩形区域;In the case where the gesture trajectory type is a curve type, the electronic device determines a first ratio of the area of the first trajectory region of the gesture trajectory to the area of the first character region; wherein, the first trajectory The areas are two straight lines that respectively contain the highest point coordinates and the lowest point coordinates of the character height direction of the gesture track in the first character area and are parallel to the width direction, and respectively contain the leftmost coordinates and the rightmost coordinates of the character width direction The rectangular area surrounded by two straight lines parallel to the height direction; 所述电子设备在判断出所述第一比值在第一参数区间的情况下,确定满足第一预定条件。The electronic device determines that the first predetermined condition is met when it is determined that the first ratio is within the first parameter interval. 4.根据权利要求2所述的方法,其特征在于,所述电子设备确定所述笔势轨迹与所述第一字符区域之间的重叠关系是否满足第一预定条件,包括:4. The method according to claim 2, wherein the electronic device determines whether the overlapping relationship between the gesture trajectory and the first character area satisfies a first predetermined condition, comprising: 在所述笔势轨迹类型为直线类型的情况下,所述电子设备获取直线笔势轨迹与所述第一字符区域的字符宽度方向的倾斜角度;In the case where the gesture track type is a straight line type, the electronic device acquires an inclination angle between the straight line gesture track and the character width direction of the first character area; 所述电子设备在判断出所述倾斜角度在第二参数区间的情况下,获取第二轨迹区域的面积和第二字符区域的面积的第三比值;When the electronic device determines that the inclination angle is in the second parameter interval, it obtains a third ratio of the area of the second trajectory area to the area of the second character area; 其中,所述第二字符区域为分别包含所述字符的字符高度方向的最高点坐标和最低点坐标且平行于直线方向的两条直线,以及分别包含字符宽度方向的最左侧坐标和最右侧坐标且平行于直线法线方向的两条直线,围成的矩形区域;Wherein, the second character area is two straight lines that respectively include the highest point coordinate and the lowest point coordinate of the character height direction of the character and are parallel to the straight line direction, and respectively include the leftmost coordinate and the rightmost coordinate in the character width direction. The rectangular area surrounded by two straight lines with side coordinates and parallel to the normal direction of the straight line; 所述第二轨迹区域为所述第一字符区域中笔势轨迹的字符高度方向的最高点坐标和最低点坐标所在的平行于直线方向的两条直线,以及字符宽度方向的最左侧坐标和最右侧坐标所在的平行于直线法线方向的两条直线,围成的矩形区域;The second trajectory area is two straight lines parallel to the straight line direction where the highest point coordinate and the lowest point coordinate of the character height direction of the gesture trajectory in the first character area are located, and the leftmost coordinate and the lowest point coordinate in the character width direction. The rectangular area surrounded by two straight lines parallel to the normal direction of the straight line where the coordinates on the right are located; 所述电子设备在判断出所述第三比值在第三参数区间的情况下,确定满足第一预定条件。The electronic device determines that the first predetermined condition is met when it is determined that the third ratio is in the third parameter interval. 5.根据权利要求2所述的方法,其特征在于,所述电子设备确定所述笔势轨迹与所述第一字符区域之间的重叠关系是否满足第一预定条件,包括:5. The method according to claim 2, wherein the electronic device determines whether the overlapping relationship between the gesture track and the first character area satisfies a first predetermined condition, comprising: 在所述笔势轨迹类型为折线类型的情况下,所述电子设备确定第一轨迹区域的面积和所述第一字符区域的面积的第二比值;其中,所述第一轨迹区域为分别包含所述第一字符区域中笔势轨迹的字符高度方向的最高点坐标和最低点坐标且平行于宽度方向的两条直线,以及分别包含字符宽度方向的最左侧坐标和最右侧坐标且平行于高度方向的两条直线,围成的矩形区域;In the case that the gesture trajectory type is a broken line type, the electronic device determines a second ratio between the area of the first trajectory area and the area of the first character area; wherein, the first trajectory area contains the The coordinates of the highest point and the coordinates of the lowest point in the character height direction of the gesture track in the first character area and two straight lines parallel to the width direction, and the leftmost coordinates and rightmost coordinates in the character width direction respectively and parallel to the height The rectangular area surrounded by two straight lines in the direction; 所述电子设备在判断出所述第二比值在第四参数区间的情况下,确定满足第一预定条件。The electronic device determines that the first predetermined condition is met when it is determined that the second ratio is within the fourth parameter interval. 6.根据权利要求2所述的方法,其特征在于,所述方法包括:6. The method according to claim 2, characterized in that the method comprises: 在所述笔势轨迹类型为曲线类型的情况下,所述电子设备采用快速傅里叶变化获取所述曲线笔势轨迹的正弦波集合;In the case where the gesture trajectory type is a curve type, the electronic device acquires a sine wave set of the curved gesture trajectory by using a fast Fourier transform; 所述电子设备获取所述正弦波集合中按照频率值由大至小排在前的预设条正弦波的频率;The electronic device obtains the frequency of the preset sine waves in the sine wave set according to the frequency value from large to small; 所述电子设备在判断出所述预设条正弦波的频率在第五参数区间的情况下,确定满足第一预定条件。When the electronic device determines that the frequency of the preset sine wave is within the fifth parameter interval, it determines that the first predetermined condition is satisfied. 7.根据权利要求2所述的方法,其特征在于,所述方法包括:7. The method according to claim 2, characterized in that the method comprises: 在所述笔势轨迹类型为曲线类型的情况下,所述电子设备获取所述曲线笔势轨迹在所述第一字符区域的高度方向的最高点坐标和最低点坐标;In the case where the gesture track type is a curve type, the electronic device acquires the highest point coordinates and the lowest point coordinates of the curved gesture track in the height direction of the first character area; 所述电子设备根据所述最高点坐标和最低点坐标确定所述最高点和所述最低点之间的连线与所述高度方向的倾斜角度;The electronic device determines an inclination angle between a line between the highest point and the lowest point and the height direction according to the coordinates of the highest point and the lowest point; 所述电子设备在判断出所述倾斜角度在第六参数区间的情况下,确定满足第一预定条件。When the electronic device determines that the inclination angle is in the sixth parameter interval, it determines that the first predetermined condition is satisfied. 8.根据权利要求1至7任一项所述的方法,其特征在于,所述电子设备判断出重叠的所述字符的数量为多个,并且所述电子设备在确定所述笔势轨迹与所述第一字符区域之间的重叠关系满足第一预定条件的情况下,还判断重叠的所述多个字符中的每个字符上的笔势轨迹与每个字符的单第一字符区域之间的重叠关系是否满足第二预定条件,并在判断出满足所述第二预定条件的情况下,删除满足所述第二预定条件的字符。8. The method according to any one of claims 1 to 7, wherein the electronic device determines that the number of overlapping characters is multiple, and the electronic device determines the gesture trajectory and the When the overlapping relationship between the first character regions satisfies the first predetermined condition, it is also determined whether the gesture track on each of the overlapping characters and the single first character region of each character Whether the overlapping relationship satisfies the second predetermined condition, and if it is judged that the second predetermined condition is satisfied, delete the characters satisfying the second predetermined condition. 9.根据权利要求8述的方法,其特征在于,所述第一字符区域为分别包含单个字符高度方向的最高点坐标和最低点坐标且平行于高度方向的两条直线,以及分别包含单个字符宽度方向的最左侧坐标和最右侧坐标且平行于宽度方向的两条直线,围成的矩形区域。9. The method according to claim 8, wherein the first character area is two straight lines that respectively contain the highest point coordinate and the lowest point coordinate of a single character height direction and are parallel to the height direction, and respectively contain a single character The leftmost coordinate and the rightmost coordinate in the width direction are two straight lines parallel to the width direction, enclosed by a rectangular area. 10.根据权利要求9所述的方法,其特征在于,判断重叠的所述多个字符中的每个字符上的笔势轨迹与每个字符的单第一字符区域之间的重叠关系是否满足第二预定条件,包括:10. The method according to claim 9, wherein judging whether the overlapping relationship between the gesture trajectory on each character in the overlapping characters and the single first character region of each character satisfies the first 2. Predetermined conditions, including: 所述电子设备确定重叠的所述字符中每个字符的宽度值与所述第一字符区域宽度值的宽度比值,以及重叠的所述字符中每个字符的高度值与所述第一字符区域高度值的高度比值,所述电子设备在判断出所述宽度比值在第七参数区间,所述高度比值在第八参数区间的情况下,确定满足第一预定条件。The electronic device determines the width ratio of the width value of each character in the overlapping characters to the width value of the first character area, and the height value of each character in the overlapping characters and the width value of the first character area A height ratio of the height value, the electronic device determines that the first predetermined condition is satisfied when the electronic device determines that the width ratio is in the seventh parameter interval and the height ratio is in the eighth parameter interval. 11.根据权利要求1至10任一项所述的方法,其特征在于,所述电子设备确定所述笔势轨迹与所述第一字符区域之间的重叠关系是否满足预定条件,包括:11. The method according to any one of claims 1 to 10, wherein the electronic device determines whether the overlapping relationship between the gesture track and the first character area satisfies a predetermined condition, comprising: 所述电子设备判断出所述字符是第一语言字符还是第二语言字符;The electronic device determines whether the character is a first language character or a second language character; 所述电子设备在判断出是第一语言字符的情况下,获取所述第一语言字符对应的预定条件,并确定所述笔势轨迹与所述第一字符区域之间的重叠关系是否满足所述第一语言字符对应的预定条件;If the electronic device determines that it is a character in the first language, it acquires a predetermined condition corresponding to the character in the first language, and determines whether the overlapping relationship between the gesture track and the first character area satisfies the a predetermined condition corresponding to the first language character; 所述电子设备在判断出是第二语言字符的情况下,获取所述第二语言字符对应的预定条件,并确定所述笔势轨迹与所述第一字符区域之间的重叠关系是否满足所述第一语言类型对应的预定条件。In the case that the electronic device determines that it is a character in the second language, it acquires a predetermined condition corresponding to the character in the second language, and determines whether the overlapping relationship between the gesture trajectory and the first character area satisfies the The predetermined condition corresponding to the first language type. 12.根据权利要求11所述的方法,其特征在于,所述第一语言包括中文、英文、德文、法文中的任意一种,所述第二语言包括中文、英文、德文、法文中的任意一种。12. The method according to claim 11, wherein the first language includes any one of Chinese, English, German, and French, and the second language includes Chinese, English, German, and French. any of the 13.根据权利要求1至10任一项所述的方法,其特征在于,所述字符为手写体字符转化后的印书体字符。13. The method according to any one of claims 1 to 10, characterized in that the characters are printed characters converted from handwritten characters. 14.根据权利要求1至7任一项所述的方法,其特征在于,所述字符在所述电子设备上的预设应用程序的操作界面显示,所述预设应用程序为备忘录、笔写计算器、Nebo forHuawei、随手写中的任意一种。14. The method according to any one of claims 1 to 7, characterized in that, the characters are displayed on the operation interface of a preset application program on the electronic device, and the preset application program is memo, pen writing, etc. Any one of Calculator, Nebo forHuawei, and Handwriting. 15.一种可读介质,其特征在于,所述可读介质上存储有指令,该指令在电子设备上执行时使电子设备实现权利要求1至14中任一项所述的手写笔编辑笔势识别方法。15. A readable medium, characterized in that instructions are stored on the readable medium, and when the instructions are executed on the electronic device, the electronic device realizes the stylus editing gesture according to any one of claims 1 to 14 recognition methods. 16.一种电子设备,包括:存储器,用于存储由电子设备的一个或多个处理器执行的指令,以及16. An electronic device comprising: a memory for storing instructions to be executed by one or more processors of the electronic device, and 处理器,是所述电子设备的处理器之一,用于执行权利要求1至14中任一项所述的手写笔编辑笔势识别方法。The processor is one of the processors of the electronic device, configured to execute the method for recognizing editing gestures with a stylus according to any one of claims 1-14.
CN202110602320.4A 2021-05-31 2021-05-31 Handwriting pen editing gesture recognition method, medium and electronic device Pending CN115480659A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110602320.4A CN115480659A (en) 2021-05-31 2021-05-31 Handwriting pen editing gesture recognition method, medium and electronic device
PCT/CN2022/085895 WO2022252821A1 (en) 2021-05-31 2022-04-08 Method and medium for recognizing edit handwriting of stylus, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110602320.4A CN115480659A (en) 2021-05-31 2021-05-31 Handwriting pen editing gesture recognition method, medium and electronic device

Publications (1)

Publication Number Publication Date
CN115480659A true CN115480659A (en) 2022-12-16

Family

ID=84323866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110602320.4A Pending CN115480659A (en) 2021-05-31 2021-05-31 Handwriting pen editing gesture recognition method, medium and electronic device

Country Status (2)

Country Link
CN (1) CN115480659A (en)
WO (1) WO2022252821A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118887688A (en) * 2024-06-29 2024-11-01 华为技术有限公司 Handwritten stroke recognition method and electronic device
CN119396303A (en) * 2024-12-31 2025-02-07 南京极域信息科技有限公司 Electromagnetic handwriting system and handwriting deletion method thereof

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116009712A (en) * 2022-12-22 2023-04-25 深圳市鸿合创新信息技术有限责任公司 Handwriting data processing method and device, electronic equipment and storage medium
CN118819325B (en) * 2024-09-18 2024-12-06 紫光摩度教育科技有限公司 Electronic whiteboard writing method, system, readable storage medium and computer

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843546A (en) * 2016-04-06 2016-08-10 深圳市金立通信设备有限公司 Modification method based on handwriting input and terminal
CN107533646A (en) * 2015-04-24 2018-01-02 富士通株式会社 Input processing program, input processing device, input processing method, character determine that program, character determining device and character determine method
CN107533647A (en) * 2015-04-24 2018-01-02 富士通株式会社 Input control program, input control device, input control method, character revision program, character correcting device and character modification method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4244614B2 (en) * 2002-10-31 2009-03-25 株式会社日立製作所 Handwriting input device, program, and handwriting input method system
CN102455869B (en) * 2011-09-29 2014-10-22 北京壹人壹本信息科技有限公司 Method and device for editing characters by using gestures
CN110222584A (en) * 2019-05-14 2019-09-10 深圳传音控股股份有限公司 The recognition methods and equipment of handwriting input

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107533646A (en) * 2015-04-24 2018-01-02 富士通株式会社 Input processing program, input processing device, input processing method, character determine that program, character determining device and character determine method
CN107533647A (en) * 2015-04-24 2018-01-02 富士通株式会社 Input control program, input control device, input control method, character revision program, character correcting device and character modification method
CN105843546A (en) * 2016-04-06 2016-08-10 深圳市金立通信设备有限公司 Modification method based on handwriting input and terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118887688A (en) * 2024-06-29 2024-11-01 华为技术有限公司 Handwritten stroke recognition method and electronic device
CN119396303A (en) * 2024-12-31 2025-02-07 南京极域信息科技有限公司 Electromagnetic handwriting system and handwriting deletion method thereof

Also Published As

Publication number Publication date
WO2022252821A1 (en) 2022-12-08

Similar Documents

Publication Publication Date Title
WO2022252821A1 (en) Method and medium for recognizing edit handwriting of stylus, and electronic device
US11074117B2 (en) Copying and pasting method, data processing apparatus, and user equipment
KR102544780B1 (en) Method for controlling user interface according to handwriting input and electronic device for the same
JP5784141B2 (en) Handwriting input method by superimposed writing
US10796133B2 (en) Image processing method and apparatus, and electronic device
US8943092B2 (en) Digital ink based contextual search
US20160132232A1 (en) Electronic device and method for processing handwritten document data
EP2937813A2 (en) Method of processing content and electronic device using the same
US20140337804A1 (en) Symbol-based digital ink analysis
CN107885430A (en) A kind of audio frequency playing method, device, storage medium and electronic equipment
WO2019105457A1 (en) Image processing method, computer device and computer readable storage medium
US9025878B2 (en) Electronic apparatus and handwritten document processing method
US20150347000A1 (en) Electronic device and handwriting-data processing method
US20170255284A1 (en) Method and apparatus for operating mobile terminal
EP2990921A1 (en) Electronic device and method for providing drawing function thereof
CN111383298A (en) Method and device for converting mind map
US20160139802A1 (en) Electronic device and method for processing handwritten document data
CN105446523A (en) Method and apparatus for inputting object in electronic device
CN105653711A (en) A search method and device for a terminal application
US20230135661A1 (en) Image processing method and apparatus for smart pen, and electronic device
US11853483B2 (en) Image processing method and apparatus for smart pen including pressure switches, and electronic device
WO2021218365A1 (en) Annotation method and electronic device
CN107656727A (en) A kind of font object library generating method and mobile terminal
US9927971B2 (en) Electronic apparatus, method and storage medium for generating chart object
CN113641292B (en) Method and electronic equipment for operating on touch screen

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination