Element selection method and apparatus, storage medium, and electronic device

CN116185269BActive Publication Date: 2026-06-26GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU SHIYUAN ELECTRONICS CO LTD
Filing Date
2021-11-29
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In existing technologies, the switching between writing and selection states on electronic whiteboards requires users to pay attention to the control states, which disrupts the smoothness of use, and operations such as long presses or double-clicks are prone to accidental triggering.

Method used

In writing mode, by drawing a pre-selected circle shape and not detecting a second touch operation within a preset time, the target element is automatically identified and enters a pre-selected state. Then, the selected element is confirmed by touching the landing point, avoiding additional state switching operations.

Benefits of technology

It enables users to select elements by drawing circular strokes directly in writing mode, maintaining the continuity of user operations, reducing accidental triggers, and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116185269B_ABST
    Figure CN116185269B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an element selection method and device, a storage medium and an electronic device. The method comprises: in a writing state, in response to a first touch operation on a canvas, generating a writing trace corresponding to the first touch operation; if the writing trace is a preset circle selection shape and no second touch operation is detected within a preset time, obtaining a first region corresponding to the writing trace; if there is an element completely located in the first region, determining the element completely located in the first region as a target element; in response to a third touch operation on the canvas, obtaining a touch drop point corresponding to the third touch operation; if the touch drop point is in a second region corresponding to the writing trace, entering a selected state, and selecting the target element, so that an additional manual switch button is not needed to switch the current state, the continuity of the user using the whiteboard application is maintained, and the user experience is improved. Compared with a long press and double-click operation, the method is less likely to occur a false touch.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic whiteboard technology, and in particular to an element selection method, apparatus, storage medium, and electronic device. Background Technology

[0002] With the development of computer technology, computer devices are widely used in various aspects of daily life. For example, smart devices such as tablets and televisions with electronic whiteboards are widely used in office and educational settings. Electronic whiteboards generally have a writing state and a selection state. In writing state, touch events respond to handwriting; in selection state, touch events respond to selecting one or more elements. Generally, writing and selection states are mutually exclusive; a user can only use one of these states at a time. In related technologies, there are two ways to switch between these two states: the first is through control switching, such as clicking different buttons; the second is by long-pressing or double-clicking an element to trigger the selection state.

[0003] The aforementioned technologies suffer from at least the following problems: Switching the state of a control requires the user to pay attention to its current state, and the switching action disrupts the user's workflow. Furthermore, actions such as long presses or double-clicks can conflict with other click functions and are easily triggered accidentally. Summary of the Invention

[0004] To overcome the problems existing in related technologies, this application provides an element selection method, apparatus, storage, and electronic device that can maintain the consistency of whiteboard application use and reduce accidental element selection.

[0005] According to a first aspect of the embodiments of this application, an element selection method is provided, comprising the following steps:

[0006] In writing mode, in response to a first touch operation on the canvas, writing strokes corresponding to the first touch operation are generated; at least one element is displayed on the canvas.

[0007] If the handwriting is a preset circle shape and no second touch operation is detected within a preset time, the first area corresponding to the handwriting is obtained;

[0008] If there is an element that is completely located in the first area, the element that is completely located in the first area is identified as the target element, enters the pre-selection state, and changes the writing style corresponding to the first touch operation and the display state of the target element.

[0009] In response to a third touch operation on the canvas, the touch point corresponding to the third touch operation is obtained;

[0010] If the touch point falls on the second area corresponding to the writing stroke, it enters the selected state and selects the target element in the first area.

[0011] According to a second aspect of the embodiments of this application, an element selection device is provided, comprising:

[0012] A handwriting generation module is used to generate handwriting corresponding to a first touch operation on a canvas in a writing state; the canvas displays at least one element.

[0013] The region acquisition module is used to acquire the first region corresponding to the writing if the writing is a preset circle shape and no second touch operation is detected within a preset time.

[0014] The target element acquisition module is used to determine the element that is completely located in the first area as the target element if there is an element that is completely located in the first area, enter the pre-selection state, and change the writing handwriting corresponding to the first touch operation and the display state of the target element.

[0015] A touch point acquisition module is used to acquire the touch point corresponding to the third touch operation in response to the third touch operation on the canvas.

[0016] The element selection module is used to select the target element in the first area if the touch point falls on the second area corresponding to the writing stroke and enters the selection state.

[0017] According to a third aspect of the embodiments of this application, an electronic device is provided, including a processor and a memory; the memory stores a computer program adapted to be loaded by the processor and executed as described above in the element selection method.

[0018] According to this application, in the writing state, in response to a first touch operation on the canvas, a writing stroke corresponding to the first touch operation is generated; at least one element is displayed on the canvas; if the writing stroke is a preset circle shape and no second touch operation is detected within a preset time, a first area corresponding to the writing stroke is obtained; if there is an element completely located in the first area, the element completely located in the first area is determined as the target element, enters a pre-selection state, and changes the display state of the writing stroke corresponding to the first touch operation and the target element; in response to a third touch operation on the canvas, the touch landing point corresponding to the third touch operation is obtained; if the touch landing point is in the second area corresponding to the writing stroke, a selection state is entered, and the target element in the first area is selected. Thus, in the writing state, the writing stroke can be directly drawn to determine the selected element range to select the element, without the need to manually switch buttons to change the current state, and without needing to pay attention to the state of the switch buttons, maintaining the continuity of the user's use of the whiteboard application and improving the user experience. By directly drawing a circle shape to identify the user's selection intention, compared with long press and double-click operations, it is less likely to cause accidental touches.

