Method and device for determining air pressure change state, electronic equipment and storage medium

By acquiring and analyzing the variance and duration of air pressure data inside electronic devices, abnormal air pressure data can be screened out, solving the problem of difficulty in distinguishing air pressure changes in well-sealed equipment and improving the accuracy of altitude detection.

CN115683050BActive Publication Date: 2026-02-06VIVO MOBILE COMM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211193325.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2026-02-06
Estimated Expiration
2042-09-28

AI Technical Summary

Technical Problem

The good sealing of electronic devices makes it difficult to distinguish between changes in internal air pressure and changes in height, thus reducing the accuracy of height detection.

Method used

By obtaining the variance information of the first air pressure data, the second air pressure data that may have abnormal changes is filtered out, and further filtered according to its duration and change parameters to determine the air pressure change status.

Benefits of technology

This improves the accuracy of air pressure change status, thereby enhancing the accuracy of altitude detection by electronic equipment and reducing the impact of abnormal air pressure changes on altitude detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115683050B_ABST
    Figure CN115683050B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for determining a gas pressure change state, electronic equipment and a storage medium, and belongs to the technical field of gas pressure detection. The method for determining the gas pressure change state comprises the following steps: acquiring first gas pressure data in a first time period; determining second gas pressure data in the first gas pressure data according to variance information of the first gas pressure data; and determining the gas pressure change state according to a duration and a change parameter of the second gas pressure data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of air pressure detection, and particularly relates to a method and device for determining an air pressure change state, an electronic device and a storage medium. BACKGROUND

[0002] For electronic devices with high detection functions and good sealing properties, the height change of the electronic device is often determined by the air pressure change in the electronic device when the height of the electronic device is detected. However, because the electronic device has good sealing properties, the air pressure in the electronic device will also change when the electronic device is pressed, such as when a user presses the shell of the electronic device.

[0003] The internal air pressure change of the electronic device due to the pressing, and the internal air pressure change of the electronic device due to the low-range height change of the user carrying the electronic device, such as when the user climbs stairs on a low floor, are easily confused, which reduces the accuracy of determining the air pressure change state of the electronic device, and thus reduces the accuracy of the height detection of the electronic device in the subsequent application process. SUMMARY

[0004] The purpose of the embodiments of the application is to provide a method and device for determining an air pressure change state, an electronic device and a storage medium, which can improve the accuracy of determining the air pressure change state, and thus improve the accuracy of the height detection of the electronic device in the subsequent application process.

[0005] In a first aspect, the embodiments of the application provide a method for determining an air pressure change state, which includes: obtaining first air pressure data in a first time period; determining second air pressure data in the first air pressure data according to variance information of the first air pressure data; and determining the air pressure change state according to a duration and a change parameter of the second air pressure data.

[0006] In a second aspect, the embodiments of the application provide a device for determining an air pressure change state, which includes: an obtaining module, configured to obtain first air pressure data in a first time period; a first determining module, configured to determine second air pressure data in the first air pressure data according to variance information of the first air pressure data; and a second determining module, configured to determine the air pressure change state according to a duration and a change parameter of the second air pressure data.

[0007] In a third aspect, the embodiments of the application provide an electronic device, which includes a processor and a memory. The memory stores programs or instructions that can be run on the processor. When the programs or instructions are executed by the processor, the steps of the method for determining an air pressure change state according to the first aspect are implemented.

