Processing method and device, electronic equipment and storage medium

By detecting the capacitance change at each sampling node of the touchscreen, the submerged and non-submerged areas are identified, solving the problem of inaccurate touch detection in underwater environments and achieving accurate touchscreen response in underwater environments.

CN121092007APending Publication Date: 2025-12-09VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511218912.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2025-12-09

AI Technical Summary

Technical Problem

In existing technologies, the touch detection of mobile phone touchscreens in underwater environments is not accurate enough, resulting in inaccurate touch response, especially when partially submerged in water, which can easily lead to accidental touches or no response.

Method used

By detecting the capacitance change at each sampling node of the touchscreen, the system identifies submerged and non-submerged areas and responds only to inputs from non-submerged areas in an underwater environment, thus avoiding erroneous operations caused by the conductivity of water and improving the accuracy of touch detection.

Benefits of technology

In underwater environments, electronic devices can accurately identify inputs from submerged and non-submerged areas, reducing misoperations, improving the touchscreen's touch response accuracy, and ensuring users can flexibly control electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121092007A_ABST
    Figure CN121092007A_ABST
Patent Text Reader

Abstract

The invention discloses a processing method and device, electronic equipment and a storage medium, and belongs to the technical field of electronic equipment. The processing method comprises the following steps: detecting the capacitance variation of each sampling node of the touch screen; under the condition that the capacitance variable quantity of M sampling nodes in the touch screen is larger than a first threshold value, if a screen area corresponding to a first sampling node in the M sampling nodes meets a soaking condition, it is determined that the detected input of the screen area corresponding to the first sampling node is not responded, and / or the detected input of the screen area corresponding to the first sampling node is not responded; if the screen area corresponding to the second sampling node in the M sampling nodes does not meet the soaking condition, determining to respond to the detected input of the screen area corresponding to the second sampling node; m is an integer greater than 1.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of electronic equipment technology, and specifically relates to a processing method, apparatus, electronic device and storage medium. Background Technology

[0002] In recent years, with the rapid development of smartphone camera technology, more and more users have begun to use mobile phones for photography in various environments, including underwater shooting.

[0003] However, traditional mobile phone designs often do not fully consider the convenience of underwater operation, especially in touchscreen operation, which often faces many limitations. For example, in an underwater environment, due to the influence of water currents, it is difficult for the phone to distinguish whether the touch on the touchscreen is from water currents, the user's finger, or a finger touch due to the influence of water currents. Therefore, the phone's touch detection is not accurate enough, resulting in inaccurate touch response. Summary of the Invention

[0004] The purpose of this application is to provide a processing method, apparatus, electronic device, and storage medium that can improve the accuracy of touch detection of the electronic device on the touch screen, thereby improving the accuracy of touch response.

[0005] In a first aspect, embodiments of this application provide a processing method, the method comprising: detecting the capacitance change of each sampling node of a touch screen; if the capacitance change of M sampling nodes in the touch screen is greater than a first threshold, if the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, then determining not to respond to the detected input to the screen area corresponding to the first sampling node, and / or, if the screen area corresponding to the second sampling node among the M sampling nodes does not meet the immersion condition, then determining to respond to the detected input to the screen area corresponding to the second sampling node; M is an integer greater than 1.

[0006] Secondly, embodiments of this application provide a processing apparatus, which includes a detection module and an execution module. The detection module is used to detect the capacitance change of each sampling node of the touchscreen. The execution module is used to determine, if the capacitance change of M sampling nodes in the touchscreen is greater than a first threshold, that if the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, not to respond to the detected input to the screen area corresponding to the first sampling node, and / or, if the screen area corresponding to the second sampling node among the M sampling nodes does not meet the immersion condition, to respond to the detected input to the screen area corresponding to the second sampling node; M is an integer greater than 1.

[0007] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the processing method as described in the first aspect.

[0008] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the processing method as described in the first aspect.

[0009] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the steps of the processing method as described in the first aspect.

[0010] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the steps of the processing method as described in the first aspect.

[0011] In this embodiment, the capacitance change of each sampling node of the touchscreen is detected. If the capacitance change of M sampling nodes in the touchscreen is greater than a first threshold, and the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, then it is determined that the detected input to the screen area corresponding to the first sampling node will not be responded to. And / or, if the screen area corresponding to the second sampling node among the M sampling nodes does not meet the immersion condition, then it is determined that the detected input to the screen area corresponding to the second sampling node will be responded to. Thus, when using electronic devices in underwater environments, the electronic devices can accurately identify the immersed and non-immersed screen areas on the touchscreen based on the capacitance change of the touchscreen. This allows for accurate differentiation between inputs to the immersed and non-immersed screen areas, improving the accuracy of touch detection. Furthermore, by only responding to inputs to the non-immersed screen areas and not to inputs to the immersed screen areas, the electronic devices can reduce erroneous operations caused by the conductivity of water, further improving the accuracy of touch response. This allows users to continue to flexibly control the electronic devices via the touchscreen even when the devices are partially submerged. Attached Figure Description

[0012] Figure 1 This is one of the flowcharts illustrating the processing method provided in the embodiments of this application;

[0013] Figure 2 This is a schematic diagram of the difference data of the sampling nodes of the mobile phone touch screen provided in the embodiments of this application;

[0014] Figure 3 This is a schematic diagram of the values ​​of the sampling node markers on the mobile phone touchscreen provided in this application embodiment;

[0015] Figure 4 This is a schematic diagram of the label of the sampling node of the mobile phone touch screen provided in the embodiments of this application;

[0016] Figure 5 This is a schematic diagram of the boundary points of the immersion area provided in the embodiments of this application;

[0017] Figure 6 This is one of the schematic diagrams of the screen area of ​​the under-screen camera module on the mobile phone touch screen provided in the embodiments of this application;

[0018] Figure 7 This is a second schematic diagram of the screen area of ​​the under-screen camera module on the mobile phone touchscreen provided in this application embodiment;

[0019] Figure 8 This is a second schematic flowchart of the processing method provided in the embodiments of this application;

[0020] Figure 9 This is a schematic diagram of the processing apparatus provided in the embodiments of this application;

[0021] Figure 10 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;

[0022] Figure 11 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0023] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0024] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0025] The terms "at least one," "at least one of," etc., used in the specification and claims of this application refer to any one, any two, or a combination of two or more of the included items. For example, at least one of a, b, and c can mean: "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple. Similarly, "at least two" refers to two or more items, and its meaning is similar to that of "at least one."

[0026] In related technologies, waterproof shells or special buttons (such as volume buttons) are usually used for underwater shooting, but these methods often limit the flexibility of shooting control. This method has the following drawbacks: (1) Functional limitations: Using physical buttons limits the user's operation and makes it impossible to perform complex shooting mode adjustments, such as focus adjustment or filter switching. (2) Touch feedback problems: In an underwater environment, especially when partially submerged, the touch screen response is inaccurate, and it is easy to accidentally touch or not respond. (3) Blurry photos: Mechanical buttons usually require a certain amount of force to trigger, which can easily cause the phone to shake when taking a picture, resulting in blurry photos.

[0027] To address this, this application provides a processing method that can accurately detect water-immersed screen areas on an electronic device by intelligently analyzing changes in the capacitance signal of the touchscreen. The method also allows the electronic device to respond only to touch interactions on non-water-immersed screen areas in an underwater environment. This avoids misoperations caused by the conductivity of water, improves the touchscreen's touch response accuracy, and enables users to continue flexibly controlling the electronic device's shooting function via the touchscreen even underwater without the need for physical buttons.