[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application.

[0020] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description

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

[0022] Figure 1 This is a schematic diagram illustrating the application environment of an element selection method according to an embodiment of this application;

[0023] Figure 2 A flowchart illustrating an element selection method according to one embodiment of this application;

[0024] Figure 3 This is a schematic diagram illustrating the positions of the handwriting, the first region, and the second region in one embodiment of this application.

[0025] Figure 4 This is a schematic diagram of a canvas in writing mode, illustrating one embodiment of this application;

[0026] Figure 5 In order to be in Figure 4 A schematic diagram of the handwriting generated in response to the first touch operation;

[0027] Figure 6 In order to be in Figure 5 A diagram illustrating the semi-transparent display state based on the existing configuration;

[0028] Figure 7 In order to be in Figure 6 A diagram of the selected element;

[0029] Figure 8 This is a schematic block diagram illustrating an element selection device according to one embodiment of this application;

[0030] Figure 9 This is a schematic diagram of the structure of an electronic device according to one embodiment of this application. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0032] It should be understood that the described embodiments are merely some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of the embodiments of this application.

[0033] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in the various drawings represent the same or similar elements. In the description of this application, it should be understood that the terms “first,” “second,” “third,” etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. The word “if” / “suppose” as used herein can be interpreted as “when,” “when,” or “in response to a determination.”

[0034] Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0035] Please see Figure 1This is a schematic diagram illustrating the application environment of an element selection method according to an embodiment of this application. The application environment of the element selection method in one embodiment of this application includes an element selection device 1.

[0036] The element selection device 1 can be implemented through software and / or hardware. It can consist of two or more physical entities, or a single physical entity. From a hardware perspective, the element selection device 1 essentially refers to a computer device with capabilities equivalent to a personal computer. It is a hardware device with the necessary components revealed by the von Neumann architecture, including a central processing unit (including an arithmetic logic unit and a control unit), memory, input devices, and output devices. The computer program is stored in the memory, and the central processing unit calls and runs the computer program stored in the memory, executing the instructions in the computer program and interacting with the input / output devices to complete specific functions. The element selection device 1 also includes a touchscreen with a display area 2 for providing display data. Optionally, the element selection device 1 can be a computer, mobile phone, or interactive whiteboard.

[0037] For ease of understanding, this embodiment uses an interactive flat panel as an example to describe device 1. The interactive flat panel can be an integrated device that uses touch technology to control the content displayed on it and achieve human-computer interaction. It integrates one or more functions such as a projector, electronic whiteboard, screen, audio system, television, and video conferencing terminal.

[0038] Generally, an interactive flat panel includes at least one touchscreen. The touchscreen can be capacitive, resistive, or electromagnetic. In one embodiment, a user can perform touch operations by touching the touchscreen with their finger or a stylus. The interactive flat panel detects the touch location and determines a response based on the corresponding display content, thus implementing the touch function. For example, if the touch location indicates that the corresponding display content is a control for a specific function, the response is to execute that function. It is understood that in practical applications, users can also perform control operations using a keyboard, mouse, physical buttons, etc.

[0039] Typically, interactive whiteboards are equipped with at least one type of operating system, including but not limited to Android, Linux, and Windows. In one embodiment, the interactive whiteboard can install at least one application based on the operating system. In this embodiment, an application with writing functionality is described as an example. For instance, the interactive whiteboard has an electronic whiteboard application with writing functionality installed. This electronic whiteboard application can be a built-in application of the operating system or an application downloaded from a third-party device or server. Element selection device 1 can also be the application itself. Optionally, in addition to writing functionality, the electronic whiteboard application also has other editing functions, such as drawing, inserting tables, inserting pictures, inserting multimedia, inserting graphics, drawing tables, selecting pictures, and selecting handwriting.

[0040] For example, the application interface of an electronic whiteboard includes a writing area, which can be referred to as a canvas. This canvas displays an interactive interface for drawing or editing to the user. Optionally, the display position of the canvas can be set according to actual needs. It is understood that the size of the canvas can be set according to actual needs; it can be a finite or infinite size. An infinitely large canvas means that the canvas area can be infinitely reduced or increased according to the user's actual needs. When writing on the canvas, such as when touching the touchscreen with a stylus or finger, the touchscreen can detect the touch position and display the user's writing trajectory on the canvas in real time based on the touch position. Of course, the writing process is not limited to writing characters; any input process implemented on the touchscreen to display the operation trajectory can be considered a writing process. Furthermore, depending on the location of the touch operation, the touch operation can respond as a user's click, drag, etc. These different response methods have the same underlying coordinate processing method. Generally speaking, the canvas where the touch writing occurs coincides with the area displayed by the element selection device 1, i.e. Figure 1 The display area 2 shown in the figure.