[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, which stores a program or instructions, and the program or instructions are executed by a processor to implement steps of the method for determining the air pressure change state according to the first aspect.

[0009] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is configured to run a program or instructions to implement steps of the method for determining the air pressure change state according to the first aspect.

[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement steps of the method for determining the air pressure change state according to the first aspect.

[0011] In the method for determining the air pressure change state provided by the embodiment of the present application, in the process of determining the air pressure change state, the first air pressure data in the first time period is obtained, and then the second air pressure data is determined from the first air pressure data according to the variance information of the first air pressure data, and on this basis, the air pressure change state is determined according to the duration and the change parameter of the second air pressure data. Through the above method for determining the air pressure change state, in the process of determining the air pressure change state, the second air pressure data that may exist abnormal change is selected from the first air pressure data according to the variance information of the first air pressure data. On this basis, the second air pressure data is further selected and detected according to the duration and the change parameter of the second air pressure data and other information, so as to accurately determine the air pressure change state. In this way, the air pressure change state is determined by combining the variance information, the duration, the change parameter and other information of the air pressure data, which ensures the accuracy of the determination of the air pressure change state, thereby reducing the influence of abnormal air pressure change on the high detection result of the electronic device in the subsequent application of high detection of the electronic device, and improving the accuracy of the high detection result of the electronic device. BRIEF DESCRIPTION OF DRAWINGS

[0012] Figure 1 A flowchart of the method for determining the air pressure change state provided by the embodiment of the present application is shown in the figure;

[0013] Figure 2 One of the principle diagrams of the method for determining the air pressure change state provided by the embodiment of the present application is shown in the figure;

[0014] Figure 3 The second principle diagram of the method for determining the air pressure change state provided by the embodiment of the present application is shown in the figure;

[0015] Figure 4 The third principle diagram of the method for determining the air pressure change state provided by the embodiment of the present application is shown in the figure;

[0016] Figure 5 Figure 4 is a schematic diagram of a fourth principle of the method for determining the air pressure change state according to an embodiment of the present application;

[0017] Figure 6 Figure 5 is a schematic diagram of a fifth principle of the method for determining the air pressure change state according to an embodiment of the present application;

[0018] Figure 7 Figure 6 is a structural block diagram of the device for determining the air pressure change state according to an embodiment of the present application;

[0019] Figure 8 Figure 7 is a structural block diagram of the electronic device according to an embodiment of the present application;

[0020] Figure 9 Figure 8 is a hardware structure schematic diagram of the electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art belong to the scope of protection of the present application.

[0022] The terms "first", "second", and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are usually a category and do not limit the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / ", generally represents a "or" relationship between the front and rear associated objects.

[0023] The embodiments of the first aspect of the present application propose a method for determining the air pressure change state. The execution subject of the technical solution of the method for determining the air pressure change state provided by the embodiments of the present application can be an electronic device, and can also be a device for determining the air pressure change state in the electronic device. The specific determination can be made according to the actual use demand, and the embodiments of the present application are not limited. In order to more clearly describe the method for determining the air pressure change state provided by the embodiments of the present application, the execution subject of the method for determining the air pressure change state is taken as the device for determining the air pressure change state in the following method embodiments.

[0024] The method for determining the air pressure change state provided by the embodiments of the present application will be described in detail below by combining the drawings, specific embodiments and application scenarios.

[0025] As Figure 1 shown, the embodiment of the present application provides a method for determining the state of air pressure change, which can include the following S102 to S106:

[0026] S102: Obtain first air pressure data in a first period.

[0027] The method for determining the state of air pressure change provided by the embodiment of the present application is applicable to electronic devices, which can be specifically electronic devices with height detection function and good sealing, such as electronic devices with IP68 waterproof design, and the IP68 waterproof level is the highest level in the housing protection level (IP code), and the sealing requirement of the electronic device is higher.

[0028] In actual application process, the method for determining the state of air pressure change provided by the embodiment of the present application can be specifically applied to electronic devices with height detection function and good sealing, such as smart phones, tablet computers, smart bracelets, smart watches, etc., which are not limited here.

[0029] Further, the first air pressure data is obtained by filtering the original air pressure data in the first period, and the fluctuation range of the first air pressure data is smaller than that of the original air pressure data. In this way, when the first air pressure data is processed and analyzed according to the variance information of the first air pressure data to determine the state of air pressure change in the electronic device, the first air pressure data with small fluctuation range can be eliminated without processing, thereby effectively reducing the workload of the electronic device and saving the computing resources of the electronic device.

[0030] The length of the first period is moderate, which can be specifically 4 seconds, 5 seconds, 6 seconds, etc., and the length of the first period can be set by the person skilled in the art according to the actual situation, which is not limited here. In this way, the persuasiveness and accuracy of the first air pressure data are ensured, and the timeliness of determining the state of air pressure change in the electronic device is ensured, thereby ensuring the accuracy and real-time of the height detection of the electronic device.

[0031] S104: Determine the second air pressure data in the first air pressure data according to the variance information of the first air pressure data.

[0032] It can be understood that, due to the good sealing performance of the electronic device, in the case that the electronic device is pressed, such as the user pressing the shell of the electronic device, the air pressure inside the electronic device will also change to a certain extent. For example, for an electronic device with good sealing performance, when the user presses the screen or the battery cover of the electronic device, the screen or the battery cover of the electronic device will deform to a certain extent, at this time, the air pressure inside the electronic device increases, the air inside the electronic device is discharged, and the air pressure inside and outside the electronic device is balanced. In the above process, as shown in block a in FIG. 1, Figure 2 , the air pressure value inside the electronic device naturally presents a change process of first increasing and then decreasing.

[0033] Similarly, when the user releases the pressing on the screen or the battery cover of the electronic device, the air pressure inside the electronic device decreases, the external air enters the inside of the electronic device, and the air pressure inside and outside the electronic device is balanced. In this process, as shown in block b in FIG. 1, Figure 2 , the air pressure value inside the electronic device presents a change process of first decreasing and then increasing.

[0034] Further, for abnormal air pressure changes inside the electronic device, such as the internal air pressure changes of the electronic device due to being pressed, the abnormal air pressure changes inside the electronic device are often faster, such as rapid air pressure rise or rapid air pressure drop, compared with the normal air pressure changes inside the electronic device, such as the internal air pressure changes of the electronic device when the user carries the electronic device to change the height in a low range.

[0035] On this basis, in the method for determining the air pressure change state provided in the embodiments of the present application, after determining the first air pressure data of the electronic device in the first time period, the variance information of the first air pressure data is further determined to determine the dispersion degree between the first air pressure data measured at different time points in the first time period. On this basis, according to the dispersion degree of the first air pressure data in the first time period, the second air pressure data with a larger dispersion degree and possibly abnormal change is screened out from the first air pressure data, so as to make further analysis and screening on the second air pressure data, thereby making accurate judgment on the air pressure change state inside the electronic device.

[0036] S106: Determine the air pressure change state according to the duration and the change parameter of the second air pressure data.

[0037] The second air pressure data is obtained by screening the first air pressure data according to variance information of the first air pressure data, and the second air pressure data may still include air pressure data with a large dispersion degree but within a normal change range. For example, when the user carries the electronic device to ride an elevator, a cable car, an airplane, or the like, the dispersion degree of the air pressure data in the electronic device is also large. Therefore, after the second air pressure data is determined, the second air pressure data needs to be further analyzed and screened to accurately determine the abnormal change data and the normal change data, so as to accurately determine the air pressure change state of the electronic device.

[0038] Further, the change parameter includes a change rate and an air pressure change amount, and the air pressure change amount can be used to indicate a change direction of the air pressure data, which can be an air pressure rising direction, an air pressure falling direction, an air pressure rising and then falling, an air pressure falling and then rising, and the like, which is not limited herein.

[0039] It can be understood that the abnormal air pressure change in the electronic device is usually a transient change, and compared with the abnormal air pressure change in the electronic device, the normal air pressure change in the electronic device usually has a long duration, and the air pressure change rate has a fixed range. For example, the running rate of an ordinary elevator is 3 m / s to 6 m / s, and the running rate of a cable car is usually less than 1 m / s. When the user carries the electronic device to ride the above-mentioned tools, the change rate of the air pressure in the electronic device corresponds to the running rate of each tool. That is, the normal air pressure change and the abnormal air pressure change in the electronic device are different in duration and change rate.

[0040] In addition, the normal air pressure change and the abnormal air pressure change in the electronic device are different in subsequent air pressure state in the electronic device after the air pressure change. For the normal air pressure change in the electronic device, the air pressure in the electronic device usually remains for a period of time after the change, that is, the subsequent air pressure data is relatively stable. For example, when the user carries the electronic device to climb stairs, after the climbing is completed, whether the user stands still or walks, the user will stay at the flat position for a long time, and the air pressure data in the electronic device is relatively stable during this period. For the abnormal air pressure change caused by the deformation of the electronic device, the air pressure in the electronic device usually presents a change opposite to the previous change within a period of time after the air pressure change in the electronic device, that is, for the normal air pressure change in the electronic device, the air pressure rising and the air pressure falling usually appear in pairs. That is, the normal air pressure change and the abnormal air pressure change in the electronic device are different in duration and change direction.

[0041] On this basis, in the method for determining the air pressure change state provided in the embodiments of the present application, after the second air pressure data possibly having abnormal change is screened out from the first air pressure data according to the variance information of the first air pressure data, the duration and the change parameter of the second air pressure data are further analyzed to further classify and screen the second air pressure data, so as to accurately determine the air pressure change state in the electronic device, and determine whether the electronic device is in the normal air pressure change state or the abnormal air pressure change state.

[0042] Further, in the present application, after determining the air pressure change state of the electronic device, in the case that the electronic device is determined to be in the normal air pressure change state, the height change of the electronic device can be detected according to the change of the air pressure in the electronic device, and the detection result is reported to the user. In the case that the electronic device is determined to be in the abnormal air pressure change state, the height change of the electronic device is not detected according to the change of the air pressure in the electronic device, or the height change result detected according to the change of the air pressure in the electronic device is not reported to the user. In this way, the height of the electronic device is prevented from being falsely reported when the air pressure in the electronic device abnormally changes, and the accuracy of the height detection of the electronic device is improved.

[0043] In the embodiments of the present application, by using the above method for determining the air pressure change state, in the process of determining the air pressure change state, the first air pressure data in the first period is obtained, and then the second air pressure data possibly having abnormal change is screened out from the first air pressure data according to the variance information of the first air pressure data in the first period, based on the difference between the variance information of the air pressure data in the abnormal change and the normal change. On this basis, the second air pressure data is further screened and detected according to the duration and the change parameter of the second air pressure data, so as to accurately determine the air pressure change state. In this way, the air pressure change state is determined by combining the variance, the duration, the change parameter and other information of the air pressure data, the accuracy of determining the air pressure change state is ensured, and in the subsequent application process of detecting the height of the electronic device, the influence of the abnormal air pressure change on the height detection result of the electronic device is reduced, and the accuracy of the height detection result of the electronic device is improved.

[0044] In the embodiments of the present application, the above first period includes at least two second periods, and on this basis, the S104 can specifically include the following S104a and S104b:

[0045] S104a: determining the variance value of the first air pressure data in each second period.

[0046] The duration of the first time period is moderate, and can be 4 seconds, 5 seconds, 6 seconds, etc. The duration of the second time period is short, so as to ensure the accuracy of the analysis result of the first air pressure data in the first time period, thereby ensuring the accuracy of the subsequent determination of the air pressure change state of the electronic device.

[0047] It can be understood that the abnormal air pressure change inside the electronic device, such as the internal air pressure change of the electronic device due to being squeezed, often presents a relatively fast change, such as rapid air pressure rise or rapid air pressure drop. Compared with the normal air pressure change inside the electronic device, the dispersion degree between the internal air pressure values of the electronic device measured at different time points is larger when the internal air pressure of the electronic device changes abnormally.

[0048] Therefore, in the method for determining the air pressure change state provided in the embodiments of the present application, after determining the first air pressure data of the electronic device in the first time period, the first air pressure data is divided into the first air pressure data in the second time period of at least two shorter time periods. On this basis, the variance value of the first air pressure data in each second time period is determined, so as to determine the dispersion degree of the first air pressure data in each second time period according to the variance value, so as to subsequently screen the second air pressure data with a relatively large dispersion degree and possibly existing abnormal change from the first air pressure data in the first time period according to the dispersion degree of the first air pressure data in each second time period.

[0049] S104b: In the case where the variance value of the first air pressure data in the target time period is greater than or equal to the first preset threshold value, the first air pressure data in the target time period is determined as the second air pressure data.

[0050] The target time period is any one of the at least two second time periods.

[0051] Specifically, after determining the variance value of the first air pressure data in each second time period, for the first air pressure data of each second time period, the variance value of the first air pressure data in the second time period is compared with the first preset threshold value. On this basis, in the case where the variance value of the first air pressure data in the target time period of the at least two second time periods is greater than or equal to the first preset threshold value, it is indicated that the variance value of the first air pressure data in the target time period is large, that is, it is indicated that the dispersion degree of the first air pressure data in the target time period is large, and at this time, the first air pressure data in the target time period is determined as the second air pressure data.

[0052] The specific value of the first preset threshold value can be set by those skilled in the art according to the actual situation, and is not specifically limited herein.

[0053] In addition, in a case where the variance value of the first air pressure data in the second time period is less than the first preset threshold, it is indicated that the variance value of the first air pressure data in the second time period is small, that is, the dispersion degree of the first air pressure data in the second time period is small, which is within the normal variation range of the internal air pressure of the electronic device. At this time, it is determined that the internal air pressure of the electronic device is in the air pressure normal variation state in the second time period.

[0054] In the above embodiments provided in the present application, the first time period includes at least two second time periods. On this basis, the variance value of the first air pressure data in each second time period is determined, and the variance value of the first air pressure data in each second time period is compared with the first preset threshold. In a case where the variance value of the first air pressure data in a target time period in the at least two second time periods is greater than or equal to the first preset threshold, the first air pressure data in the target time period is determined as the second air pressure data. In this way, based on the different variance information of the air pressure data in the abnormal variation and the normal variation, the second air pressure data possibly existing in the abnormal variation condition is screened out from the first air pressure data, the accuracy of determining the second air pressure data is ensured, and thus the accuracy of determining the air pressure variation state of the electronic device is ensured, and the accuracy of subsequent high detection of the electronic device is improved.

[0055] In the embodiments of the present application, the variation parameter includes a variation rate. On this basis, the S106 can specifically include the following S106a and S106b:

[0056] S106a: In a case where the duration of the second air pressure data is less than a duration threshold, it is determined that the air pressure variation state is the air pressure abnormal variation state.

[0057] It can be understood that the abnormal air pressure variation in the electronic device is often instantaneous, and compared with the abnormal air pressure variation in the electronic device, the normal air pressure variation in the electronic device often lasts for a long time.

[0058] On this basis, in the air pressure variation state determination method provided in the embodiments of the present application, after the second air pressure data possibly existing in the abnormal variation condition is screened out from the first air pressure data according to the variance information of the first air pressure data, the duration of the second air pressure data is further determined. In a case where the duration of the second air pressure data is less than a duration threshold, it is indicated that the duration of the second air pressure data is short, which is not within the normal variation range of the internal air pressure of the electronic device. At this time, it is determined that the air pressure variation state in the electronic device is the air pressure abnormal variation state, the height variation of the electronic device is not detected, or the height detection result of the electronic device is not reported to the user.

[0059] The specific value of the duration threshold can be set by those skilled in the art according to the situation, which is not specifically limited herein.

[0060] S106b: In a case where the duration of the second air pressure data is greater than or equal to the duration threshold and the change rate meets the preset condition, determining that the air pressure change state is the normal air pressure change state.

[0061] In this embodiment, the change parameter can specifically include a change rate of the second air pressure data.

[0062] It can be understood that, in a case where the duration of the second air pressure data is relatively long, the second air pressure data can be normal air pressure change data, or air pressure abnormal change data with a relatively long duration. However, compared with the air pressure change inside the electronic device, the change rate of the air pressure change inside the electronic device in the normal state usually has a fixed range. For example, the running rate of an ordinary elevator is 3 m / s to 6 m / s, the running rate of a cable car is usually less than 1 m / s, and the running rate of an airplane is much greater than the air pressure abnormal change rate. When the user carries the electronic device to ride the above tools, the change rate of the air pressure inside the electronic device corresponds to the running rate of each tool.

[0063] On this basis, in the method for determining the air pressure change state provided in the embodiment of the present application, in a case where the duration of the second air pressure data is greater than or equal to the duration threshold, the change rate of the second air pressure data is further determined. At this time, in a case where the change rate of the second air pressure data meets the preset condition, it is considered that the second air pressure data meets the normal change range of the air pressure inside the electronic device, it is determined that the electronic device is in the normal air pressure change state, the change of the height of the electronic device is directly detected according to the change of the air pressure inside the electronic device, and the detection result is reported to the user.

[0064] The preset condition is that the change rate of the second air pressure data corresponds to the change rate of the air pressure inside the electronic device in the normal height change of the electronic device. Specifically, the preset condition can be that the change rate of the second air pressure data corresponds to one of the running rate of the above tools such as the elevator, the cable car, the airplane, and the climbing speed of the user.

[0065] In actual application, the person skilled in the art can pre-store the air pressure change rate corresponding to the running rate of the above tools such as the elevator, the cable car, the airplane, and the climbing speed of the user in the electronic device, so as to subsequently directly compare the change rate of the second air pressure data with the pre-stored air pressure change rate, thereby determining the air pressure change state of the electronic device.

[0066] In the above embodiment provided in the present application, the change parameter includes a change rate. On this basis, in a case where the duration of the second air pressure data is less than the duration threshold, the air pressure change state is determined as the air pressure abnormal change state, and in a case where the duration of the second air pressure data is greater than or equal to the duration threshold and the change rate meets the preset condition, the air pressure change state is determined as the air pressure normal change state. In this way, after the second air pressure data that may exist abnormal change is screened from the first air pressure data, the second air pressure data is further screened and analyzed according to the duration of the second air pressure data and the change rate and other information, so as to determine the air pressure change state of the electronic device. In this way, the accuracy of determining the air pressure change state of the electronic device is ensured, so that in the subsequent height detection process, the abnormal air pressure change in the electronic device is avoided to affect the result of height detection, and the accuracy of height detection of the electronic device is improved.

[0067] In the embodiment of the present application, the change parameter further includes an air pressure change amount. On this basis, the S106 can further include the following S106c to S106e:

[0068] S106c: in a case where the duration of the second air pressure data is greater than or equal to the duration threshold and the change rate does not meet the preset condition, an air pressure change amount of the second air pressure data within the duration is obtained.

[0069] In this embodiment, the change parameter can further include an air pressure change amount of the second air pressure data within the duration thereof. The air pressure change amount is a vector value, and the specific change of the second air pressure data within the duration thereof can be determined through the air pressure change amount of the second air pressure data within the duration thereof. For example, in a case where the air pressure change amount includes a positive value, it indicates that the second air pressure data within the duration thereof exists a change of increasing air pressure value, and in a case where the air pressure change amount includes a negative value, it indicates that the second air pressure data within the duration thereof exists a change of decreasing air pressure value.

[0070] It can be understood that in a case where the duration of the second air pressure data is relatively long and the change rate does not meet the preset condition, the second air pressure data can be air pressure abnormal change data with a relatively long duration, or air pressure normal change data with a relatively special change rate. For example, in a case where the user carries the electronic device to run on a slow cable car, although the change duration of the internal air pressure of the electronic device is relatively long and the change rate of the internal air pressure of the electronic device does not meet the above preset condition, the electronic device is in an air pressure normal state. At this time, the second air pressure data needs to be further analyzed to accurately determine the air pressure change state of the electronic device.

[0071] On this basis, it can be understood that the normal pressure change and the abnormal pressure change inside the electronic device are different in the subsequent pressure state inside the electronic device after the pressure change. For the normal pressure change inside the electronic device, the pressure inside the electronic device will often remain for a period of time after the change, that is, the subsequent pressure data is relatively stable. For example, Figure 3 and Figure 4 The height h of the electronic device changes with time t when the user carries the electronic device to climb the stairs, where the height change of the electronic device is converted according to the pressure change inside the electronic device, and the height value of the electronic device is negatively related to the pressure value inside the electronic device. On this basis, as shown in Figure 3 When the user continuously climbs from the second floor to the third floor carrying the electronic device, after the end of climbing, whether the user is standing still or walking, the user will stay at the flat position for a long time, and the pressure inside the electronic device is in a flat state during this period, that is, the pressure data inside the electronic device is relatively stable. Or, as shown in Figure 4 When the user intermittently climbs from the first floor to the fourth floor carrying the electronic device, whenever the user stops for a short time during the climbing process, the pressure data inside the electronic device will temporarily tend to be stable, and when the user continues to climb, the pressure data inside the electronic device will continue to change until the user finishes climbing, the pressure inside the electronic device reaches a flat state, and the pressure data inside the electronic device will remain stable.

[0072] In the process of determining whether the internal pressure of the electronic device is in a flat state, considering the slight fluctuation of the pressure itself, when the pressure variance of the internal pressure of the electronic device within 1s is less than 0.03, it is considered that the internal pressure of the electronic device is in a flat state. On this basis, when the duration of the internal pressure of the electronic device in the flat state is greater than 4s, it is considered that the internal pressure of the electronic device is in a stable flat state.

[0073] Further, for the abnormal pressure change caused by the deformation of the electronic device, the pressure inside the electronic device will often show the opposite change after a period of time after the change. That is, as shown in Figure 5 For the normal pressure change inside the electronic device, the pressure rise and the pressure drop often appear in pairs.

[0074] That is, the specific change condition of the normal pressure change and the abnormal pressure change inside the electronic device is different, such as the change direction. Therefore, in the method for determining the pressure change state provided in the embodiments of the present application, in the case that the duration of the second pressure data is greater than or equal to the duration threshold, and the change rate of the second pressure data does not meet the preset condition, the pressure change amount of the second pressure data in the duration thereof is further determined. On this basis, the specific change condition of the second pressure data in the duration thereof is further analyzed and screened according to the pressure change amount of the second pressure data in the duration thereof, so as to accurately distinguish the pressure normal change data and the pressure abnormal change data from the second pressure data whose duration is greater than or equal to the duration threshold and whose change rate does not meet the preset condition, so as to avoid that the height change caused by the pressure change with the change rate not meeting the preset condition is eliminated in the subsequent height detection process.

[0075] S106d: In the case that the pressure change amount indicates that the second pressure data has both the pressure value increase and the pressure value decrease in the duration thereof, and the time interval of the two change phenomena is less than or equal to the preset value, it is determined that the pressure change state is the pressure abnormal change state.

[0076] The specific value of the preset value is relatively small, and the specific value of the preset value can be 2 seconds, 3 seconds, 4 seconds, etc. The specific value of the preset value can be set by the person skilled in the art according to the actual situation, which is not limited here.

[0077] Specifically, in the case that the duration of the second pressure data is greater than or equal to the duration threshold, and the change rate of the second pressure data does not meet the preset condition, the pressure change amount of the second pressure data in the duration thereof is further determined. In the case that the pressure change amount of the second pressure data in the duration thereof indicates that the second pressure data has both the pressure value increase and the pressure value decrease in the duration thereof, and the time interval of the two change phenomena is short, i.e., the time interval is less than the preset value, that is, in the case that the second pressure data has both the pressure rise phenomenon and the pressure drop phenomenon in a short period of time, it is considered that the second pressure data does not meet the normal change range of the internal pressure of the electronic device. At this time, it is determined that the pressure change state inside the electronic device is the pressure abnormal change state, and the height change of the electronic device is not detected, or the height detection result of the electronic device is not reported to the user.

[0078] S106e: In the case that the pressure change amount indicates that the second pressure data has only one change phenomenon of the pressure value increase or the pressure value decrease in the duration thereof, it is determined that the pressure change state is the pressure normal change state.

[0079] Specifically, in a case where the duration of the second air pressure data is greater than or equal to the duration threshold, and the change rate of the second air pressure data does not meet the preset condition, it is further determined that the air pressure change amount of the second air pressure data within the duration of the second air pressure data. In a case where the air pressure change amount of the second air pressure data within the duration of the second air pressure data indicates that only one of the air pressure value increase and the air pressure value decrease exists within the duration of the second air pressure data, that is, in a case where only one of the air pressure increase phenomenon and the air pressure decrease phenomenon exists within the duration of the second air pressure data, it is considered that the second air pressure data meets the normal change range of the internal air pressure of the electronic device. At this time, it is determined that the air pressure change state in the electronic device is the normal air pressure change state, the height change of the electronic device is directly detected according to the change of the internal air pressure of the electronic device, and the detection result is reported to the user.

[0080] In addition, in a case where the air pressure change amount of the second air pressure data within the duration of the second air pressure data indicates that both the air pressure value increase and the air pressure value decrease exist within the duration of the second air pressure data, and the time interval of the two change phenomena is greater than the preset value, it is also considered that the second air pressure data meets the normal change range of the internal air pressure of the electronic device, that is, it is considered that the air pressure change state in the electronic device is the normal air pressure change state.

[0081] In the above embodiments provided in the present application, the change parameter further includes the air pressure change amount, and on this basis, in a case where the duration of the second air pressure data is greater than or equal to the duration threshold, and the change rate does not meet the preset condition, the air pressure change amount of the second air pressure data within the duration of the second air pressure data is determined. Further, in a case where the air pressure change amount of the second air pressure data within the duration of the second air pressure data indicates that both the air pressure value increase and the air pressure value decrease exist within the duration of the second air pressure data, and the time interval of the two change phenomena is short, it is determined that the air pressure change state in the electronic device is the abnormal air pressure change state, and in a case where the air pressure change amount of the second air pressure data within the duration of the second air pressure data indicates that only one of the air pressure value increase and the air pressure value decrease exists within the duration of the second air pressure data, it is determined that the air pressure change state in the electronic device is the normal air pressure change state. In this way, while combining the duration and the change rate of the second air pressure data and other information, the specific change of the second air pressure data within the duration of the second air pressure data is further combined to further screen and analyze the second air pressure data, so as to ensure the accuracy of the determination of the air pressure change state, thereby avoiding that the height change caused by the normal air pressure change with the change rate not meeting the preset condition is eliminated in the subsequent height detection of the electronic device, and the accuracy of the height detection of the electronic device is improved.

[0082] In the embodiments of the present application, S102 can specifically include the following S102a to S102c:

[0083] S102a: Obtain original air pressure data in a first time period.

[0084] Specifically, the internal part of the electronic device can be provided with an air pressure sensor. In the process of determining the air pressure change state of the internal part of the electronic device by the method for determining the air pressure change state provided in the embodiments of the present application, the original air pressure data of the internal part of the electronic device in the first time period can be collected by the air pressure sensor provided in the electronic device.

[0085] S102b: Determine the change rate of the original air pressure data.

[0086] It can be understood that, for the case that the internal air pressure of the electronic device changes abnormally due to the deformation of the electronic device, it can be specifically divided into two cases: abnormal rapid change of air pressure and abnormal slow change of air pressure. For example, when the user presses the screen or the battery cover of the electronic device rapidly, the internal air pressure of the electronic device changes rapidly, and the air pressure fluctuation amplitude is large. When the electronic device is placed in a pocket or a bag and suffers from slow and continuous extrusion, the internal air pressure of the electronic device also changes slowly, and the air pressure fluctuation amplitude is small.

[0087] On this basis, in the method for determining the air pressure change state provided in the embodiments of the present application, after obtaining the original air pressure data of the electronic device in the first time period, the change rate of the original air pressure data is also determined, so as to determine the fluctuation of the internal air pressure of the electronic device according to the change rate of the original air pressure data, and then the original air pressure data obtained above is processed according to different air pressure fluctuation situations, so as to obtain the first air pressure data with small fluctuation amplitude.

[0088] S102c: In the case that the change rate of the original air pressure data is greater than or equal to a second preset threshold, the change rate of the original air pressure data is reduced by a target adjustment amount; in the case that the change rate of the original air pressure data is less than the second preset threshold, the original air pressure data is subjected to median filtering processing to obtain the first air pressure data.

[0089] Specifically, after obtaining the original air pressure data of the electronic device in the first time period, the change rate of the original air pressure data is compared with a second preset threshold. In the case that the change rate of the original air pressure data is greater than or equal to the second preset threshold, it indicates that the original air pressure data changes rapidly and the fluctuation range of the original air pressure data is large. At this time, the change rate of the original air pressure data is reduced according to the target adjustment amount, that is, the original air pressure data is limited to change at a specific rate, so as to reduce the fluctuation range of the original air pressure data. In the case that the change rate of the original air pressure data is less than the second preset threshold, it indicates that the original air pressure data changes slowly and the fluctuation range of the original air pressure data is small. At this time, the original air pressure data is subjected to median filtering processing, so as to further reduce the fluctuation range of the original air pressure data.

[0090] That is, in the method for determining the air pressure change state provided in the embodiments of the present application, after obtaining the original air pressure data of the electronic device in the first time period, the original air pressure data in different change states is processed according to the change rate of the original air pressure data, so as to obtain the adjusted first air pressure data. In this way, the fluctuation range of the first air pressure data is small, and when the first air pressure data is processed and analyzed according to the variance information of the first air pressure data to determine the air pressure change state in the electronic device, the first air pressure data with small fluctuation range can be removed, which does not affect the height detection result of the electronic device, so as to reduce the calculation work of the electronic device and improve the accuracy of the height detection of the electronic device.

[0091] For example, as shown in FIG. 6, the original air pressure data of the electronic device in the first time period is shown by curve m in FIG. 6, and the adjusted first air pressure data is shown by curve n in FIG. 6. Compared with curve m, the fluctuation range of curve n is smaller, and curve n is more stable. Figure 6 Figure 6 Figure 6

[0092] Further, the second preset threshold should be beyond the normal change range of the air pressure in the electronic device. The specific values of the second preset threshold and the target adjustment amount can be set by those skilled in the art according to the actual situation, which is not limited here.

[0093] ​​​The above embodiments provided in the application, when determining the first air pressure data in the first time period, the original air pressure data in the first time period is obtained, and then the change rate of the original air pressure data is determined. In the case that the change rate of the original air pressure data is greater than or equal to the second preset threshold, the change rate of the original air pressure data is reduced according to the target adjustment amount. In the case that the change rate of the original air pressure data is less than the second preset threshold, the original air pressure data is subjected to median filtering processing, so as to obtain the adjusted first air pressure data. In this way, compared with the original air pressure data, the fluctuation range of the first air pressure data is smaller. When the variance information of the first air pressure data is analyzed to determine the air pressure change state in the electronic device, the first air pressure data with small fluctuation range can be eliminated, and the height detection result of the electronic device is not affected, so that the calculation work of the electronic device is reduced, and the accuracy of the height detection of the electronic device is improved.

[0094] The determination method of the air pressure change state provided in the first aspect of the application is executed by the determination device of the air pressure change state. In the embodiments of the application, the determination method of the air pressure change state is executed by the determination device of the air pressure change state, and the determination device of the air pressure change state provided in the second aspect of the application is described.

[0095] As shown in Figure 7 The determination device 700 of the air pressure change state provided in the embodiments of the application is used for an electronic device, and can include the following acquisition module 702, first determination module 704 and second determination module 706.

[0096] The acquisition module 702 is configured to acquire first air pressure data of the electronic device in a first time period.

[0097] The first determination module 704 is configured to determine second air pressure data in the first air pressure data according to variance information of the first air pressure data.

[0098] The second determination module 706 is configured to determine the air pressure change state according to a duration and a change parameter of the second air pressure data.

[0099] The determination device for the air pressure change state provided in the embodiments of the present application is used to determine the air pressure change state. In the process of determining the air pressure change state, the first air pressure data in the first time period is obtained, and then the second air pressure data that may exist abnormal change condition is filtered from the first air pressure data according to the variance information of the first air pressure data in the first time period. On this basis, the second air pressure data is further filtered and detected according to the duration and the change parameter of the second air pressure data, so as to accurately determine the air pressure change state. In this way, the air pressure change state is determined by combining the variance, the duration, the change parameter and other information of the air pressure data, which ensures the accuracy of the determination of the air pressure change state, thereby reducing the influence of abnormal air pressure change on the height detection result of the electronic device in the subsequent application of height detection of the electronic device, and improving the accuracy of the height detection result of the electronic device.

[0100] In the embodiments of the present application, the first time period includes at least two second time periods, and the first determination module 704 is specifically configured to: determine the variance value of the first air pressure data in each second time period; and in the case that the variance value of the first air pressure data in the target time period is greater than or equal to the first preset threshold, determine the first air pressure data in the target time period as the second air pressure data, the target time period being any one of the at least two second time periods.

[0101] In the above embodiments provided in the present application, the first time period includes at least two second time periods, and on this basis, the variance value of the first air pressure data in each second time period is determined, and the variance value of the first air pressure data in each second time period is compared with the first preset threshold. In the case that the variance value of the first air pressure data in the target time period of the at least two second time periods is greater than or equal to the first preset threshold, the first air pressure data in the target time period is determined as the second air pressure data. In this way, the second air pressure data that may exist abnormal change condition is filtered from the first air pressure data based on the different variance information of the air pressure data in abnormal change and normal change, which ensures the accuracy of the determination of the second air pressure data, thereby ensuring the accuracy of the determination of the air pressure change state of the electronic device and improving the accuracy of the subsequent height detection of the electronic device.

[0102] In the embodiments of the present application, the change parameter includes the change rate, and the second determination module 706 is specifically configured to: in the case that the duration of the second air pressure data is less than the duration threshold, determine the air pressure change state as the air pressure abnormal change state; and in the case that the duration of the second air pressure data is greater than or equal to the duration threshold and the change rate meets the preset condition, determine the air pressure change state as the air pressure normal change state.

[0103] In the above embodiments provided in the present application, the change parameter includes a change rate, and on this basis, in a case where the duration of the second air pressure data is less than the duration threshold, the air pressure change state is determined as the air pressure abnormal change state, and in a case where the duration of the second air pressure data is greater than or equal to the duration threshold and the change rate meets the preset condition, the air pressure change state is determined as the air pressure normal change state. In this way, after the second air pressure data possibly having an abnormal change is screened out from the first air pressure data, the second air pressure data is further screened and analyzed according to the duration of the second air pressure data and the change rate and other information, so as to determine the air pressure change state. In this way, the accuracy of determining the air pressure change state is ensured, so as to reduce the influence of abnormal air pressure change on the height detection result of the electronic device in the subsequent application process of height detection of the electronic device, and improve the accuracy of the height detection result of the electronic device.

[0104] In the embodiments of the present application, the change parameter further includes an air pressure change amount, and the second determination module 706 is specifically further configured to: in a case where the duration of the second air pressure data is greater than or equal to the duration threshold and the change rate does not meet the preset condition, obtain an air pressure change amount of the second air pressure data within the duration; in a case where the air pressure change amount indicates that the second air pressure data within the duration has both an air pressure value increase and an air pressure value decrease, and the time interval of the two change phenomena is less than or equal to a preset value, determine the air pressure change state as the air pressure abnormal change state; and in a case where the air pressure change amount indicates that the second air pressure data within the duration has only one of the air pressure value increase or the air pressure value decrease, determine the air pressure change state as the air pressure normal change state.

[0105] In the above embodiments provided in the present application, the change parameter further includes a pressure change amount, and on this basis, in a case where the duration of the second pressure data is greater than or equal to the duration threshold and the change rate does not meet the preset condition, the pressure change amount of the second pressure data within the duration thereof is obtained. Further, in a case where the pressure change amount of the second pressure data within the duration thereof indicates that both the pressure value increase and the pressure value decrease exist simultaneously within the duration of the second pressure data, and the time interval of the two change phenomena is short, the pressure change state inside the electronic device is determined as the abnormal pressure change state. In a case where the pressure change amount of the second pressure data within the duration thereof indicates that only one of the pressure value increase or the pressure value decrease exists within the duration of the second pressure data, the pressure change state inside the electronic device is determined as the normal pressure change state. In this way, while combining the duration of the second pressure data and the change rate and other information, the specific change condition of the second pressure data within the duration thereof is further combined to further screen and analyze the second pressure data, so as to ensure the accuracy of the determination of the pressure change state, thereby avoiding the height change caused by the normal pressure change with the change rate not meeting the preset condition from being eliminated in the subsequent height detection process of the electronic device, and thus improving the accuracy of the height detection of the electronic device.

[0106] In the embodiments of the present application, as shown in Figure 7 The obtaining module 702 includes a first sub-obtaining module 708 configured to obtain original pressure data in a first time period, a third determining module 710 configured to determine a change rate of the original pressure data, and a processing module 712 configured to, in a case where the change rate of the original pressure data is greater than or equal to a second preset threshold, reduce the change rate of the original pressure data by a target adjustment amount, and in a case where the change rate of the original pressure data is less than the second preset threshold, perform median filtering processing on the original pressure data to obtain the first pressure data.

[0107] In the foregoing embodiments provided in the present application, in the process of determining the first air pressure data in the first time period, the original air pressure data in the first time period is acquired, and then the change rate of the original air pressure data is determined. In the case where the change rate of the original air pressure data is greater than or equal to the second preset threshold, the change rate of the original air pressure data is reduced by the target adjustment amount. In the case where the change rate of the original air pressure data is less than the second preset threshold, the original air pressure data is subjected to median filtering processing to obtain the adjusted first air pressure data. In this way, compared with the original air pressure data, the fluctuation range of the first air pressure data is smaller. When the first air pressure data is processed and analyzed according to the variance information of the first air pressure data to determine the air pressure change state in the electronic device, the first air pressure data with a smaller fluctuation range can be eliminated, and the height detection result of the electronic device is not affected, so that the calculation work of the electronic device is reduced, and the accuracy of the height detection of the electronic device is improved.

[0108] The air pressure change state determination apparatus 700 in the embodiments of the present application can be an electronic device, or a component in the electronic device, for example, an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than the terminal. For example, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), and can also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, and the like, and the embodiments of the present application are not limited in this regard.

[0109] The air pressure change state determination apparatus 700 in the embodiments of the present application can be an apparatus with an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, and the embodiments of the present application are not limited in this regard.

[0110] The air pressure change state determination apparatus 700 provided in the second aspect of the embodiments of the present application can implement the method embodiments Figure 1 The method embodiments implement various processes, and to avoid repetition, details are not described herein.

[0111] Optionally, as shown in Figure 8 The electronic device 800 includes a processor 802 and a memory 804. The memory 804 stores programs or instructions executable by the processor 802. When the programs or instructions are executed by the processor 802, each step of the method for determining the air pressure change state according to the first aspect is implemented, and the same technical effects are achieved. To avoid repetition, details are not described herein.

[0112] It should be noted that the electronic device in the embodiments of the present application includes the mobile electronic device and the non-mobile electronic device.

[0113] Figure 9 A hardware structure schematic diagram of an electronic device according to an embodiment of the present application.

[0114] The electronic device 900 includes, but is not limited to, a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910.

[0115] Those skilled in the art can understand that the electronic device 900 can also include a power supply (such as a battery) for powering each component. The power supply can be logically connected to the processor 910 through a power management system, so as to realize the functions of managing charging, discharging, and power consumption management through the power management system. Figure 9 The electronic device structure shown in the above figure does not constitute a limitation on the electronic device. The electronic device can include more or fewer components than the figure, or combine certain components, or different component arrangements, which are not described herein.

[0116] The electronic device 900 according to the embodiments of the present application can be used to implement each step of the method for determining the air pressure change state according to the first aspect.

[0117] The processor 910 is configured to obtain first air pressure data in a first time period.

[0118] The processor 910 is further configured to determine second air pressure data in the first air pressure data according to variance information of the first air pressure data.

[0119] The processor 910 is further configured to determine the air pressure change state according to the duration and the change parameter of the second air pressure data.

[0120] In the embodiment of the present application, in the process of determining the air pressure change state, the first air pressure data in the first time period is acquired, and then the second air pressure data possibly existing abnormal change condition is screened out from the first air pressure data according to the variance information of the first air pressure data in the first time period. On this basis, the second air pressure data is further screened and detected according to the duration and change parameter information of the second air pressure data, so as to accurately determine the air pressure change state. In this way, the air pressure change state is determined in combination with the variance, duration, change parameter and other information of the air pressure data, which ensures the accuracy of the determination of the air pressure change state, thereby reducing the influence of abnormal air pressure change on the height detection result of the electronic device in the subsequent application process of height detection of the electronic device, and improving the accuracy of the height detection result of the electronic device.

[0121] Optionally, the first time period includes at least two second time periods, and the processor 910 is specifically configured to: determine the variance value of the first air pressure data in each second time period; and in a case where the variance value of the first air pressure data in a target time period is greater than or equal to a first preset threshold, determine the first air pressure data in the target time period as the second air pressure data, the target time period being any one of the at least two second time periods.

[0122] The above embodiments provided in the present application include at least two second time periods in the first time period, on this basis, the variance value of the first air pressure data in each second time period is determined, and the variance value of the first air pressure data in each second time period is compared with the first preset threshold, in a case where the variance value of the first air pressure data in a target time period of the at least two second time periods is greater than or equal to the first preset threshold, the first air pressure data in the target time period is determined as the second air pressure data. In this way, based on the difference in variance information of the air pressure data in abnormal change and normal change, the second air pressure data possibly existing abnormal change condition is screened out from the first air pressure data, which ensures the accuracy of the determination of the second air pressure data, thereby ensuring the accuracy of the determination of the air pressure change state of the electronic device, and improving the accuracy of the subsequent height detection of the electronic device.

[0123] Optionally, the change parameter includes a change rate, and the processor 910 is specifically configured to: in a case where the duration of the second air pressure data is less than a duration threshold, determine that the air pressure change state is an air pressure abnormal change state; and in a case where the duration of the second air pressure data is greater than or equal to the duration threshold and the change rate meets a preset condition, determine that the air pressure change state is an air pressure normal change state.

[0124] In the above embodiments provided by the present application, the change parameter includes a change rate. On this basis, in a case where the duration of the second air pressure data is less than the duration threshold, the air pressure change state is determined as the air pressure abnormal change state, and in a case where the duration of the second air pressure data is greater than or equal to the duration threshold and the change rate meets the preset condition, the air pressure change state is determined as the air pressure normal change state. In this way, after the second air pressure data that may exist abnormal change is screened out from the first air pressure data, the second air pressure data is further screened and analyzed according to the duration of the second air pressure data and the change rate and other information, so as to determine the air pressure change state. In this way, the accuracy of determining the air pressure change state is ensured, so as to reduce the influence of abnormal air pressure change on the height detection result of the electronic device in the subsequent application process of height detection of the electronic device, and improve the accuracy of the height detection result of the electronic device.

[0125] Optionally, the change parameter further includes an air pressure change amount, and the processor 910 is specifically further configured to: in a case where the duration of the second air pressure data is greater than or equal to the duration threshold and the change rate does not meet the preset condition, obtain an air pressure change amount of the second air pressure data within the duration; in a case where the air pressure change amount indicates that the second air pressure data within the duration exists two change phenomena of air pressure value increase and air pressure value decrease, and the time interval of the two change phenomena is less than or equal to a preset value, determine the air pressure change state as the air pressure abnormal change state; and in a case where the air pressure change amount indicates that the second air pressure data within the duration only exists one change phenomenon of air pressure value increase or air pressure value decrease, determine the air pressure change state as the air pressure normal change state.

[0126] In the above embodiments provided in the present application, the change parameter further includes a pressure change amount, and on this basis, in a case where the duration of the second pressure data is greater than or equal to the duration threshold and the change rate does not meet the preset condition, the pressure change amount of the second pressure data within the duration of the second pressure data is determined. Further, in a case where the pressure change amount of the second pressure data within the duration of the second pressure data indicates that both the pressure value increase and the pressure value decrease exist simultaneously within the duration of the second pressure data, and the time interval of the two change phenomena is short, the pressure change state inside the electronic device is determined as the abnormal pressure change state, and in a case where the pressure change amount of the second pressure data within the duration of the second pressure data indicates that only one of the pressure value increase or the pressure value decrease exists within the duration of the second pressure data, the pressure change state inside the electronic device is determined as the normal pressure change state. In this way, while combining the duration of the second pressure data and the change rate and other information, the specific change of the second pressure data within the duration of the second pressure data is further combined to further screen and analyze the second pressure data, so as to ensure the accuracy of the determination of the pressure change state, thereby avoiding the height change caused by the normal pressure change with the change rate not meeting the preset condition from being eliminated in the subsequent height detection process of the electronic device, and thus improving the accuracy of the height detection of the electronic device.

[0127] Optionally, the processor 910 is specifically configured to: acquire original pressure data in a first period; determine a change rate of the original pressure data; in a case where the change rate of the original pressure data is greater than or equal to a second preset threshold, reduce the change rate of the original pressure data by a target adjustment amount, and in a case where the change rate of the original pressure data is less than the second preset threshold, perform median filtering processing on the original pressure data to obtain the first pressure data.

[0128] In the above embodiments provided in the present application, in the process of determining the first pressure data in the first period, the original pressure data in the first period is acquired, and then the change rate of the original pressure data is determined, in a case where the change rate of the original pressure data is greater than or equal to a second preset threshold, the change rate of the original pressure data is reduced by a target adjustment amount, and in a case where the change rate of the original pressure data is less than the second preset threshold, the original pressure data is subjected to median filtering processing to obtain the adjusted first pressure data. In this way, compared with the original pressure data, the fluctuation range of the first pressure data is smaller, and in the subsequent processing and analysis of the first pressure data according to the variance information of the first pressure data to determine the pressure change state inside the electronic device, the first pressure data with a smaller fluctuation range can be eliminated without affecting the height detection result of the electronic device, thereby reducing the calculation work of the electronic device while improving the accuracy of the height detection of the electronic device.

[0129] It should be understood that in the embodiments of the present application, the input unit 904 can include a graphics processing unit (GPU) 9041 and a microphone 9042. The graphics processing unit 9041 processes image data of a still picture or a video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 906 can include a display panel 9061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. The touch panel 9071 is also referred to as a touch screen. The touch panel 9071 can include two parts of a touch detection device and a touch controller. The other input devices 9072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), a trackball, a mouse, a joystick, and the like, which will not be described here.

