Barometric pressure detection methods, devices, electronic equipment and storage media

By installing a humidity sensor at the air pressure port of the electronic device, the problem of inaccurate air pressure data caused by water entering the air pressure port was solved, enabling more accurate altitude measurement and positioning.

CN115855355BActive Publication Date: 2026-07-31GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2021-09-23
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

The barometers in existing electronic devices are prone to inaccurate pressure data during use due to water entering the pressure port, which affects the accuracy of altitude measurement, floor positioning, and GPS positioning.

Method used

A humidity sensor is installed at the air pressure port of the electronic device. The environmental condition of the air pressure port is determined by the data sensed by the humidity sensor, and anti-interference processing is performed when the humidity is abnormal to avoid erroneous air pressure data.

Benefits of technology

It improves the accuracy of barometric pressure detection, ensuring the precision of altitude measurement, floor positioning, and GPS positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115855355B_ABST
    Figure CN115855355B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, electronic device, and storage medium for detecting air pressure, applied to an electronic device in which a humidity sensor is positioned corresponding to the location of an air pressure port. The air pressure detection method includes: determining the environmental state of the air pressure port based on sensing data from the humidity sensor; and performing anti-interference processing on the air pressure detection of the electronic device when the environmental state is an abnormal humidity state. This method can improve the accuracy of air pressure detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic equipment technology, and more specifically, to a method, apparatus, electronic device and storage medium for detecting air pressure. Background Technology

[0002] Currently, most electronic devices, such as wearable devices, use barometers. The basic function of a barometer is to measure atmospheric pressure. The altitude of the device can be determined by the air pressure, and it can also be used in conjunction with longitude and latitude obtained from the Global Positioning System (GPS) to calculate the device's location. However, the accuracy of related barometer detection technologies still needs improvement. Summary of the Invention

[0003] In view of the above problems, this application proposes a method, apparatus, electronic device and storage medium for air pressure detection, which can improve the above problems.

[0004] In a first aspect, embodiments of this application provide a barometric pressure detection method applied to an electronic device, wherein a humidity sensor is disposed at the location of a barometric pressure port of the electronic device, and the method includes: determining the environmental state of the barometric pressure port based on the sensing data of the humidity sensor; and performing anti-interference processing on the barometric pressure detection of the electronic device when the environmental state is an abnormal humidity state.

[0005] Secondly, this application provides a barometric pressure detection device applied to an electronic device. A humidity sensor is installed at the location of the barometric pressure port of the electronic device. The device includes: a state determination module for determining the environmental state of the barometric pressure port based on the sensing data of the humidity sensor; and an anti-interference module for performing anti-interference processing on the barometric pressure detection of the electronic device when the environmental state is an abnormal humidity state.

[0006] Thirdly, embodiments of this application provide an electronic device, including: a humidity sensor corresponding to the location of the air pressure port of the electronic device; one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more application programs are configured to perform the air pressure detection method provided in the first aspect above.

