Switching method and portable electronic device
First Claim
1. A switching method, applied to a portable electronic device comprising a barometer and a sound sensor, comprising:
- obtaining barometric data collected by the barometer in a preset duration and sound intensity data collected by the sound sensor in the preset duration, wherein the barometric data comprises barometric values collected in a series of moments in the preset duration, wherein the sound intensity data comprises sound intensity data collected in the series of moments in the preset duration, and wherein the barometer and the sound sensor perform collection synchronously;
determining that the barometric data and the sound intensity data meet a preset condition, wherein the preset condition corresponds to the portable electronic device entering a vehicle; and
switching a first positioning algorithm to a second positioning algorithm or switching a first positioning technology to a second positioning technology based on a determination that the portable electronic device enters the vehicle, wherein the preset condition comprises at least one of;
at least one barometric value in the barometric data is greater than a first threshold and at least one sound intensity value in the sound intensity data is greater than a second threshold;
the at least one barometric value in the barometric data increases at least once and the at least one sound intensity value in the sound intensity data increases at least once;
an average value of all the barometric values in the barometric data is greater than a third threshold and an average value of all the sound intensity values in the sound intensity data is greater than a fourth threshold;
an absolute value of a difference between a first time when a sound intensity value in the sound intensity data is greater than the second threshold and a second time when a barometric value in the barometric data is greater than the first threshold is less than a fifth threshold;
an absolute value of a difference between a third time when a sound intensity value in the sound intensity data increases and a fourth time when a barometric value in the barometric data increases is less than a sixth threshold;
oran absolute value of a difference between a fifth time when the average value of all the sound intensity values in the sound intensity data is greater than the fourth threshold and a sixth time when the average value of all the barometric values in the barometric data is greater than the third threshold is less than a seventh threshold.
1 Assignment
0 Petitions
Accused Products
Abstract
A method includes obtaining barometric data collected by the barometer in preset duration and sound intensity data collected by the sound sensor in the preset duration, where the barometric data includes n groups of collection moments and barometric values, the sound intensity data includes n groups of collection moments and sound intensity values, the barometer and the sound sensor perform collection synchronously, and n is an integer greater than 1, determining that the barometric data and the sound intensity data meet a preset condition, and switching a first positioning algorithm to a second positioning algorithm or switching a first positioning technology to a second positioning technology.
-
Citations
20 Claims
-
1. A switching method, applied to a portable electronic device comprising a barometer and a sound sensor, comprising:
-
obtaining barometric data collected by the barometer in a preset duration and sound intensity data collected by the sound sensor in the preset duration, wherein the barometric data comprises barometric values collected in a series of moments in the preset duration, wherein the sound intensity data comprises sound intensity data collected in the series of moments in the preset duration, and wherein the barometer and the sound sensor perform collection synchronously; determining that the barometric data and the sound intensity data meet a preset condition, wherein the preset condition corresponds to the portable electronic device entering a vehicle; and switching a first positioning algorithm to a second positioning algorithm or switching a first positioning technology to a second positioning technology based on a determination that the portable electronic device enters the vehicle, wherein the preset condition comprises at least one of; at least one barometric value in the barometric data is greater than a first threshold and at least one sound intensity value in the sound intensity data is greater than a second threshold; the at least one barometric value in the barometric data increases at least once and the at least one sound intensity value in the sound intensity data increases at least once; an average value of all the barometric values in the barometric data is greater than a third threshold and an average value of all the sound intensity values in the sound intensity data is greater than a fourth threshold; an absolute value of a difference between a first time when a sound intensity value in the sound intensity data is greater than the second threshold and a second time when a barometric value in the barometric data is greater than the first threshold is less than a fifth threshold; an absolute value of a difference between a third time when a sound intensity value in the sound intensity data increases and a fourth time when a barometric value in the barometric data increases is less than a sixth threshold;
oran absolute value of a difference between a fifth time when the average value of all the sound intensity values in the sound intensity data is greater than the fourth threshold and a sixth time when the average value of all the barometric values in the barometric data is greater than the third threshold is less than a seventh threshold. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. An electronic device, comprising:
-
a non-transitory computer-readable storage medium storing programming instructions; a barometer coupled to the non-transitory computer-readable storage medium and configured to collect barometric data in a preset duration; a sound sensor coupled to the non-transitory computer-readable storage medium and configured to collect sound intensity data in the preset duration; and at least one processor coupled to the non-transitory computer-readable storage medium, the barometer, and the sound sensor, wherein the programming instructions cause the at least one processor to be configured to; obtain the barometric data and the sound intensity data, wherein the barometric data comprises barometric values collected in a series of moments in the preset duration, wherein the sound intensity data comprises sound intensity data collected in the series of moments in the preset duration, and wherein the barometer and the sound sensor perform collection synchronously; determine that the barometric data and the sound intensity data meet a preset condition, wherein the preset condition corresponds to the electronic device entering a vehicle; and switch a first positioning algorithm to a second positioning algorithm or switch a first positioning technology to a second positioning technology based on a determination that the electronic device enters the vehicle, wherein the preset condition comprises at least one of; at least one barometric value in the barometric data is greater than a first threshold and at least one sound intensity value in the sound intensity data is greater than a second threshold; the at least one barometric value in the barometric data increases at least once and the at least one sound intensity value in the sound intensity data increases at least once; an average value of all the barometric values in the barometric data is greater than a third threshold and an average value of all the sound intensity values in the sound intensity data is greater than a fourth threshold; an absolute value of a difference between a first time when a sound intensity value in the sound intensity data is greater than the second threshold and a second time when a barometric value in the barometric data is greater than the first threshold is less than a fifth threshold; an absolute value of a difference between a third time when a sound intensity value in the sound intensity data increases and a fourth time when a barometric value in the barometric data increases is less than a sixth threshold;
oran absolute value of a fifth time when the average value of all the sound intensity values in the sound intensity data is greater than the fourth threshold and a sixth time when the average value of all the barometric values in the barometric data is greater than the third threshold is less than a seventh threshold. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A non-transitory computer readable storage medium storing one or more programs comprising programming instructions, and when executed by an electronic device comprising a barometer and a sound sensor, the programming instructions cause the electronic device to be configured to:
-
obtain barometric data collected by the barometer in a preset duration and sound intensity data collected by the sound sensor in the preset duration, wherein the barometric data comprises barometric values collected in a series of moments in the preset duration, wherein the sound intensity data comprises sound intensity data collected in the series of moments in the preset duration, and wherein the barometer and the sound sensor perform collection synchronously; determine that the barometric data and the sound intensity data meet a preset condition, wherein the preset condition corresponds to the electronic device entering a vehicle; and switch a first positioning algorithm to a second positioning algorithm or switch a first positioning technology to a second positioning technology based on a determination that the electronic device enters the vehicle, wherein the preset condition comprises at least one of; at least one barometric value in the barometric data is greater than a first threshold and at least one sound intensity value in the sound intensity data is greater than a second threshold; the at least one barometric value in the barometric data increases at least once and the at least one sound intensity value in the sound intensity data increases at least once; an average value of all the barometric values in the barometric data is greater than a third threshold and an average value of all the sound intensity values in the sound intensity data is greater than a fourth threshold; an absolute value of a difference between a first time when a sound intensity value in the sound intensity data is greater than the second threshold and a second time when a barometric value in the barometric data is greater than the first threshold is less than a fifth threshold; an absolute value of a difference between a third time when a sound intensity value in the sound intensity data increases and a fourth time when a barometric value in the barometric data increases is less than a sixth threshold;
oran absolute value of a fifth time when the average value of all the sound intensity values in the sound intensity data is greater than the fourth threshold and a sixth time when the average value of all the barometric values in the barometric data is greater than the third threshold is less than a seventh threshold. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20)
-
Specification