[0130] The memory 909 can be used to store software programs and various data. The memory 909 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 909 can include a volatile memory or a non-volatile memory, or the memory 909 can include both volatile and non-volatile memories. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synch link DRAM (SLDRAM), and a direct memory bus random access memory (Direct Rambus RAM, DRRAM). The memory 909 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.

[0131] The processor 910 can include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes a wireless communication signal, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 910.

[0132] The embodiment of the present application further provides a readable storage medium, and the readable storage medium stores a program or an instruction, the program or the instruction is executed by a processor to realize each process of the determination method for the air pressure change state in the first aspect, and the same technical effects can be achieved, and details are not repeated here.

[0133] The processor is a processor in the electronic device in the above-mentioned embodiment. The readable storage medium includes a computer readable storage medium, such as a computer readable memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like.

[0134] The embodiment of the present application further provides a chip, and the chip includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is used to run a program or an instruction to realize each process of the determination method for the air pressure change state in the first aspect, and the same technical effects can be achieved, and details are not repeated here.

[0135] It should be understood that the chip mentioned in the embodiment of the present application can also be referred to as a system-level chip, a system chip, a chip system, or a system-on-chip chip, and the like.

[0136] The embodiment of the present application provides a computer program product, and the program product is stored in a storage medium, and the program product is executed by at least one processor to realize each process of the determination method for the air pressure change state in the first aspect, and the same technical effects can be achieved, and details are not repeated here.

