Touch processing method, device, storage medium and electronic device
By monitoring and collecting multi-frame touch parameter information, combining displacement and marking status, the touch processing process is optimized, and the error judgment problem caused by users' non-subjective lifting of their fingers is solved, improving the accuracy and user experience of touch response.
Patent Information
- Application Number
- CN202110378625.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-08
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-04-08
AI Technical Summary
Existing touch processing technologies are difficult to accurately identify the user's touch status, especially when the user raises his fingers without subjectively, which leads to misjudgment of functional logic such as navigation gesture hovering, affecting the accuracy of touch response.
By monitoring and collecting at least two frames of touch parameter information, combining touch displacement and marking status, the operating system controls to determine the current touch status and optimizes the touch processing flow to improve accuracy.
Improve the accuracy of touch processing, reduce error response, enhance system compatibility and touch response accuracy, improve user experience, and avoid misjudgment caused by non-subjective lifting.
Smart Images

Figure CN113515217B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a touch processing method, device, storage medium and electronic device. Background Art
[0002] Touch screens have become a standard component of electronic devices, especially mobile electronic devices. Touch screens can be controlled by the underlying processor of the device. When a user touches the screen of the touch screen, it will cause a change in capacitance. By detecting the change in capacitance caused by the user touching the screen, the change in touch parameters when the user touches the touch screen can be obtained, and then the response of the touch function can be realized based on the change in touch parameters. Summary of the invention
[0003] The embodiments of the present application provide a touch processing method, device, storage medium and electronic device, and the technical solution is as follows:
[0004] In a first aspect, an embodiment of the present application provides a touch processing method, the method comprising:
[0005] Monitoring a touch operation input to the touch screen, and collecting at least two frames of touch parameter information corresponding to the touch operation;
[0006] Determine a current touch displacement based on first parameter information and second parameter information, and obtain a touch mark state corresponding to the current touch operation, wherein the first parameter information is current touch parameter information of the touch operation, and the second parameter information is touch parameter information of a previous frame of the first touch parameter information;
[0007] Based on the touch displacement and the touch mark state, the operating system is controlled to determine the touch state of the current touch operation.
[0008] In a second aspect, an embodiment of the present application provides a touch processing device, the device comprising:
[0009] A touch operation monitoring module, used to monitor the touch operation input to the touch screen and collect at least two frames of touch parameter information corresponding to the touch operation;
[0010] a state displacement determination module, configured to determine a current touch displacement based on first parameter information and second parameter information, and obtain a touch mark state corresponding to the current touch operation, wherein the first parameter information is the current touch parameter information of the touch operation, and the second parameter information is the touch parameter information of a frame before the first touch parameter information;
[0011] A touch state determination module is used to control an operating system to determine the touch state of the current touch operation based on the touch displacement and the touch mark state. In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above method steps.
[0012] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0013] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:
[0014] In one or more embodiments of the present application, the terminal can monitor the touch operation input to the touch screen, collect at least two frames of touch parameter information corresponding to the touch operation, determine the current touch displacement based on the current first parameter information of the touch operation and the second parameter information of the previous frame, and obtain the touch mark state corresponding to the current touch operation, and then control the operating system to determine the touch state of the current touch operation based on the touch displacement and the touch mark state. By combining the touch displacement and the touch mark state to control the decision logic of the touch state of the operating system, the accuracy of touch processing can be improved, and the touch error response can be reduced. By optimizing the touch processing process, the compatibility of different application functions of the system and the accuracy of touch response can be improved, and the user experience of touch can be improved; and the situation that the user non-subjectively lifts the contact object (finger) during the touch operation can be covered, so as to avoid the misjudgment of the function logic such as navigation gesture hovering caused by this, and the touch application in the touch scene such as the user stopping sliding, naturally lifting, and subjectively lifting during the terminal recognition of the touch operation can be improved, which greatly improves the accuracy of touch and avoids erroneous touch response. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 is a flow chart of a touch processing method provided in an embodiment of the present application;
[0017] Figure 2 is a schematic diagram of a touch scene involved in the touch processing method provided in an embodiment of the present application;
[0018] Figure 3 is a flow chart of another touch processing method provided in an embodiment of the present application;
[0019] Figure 4 is a flow chart of another touch processing method provided in an embodiment of the present application;
[0020] Figure 5 is a structural schematic diagram of a touch processing device provided in an embodiment of the present application;
[0021] Figure 6 is a structural diagram of a touch state determination module provided in an embodiment of the present application;
[0022] Figure 7 is a structural schematic diagram of another touch processing device provided in an embodiment of the present application;
[0023] Figure 8 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0024] Fig. 9 It is a schematic diagram of the structure of the operating system and user space provided in the embodiment of the present application;
[0025] Fig.10 yes Figure 8 The architecture diagram of the Android operating system;
[0026] Fig.11 yes Figure 8 Architecture diagram of the IOS operating system. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0028] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.
[0029] The present application is described in detail below with reference to specific embodiments.
[0030] In one embodiment, Figure 1 As shown, a touch processing method is proposed, which can be implemented by a computer program and can be run on a touch processing device based on the von Neumann system. The computer program can be integrated in an application or run as an independent tool application. The touch processing device can be a terminal, including but not limited to: a personal computer, a tablet computer, a handheld device, a vehicle-mounted device, a wearable device, a computing device or other processing device connected to a wireless modem. In different networks, terminal devices can be called different names, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, cellular phone, cordless phone, 5G network or terminal device in future evolution network, etc.
[0031] Specifically, the touch processing method includes:
[0032] S101: monitoring a touch operation input to a touch screen, and collecting at least two frames of touch parameter information corresponding to the touch operation.
[0033] The touch operation may be a sliding operation on a display object (icon, element, etc.), a drag operation on a display object, a pinch operation on a display object (such as a multi-finger pinch operation), etc. In some embodiments, the touch operation in this application can generally be understood as a type of operation with a longer continuous touch time (greater than a certain time threshold).
[0034] The present application monitors the entire touch process corresponding to the touch operation input by the user on the touch screen, and usually collects the touch parameter information of each frame corresponding to each monitoring time point to determine the touch state of the touch operation, realize accurate recognition of the touch operation, and avoid erroneous response.
[0035] It can be understood as the touch state corresponding to the touch operation at a certain monitoring time point, such as determining whether the current touch operation is in a pressing state, determining whether the current touch operation is in a lifting state (the user controls the finger to end the touch and switch from finger pressing to finger lifting). In some embodiments, the touch processing method involved in the present application can be based on the ergonomic dimension, and creatively and deeply explore the various influencing factors in the entire process of the touch operation input by the user to the touch screen, so as to avoid the situation of machine touch misrecognition caused by objective factors (such as the user non-subjectively lifting the finger during the touch process). In actual applications, in the process of the user inputting a touch operation (such as a sliding operation) to the touch screen of the terminal, it is assumed that the user normally lifts the finger at time t0 due to objective factors, and controls the finger to fall at time t1 to continue the touch operation (such as continuing the sliding operation). In this process, the user usually subjectively intends (or does not subjectively realize) to lift the finger at time t0 and interrupt the current touch operation. At this time, the terminal usually misjudges the touch state of the user's subjective input touch operation through the touch parameter information collected at time point t1, resulting in low touch processing accuracy and touch erroneous response.
[0036] In a specific implementation scenario, the terminal monitors the touch operation inputted to the touch screen, and the monitoring process is performed based on collecting at least two frames of touch parameter information corresponding to the touch operation at each monitoring time point. The basic principle process of the common application of the operating system carried by the terminal to process the user's touch operation such as clicking and sliding is as follows:
[0037] By monitoring the input event types reported by the underlying operating system, including but not limited to: corresponding ACTION_DOWN events, ACTION_MOVE events, and ACTION_UP events.
[0038] ACTION_DOWN event:
[0039] The user controls the finger to touch the touch screen of the terminal. At this time, the terminal can collect the first frame touch parameter information corresponding to the touch operation through the touch sensor. The pressing state corresponding to the first frame touch parameter information corresponds to the ACTION_DOWN event at this time; it can be understood that the terminal will trigger the ACTION_DOWN event based on the first frame touch parameter information.
[0040] Further, schematically, when the user controls the finger to press the first frame, an ACTION_DOWN event is triggered, and then the terminal can collect the i-th (i is greater than 1) frame data corresponding to the touch operation (that is, the i-th frame touch parameter information) through the touch sensor, and subsequent touch operations such as long pressing, moving, dragging, etc. all trigger ACTION_MOVE events accordingly:
[0041] ACTION_MOVE event:
[0042] Indicatively, the state of the finger being pressed in the second frame and subsequent consecutive data frames is an ACTION_MOVE event.
[0043] Further, schematically, the last frame of touch ending data (touch parameter information) corresponding to the touch operation usually triggers an ACTION_UP event of the operating system, which can be understood as the state of the finger being lifted is an ACTION_UP event.
[0044] In addition, in each of the above-mentioned input events, an event that triggers a certain input event type will carry the monitored data (touch parameter information) to report to the operating system, and then implement the operation function corresponding to the response operation based on the data written by these events, such as the navigation gesture hover function, the return to the main page function, the click application function, the drag application function, etc. Among them, the specific technical features involved in identifying a certain logical function based on the (touch parameter information) carried by the event and then responding to the logical function can be determined based on the actual environment and will not be explained here. This application mainly optimizes the touch processing process of "such as the user naturally lifts up his finger during the touch operation but actually does not intend to end the current touch operation subjectively". By taking into account the impact of the natural lift caused by non-subjective operations like the above on the terminal touch processing, the accuracy of touch processing is improved, and the subsequent misjudgment and erroneous response of logical functions caused by the user naturally lifting his finger during the touch operation state recognition process is avoided.
[0045] In some implementation scenarios, when a touch object is clicked by inputting a touch operation with a finger, an ACTION_DOWN event, an ACTION_MOVE event, and an ACTION_UP event are triggered. Among them, in the case of a click operation, if the ACTION_MOVE event of the operating system is triggered, the touch coordinate information in the data (touch parameter information) carried in the ACTION_MOVE event does not change, and the user's click response to the click object (such as an application) is usually identified based on this. In the scenario where the touch object is moved by touching, in this monitoring process, the touch parameter information monitored at each data collection data point can be used to identify the sliding response of the touch object. In specific implementations, the touch processing mainly needs to accurately identify that the user is subjectively in a lifted state or subjectively in a lifted state. The natural lifting of the finger due to objective factors can be eliminated or reduced by the touch processing method involved in this application.
[0046] Furthermore, the touch processing method involved in the present application is used to determine the current touch state of the touch operation, such as the pressing state corresponding to the user's touch pressing, and the lifting state (or releasing state) corresponding to the user's touch lifting (or releasing). In the process of the user inputting a touch operation (such as moving, dragging, dragging), the touch parameters contained in each frame of the collected touch parameter information are usually changed relative to the previous frame of data. At this time, the bottom layer of the terminal operating system (such as the bottom layer hardware driver) will report to the operating system after each data collection. If the touch parameters contained in the current touch parameter information are usually changed relative to the previous frame of data, the ACTION_MOVE event of the terminal operating system is triggered. The ACTION_MOVE event can carry touch parameter information. After the ACTION_MOVE event is further triggered, each application or service process installed or running based on the operating system can identify the logical function based on the touch parameter information in the ACTION_MOVE event and respond to the corresponding logical function. For example, logical functions such as sliding contact applications, sliding desktops, and sliding news pages.
[0047] Specifically, the terminal includes a touch screen, which is used to receive touch operations on or near it using any suitable object such as a finger, a touch pen, etc., and to display the user interface of each application. The touch screen is usually set on the front panel of the terminal. The touch screen can be designed as a full screen, a curved screen or a special-shaped screen. The touch screen can also be designed as a combination of a full screen and a curved screen, or a combination of a special-shaped screen and a curved screen, which is not limited in the embodiments of the present application.
[0048] In a specific embodiment, when a user inputs a touch operation to the touch screen by touching the finger, such as a touch sliding operation on a touch object, when the user touches the touch screen on the terminal with his finger, the capacitance parameter of the touch position changes, and the touch frame of the terminal determines the touch parameter information sensed by the finger in the current touch operation on the touch screen based on the change in capacitance.
[0049] Schematically, the terminal includes a touch screen, and the touch screen has the function of sensing the user's touch operation. The touch screen can be as follows Figure 2 A touch screen is shown, and its structure includes at least 4 parts: a screen glass layer a, a sensor film b, a display panel layer c, and a controller board d, wherein the sensor film b has a touch sensor layer, which contains a variety of sensors, such as pressure sensors, position sensors, electrical parameter sensors, etc. The touch screen of the terminal can obtain the touch position of the contact object through the sensors therein, and the touch sensor layer can sense the parameter changes of its touch position. In a specific implementation, the touch parameter information sensed by the contact object (such as a finger) in the current touch operation of the touch screen can be determined according to the changes in parameters such as the capacitance of the touch position.
[0050] Furthermore, when the user continues to touch, that is, when the touch operation is not completed, the terminal can collect touch parameter information corresponding to the current touch operation based on a certain monitoring interval.
[0051] The touch parameter information may include touch coordinates, touch pressure, current touch time, event information of a touch object (contact finger), and the like.
[0052] The event information of the touch object (contact finger) includes but is not limited to:
[0053] ABS_MT_POSITION_X: X surface coordinate of the center of the contact ellipse;
[0054] ABS_MT_POSITION_Y: Y surface coordinate of the center of the contact ellipse;
[0055] ABS_MT_TOOL_TYPE: The type of contact tool, such as finger, stylus. Usually it is a finger;
[0056] ABS_MT_ORIENTATION: orientation of the ellipse;
[0057] ABS_MT_TOUCH_MINOR The length of the minor axis of the contact surface, in surface units. If the contact surface is circular, this event can be ignored;
[0058] ABS_MT_WIDTH_MAJOR: The major axis length of the contact tool, in surface units.
[0059] ABS_MT_WIDTH_MINOR: minor axis length of the contact tool, in surface units.
[0060] ABS_MT_TRACKING_ID: TRACKING_ID identifies an initial contact and runs through the entire touch lifecycle.
[0061] S102: Determine a current touch displacement based on the first parameter information and the second parameter information, and obtain a touch mark state corresponding to the current touch operation.
[0062] The first parameter information is current touch parameter information of the touch operation, and the second parameter information is touch parameter information of a previous frame of the first touch parameter information.
[0063] In schematic form, assuming that the time point of the current touch data collection is time point t, then a frame of touch parameter information (touch coordinates, touch pressure, current touch time) of the touch operation acquired at the current time point t is the first parameter information; the time point of the previous frame collection corresponding to time point t is recorded as time point t -1 , then at time point t -1 The collected one frame of touch parameter information is the second parameter information.
[0064] In a specific implementation, if the user objectively and normally lifts his finger at time point t during the sliding process corresponding to the touch operation, the first parameter information corresponding to time point t is obtained. -1 The second parameter information collected, at this time, usually the touch point coordinates in the two frames of touch parameter information are unchanged, and some or all of the event information of the touch object (contact finger) such as ABS_MT_POSITION_X, ABS_MT_POSITION_Y, ABS_MT_WIDTH_MAJOR will change. At this time, the terminal operating system bottom layer reports the first parameter information to the operating system, which will trigger the ACTION_MOVE event, which will cause inaccurate touch processing. At this time, the user subjectively does not end the touch operation, resulting in inaccurate touch processing, affecting the user's touch experience. Accuracy can be improved by executing the touch processing method involved in this application.
[0065] Specifically, the terminal can determine the current touch displacement based on the first parameter information and the second parameter information. Specifically, it can extract the first touch coordinates corresponding to the first parameter information and the second touch coordinates corresponding to the second parameter information, and calculate the distance between the coordinates based on the first touch coordinates and the second touch coordinates, thereby determining the current touch displacement.
[0066] Furthermore, during the touch operation, the bottom layer of the terminal operating system can periodically collect capacitance data based on each data collection time point, determine touch parameter information based on the capacitance data, and then judge the touch state corresponding to the current touch operation based on the touch parameter information, and then mark the touch state of the touch operation at this data collection time point. If a pressed state is detected, the touch state corresponding to the touch operation at this monitoring time point is marked as a pressed mark state, and down_major_flag=1 can be recorded schematically to mark the touch mark state; if a lifted state is detected, the touch state corresponding to the touch operation at this monitoring time point is marked as a lifted mark state, and down_major_flag=0 can be recorded schematically to mark the touch mark state.
[0067] Optionally, the touch state corresponding to the current touch operation can be determined based on the touch parameter information based on touch pressure, ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MAJOR, etc. For example, if the touch pressure is greater than a certain pressure threshold, it is usually a pressed state; otherwise, it is a lifted state. For example, if the value of ABS_MT_TOUCH_MINOR is not 0, it can be considered as a pressed state, otherwise, it is a lifted state, etc.
[0068] S103: Based on the touch displacement and the touch mark state, control the operating system to determine the touch state of the current touch operation.
[0069] The touch mark states involved in this application may generally include a pressed mark state and a lifted mark state.
[0070] The touch state of the touch operation determined by the operating system may include a press state and a lift state.
[0071] Specifically, the terminal sets a displacement threshold for the touch displacement based on the actual application environment, and determines the touch state of the touch operation based on the set displacement threshold and the touch mark state of the touch operation of the current operating system; in actual implementation, the terminal can determine the target parameter information according to the touch displacement and the displacement threshold and the touch mark state; and use the target parameter information as a reference to determine whether to trigger an ACTION_MOVE event based on the target parameter information. Further, when the ACTION_MOVE event is triggered based on the target parameter information, the terminal usually controls the operating system to determine the touch state of the touch operation, and the touch state can be a pressed state or a lifted state.
[0072] According to some embodiments, when it is determined that the touch displacement is less than or equal to the displacement threshold and the touch mark state is the pressed mark state, the terminal can recognize that the contact object (such as a finger) is naturally lifted during the user input control operation based on the touch displacement, the displacement threshold and the touch mark state. In order to avoid false responses, the terminal can use the second parameter information, that is, the touch parameter information of the previous frame of the first touch parameter information, as the target parameter information that needs to be reported by the underlying layer of the current operating system. In this way, the terminal can control the system in the state identification stage based on the target parameter information. Since the two frames of touch parameter information, the second parameter information at the previous time point and the target parameter information at the current time point, have not changed, the ACTION_MOVE event will not be triggered at this time, and the operating system can be controlled not to change the touch state of the touch operation. In some embodiments, since the touch state of the touch operation corresponding to the previous time point is the pressed state, the terminal controls the operating system not to make changes at this time. Therefore, the touch state of the touch operation is determined to be the pressed state based on the target parameter information at the current time point; thereby, false responses can be avoided.
[0073] According to some embodiments, when the condition that "the touch displacement is less than or equal to the displacement threshold and the touch mark state is the pressed mark state" is not met, the terminal can report the current first parameter information as the target parameter information at this time. Since the two frames of touch parameter information, the second parameter information at the previous time point and the target parameter information at the current time point, usually change, the operating system ACTION_MOVE event will be triggered at this time, and the terminal controls the operating system to further determine the touch state of the target parameter information carried by the ACTION_MOVE event. In some implementation scenarios, after the terminal controls the operating system to further determine the touch state of the target parameter information carried by the ACTION_MOVE event, the touch state of the touch operation can be a lifted state, such as when the user subjectively lifts the contact object (such as only) and the touch displacement is greater than the displacement threshold, or when the touch mark state of the terminal at the current time point is a lifted mark state; in some implementation scenarios, after the terminal controls the operating system to further determine the touch state of the target parameter information carried by the ACTION_MOVE event, the touch state of the touch operation can be a pressed state, such as when the user presses the screen without releasing it and the touch displacement is greater than the displacement threshold. In some embodiments, for scenarios that do not meet the condition that "the touch displacement is less than or equal to the displacement threshold and the touch mark state is the press mark state", the touch state can be determined after the ACTION_MOVE event is triggered based on the actual application scenario, which will not be repeated here.
[0074] In an embodiment of the present application, the terminal can monitor the touch operation input to the touch screen, collect at least two frames of touch parameter information corresponding to the touch operation, determine the current touch displacement based on the current first parameter information of the touch operation and the second parameter information of the previous frame, and obtain the touch mark state corresponding to the current touch operation, and then control the operating system to determine the touch state of the current touch operation based on the touch displacement and the touch mark state. By combining the touch displacement and the touch mark state to control the judgment logic of the touch state of the operating system, the accuracy of touch processing can be improved, and the touch error response can be reduced. By optimizing the touch processing process, the compatibility and touch response accuracy of different application functions of the system can be improved, and the user experience of touch can be improved; and the situation that the user non-subjectively lifts the contact object (finger) during the touch operation can be covered, so as to avoid the misjudgment of the function logic such as navigation gesture hovering caused by this, and the touch application in the touch scene such as the user stopping sliding, naturally lifting, and subjectively lifting in the process of the terminal identifying the touch operation can be improved, which greatly improves the accuracy of touch and avoids wrong touch response.
[0075] See also Figure 3 , Figure 3 This is a flow chart of another embodiment of a touch processing method proposed in this application. Specifically:
[0076] S201: monitoring a touch operation input to a touch screen, and collecting at least two frames of touch parameter information corresponding to the touch operation;
[0077] Please refer to step S101 for details, which will not be described again here.
[0078] S202: determining a current touch displacement based on first parameter information and second parameter information, and acquiring a touch mark state corresponding to the current touch operation, wherein the first parameter information is current touch parameter information of the touch operation, and the second parameter information is touch parameter information of a previous frame of the first touch parameter information;
[0079] For details, please refer to step S102, which will not be repeated here.
[0080] S203: Determine that the touch displacement is less than or equal to the displacement threshold and the touch mark state is a press mark state, and use the second parameter information as the target parameter information;
[0081] S204: Based on the target parameter information, control the operating system to determine that the touch operation is a pressing state.
[0082] According to some embodiments, the terminal can determine the current touch displacement based on the first parameter information and the second parameter information. Specifically, it can extract the first touch coordinates corresponding to the first parameter information and the second touch coordinates corresponding to the second parameter information, and calculate the distance between the coordinates based on the first touch coordinates and the second touch coordinates, thereby determining the current touch displacement.
[0083] According to some embodiments, while a touch operation is in progress, the bottom layer of the terminal operating system can periodically collect capacitance data based on each data collection time point, determine touch parameter information based on the capacitance data, and then judge the touch state corresponding to the current touch operation based on the touch parameter information, and then mark the touch state of the touch operation at this data collection time point. For example, if a pressed state is detected, the touch state corresponding to the touch operation at this monitoring time point is marked as a pressed mark state, and down_major_flag=1 can be illustratively recorded to mark the touch mark state; if a lifted state is detected, the touch state corresponding to the touch operation at this monitoring time point is marked as a lifted mark state, and down_major_flag=0 can be illustratively recorded to mark the touch mark state.
[0084] Specifically, the terminal obtains the touch mark state corresponding to the current touch operation. If the touch mark state down_major_flag = 1, it is determined that the touch operation is marked as a press mark state in the touch screen sensing stage at the bottom layer of the terminal operating system; in some embodiments, the press mark state for the touch operation obtained by the terminal is usually the touch mark state determined by the operating system at the last monitoring time point, such as the touch mark state determined by the operating system based on the second parameter information.
[0085] The touch mark states involved in this application may generally include a pressed mark state and a lifted mark state.
[0086] The touch state of the touch operation determined by the operating system may include a press state and a lift state.
[0087] According to some embodiments, the terminal sets a displacement threshold for touch displacement based on the actual application environment, and determines the touch state of the touch operation based on the set displacement threshold and the touch mark state of the touch operation of the current operating system;
[0088] In actual implementation, the terminal may determine the target parameter information according to the touch displacement and displacement threshold and the touch mark state; and determine whether to trigger an ACTION_MOVE event based on the target parameter information with reference to the target parameter information. Further, when an ACTION_MOVE event is triggered based on the target parameter information, the terminal usually controls the operating system to determine the touch state of the touch operation, and the touch state may be a pressed state or a lifted state.
[0089] In this embodiment, when it is determined that the touch displacement is less than or equal to the displacement threshold and the touch mark state is the pressed mark state, the terminal can recognize that the contact object (such as a finger) is naturally lifted during the user input control operation based on the touch displacement, the displacement threshold and the touch mark state. In order to avoid false responses, the terminal can use the second parameter information, that is, the touch parameter information of the previous frame of the first touch parameter information, as the target parameter information that needs to be reported by the underlying layer of the current operating system. In this way, the terminal can control the system in the state identification stage based on the target parameter information. Since the two frames of touch parameter information, the second parameter information at the previous time point and the target parameter information at the current time point, have not changed, the ACTION_MOVE event will not be triggered at this time, and the controllable operating system will not change the touch state of the touch operation. In some embodiments, since the touch state of the touch operation corresponding to the previous time point is the pressed state, the terminal controls the operating system not to make changes at this time. Therefore, the touch state of the touch operation is determined to be the pressed state based on the target parameter information at the current time point; thereby, false responses can be avoided.
[0090] Among them, the aforementioned displacement threshold can be understood as a critical value or threshold value set for touch displacement. In the present application, the judgment of the user's non-subjective lifting of the contact object (finger) during the touch operation can be realized based on the displacement threshold; in some embodiments, the displacement threshold can be a threshold range set with pixel points as reference, such as the displacement threshold can be a displacement range corresponding to a pixel point set based on the actual application environment.
[0091] In a specific implementation scenario, after the terminal determines that the touch displacement is less than or equal to the displacement threshold and the touch mark state is a pressed mark state, the target parameter information carrying a state indication mark can be generated; the state indication mark is used to instruct the operating system to mark the touch state of the touch operation as a pressed state. In actual implementation, after the terminal determines that the touch displacement is less than or equal to the displacement threshold and the touch mark state is a pressed mark state, the first parameter information can be used as the target parameter information, and the target parameter information is written to the state indication mark. It can be understood that the state indication mark represents the natural lifting of the contact object (such as a finger) during the current user input manipulation operation. In this case, the terminal operating system only needs to determine whether the target parameter information carries a state indication mark. If it carries a state indication mark, the touch state of the touch operation can be marked as a pressed state.
[0092] S205: Determine that the touch displacement is greater than a displacement threshold, and / or the touch mark state is a lifted mark state, and use the first parameter information as target parameter information;
[0093] S206: Determine that the touch displacement is less than a displacement threshold, and the touch mark state is a lifted mark state, and use the first parameter information as target parameter information.
[0094] According to some embodiments, 1. If the touch displacement is greater than the displacement threshold, this is usually not the case where the user lifts the contact object (finger) non-subjectively during the touch operation; and, 2. If the touch mark state is the lift mark state, this is usually not the case where the user lifts the contact object (finger) non-subjectively during the touch operation, and it can be understood that the user lifts the contact object (finger) subjectively during the touch operation; 3. If the touch displacement is greater than the displacement threshold, and the touch mark state is the lift mark state, this is usually not the case where the user lifts the contact object (finger) non-subjectively during the touch operation. 4. If the touch displacement is less than the displacement threshold, and the touch mark state is the lift mark state, this is usually not the case where the user lifts the contact object (finger) non-subjectively during the touch operation.
[0095] In the above scenario, the terminal can use the first parameter information as the target parameter information without processing;
[0096] S207: Based on the target parameter information, control the operating system to determine the touch state of the current touch operation.
[0097] Specifically, in S207, the target parameter information is usually the first parameter information. In actual applications, the bottom layer of the terminal operating system can report the current first parameter information as the target parameter information to the operating system. Since the two frames of touch parameter information, the second parameter information at the previous time point and the target parameter information at the current time point, usually change, the operating system ACTION_MOVE event will be triggered at this time, and the terminal controls the operating system to further determine the touch state of the target parameter information carried by the ACTION_MOVE event. Furthermore, the touch state can be determined after the ACTION_MOVE event is triggered based on the actual application scenario. The determination process can be based on the touch response logic setting corresponding to at least one function on the terminal, which will not be described in detail here.
[0098] In the embodiments of the present application, .
[0099] See also Figure 4 , Figure 4 This is a flow chart of another embodiment of a touch processing method proposed in this application. Specifically:
[0100] S301: Collecting individual touch characteristics and object physiological characteristics for the current user object, and determining a displacement threshold for touch displacement based on the individual touch characteristics and object physiological characteristics.
[0101] The individual touch characteristics are used to characterize the unique features that can distinguish independent individual users from other touch objects when performing touch operations. For the user's touch input characteristics corresponding to the user's non-subjective natural lifting of the contact object during the touch operation, the individual touch characteristics of different individual users are different in daily life. Specifically, they can be mapped to at least one of the individual touch characteristics of "the user's non-subjective natural lifting of the contact object during the touch operation" (feedback on the individual user's "when the user non-subjectively lifts the contact object during the touch operation)", touch distance characteristics, touch speed characteristics, touch acceleration characteristics, touch direction characteristics, touch trajectory characteristics, touch pressure characteristics, contact surface characteristics corresponding to the contact object and the screen, stimulated reaction degree characteristics, etc. during daily touch operations.
[0102] The physiological characteristics of the object are the gender characteristics, age characteristics, surface characteristics of the contact object (such as fingers), body characteristics such as "blood pressure, blood oxygen, heart rate", etc. of the individual user. Among them, the determination of the individual touch characteristics can be determined based on the touch data corresponding to the daily touch operation of the individual user, that is, the touch record data of the daily touch operation is obtained to extract the individual touch characteristics according to the "extraction rules of sub-features of each dimension corresponding to the individual touch characteristics of the individual user"; on the other hand, the individual user can be provided with a touch individual feature collection function. As a human-computer interaction function, the touch individual feature collection function can develop a collection environment for the collection of touch individual features, guide individual users to input some functional touch operations by touch, and extract the individual touch characteristics according to the "extraction rules of sub-features of each dimension corresponding to the individual touch characteristics of the individual user" by collecting the touch data during the touch operation of each function.
[0103] In the present application, the touch processing process can be quantified based on the two dimensions of individual touch characteristics of individual users and physiological characteristics of the object. The characteristic scenes corresponding to the user's non-subjective natural lifting of the contact object during the touch operation can be further fine-grainedly mined to determine the displacement threshold that matches different individual users. Based on the displacement threshold, the prediction and judgment of the non-subjective lifting of the contact object during the touch operation can be realized to improve the accuracy of touch processing and avoid subsequent misjudgment and erroneous response of logical functions caused by the user's natural lifting of their fingers during the touch operation state recognition process.
[0104] In a specific implementation scenario, after the terminal collects the individual touch characteristics and the physiological characteristics of the object for the current user object,
[0105] The parameters corresponding to the acquired touch individual features and object physiological features can be input into a trained threshold determination model to output a displacement threshold for touch displacement. The threshold determination model can be trained by a plurality of known annotated thresholds, sample touch individual features, and touch parameter samples corresponding to sample object physiological features.
[0106] Specifically, a large amount of sample data is obtained in advance for a large number of different individual users in an actual application environment, feature information is extracted, and the sample data (i.e., touch parameter samples) are annotated, and the sample data is labeled with "known annotation thresholds". The feature information includes parameters corresponding to the sample touch individual features and the sample object physiological features, and an initial threshold determination model is created. The threshold determination model can be trained using a large amount of sample data. For example, the threshold determination model can be based on one or more implementations of LR (Logistic Regression), SVM (Support Vector Machine), decision tree, naive Bayes classifier, CNN (Convolutional Neural Network), RNN (Recurrent Neural Networks), etc. The initial threshold determination model is trained based on sample data that have been annotated with labels (gear adjustment speed and adjustment duration), and a trained threshold determination model can be obtained.
[0107] Furthermore, in this embodiment, a DNN-HMM model that introduces an error back propagation algorithm is used to create an initial threshold determination model. After extracting the feature information, the feature information is input into the neural network model in the form of a feature vector. The training process of the neural network model usually consists of two parts: forward propagation and back propagation. During the forward propagation process, the feature information corresponding to the terminal input sample data is transmitted from the input layer of the neural network model to the output layer after being calculated by the transfer function (also called activation function, conversion function) of the hidden layer neurons (also called nodes). The state of each layer of neurons affects the state of the next layer of neurons. The actual output value-first voice identifier is calculated in the output layer, and the expected error between the actual output value and the expected output value is calculated. The parameters of the neural network model are adjusted based on the expected error. The parameters include the weight value and threshold of each layer. After the training is completed, a threshold determination model is generated.
[0108] Specifically, the expected error may be a mean square error (MSE) between an actual output value and an expected output value. The mean square error (MSE) may be calculated using the following formula:
[0109]
[0110] Among them, m is the number of output nodes, p is the number of training samples, is the expected output value, and is the actual output value.
[0111] Inputting at least one of the individual touch feature and the physiological feature of the object into a threshold determination model, outputting a displacement threshold for touch displacement,
[0112] S302: monitoring a touch operation input to the touch screen, and collecting at least two frames of touch parameter information corresponding to the touch operation;
[0113] Please refer to step S101 for details, which will not be described again here.
[0114] S303: determining a current touch displacement based on first parameter information and second parameter information, and acquiring a touch mark state corresponding to the current touch operation, wherein the first parameter information is current touch parameter information of the touch operation, and the second parameter information is touch parameter information of a previous frame of the first touch parameter information;
[0115] For details, please refer to step S102, which will not be repeated here.
[0116] S304: Determine that the touch displacement is less than or equal to the displacement threshold and the touch mark state is a press mark state, and obtain a state determination sampling point for the current user;
[0117] The state determination sampling point is before a time point corresponding to the next frame parameter information of the first parameter information.
[0118] Specifically, in the present application, a state determination sampling point is set to further determine whether it is a scenario of "when the user naturally lifts the contact object non-subjectively during the touch operation)". After determining that the touch displacement is less than or equal to the displacement threshold and the touch mark state is a pressed mark state, a monitoring sampling time point is set, and reference parameter information corresponding to the touch operation is collected at the monitoring sampling time point, so as to re-judge the reference parameter information, avoid false touch processing, and improve the judgment accuracy.
[0119] Furthermore, the state determination sampling point can be set arbitrarily, as long as the state determination sampling point is before the time point corresponding to the next frame parameter information of the first parameter information; or it can be based on a pre-set time interval, based on the sampling time point of the first parameter information and the time interval to determine the state determination sampling point. In some embodiments, a mapping relationship between a reference time interval and a touch feature can be pre-established based on touch features such as touch pressure and touch position. In actual applications, the time interval is determined based on the touch features of the current first parameter information, and then the state determination sampling point is determined, and so on.
[0120] S305: Collect reference parameter information corresponding to the touch operation at the state determination sampling point, and determine target parameter information based on the reference parameter information and the first parameter information.
[0121] Specifically, the terminal may calculate the difference between the reference parameter information and the first parameter information, and measure or quantify the likelihood of "the user naturally lifting the contact object non-subjectively during the touch operation" based on the difference. The smaller the difference, the closer the judgment of "the user naturally lifting the contact object non-subjectively during the touch operation" is to the actual situation. Among them, it may be a difference score value determined after calculating the difference feature information (such as the difference parameter value) between the parameters corresponding to the reference parameter information and the parameter features (touch features such as displacement, position, and coordinates) in the first parameter information corresponding to the parameters. When the difference score value is greater than the set difference threshold, it can be considered that the judgment deviates from the actual situation, and the reference parameter information can be used as the target parameter. When the difference score value is less than or equal to the set difference threshold, it can be considered that the judgment is close to the actual situation with high confidence. Usually, it can be considered that "the user naturally lifts the contact object non-subjectively during the touch operation", and the second parameter information can be used as the target parameter.
[0122] S306: Based on the target parameter information, control the operating system to determine a touch state of the touch operation.
[0123] For details, please refer to step S103, which will not be described again here.
[0124] In an embodiment of the present application, the terminal can monitor the touch operation input to the touch screen, collect at least two frames of touch parameter information corresponding to the touch operation, determine the current touch displacement based on the current first parameter information of the touch operation and the second parameter information of the previous frame, and obtain the touch mark state corresponding to the current touch operation, and then control the operating system to determine the touch state of the current touch operation based on the touch displacement and the touch mark state. By combining the touch displacement and the touch mark state to control the judgment logic of the touch state of the operating system, the accuracy of touch processing can be improved, and the touch error response can be reduced. By optimizing the touch processing process, the compatibility and touch response accuracy of different application functions of the system can be improved, and the user experience of touch can be improved; and the situation that the user non-subjectively lifts the contact object (finger) during the touch operation can be covered, so as to avoid the misjudgment of the function logic such as navigation gesture hovering caused by this, and the touch application in the touch scene such as the user stopping sliding, naturally lifting, and subjectively lifting in the process of the terminal identifying the touch operation can be improved, which greatly improves the accuracy of touch and avoids wrong touch response.
[0125] The following will be combined Figure 5, the touch processing device provided in the embodiment of the present application is introduced in detail. It should be noted that, Figure 5 The touch processing device shown is used to execute the present application Figure 1 to Figure 4 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 1 to Figure 6 The embodiment shown.
[0126] See also Figure 5 , which shows a schematic diagram of the structure of the touch processing device of an embodiment of the present application. The touch processing device 1 can be implemented as all or part of the user terminal through software, hardware or a combination of both. According to some embodiments, the touch processing device 1 includes a touch operation monitoring module 11, a state displacement determination module 12 and a touch state determination module 13, which are specifically used to:
[0127] A touch operation monitoring module 11 is used to monitor the touch operation input to the touch screen and collect at least two frames of touch parameter information corresponding to the touch operation;
[0128] A state displacement determination module 12 is used to determine a current touch displacement based on first parameter information and second parameter information, and obtain a touch mark state corresponding to the current touch operation, wherein the first parameter information is the current touch parameter information of the touch operation, and the second parameter information is the touch parameter information of a frame before the first touch parameter information;
[0129] The touch state determination module 13 is used to control the operating system to determine the touch state of the current touch operation based on the touch displacement and the touch mark state.
[0130] Optional, such as Figure 6 As shown, the touch state determination module 13 includes:
[0131] A target parameter determination unit 131, configured to determine target parameter information according to the touch displacement and the displacement threshold and the touch mark state;
[0132] The touch state determining unit 132 is used to control the operating system to determine the touch state of the touch operation based on the target parameter information.
[0133] Optionally, the target parameter determination unit 131 is specifically configured to:
[0134] Determine that the touch displacement is less than or equal to the displacement threshold and the touch mark state is a press mark state, and use the second parameter information as the target parameter information;
[0135] The touch state determining unit 132 is specifically configured to control the operating system to determine that the touch operation is a pressing state based on the target parameter information.
[0136] Optionally, the target parameter determination unit 131 is specifically configured to:
[0137] Determine that the touch displacement is greater than the displacement threshold, and / or the touch mark state is a lifted mark state, and use the first parameter information as the target parameter information; or determine that the touch displacement is greater than the displacement threshold and the touch mark state is a pressed mark state, and use the first parameter information as the target parameter information.
[0138] Optional, such as Figure 7 As shown, the device 1 further includes:
[0139] The displacement threshold determination module 14 is used to collect individual touch characteristics and object physiological characteristics for the current user object, and determine a displacement threshold for touch displacement based on the individual touch characteristics and object physiological characteristics.
[0140] Optionally, the displacement threshold determination module 14 is specifically configured to:
[0141] At least one of the touch individual feature and the object physiological feature is input into a threshold determination model, and a displacement threshold for touch displacement is output. The threshold determination model is trained by touch parameter samples corresponding to multiple known labeled thresholds, sample touch individual features, and sample object physiological features.
[0142] Optionally, the target parameter determination unit 131 is specifically configured to:
[0143] Determine that the touch displacement is less than or equal to the displacement threshold and the touch mark state is a pressed mark state, and generate target parameter information carrying a state indication mark; the state indication mark is used to instruct the operating system to mark the touch state of the touch operation as a pressed state.
[0144] Optionally, the target parameter determination unit 131 is specifically configured to:
[0145] Determine that the touch displacement is less than or equal to a displacement threshold and the touch mark state is a press mark state, and obtain a state determination sampling point for the current user;
[0146] Collecting reference parameter information corresponding to the touch operation at the state determination sampling point, and determining target parameter information based on the reference parameter information and the second parameter information;
[0147] The state determination sampling point is before a time point corresponding to the next frame parameter information of the first parameter information.
[0148] It should be noted that the touch processing device provided in the above embodiment only uses the division of the above functional modules as an example when executing the touch processing method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the touch processing device provided in the above embodiment and the touch processing method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0149] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0150] In an embodiment of the present application, the terminal can monitor the touch operation input to the touch screen, collect at least two frames of touch parameter information corresponding to the touch operation, determine the current touch displacement based on the current first parameter information of the touch operation and the second parameter information of the previous frame, and obtain the touch mark state corresponding to the current touch operation, and then control the operating system to determine the touch state of the current touch operation based on the touch displacement and the touch mark state. By combining the touch displacement and the touch mark state to control the judgment logic of the touch state of the operating system, the accuracy of touch processing can be improved, and the touch error response can be reduced. By optimizing the touch processing process, the compatibility and touch response accuracy of different application functions of the system can be improved, and the user experience of touch can be improved; and the situation that the user non-subjectively lifts the contact object (finger) during the touch operation can be covered, so as to avoid the misjudgment of the function logic such as navigation gesture hovering caused by this, and the touch application in the touch scene such as the user stopping sliding, naturally lifting, and subjectively lifting in the process of the terminal identifying the touch operation can be improved, which greatly improves the accuracy of touch and avoids wrong touch response.
[0151] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 1 to Figure 4 The touch processing method of the embodiment shown in the figure can be specifically executed by referring to Figure 1 to Figure 4 The specific description of the illustrated embodiment will not be repeated here.
[0152] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1 to Figure 4 The touch processing method of the embodiment shown in the figure can be specifically executed by referring to Figure 1 to Figure 4 The specific description of the illustrated embodiment will not be repeated here.
[0153] Please refer to Figure 8, which shows a block diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. The electronic device in the present application may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 may be connected via the bus 150.
[0154] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.
[0155] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The operating system may be an Android system, including a system deeply developed based on the Android system, an IOS system developed by Apple, including a system deeply developed based on the IOS system or other systems. The data storage area may also store data created by the electronic device during use, such as a phone book, audio and video data, chat record data, etc.
[0156] See also Fig. 9 As shown, the memory 120 can be divided into an operating system space and a user space. The operating system runs in the operating system space, and native and third-party applications run in the user space. In order to ensure that different third-party applications can achieve good operating results, the operating system allocates corresponding system resources to different third-party applications. However, different application scenarios in the same third-party application also have different requirements for system resources. For example, in the local resource loading scenario, the third-party application has higher requirements for disk reading speed; in the animation rendering scenario, the third-party application has higher requirements for GPU performance. The operating system and third-party applications are independent of each other, and the operating system often cannot perceive the current application scenario of the third-party application in a timely manner, resulting in the operating system being unable to perform targeted system resource adaptation according to the specific application scenario of the third-party application.
[0157] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to open up data communication between third-party applications and the operating system so that the operating system can obtain the current scenario information of third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.
[0158] Taking the Android operating system as an example, the programs and data stored in the memory 120 are as follows: Fig.10As shown, the memory 120 may store a Linux kernel layer 320, a system runtime library layer 340, an application framework layer 360 and an application layer 380, wherein the Linux kernel layer 320, the system runtime library layer 340 and the application framework layer 360 belong to the operating system space, and the application layer 380 belongs to the user space. The Linux kernel layer 320 provides underlying drivers for various hardware of electronic devices, such as display drivers, audio drivers, camera drivers, Bluetooth drivers, Wi-Fi drivers, power management, etc. The system runtime library layer 340 provides the main feature support for the Android system through some C / C++ libraries. For example, the SQLite library provides database support, the OpenGL / ES library provides 3D drawing support, and the Webkit library provides browser kernel support, etc. The Android runtime library (Android runtime) is also provided in the system runtime library layer 340, which mainly provides some core libraries that allow developers to use the Java language to write Android applications. The application framework layer 360 provides various APIs that may be used when building applications. Developers can also use these APIs to build their own applications, such as activity management, window management, view management, notification management, content provider, package management, call management, resource management, and location management. At least one application runs in the application layer 380. These applications can be native applications that come with the operating system, such as contact applications, text messaging applications, clock applications, camera applications, etc.; they can also be third-party applications developed by third-party developers, such as game applications, instant messaging applications, photo beautification applications, etc.
[0159] Taking the operating system as an IOS system as an example, the programs and data stored in the memory 120 are as follows: Fig.10As shown, the IOS system includes: a core operating system layer 420 (Core OS layer), a core service layer 440 (Core Services layer), a media layer 460 (Media layer), and a touchable layer 480 (Cocoa Touch Layer). The core operating system layer 420 includes the operating system kernel, drivers, and underlying program frameworks, which provide functions closer to the hardware for use by the program framework located in the core service layer 440. The core service layer 440 provides system services and / or program frameworks required by the application, such as the foundation framework, account framework, advertising framework, data storage framework, network connection framework, geographic location framework, motion framework, etc. The media layer 460 provides audio-visual interfaces for the application, such as graphics and image related interfaces, audio technology related interfaces, video technology related interfaces, and wireless playback (AirPlay) interfaces for audio and video transmission technologies. The touchable layer 480 provides various commonly used interface-related frameworks for application development, and the touchable layer 480 is responsible for the user's touch interaction operations on the electronic device. For example, local notification service, remote push service, advertising framework, game tool framework, message user interface (UI) framework, user interface UIKit framework, map framework, etc.
[0160] exist Fig.11 Among the frameworks shown, the frameworks related to most applications include but are not limited to: the basic framework in the core service layer 440 and the UIKit framework in the touchable layer 480. The basic framework provides many basic object classes and data types, provides the most basic system services for all applications, and has nothing to do with UI. The classes provided by the UIKit framework are basic UI class libraries for creating touch-based user interfaces. iOS applications can provide UIs based on the UIKit framework, so it provides the basic architecture of applications for building user interfaces, drawing, processing and user interaction events, responding to gestures, etc.
[0161] Among them, the method and principle of implementing data communication between third-party applications and the operating system in the IOS system can be referred to the Android system, and this application will not go into details here.
[0162] Among them, the input device 130 is used to receive input instructions or data, and the input device 130 includes but is not limited to a keyboard, a mouse, a camera, a microphone or a touch device. The output device 140 is used to output instructions or data, and the output device 140 includes but is not limited to a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 are touch screens, which are used to receive touch operations on or near them by users using any suitable objects such as fingers and touch pens, and to display the user interfaces of various applications. The touch screen is usually set on the front panel of the electronic device. The touch screen can be designed as a full screen, a curved screen or a special-shaped screen. The touch screen can also be designed as a combination of a full screen and a curved screen, or a combination of a special-shaped screen and a curved screen, which is not limited in the embodiments of the present application.
[0163] In addition, those skilled in the art will appreciate that the structure of the electronic device shown in the above drawings does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the electronic device also includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a Bluetooth module and other components, which will not be described in detail here.
[0164] In the embodiment of the present application, the execution subject of each step may be the electronic device described above. Optionally, the execution subject of each step is the operating system of the electronic device. The operating system may be an Android system, an IOS system, or other operating systems, which is not limited in the embodiment of the present application.
[0165] The electronic device of the embodiment of the present application may also be equipped with a display device, which may be various devices capable of realizing a display function, such as a cathode ray tube display (CR), a light-emitting diode display (LED), an electronic ink screen, a liquid crystal display (LCD), a plasma display panel (PDP), etc. The user may use the display device on the electronic device to view displayed text, images, videos and other information. The electronic device may be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality) device, a car, a data storage device, an audio playback device, a video playback device, a notebook, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, electronic clothing and other devices.
[0166] exist Figure 8 In the electronic device shown, which may be a terminal, the processor 110 may be used to call the touch processing application stored in the memory 120, and specifically perform the following operations:
[0167] Monitoring a touch operation input to the touch screen, and collecting at least two frames of touch parameter information corresponding to the touch operation;
[0168] Determine a current touch displacement based on first parameter information and second parameter information, and obtain a touch mark state corresponding to the current touch operation, wherein the first parameter information is current touch parameter information of the touch operation, and the second parameter information is touch parameter information of a previous frame of the first touch parameter information;
[0169] Based on the touch displacement and the touch mark state, the operating system is controlled to determine the touch state of the current touch operation.
[0170] In one embodiment, when the processor 110 controls the operating system to determine the touch state of the current touch operation based on the touch displacement and the touch mark state, the processor 110 specifically performs the following operations:
[0171] Determining target parameter information according to the touch displacement and the displacement threshold and the touch mark state;
[0172] Based on the target parameter information, the operating system is controlled to determine a touch state of the touch operation.
[0173] In one embodiment, when the processor 110 determines the target parameter information according to the touch displacement and the displacement threshold and the touch mark state, the processor 110 specifically performs the following operations:
[0174] Determine that the touch displacement is less than or equal to the displacement threshold and the touch mark state is a press mark state, and use the second parameter information as the target parameter information;
[0175] The controlling the operating system to mark the touch state of the touch operation based on the target parameter information includes:
[0176] Based on the target parameter information, the control operating system determines that the touch operation is a pressing state.
[0177] In one embodiment, when the processor 110 determines the target parameter information according to the touch displacement and the displacement threshold and the touch mark state, the processor 110 specifically performs the following operations:
[0178] Determine that the touch displacement is greater than the displacement threshold, and / or the touch mark state is a lifted mark state, and use the first parameter information as the target parameter information; or determine that the touch displacement is greater than the displacement threshold and the touch mark state is a pressed mark state, and use the first parameter information as the target parameter information.
[0179] In one embodiment, before executing the monitoring of the touch operation input to the touch screen and collecting at least two frames of touch parameter information corresponding to the touch operation, the processor 110 further performs the following operations:
[0180] The individual touch characteristics and the object physiological characteristics for the current user object are collected, and a displacement threshold for touch displacement is determined based on the individual touch characteristics and the object physiological characteristics.
[0181] In one embodiment, when the processor 110 determines the displacement threshold based on the touch individual characteristics and the object physiological characteristics, the processor 110 specifically performs the following operations:
[0182] At least one of the touch individual feature and the object physiological feature is input into a threshold determination model, and a displacement threshold for touch displacement is output. The threshold determination model is trained by touch parameter samples corresponding to multiple known labeled thresholds, sample touch individual features, and sample object physiological features.
[0183] In one embodiment, when the processor 110 determines the target parameter information according to the touch displacement and the displacement threshold and the touch mark state, the processor 110 specifically performs the following operations:
[0184] Determine that the touch displacement is less than or equal to the displacement threshold and the touch mark state is a pressed mark state, and generate target parameter information carrying a state indication mark; the state indication mark is used to instruct the operating system to mark the touch state of the touch operation as a pressed state.
[0185] In one embodiment, when the processor 110 determines the target parameter information according to the touch displacement and the displacement threshold and the touch mark state, the processor 110 specifically performs the following operations:
[0186] Determine that the touch displacement is less than or equal to a displacement threshold and the touch mark state is a press mark state, and obtain a state determination sampling point for the current user;
[0187] Collecting reference parameter information corresponding to the touch operation at the state determination sampling point, and determining target parameter information based on the reference parameter information and the second parameter information;
[0188] The state determination sampling point is before a time point corresponding to the next frame parameter information of the first parameter information.
[0189] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0190] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A touch processing method, characterized in that: The method comprises: Monitoring a touch operation input to the touch screen, and collecting at least two frames of touch parameter information corresponding to the touch operation; Determine a current touch displacement based on first parameter information and second parameter information, and obtain a touch mark state corresponding to the current touch operation, wherein the first parameter information is current touch parameter information of the touch operation, and the second parameter information is touch parameter information of a previous frame of the first touch parameter information; Determine that the touch displacement is less than or equal to the displacement threshold and the touch mark state is a press mark state, and use the second parameter information as the target parameter information; Determine that the touch displacement is greater than the displacement threshold and / or the touch mark state is a lifted mark state, and use the first parameter information as the target parameter information; or determine that the touch displacement is less than the displacement threshold and the touch mark state is a lifted mark state, and use the first parameter information as the target parameter information; Based on the target parameter information, the operating system is controlled to determine a touch state of the touch operation.
2. The method according to claim 1, characterized in that The controlling the operating system to mark the touch state of the touch operation based on the target parameter information includes: Based on the target parameter information, the control operating system determines that the touch operation is a pressing state.
3. The method according to claim 1, characterized in that Before the touch operation input to the touch screen is detected and at least two frames of touch parameter information corresponding to the touch operation are collected, the method further includes: The individual touch characteristics and the object physiological characteristics for the current user object are collected, and a displacement threshold for touch displacement is determined based on the individual touch characteristics and the object physiological characteristics.
4. The method according to claim 1, characterized in that: The determining of the displacement threshold based on the touch individual characteristics and the object physiological characteristics includes: At least one of the touch individual feature and the object physiological feature is input into a threshold determination model, and a displacement threshold for touch displacement is output. The threshold determination model is trained by touch parameter samples corresponding to multiple known labeled thresholds, sample touch individual features, and sample object physiological features.
5. The method according to claim 1, characterized in that The determining target parameter information according to the touch displacement and the displacement threshold and the touch mark state includes: Determine that the touch displacement is less than or equal to the displacement threshold and the touch mark state is a pressed mark state, and generate target parameter information carrying a state indication mark; the state indication mark is used to instruct the operating system to mark the touch state of the touch operation as a pressed state.
6. The method according to claim 1, characterized in that The determining target parameter information according to the touch displacement and the displacement threshold and the touch mark state includes: Determine that the touch displacement is less than or equal to a displacement threshold and the touch mark state is a press mark state, and obtain a state determination sampling point for the current user; Collecting reference parameter information corresponding to the touch operation at the state determination sampling point, and determining target parameter information based on the reference parameter information and the second parameter information; The state determination sampling point is before a time point corresponding to the next frame parameter information of the first parameter information.
7. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 6.
8. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 6.