[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing program code, which can be called by a processor to execute the air pressure detection method provided in the first aspect above.

[0008] The solution provided in this application involves installing a humidity sensor at the location of the air pressure port of an electronic device. This allows the sensor to determine the environmental state of the air pressure port based on its sensing data. When the environmental state is abnormally humid, interference prevention measures are implemented for the air pressure detection of the electronic device. By placing a humidity sensor near the air pressure port, the sensor's data can determine whether there are water droplets on the surface and inside the air pressure port. If water droplets are present, interference prevention measures are implemented for the air pressure detection of the electronic device. This avoids introducing erroneous air pressure data when water enters the air pressure port, which could affect the accuracy of applications such as altitude measurement, floor positioning, and GPS positioning, thus improving the accuracy of air pressure detection in electronic devices. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown.

[0011] Figure 2 A schematic diagram of the structure of another electronic device provided in an embodiment of this application is shown.

[0012] Figure 3 A schematic diagram of the structure of another electronic device provided in an embodiment of this application is shown.

[0013] Figure 4 A schematic diagram of an electronic device provided in an embodiment of this application is shown.

[0014] Figure 5 A schematic diagram of another electronic device provided in an embodiment of this application is shown.

[0015] Figure 6 A flowchart of a barometric pressure detection method according to an embodiment of this application is shown.

[0016] Figure 7 A flowchart of a barometric pressure detection method according to another embodiment of this application is shown.

[0017] Figure 8 A schematic block diagram of a barometric pressure detection method according to this application is shown.

[0018] Figure 9 A schematic diagram of the overall process of a barometric pressure detection method provided in this application is shown.

[0019] Figure 10 A block diagram of a barometric pressure detection device according to an embodiment of this application is shown.

[0020] Figure 11 This is a block diagram of an electronic device for performing the air pressure detection method according to an embodiment of this application.

[0021] Figure 12 This is a storage unit in the embodiments of this application for storing or carrying program code that implements the air pressure detection method according to the embodiments of this application. Detailed Implementation

[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.

[0023] Currently, most electronic devices, such as wearable devices, use barometers. The most direct applications of barometer-measured air pressure data are altitude measurement, floor positioning, and water depth measurement, and it can also be adapted for use in mountaineering, personal health, and other scenarios. However, the inventors discovered in their research that the sensing element used in current barometers to detect external pressure is a suspended membrane, requiring an air pressure port on the surface of the electronic device to allow external pressure to reach the sensing element. However, in user scenarios, such as showering or running in summer, water can easily enter the air pressure port. Water droplets blocking the port affect the sensing element's ability to detect external air pressure. Since barometers are inherently sensitive sensors, water ingress significantly impacts the accuracy of the barometer data. Furthermore, the electronic device itself cannot determine whether changes in air pressure are normal. Therefore, it cannot correctly identify whether water droplets are interfering with the air pressure change, and erroneous air pressure data will affect the accuracy of applications such as altitude measurement and floor positioning. Therefore, the accuracy of related air pressure detection technology still needs improvement.

[0024] Therefore, the inventors have proposed a barometric pressure detection method and electronic device as described in this application. A humidity sensor is installed at the location of the barometric pressure port on the electronic device. Based on the sensing data from the humidity sensor, it can determine whether there are water droplets on the surface and inside the barometric pressure port. If water droplets are present, anti-interference processing is performed on the barometric pressure detection of the electronic device. This avoids introducing erroneous barometric pressure data when water enters the barometric pressure port, thus preventing it from affecting the accuracy of applications such as altitude measurement, floor positioning, and GPS positioning, and improving the accuracy of barometric pressure detection in the electronic device.

[0025] The application scenarios of the embodiments of this application will be introduced below.

[0026] Figure 1 This application provides a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 1 As shown, the electronic device 100 includes a housing 10 and a humidity sensor 20. The housing 10 has an air pressure hole 11, and the humidity sensor 20 is correspondingly disposed inside and around the air pressure hole 11 to detect the humidity of the environment surrounding the air pressure hole 11. There can be one or more humidity sensors.

[0027] Specifically, a receiving space 40 is formed inside the housing 10, and the air pressure hole 11 is used to connect the receiving space 40 to the outside of the housing 10. The humidity sensor 20 is housed in the receiving space 40 and is correspondingly disposed at the position of the air pressure hole 11, so that moisture in the environment surrounding the air pressure hole 11 must pass through the humidity sensor 20 before entering the receiving space.

[0028] In some embodiments, the humidity sensor 20 may include a substrate 21 on which a humidity-sensitive material 22 is disposed. The humidity-sensitive material 22 can absorb water molecules from the environment surrounding the pressure vent 11. The sensing data of the humidity sensor 20 changes depending on the amount of water molecules absorbed by the humidity-sensitive material 22. Therefore, when moisture enters the surface and interior of the pressure vent 11, the sensing data of the humidity sensor 20 can be used to identify whether water has entered the pressure vent.

[0029] In one embodiment, the humidity sensor 20 can be a humidity-sensitive resistor, wherein the humidity-sensitive material covering the substrate of the humidity-sensitive resistor is a film made of a moisture-sensitive material. The humidity-sensitive resistor's resistivity and resistance value change as its humidity-sensitive material absorbs moisture from the environment. In another embodiment, the humidity sensor 20 can also be a humidity-sensitive capacitor, wherein the humidity-sensitive material covering the substrate of the humidity-sensitive capacitor is a film made of a polymer. The humidity-sensitive capacitor's dielectric constant changes as its humidity-sensitive material absorbs moisture from the environment, thereby changing its capacitance.

[0030] In some embodiments, the electronic device 100 further includes a barometric pressure sensor 30. For example, see [link to example]. Figure 2 , Figure 2This illustration shows a schematic diagram of another electronic device provided in an embodiment of this application. The pressure sensor 30 is housed within the housing space 40 and positioned corresponding to the pressure port 11, so that external pressure from the housing 10 reaches the pressure sensor 30 through the pressure port 11, thereby enabling the pressure sensor 30 to detect external air pressure.

[0031] In some embodiments, the pressure sensor 30 may include a pressure sensing membrane 31 for detecting external pressure. The external pressure of the housing 10 can be applied to the pressure sensing membrane 31 through the pressure hole 11, causing the pressure sensing membrane 31 to deform. The pressure value can be obtained by measuring the stress generated by the deformation.

[0032] In some embodiments, the pressure sensor 30 may be positioned directly below the pressure port 11, or it may not be positioned directly below the pressure port. For example, please refer to... Figure 3 , Figure 3 This illustration shows a schematic diagram of another electronic device provided in an embodiment of this application. The housing 10 includes an outer wall 11 and an inner wall 12 disposed within the outer wall 11. An air pressure hole 11 is formed on the outer wall 11. The inner wall 12 and the outer wall 11 can together enclose the receiving space 40, allowing the receiving space 10 to communicate with the outside of the housing 10 through the air pressure hole 11. Optionally, as... Figure 3 As shown, the receiving space can be L-shaped. The air pressure sensor 30 is received in the receiving space 40 and is not positioned directly opposite the air pressure port 11. The humidity sensor 30 is received in the receiving space 40 and is positioned directly opposite the air pressure port 11, and can be positioned close to the air pressure port 11 to accurately detect the humidity of the environment surrounding the air pressure port.

[0033] In some embodiments, electronic device 10 may be a mobile terminal. For an example, please refer to... Figure 4 , Figure 4 This illustration shows a schematic diagram of an electronic device according to an embodiment of this application. Specifically, the electronic device 10 can be a smartphone, including a housing 10 with an air pressure vent 11. In other embodiments, the electronic device 10 can also be a wearable device. For example, please refer to... Figure 5 , Figure 5 This illustration shows a schematic diagram of another electronic device provided in an embodiment of this application. Specifically, the electronic device 10 can be a smartwatch, which includes a housing 10 with an air pressure vent 11.

[0034] Please see Figure 6 , Figure 6A schematic flowchart of a barometric pressure detection method according to an embodiment of this application is shown. In a specific embodiment, this barometric pressure detection method can be applied to, for example... Figure 10 The illustrated air pressure detection device 700 and the electronic equipment equipped with the air pressure detection device 700 are shown. Figure 11 The humidity sensor is located at the corresponding position of the air pressure port of the electronic device. The following will address... Figure 6 The process shown is explained in detail. The barometric pressure detection method shown may specifically include the following steps:

[0035] Step S110: Determine the environmental state of the air pressure vent based on the sensing data from the humidity sensor.

[0036] In some embodiments, the sensing data of the humidity sensor can be a specific humidity value, thereby determining the ambient humidity state of the air pressure vent based on the magnitude of the humidity value.

[0037] In other embodiments, the sensing data of the humidity sensor may also be the parameter changes of the humidity-sensitive element. Optionally, when the humidity sensor is a humidity-sensitive capacitor, since the dielectric constant of the humidity-sensitive capacitor changes with the change in ambient humidity, the sensing data of the humidity sensor may be the dielectric constant of the humidity-sensitive capacitor. Since the capacitance of the humidity-sensitive capacitor also changes when the dielectric constant changes, the sensing data of the humidity sensor may also be the capacitance (i.e., voltage) of the humidity-sensitive capacitor. Optionally, when the humidity sensor is a humidity-sensitive resistor, since the resistivity and resistance value of the humidity-sensitive resistor change with the change in ambient humidity, the sensing data of the humidity sensor may be the resistivity and resistance value of the humidity-sensitive resistor. Since the change in the resistivity and resistance value of the humidity-sensitive resistor affects the voltage division of the element, the sensing data of the humidity sensor may also be the voltage across the humidity-sensitive resistor.

[0038] It is understandable that the moisture-sensitive material on the humidity sensor can absorb moisture from the environment, causing its own parameters to change. Therefore, electronic devices can place a humidity sensor near the air pressure port to accurately sense the environmental state of the air pressure port through the sensing data of the humidity sensor, so as to determine whether water has entered the air pressure port and whether it interferes with the air pressure detection of the electronic device.

[0039] It is understandable that some electronic devices in related technologies may have built-in humidity sensors, but these sensors are not located at the air pressure vent, making it impossible for them to determine whether water has entered the vent. This can easily lead to situations where water is present in the air pressure vent, but because the moisture has not entered the electronic device, the humidity sensor incorrectly identifies that no water has entered. Therefore, this application addresses this issue by placing a humidity sensor near the air pressure vent. Its main function is to perceive the humidity status of the air pressure vent at close range, thereby avoiding the introduction of erroneous air pressure data.

[0040] In some embodiments, the electronic device can automatically activate the humidity sensor. Optionally, the temperature sensor can automatically activate upon power-on of the electronic device. The temperature sensor can either remain continuously operational or activate at specified intervals to save power consumption. In other embodiments, the electronic device may activate the humidity sensor only upon receiving a user command to save power consumption. The specific operating mode of the temperature sensor is not limited in this application.

[0041] Step S120: When the environmental condition is an abnormal humidity state, perform anti-interference processing on the air pressure detection of the electronic device.

[0042] In this embodiment, when the ambient humidity of the pressure vent is determined to be abnormal based on the sensing data from the humidity sensor, it indicates that water has entered the pressure vent, causing interference from water droplets and resulting in abnormal pressure detection by the electronic device. The detected pressure cannot accurately reflect the external ambient pressure. Therefore, it is necessary to implement anti-interference measures for the pressure detection of the electronic device to avoid introducing erroneous pressure data for subsequent applications such as altitude measurement, floor positioning, and water depth measurement.

[0043] In some embodiments, the anti-interference processing may be performed on the air pressure data currently detected by the electronic device. For example, erroneous air pressure data caused by moisture interference from the air pressure port may be filtered out, leaving only the valid data that has not been interfered with. In other embodiments, the anti-interference processing may also be performed on the environmental conditions of the air pressure port of the electronic device. For example, a prompt message may be generated to remind the user to clean the moisture from the air pressure port. The specific anti-interference processing is not limited here.

[0044] The air pressure detection method provided in this application embodiment involves a humidity sensor positioned corresponding to the air pressure port of an electronic device. This allows the system to determine the environmental state of the air pressure port based on the sensor's data, and to perform anti-interference processing on the air pressure detection when the environmental state is abnormally humid. By placing a humidity sensor near the air pressure port, the system can determine whether there are water droplets on the surface and inside the port based on the sensor's data, and to perform anti-interference processing on the air pressure detection when water droplets are present. This avoids introducing erroneous air pressure data when water enters the air pressure port, which could affect the accuracy of applications such as altitude measurement, floor positioning, and GPS positioning, thus improving the accuracy of air pressure detection in electronic devices.

[0045] Please see Figure 7 , Figure 7 A schematic flowchart of another embodiment of the air pressure detection method provided in this application is shown. The following will focus on... Figure 7The process shown is explained in detail. The barometric pressure detection method shown may specifically include the following steps:

[0046] Step S210: When the sensing data of the humidity sensor meets the preset conditions, the environmental state of the air pressure hole is determined to be an abnormal humidity state.

[0047] In some embodiments, since the humidity sensor absorbs moisture when there is moisture in the air pressure orifice, the sensing data of the humidity sensor will change. Therefore, a large amount of data on the changes in sensing data after the humidity sensor absorbs moisture can be collected in advance, and preset conditions can be set based on these changes. This allows the presence of moisture in the air pressure orifice to be determined directly based on whether the real-time detected sensing data of the humidity sensor meets the preset conditions. Specifically, the electronic device can determine that the environmental state of the air pressure orifice is an abnormal humidity state when the sensing data of the humidity sensor meets the preset conditions. An abnormal humidity state can be understood as a state in which water ingress into the air pressure orifice interferes with the air pressure detection of the electronic device.

[0048] In some embodiments, the humidity sensor's readings may differ depending on whether water enters the air pressure vent. Therefore, a large amount of data on the humidity sensor's readings after absorbing moisture can be collected in advance. A preset data range can then be set based on these data, allowing the system to determine whether moisture is present in the air pressure vent by checking whether the real-time humidity sensor readings fall within this preset range. Specifically, the electronic device can determine that the air pressure vent's environmental state is abnormally humid when the humidity sensor's readings are within the preset data range.

[0049] In other embodiments, since the humidity sensor's data changes significantly when air humidity is high, to avoid incorrect judgment of water ingress into the pressure port due to high air humidity, the trend of the sensing data can also be used to determine this. It is understood that if air humidity is high, the trend of the sensing data should be a regular, slow change, while if water is entering the pressure port, the trend should be a sudden, large change. Therefore, whether water has entered the pressure port can be determined by whether the trend of the sensing data over a period of time shows a sudden, large change. Specifically, a large amount of data can be collected in advance to distinguish the time and range of changes in the sensing data for air humidity and water ingress into the pressure port. Based on the time and range of changes, a preset trend can be set so that the pressure port can be directly determined by whether the trend of the humidity sensor's sensing data in real time matches this preset trend. Specifically, the electronic device can determine that the environmental state of the pressure port is abnormally humid when the trend of the humidity sensor's sensing data matches the preset trend.

[0050] Because humidity sensors come in different types, they may exhibit both negative and positive changes. A negative change means the sensor's readings decrease as humidity increases, while a positive change means the readings increase. Therefore, a preset trend can be determined based on the type of humidity sensor. For example, if the humidity sensor is a positive resistance humidity characteristic (i.e., the resistance increases as humidity increases), the electronic device can determine that the ambient temperature at the pressure vent is abnormally high when the resistance of the humidity sensor shows an increasing trend and the increase exceeds a specified range. Similarly, the voltage across the humidity sensor can also be used to determine this, but this will not be elaborated upon here.

[0051] Step S220: When the environmental condition is an abnormal humidity state, perform anti-interference processing on the air pressure detection of the electronic device.

[0052] Because water entering the pressure port can affect the sensing element's ability to detect external air pressure, causing deviations in the detected air pressure data and resulting in low accuracy, in some embodiments, when the environmental condition is abnormally humid, anti-interference processing is performed on the air pressure detection of the electronic device. Specifically, this can involve deleting the air pressure data detected by the electronic device under abnormal humidity conditions, thereby filtering out invalid data.

[0053] In other embodiments, deviations in the currently acquired air pressure data can be corrected to obtain more accurate air pressure data. Specifically, when the environmental condition is an abnormal humidity state, anti-interference processing is performed on the air pressure detection of the electronic device, which can specifically correct the air pressure data detected by the electronic device under the abnormal humidity state.

[0054] Since air pressure data does not change abruptly in a short period of time but generally exhibits regular variations, as one implementation method, correcting the air pressure data detected by the electronic device under abnormal humidity conditions can specifically be based on air pressure data detected by the electronic device within a specified time period. This allows for the determination of the air pressure data variation pattern based on the air pressure data detected within the specified time period, and further prediction of the air pressure data detected by the electronic device under abnormal humidity conditions. The specified time period can be an analyzable time period preceding the current moment, meaning that a sufficient number of air pressure detection data points exist within the specified time period before the current moment for effective analysis. In some implementations, the closer the specified time period is to the current moment, the higher the data validity and the more reliable the corrected air pressure data.

[0055] One approach is to specify a time period of fixed length. That is, the specified time period corresponds to a fixed time length preceding the current moment, allowing the electronic device to acquire the air pressure data detected within that fixed time length. This fixed time length can be reasonably set according to the specific application environment and is not limited here. For example, the fixed time length can be set to 20ms, and the specified time period is the 20ms time window before the current moment. If the electronic device detects air pressure data 5 times within those 20ms, then the electronic device can acquire those 5 air pressure data points.

[0056] Alternatively, the specified time period can be a fixed number of detections. In other words, the specified time period corresponds to the fixed number of detections prior to the current moment, allowing the electronic device to directly acquire the air pressure data from each of those fixed detections. The fixed number of detections can be reasonably set according to the specific application environment. For example, if the fixed number of detections is set to 10, the specified time period is the time window corresponding to the air pressure data from the 10 detections preceding the current moment, and the electronic device can acquire the air pressure data from each of those 10 detections.

[0057] Optionally, since the current detected air pressure data is usually not much different from the previous detected air pressure data under normal circumstances, it is also possible to simply use the most recently detected air pressure data as the air pressure data detected by the electronic device under the abnormal humidity condition.

[0058] As another implementation, correcting the air pressure data detected by the electronic device under abnormal humidity conditions can specifically be based on preset correction data. This preset correction data is determined according to the difference in air pressure data between the air pressure port when it is in a normal humidity state and when it is in an abnormal humidity state. A normal humidity state can be understood as a state where the air pressure port is not infiltrated by water, or where a small amount of water has entered the air pressure port but does not interfere with the air pressure detection of the electronic device. Specifically, under the same environment, an electronic device with water entering its air pressure port (equivalent to the air pressure port being in an abnormal humidity state) and an electronic device with water not entering its air pressure port (equivalent to the air pressure port being in a normal humidity state) can be used to simultaneously detect the current air pressure data. This allows for the collection of a large amount of sensing data showing the air pressure port being infiltrated by water, based on the difference in the air pressure data detected by these two electronic devices, to pre-collect the error situation caused by this error. Based on this error situation, preset correction data can be set so that when the environmental state of the air pressure port is abnormally humid, the air pressure data detected by the electronic device under this preset correction data can be corrected.

[0059] To prevent water ingress into the pressure port from interfering with the pressure detection of electronic devices over a prolonged period, it is necessary to address the water ingress issue. In some embodiments, when the environmental condition is abnormally humid, anti-interference measures are implemented for the pressure detection of the electronic device. This can also involve generating a prompt message indicating that the environment around the pressure port has abnormal humidity, thus prompting the user to remove the water from the pressure port, such as by wiping or shaking it off.

[0060] Step S230: Based on the air pressure data after the anti-interference processing, locate the electronic device.

[0061] In this embodiment of the application, after performing anti-interference processing on the air pressure detection of the electronic device, relatively accurate air pressure data can be obtained after the anti-interference processing, so as to perform subsequent positioning applications based on the relatively accurate air pressure data.

[0062] In some embodiments, the anti-interference processing is to delete or correct invalid data for the air pressure data, so that the valid air pressure data after deletion or correction can be obtained. Therefore, when the environmental condition of the air pressure hole is in an abnormal humidity state, only these valid air pressure data can be used for subsequent positioning application calculations.

[0063] In other embodiments, if the anti-interference processing targets the environmental conditions of the pressure port, such as the generation of prompt messages, since pressure correction is not yet performed, it is necessary to wait for the user to clean the moisture from the pressure port. Therefore, the environmental conditions of the pressure port can be monitored in real time, and the detected pressure data will only be directly acquired for subsequent positioning application calculations when the environmental conditions are within the normal humidity range. During periods of abnormal humidity, pressure data detection can be temporarily suspended, or invalid data can be deleted or corrected before using the processed, more accurate pressure data for subsequent positioning application calculations.

[0064] For example, please refer to Figure 8 , Figure 8 A schematic block diagram of the air pressure detection method provided in this application is shown. The system may include a moisture detection module, a judgment module, an air pressure module, a data processing module, a display module, and a control module.

[0065] The moisture detection module includes a humidity sensor, such as a humidity-sensitive resistor, which is used to detect whether water has entered through the air pressure port. When water enters, the sensing data of the humidity sensor in the moisture detection module changes. For example, when the humidity sensor is a humidity-sensitive resistor, the resistance of the humidity-sensitive resistor changes, which in turn affects the voltage drop across the humidity-sensitive resistor element.

[0066] The judgment module may include a microprocessor (Micro Controller Unit), which can detect the sensing data of the humidity sensor and determine whether water has entered the air pressure port based on the sensing data. For example, when the humidity sensor is a humidity-sensitive resistor, the judgment module can detect the voltage of the humidity-sensitive resistor element and determine whether water has entered the air pressure port based on the voltage of the humidity-sensitive resistor element.

[0067] The pressure module may include pressure sensors, etc., which can transmit the collected pressure data to the data processing module;

[0068] The data processing module may include a processor, etc. When it receives the water inlet signal from the pressure vent sent by the judgment module, it will perform anti-interference processing on the pressure detection of the electronic device. For example, it will process the suddenly changing pressure data and filter out invalid data;

[0069] The display module may include a display screen, etc., and can generate prompt information to indicate that there is an abnormal humidity in the environment where the air pressure port is located, so as to remind the user to shake off the water.

[0070] The control module can be connected to the aforementioned water droplet detection module, judgment module, air pressure module, data processing module, and display module to uniformly regulate the operation of these modules.

[0071] For example, please refer to Figure 9 , Figure 9 A schematic diagram of the overall flow of the air pressure detection method provided in this application is shown. When the electronic device is working, if the system activates the air pressure value acquisition function, the humidity sensor can sense the state of the air pressure orifice. When there are water droplets inside or on the surface of the air pressure orifice, the sensing data of the humidity sensor will change. For example, if the humidity sensor is a humidity-sensitive resistor, the resistance of the humidity-sensitive resistor will change, causing a change in the voltage drop across the element. At the same time, the barometer will collect air pressure data and upload it to the data processing module.

[0072] The judgment module then determines whether water has entered the pressure port based on the sensing data from the humidity sensor. For example, if the humidity sensor is a humidity-sensitive resistor, the judgment module can determine whether water has entered the pressure port based on the voltage value of the humidity-sensitive resistor. When water is detected in the pressure port, the processor in the data processing module performs anti-interference processing on the air pressure detection of the electronic device. For example, it filters out sudden changes in air pressure data and processes the air pressure values ​​to achieve applications such as altitude measurement, floor positioning, and GPS positioning. When water is detected in the pressure port, the data processing module directly processes the air pressure data to achieve applications such as altitude measurement, floor positioning, and GPS positioning. Simultaneously, when water is detected in the pressure port, the display module will remind the user that water has entered the pressure port and needs to be shaken out.

[0073] The air pressure detection method provided in this application embodiment involves a humidity sensor positioned corresponding to the air pressure port of an electronic device. This allows the device to determine if the environmental state of the air pressure port is abnormally humid when the humidity sensor's sensing data meets preset conditions. Furthermore, when the environmental state is abnormally humid, anti-interference processing is performed on the air pressure detection of the electronic device. By placing a humidity sensor near the air pressure port, the presence of water droplets on the surface and inside the air pressure port can be determined based on the sensor's data. If water droplets are present, anti-interference processing is performed on the air pressure detection of the electronic device. This avoids introducing erroneous air pressure data when water enters the air pressure port, which could affect the accuracy of applications such as altitude measurement, floor positioning, and GPS positioning, thus improving the accuracy of air pressure detection in electronic devices.

[0074] Please see Figure 10 This document illustrates a structural block diagram of a barometric pressure detection device 700 provided in an embodiment of this application. The device is applied to an electronic device, and a humidity sensor is positioned corresponding to the location of the barometric pressure port. The barometric pressure detection device 700 includes: a state determination module 710, used to determine the environmental state of the barometric pressure port based on the sensing data from the humidity sensor; and an anti-interference module 720, used to perform anti-interference processing on the barometric pressure detection of the electronic device when the environmental state is an abnormal humidity state.

[0075] In some embodiments, the state determination module 710 may be specifically used to: determine that the environmental state of the air pressure hole is an abnormal humidity state when the sensing data of the humidity sensor meets the preset conditions.

[0076] In some embodiments, the sensing data of the humidity sensor meets preset conditions, which may include: the sensing data of the humidity sensor is within a preset data range; or the changing trend of the sensing data of the humidity sensor is a preset trend.

[0077] In some embodiments, the anti-interference module 720 may be specifically used to: delete the air pressure data detected by the electronic device under the abnormal humidity state when the environmental state is an abnormal humidity state.

[0078] In some embodiments, the anti-interference module 720 may also be specifically used to: correct the air pressure data detected by the electronic device under the abnormal humidity state when the environmental state is an abnormal humidity state.

[0079] In some embodiments, the anti-interference module 720 may also be specifically used to: when the environmental state is an abnormal humidity state, correct the air pressure data detected by the electronic device in the abnormal humidity state based on the air pressure data detected by the electronic device at least once recently.

[0080] In some embodiments, the anti-interference module 720 may also be specifically used to: when the environmental state is an abnormal humidity state, correct the air pressure data detected by the electronic device under the abnormal humidity state based on preset correction data.

[0081] In some embodiments, the anti-interference module 720 may also be specifically used to: generate a prompt message when the environmental state is an abnormal humidity state, the prompt message being used to indicate that the environment where the air pressure port is located has an abnormal humidity.

[0082] In some embodiments, the air pressure detection device 700 may further include an application module for locating the electronic device based on the air pressure data after the anti-interference processing.

[0083] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0084] In the several embodiments provided in this application, the coupling between modules can be electrical, mechanical, or other forms of coupling.

[0085] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0086] In summary, the air pressure detection device provided in this application embodiment has a humidity sensor positioned corresponding to the air pressure port of the electronic device. This allows the device to determine if the environmental state of the air pressure port is abnormally humid when the humidity sensor's sensing data meets preset conditions. Furthermore, when the environmental state is abnormally humid, anti-interference processing is performed on the air pressure detection of the electronic device. Thus, by placing a humidity sensor near the air pressure port, it is possible to determine whether there are water droplets on the surface and inside the air pressure port based on the sensor's sensing data. If water droplets are present, anti-interference processing is performed on the air pressure detection of the electronic device. This avoids introducing erroneous air pressure data when water enters the air pressure port, which could affect the accuracy of applications such as altitude measurement, floor positioning, and GPS positioning, thereby improving the accuracy of air pressure detection in the electronic device.