[0137] It should be noted that, in the present document, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element. Furthermore, it is to be understood that the method and apparatus of the present application can be carried out by more than one process, method, article, or apparatus either simultaneously, concurrently, or with intervening action that are carried out at the same time, either in a simultaneous fashion or in a fashion that is interleaved in time. For example, the described methods can be performed in a different order from that described, and / or various steps can be combined or omitted, and / or additional steps can be added, without departing from the scope of the described methods. Also, features described with respect to certain examples can be combined in other examples.

[0138] From the above description of the embodiments, it is apparent that the method of the above-described embodiments can be realized by means of software and general-purpose hardware platforms. Of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such an understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a number of instructions to make a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) execute the methods of various embodiments of the present application.

[0139] The embodiments of the present application are described above in conjunction with the drawings, but the present application is not limited to the above-described specific embodiments, which are merely illustrative rather than restrictive, and a person of ordinary skill in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the protection scope of the claims.

Claims

1. A method of determining a barometric pressure change state, characterized by, The method for determining the air pressure change state comprises: obtaining first air pressure data in a first time period; determining second air pressure data in the first air pressure data according to variance information of the first air pressure data; determining an air pressure change state according to a duration of the second air pressure data and a change parameter; wherein the change parameter comprises a change rate, and in a case where the duration of the second air pressure data is less than a duration threshold, the air pressure change state is determined as an air pressure abnormal change state; in a case where the duration of the second air pressure data is greater than or equal to the duration threshold and the change rate meets a preset condition, the air pressure change state is determined as an air pressure normal change state; or, the change parameter comprises a change rate and an air pressure change amount, and in a case where the duration of the second air pressure data is greater than or equal to the duration threshold and the change rate does not meet the preset condition, an air pressure change amount of the second air pressure data in the duration is obtained; in a case where the air pressure change amount indicates that the second air pressure data has both air pressure value increase and air pressure value decrease in the duration, and a time interval of the two change phenomena is less than or equal to a preset value, the air pressure change state is determined as the air pressure abnormal change state; in a case where the air pressure change amount indicates that the second air pressure data has only one kind of change phenomenon of air pressure value increase or air pressure value decrease in the duration, the air pressure change state is determined as the air pressure normal change state.

