Data processing method and electronic equipment
By detecting the close events and touch events of the target object near the display screen of the electronic device, and adjusting the working status of the display screen, the inaccurate response problem caused by overlapping the light sensor and the display screen is solved, and the user experience is improved.
Patent Information
- Application Number
- CN202411998715.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-06
AI Technical Summary
In electronic devices, the overlapping area between the light sensor and the display screen makes it impossible to accurately distinguish the detection scene of the light sensor and the touch scene of the display screen, resulting in inaccurate response and low user experience.
By detecting whether the display screen has a first event (the target object is close to), obtaining the second event (the touch event), and adjusting the operating status of the display screen according to the response conditions, thereby distinguishing and accurately responding to different scenarios.
Improves the accurate response of electronic devices to touch events, improves user experience, and avoids mist touch and power consumption problems.
Smart Images

Figure CN119937960A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of processing technology, and relates to but is not limited to a data processing method and an electronic device. Background Art
[0002] As electronic devices (such as smartphones) continue to become smarter, users have higher expectations for electronic devices. Display screens are becoming larger and smaller, and their edges are becoming narrower and narrower. When the light sensor of an electronic device is deployed near the display screen, it is impossible to distinguish between the detection scene of the light sensor and the touch scene of the display screen, resulting in an inability to respond accurately and a low user experience. Summary of the invention
[0003] The embodiment of the present application provides a data processing method and an electronic device. The technical solution of the present application is implemented as follows:
[0004] In a first aspect, the present application provides a data processing method, the method comprising:
[0005] If a first event for the display screen is detected, a second event for the display screen is acquired;
[0006] If there is a second event that meets the response condition, in response to the second event, executing the target response processing corresponding to the second event;
[0007] Among them, the first event represents the presence of a target object approaching the display screen, and the second event is a touch event on the display screen; the first event is used to change the working state of the display screen from a first state to a second state, and the display screen responds to the second event differently in the first state and the second state.
[0008] In a second aspect, the present application provides a data processing device, the device comprising:
[0009] A detection unit, configured to acquire a second event for the display screen if a first event for the display screen is detected;
[0010] a processing unit, configured to, if there is a second event that satisfies the response condition, execute a target response process corresponding to the second event in response to the second event;
[0011] Among them, the first event represents the presence of a target object approaching the display screen, and the second event is a touch event on the display screen; the first event is used to change the working state of the display screen from a first state to a second state, and the display screen responds to the second event differently in the first state and the second state.
[0012] In a third aspect, the present application provides an electronic device, the electronic device comprising a sensor and a processor;
[0013] The sensor is used to: if a first event for the display screen is detected, obtain a second event for the display screen;
[0014] The processor is used to: if there is a second event that meets the response condition, in response to the second event, execute a target response process corresponding to the second event;
[0015] Among them, the first event represents the presence of a target object approaching the display screen, and the second event is a touch event on the display screen; the first event is used to change the working state of the display screen from a first state to a second state, and the display screen responds to the second event differently in the first state and the second state.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method provided in the first aspect is implemented.
[0017] In a fifth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method provided in the first aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A first optional flow chart of the data processing method provided in the embodiment of the present application;
[0019] Figure 2 A second optional flow chart of the data processing method provided in the embodiment of the present application;
[0020] Figure 3 A third optional flow chart of the data processing method provided in the embodiment of the present application;
[0021] Figure 4 A fourth optional flow chart of the data processing method provided in the embodiment of the present application;
[0022] Figure 5 A fifth optional flow chart of the data processing method provided in the embodiment of the present application;
[0023] Figure 6 A sixth optional flow chart of the data processing method provided in the embodiment of the present application;
[0024] Figure 7 An optional flowchart of a data processing process provided in an embodiment of the present application;
[0025] Figure 8 An optional schematic diagram of a touch event detection scenario provided in an embodiment of the present application;
[0026] Fig. 9An optional structural diagram of a data processing device provided in an embodiment of the present application;
[0027] Fig.10 An optional structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.
[0029] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0030] In the following description, the terms "first\second\third" are used only as examples to distinguish different objects, and do not represent a specific order for the objects, nor do they have a limitation on the order of precedence. It is understandable that "first\second\third" can be interchanged with a specific order or order of precedence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0032] The embodiments of the present application may provide a data processing method, device, equipment, storage medium and computer program product. In practical applications, the data processing method may be implemented by a data processing device, and each functional entity in the data processing device may be collaboratively implemented by hardware resources of the electronic device, such as computing resources such as a processor, and communication resources (such as for supporting various communication methods such as optical cables and cellular).
[0033] In a first aspect, an embodiment of the present application provides a data processing method.
[0034] To facilitate understanding, the interference problem in electronic devices is first explained.
[0035] The electronic device has a sensor and a display screen. The sensor is used to detect whether a target object is close to the display screen. For example, the sensor can be used to detect whether the user is in a handset call scenario. If the user is in a handset call scenario, the display screen is turned off. The display screen is used to receive and respond to touch operations. If there is a touch operation, the display screen responds to the touch operation.
[0036] In one scenario, the sensor is deployed at a certain position below the display screen. It can be seen that there is an overlap between the data collection area of the sensor and the operation area of the display screen. Since touch operation also requires proximity to the display screen, for this overlapping area, if a target object is detected approaching, the electronic device cannot determine whether it is a scene such as a handset call or a preliminary result of a touch.
[0037] In another scenario, the sensor is deployed at the edge of the display screen. It can be seen that there is an impact area between the sensor's data collection area and the display screen's operation area. Since touch operation also requires proximity to the display screen, for this impact area, if a target object is detected approaching, the electronic device cannot determine whether it is a scene such as a handset call or a preliminary result of a touch.
[0038] Due to the unclear distinction between the above two scenarios, electronic devices are unable to respond accurately.
[0039] Embodiment 1: Below, the data processing method is described by taking an electronic device as an example. Figure 1 The data processing method may include but is not limited to Figure 1 S101 and S102 shown.
[0040] S101: If the electronic device detects a first event for a display screen, it obtains a second event for the display screen.
[0041] Among them, the first event represents the presence of a target object approaching the display screen, and the second event is a touch event on the display screen; the first event is used to change the working state of the display screen from a first state to a second state, and the display screen responds to the second event differently in the first state and the second state.
[0042] Here, the different response processing of the display screen to the second event in the first state and the second state includes:
[0043] The display screen in the first state can respond to the second event, and the display screen in the second state cannot respond to the second event;
[0044] Alternatively, the display screen in the first state can respond to the second event quickly, and the display screen in the second state can respond to the second event slowly. The fast and slow here are just the speeds compared between the two, and the specific response speed is not limited.
[0045] The electronic device is a device with a display screen. The specific type of the electronic device is not limited in the present application embodiment and can be configured according to actual needs. For example, the electronic device can include but is not limited to any of the following: a mobile phone, a tablet computer, a smart watch, etc.
[0046] Display screen refers to a screen with touch function and display function on an electronic device. The embodiment of the present application does not limit the number and type of display screens. For example, an electronic device may have only one display screen or multiple display screens. The display screen here may be a flat display screen, a curved display screen, or a foldable display screen, etc.
[0047] The first event represents the presence of a target object approaching the display screen.
[0048] In one scenario, the user is on a call and a first event may be detected.
[0049] In another scenario, the user is performing a touch operation and the first event can also be detected.
[0050] The second event is a touch event on the display screen.
[0051] The touch event here may be a finger touch event or a non-finger touch event.
[0052] S101 may be implemented as follows: the electronic device detects whether a first event occurs on the display screen through a sensor, and if the first event on the display screen is detected, acquires a second event on the display screen.
[0053] The embodiment of the present application does not limit the type of sensor and can be configured according to actual needs.
[0054] In a possible implementation, the sensor here may be a distance measuring sensor, which determines whether a target object is close to the display screen by a change in distance. For example, when it is detected that the distance is less than or equal to a first distance threshold, it is determined that an object is close to the display screen. For example, the sensor may be an ultrasonic sensor, etc., which determines whether a target object is close to the display screen by ultrasonic distance measurement.
[0055] In another possible implementation, the sensor here may be a light sensor, which determines whether a target object is close to the display screen by changes in light. For example, if the brightness of the light is detected to be lower than a brightness threshold, it is determined that a target object is close to the display screen. For example, the sensor may be a light sensor.
[0056] S102: If there is a second event that meets the response condition, the electronic device executes a target response process corresponding to the second event in response to the second event.
[0057] The existence of a second event that meets the response condition is used to characterize that the first event is a preliminary stage of the second event. Therefore, there is no need to respond to the first event. The electronic device directly responds to the second event and performs target processing on the second event.
[0058] This embodiment does not limit the specific implementation of satisfying the response condition and can be configured according to actual needs.
[0059] Example 1: The electronic device is a mobile phone. The mobile phone detects that an object is approaching, determines that there is a first event on the display screen, continues to detect whether there is a second event, detects a touch event on the display screen, determines that the user actually wants to perform a touch operation, and therefore responds based on the touch operation.
[0060] A data processing method provided by an embodiment of the present application includes: if a first event for a display screen is detected, a second event for the display screen is obtained; if a second event that meets a response condition exists, in response to the second event, a target response process corresponding to the second event is executed; wherein the first event represents that a target object is close to the display screen, and the second event is a touch event for the display screen; the first event is used to change the working state of the display screen from a first state to a second state, and the display screen in the first state and the second state has different response processes to the second event. .
[0061] It can be seen that in this embodiment, when the first event for the display screen is detected, the first event is not directly responded to, and the second event is continuously determined to be present, and the second event that meets the response condition is detected, and it is determined that a response should be made based on the touch operation. This avoids the situation where the response error caused by the direct response to the first event is caused, and improves the accuracy of the response.
[0062] In some embodiments, the process may further include a process of handling the absence of a second event that satisfies the response condition.
[0063] Example 2, reference Figure 2 As shown in the content, the process may include but is not limited to the following S201 to S203.
[0064] S201: If the electronic device detects a first event for the display screen, it obtains a second event for the display screen.
[0065] The implementation of S201 may refer to the description of obtaining the second event for the display screen if the electronic device detects the first event for the display screen in S101, which will not be described in detail here.
[0066] S202: If there is a second event that meets the response condition, the electronic device executes a target response process corresponding to the second event in response to the second event.
[0067] The implementation of S202 may refer to the detailed description of the electronic device executing the target response processing corresponding to the second event in response to the second event if there is a second event that meets the response condition in S102, which will not be described in detail here.
[0068] S203: If there is no second event that meets the response condition, the electronic device changes the working state of the display screen from the first state to the second state in response to the first event.
[0069] There is no second event that meets the response condition, which is used to indicate that the actual demand is the first event. In this case, the electronic device directly responds to the first event and changes the working state of the display screen from the first state to the second state.
[0070] The first state is different from the second state.
[0071] The specific conditions of the first state and the second state can be configured according to actual needs.
[0072] In this embodiment, if there is no second event that meets the response condition, the electronic device responds based on the first event and adjusts the working state of the display screen to meet the response requirements of the first event. In this embodiment, the appropriate response time for the first event can be accurately identified, thereby improving the accuracy of the first event response.
[0073] Example 3, reference Figure 3 As shown in the content, the data processing process may include but is not limited to the following S301 to S304.
[0074] S301: If the electronic device detects a first event for the display screen, it obtains a second event for the display screen.
[0075] The implementation of S301 may refer to the description of obtaining the second event for the display screen if the electronic device detects the first event for the display screen in S101, which will not be described in detail here.
[0076] S302: If there is a second event that meets the response condition, the electronic device executes a target response process corresponding to the second event in response to the second event.
[0077] The implementation of S302 may refer to the detailed description of the electronic device executing the target response processing corresponding to the second event in response to the second event if there is a second event that meets the response condition in S102, which will not be described in detail here.
[0078] S303: If there is no second event that meets the response condition, and the electronic device to which the display screen belongs is currently in a handset use state, change the working state of the display screen from the first response state to a closed state.
[0079] When the handset is in use, the sound is played through the handset. The handset use status includes: handset call status, handset voice status or handset conference status.
[0080] The first response state may also be referred to as a normal response state. In the first response state, the display screen can respond to a second event at a first rate.
[0081] In the off state, the display cannot respond to second events.
[0082] The embodiment of the present application does not limit the specific method of determining whether the electronic device to which the display screen belongs is currently in the handset use state, and can be configured according to actual needs. For example, it is possible to detect whether the handset is activated to determine whether it is in the handset use state, or it is possible to obtain the current state of the electronic device in the configuration information to determine whether it is in the handset use state.
[0083] S303 can be implemented as follows: if there is no second event that meets the response condition, determine whether the electronic device to which the display screen belongs is currently in the earpiece use state; if it is determined that the electronic device to which the display screen belongs is currently in the earpiece use state, directly turn off the power of the display screen to change the working state of the display screen from the first response state to the off state.
[0084] Example 2: The electronic device is a mobile phone. The mobile phone detects that an object is approaching, determines that there is a first event for the display screen, continues to detect whether there is a second event, detects that there is no touch event for the display screen, determines that the user actually wants to respond to the first event, determines that the current state of the electronic device is the earpiece use state, and turns off the display screen, that is, changes the working state of the display screen from the first response state to the off state.
[0085] S304: If there is no second event that meets the response condition and the electronic device is currently in a pocket use state, reduce the scanning rate of the display screen to change the display screen from the first response state to the second response state.
[0086] Among them, the display screen in the first response state can respond to the second event at a first rate, the display screen in the closed state cannot respond to the second event, and the display screen in the second response state can respond to the second event at a second rate, and the second rate is less than the first rate.
[0087] Pocket use state refers to the state where the electronic device is in a pocket and can be used.
[0088] The second response state may also be referred to as a low-rate response state. In the second response state, the display screen can respond to the second event at a second rate, which is lower than the first rate.
[0089] The embodiment of the present application does not limit the specific method of determining whether the electronic device to which the display screen belongs is currently in the pocket use state, and can be configured according to actual needs. For example, a light sensor and a distance sensor can be detected to determine whether it is in the pocket, and then the state of the electronic device can be obtained to determine whether the electronic device is in the use state, and the two can be combined to determine whether the electronic device is in the pocket use state.
[0090] S304 can be implemented as follows: if there is no second event that meets the response condition, determine whether the electronic device to which the display screen belongs is currently in a pocket use state; if it is determined that the electronic device to which the display screen belongs is currently in a pocket use state, reduce the scanning rate of the display screen to change the display screen from the first response state to the second response state.
[0091] Reducing the scan rate of the display can be achieved by modifying the display parameters.
[0092] Example 3: The electronic device is a mobile phone. The mobile phone detects that an object is approaching, determines that there is a first event for the display screen, continues to detect whether there is a second event, detects that there is no touch event for the display screen, determines that the user actually wants to respond to the first event, determines that the current state of the electronic device is pocket use state, and reduces the scanning rate of the display screen to change the display screen from the first response state to the second response state.
[0093] In this embodiment, in response to the first event, a specific response processing method is determined by judging whether the electronic device is currently in the handset use state or the pocket use state, thereby expanding the application scenarios and providing a higher user experience.
[0094] Example 4, reference Figure 4 The data processing process may include but is not limited to the following S401 to S403.
[0095] S401: If a first event for a display screen is detected, obtain a second event for the display screen.
[0096] The implementation of S401 may refer to the description of obtaining the second event for the display screen if the electronic device detects the first event for the display screen in S101, which will not be described in detail here.
[0097] S402: If a second event satisfying a touch condition is detected within a target time period after the first event is detected, it is determined that a second event satisfying a response condition exists.
[0098] The embodiment of the present application does not limit the specific value of the target duration, and can be configured according to actual needs. For example, the target duration can be 500 milliseconds.
[0099] Meeting the touch condition is used to characterize the touch as a valid touch. For example, if the display screen is touched and the touch duration is within the touch operation duration range, it is determined that the touch condition is met.
[0100] S402 can be implemented as follows: after detecting a first event, start a timer, set the timer duration to a target duration, and then detect whether there is a second event that meets the touch condition within the target duration; if it is detected that there is a second event that meets the touch condition within the target duration, determine that there is a second event that meets the response condition.
[0101] S403: If there is a second event that meets the response condition, the electronic device executes a target response process corresponding to the second event in response to the second event.
[0102] The implementation of S403 may refer to the detailed description in S102 that if the electronic device has a second event that meets the response condition, responding to the second event, the electronic device performs the target response processing corresponding to the second event, which will not be described in detail here.
[0103] In this embodiment, by detecting whether there is a second event that meets the touch condition within a target time after the first event is detected, it is determined whether there is a second event that meets the response condition. Since in a touch operation, after the first event is detected, the second event that meets the touch condition is immediately detected, the implementation method is simple and reliable.
[0104] Example 5, reference Figure 5 The data processing process may include but is not limited to the following S501 to S504.
[0105] S501: If a first event for a display screen is detected, obtain a second event for the display screen.
[0106] The implementation of S501 may refer to the description of obtaining the second event for the display screen if the electronic device detects the first event for the display screen in S101, which will not be described in detail here.
[0107] S502: If there is a second event that meets the response condition, determine the target type of the second event.
[0108] For the implementation of determining whether there is a second event that meets the response condition, reference can be made to S402 in which if a second event that meets the touch condition is detected within the target time after the first event is detected, it is determined that there is a second event that meets the response condition, which will not be described in detail here.
[0109] The target type of the second event may include a finger touch type and a non-finger touch type.
[0110] In this embodiment of the present application, there is no limitation on the implementation method for determining the target type of the second event, and it can be configured according to actual needs.
[0111] In a possible implementation, whether the target type of the second event is a finger touch type or a non-finger touch type may also be determined based on the contact area in the display screen.
[0112] In another possible implementation, whether the target type of the second event is a finger touch type or a non-finger touch type may also be determined based on the temperature. For example, if the detected temperature belongs to the finger temperature range of the human body, the target type is determined to be a finger touch type; if the detected temperature does not belong to the finger temperature range of the human body, the target type is determined to be a non-finger touch type.
[0113] S503: When the target type is a finger touch type, target response processing is performed based on the finger touch type.
[0114] S503 can be implemented as follows: when the target type is a finger touch type, the electronic device obtains a trigger control corresponding to the touch area of the touch operation, determines the target function activated by the touch operation based on the trigger control, and then executes the target function to implement target response processing based on the finger touch type.
[0115] For example, when the target type is a finger touch type, the electronic device obtains the trigger control corresponding to the touch area of the touch operation as a music application, determines the startup function of the music application activated by the touch operation based on the trigger control, and then executes the startup function of the music application to start the music application.
[0116] S504: When the target type is a non-finger touch type, target response processing is performed based on the non-finger touch type.
[0117] S504 may be implemented as follows: when the target type is a non-finger touch type, the electronic device reads a process for the non-finger touch type to respond.
[0118] In a possible implementation manner, the processing of the non-finger touch type may be to ignore the second event and not perform any response processing.
[0119] In another possible implementation, since a second event of a non-finger touch type is detected, indicating that the display screen has been falsely touched, the working state of the display screen can be changed from the first response state to the off state or the second response state to reduce the probability of false touch detection of the display screen.
[0120] In this embodiment, when responding to the second event, the target type of the second event needs to be interfaced for response, and responses to finger touch type and non-finger touch type are distinguished, thereby improving the accuracy of the second event response scenario.
[0121] Example 6, reference Figure 6 As shown in the content, the data processing process may include but is not limited to the following S601 to S605.
[0122] S601: If a first event for a display screen is detected, obtain a second event for the display screen.
[0123] The implementation of S601 may refer to the description of obtaining the second event for the display screen if the electronic device detects the first event for the display screen in S101, which will not be described in detail here.
[0124] S602: If there is a second event that meets the response condition, obtain a contact area on the display screen in the second event.
[0125] The contact area refers to the area that contacts the display screen in the second event.
[0126] The contact area can be detected by a pressure sensor on the display screen, etc.
[0127] If there is a second event that meets the response condition, the contact area on the display screen in the second event is detected by the sensor.
[0128] S603: Determine the target type based on the contact area.
[0129] It is determined whether the target type of the second event is a finger touch type or a non-finger touch type based on the contact area.
[0130] Here, the target type can be determined based on the radius or area of the contact area.
[0131] S604: When the target type is a finger touch type, target response processing is performed based on the finger touch type.
[0132] The implementation of S604 may refer to the detailed description of performing target response processing based on the finger touch type in S503 when the target type is the finger touch type, and will not be described in detail here.
[0133] S605: When the target type is a non-finger touch type, target response processing is performed based on the non-finger touch type.
[0134] The implementation of S605 may refer to the detailed description of performing target response processing based on the non-finger touch type when the target type is the non-finger touch type in S504, which will not be described in detail here.
[0135] In this embodiment, the contact area-based implementation method for determining the target type is simple and accurate.
[0136] Next, the process of determining the target type based on the contact area in S603 is described.
[0137] In a possible implementation, if the area of the contact region belongs to the finger contact area range, the target type is determined to be a finger touch type; if the area of the contact region does not belong to the finger contact area range, the target type is determined to be a non-finger touch type.
[0138] In this embodiment of the present application, there is no limitation on the specific value of the finger contact area range and it can be configured according to actual needs.
[0139] For example, the range of the finger contact area can be determined based on the finger sizes and usage habits of people of different body shapes, genders, and ages.
[0140] First determine the area of the contact area, and then determine whether the area of the contact area belongs to the finger contact area range. If the area of the contact area belongs to the finger contact area range, the target type is determined to be a finger touch type; if the area of the contact area does not belong to the finger contact area range, the target type is determined to be a non-finger touch type.
[0141] In another possible implementation, if the radius of the contact area belongs to the finger contact radius range, the target type is determined to be a finger touch type; if the radius of the contact area does not belong to the finger contact radius range, the target type is determined to be a non-finger touch type.
[0142] In this embodiment of the present application, the specific value of the finger contact radius range is not limited and can be configured according to actual needs.
[0143] For example, the finger contact radius range can be determined based on the finger sizes and usage habits of people of different body shapes, genders, and ages.
[0144] First determine the radius of the contact area, and then determine whether the radius of the contact area belongs to the finger contact radius range. If the radius of the contact area belongs to the finger contact radius range, the target type is determined to be a finger touch type; if the radius of the contact area does not belong to the finger contact radius range, the target type is determined to be a non-finger touch type.
[0145] In this embodiment of the present application, the target type is determined to be a finger touch type or a non-finger touch type by the area and radius of the finger touch area, so as to accurately respond to the second event. This determination method is simple to implement, accurate and reliable.
[0146] The data processing process is described below by taking a mobile phone as an example.
[0147] For some foldable phones, after the phone is folded, the user makes a voice call on the small screen. After switching to the handset mode, the phone is close to the ear and the screen cannot be turned off. If the ear touches the outer screen at this time, it may further cause accidental touches, affecting the experience.
[0148] Because the light sensor (P sensor) on the phone's external screen is located in the center of the screen, using the P sensor to determine whether an object is close to the external screen may result in misjudgment. For example, the user actually wants to hang up the call, but the hang-up button overlaps with the P sensor. As a result, the screen goes out before the finger clicks the hang-up button, making it impossible to hang up the call. Similar problems may also occur when the number dial needs to be operated during a call.
[0149] In the first related technology, the external screen can only be used in the speaker mode, and the receiver mode is turned off, which results in a lack of privacy when the user uses the external screen to make calls.
[0150] Related technology 2: The external screen allows the use of the handset mode, but does not support the screen turning off when the phone is brought close to the ear. In this way, when the user holds the phone close to the ear to answer the call, the phone will not turn off the screen, which is prone to accidental touches and power consumption problems.
[0151] The principle of this embodiment includes: using the contact surface and contact time detection of the p sensor position area to assist in determining whether it is a click event or an occlusion event, and then executing a click event or a screen-off action based on the determination result. Supporting external screen calls can use the handset mode, while solving the problems of false touches and power consumption in the handset mode.
[0152] In short, reference Figure 7 As shown in the content, the data processing process may include but is not limited to the following S701 to S708.
[0153] S701. Determine that the external screen uses the handset mode for calls.
[0154] S702: Start gesture detection and start the distance sensor.
[0155] S703: Determine whether a lift gesture is detected and an occlusion event is detected within 2 seconds.
[0156] If so (a lift gesture is detected and an occlusion event is detected within 2S), execute the following S705; if not (a lift gesture is not detected, or a lift gesture is detected but an occlusion event is not detected within 2S), execute the following S704.
[0157] S704: No processing is performed.
[0158] S705: Detect whether there is a touch event from the screen within 500ms.
[0159] If so (a touch event from the screen is detected within 500ms), execute the following S708; if not (no touch event from the screen is detected within 500ms), execute the following S706.
[0160] S706, turning off the external screen to prevent accidental touches.
[0161] S707: Determine whether the touch event comes from a click of a finger.
[0162] If yes (the touch event comes from a finger click), execute the following S708; if no (the touch event comes from a non-finger click), execute the above S706.
[0163] S708: Determine that the user is operating the mobile phone normally, ignore the occlusion event, and do not turn off the screen.
[0164] Next, whether the touch event is caused by a click of a finger is described.
[0165] refer to Figure 8 As shown in the content, in a touch event detection scenario, a mobile phone 80 includes a display screen 801 , and a contact area 8011 on the display screen 801 .
[0166] The conditions for determining that a touch event comes from a finger click include:
[0167] ABS_MT_Touch_MINOR>90pixel, and ABS_MT_Touch_MAJOR<180pixel.
[0168] Among them, ABS_MT_Touch_MINOR indicates the minimum diameter distance of finger contact; ABS_MT_Touch_MAJOR indicates the maximum diameter distance of finger contact;
[0169] Pixel refers to the pixel distance; 90 pixels correspond to a diameter of 5 mm, and 180 pixels correspond to a diameter of 20 mm.
[0170] The data processing process may include but is not limited to the following steps 1 to 3.
[0171] Step 1: During a call on the external screen, switch to handset mode and enable p sensor.
[0172] Step 2: When a lift gesture is detected and an object approaches the p sensor, a 500ms screen touch detection is started.
[0173] Step 3: If a touch event is detected on the screen within 500ms, it is necessary to determine whether it is a real finger touch based on the contact point data. If it is a finger touch, ignore the p sensor occlusion event and process it as a regular touch action. Otherwise, it is identified as an occlusion action and the screen is blacked out to avoid false touches.
[0174] In a second aspect, in order to implement the above processing method, a data processing device in an embodiment of the present application is deployed in an electronic device. Fig. 9 , the structural schematic diagram of the data processing device 90 is explained.
[0175] like Fig. 9 As shown, the data processing device 90 includes: a detection unit 901 and a processing unit 902 .
[0176] in:
[0177] A detection unit 901 is configured to obtain a second event for the display screen if a first event for the display screen is detected;
[0178] A processing unit 902 is configured to, if there is a second event that satisfies the response condition, execute a target response process corresponding to the second event in response to the second event;
[0179] Among them, the first event represents the presence of a target object approaching the display screen, and the second event is a touch event on the display screen; the first event is used to change the working state of the display screen from a first state to a second state, and the display screen responds to the second event differently in the first state and the second state.
[0180] In some embodiments, the processing unit 902 is further configured to: if there is no second event satisfying the response condition, in response to the first event, change the working state of the display screen from the first state to the second state.
[0181] In some embodiments, the processing unit 902 is further configured to: if the electronic device to which the display screen belongs is currently in a handset use state, change the working state of the display screen from the first response state to the off state; the handset use state includes: handset call state, handset voice state or handset conference state;
[0182] If the electronic device is currently in a pocket use state, reducing the scanning rate of the display screen to change the display screen from a first response state to a second response state;
[0183] Among them, the display screen in the first response state can respond to the second event at a first rate, the display screen in the off state cannot respond to the second event, and the display screen in the second response state can respond to the second event at a second rate, and the second rate is less than the first rate.
[0184] In some embodiments, the processing unit 902 is further configured to: if a second event satisfying a touch condition is detected within a target time period after the first event is detected, determine that the second event satisfying a response condition exists.
[0185] In some embodiments, the processing unit 902 is also used to: determine the target type of the second event; when the target type is a finger touch type, perform the target response processing based on the finger touch type; when the target type is a non-finger touch type, perform the target response processing based on the non-finger touch type.
[0186] In some embodiments, the processing unit 902 is further configured to: obtain a contact area for the display screen in the second event; and determine the target type based on the contact area.
[0187] In some embodiments, the processing unit 902 is also used to: if the area of the contact area belongs to the finger contact area range, determine the target type as the finger touch type; if the area of the contact area does not belong to the finger contact area range, determine the target type as the non-finger touch type.
[0188] In some embodiments, the processing unit 902 is also used to: if the radius of the contact area belongs to the finger contact radius range, determine the target type as a finger touch type; if the radius of the contact area does not belong to the finger contact radius range, determine the target type as a non-finger touch type.
[0189] It should be noted that the processing device provided in the embodiment of the present application includes the various units included, which can be implemented by a processor in an electronic device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU, Central Processing Unit), a microprocessor (MPU, Micro Processor Unit), a digital signal processor (DSP, Digital Signal Processor) or a field programmable gate array (FPGA, Field-Programmable Gate Array), etc.
[0190] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0191] It should be noted that in the embodiment of the present application, if the above-mentioned processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the processing methods of each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0192] On the third aspect, in order to implement the above-mentioned processing method, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the processing memory stores a computer program that can be executed on the processor, and when the processing processor executes the processing program, the processing method provided in the above-mentioned embodiment is implemented.
[0193] Combine the following Fig.10 The electronic device 100 shown is a block diagram of the electronic device.
[0194] In an example, the electronic device includes at least a sensor 1001 and a processor 1002 .
[0195] The sensor 1001 is used to: if a first event for a display screen is detected, obtain a second event for the display screen;
[0196] The processor 1002 is configured to: if there is a second event that satisfies the response condition, in response to the second event, execute a target response process corresponding to the second event;
[0197] Among them, the first event represents the presence of a target object approaching the display screen, and the second event is a touch event for the display screen; the first event is used to change the working state of the display screen from a first state to a second state, and the display screen responds to the second event differently in the first state and the second state.
[0198] The electronic device 100 may further include a memory 1003. The memory 1003 is used to store related programs.
[0199] In some embodiments, the electronic device 100 may include a first body, a second body, a first display screen, and a second display screen, wherein the first body and the body can rotate relative to each other; the processor is arranged on the first body and / or the second body; the second display screen covers the first surface of the first body and the second surface of the second body; the first display screen covers the third surface of the second body, and the sensor is arranged on the second body, located between the first display screen and the second body; wherein the first surface and the second surface are located on the same side of the first body and the second body, and the third surface is located on the opposite side of the second surface.
[0200] In a fourth aspect, an embodiment of the present application provides a storage medium, that is, a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, any one of the processing methods provided in the first aspect of the above-mentioned embodiment is implemented.
[0201] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements any one of the processing methods provided in the first aspect of the above-mentioned embodiment.
[0202] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0203] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.
[0204] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0205] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the processing unit is only a logical function division. There may be other division methods in actual implementation, such as: multiple 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, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0206] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0207] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0208] A person skilled in the art can understand that all or part of the steps of the above method embodiment can be completed by hardware related to program instructions, and the above program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the above storage medium includes: a mobile storage device, a read-only memory (ROM), a magnetic disk or an optical disk, and other media that can store program codes.
[0209] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly reflected in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the processing methods of each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0210] The above processing is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the processing claims.
Claims
1. A data processing method, the method comprising: If a first event for the display screen is detected, obtaining a second event for the display screen; If there is a second event that satisfies the response condition, in response to the second event, executing a target response process corresponding to the second event; The first event indicates that a target object is close to the display screen, and the second event is a touch event on the display screen; The first event is used to change the working state of the display screen from a first state to a second state, and the display screen responds to the second event differently in the first state and the second state.
2. The method according to claim 1, further comprising: If there is no second event satisfying the response condition, in response to the first event, the operating state of the display screen is changed from the first state to the second state.
3. The method according to claim 2, wherein in response to the first event, changing the working state of the display screen from a first state to a second state comprises: If the electronic device to which the display screen belongs is currently in the handset use state, changing the working state of the display screen from the first response state to the closed state; The handset usage status includes: handset call status, handset voice status or handset conference status; If the electronic device is currently in a pocket use state, reducing the scanning rate of the display screen to change the display screen from a first response state to a second response state; Among them, the display screen in the first response state can respond to the second event at a first rate, the display screen in the off state cannot respond to the second event, and the display screen in the second response state can respond to the second event at a second rate, and the second rate is less than the first rate.
4. The method according to any one of claims 1 to 3, wherein the existence of the second event that satisfies the response condition comprises: If a second event satisfying the touch condition is detected within a target time period after the first event is detected, it is determined that the second event satisfying the response condition exists.
5. The method according to any one of claims 1 to 3, wherein in response to the second event, executing target response processing corresponding to the second event comprises: determining a target type of the second event; In the case where the target type is a finger touch type, performing the target response processing based on the finger touch type; In the case where the target type is a non-finger touch type, the target response processing is performed based on the non-finger touch type.
6. The method according to claim 5, wherein determining the target type of the second event comprises: Acquire a contact area for the display screen in the second event; The target type is determined based on the contact area.
7. The method according to claim 6, wherein determining the target touch type based on the contact area comprises: If the area of the contact region belongs to the finger contact area range, determining that the target type is a finger touch type; If the area of the contact region does not belong to the finger contact area range, the target type is determined to be a non-finger touch type.
8. The method according to claim 6, wherein determining the target type based on the contact area comprises: If the radius of the contact area belongs to the finger contact radius range, determining that the target type is a finger touch type; If the radius of the contact area does not belong to the finger contact radius range, the target type is determined to be a non-finger touch type.
9. An electronic device, comprising a sensor and a processor; The sensor is used to: if a first event for the display screen is detected, obtain a second event for the display screen; The processor is configured to: if there is a second event that satisfies the response condition, in response to the second event, execute a target response process corresponding to the second event; in, The first event indicates that a target object is close to the display screen, and the second event is a touch event on the display screen; The first event is used to change the working state of the display screen from a first state to a second state, and the display screen responds to the second event differently in the first state and the second state.
10. The device according to claim 9, wherein the electronic device comprises a first body, a second body, a first display screen, and a second display screen. The first body and the main body can rotate relative to each other; The processor is disposed in the first body and / or the second body; The second display screen covers the first surface of the first body and the second surface of the second body; The first display screen covers the third surface of the second body, and the sensor is arranged on the second body, between the first display screen and the second body; in, The first surface and the second surface are located on the same side of the first body and the second body, and the third surface is located on the opposite side of the second surface.