[0041] In one embodiment, objects drawn on the canvas are denoted as elements. These elements can be user-drawn text, graphics, text boxes, tables, handwriting, etc., or user-inserted graphics, images, etc. After drawing an element, the user can select it to edit it, such as adjusting its position, size, and color. It should be noted that after drawing elements, they are generally independent of each other; that is, when a user controls one element, other elements will not be controlled synchronously unless otherwise specified. This embodiment uses an electronic whiteboard application with writing functionality as an example to describe the element selection method.

[0042] Example 1

[0043] The following will be combined with the appendix Figures 2 to 7 The element selection method provided in the embodiments of this application will be described in detail.

[0044] Please see Figure 2 This is a flowchart illustrating an element selection method according to an embodiment of this application. The element selection method provided in this embodiment includes the following steps:

[0045] Step S101: In writing mode, in response to a first touch operation on the canvas, a writing stroke corresponding to the first touch operation is generated; at least one element is displayed on the canvas.

[0046] The application interface of an electronic whiteboard includes a writing area, which can be referred to as a canvas. The canvas can display drawings to the user or receive touch editing operations from the user. Here, the application interface refers to the interactive interface used by an application to receive and / or display information. For example, in video playback applications, the interface is mainly used to display changing video images; in real-time communication applications, the interface is mainly used to receive input from the near-end user and display input from the far-end user; in document editing applications, the interface is mainly used to receive and display user input; and in browser applications, the interface is mainly used to receive user-input keywords and display web page content based on those keywords. It is understood that the canvas can also be a writing area provided by other applications, and this application does not impose any limitations on this.

[0047] In this embodiment, the canvas specifically refers to the interactive interface displayed by the user for drawing or editing during the use of the whiteboard application. As mentioned earlier, the canvas refers to an application for users to perform operations such as writing and displaying. It can be used to draw text, graphics, text boxes, and tables on the canvas, and can also be used to insert graphics, pictures, tables, and other multimedia elements. On the canvas, users can perform operations similar to writing, drawing, and erasing on a physical blackboard, and further have improved digital functions such as moving, saving, scaling, inserting pictures, color adjustment, and stroke thickness settings. In practical applications, the whiteboard application can also be named whiteboard application, whiteboard writing application, writing application, electronic whiteboard application, collaborative whiteboard application, etc. Regardless of the name, any application used to achieve the above functions is equivalent to the whiteboard application of this application.

[0048] When using whiteboard applications, the canvas is usually displayed full-screen, meaning the canvas will fill the entire screen. Figure 1Display area 2. In this application, all objects drawn on the application interface of the electronic whiteboard application are referred to as elements. Obviously, the element can be text, graphics, text boxes, tables, handwriting, etc. drawn by the user, or graphics, pictures, etc. inserted by the user. Generally, the whiteboard application has a writing state and a selection state; in the writing state, the whiteboard application responds to touch operations such as drawing text, graphics, text boxes, tables, inserting graphics, pictures, or tables on the whiteboard application page, generating handwriting or displaying pictures; in the selection state, the whiteboard application responds to touch operations such as moving, scaling, color adjustment, or stroke thickness adjustment of the selected text, image, text box, table, inserted graphics, picture, table, etc. on the whiteboard application page, changing the state of the selected element.

[0049] In writing mode, when a stylus or finger touches the touchscreen corresponding to the canvas, the touchscreen responds to the first touch operation on the canvas by sensing changes in current, voltage, or magnetic flux (corresponding to the specific setting type of capacitive, resistive, or electromagnetic touchscreen). It obtains a touch signal containing the coordinates of the touch position and the trigger time of the touch signal. Based on the touch signal containing the coordinates of the touch position and the trigger time of the touch signal, the trajectory data of the writing path input by the stylus or user's finger during each press and release of the writing pen can be obtained, as well as the time of pressing and releasing the writing pen. The writing path input by the user is displayed in real time in the writing area based on the trajectory data.

[0050] Step S102: If the handwriting is a preset circle shape and no second touch operation is detected within a preset time, obtain the first area corresponding to the handwriting.

[0051] The preset time can be adjusted according to actual usage, and this application does not impose any limitations on it. In the embodiments of this application, the preset time is the time that starts counting from the end of the first touch operation. For example, when the first touch operation is an operation caused by the user touching the touch screen with their hand, the preset time is the time that starts counting from when the user lifts their hand to perform the first touch operation; when the first touch operation is an operation caused by the user touching the touch screen with a stylus, the preset time is the time that starts counting from when the user lifts their stylus to perform the first touch operation.

[0052] The preset selection shape can be a regular or irregular shape with a certain curvature that can form a closed area. It can be understood that the preset selection shape can be closed or open; correspondingly, the handwriting can be a closed curve or an open curve. Specifically, the preset selection shape can be an open circle, a near-circular shape, an ellipse, a near-ellipse shape, a rectangle, a triangle, or other irregular shapes that the user may draw during selection, or it can be a closed circle, an ellipse, a rectangle, or a triangle, or other regular shapes.