2. The method of determining a gas pressure change state according to claim 1, characterized by, The first time period comprises at least two second time periods, and the determination of the second air pressure data in the first air pressure data according to the variance information of the first air pressure data comprises: determining a variance value of the first air pressure data in each second time period; in a case where the variance value of the first air pressure data in a target time period is greater than or equal to a first preset threshold, the first air pressure data in the target time period is determined as the second air pressure data, the target time period being any one of the at least two second time periods.

3. The method of determining a gas pressure change state according to claim 1 or 2, characterized by, The obtaining of the first air pressure data in the first time period comprises: obtaining original air pressure data in the first time period; determining a change rate of the original air pressure data; in a case where the change rate of the original air pressure data is greater than or equal to a second preset threshold, the change rate of the original air pressure data is reduced by a target adjustment amount, and in a case where the change rate of the original air pressure data is less than the second preset threshold, the original air pressure data is subjected to median filtering processing to obtain the first air pressure data.

4. A device for determining a state of change in air pressure, characterized in that The device for determining the air pressure change state comprises: an obtaining module, configured to obtain first air pressure data in a first time period; a first determining module, configured to determine second air pressure data in the first air pressure data according to variance information of the first air pressure data; a second determining module, configured to determine an air pressure change state according to a duration of the second air pressure data and a change parameter; wherein the change parameter comprises a change rate, and in a case where the duration of the second air pressure data is less than a duration threshold, the air pressure change state is determined as an air pressure abnormal change state; In a case where the duration of the second air pressure data is greater than or equal to the duration threshold and the change rate meets a preset condition, the air pressure change state is determined as a normal air pressure change state. In a case where the duration of the second air pressure data is greater than or equal to the duration threshold and the change rate does not meet the preset condition, an air pressure change amount of the second air pressure data in the duration is obtained. In a case where the air pressure change amount indicates that the second air pressure data has both an air pressure value increase and an air pressure value decrease in the duration, and a time interval between the two change phenomena is less than or equal to a preset value, the air pressure change state is determined as an abnormal air pressure change state. In a case where the air pressure change amount indicates that the second air pressure data has only one of an air pressure value increase or an air pressure value decrease in the duration, the air pressure change state is determined as a normal air pressure change state.

5. The air pressure change state determination device according to claim 4, characterized by The first time period includes at least two second time periods, and the first determining module is specifically configured to: determine a variance value of the first air pressure data in each second time period; and in a case where the variance value of the first air pressure data in a target time period is greater than or equal to a first preset threshold, determine the first air pressure data in the target time period as the second air pressure data, the target time period being any one of the at least two second time periods.

6. The gas pressure change state determination device according to claim 4 or 5, characterized by The obtaining module includes: a first sub-obtaining module configured to obtain original air pressure data in the first time period; a third determining module configured to determine a change rate of the original air pressure data; and a processing module configured to, in a case where the change rate of the original air pressure data is greater than or equal to a second preset threshold, reduce the change rate of the original air pressure data by a target adjustment amount, and in a case where the change rate of the original air pressure data is less than the second preset threshold, perform median filtering processing on the original air pressure data to obtain the first air pressure data.

7. An electronic device, comprising: A processor and a memory are included, the memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the air pressure change state determination method according to any one of claims 1 to 3.

8. A readable storage medium, characterized by, The readable storage medium stores programs or instructions, and the programs or instructions are executed by the processor to implement the steps of the air pressure change state determination method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Pressing operation recognition method and mobile terminal

    CN107092391A