Processing method and electronic equipment
By receiving signals from input devices, the system automatically triggers the target application's launch function control, solving the problem of users having to manually select the eraser. This enables convenient and smooth erasing directly on the touchscreen, enhancing the user experience.
Patent Information
- Application Number
- CN202511068582.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-07
AI Technical Summary
In touch-screen devices, users need to manually select the eraser function to perform the erasing operation, which increases the operation steps and makes it inconvenient and less smooth.
By receiving signals from the input device, the target application is automatically triggered to launch the first function control. The erase function is achieved by moving the first end of the input device on the touch screen. The signal type is different from that of conventional touch operation, reducing the number of manual selection steps for the user.
It enables the convenience and smoothness of directly erasing input traces on the touch screen, improving the user experience.
Smart Images

Figure CN120909482A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of electronic devices, and particularly relates to a processing method and an electronic device. BACKGROUND
[0002] In the related art touch device, when a user needs to perform an erasing operation in a drawing, the user usually needs to manually select an eraser function by clicking or touching, and then can perform erasing, which increases the operation steps of the user. SUMMARY
[0003] Therefore, the present disclosure provides a processing method and an electronic device.
[0004] A first aspect of the present disclosure provides a processing method, comprising:
[0005] receiving a signal sent by an input device;
[0006] in response to the signal being a first signal, triggering a target application program to start a first function control, wherein the first signal indicates that a first end of the input device serves as an input end of the input device;
[0007] in a case where the first function control is started, in response to the first end of the input device moving on a touch screen, erasing an input track on the touch screen;
[0008] wherein the first function control of the target application program can be started by a second signal acting on a first function control position of the touch screen, and the first signal and the second signal are of different types.
[0009] According to an embodiment of the present disclosure, the response to the signal being a first signal, triggering a target application program to start a first function control, comprises:
[0010] in response to the signal being a first signal indicating that a first end of the input device serves as an input end of the input device, generating a first simulation event, the first simulation event being generated based on a first position of the first function control, and the first position being obtained based on recognition of a displayed first image.
[0011] According to an embodiment of the present disclosure, the method further comprises:
[0012] in response to the signal being a third signal, triggering the target application program to start a second function control, wherein the third signal indicates that a second end of the input device serves as an input end of the input device;
[0013] in a case where the second function control is started, in response to the second end of the input device moving on the touch screen, displaying an input track on the touch screen.
[0014] According to an embodiment of the present disclosure, the method further includes:
[0015] In response to the signal being a fourth signal indicating that the second end of the input device is an input end of the input device, a second simulation event is generated, the second simulation event being generated based on a second position of an editable region in the target application program, the second position being obtained based on the recognition of the displayed first image.
[0016] According to an embodiment of the present disclosure, the method further includes:
[0017] The interface of the displayed first image belonging to the target application program is recognized based on a target model to obtain a first position of a first function control in the target application program or a second position of an editable region in the target application program.
[0018] The target application program is further configured to recognize a third position of a plurality of other function controls in the interface of the first image, the plurality of other function controls being able to be triggered by the second end of the input device.
[0019] According to an embodiment of the present disclosure, the method further includes:
[0020] The target distance of the input device from the touch screen is determined based on the intensity of the signal.
[0021] In a case where the target distance is less than or equal to a preset distance threshold, the first signal or the second signal is generated.
[0022] According to an embodiment of the present disclosure, the method further includes:
[0023] A signal parameter of the signal is obtained.
[0024] The signal is determined to be the first signal or the second signal based on the signal parameter.
[0025] According to an embodiment of the present disclosure, the method further includes:
[0026] In a case where the input device and the target application program have not established a connection, the interface of the displayed first image belonging to the target application program is recognized based on a target model to obtain positions of all function controls in the target application program.
[0027] Based on the positions of all function controls in the target application program, a data channel between the input device and the target application program is established.
[0028] According to an embodiment of the present disclosure, the method further includes:
[0029] In response to a touch screen signal generated by the input device on the touch screen, it is determined whether a focus exists in a function control in the target application; the focus indicates an interface element that can respond to the touch screen signal.
[0030] If the focus does not exist in the function control in the target application, it is determined that the input device is not connected to the target application.
[0031] A second aspect of the present disclosure provides an electronic device, comprising:
[0032] a touch screen;
[0033] a receiver configured to receive a signal sent by an input device;
[0034] a processor configured to, in response to the signal being a first signal, trigger a target application to start a first function control, wherein the first signal indicates that a first end of the input device is used as an input end of the input device; and in a case where the first function control is started, in response to the first end of the input device moving on the touch screen, erase an input track on the touch screen.
[0035] The first function control of the target application can be started by a second signal acting on the first function control position of the touch screen, and the first signal and the second signal are of different types.
[0036] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0037] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description when taken in conjunction with the accompanying drawings, in which:
[0038] Figure 1 A flowchart of a processing method provided by an embodiment of the present disclosure is schematically shown;
[0039] Figures 2A-2B A schematic diagram of an application process of a processing method provided by an embodiment of the present disclosure in an actual application scenario is schematically shown;
[0040] Figure 3 A flowchart of another processing method provided by an embodiment of the present disclosure is schematically shown;
[0041] Figure 4 A block diagram of an electronic device suitable for implementing the above processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0042] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it is to be understood that such description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description of the embodiments, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. However, it will be apparent to one skilled in the art that the embodiments can be practiced without these specific details. In other instances, well-known structures and functions have been omitted to avoid obscuring the present disclosure in unnecessary detail.
[0043] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present disclosure. As used herein, the term "includes" and tautological expressions thereof, such as "including", means the inclusion of the stated features, steps, operations, and / or elements but not to the exclusion of one or more other features, steps, operations, and / or elements.
[0044] All terms used herein, including technical and scientific terms, have the same meanings as those generally understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having meanings consistent with the context of the present description, and should not be interpreted in an idealized or overly formal manner.
[0045] In the case of using expressions similar to "at least one of A, B, and C, etc.", it should generally be interpreted to include at least one of the items enumerated, but not limited to the items enumerated (e.g., "a system having at least one of A, B, and C" should include a system having A alone, a system having B alone, a system having C alone, a system having A and B together, a system having A and C together, a system having B and C together, and / or a system having A, B, and C together, etc.).
[0046] In the embodiments of the present disclosure, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc. of the data involved (for example, including but not limited to user personal information) comply with the relevant legal regulations, are used for legal purposes, and do not violate public order and good customs. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data, and to maintain user personal information security, network security and national security.
[0047] The present disclosure proposes a processing method, comprising:
[0048] receiving a signal sent by an input device;
[0049] in response to the signal being a first signal, triggering a target application program to start a first function control, wherein the first signal indicates that a first end of the input device serves as an input end of the input device;
[0050] In the case of starting the first function control, the input device first end moves on the touch screen to erase the input track on the touch screen in response to the first signal sent by the input device;
[0051] The first function control of the target application program can be started by a second signal acting on the first function control position of the touch screen, and the first signal and the second signal are of different types.
[0052] By using the embodiments of the present disclosure, when the first signal indicating that the first end of the input device is the input end is received, the target application program can be automatically triggered to start the first function control, so that the input device first end of the user can directly erase the input track on the touch screen when moving on the touch screen. Since the first signal and the second signal acting on the first function control position of the touch screen are of different types, the user does not need to manually select the eraser function by clicking or touching, but can directly trigger the erasing function by the first end of the input device, thereby reducing the operation steps of the user, improving the convenience and fluency of the erasing operation in the operation process, and improving the user experience.
[0053] The electronic device in the embodiments of the present disclosure refers to a device capable of receiving an input device signal, performing a smart eraser function, and realizing full-scene handwriting covering. Such electronic devices include common computing terminals such as tablets, notebooks, desktop computers, and all-in-one computers that support handwriting input, as well as smart phones, electronic drawing boards, and digital handwriting boards equipped with a stylus that are professional input devices. In addition, new interactive devices such as augmented reality / virtual reality devices, smart glasses, and wearable devices that support handwriting interaction, as well as professional field devices such as vehicle information systems, industrial control terminals, medical display devices, and education interactive devices that have touch screens and handwriting functions, also belong to the scope of the electronic devices described in the embodiments of the present disclosure.
[0054] At the same time, the smart whiteboard equipped with a stylus input capability, the interactive projection device with screen analysis function, the smart display supporting multi-point touch and handwriting recognition, the electronic book reader, and the smart conference tablet are also within the application scope of the embodiments of the present disclosure.
[0055] Figure 1 A flowchart of a processing method provided by the embodiments of the present disclosure is schematically shown.
[0056] As shown in Figure 1 , the processing method specifically includes operations S101-S103.
[0057] Operation S101, receiving a signal sent by an input device;
[0058] In operation S102, in response to the signal being a first signal, a first function control of a target application program is triggered to be started, wherein the first signal indicates that the first end of the input device is used as an input end of the input device; and wherein the first function control of the target application program can be started by a second signal acting on a first function control position of the touch screen, and the first signal and the second signal are of different types.
[0059] In operation S103, in the case where the first function control is started, in response to the first end of the input device moving on the touch screen, an input track on the touch screen is erased.
[0060] In operation S101, the input device refers to an interactive tool capable of sensing user operations and converting operation information into an electronic signal for transmission to an electronic device. In the embodiments of the present disclosure, it can be understood as an interactive device with multiple input states or multiple function ends, for realizing multi-mode information interaction between the user and the electronic device, and capable of generating input signals with different characteristics according to different operation modes or activated ends.
[0061] In the embodiments of the present disclosure, the input device includes at least two input ends, wherein the first end and the second end correspond to different function ends or operation states of the input device respectively. The first end and the second end can be physical ends of the input device, such as the tip and tail of a stylus; or can be different operation modes or function states of the input device, such as different input modes activated by means of key switching, sensor detection or gesture recognition. When the user uses different ends of the input device or switches to different operation states, the input device can generate signals with different characteristic identifiers, so that the electronic device can distinguish whether the first end or the second end is currently activated, thereby triggering a corresponding function response.
[0062] For example, the input device includes but is not limited to a double-end stylus, whose first end is a tail end and whose second end is a tip end; a multi-function stylus, whose first end mode and second end mode are switched by means of a key or a sensor; a mouse, whose first end is a right key function and whose second end is a left key function; a touchpad, whose first end is a double-finger operation mode and whose second end is a single-finger operation mode; a gamepad, whose first end is a specific key combination and whose second end is a joystick operation; a VR controller, whose first end is a top end of a handle and whose second end is a bottom end of the handle; an eye tracking device, whose first end is a gaze mode and whose second end is a blink mode; a gesture recognition device, whose first end is a specific gesture and whose second end is another gesture, and various interactive devices capable of generating multiple input signals.
[0063] Similarly, the signal sent by the input device refers to digital information generated by the input device according to the operation behavior of the user and transmitted to the electronic device. The signal contains multi-dimensional data such as the type, position, time and physical parameters of the operation, for the electronic device to identify the operation intention of the user and trigger a corresponding function response.
[0064] For example, the signal sent by the input device can include the following information: device identification information, used to identify the specific input device that the signal comes from; input end identification information, used to distinguish whether the signal comes from the first end or the second end of the device; coordinate position information, indicating the specific position of the operation in the screen or space; action type information, such as the operation state of hovering, contacting, moving, lifting, etc.; physical parameter information, including measurement data such as pressure, tilt angle, distance, etc.; timestamp information, recording the time when the signal is generated; and tool type information, identifying the type of input tool currently used.
[0065] In a possible implementation, the electronic device receives the signal sent by the input device through its input subsystem. When the user operates using the input device, the input device encodes the operation information into a standardized input event format and transmits it to the electronic device through wired or wireless connection.
[0066] In another possible implementation, the electronic device receives the signal sent by the input device through middleware or an application program interface. The electronic device runs a special input processing middleware that provides a unified signal receiving interface and can support multiple different types of input devices at the same time.
[0067] In operation S102, the target application refers to a software application that is currently running on the electronic device and has the functions of drawing, handwriting, or editing. In the embodiments of the present disclosure, it can be understood as an application that supports user content creation, editing, or annotation operations and has multiple function controls for the user to select and use, for providing the user with interactive functions such as drawing, handwriting, document editing, or image processing.
[0068] For example, the target application includes but is not limited to a drawing application, a handwriting note application, a document editing application, an image processing application, etc.
[0069] Similarly, the first function control refers to a user interface element in the target application for realizing a specific operation function. In the embodiments of the present disclosure, it can be understood as an interactive control with the function of erasing, for deleting or clearing the input track, text, or graphic content that the user has drawn on the touch screen.
[0070] For example, the first function control includes but is not limited to an eraser tool for erasing drawing tracks, a delete tool for removing selected text or graphic elements, a clear tool for clearing all content in a specified area, and a undo tool for reverting to the previous operation state.
[0071] Further, the first signal refers to a specific type of input signal generated when the first end of the input device is used as an input end, and the first signal carries identification information of the activation state of the first end of the input device. In the embodiments of the present disclosure, the first signal can be understood as a special signal type that is different from a conventional touch operation, and is used to automatically trigger the target application program to start the first function control, so as to realize the interaction of activating a specific function without manual selection.
[0072] For example, the first signal includes but is not limited to a hovering signal, that is, a spatial positioning signal generated when the first end of the input device hovers within a preset distance above the touch screen; a device state signal, that is, a direction recognition signal generated when the input device detects that the first end is directed to be activated through a built-in sensor; a tool type signal, that is, a device recognition signal sent by the input device and containing identification information of the first end; and a pressure threshold signal, that is, a force detection signal generated when the first end of the input device contacts the screen with a specific pressure range.
[0073] Similarly, the second signal refers to a touch input signal generated when a user directly acts on a specific position on the touch screen. In the embodiments of the present disclosure, the second signal can be understood as a contact type interaction signal generated by the user by clicking, touching or pressing the function control position on the screen, and is used to activate the function control in the target application program.
[0074] For example, the second signal includes but is not limited to a click signal, a touch signal, a press signal and the like.
[0075] It should be noted that although the first signal and the second signal can both trigger the target application program to start the first function control, there are differences between the two in terms of signal generation method, triggering condition and user operation experience. The second signal needs the user to position and directly act on the display position of the first function control on the touch screen, and belongs to a direct interaction method. The first signal does not need the user to pay attention to the specific position of the function control on the screen, and can automatically trigger the function to start only through the state change of the first end of the input device.
[0076] In a feasible implementation, the electronic device identifies the type and analyzes the parameters of the input device signal received by the signal analysis module. When the signal analysis module identifies that the signal is the first signal, the function triggering module of the electronic device immediately sends a function activation instruction to the target application program, and the instruction carries a start request of the first function control. After the target application program receives the function activation instruction, the function state in the target application program is switched to an operation mode corresponding to the first function control, and the display state of the user interface is updated to reflect the currently activated function. In this process, the electronic device does not need to wait for the user to directly operate the first function control position on the screen, but directly completes the function switching based on the detection result of the first signal.
[0077] In yet another possible implementation, the electronic device maintains a mapping table of signal types and function controls, which predefines the correspondence between different types of signals and function controls in the target application. When the electronic device receives the first signal, the system queries the mapping table to determine the first function control corresponding to the first signal, and then sends a control activation message to the target application through an application program interface or a system call. The target application updates the internal state machine according to the received activation message, so that the first function control enters the active state.
[0078] In operation S103, the electronic device monitors the movement path of the first end of the input device on the touch screen in real time after the first function control is started. The electronic device obtains real-time coordinate information of the first end, including position coordinates, movement speed, and movement direction parameters in the movement process. At the same time, the electronic device locates the input trajectory area to be erased in the drawing buffer of the target application according to the movement trajectory of the first end. By identifying all input trajectory pixel points in the coverage range of the movement path, and resetting the color values of the above-mentioned pixel points to the background color or transparent state, the deletion of the input trajectory is realized. The target application refreshes the display buffer and presents the result after erasing on the touch screen, so that the user can see the visual feedback of the erasing operation in real time.
[0079] Figures 2A-2B A schematic diagram of the application process of the processing method provided by the embodiment of the present disclosure in an actual application scenario is shown.
[0080] As shown in Figure 2A , a handheld double-end stylus 201 (input device) is hovering above a touch screen 203 of a tablet computer 202 (electronic device). The double-end stylus 201 includes a stylus tip end 204 (second end) and a stylus tail end 205 (first end), wherein the stylus tail end 205 faces the touch screen 203. The touch screen 203 displays a user interface of a drawing application 206 (target application), which includes a toolbar 207, and the toolbar 207 displays an eraser icon 208 (first function control position).
[0081] When the stylus tail end 205 hovers above the touch screen 203, a hovering signal (first signal) is generated, for example, the hovering signal (first signal) is at a second position of the touch screen, which is a distance away from the first function control position. The signal is sent to the tablet computer 202 through wireless transmission. After receiving the hovering signal, the drawing application 206 automatically starts the eraser tool 209 (first function control), and the eraser icon 208 in the toolbar 207 presents an active state, indicating that the current tool has been switched to the erasing mode.
[0082] As shown in Figure 2BAs shown, in the state where the eraser tool 208 is activated, the user uses the tail end 205 of the double-end stylus 201 to contact the touch screen 203 and perform an erasing operation along a movement trajectory. The drawing content 210 (input trajectory) originally present on the touch screen 203 is gradually erased in the area passed by the nib end 204, forming an erasing effect 211. In the area covered by the movement trajectory, the pixels of the drawing content 210 are reset to the background color, realizing real-time deletion of the input trajectory. During the entire erasing process, the drawing application 206 continuously monitors the position change of the tail end 205 and synchronously updates the display content in the drawing buffer, so that real-time erasing feedback effects can be seen.
[0083] By adopting the embodiments of the present disclosure, when the first signal indicating that the first end of the input device is the input end is received, the target application program can be automatically triggered to start the first function control, so that the first end of the input device of the user can directly erase the input trajectory on the touch screen when the first end moves on the touch screen. Since the first signal is different from the second signal type that needs to act on the first function control position of the touch screen, the user does not need to manually select the eraser function through clicking or touching, but can directly trigger the erasing function through the first end of the input device, thereby reducing the operation steps of the user, improving the convenience and fluency of the erasing operation in the operation process, and improving the user experience.
[0084] In actual application scenarios, different target application programs have their own unique user interface designs and function layouts, and the display positions, icon styles and interaction modes of the first function control in different application programs may be different. The function triggering mode in the related art usually depends on preset fixed position coordinates or specific application program interfaces, and the above mode lacks flexibility and universality when facing diversified application program interfaces. In particular, for custom interface elements, non-standard controls or application programs customized by individuals, the system cannot accurately locate the actual position of the first function control, resulting in automatic function triggering failure or triggering of incorrect function modules.
[0085] To solve the above problems, on the basis of the above embodiments, as an optional embodiment, operation S102 can further include the following operations:
[0086] Operation S201, in response to the first signal indicating that the first end of the input device is the input end of the input device, a first simulation event is generated, the first simulation event is generated based on a first position where the first function control is located, and the first position is obtained based on recognition of the displayed first image.
[0087] In operation S201, the first simulation event refers to a virtual user interaction event automatically generated by the electronic device according to the identified first position information, and the first simulation event simulates the behavior of the user directly operating a specific position on the touch screen. In the embodiments of the present disclosure, the first simulation event is used to send a standardized touch operation instruction to the target application program without the user actually touching the screen, so as to realize the activation of the first function control. The first simulation event can carry touch operation information, including touch position, touch type, timestamp, device identifier and other parameters, to ensure that the target application program can identify it as a valid user input.
[0088] For example, the first simulation event includes but is not limited to a simulated click event, a simulated touch event, a simulated press event, a simulated hover event, and a simulated drag event.
[0089] Further, the first simulation event is generated based on the first position of the first function control, and the first position refers to the accurate spatial position information of the first function control in the touch screen coordinate system. In the embodiments of the present disclosure, it can be understood as two-dimensional coordinate data obtained by image recognition technology, which is used to accurately locate the specific position of the first function control in the current display interface, so as to ensure that the first simulation event can accurately act on the screen area where the first function control is located. The first position usually includes horizontal coordinate and vertical coordinate information, as well as boundary range data of the function control, which provides a target position reference for the generation of the first simulation event.
[0090] Further, the first position is obtained based on the recognition of the displayed first image, and the visual features of the first function control in the first image are analyzed by an image processing algorithm to calculate the corresponding position in the screen coordinate system.
[0091] Similarly, the first image refers to a digital image of the display content of the touch screen obtained by the electronic device at a specific time. In the embodiments of the present disclosure, it can be understood as a static image containing complete user interface information of the target application program, which is used for accurate recognition and positioning of the positions of the function controls in the interface.
[0092] In addition, the acquisition time of the first image can be synchronized with the reception time of the first signal, so as to ensure that the recognition result reflects the actual interface state at the time of user operation.
[0093] On the basis of the above-mentioned embodiments, as an optional implementation, the electronic device listens to various signals sent by the input device in real time through the signal monitoring module, and when the first signal indicating that the first end of the input device is used as an input end is monitored, the electronic device immediately starts the image capturing process. The screen capture service module of the electronic device generates the first image containing the interface information of the target application program by obtaining the display content of the touch screen after receiving the trigger instruction.
[0094] Subsequently, the electronic device transmits the first image to a pre-loaded image recognition engine, identifies a region in the first image having the eraser icon feature, and calculates a center point coordinate of the region as a horizontal and vertical coordinate value of the first position. After obtaining the first position information, the electronic device calls an event injection interface of the system, and constructs a first simulation event data structure containing the first position coordinate, a click action type, a current timestamp, and a virtual device identifier.
[0095] The electronic device delivers the first simulation event to an event queue of the target application program through the operating system. An event handler of the target application program receives and parses the first simulation event, identifies that the event corresponds to a click operation on the first function control position, and then calls a corresponding function switching module to switch the current tool state of the application program from a default mode to an erasing mode corresponding to the first function control, thereby completing the automatic starting process of the first function control.
[0096] By adopting the embodiments of the present disclosure, when the electronic device receives a first signal indicating that the first end of the input device is the input end, the first position of the first function control can be obtained by real-time recognition of the currently displayed first image, and the starting of the first function control can be triggered by automatically generating a first simulation event based on the first position. Since the first position is dynamically obtained through image recognition technology, it does not need to rely on pre-set position coordinates or specific application program interfaces, and can adapt to target application programs with different interface designs and layout changes.
[0097] Based on the above-mentioned embodiments, as an optional embodiment, the above-mentioned processing method further includes the following operations:
[0098] In operation S301, in response to the signal being a third signal, the target application program is triggered to start a second function control, wherein the third signal indicates that the second end of the input device is the input end of the input device;
[0099] In operation S302, in the case where the second function control is started, in response to the second end of the input device moving on the touch screen, an input track is displayed on the touch screen.
[0100] In operation S301, the third signal refers to a specific type of input signal generated when the second end of the input device is the input end. The third signal carries identification information of the activation state of the second end of the input device. In the embodiments of the present disclosure, it can be understood as another type of interaction signal type different from the first end activation signal, which is used to automatically trigger the target application program to start the second function control and realize the switching of the input device dual-end function.
[0101] Exemplarily, the third signal includes but is not limited to a pen tip contact signal, a pen tip hovering signal, a pen tip tool type signal, a pen tip direction recognition signal, and a pen tip pressure signal, etc.
[0102] Similarly, the second function control refers to a user interface element in the target application for implementing a content creation or editing function. In the embodiments of the present disclosure, it can be understood as an interactive control with a drawing, writing or annotation function, which is used to generate user input trajectories, text content or graphical elements on the touch screen, forming a complementary operation mode with the erasing function of the first function control.
[0103] For example, the second function control includes, but is not limited to, a brush tool, a pen tool, an annotation tool, a highlighter tool, a pencil tool and the like.
[0104] In a feasible implementation, the electronic device performs endpoint type judgment and function mode recognition on the received input device signal. When the signal recognition module detects that the signal is the third signal, the electronic device sends a function switching instruction to the target application, which carries an activation request of the second function control and a corresponding tool parameter setting. After the target application receives the function switching instruction, it switches the tool state in the target application from the current mode to the creation mode corresponding to the second function control, and updates the display state of the tool bar of the user interface to reflect the currently activated drawing tool.
[0105] In operation S302, the electronic device monitors the movement path and operation parameters of the second end of the input device on the touch screen in real time after the second function control is started. The electronic device obtains real-time coordinate information of the second end, including position coordinates, movement speed, movement direction and contact pressure parameters in the movement process. At the same time, the electronic device generates corresponding graphical data in the drawing buffer area of the target application according to the movement trajectory of the second end and the type of the currently activated second function control. By converting the movement path into a continuous sequence of pixel points, and assigning color values, transparency and line thickness and other visual parameters to the above pixel points according to the attribute settings of the second function control, the rendering of the input trajectory is realized. The target application then refreshes the display buffer area and presents the result of the drawing on the touch screen, so that the user can see the visual feedback of the drawing operation in real time.
[0106] By adopting the embodiments of the present disclosure, when the electronic device receives the third signal sent by the input device indicating that the second end is the input end, the electronic device can automatically trigger the target application to start the second function control, realizing automatic recognition and switching of the input device double-end function. Since the third signal can accurately identify the activation state of the second end of the input device, the user can directly switch between the erasing function and the drawing function by changing the physical end point of the input device, without the need for manual selection of the function button. After the second function control is started, the electronic device can accurately respond to the movement operation of the second end of the input device on the touch screen and display the input trajectory in real time, so that the user only needs to flip the input device to quickly switch between the drawing and erasing modes during operation.
[0107] On the basis of the above-mentioned embodiments, as an optional embodiment, the processing method can further include the following operations:
[0108] In operation S401, a second simulation event is generated in response to a fourth signal indicating that the second end of the input device is used as an input end of the input device. The second simulation event is generated based on a second position of the editable region in the target application program. The second position is identified based on the displayed first image.
[0109] In operation S401, the fourth signal refers to a control signal generated when the second end of the input device is used as an input end and is in a specific operation state. The signal carries identification information of the activation state and operation intention of the second end of the input device. In the embodiments of the present disclosure, it can be understood as a special control signal type that is different from the ordinary drawing operation, which is used to automatically trigger the function activation of the editable region in the target application program. The fourth signal is usually generated when the user uses the second end of the input device to hover, prepare to write, or perform a specific gesture operation. It carries the intention information that the user is about to perform text input or content editing.
[0110] For example, the fourth signal includes but is not limited to a pen tip hovering preparation signal, which is an intention recognition signal generated when the second end of the input device hovers within a preset distance above the editable region and meets a preset time threshold; a pen tip contact prediction signal, which is an operation prediction signal generated when the second end of the input device approaches the touch screen at a specific angle or pressure; an input mode switching signal, which is a mode identification signal generated when the input device detects that the user is preparing to perform a text input operation through a sensor; and a gesture recognition signal, which is a function triggering signal generated after the second end of the input device performs a specific gesture trajectory.
[0111] Similarly, the second simulation event refers to a virtual user interaction event automatically generated by the electronic device according to the identified second position information. The second simulation event simulates the behavior of the user directly operating the editable region on the touch screen. In the embodiments of the present disclosure, the second simulation event can be understood as a standardized focus activation instruction sent to the target application program without the user actually clicking the editable region, so as to realize the programmed activation and input connection establishment of the editable region. The second simulation event can carry focus switching operation information, including target position, activation type, input method calling parameter, and cursor positioning information, etc., to ensure that the target application program can identify it as a valid editable region activation request.
[0112] Exemplarily, the second simulation event includes, but is not limited to, a simulation focus event for triggering the editable region to obtain an input focus; a simulation activation event for starting an editing state of the text input box; a simulation cursor positioning event for setting a text insertion cursor at a specified position; a simulation input method calling event for automatically starting a system input method or a handwriting recognition service; a simulation selection event for selecting a specific text range in the editable region; and a simulation connection establishment event for establishing an input data channel between the system and the target application.
[0113] In a feasible implementation, the electronic device performs type identification and state analysis on the received input device signal. When the electronic device identifies that the signal is the fourth signal indicating that the second end of the input device is used as an input end, an editable region identification process is immediately started. After receiving the trigger instruction, the electronic device acquires the display content of the touch screen, and generates a first image containing the current interface information of the target application. Subsequently, the electronic device analyzes the interface elements with features such as text input boxes, editing fields or content editing regions in the first image by using an image recognition algorithm, identifies the identification information of the visual features of the editable region, and calculates the boundary coordinates and the center point position of the editable region as the spatial parameters of the second position.
[0114] After the electronic device obtains the second position information, a second simulation event data structure is constructed. The second simulation event is delivered to the event processing queue of the target application through the input event distribution mechanism of the operating system, and the target application receives and analyzes the second simulation event, and identifies that the second simulation event corresponds to an activation operation of the editable region.
[0115] By using the embodiments of the present disclosure, when the electronic device receives the fourth signal indicating that the second end of the input device is used as an input end, the second position of the second function control can be obtained by performing real-time identification on the currently displayed first image, and the second simulation event can be automatically generated based on the second position to trigger the start of the first function control. Since the second position is dynamically obtained by using the image recognition technology, it does not need to rely on preset position coordinates or specific application program interfaces, and can adapt to target application programs with different interface designs and layout changes.
[0116] On the basis of the above-mentioned embodiments, as an optional embodiment, the above-mentioned processing method can further include the following operations:
[0117] Operation S501, identifying the interface of the displayed first image belonging to the target application based on a target model, to obtain a first position of the first function control in the target application or a second position of the editable region in the target application;
[0118] The target application is further configured to identify third positions of a plurality of other function controls in the interface of the first image, and the plurality of other function controls can be triggered by the second end of the input device.
[0119] In operation S501, the target model refers to a machine learning model trained by a large amount of interface data, which has the ability to identify, locate and classify various user interaction elements in a complex application interface. In the embodiments of the present disclosure, it can be understood as a deep learning network specially optimized for user interface element recognition and position regression tasks, which is used to accurately extract the spatial position information and function attribute identification of the first function control, the editable area and other function controls from the interface image of the target application. The target model can identify the icon style, boundary contour, text identification and layout relationship of different types of interface elements by analyzing the visual features of the interface image, and output the accurate position parameters and function category labels in the screen coordinate system.
[0120] For example, the target model includes but is not limited to an interface element recognition model based on an object detection algorithm architecture, which is used to complete the positioning and classification tasks of interface controls at the same time; a visual recognition model based on an attention mechanism architecture, which is used to process complex interface layout and multi-scale control detection; a pixel-level recognition model based on a semantic segmentation network, which is used to accurately divide the boundaries of different function areas; a joint optimization model based on a multi-task learning framework, which is used to simultaneously predict control position, function type and interaction attribute; and an adaptive model based on sample learning technology, which is used to quickly adapt to the recognition needs of new types of application interfaces.
[0121] It should be noted that the target model can be constructed and optimized based on mature deep learning frameworks and pre-trained models in related technologies, and supervised learning training is performed by collecting a large amount of interface screenshot data and corresponding annotation information of different application programs, and data enhancement, transfer learning and other technical means are used to improve the generalization performance and recognition accuracy of the model. Therefore, the specific network structure design, loss function definition, optimization algorithm selection and detailed implementation of the training process are not described in detail.
[0122] Further, the target model can also identify third positions of a plurality of other function controls in the interface of the first image. The other function controls are usually distributed in different areas of the target application interface and have their own unique visual features and function identifications. The target model can simultaneously detect all interaction elements existing in the interface by performing global scanning and regional analysis on the first image, and assign corresponding position coordinates and function category information to each recognized function control.
[0123] Similarly, other function controls can be triggered by the second end of the input device, and the other function controls perform corresponding function operations by receiving various interaction signals from the second end of the input device. The other function controls generally have the ability to respond to different interaction modes such as clicking, long pressing, dragging, or hovering, and can perform corresponding function switching, parameter adjustment, or state change operations according to the operation type and parameters of the second end of the input device. They include, but are not limited to, brush tool controls, color palette controls, line attribute controls, layer operation controls, operation history controls, tool setting controls, and menu navigation controls.
[0124] In a feasible implementation, when the target model cannot directly identify the required function control in the first image, the target model further analyzes the navigation structure and menu organization in the interface. The target model determines the possible access path of the hidden function control by identifying the expansion button, menu icon, or navigation indicator in the interface. The electronic device generates a navigation simulation event for the menu navigation control according to the identification result of the target model, which simulates the user clicking or operating the corresponding navigation control to expand the hidden interface area.
[0125] After the target application program receives the navigation simulation event, it performs the corresponding interface expansion operation to display the originally hidden function control on the screen. Then, the electronic device reacquires the updated interface image, and the target model re-identifies the new interface image to obtain the accurate position information of the previously hidden function control, thereby completing the positioning of the hidden function control and the subsequent function triggering operation.
[0126] By using the embodiments of the present disclosure, based on the target model identifying the first image interface of the target application program, the first position of the first function control, the second position of the editable region, and the third position of the plurality of other function controls are automatically obtained. Since the target model has adaptive characteristics, it does not need to rely on pre-set fixed position coordinates or specific application program interfaces, and can dynamically adapt to target application programs with different interface designs and layout changes. When the user uses different endpoints of the input device to operate, the system can accurately locate the corresponding function control position based on the identification result, so that different ends of the input device can be matched to the corresponding function controls, and the problem of function triggering errors can be avoided.
[0127] In actual application scenarios, the input device generates continuous signal changes in the process of approaching the touch screen, but not all signal states at different distances are suitable for triggering the switching operation of the function control. When the input device is too far away from the touch screen, the user may only be in a state of preparing for operation or unconscious movement, and at this time, if the function switching is triggered too early, it may cause misoperation or frequent function state changes, affecting the normal operation process of the user. The signal processing method in the related art usually lacks accurate judgment of the spatial position of the input device, and is prone to execute function switching when the user does not explicitly express the operation intention, which reduces the accuracy of the interactive operation and the fluency of the user experience.
[0128] To solve the above problems, on the basis of the above embodiments, as an optional embodiment, the above processing method can further include the following operations:
[0129] Operation S601, determining a target distance of the input device from the touch screen based on the strength of the signal;
[0130] Operation S602, in the case where the target distance is less than or equal to a preset distance threshold, generating a first signal or a second signal.
[0131] In operation S601, the strength of the signal refers to the physical parameter carried by the input device in the process of transmitting the signal to the touch screen, and the strength value of the signal can reflect the spatial distance relationship between the input device and the touch screen. In the embodiments of the present disclosure, it can be understood as a measurable physical quantity that changes regularly with the distance between the input device and the touch screen, which is used to accurately calculate the real-time spatial position of the input device and judge the operation intention strength of the user. The signal strength is usually related to the physical characteristics such as electromagnetic field distribution, capacitive coupling effect or pressure sensor value of the input device.
[0132] Similarly, the target distance refers to the actual spatial interval distance between the input device and the surface of the touch screen calculated by signal strength analysis. In the embodiments of the present disclosure, it can be understood as a value calculated based on the signal strength and distance mapping relationship, which is used to quantify the spatial position state of the input device. The target distance is usually measured in millimeters or centimeters, and can reflect the dynamic position change of the input device relative to the touch screen in real time.
[0133] In a feasible implementation, the electronic device extracts the strength parameter and calculates the value of the received input device signal through the signal. When the input device approaches the touch screen, the electromagnetic signal or capacitive coupling signal generated by the input device will show a trend of strength enhancement with the decrease of distance, and the distance calculation algorithm of the electronic device converts the real-time measured signal strength value into the corresponding spatial distance value based on the pre-established mapping relationship table of signal strength and distance.
[0134] In operation S602, the preset distance threshold refers to a spatial distance threshold pre-configured by the system for determining whether to trigger signal generation, for balancing the relationship between operation responsiveness and false trigger control, and ensuring that the function switching operation is performed only when the user explicitly expresses the operation intention. The distance threshold is usually set according to the physical characteristics of different types of input devices, statistical data of user operation habits, and interactive requirements of application scenarios.
[0135] In a feasible implementation, the electronic device compares the target distance calculated by the distance judgment module with the preset distance threshold. When the target distance is less than or equal to the distance threshold, it indicates that the input device has entered the effective operation area, and the user has an explicit function switching intention. The signal generation module of the electronic device automatically generates a corresponding first signal or second signal according to the current endpoint state and activation mode of the input device.
[0136] By adopting the embodiments of the present disclosure, the target distance between the input device and the touch screen is calculated based on the strength of the signal, and a corresponding function switching signal is generated only when the target distance meets the preset threshold condition. Thus, the explicit operation intention of the user and the unconscious movement behavior can be effectively distinguished, and the false trigger problem of the input device in the far distance state is avoided.
[0137] In actual application scenarios, the signal generated by the input device often contains a variety of complex parameter information, and it is difficult to accurately distinguish the real operation intention of the user and the device state by relying on a single signal type judgment. Different input device endpoints may produce similar basic signal characteristics when performing the same physical action, and the same device endpoint may present different parameter combinations when performing different operations. The diversity and complexity of the signal make it difficult for the system to accurately identify the function only by simple signal classification.
[0138] To solve the above problems, on the basis of the above embodiments, as an optional embodiment, the above processing method can further include the following operations:
[0139] Operation S701, obtaining a signal parameter of a signal;
[0140] Operation S702, determining whether the signal is a first signal or a second signal based on the signal parameter.
[0141] In operation S701, the signal parameter refers to the data parameter carried by the input device during signal transmission for describing the device state or operation characteristics. In the embodiments of the present disclosure, it can be understood as a single parameter or a combination of multiple parameters that can reflect the current state, operation type or physical characteristics of the input device. The signal parameter can be a single identification information such as a tool type parameter, or a combination of multiple related parameters such as any combination of action type, pressure, inclination angle and distance.
[0142] Further, the signal parameters can include a tool type parameter for identifying which end of the input device triggers the current signal. The signal parameters can also include an action type parameter for describing the specific operation behavior currently performed by the input device, including different operation states such as hovering, contacting, moving, or lifting. In addition, the signal parameters can also include physical measurement data such as a pressure parameter, an inclination angle parameter, and a distance parameter.
[0143] In a feasible implementation, when the input device sends a signal, the electronic device first performs protocol analysis on the signal data to extract the parameter information contained in the signal data packet.
[0144] In operation S702, when the electronic device obtains a single signal parameter, the signal type is directly determined through single-parameter judgment logic, for example, when the tool type parameter indicates the first end, the signal is directly determined as the first signal. When the electronic device obtains multiple signal parameters, the values and states of the parameters are analyzed to determine the final signal classification result. The classification algorithm of the electronic device assigns corresponding weights according to the importance of different parameters to ensure that the key parameters play a leading role in the judgment process, and the auxiliary parameters are used for verification and correction.
[0145] By adopting the embodiments of the present disclosure, one or more parameter information contained in the input device signal is obtained, and accurate signal type judgment is performed based on the signal parameters. When the input device performs various operations, the system can accurately determine the operation intention of the user and the device state through parameter analysis, ensure the classification accuracy of the first signal and the second signal, and thus trigger the correct function control switching operation.
[0146] In actual application scenarios, some controls in the target application program can be customized, and the system cannot identify them, resulting in that the input device cannot establish a connection channel with them. When the target application program uses customized interface controls, non-standard text boxes, or text boxes implemented by parsing hypertext markup language through a web view, the implementation manner of the above controls deviates from the standard interface control specification of the system, so that the input management service of the system cannot identify and access the above customized controls through mechanisms such as regular control tree traversal, focus query, or accessibility interface. Due to the lack of effective identification and connection mechanisms, the operation signals of the input device cannot be correctly routed to the above customized controls, resulting in problems such as function failure or abnormal response when the user uses the input device for interaction.
[0147] Figure 3 A flowchart of another processing method provided by the embodiments of the present disclosure is schematically shown.
[0148] As Figure 3As shown, on the basis of the above embodiment, as an optional embodiment, the processing method can further include the following operations:
[0149] Operation S801, in the case where the input device and the target application program are not connected, the interface of the displayed first image belonging to the target application program is recognized based on the target model, and the positions of all function controls in the target application program are obtained.
[0150] Operation S802, based on the positions of all function controls in the target application program, a data channel of the input device and the target application program is established.
[0151] In operation S801, the case where the input device and the target application program are not connected refers to the state that the system cannot access the custom controls in the target application program through the standard input connection protocol or interface control access interface to establish an effective communication link. In the embodiments of the present disclosure, it can be understood that when the target application program is implemented using non-standard interface elements or custom controls, the input management service of the system cannot discover and locate the above function controls through the conventional control recognition mechanism, resulting in that the operation of the input device cannot be accurately mapped to the corresponding function area. At this time, the electronic device detects the communication state between the input device and the target application program through the connection state detection module, and when detecting that the control access fails, the focus acquisition is abnormal, or the input event is not responsive, etc., the system determines that the current state is not connected.
[0152] In the case where the connection is not established, the electronic device starts the interface recognition process based on the target model. The screenshot service module of the electronic device obtains the complete interface content currently displayed, and generates a first image containing the interface information of the target application program. Subsequently, the electronic device inputs the first image into the target model, and the target model identifies all control elements with interactive functions in the interface through global analysis and region detection of the first image.
[0153] The target model can not only recognize standard buttons, text boxes and menu controls, but also detect custom icons, non-standard input areas and hypertext markup language controls embedded in web views and other complex interface elements. Through boundary box regression and position calculation on each recognized function control, the target model outputs the position coordinates, size parameters and function type identification of all function controls.
[0154] In operation S802, the electronic device creates a data channel between the input device and the target application through a virtual connection establishment mechanism based on the position information of all the function controls identified by the target model. The connection management module of the electronic device creates a virtual input receiver for each identified control according to the position and type information of the function control, and the virtual receiver can listen to the input device operation in the specified space area and convert it into a standard event format that can be understood by the target application.
[0155] When the input device operates on the touch screen, the electronic device routes the input event to the corresponding virtual receiver for processing according to the matching relationship between the operation position and the position of the function control. After receiving the input event, the virtual receiver sends a standardized interaction event to the target application by simulating the user's direct operation of the corresponding function control, thereby establishing an effective data channel between the input device and the target application, so that the input device can normally trigger the corresponding operation of each function control in the target application.
[0156] By adopting the embodiments of the present disclosure, when there is a custom control in the target application that cannot be recognized by the system, the accurate position information of all the function controls can be obtained by using the image recognition capability of the target model, and a virtual data channel is established based on the position information, thereby effectively supporting non-standard interface controls and custom interface elements. Since the establishment of the data channel no longer depends on the standard interface implementation of the application, the system can provide a consistent input device interaction experience for the user, regardless of the interface implementation of the target application. The user can normally use the functions of the input device, thereby improving the universality and applicability of the input device.
[0157] However, in actual application, the state that the target application and the input device cannot establish a connection channel is not easy to be directly detected by the system.
[0158] To solve the above problems, on the basis of the above embodiments, as an optional embodiment, the above processing method can further include the following operations:
[0159] Operation S901, in response to the touch screen signal generated by the input device on the touch screen, it is judged whether there is a focus in the function control in the target application; the focus represents an interface element that can respond to the touch screen signal;
[0160] Operation S902, if there is no focus in the function control in the target application, it is determined that the input device and the target application have not established a connection.
[0161] In operation S901, the touch screen signal refers to an input event signal generated when the input device physically contacts the touch screen, which contains operation information such as a contact position, a contact time, and a pressure parameter. In the embodiment of the present disclosure, it can be understood as a standardized input event generated when the user uses the input device to perform a click, touch, or drag operation on the touch screen, which is used to trigger the response and state change of a corresponding interface element in the target application.
[0162] Similarly, the focus refers to the state identifier of the interface element in the target application interface that currently has the ability to receive and respond to user input. In the embodiment of the present disclosure, it can be understood as a visual or logical mark indicating that a certain function control is in an activated state and can receive input device operations, which is used to indicate that the current input operation of the user will be captured and processed by the interface element. The focus is usually presented to the user in the form of visual prompts, including cursor blinking, border highlighting, background color change, or text selection state, and other visual feedback effects. From the perspective of technical implementation, the focus state is maintained by the interface management module of the target application. When a certain function control obtains the focus, the control is registered as the receiving object of the current input event, and the input event distribution mechanism of the system will preferentially route the related touch screen signal to the function control with the focus for processing.
[0163] In a feasible implementation, when the electronic device detects that the input device generates a touch screen signal, a focus state detection process is started. The electronic device can detect the interface region with the focus visual feature by screen image analysis, and determine whether there is a function control in the target application that can respond to the current touch screen signal. When it is detected that there is a function control with the focus identifier in the interface of the target application, it is confirmed that there is an effective connection channel between the input device and the target application, and the subsequent operation of the input device can be correctly received and processed by the target application.
[0164] When the focus detection process of the electronic device is completed, if the detection result shows that all function controls in the target application do not have the focus state, that is, no control in the interface displays an activated identifier or a response preparation state, the connection state judgment module of the electronic device interprets this situation as that the input device and the target application fail to establish an effective data connection.
[0165] By adopting the embodiment of the present disclosure, when the input device generates a touch screen signal, the focus state of the function control in the target application can be detected to accurately determine the connection establishment, and the state of the connection not being established can be determined in time when the no-focus state is detected.
[0166] The embodiment of the present disclosure also discloses an electronic device, comprising:
[0167] a touch screen;
[0168] a receiver configured to receive a signal transmitted by the input device;
[0169] a processor configured to, in response to the signal being a first signal, trigger the target application to start a first function control, wherein the first signal indicates that the first end of the input device is used as an input end of the input device; and in response to the first end of the input device moving on the touch screen, erase the input track on the touch screen in a case where the first function control is started.
[0170] wherein the first function control of the target application is capable of being started by a second signal acting on a first function control position of the touch screen, and the first signal and the second signal are of different types.
[0171] Figure 4 A block diagram of an electronic device suitable for implementing the above processing method according to an embodiment of the present disclosure is schematically shown. Figure 4 The electronic device shown is merely an example and should not impose any limitation on the functions and usage range of the embodiments of the present disclosure.
[0172] As shown in Figure 4 The electronic device 400 according to an embodiment of the present disclosure includes a touch screen, a receiver (not shown in the figure), a processor 401, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 402 or loaded from a memory 408 into a random access memory (RAM) 403. The processor 401 may, for example, include a general-purpose microprocessor (e.g., a CPU), an instruction set processor, and / or a related chipset, and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 401 can also include an on-board memory for cache use. The processor 401 can include a single processing unit or multiple processing units for performing different actions of the method processes according to embodiments of the present disclosure.
[0173] In the RAM 403, various programs and data required for the operation of the electronic device 400 are stored. The processor 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. The processor 401 performs various operations of the method processes according to embodiments of the present disclosure by executing programs in the ROM 402 and / or the RAM 403. It should be noted that the programs can also be stored in one or more memories other than the ROM 402 and the RAM 403. The processor 401 can also perform various operations of the method processes according to embodiments of the present disclosure by executing programs stored in the one or more memories.
[0174] According to an embodiment of the present disclosure, the electronic device 400 can further include an input / output (I / O) interface 405 that is also connected to the bus 404. The system 700 can further include one or more of the following components connected to the input / output (I / O) interface 405: an input device 406 including a keyboard, a mouse, etc.; an output device 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), a display screen, etc., and a speaker, etc.; a storage 408 including a hard disk, etc.; and a communication part 409 including a network interface card such as a LAN card, a modem, etc. The communication part 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the input / output (I / O) interface 405 as necessary. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 410 as necessary, so that a computer program read therefrom is installed in the storage 408 as necessary.
[0175] According to an embodiment of the present disclosure, the method flow according to the embodiments of the present disclosure can be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product including a computer program carried on a computer-readable storage medium, the computer program containing program codes for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication part 409, and / or installed from the removable medium 411. When the computer program is executed by the processor 401, the above-described functions defined in the system implementing the embodiments of the present disclosure are performed. According to an embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by computer program modules.
[0176] The present disclosure also provides a computer-readable storage medium, which can be included in the device / apparatus / system described in the above embodiments; or can exist separately without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, which when executed, implement the methods according to the embodiments of the present disclosure.
[0177] According to an embodiment of the present disclosure, the computer readable storage medium can be a nonvolatile computer readable storage medium. For example, it can include, but is not limited to, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium can be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
[0178] For example, according to an embodiment of the present disclosure, the computer readable storage medium can include one or more memories of ROM 402 and / or RAM 403 described above and / or other than ROM 402 and RAM 403.
[0179] Embodiments of the present disclosure also include a computer program product, which includes a computer program containing program codes for executing the methods provided by the embodiments of the present disclosure, and when the computer program product is run on an electronic device, the program codes are used to make the electronic device implement the methods provided by the embodiments of the present disclosure.
[0180] When the computer program is executed by the processor 401, the above-mentioned functions defined in the system / apparatus of the embodiments of the present disclosure are performed. According to an embodiment of the present disclosure, the system, apparatus, module, unit, etc. described above can be implemented by computer program modules.
[0181] In one embodiment, the computer program can rely on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program can also be transmitted, distributed, and downloaded in the form of a signal on a network medium and be downloaded and installed through the communication part 409 and / or installed from the detachable medium 411. The program codes contained in the computer program can be transmitted by any appropriate network medium, including but not limited to wireless, wired, etc., or any suitable combination of the foregoing.
[0182] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features recited in the various embodiments and / or claims of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not expressly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0183] The embodiments of this disclosure have been described above. However, the above embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A processing method, comprising: receiving a signal sent by an input device; in response to the signal being a first signal, triggering a target application to start a first function control, wherein the first signal indicates that a first end of the input device is an input end of the input device; in a case where the first function control is started, erasing an input track on a touch screen in response to the first end of the input device moving on the touch screen; wherein the first function control of the target application can be started by a second signal acting on a position of the first function control on the touch screen, and the first signal and the second signal are of different types. 2.The method of claim 1, wherein the step of triggering the target application to start the first function control in response to the signal being the first signal comprises: in response to the signal being the first signal indicating that the first end of the input device is the input end of the input device, generating a first simulation event, wherein the first simulation event is generated based on a first position of the first function control, and the first position is obtained based on recognition of a first image displayed. 3.The method of claim 1, further comprising: in response to the signal being a third signal, triggering the target application to start a second function control, wherein the third signal indicates that a second end of the input device is an input end of the input device; in a case where the second function control is started, displaying an input track on the touch screen in response to the second end of the input device moving on the touch screen. 4.The method of claim 3, further comprising: in response to the signal being a fourth signal indicating that the second end of the input device is the input end of the input device, generating a second simulation event, wherein the second simulation event is generated based on a second position of an editable region in the target application, and the second position is obtained based on recognition of the first image displayed. 5.The method of claim 2 or 4, further comprising: recognizing an interface of the first image displayed and belonging to the target application based on a target model to obtain the first position of the first function control in the target application or the second position of the editable region in the target application; the target application is further configured to recognize third positions of a plurality of other function controls in the interface of the first image, and the plurality of other function controls can be triggered by the second end of the input device. 6.The method of claim 1, further comprising: determining a target distance between the input device and the touch screen based on an intensity of the signal; and generating the first signal or the second signal in a case where the target distance is less than or equal to a preset distance threshold. 7.The method of claim 1, further comprising: obtaining a signal parameter of the signal; and determining the signal to be the first signal or the second signal based on the signal parameter. 8.The method of claim 1, further comprising: In a case where the input device is not connected to the target application, an interface of a first image displayed and belonging to the target application is recognized based on a target model, to obtain positions of all function controls in the target application; Based on the positions of all function controls in the target application, a data channel between the input device and the target application is established.
9. The method of claim 8, further comprising: In response to a touch screen signal generated by the input device on the touch screen, determining whether a focus exists in the function controls in the target application; The focus represents an interface element that can respond to the touch screen signal; If the focus does not exist in the function controls in the target application, it is determined that the input device is not connected to the target application.
10. An electronic device, comprising: A touch screen; A receiver configured to receive a signal sent by an input device; A processor configured to, in response to the signal being a first signal, trigger a target application to start a first function control, wherein the first signal indicates that a first end of the input device is an input end of the input device; and in a case where the first function control is started, in response to the first end of the input device moving on the touch screen, erase an input track on the touch screen. The first function control of the target application can be started by a second signal acting on a first function control position of the touch screen, and the first signal and the second signal are of different types.