[0028] First, the nouns and terms used in the embodiments of this application will be explained.

[0029] Drive channel: The channel through which the touchscreen connects to the Digital-to-Analog Converter (DAC) module.

[0030] Sensing channel: The channel through which the touchscreen connects to the Analog-to-Digital Converter (ADC) module, and its direction is perpendicular to the drive channel.

[0031] Raw data: A set of sampled data obtained by converting the capacitance change of the touch screen into a digital signal. The number of raw data points = driving channels * sensing channels.

[0032] Base data: A frame of raw data when the touchscreen is not touched. The number of data points in the base data is the same as the number of data points in the raw data.

[0033] Difference data (diff_data): diff = base-raw, the touch area is represented as an envelope signal in the diff data.

[0034] diff{i,j} or diff[i,j]: represents the difference data between the nodes (sampling nodes) corresponding to the i-th driving channel and the j-th sensing channel.

[0035] 4-neighborhood: A basic term in image processing, referring to the four directions: up, down, left, and right.

[0036] 8-neighborhood: A basic term in image processing, referring to the eight directions: up, down, left, right, upper left, upper right, lower left, and lower right.

[0037] The processing methods, apparatus, electronic devices, and storage media provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.

[0038] The processing method provided in this application embodiment can be applied to scenarios where electronic devices are used in underwater environments, specifically for scenarios where electronic devices are used while partially submerged in water.

[0039] The processing method provided in this application can be executed by a processing device. For example, the processing device can be an electronic device, or a functional component or entity within that electronic device. The processing method provided in this application will be described below using an electronic device as an example.

[0040] Figure 1 This is a flowchart illustrating the processing method provided in the embodiments of this application, as shown below. Figure 1 As shown, the processing method provided in this application embodiment may include the following steps 101 and 102.

[0041] Step 101: The electronic device detects the capacitance change of each sampling node of the touch screen.

[0042] In some embodiments of this application, the sampling node of the touchscreen can be understood as a node on the touchscreen's scanning matrix. The touchscreen's scanning matrix may include driving channels and sensing channels, and the nodes on the touchscreen's scanning matrix are the intersection points of the driving channels and sensing channels. In other words, the sampling node of the touchscreen is the intersection point of the driving channels and sensing channels.

[0043] In some embodiments of this application, the electronic device can periodically detect the capacitance change at each sampling node of the touchscreen.

[0044] In some embodiments of this application, the touch screen controller of the electronic device can periodically scan the touch screen, record the instantaneous capacitance value of each sampling node of the touch screen, and determine the capacitance change of each sampling node based on the detected instantaneous capacitance value of each sampling node and the stored reference capacitance value of each sampling node.

[0045] For example, an electronic device can detect the capacitance value of a touchscreen at a fixed frequency. For instance, this fixed frequency can be 60Hz to 240Hz.

[0046] In some embodiments of this application, the aforementioned reference capacitance value may be a pre-stored instantaneous capacitance value of the touchscreen when it is not touched.

[0047] In some embodiments of this application, the electronic device can also convert the capacitance change of each sampling node of the touchscreen into a digital signal to obtain the difference data of each sampling node. This difference data of each sampling node can be used to characterize the capacitance change of each sampling node.

[0048] In some embodiments of this application, the touch screen controller of the electronic device can periodically scan the touch screen, record the instantaneous capacitance value of each sampling node of the touch screen, convert the instantaneous capacitance value into a digital signal to obtain the raw data of each sampling node, and then determine the difference data of each sampling node based on the detected instantaneous raw data of each sampling node and the stored reference data of each sampling node.

[0049] In some embodiments of this application, the aforementioned reference data may be data obtained by converting a reference capacitance value into a digital signal, wherein the reference capacitance value is the instantaneous capacitance value of the touchscreen when it is not touched.

[0050] It should be noted that the difference data in the embodiments of this application can be understood as another way of representing the change in capacitance. Similarly, the reference data and original data in the embodiments of this application can also be understood as another way of representing the instantaneous capacitance value and the reference capacitance value.

[0051] Step 102: If the capacitance change of the M sampling nodes in the touch screen is greater than the first threshold, and the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, the electronic device determines not to respond to the detected input to the screen area corresponding to the first sampling node, and / or, if the screen area corresponding to the second sampling node among the M sampling nodes does not meet the immersion condition, the electronic device determines to respond to the detected input to the screen area corresponding to the second sampling node.

[0052] In some embodiments of this application, M is an integer greater than 1.

[0053] In some embodiments of this application, the first threshold can be used to represent the minimum value of capacitance change during effective touch. The first threshold can be set according to experience or actual needs, and this application does not limit it.

[0054] For example, the first threshold value can be in the range of 0.1 to 10 fF (mutual capacitance) or 1 to 100 fF (self capacitance). Alternatively, when the capacitance change is expressed as a difference data, the first threshold value can be in the range of 450 to 600.

[0055] In some embodiments of this application, the aforementioned immersion conditions can be understood as conditions set based on the characteristics of the immersion area on the touchscreen after immersion in water, which distinguishes it from the non-immersion area. If an area meets the immersion conditions, it is considered an immersion area; if an area does not meet the immersion conditions, it is considered a non-immersion area.

[0056] In the first implementation of this application, if the capacitance change of the M sampling nodes in the touch screen is greater than a first threshold, and the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, then the detected input to the screen area corresponding to the first sampling node will not be responded to.

[0057] In the second implementation of this application, if the capacitance change of the M sampling nodes in the touch screen is greater than the first threshold, and the screen area corresponding to the second sampling node among the M sampling nodes does not meet the immersion condition, then the input to the screen area corresponding to the second sampling node is detected.

[0058] In the third implementation of this application, if the capacitance change of the M sampling nodes in the touch screen is greater than the first threshold, and the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, then the detected input to the screen area corresponding to the first sampling node will not be responded to; if the screen area corresponding to the second sampling node among the M sampling nodes does not meet the immersion condition, then the detected input to the screen area corresponding to the second sampling node will be responded to.

[0059] In some embodiments of this application, the first sampling node may include one or more sampling nodes, and the number of sampling nodes included in the first sampling node is less than M.

[0060] In some embodiments of this application, the second sampling node may include one or more sampling nodes, and the number of sampling nodes included in the second sampling node is less than M.

[0061] In some embodiments of this application, the sum of the number of sampling nodes included in the first sampling node and the number of sampling nodes included in the second sampling node may be less than or equal to M.

[0062] In some embodiments of this application, the second sampling node may include at least some of the sampling nodes other than the first sampling node among the M sampling nodes.

[0063] In some embodiments of this application, the second sampling node may include some of the sampling nodes other than the first sampling node among the M sampling nodes, or the second sampling node may include all the sampling nodes other than the first sampling node among the M sampling nodes.

[0064] In some embodiments of this application, the aforementioned partial sampling nodes can be sampling nodes whose capacitance change is greater than the fourth threshold among all sampling nodes except the first sampling node out of the M sampling nodes.

[0065] The aforementioned fourth threshold can be used to represent the minimum value of capacitance change caused by an effective touch that can trigger a response from an electronic device. This fourth threshold can be set based on experience or actual needs, and this application embodiment does not limit it.