[0053] It is understood that the first region and the second region corresponding to the handwriting are two different regions. Optionally, the first region can be the circumscribed rectangular region, the circumscribed circular region, etc., corresponding to the handwriting; or, the first region is the region containing the regular shape identified by the preset circle shape corresponding to the handwriting; or, the first region is the circumscribed rectangular region corresponding to the regular shape identified by the preset circle shape corresponding to the handwriting.

[0054] In one embodiment, step S102, which involves obtaining the first region corresponding to the writing stroke if the handwriting is a preset circle shape and no second touch operation is detected within a preset time, includes steps S10211-S10213:

[0055] Step S10211: Obtain the label information corresponding to the preset selection shape; the label information is used to indicate the rule selection graphic corresponding to the preset selection shape.

[0056] The label information is used to indicate the rule selection graphic corresponding to the preset selection shape. Specifically, the label information is used to indicate the closed shape of the rule that is closest to the preset selection shape. For example, if the rule shape that is closest to the preset selection shape is a circle, then the label information includes the center and radius of the closest circle; if the rule shape that is closest to the preset selection shape is an ellipse, then the label information includes the focus, major axis and minor axis of the closest ellipse.

[0057] Step S10212: Based on the label information, obtain the circled graphic of the rule corresponding to the handwriting.

[0058] The preset selection shapes, whether regular or irregular, are each labeled with corresponding information. This label information allows the determination of the regular selection pattern corresponding to the handwriting. It is understood that this application stores several preset selection shapes, compares the handwriting with these preset shapes, and selects the shape with the highest similarity as the corresponding selection shape. Further, the label information of the rule corresponding to the selection shape is used to obtain the corresponding regular selection pattern. For example, if the selection shape corresponding to the handwriting is an open circle, and the label information corresponding to this open circle includes the center and radius of the circle, then a regular circle can be determined from the handwriting based on the circle and radius, thus obtaining the regular selection pattern corresponding to the handwriting.

[0059] Step S10213: Take the smallest bounding rectangle corresponding to the circled shape of the rule as the first region.

[0060] Specifically, such as Figure 3 As shown, the irregular solid line 10 represents the handwriting, the solid line triangle 20 represents the element, the dashed ellipse 30 represents the regular circled shape corresponding to the handwriting, and the smallest outer triangle 40 of the dashed ellipse 30 is used as the first region. Subsequently, the element is detected based on the first region, such as whether the solid line triangle 20 is completely inside, so as to determine whether to use triangle 20 as the target element.

[0061] This application embodiment obtains label information corresponding to a preset selection shape; based on the label information, it obtains a regular selection shape corresponding to the handwriting, and uses the smallest bounding rectangle corresponding to the regular selection shape as the first region, thereby using the smallest bounding rectangle as the detection element to check whether it is inside, which can improve the detection efficiency and detection accuracy.

[0062] Step S103: If there is an element that is completely located in the first area, the element that is completely located in the first area is determined as the target element, enters the pre-selection state, and changes the writing handwriting corresponding to the first touch operation and the display state of the target element.

[0063] Specifically, the display status of the handwriting and the target element can be changed to a highlighted display; or the handwriting and the target element can be changed to a semi-transparent display; or the handwriting and the target element can be changed to a preset bright color, a preset outline, a preset dotted line, or an animation to prompt the user.

[0064] In this embodiment, both the handwriting and the target element are changed to a semi-transparent display state. By setting them to a semi-transparent display state, the user can be intuitively prompted that an element selection operation is about to be triggered, and which elements will be selected.

[0065] Optionally, you can set the brush color corresponding to the handwriting, set the brush color to a certain transparency, and then refresh the corresponding handwriting to make the handwriting semi-transparent. When the elements within the circled area are also handwriting, you can make them semi-transparent in the same way. When the elements within the circled area are images or tables, you can set the image format, set the image to a certain transparency, and then refresh the image to make it semi-transparent.

[0066] It is understood that if there is no element that is completely located in the first area, the element selection method of this application embodiment will be exited, and the corresponding touch function will be executed according to the subsequent third touch operation.

[0067] Step S104: In response to a third touch operation on the canvas, obtain the touch point corresponding to the third touch operation.

[0068] When the touchscreen is touched again by a stylus or finger, the touchscreen responds to the third touch operation on the canvas by sensing changes in current, voltage, or magnetic flux (corresponding to the specific setting type of capacitive, resistive, or electromagnetic touchscreen). It can obtain the touch signal of the coordinates of the touch position when the stylus or user's finger presses down to write, and thus obtain the touch landing point corresponding to the third touch operation.

[0069] Step S105: If the touch point falls within the second area corresponding to the writing stroke, the selected state is entered, and the target element in the first area is selected.

[0070] The step of determining the second region is not limited in this application. Optionally, in step S102, if the writing is a preset circle shape and no second touch operation is detected within a preset time, the step of obtaining the first region corresponding to the writing can be: obtaining the second region corresponding to the writing and determining the smallest bounding rectangle of the writing as the second region.

