Touch method and electronic device
By combining attitude data and capacitance data with an AI deep learning model, the thickness of the capacitive touch panel can be identified, solving the problem of capacitive touch module failure in underwater environments. This achieves stable touch detection and fast response, improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2026-03-27
AI Technical Summary
Capacitive touch modules are prone to failure or detection errors when exposed to water, resulting in unstable touch functionality.
By combining attitude data and capacitance data, a first detection model is used to identify coarse areas, and a second detection model is used to identify fine areas, enabling touch detection in underwater and atmospheric environments. AI deep learning models are used for position recognition, reducing data volume and computational pressure, and lowering hardware costs.
It improves the accuracy and response speed of touch detection, reduces the need for manual settings by users, enhances the device's adaptability in underwater and atmospheric environments, and improves the user experience.
Smart Images

Figure CN120103998B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the terminal field, and in particular to a touch method and electronic equipment. BACKGROUND
[0002] At present, the capacitive touch module is widely used, but it is easily affected by environmental interference, for example, in the case that the terminal using the capacitive touch module is in contact with water, there is a problem of touch function failure or touch detection error.
[0003] In the case of contact with water, how to ensure the effectiveness and accuracy of the touch function is a problem to be solved. SUMMARY
[0004] The present application provides a touch method and electronic equipment, which can realize touch detection in underwater environment and in atmospheric environment, and touch detection when the two environments are freely switched.
[0005] In a first aspect, a touch method is provided, applied to an electronic device including a capacitive touch panel, the method comprising: in an underwater environment, receiving a first operation acting on the capacitive touch panel, obtaining attitude data of the electronic device and first capacitance data of the capacitive touch panel; determining a first region of the capacitive touch panel acted on by the first operation based on the attitude data; and determining a second region in the first region acted on by the first operation according to the attitude data and the first capacitance data of the first region.
[0006] The method adopted in the first aspect realizes touch region recognition based on the capacitive touch panel, accurately recognizes the second region after coarsely recognizing the first region, improves the recognition accuracy, reduces the amount of data required for accurate recognition, and improves the recognition efficiency of the electronic device.
[0007] In combination with the method provided in the first aspect, after determining the second region in the first region acted on by the first operation, the method further comprises: in response to the first operation acting on the second region, executing a task corresponding to the first operation.
[0008] In this way, the complete execution process of the electronic device is supplemented, the electronic device responds to the user's operation, improves the user's use experience, and improves the feasibility of the scheme implementation.
[0009] In some implementations of the first aspect, based on the attitude data, the first region of the capacitive touch panel on which the first operation is performed is determined, specifically including: inputting the attitude data into a first detection model to obtain the first region of the capacitive touch panel on which the first operation is performed; the first detection model is trained by a plurality of sets of training data, and one set of training data includes: an identifier of the first region, and a mapping relationship between the attitude data of the electronic device when the first operation is received on the first region.
[0010] In this way, the first operation and the first region are identified, the portability and expandability of the scheme are improved based on the training of the first model, the cost of retraining when the electronic device uses the first model is reduced, and the accuracy of the scheme in identifying the first region is improved.
[0011] In some implementations of the first aspect, according to the attitude data and the first capacitance data of the first region, a second region in the first region on which the first operation is performed is determined, specifically including: inputting the first capacitance data of the first region and the attitude data into a second detection model to obtain the second region in the first region on which the first operation is performed; the second detection model is trained by a plurality of sets of training data, and one set of training data includes: an identifier of the second region, and a mapping relationship between the attitude data of the electronic device when the first operation is received on the second region and the first capacitance data of the first region.
[0012] In this way, the first operation and the second region are identified, the first operation touch position is identified, the portability and expandability of the scheme are improved based on the training of the second model, the cost of retraining when the electronic device uses the second model is reduced, and the accuracy of the scheme in identifying the second region is improved.
[0013] In some implementations of the first aspect, before the underwater environment, the method further includes: obtaining first environment data, determining that the electronic device is in the underwater environment according to the first environment data, and starting an underwater touch detection mode when the electronic device is in the underwater environment.
[0014] In this way, the electronic device does not need to be manually set by the user, can intelligently identify whether it is in the underwater environment, and automatically performs subsequent underwater touch detection if it is identified to be in the underwater environment, reducing the operation of manually setting the touch detection mode by the user and improving the user experience.
[0015] With reference to the first aspect, in some implementations of the first aspect, before the first environment data is acquired, the method further includes: not detecting a second operation and a third operation, the second operation being used to instruct the electronic device to turn on the underwater touch control detection mode, and the third operation being used to instruct the electronic device to turn on the atmospheric touch control detection mode.
[0016] In this way, the electronic device determines the touch control detection mode by intelligently identifying the environment only when the user does not manually set the touch control detection mode, which can not only provide the user with the service of intelligently setting the touch control detection mode in the case where the user forgets to set the touch control detection mode, but also preferentially use the detection mode set by the user and preferentially consider the subjective intention of the user in the case where the user manually sets, thereby further improving the user experience.
[0017] With reference to the first aspect, in some implementations of the first aspect, determining that the electronic device is in the underwater environment according to the first environment data specifically includes: acquiring second capacitance data through the capacitive touch panel, and determining that the electronic device is in the underwater environment after detecting that the number of capacitance values greater than a first threshold in the second capacitance data is greater than a second threshold.
[0018] In this way, the number of invalid capacitance data can be used to accurately identify whether the current environment is an underwater environment, thereby avoiding misjudgment of the underwater environment in the case where the user occasionally touches the touch panel with wet hands or a small area of the touch panel is splashed with water in the atmospheric environment.
[0019] With reference to the first aspect, in some implementations of the first aspect, before the underwater environment, the method further includes: receiving a second operation for turning on the underwater touch control detection mode.
[0020] In this way, the implementation form of the present solution is increased, a user operation for turning on the underwater touch control detection is added, and the user experience of the present solution is improved.
[0021] With reference to the first aspect, in some implementations of the first aspect, after determining the second region in the first region on which the first operation acts, the method further includes: in the atmospheric environment, receiving a fourth operation acting on the capacitive touch panel, acquiring fourth capacitance data of the capacitive touch panel, and obtaining a third region of the capacitive touch panel on which the fourth operation acts according to the fourth capacitance data.
[0022] In this way, the implementation range of the present solution is expanded, the use mode and use range of the capacitive module are supplemented and improved, the accuracy of touch control detection is improved, the capacitive touch panel is used for capacitive detection, no additional detection module is used, the implementation cost of the solution is reduced, and the implementation feasibility of the solution is improved.
[0023] With reference to the first aspect, in some implementations of the first aspect, after obtaining the third region of the capacitive touch panel acted by the fourth operation according to the fourth capacitance data, the method further includes: in response to the fourth operation acting on the third region, performing a task corresponding to the fourth operation.
[0024] In this way, in the atmospheric environment detection scheme, the complete execution process of the electronic device is supplemented, and the feasibility of implementing the scheme is improved. In the scheme, the electronic device responds to the operation of the user, and the use experience of the user is improved.
[0025] With reference to the first aspect, in some implementations of the first aspect, before the atmospheric environment, the method further includes: obtaining second environment data, determining that the electronic device is in the atmospheric environment according to the second environment data, and starting the atmospheric touch detection mode when the electronic device is in the atmospheric environment.
[0026] In this way, in the atmospheric environment detection scheme, the electronic device is allowed to automatically start the detection mode according to the environment used, the judgment and adaptation ability of the scheme to the environment is improved, and the implementation form of the scheme is increased.
[0027] With reference to the first aspect, in some implementations of the first aspect, before obtaining the second environment data, the method further includes: not detecting a fifth operation and a sixth operation, the fifth operation being used to instruct the electronic device to start the underwater touch detection mode, and the sixth operation being used to instruct the electronic device to start the atmospheric touch detection mode.
[0028] In this way, in the atmospheric environment detection scheme, the implementation feasibility of the scheme for automatically detecting environment data of the electronic device is improved, the detection mode is automatically switched when the user uses it in the underwater environment, additional user operations are avoided, and the use experience of the user is improved.
[0029] With reference to the first aspect, in some implementations of the first aspect, determining that the electronic device is in the atmospheric environment according to the second environment data specifically includes: obtaining third capacitance data through the capacitive touch panel, and after detecting that the number of capacitance values greater than the first threshold in the third capacitance data is less than or equal to the second threshold, determining that the electronic device is in the atmospheric environment.
[0030] In this way, whether the current environment is an atmospheric environment can be accurately identified through the number of invalid capacitance data, and the case of occasionally contacting bubbles of the touch panel in the underwater environment is avoided from being misjudged as an atmospheric environment.
[0031] With reference to the first aspect, in some implementations of the first aspect, before the atmospheric environment, the method further includes: receiving a sixth operation for starting the atmospheric touch detection mode.
[0032] In this way, the electronic device is allowed to receive a user operation to start the atmosphere detection mode, the implementation form of the scheme is increased, and the operation experience of the user for the scheme is improved.
[0033] With reference to the first aspect, in some implementations of the first aspect, the capacitive touch panel includes a plurality of areas that are the same in size as the first area and do not overlap with each other.
[0034] In this way, the division manner of the first area is provided, the implementation form of the division of the first area is increased, and the implementability of the scheme is improved.
[0035] With reference to the first aspect, in some implementations of the first aspect, the first area includes a plurality of areas that are the same in size as the second area and do not overlap with each other.
[0036] In this way, the division manner of the second area is provided, the implementation form of the division of the second area is increased, and the implementability of the scheme is improved.
[0037] With reference to the first aspect, in some implementations of the first aspect, the attitude data includes acceleration data obtained by an acceleration sensor, angular velocity data obtained by a gyroscope sensor, and pressure value data obtained by a pressure sensor.
[0038] In this way, the type of the attitude data is increased, the data acquisition method is expanded, and the implementability of the scheme is improved.
[0039] The second aspect provides an electronic device including a capacitive touch panel, one or more memories, and one or more processors; the capacitive touch panel, the memories, and the one or more processors are coupled, the capacitive touch panel is configured to receive a touch operation, the memories are configured to store computer program codes including computer instructions, and the one or more processors are configured to invoke the computer instructions to cause the electronic device to perform the method described in any one of the preceding first aspect.
[0040] The third aspect provides a chip applied to an electronic device including a capacitive touch panel, the chip including one or more processors configured to invoke computer instructions to cause the electronic device to perform the method described in any one of the preceding first aspect.
[0041] The fourth aspect provides a computer readable storage medium including instructions configured to cause an electronic device including a capacitive touch panel to perform the method described in any one of the preceding first aspect when the instructions are executed on the electronic device. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1A structural schematic diagram of a screen of an electronic device provided by an embodiment of the present application;
[0043] Figure 2 A structural schematic diagram of a touch panel provided by an embodiment of the present application;
[0044] Figure 3 A method flowchart for determining a touch detection mode provided by an embodiment of the present application;
[0045] Figure 4 A method flowchart for determining a touch detection mode based on environmental data provided by an embodiment of the present application;
[0046] Figure 5 A method flowchart for detecting a touch position based on an AI deep learning model provided by an embodiment of the present application;
[0047] Figure 6 A structural schematic diagram of detecting a coarse region based on an AI deep learning model provided by an embodiment of the present application;
[0048] Figure 7 A structural schematic diagram of detecting a fine region based on an AI deep learning model provided by an embodiment of the present application;
[0049] Figure 8 A structural schematic diagram of an AI deep learning model provided by an embodiment of the present application;
[0050] Figure 9 A hardware architecture schematic diagram of an electronic device provided by an embodiment of the present application;
[0051] Figure 10 A software architecture schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0052] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings. In the description of the embodiments of the present application, unless otherwise specified, “ / ” represents the meaning of or, for example, A / B can represent A or B; the “and / or” in the text only represents a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone.
[0053] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0054] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.
[0055] To better understand the embodiments of this application, the capacitive touch panel used in the embodiments of this application will first be introduced. Next, in conjunction with... Figures 1-2 This application introduces a capacitive touch panel and a method for implementing mutual capacitance detection and self-capacitance detection.
[0056] See Figure 1 , Figure 1 The image shows a screen 10 of an electronic device provided in this application. The screen 10 may include a protective layer 11, a capacitive touch panel 12, a display module 13, a substrate 14, etc. The capacitive touch panel 12 and the display module 13 may be independently configured or integrated into one unit to form a touch screen.
[0057] See Figure 2 , Figure 2 This application illustrates a touch panel 12, a capacitive touch panel 12 comprising a touch sensor composed of an X-axis electrode layer and a Y-axis electrode layer. The X-axis electrode layer may include multiple X-axis electrode strips, each arranged in a rectangular pattern array. The Y-axis electrode layer may also include multiple Y-axis electrode strips, each arranged in a rectangular pattern array. The X-axis and Y-axis electrode layers form a crisscrossing network.
[0058] Based on the above Figure 2 The capacitive touch panel 12 shown can be used by electronic devices to detect user touch operations through self-capacitance detection or mutual capacitance detection. The mutual capacitance detection and self-capacitance detection methods will be introduced below.
[0059] 1. Mutual capacitance detection: the Y-axis electrode is used as a transmit (Tx) electrode, and the X-axis electrode is used as a receive (Rx) electrode. A mutual capacitance is formed at the intersection of the Tx electrode and the Rx electrode (i.e., a coordinate point), i.e., the capacitance formed by the Tx electrode and the adjacent Rx electrode.
[0060] The electronic device determines the touch position by scanning the mutual capacitance of each coordinate point, specifically including: the touch chip in the electronic device sequentially sends an excitation signal to each Tx electrode, and also receives the signal through all Rx electrodes at the same time, and then the touch chip converts the received voltage value into a digital signal through analog-to-digital conversion and calculates the corresponding capacitance value. When a finger touches / closes to the capacitive touch panel 12, the finger will absorb a part of the excitation signal from the Tx electrode at the touch position, resulting in a decrease in the mutual capacitance at the touch position. Therefore, the touch chip can identify the touch position of the finger by calculating the mutual capacitance change value of all coordinate points.
[0061] 2. Self-capacitance detection: the Y-axis electrode and the X-axis electrode form a capacitance with the ground, i.e., a self-capacitance.
[0062] The electronic device determines the touch position by scanning the self-capacitance of the Y-axis electrode and the self-capacitance of the X-axis electrode, specifically including: when a finger touches / closes to the capacitive touch panel 12, the capacitance between the finger and the ground will be superimposed on the self-capacitance at the contact area, so that the self-capacitance of the Y-axis electrode and the X-axis electrode at the touch area is increased. Therefore, the touch chip can identify the touch position of the finger by detecting the change of the self-capacitance of the Y-axis electrode and the X-axis electrode, and calculating the intersection (coordinate point) of the Y-axis electrode and the X-axis electrode with the change of the self-capacitance.
[0063] Based on the foregoing introduction of the structure of the capacitive touch panel 12, and the mutual capacitance detection and the self-capacitance detection, it can be known that when a finger closes / touches the capacitive touch panel 12, it will cause the capacitance in the local area of the capacitive touch panel 12 to change, so the action position (i.e., the touch position) of the touch operation can be determined by detecting the capacitance value of the area where the capacitance changes.
[0064] However, when the capacitive touch panel 12 is in an interfering environment (such as when it comes into contact with water or dust), the interfering environment will also cause changes in the mutual capacitance / self capacitance of the capacitive touch panel 12. Taking water as an example of an interfering environment, when water comes into contact with the mutual capacitive touch panel 12 and when a finger touches the mutual capacitive touch panel 12, the direction of the capacitance change of the capacitive touch panel 12 is opposite, that is, water contact increases the mutual capacitance while finger touch decreases the mutual capacitance; when water comes into contact with the self-capacitive touch panel 12 and when a finger touches the self-capacitive touch panel 12, the direction of the capacitance change is the same, that is, water contact increases the self capacitance and finger touch also increases the self capacitance. Based on the above analysis, it can be seen that the interfering environment changes the distribution and state of the capacitance of the capacitive touch panel 12 itself, thereby interfering with the recognition of the finger touch position, resulting in a decrease in the accuracy of the final determined touch position recognition or directly causing the touch function to be unusable.
[0065] To address the aforementioned technical problems, this application provides a touch control method and an electronic device. The method includes underwater touch detection and atmospheric touch detection. Underwater touch detection includes: when the electronic device is in an underwater environment, if a change in capacitance data is received during a touch operation, the device's attitude data is acquired. Based on this attitude data, a first detection model is used to obtain a coarse area on the touch panel where the touch operation occurs. Then, combining the attitude data and the capacitance data at the coarse area, a second detection model is used to obtain a fine area within the coarse area where the touch operation occurs. Atmospheric touch detection includes: when the electronic device is in an atmospheric environment, if a touch operation is received, capacitance data in the electronic device's touch panel is acquired. Based on this capacitance data, the area on the touch panel where the touch operation occurs is obtained.
[0066] The methods mentioned above for determining whether electronic equipment is in an atmospheric or underwater environment can also be found in the following text. Figures 3-4 A detailed description of it will not be repeated here.
[0067] The methods described above for obtaining coarse regions using the first detection model and fine regions using the second detection model can be found in the following sections. Figure 5 A detailed description of it will not be repeated here.
[0068] The aforementioned first and second detection models can be either two independently configured models or integrated into a single detection model, referred to as the third detection model. This third detection model can achieve the functionality of both the first and second detection models. Furthermore, for the definitions, training methods, and update methods of the first and second detection models, please refer to the following sections. Figures 6-8 A detailed description of it will not be repeated here.
[0069] Implementing the touch method provided in the present application can achieve the following effects:
[0070] (1) By improving the software level, the underwater touch failure of the capacitive touch panel is avoided.
[0071] (2) The scheme of detecting coarse areas first and then detecting fine areas is adopted, which reduces the computing pressure of the electronic device and improves the response speed of the electronic device.
[0072] (3) The present scheme can reuse the existing sensors and sensor data in the electronic device, without the need for additional hardware, thereby reducing the cost and workload of the scheme.
[0073] Next, how the electronic device provided in the present application realizes the flow of judging the touch detection will be introduced in combination with Figure 3
[0074] Referring to Figure 3 , Figure 3 An exemplary flowchart of a method for judging a touch detection mode provided in the present application is shown.
[0075] Before the electronic device performs touch detection, the detection mode needs to be judged, and the specific steps are as follows.
[0076] S101, detecting whether a touch detection mode is manually set.
[0077] The electronic device has a manually set touch detection mode and an automatically set touch detection mode, and according to the detection of the manual setting touch signal, it is judged to execute which touch detection mode.
[0078] Specifically, the manual setting touch signal can come from the user's operation in the application setting, and in the application setting, a virtual switch for whether to start manual setting can be displayed. If the electronic device receives the user's operation of clicking or touching the virtual switch, the manual setting touch detection mode flow is executed, and if the electronic device does not receive the user's corresponding starting operation within a period of time, the automatic setting touch detection mode flow is executed.
[0079] In the present embodiment, after the electronic device is in an atmospheric environment, the operation received by the electronic device for starting the underwater touch detection mode can also be referred to as a second operation, and the operation received by the electronic device for starting the atmospheric touch detection mode can also be referred to as a third operation. The above-mentioned second operation and third operation can be an operation acting on the touch screen or a voice instruction, and the present application does not limit the specific type of the operation.
[0080] In the embodiments of the present application, the operation received by the electronic device for starting the underwater touch detection mode after the electronic device is in the atmospheric environment can also be referred to as a fifth operation, and the operation received by the electronic device for starting the atmospheric touch detection mode can also be referred to as a sixth operation. The fifth operation and the sixth operation can be an operation acting on the touch screen or a voice instruction, and the specific type of the operation is not limited in the present application.
[0081] S102, acquire environment data.
[0082] After the automatic touch detection mode is executed, the electronic device acquires environment data. The environment data includes first environment data and second environment data.
[0083] Specifically, the environment data includes the capacitance data in the touch panel, and also includes the ambient light change data acquired by the camera and the ambient light sensor.
[0084] When the environment data includes the capacitance data in the touch panel, the first environment data specifically includes second capacitance data, and the second capacitance data has a feature corresponding to the capacitance touch panel in the underwater environment. The second environment data specifically includes third capacitance data, and the third capacitance data has a feature corresponding to the capacitance touch panel in the atmospheric environment.
[0085] S103, determine whether to adopt the underwater touch detection mode.
[0086] The detection mode of the electronic device includes an automatic touch detection mode and a manual touch detection mode. In different touch detection modes, different ways are used to determine whether to adopt the underwater touch detection mode.
[0087] Specifically, if the electronic device is manually set to the touch mode, the operation of the manual setting is received to determine the touch detection mode. Further, if the received manual setting operation indicates to adopt the underwater touch detection, for example, it is detected that the virtual button indicating the underwater mode in the setting interface is opened, the electronic device adopts the underwater touch detection mode; if the received manual setting operation indicates to adopt the atmospheric touch detection, for example, it is detected that the virtual button indicating the atmospheric mode in the setting interface is opened, the electronic device adopts the atmospheric touch detection mode.
[0088] Specifically, if the electronic device is automatically set to the touch detection mode, the touch detection mode adopted by the electronic device is determined based on the environment data read in S102. Further, if the environment data is the first environment data, that is, the underwater touch feature is met, the electronic device adopts the underwater touch detection mode. If the environment data is the second environment data, that is, the atmospheric touch feature is met, the electronic device adopts the atmospheric touch detection mode.
[0089] Optionally, after the electronic device adopts the automatic setting touch control detection mode and obtains the environmental data, the specific method for determining whether to adopt the underwater touch control mode can refer to the method described in the following Figure 4 .
[0090] S104-1, adopting the underwater touch control detection mode.
[0091] The electronic device determines the touch control area of the electronic device through the underwater touch control detection method. The underwater touch control detection method includes obtaining the first environmental data and the posture data of the electronic device, and obtaining the touch control area according to the first environmental data and the posture data. Specifically, the method can refer to the method described in the following Figure 5 .
[0092] S104-2, adopting the atmospheric touch control detection mode.
[0093] The electronic device determines the touch control area of the electronic device through the atmospheric touch control detection method. Specifically, the atmospheric touch control detection method includes obtaining the second environmental data, which includes the touch control area capacitance data in the capacitive touch panel and the non-touch control area capacitance data. Since there is a difference between the capacitance data of the touch control area and the capacitance data of the non-touch control area, the electronic device can detect the difference to obtain the touch control area, and respond to the operation on the touch control area.
[0094] Optionally, when the electronic device is in the atmospheric environment, the electronic device can receive an operation (also referred to as a fourth operation) on the capacitive touch panel through the capacitive touch panel. The electronic device obtains the fourth capacitance value by receiving the fourth operation, and obtains the third area by the fourth capacitance.
[0095] Specifically, for the mutual capacitive touch panel, the mutual capacitance value of the touch control area is smaller than the capacitance value of the non-touch control area, and for the self-capacitive touch panel, the self-capacitance value of the touch control area is larger than the self-capacitance value of the non-touch control area. The capacitive detection scheme of the capacitive touch panel can refer to the scheme described in the following Figure 2 , which will not be described here.
[0096] Next, the flowchart of how the electronic device provided by the present application sets the touch control detection mode based on the environmental data will be introduced in combination with Figure 4 .
[0097] Referring to Figure 4 , Figure 4 , an example of a method flowchart for automatically setting and determining the touch control detection mode based on environmental data provided by the present application is shown.
[0098] In the process of automatically setting the touch control detection mode of the electronic device, Figure 3The method for determining whether to use the underwater touch detection mode in S103 can specifically include the following steps.
[0099] S201, detecting whether the touch point is invalid based on the obtained environment data.
[0100] When the electronic device automatically sets the touch detection mode, whether the touch detection point is invalid is detected based on the obtained environment data. If it is detected that the touch detection point is invalid, it is further detected whether the number of invalid touch points reaches a threshold value. If it is detected that the touch detection point is not invalid, it indicates that the electronic device is in an atmospheric environment, and the atmospheric touch detection mode is used.
[0101] Specifically, according to different types of capacitive touch panels, the invalid state includes an increase in mutual capacitance of the detection point or a change in the self-capacitance region of the detection point exceeding the control touch area. By comparing the mutual capacitance value or the self-capacitance change region with the set first threshold value, whether the capacitance is invalid can be detected. For example, for a mutual capacitive touch panel, the first threshold value is a specified capacitance value, and the mutual capacitance value is compared with the first threshold value. When the mutual capacitance value exceeds the first threshold value, the touch point corresponding to the mutual capacitance value is invalid. For a self-capacitive touch panel, the first threshold value is a specified self-capacitance change region, and the detected change in the self-capacitance region is compared with the first threshold value. When the change in the self-capacitance region exceeds the first threshold value, the touch point corresponding to the self-capacitance is invalid.
[0102] S202, detecting whether the number of invalid touch points meets a threshold value.
[0103] After detecting that the touch detection point is invalid, the number of invalid touch points is obtained, and whether the number of invalid touch points reaches a threshold value is detected. If the number exceeds the threshold value, it indicates that the electronic device is in an underwater environment, and the underwater touch detection mode is used. If the number does not exceed the threshold value, it indicates that the electronic device is in an atmospheric environment, and the atmospheric touch detection mode is used.
[0104] Specifically, the number of invalid touch points in S201 is compared with a second threshold value. For different types of capacitive touch panels, the number of invalid touch points is compared with the second threshold value for a mutual capacitive touch panel, and the number of invalid touch points corresponding to the invalid touch region is compared with the second threshold value for a self-capacitive touch panel. The number of invalid touch points is the second threshold value, and the second threshold value is a specified number.
[0105] In the embodiments of the present application, whether the number of invalid touch points reaches a threshold value specifically includes: obtaining capacitance data through the first electrode array and / or the second electrode array. When it is detected that the number of capacitance values greater than the first threshold value in the capacitance data is greater than the second threshold value, it indicates that the number of invalid touch points reaches the threshold value. Otherwise, it indicates that the number of invalid touch points does not reach the threshold value.
[0106] The first threshold is a set capacitance value for determining whether the detected capacitance value is an underwater capacitance value. The detected capacitance value includes a second capacitance and a third capacitance. If the detected capacitance value is the second capacitance, it indicates that the electronic device is in an underwater environment. If the detected capacitance value is the third capacitance, it indicates that the electronic device is in an atmospheric environment.
[0107] S203-1, adopt an underwater touch detection mode.
[0108] After the electronic device is in an underwater environment, an underwater touch detection mode is adopted. The underwater touch detection method includes obtaining first environment data and posture data of the electronic device, and obtaining a touch area according to the first environment data and the posture data. Specifically, the underwater touch detection method can refer to the method described in Figure 5 .
[0109] S203-2, adopt an atmospheric touch detection mode.
[0110] The electronic device determines the touch area of the electronic device by an atmospheric touch detection method. Specifically, the atmospheric touch detection method includes obtaining second environment data, which includes touch area capacitance data in the capacitive touch panel and non-touch area capacitance data. Since there is a difference between the capacitance data of the touch area and the capacitance data of the non-touch area, the electronic device can detect the difference to obtain the touch area, and respond to the operation on the touch area.
[0111] Specifically, for a mutual capacitance touch panel, the mutual capacitance value of the touch area is smaller than the capacitance value of the non-touch area. For a self-capacitance touch panel, the self-capacitance value of the touch area is larger than the self-capacitance value of the non-touch area. The capacitive detection scheme of the capacitive touch panel can refer to the scheme described in Figure 2 , which will not be described here.
[0112] After the method flow shown in Figure 4 is executed, if the electronic device determines to adopt the atmospheric touch detection mode, the electronic device executes the self-capacitance detection method or the mutual-capacitance detection method as described in the foregoing Figure 2 , which will not be described here.
[0113] After the method flow shown in Figure 4 is executed, if the electronic device determines to adopt the underwater touch detection mode, the method of underwater touch detection shown in Figure 5 is executed.
[0114] Referring to Figure 5 , Figure 5An example shows a method flow diagram for detecting a touch position based on an artificial intelligence (AI) deep learning model. The method includes the following steps:
[0115] In S301, attitude data of the electronic device is acquired, including data of a gyroscope, an accelerometer, a pressure sensor, and the like.
[0116] In an implementable manner, after the electronic device determines to use the underwater touch detection mode, the electronic device acquires attitude data through the attitude sensor.
[0117] In another implementable manner, after the electronic device determines to use the underwater touch detection mode and also receives a first operation acting on the touch panel, the electronic device acquires attitude data through the attitude sensor. Specifically, the electronic device receives the first operation acting on the touch panel, which can be achieved by detecting that the capacitance value of the touch panel changes, but the touch position of the first operation cannot be accurately obtained according to the change. That is, the electronic device receives the first operation acting on the touch panel only represents that there is a user's finger touching the touch panel at this time, but the electronic device does not determine the touch position of the first operation in the touch panel.
[0118] In this embodiment, regarding the touch operation, it includes a first operation on the touch panel, which includes directly touching the capacitive touch panel or an operation close to the capacitive touch panel, that is, an operation of indirectly touching the capacitive touch panel through the glass cover plate. The touch operation changes the capacitance value of the capacitive touch panel, but the electronic device does not determine the acting area, only representing that the touch position is obtained without the touch operation.
[0119] In the embodiments of the present application, the attitude sensor includes sensors for detecting attitude parameters of the electronic device, such as a gyroscope sensor, an acceleration sensor, and a pressure sensor. The data detected by the above-mentioned attitude sensor can be used to detect the approximate position of the user's touch operation, that is, the coarse area, and the data detected by the attitude sensor is not disturbed by the underwater environment. Specifically, when the user's finger touches different positions of the touch panel in the electronic device, the electronic device will receive a certain acting force, which causes the gyroscope sensor to detect a corresponding angular velocity change value, the acceleration sensor to detect a corresponding acceleration change value, and the pressure sensor to detect a corresponding pressure change value. By comprehensively analyzing the above-mentioned multiple change values, the coarse area of the user's finger touching in the touch panel can be determined.
[0120] Optionally, the attitude class data is not limited to the above-mentioned angular velocity, acceleration and pressure values, other data capable of reflecting the motion attitude of the electronic device can also belong to the attitude data and participate in the calculation, and the present application does not make any limitation in this regard.
[0121] In the embodiments of the present application, the pressure sensor is a sensor that is not disturbed by the underwater environment, for example, a resistance type pressure sensor, or can also be a capacitance type pressure sensor.
[0122] S302, determining a first touch position based on the attitude data.
[0123] Specifically, the obtained attitude data is input into a first detection model to obtain a first touch position (also referred to as a first region).
[0124] The above-mentioned first region is a coarse region on which the first operation acts on the touch panel, which can be specifically any one of the regions 1 to 9 as shown in the figure. Figure 6
[0125] Among them, Figure 6 Regions 1-9 shown in the figure are a plurality of regions constituting a capacitive touch panel, which can include uniformly dividing the capacitive touch panel into 9 sub-regions in the form of a nine-square grid, and sequentially naming them as regions 1 to 9 from left to right and from top to bottom, and the present application does not make any limitation in this regard.
[0126] In an implementable manner, the above-mentioned first detection model is an AI deep learning model as shown in the figure, which includes standard region features corresponding to a plurality of regions (regions 1-9) constituting the touch panel, and the first detection model can extract a predicted region feature from the input attitude data, match the predicted region feature with the standard region features corresponding to the above-mentioned plurality of regions, and then determine the first region on which the first operation acts. Figure 6
[0127] Among them, the process of determining the first region by using the attitude data can refer to the process described in the figure, for example, Figure 6 Figure 6 which shows a process of positioning the region 6 as the first region as a coarse region.
[0128] S303, determining a second touch position based on the capacitance value of the first touch position and the attitude data.
[0129] Based on the first touch position obtained in S302, the capacitance value in the first touch position is obtained, and the capacitance value and the aforementioned attitude data are matched through a second detection model to obtain a second touch position (also referred to as a second region).
[0130] The second region is a fine region on the touch panel on which the first operation acts, and can be any one of regions A-I as shown in the following table. Figure 7
[0131] In the above table, Figure 7 Regions A-I are a plurality of regions that constitute the first region, which can include dividing the capacitive touch panel into nine sub-regions in a nine-square form, and naming them in order from left to right and from top to bottom as regions A to I. The present embodiment is not limited thereto.
[0132] Specifically, the electronic device obtains the capacitance value of the capacitive touch panel, and outputs a second region detection result by taking the capacitance value corresponding to the first region and the aforementioned attitude data as input through a second detection model. The second detection model includes the aforementioned AI deep learning model, which is a convolutional neural network model. The specific name of the AI deep learning model is not limited. The structure and function of the convolutional neural network model have been described in detail in the description of the AI deep learning model in the following Figures 6-8 , which will not be repeated here.
[0133] In an implementable manner, the process of determining the second region based on the attitude data and the capacitance value of the first region can refer to the process shown in Figure 7 . Specifically, after the first region detection process shown in Figure 6 , region F in region 6 in the first region is taken as the second region, and the process of fine region positioning is performed.
[0134] Based on the above description of the method of detecting the touch position using the AI deep learning model shown in Figure 5 , it can be known that the underwater touch detection provided by the present application is divided into two stages of coarse detection and fine detection. The coarse detection stage is used to determine the first region, which is a sub-region of the capacitive touch panel, which reduces the range of subsequent detection, improves the detection accuracy, and shortens the subsequent detection time. The fine detection stage is used to determine the second region in the first region, which is a sub-region of the first region, and is a fine region of the touch operation. The fine region is a region that can accurately identify the touch region of the touch operation on the touch panel. The fine detection stage is used to determine the specific touch region of the touch operation on the touch panel, so as to realize the correct response of the electronic device to the touch operation, i.e., to realize the complete touch operation.
[0135] For the coarse detection stage, only the attitude data obtained in the S301 step is used as input, so that the first touch position meeting the requirements can be obtained without additional auxiliary data, which reduces the input parameters of the model, and reduces the calculation amount and calculation time.
[0136] For the fine detection stage, considering that the second region has a small range, it is difficult to obtain the second region using only the attitude data obtained in step S301, or the time for calculating the second region is too long to be acceptable. Considering the interference error of the underwater environment, using only the capacitance value in the first region for detection will also be affected by the environment interference, making it difficult to obtain the second region. Based on the use of attitude data, combined with the detection of the first region capacitance value, the second region can be obtained relatively quickly, which is equivalent to correcting the error of using capacitance value detection based on attitude data.
[0137] Considering the coarse detection stage and the fine detection stage, the following beneficial effects can be obtained:
[0138] (1) The calculation data of the touch position can be reduced, and the convergence of the calculation result can be accelerated.
[0139] (2) The interference area of the underwater environment on the capacitive touch panel is reduced, thereby reducing the environmental noise interference of the obtained capacitance value and reducing the detection difficulty.
[0140] Next, the structure diagram of the AI deep learning model-based detection of the touch position provided by the present application will be introduced. Figures 6-7
[0141] Referring to Figure 6 , Figure 6 An exemplary structure diagram of an AI deep learning model-based detection of a coarse region is shown.
[0142] As Figure 6 shown, the AI deep learning model can be referred to as a first detection model or a third detection model. The AI deep learning model can receive the input data of the pressure value X p , the angular velocity value X g , the accelerometer value X a , etc. described above, to obtain a corresponding first region, which is one of the regions 1-9 in the figure. Specifically, the input data is the data collected when receiving the first operation, and the first region is a coarse region in the touch panel that is affected by the first operation. The detection step can refer to steps S301 and S302 in Figure 5 .
[0143] The division rule of each region preset in the model includes:
[0144] The first region is a plurality of regions that make up the capacitive touch panel, which can include uniformly dividing the capacitive touch panel into 9 sub-regions in the form of a nine-square grid, each sub-region being a first region, and being sequentially named as region 1, region 2, region 3 to region 9 from left to right and from top to bottom. The first region is a touch region, and the first region is also referred to as a coarse region.
[0145] Optionally, the division rule is not limited to Figure 6 As shown, it can also be a non-uniformly divided area, the number of divided areas can be more than 9 or less than 9, and the divided sub-areas can partially overlap, which is not limited in the present application.
[0146] Optionally, the input data used for the first detection model or the third detection model is not limited to the aforementioned pressure value, angular velocity value and accelerometer value data, and can also include other data representing the posture of the electronic device, which is not limited in the present application.
[0147] Among them, the first detection model and the third detection model are preset with area identifiers and corresponding standard area features. The area identifier can be an identifier such as area coordinates, size, number, etc. that can identify a certain area, and the standard area feature is a feature value corresponding to a certain area identifier, which can be used to obtain a corresponding unique area.
[0148] For the preset first detection model or third detection model, the input posture data can be extracted to obtain the corresponding predicted area feature. When the model is trained, the predicted area feature is compared with the standard area feature, and the model is updated according to the difference. Taking the first detection model as an example, the specific steps are as follows:
[0149] (1) Set an initial detection model, input the first posture data of the training operation to the initial detection model, compare the difference between the touch position output by the initial detection model and the first area obtained by the training operation, and update the initial detection model. Specifically, the initial detection model obtains the first predicted area feature corresponding to the first posture data, compares the first difference between the first predicted area feature and the standard area feature, and if the first difference exceeds the third threshold, the initial detection model is updated. Wherein, updating the initial detection model includes: using the old model as the base model, updating the model with new standard area features, or not changing the old model, fusing the prediction results of the old model and the prediction results of the new model.
[0150] (2) Use the updated initial detection model for touch detection, and if the coarse area output by the updated initial detection model is the same as the first area of the touch operation, the model can be considered as the first detection model. Specifically, the second predicted area feature corresponding to the second posture data is obtained, the second difference between the second predicted area feature and the standard area feature is compared, and if the second difference is less than the third threshold, the updated initial detection model is used as the first detection model.
[0151] The training steps of the third detection model are the same as those of the first detection model, which will not be repeated here.
[0152] The third threshold value includes a threshold value set as needed during training of the first detection model, and the standard region feature is a feature set as needed during training of the first detection model. The first gesture data is used to provide training data to the initial detection model, and the second gesture data is used to verify whether the touch detection of the initial detection model reaches the first detection model standard. The specific description of the first region can refer to the description of the first region in step S302 in the foregoing method, which is not repeated here. Figure 5 The specific description of the first region can refer to the description of the first region in step S302 in the foregoing method, which is not repeated here.
[0153] The first detection model and the third detection model can be preinstalled in the electronic device after training, and the preinstalled model can be updated according to the use environment, or directly retrained and updated in the electronic device. The present application does not limit this.
[0154] Specifically, for the trained first detection model and the third detection model, the update includes changing the standard region feature and retraining, and the update also includes correcting the region recognition feature and reestablishing the connection between the corrected region recognition feature and the standard region feature. The present application does not limit this.
[0155] Optionally, the training of the first detection model includes training by the manufacturer who sets the first detection model or training by the user who uses the first detection model.
[0156] Optionally, for the trained first detection model, the user can update the training by using the touch data in the user's use process as the input parameter of the training, so that the updated first detection model adapts to the actual environment of the user. The present application does not limit this.
[0157] The specific description of the structure and function of the convolutional neural model can also refer to the description of the structure and function of the model. Figure 8
[0158] Referring to Figure 7 , Figure 7 An exemplary structure diagram of detecting a fine region based on an AI deep learning model is shown.
[0159] As shown in Figure 7 , the AI deep learning model can be referred to as a second detection model or a third detection model. The AI deep learning model can receive the first region capacitance value X c , the pressure value X p , the angular velocity value X g , and the accelerometer value X a The input data is received to obtain a corresponding second region, which is one of regions A-I. Specifically, the input data is data collected when a first operation is received, and the second region is a fine region of the touch panel on which the first operation is performed. The detection step can refer to S303 in Figure 5 .
[0160] The preset division rule for each region in the model includes:
[0161] The second region is a plurality of regions that make up the capacitive touch panel, which can include dividing the capacitive touch panel into 9 sub-regions in a nine-square form, each sub-region being a second region, and being sequentially named as regions A, B, C, and I from left to right and from top to bottom. The second region is a touch region, and the second region is also referred to as a fine touch position.
[0162] Optionally, the division rule is not limited to Figure 7 , but can also be a non-uniform division of regions, the number of divided regions can be more than 9 or less than 9, and the sub-regions can partially overlap, which is not limited in the present application.
[0163] Optionally, the input data used for the second detection model or the third detection model is not limited to the aforementioned pressure value, angular velocity value, and accelerometer value data, but can also include other data representing the posture of the electronic device, which is not limited in the present application.
[0164] Among them, the second detection model and the third detection model are preset with region identifiers and corresponding standard region features. The region identifier can be a region coordinate, size, number, or any identifier that can identify a region, and the standard region feature is a feature value corresponding to a certain region identifier, which can be used to obtain a unique region.
[0165] For the preset second detection model or third detection model, the input posture data can be extracted to obtain a corresponding predicted region feature. When the model is trained, the predicted region feature is compared with the standard region feature, and the model is updated according to the difference. Taking the second detection model as an example, the specific steps are as follows:
[0166] (1) setting an initial detection model, inputting third gesture data of a training operation and a capacitance value of a first region to the initial detection model, comparing a touch position output by the initial detection model with a second region obtained by the training operation, and updating the initial detection model. Specifically, the initial detection model obtains the third gesture data and the capacitance value of the first region, combines corresponding third predicted region features, compares a third difference between the third predicted region features and standard region features of the second region, and updates the initial detection model if the third difference exceeds a fourth threshold. The updating of the initial detection model includes: using an old model as a base model, updating the model with new standard region features, or not changing the old model, and fusing the prediction results of the old model and the prediction results of the new model.
[0167] (2) using the updated initial detection model for touch detection, and if a fine region output by the updated initial detection model is the same as the second region of the touch operation, regarding the model as a second detection model. Specifically, fourth gesture data and a capacitance value of the first region are obtained, combined with corresponding fourth predicted region features, a fourth difference between the fourth predicted region features and the standard region features of the second region is compared, and if the fourth difference is less than the fourth threshold, the updated initial detection model is regarded as the second detection model.
[0168] The training steps of the third detection model are the same as those of the second detection model, which will not be described here.
[0169] The fourth threshold includes a threshold set as needed when training the second detection model, the second region standard features are features set as needed when training the second detection model, the third gesture data is used to provide training data to the initial detection model, the fourth gesture data is used to verify whether the touch detection of the initial detection model reaches the standard of the second detection model, and the specific description of the second region can refer to the description of the second region in S303 of the above Figure 5 , which will not be described here.
[0170] The second detection model and the third detection model described above can be pre-installed in an electronic device after training is completed, and the pre-installed model can also be updated according to the use environment, or directly retrained and updated in the electronic device, which is not limited in the present application.
[0171] Specifically, for the second detection model and the third detection model completed by the above training, the updating includes changing the standard region features and retraining, and the updating also includes correcting the region recognition features and re-establishing the connection between the corrected region recognition features and the standard region features, which is not limited in the present application.
[0172] Optionally, for the training of the first detection model, the training is performed by the manufacturer who sets the second detection model, or by the user who uses the second detection model.
[0173] Optionally, for the second detection model that has completed the training, the user can update the training according to the environment in which the electronic device is used, using the touch data in the user's use process as the input parameter for the training, so that the updated second detection model adapts to the actual environment in which the user is located, and the present application does not limit this.
[0174] The specific description of the structure and function of the convolutional neural model can also be referred to Figure 8 For the description of the model structure and function.
[0175] Next, the first detection model, the second detection model and the third detection model involved in the foregoing will be introduced in combination with Figure 8 .
[0176] Referring to Figure 8 , Figure 8 An exemplary structure diagram of an AI deep learning model is shown.
[0177] The AI deep learning model is the first detection model, the second detection model and the third detection model, which includes a convolution module, a full connection module and an output module.
[0178] (1) The convolution module can include one or more modules, such as Figure 8 convolution module 1-convolution module 4 shown in the figure. For each convolution module, multiple layers of results can be included, such as a convolution calculation layer, a batch sample normalization (Batch Normalization, BN) module, a nonlinear layer and a pooling layer, etc.
[0179] Specifically, the convolution calculation layer is used to extract different features of the input and extract complex features through iteration, and for the first detection model and the third detection model, the convolution calculation can obtain the gesture features of the input gesture data, and for the second detection model and the third detection model, the convolution calculation can obtain the touch features of the input gesture data and the first region of the capacitance data.
[0180] The BN module is used to amplify the data difference and improve the network calculation speed, and for the first detection model, the second detection model and the third detection model, the operation time of the neural network in the model can be shortened.
[0181] The nonlinear layer is used to perform nonlinear mapping on the output results of the convolution calculation layer, and for the first detection model, the second detection model and the third detection model, feature extraction can be performed on the convolution calculation results.
[0182] The pooling layer is used to compress the data and parameters obtained after the pooling layer to reduce overfitting and improve the generalization of the obtained features. For the first detection model and the third detection model, the anti-interference of detecting the first region can be improved. For the second detection model and the third detection model, the anti-interference of detecting the second region can be improved.
[0183] (2) The full connection module is used to convert the multi-dimensional prediction region feature into a one-dimensional prediction region feature, and provides the prediction region feature for the contrast detection of the touch region.
[0184] (3) The output module includes a mapping relationship between the region identifier and the standard region feature, and is used to output the result closest to the comparison between the prediction region feature and the standard region feature. The region identifier includes, but is not limited to, the region name, the region position, the region area, and the like, which are used to identify the unique region feature. For the first detection model and the third detection model, the first prediction region feature is compared with the standard region feature, and the closest result is output. For the second detection model and the third detection model, the second prediction region feature is compared with the second region standard region feature, and the closest result is output.
[0185] Optionally, the first detection model, the second detection model and the third detection model all include the convolutional neural network composed of the convolution module, the full connection module and the output module. Meanwhile, the convolutional neural network constituting the first detection model and the second detection model can include one or more modules in the convolutional neural network model structure, which is not limited in the present application.
[0186] Optionally, the first detection model and the second detection model include two models respectively, or belong to one third model. The third detection model includes the structure of the convolutional neural network model, and has the functions of determining the coarse region based on the posture data, and determining the second region based on the posture data and the capacitance data of the coarse region. That is, the third detection model can realize the same input and output result as the first detection model, or can realize the same input and output result as the second detection model. The convolutional neural network constituting the third detection model can include one or more layers in the convolutional neural network model structure, and the combination of the first detection model, the second detection model and the third detection model is not limited in the present application.
[0187] The electronic device can be a device mounted with a touch screen or other operating systems, such as a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device, and / or the like.
[0188] Figure 9 An exemplary schematic diagram of a hardware architecture of an electronic device is shown.
[0189] The electronic device 700 can include a processor 710, an external memory interface 720, an internal memory 721, a universal serial bus (USB) interface 730, a charging management module 740, a power management module 741, a battery 742, an antenna 1, an antenna 2, a mobile communication module 750, a wireless communication module 760, a sensor module 780, a key 790, a camera 793, a display screen 794, and / or the like. The sensor module 780 can include a pressure sensor 780A, a gyroscope sensor 780B, an acceleration sensor 780C, a touch sensor 780D, an ambient light sensor 780L, and / or the like.
[0190] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 700. In other embodiments of the present application, the electronic device 700 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0191] The processor 710 can include one or more processing units, for example: the processor 710 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.
[0192] The controller can be the nerve center and command center of the electronic device 700. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of instruction fetching and instruction execution.
[0193] The memory can also be provided in the processor 710, for storing instructions and data. In some embodiments, the memory in the processor 710 is a cache memory. The memory can save instructions or data that have just been used or are frequently used by the processor 710. If the processor 710 needs to use the instructions or data again, it can directly call from the memory. This avoids repeated access and reduces the waiting time of the processor 710, thereby improving the efficiency of the system.
[0194] In the embodiments of the present application, the processor 710 calls the corresponding software and hardware modules to execute the method flow as described in Figures 3-5 The specific description of the method can refer to the foregoing description of the method, and will not be described here in detail. Figures 3-5
[0195] In some embodiments, the processor 710 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, among others.
[0196] In some embodiments, the processor 710 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, among others.
[0197] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 710 can contain multiple sets of I2C bus. The processor 710 can be coupled to the touch sensor 780D, the charger, the flash, the camera 793, etc. through different I2C bus interfaces respectively. For example, the processor 710 can be coupled to the touch sensor 780D through an I2C interface, so that the processor 710 and the touch sensor 780D communicate through the I2C bus interface, and the touch function of the electronic device 700 is realized.
[0198] The I2S interface can be used for audio communication. In some embodiments, the processor 710 can contain multiple sets of I2S bus. The processor 710 can be coupled to the audio module through the I2S bus, and communication between the processor 710 and the audio module is realized. In some embodiments, the audio module can deliver audio signals to the wireless communication module 760 through the I2S interface, and the function of answering a phone through a Bluetooth earphone is realized.
[0199] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module and the wireless communication module 760 can be coupled through the PCM bus interface. In some embodiments, the audio module can also deliver audio signals to the wireless communication module 760 through the PCM interface, and the function of answering a phone through a Bluetooth earphone is realized. Both the I2S interface and the PCM interface can be used for audio communication.
[0200] The UART interface is a universal serial data bus, which is used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is usually used to connect the processor 710 and the wireless communication module 760. For example, the processor 710 communicates with the Bluetooth module in the wireless communication module 760 through the UART interface, and the Bluetooth function is realized. In some embodiments, the audio module can deliver audio signals to the wireless communication module 760 through the UART interface, and the function of playing music through a Bluetooth earphone is realized.
[0201] The MIPI interface can be used to connect the processor 710 and the display screen 794, the camera 793, and other peripheral devices. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), and the like. In some embodiments, the processor 710 and the camera 793 communicate through the CSI interface to implement the photographing function of the electronic device 700. The processor 710 and the display screen 794 communicate through the DSI interface to implement the display function of the electronic device 700.
[0202] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 710 and the camera 793, the display screen 794, the wireless communication module 760, the audio module, the sensor module 780, and the like. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
[0203] The USB interface 730 is an interface that conforms to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 730 can be used to connect a charger to charge the electronic device 700, or to transmit data between the electronic device 700 and a peripheral device. The interface can also be used to connect a headset to play audio through the headset. The interface can also be used to connect other electronic devices, such as an AR device, and the like.
[0204] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 700. In some other embodiments of the present application, the electronic device 700 can also use different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0205] The charging management module 740 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 740 can receive charging input from a wired charger through the USB interface 730. In some wireless charging embodiments, the charging management module 740 can receive wireless charging input through a wireless charging coil of the electronic device 700. The charging management module 740 can charge the battery 742 while also providing power to the electronic device through the power management module 741.
[0206] The power management module 741 is configured to connect the battery 742 and the charging management module 740 to the processor 710. The power management module 741 receives input from the battery 742 and / or the charging management module 740 to power the processor 710, the internal memory 721, the external memory, the display screen 794, the camera 793, the wireless communication module 760, and the like. The power management module 741 can also be configured to monitor parameters such as the battery capacity, the number of battery cycles, the state of health of the battery (leakage, impedance), and the like. In some embodiments, the power management module 741 can also be disposed in the processor 710. In some embodiments, the power management module 741 and the charging management module 740 can also be disposed in the same device.
[0207] The wireless communication function of the electronic device 700 can be implemented by the antenna 1, the antenna 2, the mobile communication module 750, the wireless communication module 760, the modem processor, and the baseband processor, and the like.
[0208] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 700 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some embodiments, the antennas can be used in combination with a tuning switch.
[0209] The mobile communication module 750 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, and the like, applied to the electronic device 700. The mobile communication module 750 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 750 can receive electromagnetic waves from the antenna 1, and perform filtering, amplification, and the like on the received electromagnetic waves, and transfer the processed signals to the modem processor for demodulation. The mobile communication module 750 can also amplify signals modulated by the modem processor, and radiate the amplified signals as electromagnetic waves through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 750 can be disposed in the processor 710. In some embodiments, at least part of the functional modules of the mobile communication module 750 and at least part of the modules of the processor 710 can be disposed in the same device.
[0210] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs an audio signal through an audio device, or displays an image or video on the display screen 794. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 710, and can be disposed in the same device as the mobile communication module 750 or other functional modules.
[0211] The wireless communication module 760 can provide a wireless communication solution applied to the electronic device 700, including wireless local area networks (WLAN) (such as a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, and the like. The wireless communication module 760 can be one or more devices that integrate at least one communication processing module. The wireless communication module 760 receives electromagnetic waves via an antenna 2, demodulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 710. The wireless communication module 760 can also receive a signal to be transmitted from the processor 710, frequency-modulate it, amplify it, and radiate it as an electromagnetic wave via the antenna 2.
[0212] In some embodiments, antenna 1 and mobile communication module 750 of electronic device 700 are coupled, and antenna 2 and wireless communication module 760 are coupled, so that electronic device 700 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidu navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).
[0213] Electronic device 700 implements a display function through a GPU, display screen 794, and an application processor, etc. The GPU is a microprocessor for image processing, connected to display screen 794 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 710 can include one or more GPUs that execute program instructions to generate or change display information.
[0214] The display screen 794 is configured to display images, videos, and the like. The display screen 794 includes a display panel. The display panel can be a liquid crystal display (LCD). The display screen panel can also be manufactured using an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a miniled, a microLed, a micro-oled, a quantum dot light emitting diodes (QLED), and the like. In some embodiments, the electronic device 700 can include 1 or N display screens 794, where N is a positive integer greater than 1.
[0215] Optionally, the display screen 794 is also configured to display an interface for manual touch control setting, which has one or more controllable controls, such as controls for starting an underwater touch control detection mode and an atmospheric touch control detection mode.
[0216] The electronic device 700 can implement a photographing function through an ISP, the camera 793, a video codec, a GPU, the display screen 794, and an application processor.
[0217] The ISP is configured to process data fed back by the camera 793. For example, when taking a photo, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also optimize the noise and brightness of the image through an algorithm. The ISP can also optimize the exposure and color temperature of the shooting scene. In some embodiments, the ISP can be arranged in the camera 793.
[0218] The camera 793 is used to capture still images or videos. An object projects an optical image through a lens to a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into a standard image signal in a format such as RGB, YUV, etc. In some embodiments, the electronic device 700 can include one or N cameras 793, where N is a positive integer greater than 1.
[0219] In some embodiments, the method of obtaining environmental data includes using the camera 793 to obtain surrounding environment image data, which is used as the detected environmental data. The method of detecting environmental data can refer to the method shown in FIG. 8. Figures 3-4
[0220] The digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 700 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
[0221] The video codec is used to compress or decompress digital videos. The electronic device 700 can support one or more video codecs. In this way, the electronic device 700 can play or record videos in multiple encoding formats, such as moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0222] The NPU is a neural-network (NN) computing processor, which is inspired by the structure of biological neural networks, such as the transmission mode between human brain neurons, and can quickly process input information and continuously self-learn. Through the NPU, the electronic device 700 can implement intelligent cognitive applications, such as image recognition, face recognition, speech recognition, text understanding, etc.
[0223] The internal memory 721 can include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs).
[0224] The random access memory can include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, such as the fifth generation of DDR SDRAM commonly referred to as DDR5 SDRAM), and the like.
[0225] The non-volatile memory can include a magnetic disk storage device, flash memory.
[0226] The flash memory can include NOR FLASH, NAND FLASH, 3D NAND FLASH, and the like according to the operating principle, single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), and the like according to the storage unit potential order, and universal flash storage (UFS), embedded multi media card (eMMC), and the like according to the storage specification.
[0227] The random access memory can be directly read and written by the processor 710, and can be used to store executable programs (such as machine instructions) of an operating system or other programs running, and can also be used to store data of users and application programs, and the like.
[0228] The non-volatile memory can also store executable programs and store data of users and application programs, and the like, which can be loaded in advance into the random access memory for direct reading and writing by the processor 710.
[0229] The external memory interface 720 can be used to connect an external non-volatile memory to realize the expansion of the storage capacity of the electronic device 700. The external non-volatile memory communicates with the processor 710 through the external memory interface 720 to realize the data storage function. For example, files such as music and video are saved in the external non-volatile memory.
[0230] The external storage can store the foregoing Figures 6-8 The AI deep learning model is configured to support the processor 710 to implement the foregoing Figures 5-7 The method.
[0231] The electronic device can implement audio functions through an audio module, a speaker, a receiver, a microphone, a headset interface, and an application processor, etc. For example, music playing, recording, etc.
[0232] The audio module is configured to convert digital audio information into an analog audio signal output, and is also configured to convert an analog audio input into a digital audio signal. The audio module can also be configured to encode and decode audio signals. In some embodiments, the audio module can be disposed in the processor 710, or part of the functions of the audio module can be disposed in the processor 710.
[0233] The speaker, also known as a "loudspeaker", is configured to convert an audio electrical signal into an acoustic signal. The electronic device can listen to music or listen to a hands-free call through the speaker.
[0234] The receiver, also known as a "earpiece", is configured to convert an audio electrical signal into an acoustic signal. When the electronic device is on a call or receiving a voice message, the receiver can be placed close to the ear of a person to listen to the voice.
[0235] The microphone, also known as a "microphone", "sound transducer", is configured to convert an acoustic signal into an electrical signal. When making a call or sending a voice message, the user can speak into the microphone close to the mouth to input the acoustic signal into the microphone. The electronic device can be provided with at least one microphone. In other embodiments, the electronic device can be provided with two microphones, in addition to collecting acoustic signals, it can also implement noise reduction functions. In other embodiments, the electronic device can also be provided with three, four or more microphones, in addition to collecting acoustic signals and noise reduction, it can also identify the source of the sound, implement directional recording functions, etc.
[0236] The headset interface is configured to connect a wired headset. The headset interface can be a USB interface, or a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellr teleommunitions inustry association of the US (TI) standard interface.
[0237] The pressure sensor 780A is used to sense a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 780A can be disposed on the display screen 794. There are many types of pressure sensors 780A, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. A capacitive pressure sensor can include at least two parallel plates of conductive material. When a force is applied to the pressure sensor 780A, the capacitance between the electrodes changes. The electronic device 700 determines the intensity of the pressure according to the change in capacitance. When a touch operation is applied to the display screen 794, the electronic device 700 detects the intensity of the touch operation according to the pressure sensor 780A. The electronic device 700 can also calculate the position of the touch according to the detection signal of the pressure sensor 780A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.
[0238] The pressure sensor can collect pressure values as input data for the first detection model, the second detection model, and the third detection model described above. For methods of collecting the pressure values, refer to step S301 in Figure 5 .
[0239] The gyroscope sensor 780B can be used to determine the motion posture of the electronic device 700. In some embodiments, the angular velocity of the electronic device 700 around three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 780B. The gyroscope sensor 780B can be used for anti-shake photography. For example, when the shutter is pressed, the gyroscope sensor 780B detects the angle of the shaking of the electronic device 700, calculates the distance that the lens module needs to compensate according to the angle, and lets the lens offset the shaking of the electronic device 700 by moving in the opposite direction, thereby achieving anti-shake. The gyroscope sensor 780B can also be used for navigation and motion sensing game scenarios.
[0240] The gyroscope sensor can collect angular velocity values as input data for the first detection model, the second detection model, and the third detection model described above. For methods of collecting the angular velocity values, refer to step S301 in Figure 5 .
[0241] The acceleration sensor 780C can detect the acceleration of the electronic device 700 in various directions (generally three axes). When the electronic device 700 is stationary, the acceleration sensor 780C can detect the magnitude and direction of gravity. The acceleration sensor 780C can also be used to identify the posture of the electronic device, and can be applied to landscape / portrait switching, pedometers, etc.
[0242] The acceleration sensor can collect acceleration values as input data for the first detection model, the second detection model, and the third detection model. For methods of collecting the acceleration values, refer to Figure 5 the S301 step in the method 3000.
[0243] The touch sensor 780D, also referred to as a "touch panel". The touch sensor 780D can be disposed on the display screen 794, and the touch sensor 780D and the display screen 794 together form a touch screen, also referred to as a "touch screen". The touch sensor 780D is configured to detect a touch operation applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation can be provided through the display screen 794. In other embodiments, the touch sensor 780D can also be disposed on the surface of the electronic device 700, which is different from the position where the display screen 794 is located.
[0244] The arrangement structure of the touch sensor 780D is described above with reference to the structure of the touch panel shown in Figure 2 .
[0245] The touch panel can be used to receive a user's touch operation, such as a first operation, in an underwater environment or an atmospheric environment. For a detailed description of the first operation, refer to the description of Figure 5 .
[0246] The ambient light sensor 780L is configured to sense ambient light brightness. The electronic device 700 can adaptively adjust the brightness of the display screen 794 according to the sensed ambient light brightness. The ambient light sensor 780L can also be used to automatically adjust the white balance when taking a photo.
[0247] The keys 790 include a power-on key, a volume key, and the like. The keys 790 can be mechanical keys. They can also be touch keys. The electronic device 700 can receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 700.
[0248] Figure 10 An exemplary software architecture diagram of an electronic device is shown.
[0249] The layered architecture divides the software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and the system library, and the kernel layer.
[0250] As Figure 10 shown, the application layer can include settings.
[0251] The setting application includes a system setting application. The system setting application includes a control for receiving a user operation and prompting a touch detection mode state.
[0252] The application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer. The application framework layer includes some pre-defined functions.
[0253] As shown in Figure 10 , the application framework layer can include a touch detection service module, a window manager, a content provider, a view system, etc., or can also include Figure 10 a phone manager, a resource manager, a notification manager, etc., which are not shown.
[0254] The touch detection service module is used to provide touch detection services, including calling the driver in the kernel layer to detect environmental data and attitude data to realize the underwater touch operation recognition function. For example, calling the gyroscope sensor driver to obtain the angular velocity value, calling the acceleration sensor driver to obtain the acceleration value, and detecting the first area based on the angular velocity value and the acceleration value. Calling the touch sensing driver to obtain the capacitance value of the first area, detecting the second area based on the capacitance value, the aforementioned angular velocity and acceleration, and realizing the recognition of the touch operation. For specific introduction of detecting the first area and the second area, please refer to the introduction of steps S302 and S303 in the foregoing. Figure 5
[0255] The window manager is used to manage the window program. The window manager can obtain the size of the display screen, judge whether there is a status bar, lock the screen, and intercept the screen, etc.
[0256] The content provider is used to store and obtain data, and make the data accessible to the application program. The data can include video, image, audio, dialed and received phone, browsing history and bookmark, phone book, etc.
[0257] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build an application program. The display interface can be composed of one or more views. For example, the display interface including the short message notification icon can include a view for displaying text and a view for displaying pictures.
[0258] The phone manager is used to provide the communication function of the electronic device 700. For example, the management of the call state (including connection, hang-up, etc.).
[0259] The resource manager provides various resources for the application program, such as localized strings, icons, pictures, layout files, video files, etc.
[0260] The notification manager enables applications to display notification information in the status bar, which can be used to communicate alert-type messages that can automatically disappear after a brief stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the form of a figure or a scroll bar text in the top status bar of the system, such as a notification of an application running in the background, and can also be a notification that appears in the form of a dialog window on the screen. For example, the status bar prompts text information, emits a prompt sound, the electronic device vibrates, the indicator light flashes, etc.
[0261] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.
[0262] The core library includes two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
[0263] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java file of the application layer and the application framework layer into a binary file. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection, etc.
[0264] The system library can include multiple functional modules. For example: a surface manager, media libraries, a three-dimensional graphics processing library (for example: OpenGL ES), a two-dimensional (2D) graphics engine (for example: SGL), etc.
[0265] The surface manager is used to manage the display subsystem and provides 2D and 3D layer fusion for multiple applications.
[0266] The media library supports multiple commonly used audio, video format playback and recording, and static image files, etc. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0267] The three-dimensional graphics processing library is used to realize three-dimensional graphics drawing, image rendering, synthesis, and layer processing, etc.
[0268] The 2D graphics engine is a drawing engine for 2D drawing.
[0269] The kernel layer is a layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, a touch sensor driver, a gyroscope sensor driver, and an acceleration sensor driver.
[0270] The following describes the workflow of the software and hardware of the electronic device in the context of a capture photographing scenario.
[0271] When the touch sensor receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, a timestamp of the touch operation, and the like). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer, and identifies a control corresponding to the input event. Taking an example in which the touch operation is a touch single-click operation and the control corresponding to the single-click operation is a control of a camera application icon, the camera application invokes an interface of the application framework layer, starts the camera application, and then starts a camera driver by invoking the kernel layer, and captures a still image or a video by using the camera.
[0272] It should be understood that each step in the above method embodiments provided by the present application can be completed by integrated logic circuits of hardware in a processor or instructions in software form. The method steps disclosed in the embodiments of the present application can be directly embodied as hardware processor execution, or be executed by a combination of hardware and software modules in the processor.
[0273] The present application also provides an electronic device, which can include a memory and a processor. The memory can be used to store a computer program, and the processor can be used to invoke the computer program in the memory to enable the electronic device to execute the method in any one of the above embodiments.
[0274] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the method executed by the electronic device in any one of the above embodiments.
[0275] In a possible design, the chip system further includes a memory for storing program instructions and data, and the memory is located in the processor or outside the processor.
[0276] The chip system can be composed of a chip, or can include a chip and other discrete devices.
[0277] Optionally, the processor in the chip system can be one or more. The processor can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, or the like. When implemented by software, the processor can be a general-purpose processor, which is configured to read software codes stored in the memory.
[0278] Optionally, the memory in the chip system can also be one or more. The memory can be integrated with the processor, or can be arranged separately from the processor, and the embodiments of the present application are not limited. Exemplarily, the memory can be a non-transient processor, for example, a read-only memory (ROM), which can be integrated on the same chip as the processor, or can be arranged on different chips respectively, and the embodiments of the present application do not make specific limitations on the type of memory and the arrangement manner of the memory and the processor.
[0279] Exemplarily, the chip system can be a field programmable gate array (FPGA), can be an application specific integrated circuit (ASIC), can also be a system on chip (SoC), can also be a central processor unit (CPU), can also be a network processor (NP), can also be a digital signal processor (DSP), can also be a micro controller unit (MCU), can also be a programmable logic device (PLD) or other integrated chip.
[0280] The present application also provides a computer program product, which comprises a computer program (also referred to as code or instruction), which, when executed, causes a computer to perform the method executed by the electronic device in any one of the above embodiments.
[0281] The present application also provides a computer readable storage medium, which stores a computer program (also referred to as code or instruction). When the computer program is executed, it causes a computer to perform the method executed by the electronic device in any one of the above embodiments.
[0282] The embodiments of the present application can be combined arbitrarily to achieve different technical effects.
[0283] In the above embodiments, all or part of the processes can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the processes can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes described in the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk), etc.
[0284] Those of ordinary skill in the art can understand that all or part of the processes in the above embodiments can be instructed by a computer program to complete the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The aforementioned storage medium includes ROM or random access memory (RAM), magnetic disk or optical disk, and various media that can store program codes.
[0285] In summary, the above only describes the embodiments of the technical solutions of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present application shall be included in the protection scope of the present application.
Claims
1. A touch control method, characterized in that, The method, applied to an electronic device including a capacitive touch panel, comprises: In an underwater environment, a first operation is received applied to the capacitive touch panel, and the attitude data of the electronic device and the first capacitance data of the capacitive touch panel are acquired. The posture data is input into the first detection model to obtain the first area of the capacitive touch panel affected by the first operation; the first detection model is trained by multiple sets of training data, and one set of training data includes: the identifier of the first area, and the mapping relationship between the posture data of the electronic device when the first operation is received in the first area; The first capacitance data and the attitude data of the first region are input into the second detection model to obtain the second region in the first region where the first operation is applied; the second detection model is trained by multiple sets of training data, and one set of training data includes: the identifier of the second region, and the mapping relationship between the attitude data of the electronic device and the first capacitance data of the first region when the first operation is received in the second region.
2. The method according to claim 1, characterized in that, After determining the second region within the first region to which the first operation is performed, the method further includes: In response to the first operation acting on the second region, the task corresponding to the first operation is executed.
3. The method according to claim 1, characterized in that, Prior to the underwater environment, the method further includes: First environmental data is acquired, and the electronic device is determined to be in the underwater environment based on the first environmental data. When in the underwater environment, the electronic device activates the underwater touch detection mode.
4. The method according to claim 3, characterized in that, Before acquiring the first environmental data, the method further includes: No second or third operation was detected. The second operation was used to instruct the electronic device to activate the underwater touch detection mode, and the third operation was used to instruct the electronic device to activate the atmospheric touch detection mode.
5. The method according to claim 3 or 4, characterized in that, Determining that the electronic device is in the underwater environment based on the first environmental data specifically includes: The electronic device is determined to be in the underwater environment after the second capacitance data is obtained through the capacitive touch panel and the number of capacitance values greater than the first threshold in the second capacitance data is greater than the second threshold.
6. The method according to any one of claims 1-4, characterized in that, Prior to the underwater environment, the method further includes receiving a second operation for activating the underwater touch detection mode.
7. The method according to any one of claims 1-4, characterized in that, After determining the second region within the first region to which the first operation is performed, the method further includes: In an atmospheric environment, a fourth operation is received that acts on the capacitive touch panel, and the fourth capacitance data of the capacitive touch panel is acquired. The third area of the capacitive touch panel to which the fourth operation is performed is obtained based on the fourth capacitance data.
8. The method according to claim 7, characterized in that, After obtaining the third area of the capacitive touch panel to which the fourth operation is performed based on the fourth capacitance data, the method further includes: In response to the fourth operation acting on the third region, the task corresponding to the fourth operation is executed.
9. The method according to claim 7, characterized in that, Prior to the atmospheric environment, the method further includes: Acquire second environmental data, determine that the electronic device is in the atmospheric environment based on the second environmental data, and activate the atmospheric touch detection mode when in the atmospheric environment.
10. The method according to claim 9, characterized in that, Before acquiring the second environmental data, the method further includes: The fifth and sixth operations were not detected. The fifth operation was used to instruct the electronic device to activate the underwater touch detection mode, and the sixth operation was used to instruct the electronic device to activate the atmospheric touch detection mode.
11. The method according to claim 9 or 10, characterized in that, Determining the atmospheric environment based on the second environmental data specifically includes: The electronic device is located in the atmospheric environment after the third capacitance data is obtained through the capacitive touch panel and the number of capacitance values greater than the first threshold in the third capacitance data is less than or equal to the second threshold.
12. The method according to claim 7, characterized in that, Prior to the atmospheric environment, the method further includes receiving a sixth operation for activating the atmospheric touch detection mode.
13. The method according to any one of claims 1-4, 8-10 and 12, characterized in that, The capacitive touch panel includes multiple areas with the same area as the first area, which do not overlap with each other.
14. The method according to any one of claims 1-4, 8-10 and 12, characterized in that, The first region includes multiple regions with the same area as the second region, which do not overlap with each other.
15. The method according to any one of claims 1-4, 8-10, and 12, characterized in that, The attitude data includes: acceleration data acquired by the accelerometer, angular velocity data acquired by the gyroscope, and pressure data acquired by the pressure sensor.
16. An electronic device, characterized in that, The electronic device includes a capacitive touch panel, one or more memories, and one or more processors; the capacitive touch panel, the memory, and the one or more processors are coupled together; the capacitive touch panel is used to receive touch operations; the memory is used to store computer program code, the computer program code including computer instructions; and the one or more processors invoke the computer instructions to cause the electronic device to perform the method as described in any one of claims 1-15.
17. A chip, said chip being used in an electronic device including a capacitive touch panel, characterized in that, The chip includes one or more processors, the processors being configured to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1-15.
18. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on an electronic device including a capacitive touch panel, the electronic device performs the method as described in any one of claims 1-15.
Citation Information
Patent Citations
Modifying functionality of electronic device during moisture exposure event
CN115052069A
Method and device for determining touch position, electronic equipment and storage medium
CN115904139A