Data processing method and electronic device
By acquiring trajectory input parameters through the electronic device's operating system, determining the device status, and performing recognition, the problem of needing to switch between multiple applications for handwriting input is solved, enabling convenient handwriting input and efficient recognition across applications.
Patent Information
- Application Number
- CN202111600625.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2041-12-24
AI Technical Summary
In scenarios that support handwriting input, existing technologies rely on specific applications, which increases the complexity of user operations and makes it impossible to seamlessly switch between different types of handwriting input.
The system obtains parameter information related to the trajectory input through the operating system of the electronic device, determines that the device is in trajectory input state, and triggers the operating system to obtain trajectory input information from the input interface in trajectory input state. After recognition, the information is sent to the corresponding application, thus realizing cross-application trajectory input information recognition.
It reduces the complexity of switching between different applications for users and improves the convenience and recognition accuracy of handwriting input.
Smart Images

Figure CN114416394B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a data processing method and an electronic device. BACKGROUND
[0002] In a scenario supporting handwriting input, handwriting input is usually implemented by relying on a specific application program, because the content conversion of handwriting input is implemented by the application program, and different types of handwriting input need to use different application programs. Therefore, multiple application programs need to be installed, and switching between multiple application programs is required to implement different types of handwriting input, which increases the operation complexity of the user. SUMMARY
[0003] The technical solution of the present application is implemented as follows:
[0004] According to an aspect of the present application, a data processing method is provided, which is applied to an operating system of an electronic device, and the method comprises the following steps:
[0005] obtaining parameter information related to trajectory input of the electronic device;
[0006] determining that the electronic device is in a trajectory input state based on the parameter information;
[0007] triggering the operating system to obtain trajectory input information of an operation body from an input interface of the electronic device in the trajectory input state;
[0008] obtaining recognition information based on the trajectory input information;
[0009] sending the recognition information to a corresponding application program, so that the recognition information is output in an input area of the application program.
[0010] In the above solution, the parameter information related to trajectory input of the electronic device includes display parameters, application program function parameters or sensor parameters; the obtaining of the parameter information related to trajectory input of the electronic device comprises the following steps:
[0011] if it is detected that the current application program includes an input area, obtaining display parameters representing the input area as the parameter information related to trajectory input of the electronic device;
[0012] or, if it is detected that the current application program is in a running state, obtaining function parameters representing the application program as the parameter information related to trajectory input of the electronic device;
[0013] or, if it is detected that the operation body is separated from a first position on the electronic device, obtaining sensor parameters representing a separation event as the parameter information related to trajectory input of the electronic device.
[0014] In the above solution, the determining that the electronic device is in the trajectory input state based on the parameter information comprises:
[0015] In the case where the display parameter is obtained, it is detected that the input area has the operation body input, and it is determined that the electronic device is in the trajectory input state.
[0016] Alternatively, in the case where the function parameter is obtained, if the function parameter indicates that the application program has the trajectory input function, it is determined that the electronic device is in the trajectory input state.
[0017] Alternatively, in the case where the sensing parameter is obtained, it is determined that the electronic device is in the trajectory input state.
[0018] In the above solution, the obtaining of the function parameter of the application program comprises:
[0019] A first notification message sent by an application program currently in a running state is received, and the first notification message carries parameter information indicating whether the application program has a trajectory input function.
[0020] The above solution further comprises:
[0021] If the current application program has the trajectory input function, a trajectory input type parameter supported by the application program is acquired based on the first notification message, and the trajectory input type parameter indicates at least one of character input, figure input, letter input, and formula input.
[0022] In the above solution, the triggering of the operating system to obtain the trajectory input information of the operation body from the input interface of the electronic device comprises:
[0023] The first trajectory input type parameter supported by the current application program is compared with a second trajectory input type parameter supported by the operating system.
[0024] If the function indicated by the first trajectory input type parameter is less than the function indicated by the second trajectory input type parameter, the operating system is triggered to obtain the input trajectory information of the operation body from the input interface of the electronic device in the trajectory input state.
[0025] In the above solution, the triggering of the operating system to obtain the trajectory input information of the operation body from the input interface of the electronic device comprises:
[0026] The operating system sends a second notification message to the application program in the running state, and the second notification message indicates that the operating system obtains the trajectory input information from the input interface of the electronic device instead of the application program in the running state.
[0027] In the above scheme, the identification information is sent to a corresponding application program, including:
[0028] If there are multiple currently running application programs, based on a correspondence between the position information and the application program identification information carried in the track input information, position information of each application program is determined.
[0029] Based on the position information of each application program, the identification information is sent to a target application program corresponding to the position information, so that the target application program outputs the identification information in a corresponding input area.
[0030] In the above scheme, further including:
[0031] If there are multiple target application programs corresponding to the position information, track input type information supported by each target application program is obtained.
[0032] Based on the track input type information, the identification information is sent to a target application program in the multiple target application programs that does not support a track input type corresponding to the identification information.
[0033] According to another aspect of the present application, an electronic device is provided, including:
[0034] An obtaining unit is configured to obtain parameter information related to track input of the electronic device, and trigger an operating system of the electronic device to obtain track input information of an operating body from an input interface of the electronic device in a track input state, and obtain identification information based on the track input information.
[0035] A determining unit is configured to determine, based on the parameter information, that the electronic device is in the track input state.
[0036] A sending unit is configured to send the identification information to a corresponding application program, so that the identification information is output in an input area of the application program.
[0037] The data processing method and the electronic device provided by the present application obtain parameter information related to track input of the electronic device, determine, based on the parameter information, that the electronic device is in the track input state, trigger the operating system to obtain track input information of an operating body from an input interface of the electronic device in the track input state, obtain identification information based on the track input information, and send the identification information to a corresponding application program, so that the identification information is output in an input area of the application program. In this way, by realizing content recognition of track input information by the operating system of the electronic device, the user can not rely on a specific application program, and when multiple types of track input are realized, the user also does not need to switch back and forth between multiple application programs, thereby improving user operation convenience. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 An implementation schematic of a flow of the data processing method in the present application Figure One ;
[0039] Figure 2 An implementation schematic of a flow of the data processing method in the present application Figure Two ;
[0040] Figure 3 An implementation schematic of a structure of the electronic device in the present application Figure One ;
[0041] Figure 4 An implementation schematic of a structure of the electronic device in the present application Figure Two . DETAILED DESCRIPTION
[0042] The technical solutions of the present application are further described in detail below in combination with the drawings and specific embodiments of the present application.
[0043] Figure 1 An implementation schematic of a flow of the data processing method in the present application Figure One As shown in Figure 1 , the method comprises:
[0044] Step 101, obtaining parameter information related to trajectory input of an electronic device;
[0045] In the present application, the method can be applied to an electronic device with trajectory input capability, which includes but is not limited to a notebook computer, a desktop computer, a tablet computer, a smart phone, a smart watch, etc. Specifically, the method can be applied to an operating system of the electronic device, and the parameter information related to trajectory input of the electronic device is obtained through the operating system of the electronic device.
[0046] Here, the parameter information includes but is not limited to display parameters, application program function parameters or sensor parameters.
[0047] In an implementation manner, the operating system of the electronic device can detect whether the current application program has an input area through a sensor, and if the operating system of the electronic device detects that the current application program includes an input area, the display parameters representing the input area can be obtained as the parameter information related to trajectory input of the electronic device.
[0048] Specifically, the operating system of the electronic device can detect a trajectory input operation of an input area of a current application program through a sensor, and if the trajectory input operation of the input area of the current application program is detected, it is determined that the current application program has an input area, so that the position of the input area can be determined based on the position information of the trajectory input operation, and then the display parameter representing the position of the input area can be obtained as the parameter information related to trajectory input of the electronic device.
[0049] Alternatively, the operating system of the electronic device can recognize the frame information of the input area of the current application program through a graphic recognition algorithm, and if the frame information of the input area of the current application program is recognized, it is determined that the current application program has an input area, and then the position of the input area of the application program can be determined based on the position information corresponding to the frame information, so that the display parameter representing the position of the input area can be obtained as the parameter information related to trajectory input of the electronic device.
[0050] In another implementation, the operating system of the electronic device can also detect the running state of the current application program through a sensor, and if it is detected that the current application program is in a running state, the function parameter representing the application program can be obtained as the parameter information related to trajectory input of the electronic device.
[0051] Here, the function parameter of the application program can be a parameter carried in the installation information when the application program is installed, or it can be a first notification message sent by the application program currently in a running state when the application program is running, wherein the first notification message carries parameter information representing whether the application program has a trajectory input function.
[0052] In another implementation, the operating system of the electronic device can also obtain the trajectory input type parameter supported by the current application program as the parameter information related to trajectory input of the electronic device according to the function parameter of the current application program if it is determined that the current application program supports the trajectory input function.
[0053] Here, the trajectory input type parameter can represent at least one of character input, figure input, letter input, and formula input.
[0054] Specifically, the operating system of the electronic device can receive a first notification message sent by the application program currently in a running state when the current application program is in a running state, and obtain the trajectory input type parameter supported by the current application program as the parameter information related to trajectory input of the electronic device through the first notification message.
[0055] For example, the first notification message carries the trajectory input type parameter supported by the current application program.
[0056] In another implementation, the electronic device further comprises an operation body (e.g., a stylus), and the operation body can be located at a first position on the electronic device, and the operating system of the electronic device can further detect whether the operation body is detached from the first position on the electronic device through the sensor. If it is detected that the operation body is detached from the first position on the electronic device, the sensor parameter representing the detachment event is obtained as the parameter information of the electronic device related to the trajectory input.
[0057] Here, the sensor parameter can represent that the electronic device is currently in a trajectory input environment in addition to representing the detachment event of the operation body from the first position. The trajectory input environment represents a state in which the operation body is detached from the first position but has not yet started writing.
[0058] The electronic device provided in the present application obtains the parameter information of the electronic device related to the trajectory input through the operating system, and can determine whether the electronic device is currently in a pen writing state or a pen writing environment. For example, when the parameter information is display parameter, the operating system can determine that the electronic device is currently in a pen writing state; when the parameter information is function information of an application program and / or sensor parameter, the operating system can determine that the electronic device is currently in a pen writing environment. Thus, when the electronic device is in a pen writing state or a pen writing environment, the operating system of the electronic device performs a recognition operation on the handwriting input content, thereby reducing the inconvenience of switching between different application programs to implement recognition of different handwriting content.
[0059] In the present application, if the current application program has a trajectory input function, the operating system of the electronic device can further obtain a trajectory input type parameter supported by the application program based on the first notification message sent by the application program, wherein the trajectory input type parameter represents at least one of character input, figure input, letter input, and formula input. By obtaining the trajectory input type parameter supported by the application program, it can be determined whether the trajectory input information is recognized by the application program or the operating system.
[0060] In step 102, it is determined that the electronic device is in a trajectory input state based on the parameter information.
[0061] In the present application, when the obtained parameter information is display parameter, the operating system of the electronic device can further detect operation body input to an input area of the application program, and if it is detected that the input area has operation body input, it is determined that the electronic device is currently in a trajectory input state. Thus, when the electronic device is in a trajectory input state, the trajectory input information of the operation body is recognized by the operating system, so as to improve the recognition accuracy and recognition portability of the trajectory input information.
[0062] In another implementation, if the operating system obtains the parameter information is the function parameter of the application program, it can also determine whether the function corresponding to the function parameter is the track input function. If the application function parameter indicates that the application program has the track input function, it is determined that the electronic device is in the track input state. Thus, in the track input state of the electronic device, the track input information of the operating body is recognized by the operating system to improve the recognition accuracy and portability of the track input information.
[0063] For example, the function parameter of the application program is compared with the preset function parameter. If the comparison result indicates that the function parameter of the application program is different from the preset function parameter, it is determined that the application program does not support the track input function. If the comparison result indicates that the function parameter of the application program is the same as the preset function parameter, it is determined that the application program supports the track input function.
[0064] For example, the function parameter of the application program is 002, and the preset function parameter is 001. By comparing 002 and 001, it is determined that the current application program does not support the track input function.
[0065] Alternatively, the function parameter of the application program is compared with the preset function parameter. If the comparison result indicates that the function parameter of the application program includes the preset function parameter, it is determined that the application program supports the track input function. If the comparison result indicates that the function parameter of the application program does not include the preset function parameter, it is determined that the application program does not support the track input function.
[0066] For example, the function parameter of the application program is 001, 002, and 003, and the preset function parameter is 001. By comparing 001, 002, and 003 with 001 one by one, it is determined that the preset function parameter 001 is included in the function parameter of the current application program, and it is determined that the current application program supports the track input function.
[0067] In another implementation, if the operating system obtains the parameter information is the function parameter of the application program, it can also determine whether the function corresponding to the function parameter is the track input function. If the application function parameter indicates that the application program has the track input function, it is determined that the electronic device is in the track input state. Thus, in the track input state of the electronic device, the track input information of the operating body is recognized by the operating system to improve the recognition accuracy and portability of the track input information.
[0068] In the present application, the track input information of the operating body is recognized by the operating system of the electronic device, which can make the user not dependent on a specific application program, and also does not need to switch between multiple application programs when implementing multiple types of track input, thereby improving the user operation convenience.
[0069] In step 103, the operating system is triggered to obtain the trajectory input information of the operation body from the input interface of the electronic device in the trajectory input state.
[0070] In the present application, the input interface of the electronic device can be a user interface, such as a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touchpad, a touch screen, etc., and can also be a protocol interface between an application and an operating system. For example, when the electronic device is determined to be in a trajectory input state, the operating system can obtain the trajectory information input by the user from a touch screen, or can obtain the trajectory information input by the user through a mouse. For another example, when an application collects trajectory input information of a user, the operating system intercepts the trajectory input information collected by the application based on the protocol interface between the application and the operating system, so as to perform trajectory recognition on the trajectory input information through the operating system.
[0071] In the present application, the input interface of the electronic device can also be an input interface of an application, such as an input area of an application. When the input area of the application has trajectory input information of an operation body, the operating system can intercept the trajectory input information from the input area through the input area, so as to perform trajectory recognition on the trajectory input information through the operating system. Therefore, the trajectory recognition priority of the operating system is higher than that of the application in the present application.
[0072] In the present application, the operating system of the electronic device can also send a second notification message to an application in a running state when the current application is in the running state, where the second notification message can represent that the operating system obtains the trajectory input information from the input interface of the electronic device instead of the application in the running state. In this way, the corresponding power consumption caused by the content recognition of the application on the current trajectory input information can be reduced, so that the application can perform the content recognition work to the operating system, which can meet the recognition needs of different types of input content of the user without switching between multiple specific applications, thereby improving the content recognition convenience.
[0073] In the present application, after obtaining the trajectory input type parameter supported by the current application, the operating system can also compare the first trajectory input type parameter supported by the current application with the second trajectory input type parameter supported by the operating system to obtain a comparison result. If the comparison result represents that the function represented by the first trajectory input type parameter is less than the function represented by the second trajectory input type parameter, the operating system is triggered to obtain the input trajectory information of the operation body from the input interface of the electronic device in the trajectory input state. If the comparison result represents that the function represented by the first trajectory input type parameter is more than the function represented by the second trajectory input type parameter, the application obtains the input trajectory information of the operation body from the input interface of the application in the trajectory input state.
[0074] For example, the application program A only supports the text input function, and the operating system supports the text input, the figure input, the letter input and the formula input function. By comparing the functions supported by the application program and the operating system, it can be known that the functions supported by the operating system are more than those supported by the application program. Therefore, the operating system obtains the track input information of the operation body from the input interface of the electronic device in the track input state. In this way, the recognition accuracy of the track input information can be improved, and the user does not have to rely on a specific application program, and does not have to switch between multiple application programs when implementing multiple types of track input, thereby improving the user operation convenience.
[0075] In the present application, if the first track input type parameter supported by the application program is more than or equal to the second track input type parameter supported by the operating system, and the track input type represented by the first track input type parameter is different from the track input type represented by the second track input type parameter, the operating system is triggered to obtain the track input information of the operation body from the input interface of the electronic device in the track input state.
[0076] For example, the application program A supports the text input function, the letter input function and the figure input function, and the operating system supports the text input function, the figure input function and the formula input function. By comparing the functions supported by the application program and the operating system, it can be known that the functions supported by the operating system are equal to those supported by the application program. However, the application program does not support the formula input function, and the operating system does not support the letter input function. Therefore, when the current track input information is of the formula type, the operating system obtains the track input information of the operation body from the input interface of the electronic device. In this way, the user does not have to rely on a specific application program, and the recognition accuracy of the track input information can be improved.
[0077] In one embodiment, if the first track input type parameter supported by the application program is equal to the second track input type parameter supported by the operating system, and the track input type represented by the first track input type parameter is the same as the track input type represented by the second track input type parameter, the application program is triggered to obtain the track input information of the operation body from the input interface of the application program in the track input state.
[0078] For example, the application program A supports the text input function, the figure input function, the letter input function and the formula input function, and the operating system also supports the text input, the figure input, the letter input and the formula input function. By comparing the functions supported by the application program and the operating system, it can be known that the functions supported by the operating system are the same as those supported by the application program. Therefore, the application program obtains the track input information of the operation body. In this way, the track input information recognition can be implemented while reducing the power consumption of the operating system.
[0079] Step 104, obtaining the recognition information based on the trajectory input information;
[0080] In the present application, after the operating system obtains the trajectory input information of the operating body from the input interface of the electronic device, the operating system can also obtain the recognition information of the trajectory input information through the database of the electronic device itself. The recognition information of the trajectory input information can also be obtained through the cloud database.
[0081] Specifically, the database of the electronic device or the cloud database stores a plurality of recognition methods corresponding to the trajectory input information. When the trajectory input information represents character input, the corresponding character recognition result can be obtained through the character recognition method stored in the database of the electronic device itself or the cloud database. When the trajectory input information represents letter input, the corresponding letter recognition result can be obtained through the letter recognition method stored in the database of the electronic device itself or the cloud database. When the trajectory input information represents figure input, the corresponding figure recognition result can be obtained through the figure recognition method stored in the database of the electronic device itself or the cloud database. When the trajectory input information represents formula input, the corresponding formula recognition result can be obtained through the formula recognition method stored in the database of the electronic device itself or the cloud database.
[0082] Here, the recognition method stored in the database of the electronic device itself or the cloud database can be any method capable of realizing the recognition of the trajectory input information in the prior art. The specific recognition method will not be described here.
[0083] Step 105, sending the recognition information to the corresponding application program, so that the recognition information is output in the input area of the application program.
[0084] In the present application, the operating system can also send the recognition information to the corresponding application program through the information transmission interface between the operating system and the application program, so that the recognition information is output in the input area of the application program.
[0085] For example, the electronic device sends the recognition information to the corresponding application program through the protocol interface between the electronic device and the application program. Alternatively, the operating system sends the recognition information to the corresponding application program through the message channel, so that the recognition information is displayed and output in the input area, such as the input box, of the corresponding application program. Here, the display and output is real-time display and output, that is, when the user inputs the trajectory information at any position on the display screen, the recognized trajectory information is output in the input area of the corresponding application program. The display and output can also be delayed, for example, when the user writes a plurality of characters, the corresponding recognition information can be output within a predetermined time after the user stops inputting the trajectory.
[0086] In the present application, if the electronic device has one display screen and if there are multiple currently running application programs, the operating system can determine the location information of each application program based on the correspondence between the location information and the application program identification information carried in the track input information when sending the identification information to the corresponding operating system; and then send the identification information to the target application program corresponding to the location information of each application program based on the location information of each application program, so that the target application program outputs the identification information in the corresponding input area.
[0087] For example, the currently running application programs include application program A and application program B, the correspondence between the location information and the identification information carried in the track input information of application program A is X50, Y20, application program A, and the correspondence between the location information and the identification information carried in the track input information of application program B is X10, Y80, application program B; if the location information carried in the track input information currently acquired by the electronic device is X50, Y20, application program A, the identification information of the track input information is sent to application program A to output the identification information through the input area of application program A.
[0088] In the present application, if the electronic device includes two display screens and if there are multiple currently running application programs, the operating system can also determine the location information of each application program based on the correspondence between the location information and the application program identification information carried in the track input information when sending the identification information to the corresponding operating system; and then send the identification information to the target application program corresponding to the location information of each application program based on the location information of each application program, so that the target application program outputs the identification information in the corresponding input area.
[0089] For example, the currently running application programs include application program A and application program B, application program A is located on the first display screen, and application program B is located on the second display screen, the correspondence between the location information and the identification information carried in the track input information of application program A is the first display screen, application program A, and the correspondence between the location information and the identification information carried in the track input information of application program B is the second display screen, application program B; if the location information carried in the track input information currently acquired by the electronic device is the first display screen, application program A, the identification information of the track input information is sent to application program A to output the identification information through the input area of application program A.
[0090] If the position information corresponds to multiple target application programs, the operating system can further acquire trajectory input type information supported by each target application program; and based on the trajectory input type information, the recognition information is sent to a target application program in the multiple target application programs that does not support a trajectory input type corresponding to the recognition information.
[0091] For example, the application programs running on the first display screen include application program A and application program B, wherein the application program A supports only text handwriting input, and the application program B supports only formula handwriting input. If the trajectory input information recognized by the operating system of the electronic device belongs to formula handwriting input, the recognition information of the trajectory input information is sent to the application program A through a protocol interface between the electronic device and the application program A or a message channel between the operating system and the application program A, so that the recognition information is output through an input area of the application program A. In this way, the user does not need to switch between multiple application programs for content recognition, and can obtain handwriting input recognition results desired by the user through only one application program that does not support a target recognition type, thereby greatly improving user convenience.
[0092] The present application can make the user not dependent on a specific application program, and can improve user operation convenience when multiple types of trajectory input are implemented.
[0093] Figure 2 Flowchart for implementing the data processing method in the present application Figure Two As shown in Figure 2 the method includes:
[0094] In step 201, handwriting input recognition conversion function is preset in the operating system of the electronic device.
[0095] In step 202, a global pen writing function is implemented in the operating system, and a trajectory input information of an operating body is obtained through an input interface of the electronic device.
[0096] The input interface herein can be various user interfaces of the electronic device, such as a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touchpad, or a touch screen, etc. The input interface can also be a protocol interface between the operating system and an application program, or a message channel between the operating system and the application program.
[0097] In step 203, content recognition is performed on the trajectory input information in the operating system, and a recognition result is output.
[0098] Here, if the track input information is of the formula type, step 204 is performed; if the track input information is of the typesetting text type, step 205 is performed; if the track input information is of the graphic type, step 206 is performed; and if the track input information is of the letter type, step 207 is performed.
[0099] Step 204: outputting the recognition information of the formula type.
[0100] Step 205: outputting the recognition information of the typesetting text.
[0101] Step 206: outputting the recognition information of the graphic.
[0102] Step 207: outputting the recognition information of the letter.
[0103] In this way, the user can input content through pen writing in any scenario, thereby realizing pen writing coverage in all scenarios. Meanwhile, the user operation steps are simplified, and the user can use the electronic device more conveniently without relying on specific application programs or editing boxes.
[0104] It should be noted that the data processing method provided in the above embodiment, when performing track input information recognition, belongs to the same concept as the data processing method shown in Figure 1 , and the specific implementation process is described in the method embodiment, which will not be described here.
[0105] Figure 3 The structure of the electronic device in the present application is shown in Figure One , which includes an operating system, and the operating system includes: Figure 3 An acquisition unit 301 is configured to obtain parameter information related to track input of the electronic device, and obtain track input information of an operation body from an input interface of the electronic device in a track input state, and obtain recognition information based on the track input information.
[0106] A determination unit 302 is configured to determine, based on the parameter information, that the electronic device is in a track input state.
[0107] A sending unit 303 is configured to send the recognition information to a corresponding application program, so that the recognition information is output in an input area of the application program.
[0108] Here, the parameter information related to track input of the electronic device includes display parameters, application program function parameters, or sensor parameters.
[0109] In a preferred solution, the operating system further includes:
[0110]
[0111] The detection unit 304 is configured to detect whether a current application program comprises an input area, or detect whether the current application program is in a running state, or detect whether an operation body on the electronic device is separated from a first position of the electronic device.
[0112] The acquisition unit 301 is configured to acquire, as the parameter information related to the trajectory input of the electronic device, a display parameter representing the input area, if the detection unit 304 detects that the current application program comprises the input area, or acquire, as the parameter information related to the trajectory input of the electronic device, a function parameter representing the application program, if the detection unit 304 detects that the current application program is in the running state, or acquire, as the parameter information related to the trajectory input of the electronic device, a sensing parameter representing a separation event, if the detection unit 304 detects that the operation body is separated from the first position on the electronic device.
[0113] In a preferred implementation, the determination unit 302 is configured to determine that the electronic device is in the trajectory input state, if the detection unit 304 detects that the input area has the operation body input, when the acquisition unit 301 acquires the display parameter, or determine that the electronic device is in the trajectory input state, if the function parameter represents that the application program has the trajectory input function, when the acquisition unit 301 acquires the function parameter, or determine that the electronic device is in the trajectory input state, when the acquisition unit 301 acquires the sensing parameter.
[0114] In a preferred implementation, the operating system further comprises:
[0115] The receiving unit 305 is configured to receive a first notification message sent by an application program currently in a running state, the first notification message carrying parameter information representing whether the application program has a trajectory input function.
[0116] The acquisition unit 301 is further configured to acquire, based on the first notification message, a trajectory input type parameter supported by the application program, if the current application program has the trajectory input function, the trajectory input type parameter representing at least one of character input, figure input, letter input, and formula input.
[0117] In a preferred implementation, the operating system further comprises:
[0118] The comparison unit 306 is configured to compare a first trajectory input type parameter supported by the current application program with a second trajectory input type parameter supported by the operating system, after the acquisition unit 301 acquires the trajectory input type parameter supported by the application program.
[0119] The acquisition unit 301 is specifically configured to trigger the operating system to obtain input trajectory information of an operation body from an input interface of the electronic device in the trajectory input state if the function represented by the first trajectory input type parameter is less than the function represented by the second trajectory input type parameter.
[0120] In a preferred solution, the sending unit 303 is further configured to send a second notification message to the application program in the running state, the second notification message representing that the operating system obtains the trajectory input information from the input interface of the electronic device instead of the application program in the running state.
[0121] In a preferred solution, if there are multiple application programs currently running, the determination unit 302 is further configured to determine the position information of each application program based on a correspondence between the position information and the application program identification information carried in the trajectory input information.
[0122] The sending unit 303 is specifically configured to send the identification information to a target application program corresponding to the position information based on the position information of each application program, so that the target application program outputs the identification information in the corresponding input area.
[0123] In a preferred solution, if there are multiple target application programs corresponding to the position information, the acquisition unit 301 is further configured to acquire trajectory input type information supported by each target application program.
[0124] The sending unit 303 is specifically configured to send the identification information to a target application program that does not support a trajectory input type corresponding to the identification information among the multiple target application programs based on the trajectory input type information.
[0125] It should be noted that the electronic device provided in the above embodiments is only exemplified by the division of the above program modules when performing trajectory input information identification. In actual applications, the above processing can be completed by different program modules according to needs, that is, the internal structure of the electronic device is divided into different program modules to complete all or part of the above-described processing. In addition, the electronic device and the data processing method provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0126] The electronic device provided in the above embodiments is only exemplified by the division of the above program modules when performing trajectory input information identification. In actual applications, the above processing can be completed by different program modules according to needs, that is, the internal structure of the electronic device is divided into different program modules to complete all or part of the above-described processing. In addition, the electronic device and the data processing method provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0127] The processor is configured to execute the computer program to perform any one of the implementation solutions of the above data processing method.
[0128] Figure 4This is a schematic diagram of the structural composition of the electronic device in this application. Figure Two Electronic devices 400 can be mobile phones, computers, digital broadcasting terminals, information transceivers, game consoles, tablet devices, medical devices, fitness equipment, personal digital assistants, etc. Figure 4 The illustrated electronic device 400 includes at least one processor 401, a memory 402, at least one network interface 404, and a user interface 403. The various components in the electronic device 400 are coupled together via a bus system 405. It is understood that the bus system 405 is used to implement communication between these components. In addition to a data bus, the bus system 405 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 4 The general designated all buses as Bus System 405.
[0129] The user interface 403 may include a monitor, keyboard, mouse, trackball, click wheel, buttons, a touchpad, or a touchscreen. This user interface can serve as a concrete implementation of the input interface discussed above.
[0130] It can be understood that the memory 402 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a ferromagnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM can be used, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memory 402 described in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable type of memory.
[0131] The memory 402 in the embodiments of the present application is used to store various types of data to support the operation of the electronic device 400. Examples of the data include: any computer programs used for operation on the electronic device 400, such as an operating system 4021 and an application program 4022; contact data; phonebook data; messages; pictures; videos; and the like. The operating system 4021 contains various system programs, for example, a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application program 4022 can contain various application programs, for example, a media player (Media Player), a browser (Browser), and the like, for implementing various application services. The program implementing the method of the embodiments of the present application can be contained in the application program 4022.
[0132] The method disclosed in the embodiments of the present application can be applied in the operating system 4021.
[0133] Alternatively, the method disclosed in the embodiments of the present application can be applied in or implemented by the processor 401. The processor 401 can be an integrated circuit chip having a processing capability. In the implementation process, each step of the above method can be completed by integrated logic circuits or instruction of software form in the processor 401. The processor 401 described above can be a general-purpose processor, a digital signal processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or the like. The processor 401 can implement or execute the disclosed methods, steps, and logic block diagrams in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor, and the like. In combination with the steps of the method disclosed in the embodiments of the present application, the above-mentioned method can be directly embodied as a hardware coding processor to execute, or be executed by a combination of hardware and software modules in the coding processor. The software module can be located in a storage medium, and the storage medium is located in the memory 402. The processor 401 reads the information in the memory 402, and combines the hardware to complete the steps of the above-mentioned method.
[0134] In an exemplary embodiment, the electronic device 400 can be implemented by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, micro controllers (MCUs), microprocessors (Microprocessors), or other electronic elements for executing the aforementioned methods.
[0135] In an exemplary embodiment, the embodiments of the present application further provide a computer readable storage medium, for example, the memory 402 including a computer program, which can be executed by the operating system 4021 of the electronic device 400 to complete the steps of the aforementioned methods. The computer readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM, etc.; or can be various devices including one or any combination of the above memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0136] A computer readable storage medium, which stores a computer program, when the computer program is run by a processor, executes any one of the implementation schemes of the above data processing method.
[0137] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented by other ways. The device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling or direct coupling or communication connection between the various components shown or discussed can be through some interface, indirect coupling or communication connection between devices or units can be electrical, mechanical or other forms.
[0138] The units described above as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0139] The methods disclosed in the several method embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments.
[0140] The features disclosed in the several product embodiments provided by the present application can be combined arbitrarily without conflict to obtain new product embodiments.
[0141] The features disclosed in the several method or device embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments or device embodiments.
[0142] The above description is merely a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A data processing method applied to an operating system of an electronic device, the method comprising: obtaining parameter information related to a track input of the electronic device; determining that the electronic device is in a track input state based on the parameter information; triggering the operating system to obtain track input information of an operation body from an input interface of the electronic device in the track input state, comprising: sending a second notification message to an application in a running state, the second notification message indicating that the operating system obtains the track input information from the input interface of the electronic device instead of the application in the running state; obtaining identification information from a database of the electronic device or a cloud database based on the track input information; and sending the identification information to a corresponding application, so that the identification information corresponding to an input information type is output in an input area of the application; wherein the obtaining of the parameter information related to the track input of the electronic device comprises: if it is detected that a current application includes an input area, obtaining display parameters of the input area as the parameter information related to the track input of the electronic device; or if it is detected that a current application is in a running state, obtaining function parameters of the application as the parameter information related to the track input of the electronic device; or if it is detected that the operation body is separated from a first position on the electronic device, obtaining sensor parameters of a separation event as the parameter information related to the track input of the electronic device. 3.The method of claim 2, wherein the determining that the electronic device is in the track input state based on the parameter information comprises: in a case where the display parameters are obtained, detecting that the input area has operation body input, and determining that the electronic device is in the track input state; or in a case where the function parameters are obtained, determining that the electronic device is in the track input state if the function parameters indicate that the application has a track input function; or in a case where the sensor parameters are obtained, determining that the electronic device is in the track input state. 4.The method of claim 3, wherein the obtaining of the function parameters of the application comprises: receiving a first notification message sent by an application currently in a running state, the first notification message carrying parameter information indicating whether the application has a track input function. 5.The method of claim 4, further comprising: if the current application has a track input function, obtaining a track input type parameter supported by the application based on the first notification message, the track input type parameter indicating at least one of a character input, a figure input, a letter input, and a formula input. 6.The method of claim 5, wherein the triggering of the operating system to obtain the track input information of the operation body from the input interface of the electronic device comprises: comparing a first track input type parameter supported by the current application with a second track input type parameter supported by the operating system. 2.The method of claim 1, wherein the parameter information of the electronic device related to the trajectory input includes a display parameter, an application function parameter, or a sensor parameter. If the function represented by the first trajectory input type parameter is less than the function represented by the second trajectory input type parameter, triggering the operating system to obtain input trajectory information of an operation body from an input interface of the electronic device in the trajectory input state.
7. The method of claim 1, wherein sending the identification information to a corresponding application program comprises: If there are multiple currently running application programs, determining location information of each application program based on a correspondence between the location information and the application program identification information carried in the trajectory input information; Based on the location information of each application program, sending the identification information to a target application program corresponding to the location information, so that the target application program outputs the identification information in a corresponding input area.
8. The method of claim 7, further comprising: If there are multiple target application programs corresponding to the location information, obtaining trajectory input type information supported by each target application program; Based on the trajectory input type information, sending the identification information to a target application program that does not support a trajectory input type corresponding to the identification information among the multiple target application programs.
9. An electronic device having an operating system, the operating system comprising: an obtaining unit configured to obtain parameter information related to trajectory input of the electronic device; and obtain trajectory input information of an operation body from an input interface of the electronic device in a trajectory input state; and obtain identification information from a database of the electronic device or a cloud database based on the trajectory input information; a determining unit configured to determine that the electronic device is in a trajectory input state based on the parameter information; a sending unit configured to trigger the operating system to obtain the trajectory input information of the operation body from the input interface of the electronic device in the trajectory input state, including sending a second notification message to an application program in a running state, the second notification message representing that the operating system obtains the trajectory input information from the input interface of the electronic device instead of the application program in the running state; and send the identification information to a corresponding application program, so that the identification information corresponding to the input information type is output in an input area of the application program.
Citation Information
Patent Citations
Information searching method and information searching device
CN103064978A
Information processing method and electronic equipment
CN104932823A