[0066] In some embodiments of this application, if the capacitance change of M sampling nodes in the touchscreen is greater than a first threshold, it indicates that the M sampling nodes of the touchscreen have been touched, which can be understood as the electronic device receiving input to the screen area corresponding to the M sampling nodes of the touchscreen. Then, if the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, it can be understood that the screen area corresponding to the first sampling node is "touched by water," that is, the screen area corresponding to the first sampling node is immersed in water and is an immersion area. In this case, the electronic device does not respond to input to the screen area corresponding to the first sampling node.

[0067] In some embodiments of this application, if the capacitance change of M sampling nodes in the touchscreen is greater than a first threshold, it indicates that the M sampling nodes of the touchscreen have been touched, which can be understood as the electronic device receiving input to the screen area corresponding to the M sampling nodes of the touchscreen. Then, if the screen area corresponding to the second sampling node among the M sampling nodes does not meet the immersion condition, it can be understood that the screen area corresponding to the second sampling node has not been "touched by water," that is, the screen area corresponding to the second sampling node is not immersed in water and is a non-immersion area, then the electronic device can respond to input to the screen area corresponding to the second sampling node.

[0068] For example, assuming the screen area corresponding to the first sampling node is the upper half of the screen area of ​​the electronic device, and the second sampling node is all the sampling nodes other than the first sampling node among the M sampling nodes, then the screen area corresponding to the second sampling node is the lower half of the screen area of ​​the electronic device. In this case, if the screen area corresponding to the first sampling node among the M sampling nodes satisfies the immersion condition, it means that the upper half of the screen area of ​​the electronic device is immersed in water. If the screen area corresponding to the second sampling node among the M sampling nodes does not satisfy the immersion condition, it means that the lower half of the screen area of ​​the electronic device is immersed in water. In this case, the electronic device may not respond to the detected input to the upper half of the screen area of ​​the electronic device, but may respond to the detected input to the lower half of the screen area of ​​the electronic device and execute the operation corresponding to the input.

[0069] For example, taking a mobile phone as an example, in an underwater photography scenario, the upper half of the phone is submerged in water, while the lower half is not. When the user clicks the shooting control on the lower half of the phone, the electronic device can respond to the click input and perform a shooting operation.

[0070] In other words, the processing method provided in this application embodiment can support the operation of the touch screen area submerged in water when the mobile phone is partially submerged, while the touch screen area not submerged in water can be operated normally. For example, a user can submerge the camera area underwater to take photos, or submerge part of the camera underwater to take photos of the water surface boundary.

[0071] Thus, in an underwater environment, the electronic device's response to touch signals is limited to the non-water-immersed area, ensuring normal touch response unaffected by water and improving the accuracy of touch response.

[0072] The processing method provided in this application embodiment allows the electronic device to accurately identify the submerged and non-submerged screen areas based on the capacitance changes of the touchscreen when used in an underwater environment. This enables the electronic device to accurately distinguish between inputs to the submerged and non-submerged screen areas, improving the accuracy of touch detection. Furthermore, the electronic device only responds to inputs to the non-submerged screen areas and not to inputs to the submerged screen areas, reducing erroneous operations caused by the conductivity of water and improving the accuracy of touch response. This allows users to continue to flexibly control the electronic device via the touchscreen even when it is partially submerged.

[0073] In some embodiments of this application, the processing method provided by the embodiments of this application may further include the following steps 201 to 203, and the step 102 above, "if the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, then determine not to respond to the detected input to the screen area corresponding to the first sampling node", can be specifically implemented through the following step 204.

[0074] Step 201: When the capacitance change of M sampling nodes in the touch screen is greater than the first threshold, the electronic device marks the M sampling nodes as the first value and marks the other sampling nodes in the touch screen as the second value.

[0075] In some embodiments of this application, the first value and the second value are different values, and the values ​​of the first value and the second value can be set according to actual needs. This application does not limit this. For example, the first value can be 1 and the second value can be 0. Or, the first value can be 0 and the second value can be 1. Or, the first value can be 1 and the second value can be 2. Or, the first value can be 0 and the second value can be 2.

[0076] In some embodiments of this application, the sampling node marked with a first value is the sampling node of the area touched on the touch screen, and the sampling node marked with a second value is the sampling node of the area not touched on the touch screen.

[0077] In some embodiments of this application, the electronic device can binarize the capacitance change of each sampling node, mark M sampling nodes as first values, and mark the other sampling nodes as second values.

[0078] In some embodiments of this application, the electronic device can convert the capacitance change of each sampling node into a digital signal to obtain the difference data of each sampling node, and then mark the sampling node with the difference data greater than a first threshold as a first value, and mark the sampling node with the difference data not greater than the first threshold as a second value.

[0079] For example, such as Figure 2 As shown, taking a mobile phone as an example, Figure 2 The image shows a phone inverted with its upper half submerged in water. When a finger is near the shutter button on the lower half, the image displays one frame of difference data from each sampling node on the touchscreen. Each sampling node represents the intersection of a driving channel and a sensing channel. Figure 2 The image shows the difference data for 18 × 40 = 720 sampling nodes. Furthermore, for ease of layout, Figure 2This involves rotating the phone 90 degrees to the left, placing it horizontally with the bottom half facing right. Next, assuming the first threshold is 450, the electronic device compares the difference data of each of the 720 sampling nodes with 450. Sampling nodes with a difference greater than 450 are marked as 1, and those with a difference no greater than 450 are marked as 0. After all marking is complete, the marked value of each sampling node on the phone's touchscreen is as follows: Figure 3 As shown.

[0080] In some embodiments of this application, after the electronic device labels M sampling nodes as first values ​​and other sampling nodes as second values, a binary matrix can be obtained. For example, this binary matrix can be found in [reference needed]. Figure 3 .

[0081] Step 202: The electronic device sets corresponding labels for each of the M sampling nodes based on the value and position of each sampling node mark on the touch screen.

[0082] In some embodiments of this application, the electronic device can set corresponding labels for M sampling nodes whose labeled values ​​are first values, based on the value and position of each sampling node in the touch screen.

[0083] In some embodiments of this application, step 202 above can be specifically implemented through the following steps 2021 and 2022.

[0084] Step 2021: The electronic device begins scanning from the third sampling node of the touchscreen.

[0085] In some embodiments of this application, the value marked on the third sampling node is a first value; that is, the third sampling node is a sampling node marked with a first value. In other words, the electronic device starts scanning from the sampling node on the touchscreen whose value is marked as the first value.

[0086] Step 2022: During this scanning process, the electronic device sets a first label for the sampling nodes whose labeled value is the first value. The scanning continues until the third sampling node, and the scanning path is determined based on whether the sampling nodes whose labeled value is the first value meet the label setting conditions.

[0087] In some embodiments of this application, the electronic device may perform one scan or multiple scans, each scan starting from a sampling node marked with a first value on the touch screen, but the sampling node that starts the scan each time is a different sampling node.

[0088] In some embodiments of this application, whether the electronic device performs one scan or multiple scans is determined based on the distribution of sampling nodes marked with a first value in the touchscreen, and is determined during the scanning of the sampling nodes in the touchscreen.

[0089] In some embodiments of this application, the electronic device uses a recursive scanning method, starting the scan from the third sampling node and finally returning to the third sampling node to end one scan.

[0090] In some embodiments of this application, during the scanning process, if a sampling node with a marked value of the second value is detected, it is skipped until a sampling node with a marked value of the first value is detected. Then, the next sampling node to be scanned is determined by judging whether the sampling node with a marked value of the first value meets the label setting conditions. Here, skipping can be understood as not performing any operation on the scanned sampling node with a marked value of the second value, but continuing to scan the next sampling node according to the preset path.