[0071] Optionally, in step S103, if there is an element that is completely located in the first area, the element that is completely located in the first area is determined as the target element, enters the pre-selection state, and changes the writing stroke corresponding to the first touch operation and the display state of the target element: obtain the second area corresponding to the writing stroke, and determine the smallest bounding rectangle of the writing stroke as the second area.

[0072] Optionally, the smallest bounding rectangle of the written handwriting can be defined as the second region. For example... Figure 3 As shown, the outermost dashed line represents the smallest bounding rectangle 50, which is the second region. It can be understood that the second region can also be the smallest bounding triangle, circle, or other shape of the handwriting.

[0073] This application embodiment determines the minimum bounding rectangle of the written handwriting as the second region, and then uses the minimum bounding rectangle to detect whether the subsequent third touch landing point is within it, which can improve the detection efficiency.

[0074] Optionally, the position coordinates of the touch point relative to the touch screen can be obtained, and the position coordinates of the second area relative to the touch screen can be obtained. Then, by comparing the position coordinates of the touch point and the position coordinates of the second area, it can be determined whether the touch point is located within the second area.

[0075] Optionally, there may be one or more elements completely located within the first area. In this embodiment, all elements completely located within the first area can be selected, and then the selection state can be switched. This allows for further transformation operations on the selected elements. For example, when switching to the selection state, a selection control toolbar can be popped up, and the selected elements can be moved, scaled, have their color adjusted, or have their stroke thickness adjusted using the selection control controls on the toolbar.

[0076] In this embodiment, during writing mode, in response to a first touch operation on the canvas, writing strokes corresponding to the first touch operation are generated; at least one element is displayed on the canvas; if the writing strokes are a preset circle shape and no second touch operation is detected within a preset time, a first region and a second region corresponding to the writing strokes are obtained; if there is an element completely located in the first region, the element completely located in the first region is determined as the target element, enters a pre-selection state, and the display state of the writing strokes corresponding to the first touch operation and the target element is changed; in response to a third touch operation on the canvas, the touch point corresponding to the third touch operation is obtained; the touch point is located in the second region corresponding to the writing strokes, selecting the target element. Thus, in writing mode, writing strokes can be directly drawn to determine the selected element range to select the element, without the need to manually switch buttons to change the current state or pay attention to the state of the switch buttons, maintaining the continuity of the user's use of the whiteboard application and improving the user experience. By directly drawing circle-shaped strokes to identify the user's selection intention, compared to long press and double-click operations, accidental touches are less likely to occur.

[0077] In one embodiment, step S102 can input the handwriting into a pre-trained circle recognition model to determine whether the handwriting is a preset circle shape. In this embodiment, point data of notes with various circle shapes are collected as a dataset, and machine learning methods are used to train the model, such as collecting point data of handwriting with various circle shapes and inputting it into a neural network model for training to obtain a trained circle recognition model.

[0078] Specifically, step S102, which describes obtaining the first area corresponding to the writing if the handwriting is a preset circle shape and no second touch operation is detected within a preset time, includes steps S10221-S10223:

[0079] Step S10221: Obtain the coordinates of several touch points corresponding to the generation of the writing handwriting during the first touch operation.

[0080] Step S10222: Input the coordinates of several touch points into the trained circular recognition model to determine whether the handwriting is a preset circular shape.

[0081] Step S10223: When the writing is a preset circle shape, obtain the first area corresponding to the writing.

[0082] This application embodiment uses a trained circular recognition model to determine whether the handwriting is a preset circular shape, which can improve the accuracy of shape recognition and thus improve the accuracy of subsequent element selection.

[0083] In one embodiment, step S102, which involves obtaining the first region corresponding to the writing stroke if the handwriting is a preset circle shape and no second touch operation is detected within a preset time, includes:

[0084] Step S10231: When the end touch event corresponding to the first touch operation is detected, a timer is triggered. If no second touch operation is detected within the time period after the timer expires, it is determined that no second touch operation was detected within the preset time.

[0085] Optionally, in the Android operating system, when the end touch event corresponding to the first touch operation is detected, a timer can be triggered to start timing by sending a delayed message through TimerTask or Handler, and this application does not impose any restrictions.

[0086] No second touch operation was detected after the timer expired, indicating that there was no further writing requirement after the first touch operation. Therefore, it can be assumed that the current user may need to switch to the selection state in order to quickly select the element.

[0087] In one embodiment, step S103, which involves determining the element completely located in the first region as the target element, includes steps S1031-S1032:

[0088] Step S1031: Traverse all elements on the canvas and calculate the minimum bounding rectangle corresponding to each element;

[0089] Step S1032: If all four vertices of the minimum bounding rectangle are located within the first region, determine that the element corresponding to the minimum bounding rectangle is completely located within the first region, and determine the element corresponding to the minimum bounding rectangle as the target element.

[0090] like Figure 3 As shown, for triangle 20, its smallest bounding rectangle 60 is obtained. Since all four vertices of the smallest bounding rectangle 60 are located within the first region 10, it is determined that triangle 20 is completely located within the first region 10, and triangle 20 is determined as the target element.