[0087] Please refer to Figure 11This document illustrates a structural block diagram of an electronic device according to an embodiment of this application. The electronic device 100 can refer to a terminal device with barometric pressure detection capabilities, such as a mobile phone, tablet computer, music player, wearable device, Bluetooth headset, camera device, or smart home device. The electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, a humidity sensor 130, and one or more application programs. The humidity sensor 130 is located at the position of the barometric pressure port of the electronic device. One or more application programs can be stored in the memory 120 and configured to be executed by one or more processors 110. These one or more application programs are configured to execute the methods described in the foregoing method embodiments.

[0088] Processor 110 may include one or more processing cores. Processor 110 connects to various parts within the electronic device 100 using various interfaces and lines, and performs various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets, or instruction sets stored in memory 120, and by calling data stored in memory 120. Optionally, processor 110 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 110 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 110 and may be implemented separately using a communication chip.

[0089] The memory 120 may include random access memory (RAM) or read-only memory (ROM). The memory 120 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the electronic device 100 during use (such as phonebook data, audio and video data, chat log data, etc.).

[0090] The humidity sensor 130 can be either a resistive or capacitive humidity sensor. A resistive humidity sensor is characterized by a film made of a moisture-sensitive material coated on a substrate. When water vapor in the air is adsorbed onto the moisture-sensitive film, the resistivity and resistance of the element change, thus allowing the measurement of ambient humidity. A capacitive humidity sensor, on the other hand, is generally made of polymer film capacitors. Commonly used polymer materials include polystyrene, polyimide, and cellulose acetate butyrate. When the ambient humidity changes, the dielectric constant of the humidity sensor changes, causing its capacitance to change; the change in capacitance is proportional to the relative humidity.