[0091] In some embodiments of this application, during the current scanning process, if a sampling node with a marked value of the first value is found to meet the tag setting conditions, the electronic device scans the adjacent sampling nodes of the currently scanned sampling node according to a preset path; if a sampling node with a marked value of the first value is found to not meet the tag setting conditions, the device returns to the previously scanned sampling node.

[0092] During the process of the electronic device scanning the adjacent sampling nodes of the currently scanned sampling node according to the preset path, if the value marked by any adjacent sampling node is the second value or has been set with a label, then the other adjacent sampling nodes of the sampling node are scanned according to the preset path until a sampling node marked with the first value and not set with a label is scanned from the other adjacent sampling nodes. The sampling node is then set with a label and it is determined whether the sampling node meets the label setting conditions.

[0093] In some embodiments of this application, the label setting condition can be: among the adjacent sampling nodes of the scanned sampling node, there exists a sampling node with a marked value of the first value and no label set. Here, a sampling node without a label can be understood as a sampling node that has not been scanned.

[0094] In some embodiments of this application, the aforementioned adjacent sampling nodes may include an upper sampling node, a lower sampling node, a left sampling node, and a right sampling node. Alternatively, the aforementioned adjacent sampling nodes may include an upper sampling node, a lower sampling node, a left sampling node, a right sampling node, an upper-left sampling node, an upper-right sampling node, a lower-left sampling node, and a lower-right sampling node.

[0095] In some embodiments of this application, the above-mentioned condition of satisfying the label setting can be understood as the existence of a sampling node whose label value is the first value and which has no label set among the adjacent sampling nodes of the sampling node whose label value is the first value.

[0096] For example, taking sampling node A as an example, where the first value is 1 and the scanned label value is 1, if the label value of the sampling node above sampling node A is 1 and the above sampling node has no label set, then sampling node A satisfies the label setting condition. Alternatively, if the label value of the sampling node to the left of sampling node A is 1 and the left sampling node has no label set, then sampling node A satisfies the label setting condition.

[0097] In some embodiments of this application, not meeting the label setting conditions can be understood as the absence of a label-valued sampling node with a first value among the adjacent sampling nodes of the sample node that was scanned.

[0098] In some embodiments of this application, the absence of sampling nodes with a first value and no label among the adjacent sampling nodes may include: all adjacent sampling nodes having a second value, all adjacent sampling nodes having labels, or adjacent sampling nodes including only sampling nodes with a second value and sampling nodes with labels.

[0099] For example, taking sampling node B as an example, where the first value is 1, the second value is 2, and the scanned marker value is 1, if the marker values ​​of the sampling nodes above, below, left, and right of sampling node B are all 2, then sampling node B does not meet the label setting conditions. Alternatively, if the marker values ​​of the sampling nodes above, below, left, and right of sampling node B are all 1 and all have been labeled, then sampling node B does not meet the label setting conditions. Or, if the marker values ​​of the sampling nodes above and below of sampling node B are 2, the marker values ​​of the sampling nodes left and right of sampling node B are 1, and both the left and right sampling nodes have been labeled, then sampling node B does not meet the label setting conditions.

[0100] In some embodiments of this application, the adjacent sampling node of the aforementioned sampling node can be the adjacent sampling node of the currently scanned sampling node. The previously scanned sampling node can be the sampling node that was scanned before the current sampling node was scanned.

[0101] For example, suppose sampling node A is scanned first, and then sampling node B is scanned. If sampling node B is the currently scanned sampling node, then the adjacent sampling nodes of this sampling node can be the adjacent sampling nodes of sampling node B, and the previously scanned sampling node is sampling node A.

[0102] In some embodiments of this application, the preset path can be up-down-left-right; or, the preset path can be left-right-up-down; or, the preset path can be left-up-right-down; or, the preset path can be right-down-left-up; or, the preset path can be up-down-left-right-up-left-up-right-down-right-down, etc., and this application does not limit the specific path.

[0103] For example, taking a preset path of top-bottom-left-right and sampling node C as the third sampling node, if the value marked on sampling node C is the first value, then a first label is set for sampling node C, and the sampling nodes above sampling node C are scanned. If the value marked on the upper sampling node is the second value, it is skipped, and the scanning of the sampling nodes below sampling node C continues. If the value marked on the lower sampling node is the first value and a first label has been set, then the scanning of the sampling nodes to the left of sampling node C continues. If the value marked on the left sampling node is the second value, it is skipped, and the scanning of the sampling nodes to the right of sampling node C continues. If the value marked on the right sampling node is the first value and a first label has not been set, then a first label is set for the right sampling node. Then, the adjacent sampling nodes of the right sampling node are scanned according to the preset path, and so on, until sampling node C is returned to be scanned, and the current scan ends.

[0104] For example, taking a preset path of up-down-left-right, scanning from the third sampling node to sampling node C, if the value marked on sampling node C is the first value, then a first label is set for sampling node C, and the sampling nodes above sampling node C are scanned. If the value marked on the upper sampling node is the second value, it is skipped, and the scanning of the sampling nodes below sampling node C continues. If the value marked on the lower sampling node is the first value and a first label has been set, then the scanning of the sampling nodes to the left of sampling node C continues. If the value marked on the left sampling node is the second value, it is skipped, and the scanning of the sampling nodes to the right of sampling node C continues. If the value marked on the right sampling node is the second value, it means that sampling node C does not meet the label setting conditions, and the electronic device returns to continue scanning the sampling nodes to the left of sampling node C, and continues to determine whether the sampling nodes to the left of sampling node C meet the label setting conditions, and so on, until the scanning returns to the third sampling node, ending the current scan.

[0105] In some embodiments of this application, the electronic device sets different labels for sampling nodes whose marked value is a first value during different scanning processes. For example, during the first scan, the electronic device sets a first label for the sampling node whose marked value is a first value. During the second scan, the electronic device sets a second label, which is different from the first label, for the sampling node whose marked value is a first value, and so on, so that the electronic device sets different labels for the sampling node whose marked value is a first value during different scanning processes.

[0106] For example, the labels mentioned above can be numbers, symbols, letters, etc., and this application embodiment does not limit this. For example, the first label can be 1, and the second label can be 2. Or, the first label can be 11, and the second label can be 12. Or, the first label can be 21, and the second label can be 22. Or, the first label can be a, and the second label can be b. Or, the first label can be △, and the second label can be ◇.

[0107] In some embodiments of this application, the sampling nodes scanned by the electronic device are different during different scanning processes.

[0108] In some embodiments of this application, the electronic device may assign a tag matrix L = l(i,j), where the value of each node in the tag matrix can be used to represent the tag set for that node.