[0091] This application embodiment uses the positional relationship between the four vertices of the minimum bounding rectangle corresponding to the element and the first region to quickly and accurately determine whether the element is completely located within the first region, thereby quickly and accurately obtaining the target element that is completely located within the first region.

[0092] In one embodiment, the touch point in step S105 is located in the second area corresponding to the writing stroke. After the step of selecting the target element, the method further includes: step S106: clearing the writing stroke corresponding to the first touch operation to avoid unnecessary writing strokes affecting subsequent operations.

[0093] In one embodiment, the element selection method further includes steps S107-S108 as follows:

[0094] Step S107: Obtain the type of the target element.

[0095] Step S108: Based on the preset mapping relationship between element type and selection control, display the selection control corresponding to the type of the target element, so as to control the selected element to perform the corresponding function through the selection control.

[0096] Elements can be categorized according to actual needs. For example, elements can be divided into text elements, graphic elements, and image elements. Different element control controls can be set for different element types to enable different elements to perform corresponding functions. For example, for text elements, controls can be provided for selecting text size, font beautification, font color selection, and searching for text; for graphic elements, controls can be provided for border settings and fill color; and for image elements, controls can be provided for cropping, vectorizing, and flipping. Of course, universal element control controls can also be provided for all types of elements, such as controls for pinning, cloning, and deleting, to enable further control and processing of selected elements.

[0097] In one embodiment, the element selection method further includes: step S109: when the touch point is not in the second area corresponding to the handwriting, restore the handwriting corresponding to the first touch operation and the display state of the target element. Restoring the handwriting corresponding to the first touch operation and the display state of the target element when the touch point is not in the second area corresponding to the handwriting can intuitively prompt the user that the element selection operation has been exited.

[0098] In one embodiment, the element selection method further includes step S110: if the touch point is not within the second area corresponding to the writing stroke, generate the writing stroke corresponding to the third touch operation. If the touch point is not within the second area corresponding to the writing stroke, it indicates that the user may have accidentally triggered the selection operation while writing. Therefore, by generating the writing stroke corresponding to the third touch operation, the user's train of thought is not interrupted, making the user's operation smoother and more coherent, thus improving the user experience.

[0099] The following are specific examples illustrating the element selection method of this application:

[0100] In writing mode, the canvas displays as follows: Figure 4 The elements shown; when the user makes their first touch on the canvas, such as drawing a circle on the handwriting element "Test", the area around the handwriting "Test" will be displayed as shown. Figure 5 The handwriting is shown as a circular shape. When the handwriting is detected as a preset circular shape and no second touch operation is detected within a preset time, and the handwriting element "Test" is determined to be within the circular area, the circular handwriting and the handwriting element "Test" can be switched to the shape shown. Figure 6 The semi-transparent display state shown is used to visually display the pre-selected handwriting and the handwriting element "Test". If the touch point corresponding to the third touch operation on the canvas is within the smallest bounding rectangle corresponding to the handwriting element "Test", such as... Figure 7 As shown, selecting the handwriting element "Test" will bring up a selection control toolbar. Users can then use the function controls on the toolbar to move, scale, adjust the color, or adjust the stroke thickness of the selected element. If the touch point corresponding to the third touch operation on the canvas is not within the smallest bounding rectangle of the handwriting element "Test", the drawn circle and the semi-transparent display of the handwriting element "Test" will be canceled, returning to the writing state.

[0101] Example 2

[0102] The following are embodiments of the apparatus of this application, which can be used to execute the method described in Embodiment 1 of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method described in Embodiment 1 of this application.

[0103] Please see Figure 8 An element selection device 200 disclosed in this application includes:

[0104] The handwriting generation module 201 is used to generate handwriting corresponding to the first touch operation in response to the first touch operation on the canvas in a writing state; the canvas displays at least one element;

[0105] The region acquisition module 202 is used to acquire the first region corresponding to the writing if the writing is a preset circle shape and no second touch operation is detected within a preset time.

[0106] The target element acquisition module 203 is used to determine the element that is completely located in the first area as the target element if there is an element that is completely located in the first area, enter the pre-selection state, and change the writing handwriting corresponding to the first touch operation and the display state of the target element.

[0107] The touch point acquisition module 204 is used to acquire the touch point corresponding to the third touch operation in response to the third touch operation on the canvas.

[0108] The element selection module 205 is used to select the target element in the first area if the touch point falls on the second area corresponding to the writing stroke and enters the selection state.

[0109] In this embodiment, during writing mode, in response to a first touch operation on the canvas, writing strokes corresponding to the first touch operation are generated; at least one element is displayed on the canvas; if the writing strokes are a preset circle shape and no second touch operation is detected within a preset time, a first area corresponding to the writing strokes is obtained; if there is an element completely located within the first area, the element completely located within the first area is determined as the target element, enters a pre-selection state, and changes the display state of the writing strokes corresponding to the first touch operation and the target element; in response to a third touch operation on the canvas, the touch point corresponding to the third touch operation is obtained; if the touch point is within the second area corresponding to the writing strokes, a selection state is entered, and the target element within the first area is selected. Thus, in writing mode, writing strokes can be directly drawn to determine the selected element range to select the element, without the need to manually switch buttons to change the current state or pay attention to the state of the switch buttons, maintaining the continuity of the user's use of the whiteboard application and improving the user experience. By directly drawing circle-shaped strokes to identify the user's selection intention, compared to long press and double-click operations, accidental touches are less likely to occur.

