CN117539377A - Screen handwriting input method and device, computer equipment and storage medium - Google Patents
Screen handwriting input method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN117539377A CN117539377A CN202311727830.XA CN202311727830A CN117539377A CN 117539377 A CN117539377 A CN 117539377A CN 202311727830 A CN202311727830 A CN 202311727830A CN 117539377 A CN117539377 A CN 117539377A
- Authority
- CN
- China
- Prior art keywords
- coordinate information
- stroke
- test
- scaling
- standard
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000012360 testing method Methods 0.000 claims abstract description 202
- 238000004590 computer program Methods 0.000 claims description 21
- 230000000875 corresponding effect Effects 0.000 description 25
- 238000010586 diagram Methods 0.000 description 12
- 238000013515 script Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 5
- 230000008901 benefit Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000012905 input function Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04883—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/1444—Selective acquisition, locating or processing of specific regions, e.g. highlighted text, fiducial marks or predetermined fields
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/16—Image preprocessing
- G06V30/166—Normalisation of pattern dimensions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/22—Character recognition characterised by the type of writing
- G06V30/226—Character recognition characterised by the type of writing of cursive writing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Character Discrimination (AREA)
Abstract
The application relates to a screen handwriting input method, a screen handwriting input device, computer equipment and a storage medium. The method comprises the following steps: acquiring first coordinate information of each stroke of the test text in the test text, wherein the first coordinate information is used for representing coordinate information in a standard area; scaling the first coordinate information of each stroke of the test text according to the size information of the handwriting area of the test equipment and the size information of the standard area to obtain second coordinate information of each stroke of the test text, wherein the second coordinate information is used for representing the coordinate information in the handwriting area; and based on the second coordinate information of each stroke of the test text, inputting the corresponding handwritten text of the test text in the handwriting area. By adopting the method, the test efficiency can be improved.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and apparatus for screen handwriting input, a computer device, and a storage medium.
Background
The automatic test of the User Interface (UI) of the mobile terminal is a process for automatically testing the functions of the application of the mobile terminal by writing a test script or a test case and applying the application of the mobile terminal (such as a mobile phone or a tablet and the like) and simulating the manual operation process of a person. Because the functions of part of mobile terminal applications have strong interactivity, and the mobile equipment has numerous models and various parameters, how to efficiently simulate user operation and use different mobile equipment so as to verify various functions of the mobile terminal applications is a constant difficult problem in the mobile terminal UI automation test.
Screen handwriting entry is a user operation of a scene. The screen handwriting input means that a user performs handwriting operation in a designated area of the screen. In the conventional technology, a writing track is usually solidified in a test script according to a text which is required to be handwritten and input, so that automatic test of screen handwriting and input is performed.
However, the current way of solidifying writing tracks in the test script results in poor universality of the test script, and different test scripts are often required to be written according to actual requirements, so that the test efficiency is low. For example, different test scripts need to be written for different types of mobile devices, and different test scripts need to be written for different pages of the same mobile terminal application.
Disclosure of Invention
Based on the foregoing, it is necessary to provide a screen handwriting input method, device, computer equipment and storage medium capable of improving test efficiency.
In a first aspect, the present application provides a method for screen handwriting input, the method comprising:
acquiring first coordinate information of each stroke of the test text in the test text, wherein the first coordinate information is used for representing coordinate information in a standard area;
scaling the first coordinate information of each stroke of the test text according to the size information of the handwriting area of the test equipment and the size information of the standard area to obtain second coordinate information of each stroke of the test text, wherein the second coordinate information is used for representing the coordinate information in the handwriting area;
and based on the second coordinate information of each stroke of the test text, inputting the corresponding handwritten text of the test text in the handwriting area.
In one possible implementation manner, the obtaining the first coordinate information of each stroke of the test text includes:
searching standard characters corresponding to the test characters in a preset character library, wherein the preset character library comprises a plurality of standard characters and first coordinate information of each stroke of each standard character;
And determining the first coordinate information of each stroke of the standard text corresponding to the test text as the first coordinate information of each stroke of the test text.
In one possible implementation, the method further includes:
displaying the standard area on a touch screen;
for each standard character to be stored, responding to writing operation on the standard area, and recording coordinate information of each stroke of the writing operation as first coordinate information of each stroke of the standard character;
and storing the standard characters and the first coordinate information of each stroke of each standard character into the preset character library.
In one possible implementation manner, the scaling the first coordinate information of each stroke of the test text according to the size information of the handwriting area of the test device and the size information of the standard area to obtain the second coordinate information of each stroke of the test text includes:
determining a horizontal scaling and a vertical scaling according to the size information of the handwriting area of the test equipment and the size information of the standard area;
scaling the first abscissa by adopting the transverse scaling to obtain a second abscissa, wherein the first abscissa represents the abscissa in the first coordinate information, and the second abscissa represents the abscissa in the second coordinate information;
And scaling the first ordinate by adopting the longitudinal scaling to obtain a second ordinate, wherein the first ordinate represents the ordinate in the first coordinate information, and the second ordinate represents the ordinate in the second coordinate information.
In one possible implementation manner, the scaling the second coordinate information of each stroke of the test text according to the size information of the handwriting area of the test device and the size information of the standard area to obtain the second coordinate information of each stroke of the test text includes:
determining a horizontal scaling and a vertical scaling according to the size information of the handwriting area of the test equipment and the size information of the standard area;
determining the horizontal scaling or the vertical scaling as a region scaling;
and scaling the first abscissa and the first ordinate by adopting the area scaling ratio to obtain a second abscissa and a second ordinate respectively, wherein the first abscissa and the first ordinate represent the abscissa and the ordinate in the first coordinate information, and the second abscissa and the second ordinate represent the abscissa and the ordinate in the second coordinate information.
In one possible implementation, the stroke includes a straight line segment, and the first coordinate information of the stroke includes a start point coordinate and an end point coordinate of the straight line segment.
In a second aspect, the present application further provides a screen handwriting input device, including:
the acquisition module is used for acquiring first coordinate information of each stroke of the test text in the test text, wherein the first coordinate information is used for representing the coordinate information in the standard area;
the scaling module is used for scaling the first coordinate information of each stroke of the test text according to the size information of the handwriting area of the test text and the size information of the standard area to obtain second coordinate information of each stroke of the test text, wherein the second coordinate information is used for representing the coordinate information in the handwriting area;
and the input module is used for inputting the corresponding handwritten characters of the test characters in the handwriting area based on the second coordinate information of each stroke of the test characters.
In one possible implementation, the obtaining module is further configured to:
searching standard characters corresponding to the test characters in a preset character library, wherein the preset character library comprises a plurality of standard characters and first coordinate information of each stroke of each standard character;
And determining the first coordinate information of each stroke of the standard text corresponding to the test text as the first coordinate information of each stroke of the test text.
In one possible implementation, the apparatus further includes:
the display module is used for displaying the standard area on the touch screen;
the recording module is used for responding to the writing operation on the standard area for each standard character to be stored, and recording the coordinate information of each stroke of the writing operation as the first coordinate information of each stroke of the standard character;
and the storage module is used for storing the standard characters and the first coordinate information of each stroke of each standard character into the preset character library.
In one possible implementation, the scaling module is further configured to:
determining a horizontal scaling and a vertical scaling according to the size information of the handwriting area of the test equipment and the size information of the standard area;
scaling the first abscissa by adopting the transverse scaling to obtain a second abscissa, wherein the first abscissa represents the abscissa in the first coordinate information, and the second abscissa represents the abscissa in the second coordinate information;
And scaling the first ordinate by adopting the longitudinal scaling to obtain a second ordinate, wherein the first ordinate represents the ordinate in the first coordinate information, and the second ordinate represents the ordinate in the second coordinate information.
In one possible implementation, the scaling module is further configured to:
determining a horizontal scaling and a vertical scaling according to the size information of the handwriting area of the test equipment and the size information of the standard area;
determining the horizontal scaling or the vertical scaling as a region scaling;
and scaling the first abscissa and the first ordinate by adopting the area scaling ratio to obtain a second abscissa and a second ordinate respectively, wherein the first abscissa and the first ordinate represent the abscissa and the ordinate in the first coordinate information, and the second abscissa and the second ordinate represent the abscissa and the ordinate in the second coordinate information.
In one possible implementation, the stroke includes a straight line segment, and the first coordinate information of the stroke includes a start point coordinate and an end point coordinate of the straight line segment.
In a third aspect, the present application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
Acquiring first coordinate information of each stroke of the test text in the test text, wherein the first coordinate information is used for representing coordinate information in a standard area;
scaling the first coordinate information of each stroke of the test text according to the size information of the handwriting area of the test equipment and the size information of the standard area to obtain second coordinate information of each stroke of the test text, wherein the second coordinate information is used for representing the coordinate information in the handwriting area;
and based on the second coordinate information of each stroke of the test text, inputting the corresponding handwritten text of the test text in the handwriting area.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring first coordinate information of each stroke of the test text in the test text, wherein the first coordinate information is used for representing coordinate information in a standard area;
scaling the first coordinate information of each stroke of the test text according to the size information of the handwriting area of the test equipment and the size information of the standard area to obtain second coordinate information of each stroke of the test text, wherein the second coordinate information is used for representing the coordinate information in the handwriting area;
And based on the second coordinate information of each stroke of the test text, inputting the corresponding handwritten text of the test text in the handwriting area.
In a fifth aspect, the present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
acquiring first coordinate information of each stroke of the test text in the test text, wherein the first coordinate information is used for representing coordinate information in a standard area;
scaling the first coordinate information of each stroke of the test text according to the size information of the handwriting area of the test equipment and the size information of the standard area to obtain second coordinate information of each stroke of the test text, wherein the second coordinate information is used for representing the coordinate information in the handwriting area;
and based on the second coordinate information of each stroke of the test text, inputting the corresponding handwritten text of the test text in the handwriting area.
According to the screen handwriting input method, the device, the testing equipment and the storage medium, the coordinate information of each stroke of the test text in the standard area is scaled according to the size information of the handwriting area and the standard area, and the coordinate information of each stroke of the test text in the handwriting area is obtained; and then, according to the coordinate information obtained after scaling, inputting the corresponding handwritten characters of the test characters in the handwritten region. Therefore, handwriting character input can be completed in writing areas with different sizes in a self-adaptive mode, the acquisition speed of the test script is improved, and therefore the test efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for a person having ordinary skill in the art.
FIG. 1 is an application environment diagram of a screen handwriting input method in one embodiment;
FIG. 2 is a flow diagram of a method of screen handwriting input in one embodiment;
FIG. 3 shows an exemplary schematic diagram of a standard text entry page provided by an embodiment of the present application;
FIG. 4 shows an exemplary schematic diagram of a test page provided by an embodiment of the present application;
FIG. 5 illustrates an exemplary schematic diagram of a sign-up page provided by an embodiment of the present application;
FIG. 6 is a block diagram of a screen handwriting input device in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The screen handwriting input method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. As shown in fig. 1, a user can write characters on a touch screen of a mobile device, and a test device can simulate the operation of writing characters by the user through a test case, so that the automatic test of the UI of the mobile device is realized.
The mobile device includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices can be smart speakers, smart televisions, smart air conditioners, smart vehicle devices and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The test device may refer to the above mobile device, and will not be described herein.
In one exemplary embodiment, as shown in fig. 2, there is provided a screen handwriting input method, which may be applied to a test device, and which may include:
step S201, first coordinate information of each stroke of the test text is obtained.
The test text may represent text used in performing the mobile device UI automation test, among other things. The test text may include at least one test word. The test text may represent words in the test text. The test text included in the test text may be set according to the test requirements. Test words include, but are not limited to, chinese, letters, symbols, and the like. The embodiment of the application does not limit the types and the quantity of the test words included in the test text.
In embodiments of the present application, each word may be composed of at least one stroke. In one possible implementation, the strokes may include straight line segments. That is, each letter may be composed of straight line segments one by one. The position of the stroke may be represented at this point by the start point coordinates and the end point coordinates. The length of each straight line segment can be set according to the requirement. It can be understood that the shorter the length of the straight line segments, the more the number of the straight line segments needed for forming the same character, the larger the calculated amount, and the higher the fitting degree of the character; the longer the straight line segment, the fewer the number of straight line segments required to construct the same word, the smaller the calculation amount, but the lower the word fitting degree. The length of each straight line segment is not limited in the embodiment of the present application. In one example, text may be first drawn according to canonical strokes of the writing specification (e.g., skim, horizontal, vertical, etc.), on the basis of which the canonical strokes are split into strokes in the embodiments of the application, i.e., straight line segments. Of course, the strokes involved in the embodiments of the present application may also be in other forms, for example, may be the canonical strokes described above, where a trajectory is required to represent the position of the strokes.
The first coordinate information may represent coordinate information in a standard area. The first coordinate information of a stroke indicates the coordinate information of the stroke in the standard area. Taking a stroke as a straight line segment as an example, the first coordinate information of the stroke comprises the starting point coordinate and the end point coordinate of the straight line segment corresponding to the stroke in a standard area.
The standard area may represent a handwriting area adopted when the user actually performs handwriting input. The size of the standard region may be set as required, for example, the standard region may be 300×300 (unit: pixel), or 300×500 (unit: pixel).
In this step, the test device may obtain, from the preset word stock, first coordinate information of each stroke of the test text. The preset word stock may represent a preset word stock, and the preset word stock may include a plurality of standard words and first coordinate information of each stroke of each standard word.
In one possible implementation manner, the method may further include a process of constructing a preset word stock, and the process may include: displaying the standard area on a touch screen; for each standard character to be stored, responding to writing operation on the standard area, and recording coordinate information of each stroke of the writing operation as first coordinate information of each stroke of the standard character; and storing the standard characters and the first coordinate information of each stroke of each standard character into the preset character library.
The standard characters represent characters in which coordinate information is stored in a preset character library. Standard characters included in the preset word stock can be deleted and added according to requirements. Coordinate information corresponding to standard characters in the preset character library can be updated and modified.
First, a certain area on the touch screen of a certain mobile device may be regarded as a standard area. And then, executing writing operation in the standard area to simulate the handwriting characters of the user, wherein the simulated characters are standard characters, and the coordinate information of each stroke of the writing operation in the standard area can be recorded as the first coordinate information of each stroke of the standard characters in the simulation process of one standard character. And finally, storing the recorded first coordinate information and the standard text in a preset word stock in a correlated manner.
It should be noted that, the preset word stock may be locally searched and accessed by the test device after being generated on the test device; or the mobile terminal can be generated on other mobile equipment and then sent to the test equipment, and the test equipment performs local searching access; remote lookup access by the test device may also be performed after generation on other mobile devices. The embodiment of the application does not limit the generation equipment and the storage equipment of the preset word stock.
In the test process, when handwriting is recorded, the test equipment can search the coordinate information of each stroke of the test text in the preset word stock. In one possible implementation, step S201 may include: searching standard characters corresponding to the test characters in a preset character library; and determining the first coordinate information of each stroke of the standard text corresponding to the test text as the first coordinate information of each stroke of the test text.
For example, standard words in the preset word stock include "book", "person", "sign" and "word". The test text is "person". The testing equipment can find the 'person' in the preset word stock, and determine the first coordinate information of each stroke of the 'person' as the first coordinate information of each stroke of the test word.
Step S202, scaling the first coordinate information of each stroke of the test text according to the size information of the handwriting area of the test equipment and the size information of the standard area, and obtaining the second coordinate information of each stroke of the test text.
Wherein the second coordinate information may be used to represent the coordinate information in the handwriting area. The second coordinate information of each stroke of a test character is the coordinate information of each stroke of the test character in the handwriting area of the test equipment. Because the size information of the handwriting area and the standard area may be different, if standard characters written in the standard area are directly moved to the handwriting area of the test device, the situation that part of strokes of the characters exceed the handwriting area or the space of the whole characters in the handwriting area is small may occur, so that the characters fail to be written in the handwriting area. In the embodiment of the application, the first coordinate information can be scaled according to the size information of the handwriting area and the standard area, so that the test text is positioned at a proper position in the handwriting area.
In one possible implementation, step S202 may include: determining a horizontal scaling and a vertical scaling according to the size information of the handwriting area of the test equipment and the size information of the standard area; scaling the first abscissa by adopting the transverse scaling to obtain a second abscissa, wherein the first abscissa represents the abscissa in the first coordinate information, and the second abscissa represents the abscissa in the second coordinate information; and scaling the first ordinate by adopting the longitudinal scaling to obtain a second ordinate, wherein the first ordinate represents the ordinate in the first coordinate information, and the second ordinate represents the ordinate in the second coordinate information.
The test equipment may be scaled in the lateral and longitudinal directions, respectively. In one example, the handwriting area and the standard area each have an upper left corner vertex as the origin of coordinates, a lateral direction as the x-axis, and a longitudinal direction as the y-axis. Assuming that the first coordinate information of one stroke includes a start point coordinate (x 1, y 1) and an end point coordinate (x 2, y 2), the first abscissa is x1 and x2, and the first ordinate is y1 and y2. If the horizontal scaling is k1 and the vertical scaling is k2 according to the size information of the handwriting area and the standard area, the second abscissa is x1 x k1 and x2 x k1, and the second ordinate is y1 x k2 and y2 x k2. That is, the second coordinate information of the stroke includes a start point coordinate (x 1 x k1, y1 x k 2) and an end point coordinate (x 2 x k1, y2 x k 2).
In this way, the test characters can be more adapted to the handwriting area by scaling in the transverse direction and the longitudinal direction respectively, and no deviation occurs in the handwriting area.
In one possible implementation, step S202 may include: determining a horizontal scaling and a vertical scaling according to the size information of the handwriting area of the test equipment and the size information of the standard area; determining the horizontal scaling or the vertical scaling as a region scaling; and scaling the first abscissa and the first ordinate by adopting the area scaling ratio to obtain a second abscissa and a second ordinate respectively, wherein the first abscissa and the first ordinate represent the abscissa and the ordinate in the first coordinate information, and the second abscissa and the second ordinate represent the abscissa and the ordinate in the second coordinate information.
The test equipment may be scaled equally in the lateral and longitudinal directions. In one example, the test device may determine the lateral scale or the longitudinal scale as the area scale. For example, when zooming in, the more expanded of the horizontal scale and the vertical scale may be determined as the region scale to prevent the strokes of the magnified test text from exceeding the handwriting region. For another example, when zooming out, the more scaled of the horizontal scale and the vertical scale may be determined as the region scale to prevent strokes of the scaled test text from still being outside the handwriting region.
In one example, the handwriting area and the standard area each have an upper left corner vertex as the origin of coordinates, a lateral direction as the x-axis, and a longitudinal direction as the y-axis. Assuming that the first coordinate information of one stroke includes a start point coordinate (x 1, y 1) and an end point coordinate (x 2, y 2), a horizontal scale is determined to be k1 and a vertical scale is determined to be k2 according to the size information of the handwriting area and the standard area. If the lateral scaling k1 is determined as the area scaling, the second coordinate information of the stroke includes the start point coordinates (x 1 x k1, y1 x k 1) and the end point coordinates (x 2 x k1, y2 x k 1). If the vertical scaling k2 is determined as the region scaling, the second coordinate information of the stroke includes the start point coordinates (x 1 x k2, y1 x k 2) and the end point coordinates (x 2 x k2, y2 x k 2).
Therefore, through the equal-proportion scaling of the transverse direction and the longitudinal direction, the test characters can be changed in size only without deformation, and the test characters are more in accordance with handwriting habits of users.
Step S203, based on the second coordinate information of each stroke of the test text, performing input of the corresponding handwritten text of the test text in the handwriting area.
Taking a stroke as a straight line segment as an example, the second coordinate information of one stroke includes a start point coordinate and an end point coordinate. When the test equipment performs the input of the test text corresponding to the handwritten text in the handwriting area, the test equipment can pay attention to input each stroke of the test text. For any stroke of the test text, the starting point coordinate and the end point coordinate of the corresponding straight line segment can be marked in the handwriting area, and then the starting point coordinate and the end point coordinate are connected together to finish the input of the stroke. When each stroke of a test text is recorded, the test text is recorded, and when each test text of the test text is recorded, the test text is recorded. At this time, the test script for the handwriting area of the test device is obtained, and the subsequent UI test can be started quickly.
According to the screen handwriting input method, firstly, the coordinate information of each stroke of the test text in the standard area is scaled according to the size information of the handwriting area and the standard area, so that the coordinate information of each stroke of the test text in the handwriting area is obtained; and then, according to the coordinate information obtained after scaling, inputting the corresponding handwritten characters of the test characters in the handwritten region. Therefore, handwriting character input can be completed in writing areas with different sizes in a self-adaptive mode, the acquisition speed of the test script is improved, and therefore the test efficiency is improved.
The screen handwriting input method provided by the embodiment of the application can be applied to any scene needing to automatically test the handwriting input function of the mobile equipment, such as insurance policy application copy or signature. The following description will take the example of policy application copy and signature as examples.
Fig. 3 shows an exemplary schematic diagram of a standard text entry page provided by an embodiment of the present application. As shown in fig. 3, the touch screen of the mobile device presents a standard text entry page that includes a text display area to be entered, a entered text display area, and a standard area. The to-be-entered text display area is used for displaying standard text of a to-be-entered preset word stock, for example, the ' self-read insurance clauses, product specifications and insurance application prompt books ' shown in fig. 3 are used for knowing the characteristics of the product and the uncertainty of the benefit of the insurance policy '. The entered text display area is used to display standard text of a entered preset word stock, such as the "book" shown in fig. 3. The standard area is used to show standard text being entered into a library of preset words, such as "people" as shown in fig. 3.
As shown in FIG. 3, operational controls, such as a "ok" control, a "back" control, and a "cancel" control, may also be included in the standard text entry page. When the user triggers the 'confirm' control, the mobile device can input the standard characters displayed in the standard area into a preset character library, record the first coordinate information of the standard characters and input the first coordinate information into the preset character library. When the user triggers the "back" control, the mobile device may delete the last stroke entered by the user. When the user triggers the "cancel" space, the mobile device may delete the standard text currently entered by the user.
The user can realize the creation of the preset word stock through the standard word entry page shown in fig. 3. Of course, a standard text entry page may also present more areas or controls. The arrangement of the respective areas and controls is not limited to that shown in fig. 3. In the embodiment of the application, the standard text input page is not limited, and the standard area can be displayed and the input of the standard text and the first coordinate information can be realized.
Fig. 4 shows an exemplary schematic diagram of a test page provided in an embodiment of the present application. As shown in fig. 4, the test page includes a text display area and a signature control, and the signature control specifically includes an "applicant signature" control and an "insured signature" control. In the testing process, after triggering the "applicant signs" control or the "insured person signs" control, the user jumps to the sign page.
Fig. 5 shows an exemplary schematic diagram of a signature page provided by an embodiment of the present application. As shown in fig. 5, the signature page includes a test text presentation area and a handwriting area. The test text display area is used for displaying test words in the test text, such as twelve benefits shown in fig. 5. The handwriting area is used for displaying the handwriting characters. The testing equipment can firstly acquire the first coordinate information of each ten strokes from a preset word stock, and then scale the first coordinate information of each ten strokes according to the size information of the handwriting area and the size information of the standard area to acquire the second coordinate information of each ten strokes; and then, based on the second coordinate information of each stroke of the ten, inputting the ten corresponding handwritten characters in the handwriting area. Based on the same mode, the input of the corresponding handwritten characters of 'two' is performed in the handwriting area, and the input of the corresponding handwritten characters of 'interest' is performed, so that the input of the test text is completed.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a screen handwriting input device for realizing the screen handwriting input method. The implementation scheme of the device for solving the problem is similar to that described in the above method, so the specific limitation in the embodiment of one or more screen handwriting input devices provided below may refer to the limitation of the screen handwriting input method hereinabove, and will not be described herein.
In one exemplary embodiment, as shown in fig. 6, there is provided a screen handwriting input device, the device 600 may include: an acquisition module 601, a scaling module 602 and an entry module 603, wherein:
the acquisition module is used for acquiring first coordinate information of each stroke of the test text in the test text, wherein the first coordinate information is used for representing the coordinate information in the standard area;
the scaling module is used for scaling the first coordinate information of each stroke of the test text according to the size information of the handwriting area of the test text and the size information of the standard area to obtain second coordinate information of each stroke of the test text, wherein the second coordinate information is used for representing the coordinate information in the handwriting area;
And the input module is used for inputting the corresponding handwritten characters of the test characters in the handwriting area based on the second coordinate information of each stroke of the test characters.
In one possible implementation, the obtaining module is further configured to:
searching standard characters corresponding to the test characters in a preset character library, wherein the preset character library comprises a plurality of standard characters and first coordinate information of each stroke of each standard character;
and determining the first coordinate information of each stroke of the standard text corresponding to the test text as the first coordinate information of each stroke of the test text.
In one possible implementation, the apparatus further includes:
the display module is used for displaying the standard area on the touch screen;
the recording module is used for responding to the writing operation on the standard area for each standard character to be stored, and recording the coordinate information of each stroke of the writing operation as the first coordinate information of each stroke of the standard character;
and the storage module is used for storing the standard characters and the first coordinate information of each stroke of each standard character into the preset character library.
In one possible implementation, the scaling module is further configured to:
determining a horizontal scaling and a vertical scaling according to the size information of the handwriting area of the test equipment and the size information of the standard area;
scaling the first abscissa by adopting the transverse scaling to obtain a second abscissa, wherein the first abscissa represents the abscissa in the first coordinate information, and the second abscissa represents the abscissa in the second coordinate information;
and scaling the first ordinate by adopting the longitudinal scaling to obtain a second ordinate, wherein the first ordinate represents the ordinate in the first coordinate information, and the second ordinate represents the ordinate in the second coordinate information.
In one possible implementation, the scaling module is further configured to:
determining a horizontal scaling and a vertical scaling according to the size information of the handwriting area of the test equipment and the size information of the standard area;
determining the horizontal scaling or the vertical scaling as a region scaling;
and scaling the first abscissa and the first ordinate by adopting the area scaling ratio to obtain a second abscissa and a second ordinate respectively, wherein the first abscissa and the first ordinate represent the abscissa and the ordinate in the first coordinate information, and the second abscissa and the second ordinate represent the abscissa and the ordinate in the second coordinate information.
In one possible implementation, the stroke includes a straight line segment, and the first coordinate information of the stroke includes a start point coordinate and an end point coordinate of the straight line segment.
The above-mentioned various modules in the screen handwriting input device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In an exemplary embodiment, a computer device is provided, which may be a test device, and which may be a terminal, and an internal structure diagram thereof may be as shown in fig. 7. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a screen handwriting input method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an exemplary embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor performing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.
Claims (10)
1. A screen handwriting input method, characterized in that the method comprises:
acquiring first coordinate information of each stroke of the test text in the test text, wherein the first coordinate information is used for representing coordinate information in a standard area;
scaling the first coordinate information of each stroke of the test text according to the size information of the handwriting area of the test equipment and the size information of the standard area to obtain second coordinate information of each stroke of the test text, wherein the second coordinate information is used for representing the coordinate information in the handwriting area;
And based on the second coordinate information of each stroke of the test text, inputting the corresponding handwritten text of the test text in the handwriting area.
2. The method of claim 1, wherein the obtaining first coordinate information for each stroke of the test text comprises:
searching standard characters corresponding to the test characters in a preset character library, wherein the preset character library comprises a plurality of standard characters and first coordinate information of each stroke of each standard character;
and determining the first coordinate information of each stroke of the standard text corresponding to the test text as the first coordinate information of each stroke of the test text.
3. The method according to claim 2, wherein the method further comprises:
displaying the standard area on a touch screen;
for each standard character to be stored, responding to writing operation on the standard area, and recording coordinate information of each stroke of the writing operation as first coordinate information of each stroke of the standard character;
and storing the standard characters and the first coordinate information of each stroke of each standard character into the preset character library.
4. The method according to claim 1, wherein scaling the first coordinate information of each stroke of the test text according to the size information of the handwriting area of the test device and the size information of the standard area to obtain the second coordinate information of each stroke of the test text comprises:
determining a horizontal scaling and a vertical scaling according to the size information of the handwriting area of the test equipment and the size information of the standard area;
scaling the first abscissa by adopting the transverse scaling to obtain a second abscissa, wherein the first abscissa represents the abscissa in the first coordinate information, and the second abscissa represents the abscissa in the second coordinate information;
and scaling the first ordinate by adopting the longitudinal scaling to obtain a second ordinate, wherein the first ordinate represents the ordinate in the first coordinate information, and the second ordinate represents the ordinate in the second coordinate information.
5. The method according to claim 1, wherein scaling the second coordinate information of each stroke of the test text according to the size information of the handwriting area of the test device and the size information of the standard area to obtain the second coordinate information of each stroke of the test text comprises:
Determining a horizontal scaling and a vertical scaling according to the size information of the handwriting area of the test equipment and the size information of the standard area;
determining the horizontal scaling or the vertical scaling as a region scaling;
and scaling the first abscissa and the first ordinate by adopting the area scaling ratio to obtain a second abscissa and a second ordinate respectively, wherein the first abscissa and the first ordinate represent the abscissa and the ordinate in the first coordinate information, and the second abscissa and the second ordinate represent the abscissa and the ordinate in the second coordinate information.
6. The method of claim 1, wherein the stroke comprises a straight line segment and the first coordinate information of the stroke comprises a start point coordinate and an end point coordinate of the straight line segment.
7. A screen handwriting input device, the device comprising:
the acquisition module is used for acquiring first coordinate information of each stroke of the test text in the test text, wherein the first coordinate information is used for representing the coordinate information in the standard area;
the scaling module is used for scaling the first coordinate information of each stroke of the test text according to the size information of the handwriting area of the test text and the size information of the standard area to obtain second coordinate information of each stroke of the test text, wherein the second coordinate information is used for representing the coordinate information in the handwriting area;
And the input module is used for inputting the corresponding handwritten characters of the test characters in the handwriting area based on the second coordinate information of each stroke of the test characters.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311727830.XA CN117539377A (en) | 2023-12-15 | 2023-12-15 | Screen handwriting input method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311727830.XA CN117539377A (en) | 2023-12-15 | 2023-12-15 | Screen handwriting input method and device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117539377A true CN117539377A (en) | 2024-02-09 |
Family
ID=89791919
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311727830.XA Pending CN117539377A (en) | 2023-12-15 | 2023-12-15 | Screen handwriting input method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117539377A (en) |
-
2023
- 2023-12-15 CN CN202311727830.XA patent/CN117539377A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210312679A1 (en) | Method for generating identification pattern and terminal device | |
CN110069191B (en) | Terminal-based image dragging deformation implementation method and device | |
CN111596911B (en) | Method, device, computer equipment and storage medium for generating control | |
WO2022242379A1 (en) | Stroke-based rendering method and device, storage medium and terminal | |
CN109718554B (en) | Real-time rendering method and device and terminal | |
CN114841126A (en) | Form generation method, device, equipment, storage medium and program product | |
CN107391148B (en) | View element saving method and device, electronic equipment and computer storage medium | |
CN116595808B (en) | Event pyramid model construction and multi-granularity space-time visualization method and device | |
CN117332766A (en) | Flow chart generation method, device, computer equipment and storage medium | |
CN105378645A (en) | Virtualizing applications for multi-monitor environments | |
CN117539377A (en) | Screen handwriting input method and device, computer equipment and storage medium | |
CN105630342A (en) | Terminal and file display method of terminal | |
US20150055869A1 (en) | Method and apparatus for providing layout based on handwriting input | |
CN114491309A (en) | Picture processing method and device | |
JP2019021255A (en) | Digital publishing system, digital publishing method and computer program | |
CN113763552A (en) | Three-dimensional geographic model display method and device, computer equipment and storage medium | |
CN111552410A (en) | Writing trace processing method, device, equipment and computer readable storage medium | |
CN116883563B (en) | Method, device, computer equipment and storage medium for rendering annotation points | |
CN117612192A (en) | Electronic drawing information identification method, system, electronic equipment and storage medium | |
CN117113302B (en) | Text watermark generation method and text verification method | |
CN116884019A (en) | Signature recognition method, signature recognition device, computer equipment and storage medium | |
WO2024045787A1 (en) | Pick operand detection method and apparatus, computer device, readable storage medium, and computer program product | |
CN117688638A (en) | Electronic drawing generation method, system, electronic device and storage medium | |
CN117196924A (en) | Watermark adding method, watermark adding device, computer equipment and storage medium | |
US20190369840A1 (en) | Interaction with a three-dimensional internet content displayed on a user interface |
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 |