[0109] For example, combined Figure 3Taking a preset path of up, down, left, and right as an example, the electronic device starts scanning from the sampling node in row 0, column 0. The value of this sampling node in row 0, column 0 is 1, so the electronic device sets a first label for it, such as l(0,0) = 1. Then, the electronic device recursively scans the adjacent sampling nodes of this node. If the node above it is a boundary, it is skipped, and the sampling node below it, i.e., the sampling node in row 1, column 0, is scanned. The value of this sampling node in row 1, column 0 is 1, so the electronic device sets a first label for it, such as l(1,0) = 1. Similarly, the electronic device recursively scans the adjacent sampling nodes of the sampling node in row 1, column 0. If the sampling node above it has already been labeled, it is skipped, and the sampling node below it, i.e., the sampling node in row 2, column 0, is scanned. The value of this sampling node in row 2, column 0, is 1, so the electronic device sets a first label for it, such as l(2,0) = 1. And so on. Whenever a sampled node is scanned and its tag value is 1, a first tag is set for that sampled node. The process then continues scanning the adjacent sampled nodes in sequence until no adjacent sampled node has a tag value of 1 and is unlabeled. At this point, the scan returns to the previous sampled node, continuing until the sampled node in row 0, column 0 is reached, at which point the current scan ends. Figure 3 As shown, this scan sets label 1 for all sampling nodes from column 0 to column 13. Next, the electronic device can search for other unscanned sampling nodes with a value of 1 among the sampling nodes on the touchscreen. It then starts scanning from these unscanned nodes, such as the sampling node in row 7, column 33, which is labeled with a value of 1. The electronic device then sets a second label for this node, such as l(7,33) = 2. Then, the electronic device recursively scans the adjacent sampling nodes of this node. If the sampling node above it has a value of 0, it skips it and scans the sampling node below it, i.e., the sampling node in row 8, column 33, which is labeled with a value of 1. The electronic device then sets a second label for this node, such as l(8,33) = 2. And so on. Whenever a sampled node is scanned and its tag value is 1, a second tag is set for that sampled node. The process continues by scanning the adjacent sampled nodes until no adjacent sampled node has a tag value of 1 and is unlabeled. Then, the scan returns to the previous sampled node, continuing until the sampled node in row 7, column 33 is reached, at which point the current scan ends. Figure 3As shown, this scan sets label 2 for the sampling nodes in rows 7 (columns 33-35), 8 (columns 33-36), 9 (columns 33-36), 10 (columns 34-36), and 11 (column 35). Finally, the electronic device obtains the label matrix L as shown. Figure 4 As shown.

[0110] In this way, the electronic device can set labels for sampling nodes with a value of 1 in the sampling nodes of the touch screen, and set different labels for sampling nodes in different connected domains to mark different areas touched on the touch screen, which makes it easier to filter the water-immersed areas from the touched areas later.

[0111] Step 203: The electronic device determines at least one connected component based on the tags set by the M sampling nodes.

[0112] In some embodiments of this application, sampling nodes within the same connected domain have the same label.

[0113] In some embodiments of this application, the electronic device can determine the screen area corresponding to the sampling nodes with the same label as a connected component.

[0114] For example, such as Figure 4 As shown, the screen region corresponding to the sampling node labeled 1 is connected component 1, and the screen region corresponding to the sampling node labeled 2 is connected component 2. The screen region corresponding to the first sampling node can include connected component 1 and / or connected component 2.

[0115] In this way, by setting labels for the sampling nodes marked with the first value, the electronic device divides the area composed of the sampling nodes marked with the first value into at least one connected region, so that it can subsequently determine whether the at least one connected region is a water-immersed region by judging whether the at least one connected region meets the water immersion condition, thereby improving the efficiency of determining the water-immersed region.

[0116] In some embodiments of this application, after the electronic device marks M sampling nodes as first values ​​and other sampling nodes as second values, the electronic device can determine at least one connected component in the screen area corresponding to the M sampling nodes based on the positions of the M sampling nodes in the touch screen.

[0117] Step 204: If the screen region corresponding to the first connected component in at least one connected component satisfies the immersion condition, then determine that the detected input to the screen region corresponding to the first connected component will not be responded to.

[0118] In some embodiments of this application, the first connected component is a connected component formed by the first sampling node among the M sampling nodes. In other words, the first connected component includes the first sampling node among the M sampling nodes.

[0119] In some embodiments of this application, the number of the first connected domains is less than or equal to the number of at least one connected domain.

[0120] In some embodiments of this application, the number of the first connected domains is equal to the number of at least one connected domain, indicating that the screen area corresponding to each of the at least one connected domains is a water-immersed area, and the electronic device does not respond to the detected input to the screen area corresponding to each of the at least one connected domains.

[0121] In some embodiments of this application, the number of first connected regions is less than the number of at least one connected region, indicating that at least one connected region includes a connected region that does not meet the immersion condition. If the screen area corresponding to the second connected region in at least one connected region does not meet the immersion condition, the electronic device determines a response to the detected input to the screen area corresponding to the second connected region.

[0122] In some embodiments of this application, the second connected domain includes the second sampling node among the M sampling nodes.

[0123] In some embodiments of this application, the second connected component refers to all connected components other than the first connected component in at least one connected component. Alternatively, the second connected component refers to a portion of the connected components other than the first connected component in at least one connected component.

[0124] In some embodiments of this application, the electronic device responds to detected input to screen areas corresponding to all connected components in at least one connected component, excluding the first connected component. Alternatively, the electronic device responds to detected input to screen areas corresponding to a portion of the connected components in at least one connected component, excluding the first connected component.

[0125] Thus, by dividing the touched area on the touchscreen into connected regions and determining whether to respond to input to the screen area corresponding to that connected region based on whether the connected region meets the immersion condition, the accuracy of touch response can be improved.

[0126] In some embodiments of this application, the screen area corresponding to the first sampling node among the M sampling nodes satisfying the immersion condition may include: the size of the screen area corresponding to the first sampling node among the M sampling nodes is greater than the second threshold, and the boundary of the screen area corresponding to the first sampling node satisfies the linearity condition.

[0127] In some embodiments of this application, the screen area corresponding to the first sampling node can be a connected domain.

[0128] In some embodiments of this application, the size of the screen area corresponding to the first sampling node can be the area of ​​the screen area corresponding to the first sampling node.

[0129] In some embodiments of this application, the area of ​​the screen region corresponding to the first sampling node can be represented by the number of sampling nodes within that screen region.

[0130] In some embodiments of this application, the second threshold can be determined based on the number of sampling nodes on the touchscreen. For example, the second threshold can be K% of the sampling nodes on the touchscreen, where the value of K can be set based on experience or actual needs, and this application does not limit this. For example, the value of K can range from 3 to 6.

[0131] In some embodiments of this application, the number of sampling nodes on the touchscreen can be determined based on the number of driving channels and sensing channels. For example, assuming that the touchscreen of an electronic device includes 18 driving channels and 40 sensing channels, the number of sampling nodes on the touchscreen is 18 × 40 = 720.

[0132] For example, assuming the number of sampling nodes on the touchscreen is 720 and the value of M is 5, the second threshold can be 720 × 5% = 36. Alternatively, assuming the number of sampling nodes on the touchscreen is 800 and the value of M is 6, the second threshold can be 800 × 6% = 48.

[0133] In some embodiments of this application, since the area of ​​the touchscreen submerged in water is relatively large when the electronic device is immersed in water, if the size of the screen area corresponding to the first sampling node is greater than the second threshold, it indicates that the screen area corresponding to the first sampling node may be a submerged area. Thus, smaller non-submerged areas can be eliminated.

[0134] In some embodiments of this application, the above-mentioned linearity condition is used to determine whether a boundary is approximately a straight line. In other words, if a boundary satisfies the linearity condition, it means that the boundary is approximately a straight line; if a boundary does not satisfy the linearity condition, it means that the boundary is not a straight line.

[0135] In some embodiments of this application, based on the characteristics of water, it is known that when an electronic device is in a semi-submerged state, the boundary between the touch screen of the electronic device and the water is approximately a straight line. Therefore, by determining whether the boundary of the screen area corresponding to the first sampling node satisfies the linearity condition, it can be determined whether the screen area corresponding to the first sampling node is a submerged area.