[0110] In one embodiment, the shape region acquisition module 202 includes:

[0111] The shape label information acquisition module is used to acquire label information corresponding to a preset selection shape; the label information is used to indicate the rule selection graphic corresponding to the preset selection shape.

[0112] The selected area acquisition module is used to obtain the selected shape of the rule corresponding to the handwriting based on the label information;

[0113] The first region acquisition module is used to take the smallest bounding rectangle corresponding to the circled shape of the rule as the first region.

[0114] In one embodiment, the shape region acquisition module 202 includes:

[0115] The second region acquisition module is used to determine the smallest bounding rectangle of the written handwriting as the second region.

[0116] In one embodiment, the shape region acquisition module 202 includes:

[0117] The touch point coordinate acquisition module is used to acquire the coordinates of several touch points corresponding to the generation of the writing handwriting during the first touch operation.

[0118] The shape determination module is used to input the coordinates of several touch points into a trained circular recognition model to determine whether the handwriting is a preset circular shape.

[0119] The selected area acquisition module is used to acquire the first area corresponding to the written handwriting when the handwriting is a preset selected shape.

[0120] In one embodiment, the target element acquisition module 203 includes:

[0121] The minimum bounding rectangle acquisition module is used to traverse all elements on the canvas and calculate the minimum bounding rectangle corresponding to each element.

[0122] The target element determination module is used to determine that if all four vertices of the minimum bounding rectangle are located within the first region, the element corresponding to the minimum bounding rectangle is completely located within the first region, and the element corresponding to the minimum bounding rectangle is determined as the target element.

[0123] In one embodiment, the element selection device 200 further includes:

[0124] The handwriting removal module is used to remove the handwriting corresponding to the first touch operation.

[0125] In one embodiment, the element selection device 200 further includes:

[0126] The type retrieval module is used to obtain the type of the target element.

[0127] The control display module is used to display the selection control corresponding to the type of the target element according to the preset mapping relationship between element type and selection control control, so as to control the selected element to perform the corresponding function through the selection control control.

[0128] Example 3

[0129] The following are embodiments of the device described in this application, which can be used to execute the method described in Embodiment 1 of this application. For details not disclosed in the embodiments of the device described in this application, please refer to the method described in Embodiment 1 of this application.

[0130] Please see Figure 9 This application also provides an electronic device 300, which may specifically be a computer, mobile phone, tablet computer, interactive flat panel, etc. In an exemplary embodiment of this application, the electronic device 300 is a MOS transistor conduction loss acquisition device. The electronic device 300 may include: at least one processor 310, at least one memory 320, at least one display 330, at least one network interface 340, user interface 350, and at least one communication bus 360.

[0131] The user interface 350 is primarily used to provide an input interface for the user and to acquire user input data. Optionally, the user interface 350 may also include a standard wired interface or a wireless interface.

[0132] The network interface 340 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0133] The communication bus 360 is used to enable communication between these components.

[0134] The processor 310 may include one or more processing cores. The processor 310 connects to various parts within the electronic device 300 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 320, and by calling data stored in the memory 320. Optionally, the processor 310 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 310 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor 310.

[0135] The memory 320 may include random access memory (RAM) or read-only memory. Optionally, the memory 320 may include a non-transitory computer-readable storage medium. The memory 320 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 320 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 320 may also be at least one storage device located remotely from the aforementioned processor 310. Figure 8 As shown, the memory 320, which serves as a computer storage medium, may include an operating system, a network communication module, and a user.

[0136] The processor 310 can be used to call the application program of the element selection method stored in the memory 320 and specifically execute the method steps of Embodiment 1 shown above. For the specific execution process, please refer to the detailed description shown in Embodiment 1, which will not be repeated here.

[0137] Example 4

[0138] This application also provides a computer-readable storage medium storing a computer program thereon, the instructions of which are adapted to be loaded by a processor and executed by the method steps of Embodiment 1 shown above. The specific execution process can be found in the detailed description of the embodiments, and will not be repeated here. The device containing the storage medium can be an electronic device such as a personal computer, laptop computer, smartphone, or tablet computer.

[0139] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0140] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0141] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function selected in one or more boxes.

[0142] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function selected in one or more boxes.