[0091] Understandable. Figure 11 The structure shown is merely an example; the electronic device 100 may also include structures that are more complex than those shown. Figure 11 Showing more or fewer components, or having with Figure 11 The configuration shown is completely different. This application's embodiments are not limited in this respect.

[0092] Please refer to Figure 12 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 800 stores program code that can be called by a processor to execute the methods described in the above method embodiments.

[0093] The computer-readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has storage space for program code 810 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.

[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method of detecting air pressure, characterized by, Applied to electronic devices, wherein a humidity sensor is positioned corresponding to the location of the air pressure port of the electronic device, the method includes: When the changing trend of the sensing data of the humidity sensor is a preset trend, the environmental state of the air pressure hole is determined to be an abnormal humidity state. When the environmental condition is an abnormal humidity state, anti-interference processing is performed on the air pressure detection of the electronic device; The preset trend is determined as follows: Pre-collect the sensing data of the humidity sensor, distinguish the time and range of change of the sensing data corresponding to air humidity, and the time and range of change of the sensing data corresponding to water inlet through the air pressure hole. Set a preset trend based on the time of change and the range of change values.

2. The method of claim 1, wherein, The anti-interference processing for the air pressure detection of the electronic device includes: Delete the air pressure data detected by the electronic device under the abnormal humidity condition.

3. The method of claim 1, wherein, The anti-interference processing for the air pressure detection of the electronic device includes: Correct the air pressure data detected by the electronic device under the abnormal humidity condition.

4. The method of claim 3, wherein, The correction of the air pressure data detected by the electronic device under the abnormal humidity condition includes: Based on the air pressure data detected by the electronic device within a specified time period, the air pressure data detected by the electronic device under the abnormal humidity state is corrected.

5. The method of claim 3, wherein, The correction of the air pressure data detected by the electronic device under the abnormal humidity condition includes: Based on preset correction data, the air pressure data detected by the electronic device under the abnormal humidity state is corrected, wherein the preset correction data is determined according to the difference in air pressure data when the air pressure port is in the normal humidity state and when it is in the abnormal humidity state.

6. The method according to any one of claims 1-5, characterized in that, The anti-interference processing for the air pressure detection of the electronic device includes: A prompt message is generated, which indicates that there is an abnormal humidity in the environment where the air pressure port is located.

7. The method according to any one of claims 1 to 5, characterized in that, After performing anti-interference processing on the air pressure detection of the electronic device when the environmental condition is an abnormal humidity state, the method further includes: The electronic device is located based on the air pressure data after the anti-interference processing.

8. An air pressure detecting device characterized by comprising: A humidity sensor is installed at the location of the air pressure port of an electronic device. The device includes: The state determination module is used to determine the environmental state of the air pressure hole as an abnormal humidity state when the changing trend of the sensing data of the humidity sensor is a preset trend. An anti-interference module is used to perform anti-interference processing on the air pressure detection of the electronic device when the environmental condition is an abnormal humidity state. The preset trend is determined as follows: Pre-collect the sensing data of the humidity sensor, distinguish the time and range of change of the sensing data corresponding to air humidity, and the time and range of change of the sensing data corresponding to water inlet through the air pressure hole. Set a preset trend based on the time of change and the range of change values.

9. An electronic device, comprising: include: A humidity sensor is positioned corresponding to the air pressure port of the electronic device; One or more processors; Memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the method of any one of claims 1-7.

10. A computer readable storage medium, characterized in that, The computer readable storage medium stores program codes, which can be invoked by the processor to execute the method of any one of claims 1-7.