[0136] Thus, by determining whether the size of the screen area corresponding to the first sampling node is greater than the second threshold, obvious non-water-immersed areas can be eliminated. Furthermore, by determining whether the boundary of the screen area corresponding to the first sampling node is approximately a straight line, it is possible to further determine whether the screen area corresponding to the first sampling node is a water-immersed area, thereby improving the accuracy of determining the water-immersed area of ​​the touch screen.

[0137] In some embodiments of this application, the linearity condition of the boundary of the screen area corresponding to the first sampling node includes: the linear fit regression coefficient of the boundary of the screen area corresponding to the first sampling node is greater than a third threshold; wherein, the linear fit regression coefficient of the boundary is obtained by linearly fitting the position coordinates of the sampling node on the boundary.

[0138] In some embodiments of this application, the electronic device may use the least squares method to linearly fit the position coordinates of the sampling nodes on the boundary to obtain the linear fit regression coefficient of the boundary.

[0139] In some embodiments of this application, an electronic device can determine the boundary of the screen area corresponding to the first sampling node by calculating the gradient of the screen area corresponding to the first sampling node.

[0140] In some embodiments of this application, the electronic device can take a horizontal gradient. The horizontal direction can be a direction parallel to the sensing channel. The horizontal gradient can be calculated by formula (1) and finally the horizontal gradient matrix G = g(i,j) is obtained.

[0141] g(i,j)=l(i,j)-l(i,j+1) (1)

[0142] Where g(i,j) is the horizontal gradient value of the sampling node in the i-th row and j-th column, l(i,j) is the value of the sampling node label in the i-th row and j-th column, and l(i,j+1) is the value of the sampling node label in the i-th row and j+1-th column.

[0143] For example, combined Figure 4 Assuming the screen area corresponding to the first sampling node is the screen area with label 1, the electronic device can calculate matrix G = g(i,j) using the above formula (1). This matrix is ​​as follows: Figure 5 As shown.

[0144] In some embodiments of this application, the electronic device can take a vertical gradient. The vertical direction can be a direction parallel to the driving channel. The vertical gradient can be calculated by formula (2), and finally the vertical gradient matrix H = h(i,j) is obtained.

[0145] h(i,j)=l(i,j)-l(i+1,j) (2)

[0146] Where h(i,j) is the vertical gradient value of the sampling node in the i-th row and j-th column, l(i,j) is the value of the sampling node label in the i-th row and j-th column, and l(i,j+1) is the value of the sampling node label in the i-th row and j+1-th column.

[0147] In some embodiments of this application, after the electronic device determines the gradient of the screen area corresponding to the first sampling node, it can determine the coordinate value of the sampling node with a gradient value of 1 as the boundary point position of the screen area corresponding to the first sampling node.

[0148] For example, such as Figure 5 As shown, the boundary point positions of the screen area labeled 1 are P = {(0,13),(1,13),(2,13),(3,13),(4,13),(5,13),(6,13),(7,13),(8,13),(9,13),(10,13),(11,13),(12,13),(13,13),(14,13),(15,13),(16,13),(17,13)}.

[0149] In some embodiments of this application, the electronic device can use the least squares method to linearly fit the above boundary point positions according to the mathematical model of a straight line y=a+bx, and the objective function is as follows (3), with the objective being to obtain the minimum residual sum.

[0150]

[0151] Where S(a, b) represents the sum of residuals, y i The y-axis value representing the position of the boundary point, x i The x-axis value represents the position of the boundary point, n is the number of boundary points, and a and b are the coefficients of the linear model obtained by linearly fitting the boundary point positions.

[0152] In some embodiments of this application, after the electronic device determines the coefficients a and b of the linear model using the above formula (3), it can calculate the regression coefficients of the linear fit.

[0153] In some embodiments of this application, when the linear fit regression coefficient is greater than a third threshold, the electronic device can determine that the boundary of the screen area corresponding to the first sampling node satisfies the linearity condition.

[0154] In some embodiments of this application, the third threshold can be set according to experience or actual needs. For example, the third threshold can be 0.5, 0.7 or 0.9. This application does not limit this.

[0155] For example, assuming the third threshold is M, the calculated linear fit regression coefficient is R2. If R2>M, it means that the boundary of the screen area corresponding to the first sampling node satisfies the linearity condition.

[0156] In this way, the electronic device can improve the efficiency and accuracy of determining whether the screen area corresponding to the first sampling node is a water-immersed area by performing linear fitting on the boundary points of the screen area corresponding to the first sampling node and calculating the linear fitting degree regression coefficient. The relationship between the linear fitting degree regression coefficient and the third threshold is used to determine whether the boundary meets the linearity condition.

[0157] In some embodiments of this application, if the screen area corresponding to the first sampling node includes an outer boundary and an inner boundary, and the number of sampling nodes in the screen area formed by the inner boundary is not greater than a first threshold, then the screen area corresponding to the first sampling node does not meet the immersion condition. For example, assuming the screen area corresponding to the first sampling node is circular or rectangular, the electronic device can exclude the screen area corresponding to the first sampling node and not identify it as an immersion area.

[0158] In some embodiments of this application, if the electronic device detects that there are multiple screen areas that meet the immersion conditions, the electronic device can determine each screen area that meets the immersion conditions as an immersion area and determine not to respond to input for each screen area that meets the immersion conditions.

[0159] In some embodiments of this application, if the electronic device detects multiple screen areas that meet the immersion conditions, the electronic device can determine the screen area with the largest area as the immersion area.

[0160] In some embodiments of this application, the processing method provided in the embodiments of this application may further include the following step 401.

[0161] Step 401: If the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, and the screen area corresponding to the first sampling node includes the screen area corresponding to the under-screen camera module, then the electronic device determines that it will not respond to the detected input to the screen area corresponding to the first sampling node.

[0162] In some embodiments of this application, the electronic device can mark the screen area corresponding to the under-display camera module by the position of the sampling node. Alternatively, the electronic device can mark the screen area corresponding to the under-display camera module by the positions of the sensing channel and the driving channel.

[0163] For example, such as Figure 6As shown in the diagram, the circular area represents the screen area corresponding to the under-display camera module. This screen area is comprised of the sampling nodes in rows 7 and 0, 7 and 1, 8 and 8, 9 and 9 respectively. Alternatively, the left boundary of the screen area corresponding to the camera module can be sensor channel 0, the right boundary sensor channel 1, the upper boundary drive channel 7, and the lower boundary drive channel 9; that is, the screen area corresponding to the camera module is a closed region composed of sensor channel 0, sensor channel 1, drive channel 7, and drive channel 9.

[0164] In some embodiments of this application, if the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, and the screen area corresponding to the first sampling node includes the screen area corresponding to the under-display camera module, then the screen area corresponding to the first sampling node can be at least a screen area composed of the screen area corresponding to the under-display camera module and a connected domain of one upper corner of the electronic device.

[0165] In other words, when the under-display camera module of an electronic device is submerged in water, at least one upper corner of the electronic device is also submerged in water, and the under-display camera module and at least one upper corner of the electronic device are in the same connected domain.

[0166] For example, the screen area corresponding to the first sampling node can be a screen area composed of the screen area corresponding to the under-display camera module and the connected domain of the upper left corner of the electronic device. Alternatively, the screen area corresponding to the first sampling node can be a screen area composed of the screen area corresponding to the under-display camera module and the connected domain of the upper right corner of the electronic device. Alternatively, the screen area corresponding to the first sampling node can be a screen area composed of the screen area corresponding to the under-display camera module, the connected domain of the upper left corner of the electronic device, and the connected domain of the upper right corner.