[0143] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0144] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0145] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0146] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0147] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. An element selection method, characterized in that, Includes the following steps: In writing mode, in response to a first touch operation on the canvas, writing strokes corresponding to the first touch operation are generated; at least one element is displayed on the canvas. If the handwriting is a preset circle shape and no second touch operation is detected within a preset time, the first area corresponding to the handwriting is obtained; The first region is determined based on the circle shape corresponding to the handwriting; If there is an element that is completely located in the first area, the element that is completely located in the first area is identified as the target element, enters the pre-selection state, and changes the writing style corresponding to the first touch operation and the display state of the target element. In response to a third touch operation on the canvas, the touch point corresponding to the third touch operation is obtained; If the touch point falls on the second area corresponding to the writing, it enters the selected state and selects the target element in the first area; The second region is determined based on the handwriting.

2. The element selection method according to claim 1, characterized in that: The method further includes the following steps: If the touch point is not within the second area corresponding to the writing stroke, restore the writing stroke corresponding to the first touch operation and the display state of the target element.

3. The element selection method according to any one of claims 1 or 2, characterized in that: The method further includes the following steps: Obtain the type of the target element; Based on the preset mapping relationship between element types and selection control controls, the selection control control corresponding to the type of the target element is displayed, so that the target element can be controlled to perform the corresponding function through the selection control control.

4. The element selection method according to any one of claims 1 to 3, characterized in that: The step of obtaining the first area corresponding to the writing if the handwriting is a preset circle shape and no second touch operation is detected within a preset time includes: Obtain the label information corresponding to the preset selection shape; the label information is used to indicate the rule selection graphic corresponding to the preset selection shape; Based on the label information, obtain the circled shape of the rule corresponding to the handwriting; The smallest bounding rectangle corresponding to the circled shape in the rule is taken as the first region.

5. The element selection method according to any one of claims 1 to 4, characterized in that: The step of obtaining the first area corresponding to the writing if the handwriting is a preset circle shape and no second touch operation is detected within a preset time further includes: Obtain the second region corresponding to the written handwriting, and determine the smallest bounding rectangle of the written handwriting as the second region.

6. The element selection method according to any one of claims 1 to 4, characterized in that: The step of determining the element completely located within the first area as the target element, entering a pre-selection state, and changing the handwriting corresponding to the first touch operation and the display state of the target element if an element exists completely within the first area, further includes: Obtain the second region corresponding to the written handwriting, and determine the smallest bounding rectangle of the written handwriting as the second region.

7. The element selection method according to any one of claims 1 to 6, characterized in that: The step of determining the element completely located in the first region as the target element if such an element exists includes: Iterate through all elements on the canvas and calculate the minimum bounding rectangle for each element; If all four vertices of the minimum bounding rectangle are located within the first region, the element corresponding to the minimum bounding rectangle is determined to be completely located within the first region, and the element corresponding to the minimum bounding rectangle is determined as the target element.

8. The element selection method according to any one of claims 1 to 7, characterized in that: The step of obtaining the first area corresponding to the writing if the handwriting is a preset circle shape and no second touch operation is detected within a preset time includes: When the end touch event corresponding to the first touch operation is detected, a timer is triggered. If no second touch operation is detected within the time period after the timer expires, it is determined that no second touch operation has been detected within the preset time.

9. The element selection method according to any one of claims 1 to 7, characterized in that: The step of obtaining the first area corresponding to the writing if the handwriting is a preset circle shape and no second touch operation is detected within a preset time includes: Obtain the coordinates of several touch points corresponding to the generation of the writing handwriting during the first touch operation; Input the coordinates of several touch points into the trained circular recognition model to determine whether the handwriting is a preset circular shape; When the handwriting is a preset circle shape, the preset first region corresponding to the handwriting is obtained.

10. The element selection method according to any one of claims 1 to 7, characterized in that: The step of selecting the target element if the touch point falls within the second area corresponding to the writing stroke further includes: Clear the handwriting corresponding to the first touch operation.

11. The element selection method according to any one of claims 1 to 7, characterized in that: It also includes the following steps: If the touch point is not within the second area corresponding to the writing stroke, the writing stroke corresponding to the third touch operation is generated.

12. The element selection method according to any one of claims 1 to 7, characterized in that: The steps of changing the handwriting corresponding to the first touch operation and the display state of the target element include: Change the handwriting corresponding to the first touch operation and the target element to a semi-transparent display state.

13. An element selection device, characterized in that, include: The handwriting generation module is used to generate handwriting corresponding to the first touch operation in response to the first touch operation on the canvas when in writing mode. At least one element is displayed on the canvas; The region acquisition module is used to acquire the first region corresponding to the writing if the writing is a preset circle shape and no second touch operation is detected within a preset time. The first region is determined based on the circle shape corresponding to the handwriting; The target element acquisition module is used to determine the element that is completely located in the first area as the target element if there is an element that is completely located in the first area, enter the pre-selection state, and change the writing handwriting corresponding to the first touch operation and the display state of the target element. A touch point acquisition module is used to acquire the touch point corresponding to the third touch operation in response to the third touch operation on the canvas. The element selection module is used to select the target element in the first area if the touch point falls on the second area corresponding to the writing stroke and enters the selection state. The second region is determined based on the handwriting.

14. An electronic device comprising a processor and a memory; characterized in that, The memory stores a computer program adapted to be loaded by the processor and executed as described in any one of claims 1 to 12.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the element selection method as described in any one of claims 1 to 12.