[0167] Therefore, in underwater photography scenarios, the screen area corresponding to the first sampling node needs to not only meet the immersion condition, but also include the screen area corresponding to the under-screen camera module. This way, the screen area corresponding to the first sampling node can be further determined as the immersion area, improving the accuracy of electronic devices in determining the immersion area.

[0168] In some embodiments of this application, if the electronic device detects that there are at least two screen areas that meet the immersion conditions and include the screen area corresponding to the under-display camera module, the electronic device determines not to respond to the detected input to the at least two screen areas.

[0169] In some embodiments of this application, if the electronic device detects that there are at least two screen areas that meet the immersion conditions and include the screen area corresponding to the under-display camera module, the electronic device will determine the screen area with the largest area as the immersion area and will not respond to the detected input to the screen area with the largest area among the at least two screen areas.

[0170] It should be noted that the screen area composed of the first sampling nodes in this application embodiment can be of any shape, such as triangle, trapezoid, rectangle, etc., and this application embodiment does not limit this. In other words, the processing method provided by this application embodiment can support the situation where the camera of the electronic device is located in any corner or has an asymmetrical layout, and also supports the detection of water immersion areas of different shapes, increasing the range of water immersion area detection and improving the generalization of water immersion area detection for touch screens.

[0171] The processing method provided in this application embodiment only responds to input from the non-submerged area when the electronic device is partially submerged in water, and does not respond to input from the submerged area. Compared with related technologies, when the electronic device is submerged in water, neither the submerged area nor the non-submerged area can respond to any detected input to the touch screen. This solution provides a method for using electronic devices normally in an underwater environment, improving the accuracy of touch response.

[0172] Figure 8 This is a flowchart illustrating the processing method provided in this application embodiment. Taking the screen detection of a partially submerged mobile phone as an example, the method may include the following steps 601 to 607.

[0173] Step 601: The mobile phone detects the capacitance change of each sampling node of the touch screen.

[0174] Step 602: The mobile phone converts the capacitance change of each sampling node into a digital signal to obtain the difference data of each sampling node.

[0175] Step 603: The mobile phone performs binarization processing on each sampling node based on the relationship between the capacitance change of each sampling node and the first threshold. Sampling nodes with capacitance changes greater than the first threshold are marked as 1, and sampling nodes with capacitance changes not greater than the first threshold are marked as 0.

[0176] Step 604: The mobile phone recursively scans the sampling nodes of the touch screen, sets label 1 for the first connected component corresponding to the sampling node whose capacitance change is greater than the first threshold, and sets label 2 for the second connected component corresponding to the sampling node whose capacitance change is greater than the first threshold.

[0177] Step 605: The mobile phone identifies the label 1 area with an area greater than the second threshold in the label 1 area and label 2 area, and removes the label 2 area.

[0178] Step 606: The mobile phone determines whether the label 1 area includes the screen area of ​​the under-display camera module. If so, it determines whether the boundary of the label 1 area meets the linearity condition. If so, it determines that the label 1 area is a water-immersed area.

[0179] Step 607: The mobile phone responds to the detected user click input on the shooting control in the label 2 area and performs the shooting operation.

[0180] The processing method provided in this application, by improving the touchscreen algorithm, can intelligently detect the submerged area when the touchscreen of an electronic device is partially immersed in water, and automatically enter underwater mode. This allows users to autonomously and flexibly use their mobile phones to take pictures underwater, significantly improving the convenience of shooting when the phone is partially submerged underwater, while maintaining the comprehensiveness and operability of the shooting function. In addition, the connected component analysis or submersion condition judgment is triggered only when the detected capacitance change is greater than a threshold, which can reduce the real-time computing load; furthermore, this method is compatible with existing capacitive touchscreens and camera modules, requiring only algorithm upgrades, thus reducing hardware costs.

[0181] It should be noted that the specific implementation process of steps 601 to 607 above can be found in the relevant description of the above embodiments. To avoid repetition, this embodiment will not repeat the details here.

[0182] It should be noted that each of the above method embodiments, or various possible implementations of each method embodiment, can be executed individually or in combination of any two or more. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any restrictions on this.

[0183] The processing method provided in this application can be executed by a processing device. This application uses the example of a processing device executing the processing method to illustrate the processing device provided in this application.

[0184] Figure 9 This is a schematic diagram of the processing device provided in the embodiments of this application. The processing device includes a detection module 701 and an execution module 702.

[0185] The detection module 701 is used to detect the capacitance change at each sampling node of the touch screen.

[0186] The execution module 702 is configured to, when the capacitance change of M sampling nodes in the touch screen is greater than a first threshold, determine not to respond to the detected input to the screen area corresponding to the first sampling node if the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, and / or determine to respond to the detected input to the screen area corresponding to the second sampling node if the screen area corresponding to the second sampling node among the M sampling nodes does not meet the immersion condition; M is an integer greater than 1.

[0187] In some embodiments of this application, the execution module 702 is specifically configured to determine not to respond to the detected input to the screen area corresponding to the first sampling node if the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition and the screen area corresponding to the first sampling node includes the screen area corresponding to the under-display camera module.

[0188] In some embodiments of this application, the screen area corresponding to the first sampling node among the M sampling nodes satisfies the immersion condition as follows: the size of the screen area corresponding to the first sampling node among the M sampling nodes is greater than the second threshold, and the boundary of the screen area corresponding to the first sampling node satisfies the linearity condition.

[0189] In some embodiments of this application, the linearity condition of the boundary of the screen area corresponding to the first sampling node includes: the linear fit regression coefficient of the boundary of the screen area corresponding to the first sampling node is greater than a third threshold; wherein, the linear fit regression coefficient of the boundary is obtained by linearly fitting the position coordinates of the sampling node on the boundary.

[0190] In some embodiments of this application, the execution module 702 is further configured to mark M sampling nodes as first values ​​and mark other sampling nodes in the touch screen as second values; set corresponding labels for the M sampling nodes based on the value and position of each sampling node in the touch screen; determine at least one connected component based on the labels set for the M sampling nodes, wherein the labels of sampling nodes in the same connected component are the same; if the screen area corresponding to the first connected component in the at least one connected component meets the immersion condition, determine not to respond to the detected input to the screen area corresponding to the first connected component, wherein the first connected component is a connected component formed by the first sampling node among the M sampling nodes.

[0191] The processing device provided in this application embodiment, when used in an underwater environment, can accurately identify the submerged and non-submerged screen areas on the touchscreen based on the capacitance changes of the touchscreen. This allows for accurate differentiation between inputs to the submerged and non-submerged screen areas, improving the accuracy of touch detection. Furthermore, the processing device only responds to inputs to the non-submerged screen areas and not to inputs to the submerged screen areas, reducing erroneous operations caused by the conductivity of water and improving the accuracy of touch response. This allows users to continue flexibly controlling the processing device via the touchscreen even when it is partially submerged.

[0192] The processing device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device, augmented reality / virtual reality device, robot, wearable device, super mobile personal computer, netbook, or personal digital assistant, etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific implementation.

[0193] The processing device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.

[0194] The processing apparatus provided in this application can implement the various processes implemented in the various embodiments of the above processing method. To avoid repetition, it will not be described again here.

[0195] Optionally, such as Figure 10 As shown, this application embodiment also provides an electronic device 900, including a processor 901 and a memory 902. The memory 902 stores a program or instructions that can run on the processor 901. When the program or instructions are executed by the processor 901, they implement the various steps of the above-described processing method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0196] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0197] Figure 11A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0198] The electronic device 1000 includes, but is not limited to, components such as: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, and processor 1010.

[0199] Those skilled in the art will understand that the electronic device 1000 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1010 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 11 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0200] The processor 1010 is configured to detect the capacitance change of each sampling node of the touchscreen; and if the capacitance change of M sampling nodes in the touchscreen is greater than a first threshold, if the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, then it is determined not to respond to the detected input to the screen area corresponding to the first sampling node, and / or, if the screen area corresponding to the second sampling node among the M sampling nodes does not meet the immersion condition, then it is determined to respond to the detected input to the screen area corresponding to the second sampling node; M is an integer greater than 1.

[0201] In some embodiments of this application, the processor 1010 is specifically configured to determine not to respond to the detected input to the screen area corresponding to the first sampling node if the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition and the screen area corresponding to the first sampling node includes the screen area corresponding to the under-display camera module.

[0202] In some embodiments of this application, the screen area corresponding to the first sampling node among the M sampling nodes satisfies the immersion condition as follows: the size of the screen area corresponding to the first sampling node among the M sampling nodes is greater than the second threshold, and the boundary of the screen area corresponding to the first sampling node satisfies the linearity condition.

[0203] In some embodiments of this application, the linearity condition of the boundary of the screen area corresponding to the first sampling node includes: the linear fit regression coefficient of the boundary of the screen area corresponding to the first sampling node is greater than a third threshold; wherein, the linear fit regression coefficient of the boundary is obtained by linearly fitting the position coordinates of the sampling node on the boundary.

[0204] In some embodiments of this application, the processor 1010 is further configured to: mark M sampling nodes as first values ​​and mark other sampling nodes in the touchscreen as second values; set corresponding labels for the M sampling nodes based on the value and position of each sampling node in the touchscreen; determine at least one connected component based on the labels set for the M sampling nodes, wherein the labels of sampling nodes within the same connected component are the same; if the screen area corresponding to the first connected component in the at least one connected component meets the immersion condition, determine not to respond to the detected input to the screen area corresponding to the first connected component, wherein the first connected component is a connected component formed by the first sampling node among the M sampling nodes.

[0205] The electronic device provided in this application embodiment, when used in an underwater environment, can accurately identify the submerged and non-submerged screen areas on the touchscreen based on the capacitance changes of the touchscreen. This allows for accurate differentiation between inputs to the submerged and non-submerged screen areas, improving the accuracy of touch detection. Furthermore, the electronic device only responds to inputs to the non-submerged screen areas and not to inputs to the submerged screen areas, reducing erroneous operations caused by the conductivity of water and improving the accuracy of touch response. This allows users to continue flexibly controlling the electronic device via the touchscreen even when it is partially submerged.

[0206] It should be understood that, in this embodiment, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042. The GPU 10041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0207] The memory 1009 can be used to store software programs and various data. The memory 1009 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1009 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 109 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0208] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor 1010.

[0209] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described processing method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0210] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0211] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above processing method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0212] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0213] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described processing method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0214] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0215] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0216] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A processing method, characterized in that, The method includes: Detect the capacitance change at each sampling node of the touchscreen; If the capacitance change of the M sampling nodes in the touch screen is greater than a first threshold, and the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, then it is determined not to respond to the detected input to the screen area corresponding to the first sampling node, and / or, if the screen area corresponding to the second sampling node among the M sampling nodes does not meet the immersion condition, then it is determined to respond to the detected input to the screen area corresponding to the second sampling node; M is an integer greater than 1.

2. The method according to claim 1, characterized in that, If the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, then determining not to respond to the detected input to the screen area corresponding to the first sampling node includes: If the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, and the screen area corresponding to the first sampling node includes the screen area corresponding to the under-display camera module, then it is determined that no response will be given to the detected input to the screen area corresponding to the first sampling node.

3. The method according to claim 1 or 2, characterized in that, The screen area corresponding to the first sampling node among the M sampling nodes satisfies the immersion condition, including: The size of the screen region corresponding to the first sampling node among the M sampling nodes is greater than the second threshold, and the boundary of the screen region corresponding to the first sampling node satisfies the linearity condition.

4. The method according to claim 3, characterized in that, The boundary of the screen region corresponding to the first sampling node satisfies the linearity condition, including: The linear fit regression coefficient of the screen region corresponding to the first sampling node is greater than the third threshold. The linear fit regression coefficient of the boundary is obtained by linearly fitting the position coordinates of the sampling nodes on the boundary.

5. The method according to claim 1 or 2, characterized in that, The method further includes: The M sampling nodes are marked as first values, and the other sampling nodes in the touch screen are marked as second values; Based on the value and position of each sampling node in the touch screen, a corresponding label is set for each of the M sampling nodes; Based on the labels set for the M sampling nodes, at least one connected component is determined, wherein the labels of sampling nodes within the same connected component are the same; If the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, then determining not to respond to the detected input to the screen area corresponding to the first sampling node includes: If the screen area corresponding to the first connected component in the at least one connected component meets the immersion condition, then it is determined that no response will be given to the detected input to the screen area corresponding to the first connected component, wherein the first connected component is a connected component formed by the first sampling node among the M sampling nodes.

6. A processing apparatus, characterized in that, The device includes a detection module and an execution module; The detection module is used to detect the capacitance change at each sampling node of the touch screen; The execution module is configured to, when the capacitance change of the M sampling nodes in the touch screen is greater than a first threshold, determine not to respond to the detected input to the screen area corresponding to the first sampling node if the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, and / or determine to respond to the detected input to the screen area corresponding to the second sampling node if the screen area corresponding to the second sampling node among the M sampling nodes does not meet the immersion condition. M is an integer greater than 1.

7. The apparatus according to claim 6, characterized in that, The execution module is specifically used for: If the screen area corresponding to the first sampling node among the M sampling nodes meets the immersion condition, and the screen area corresponding to the first sampling node includes the screen area corresponding to the under-display camera module, then it is determined that no response will be given to the detected input to the screen area corresponding to the first sampling node.

8. The apparatus according to claim 6 or 7, characterized in that, The screen area corresponding to the first sampling node among the M sampling nodes satisfies the immersion condition, including: The size of the screen region corresponding to the first sampling node among the M sampling nodes is greater than the second threshold, and the boundary of the screen region corresponding to the first sampling node satisfies the linearity condition.

9. The apparatus according to claim 8, characterized in that, The boundary of the screen region corresponding to the first sampling node satisfies the linearity condition, including: The linear fit regression coefficient of the screen region corresponding to the first sampling node is greater than the third threshold. The linear fit regression coefficient of the boundary is obtained by linearly fitting the position coordinates of the sampling nodes on the boundary.

10. The apparatus according to claim 6 or 7, characterized in that, The execution module is further configured to: The M sampling nodes are marked as first values, and the other sampling nodes in the touch screen are marked as second values; Based on the value and position of each sampling node in the touch screen, a corresponding label is set for each of the M sampling nodes; Based on the labels set for the M sampling nodes, at least one connected component is determined, wherein the labels of sampling nodes within the same connected component are the same; If the screen area corresponding to the first connected component in the at least one connected component meets the immersion condition, then it is determined that no response will be given to the detected input to the screen area corresponding to the first connected component, wherein the first connected component is a connected component formed by the first sampling node among the M sampling nodes.

11. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the processing method as described in any one of claims 1 to 5.

12. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the processing method as described in any one of claims 1 to 5.