CN-121994212-A - Drop detection method, electronic device, chip system and storage medium
Abstract
The application discloses a drop detection method, electronic equipment, a chip system and a storage medium, wherein the method comprises the steps of determining first acceleration of the electronic equipment in the X-axis direction of a first coordinate system, second acceleration of the electronic equipment in the Y-axis direction of the first coordinate system, third acceleration of the electronic equipment in the Z-axis direction of the first coordinate system, first axial acceleration of an acceleration component in the X-axis direction of the first coordinate system, second axial acceleration of the acceleration component in the Y-axis direction of the first coordinate system and third axial acceleration of the acceleration component in the Z-axis direction of the first coordinate system; determining an antigravity acceleration based on the first acceleration, the second acceleration, the third acceleration, the first cardiac acceleration, the second cardiac acceleration, and the third cardiac acceleration; and detecting the falling state of the electronic equipment based on the antigravity acceleration. By adopting the method, the falling state of the electronic equipment can be accurately detected.
Inventors
- ZHANG JIAXIANG
- LI CHENLONG
- JIA XIANZHAO
- HU DONGMIN
Assignees
- 荣耀终端股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241108
Claims (13)
- 1. A method of fall detection, the method comprising: Determining a first acceleration of electronic equipment in an X-axis direction of a first coordinate system, a second acceleration of the electronic equipment in a Y-axis direction of the first coordinate system, a third acceleration of the electronic equipment in a Z-axis direction of the first coordinate system, a first heart acceleration of an acceleration component in the electronic equipment in the X-axis direction of the first coordinate system, a second heart acceleration of the acceleration component in the Y-axis direction of the first coordinate system and a third heart acceleration of the acceleration component in the Z-axis direction of the first coordinate system; determining an antigravity acceleration based on the first acceleration, the second acceleration, the third acceleration, the first cardiac acceleration, the second cardiac acceleration, and the third cardiac acceleration, the antigravity acceleration being an acceleration in an opposite direction of gravity; and detecting the falling state of the electronic equipment based on the antigravity acceleration.
- 2. The method of claim 1, wherein determining a first acceleration of the electronic device in an X-axis direction of a first coordinate system, a second acceleration of the electronic device in a Y-axis direction of the first coordinate system, a third acceleration of the electronic device in a Z-axis direction of the first coordinate system, a first cardiac acceleration of an acceleration component in the electronic device in the X-axis direction of the first coordinate system, a second cardiac acceleration of the acceleration component in the Y-axis direction of the first coordinate system, and a third cardiac acceleration of the acceleration component in the Z-axis direction of the first coordinate system comprises: Determining a first acceleration of the electronic equipment in the X-axis direction of a first coordinate system, a second acceleration of the electronic equipment in the Y-axis direction of the first coordinate system and a third acceleration of the electronic equipment in the Z-axis direction of the first coordinate system through acceleration components of the electronic equipment; And determining a first heart acceleration of the acceleration component in the electronic equipment in the X-axis direction of the first coordinate system, a second heart acceleration of the acceleration component in the Y-axis direction of the first coordinate system and a third heart acceleration of the acceleration component in the Z-axis direction of the first coordinate system through the gyroscope component of the electronic equipment.
- 3. The method of claim 2, wherein determining, by the gyroscope component of the electronic device, a first cardiac acceleration of an acceleration component in the electronic device in an X-axis direction of the first coordinate system, a second cardiac acceleration of the acceleration component in a Y-axis direction of the first coordinate system, and a third cardiac acceleration of the acceleration component in a Z-axis direction of the first coordinate system, comprises: And under the condition that the opening of the gyroscope component of the electronic equipment is detected, determining a first heart acceleration of the acceleration component in the electronic equipment in the X-axis direction of the first coordinate system, a second heart acceleration of the acceleration component in the Y-axis direction of the first coordinate system and a third heart acceleration of the acceleration component in the Z-axis direction of the first coordinate system through the gyroscope component.
- 4. A method according to claim 2 or 3, wherein said determining, by the gyroscope component, a first cardiac acceleration of an acceleration component in the electronic device in an X-axis direction of the first coordinate system, a second cardiac acceleration of the acceleration component in a Y-axis direction of the first coordinate system, and a third cardiac acceleration of the acceleration component in a Z-axis direction of the first coordinate system, comprises: Determining coordinates of the acceleration component in the first coordinate system; determining a first angular velocity of the acceleration component around an X axis in the first coordinate system, a second angular velocity of the acceleration component around a Y axis in the first coordinate system and a third angular velocity of the acceleration component around a Z axis in the first coordinate system through a gyroscope component of the electronic equipment; and determining a first cardiac acceleration of the acceleration component in the X-axis direction of the first coordinate system, a second cardiac acceleration of the acceleration component in the Y-axis direction of the first coordinate system and a third cardiac acceleration of the acceleration component in the Z-axis direction of the first coordinate system based on the coordinates of the acceleration component in the first coordinate system, the first angular velocity, the second angular velocity and the third angular velocity.
- 5. The method of claim 4, wherein determining a first cardiac acceleration of the acceleration component in an X-axis direction of the first coordinate system, a second cardiac acceleration of the acceleration component in a Y-axis direction of the first coordinate system, and a third cardiac acceleration of the acceleration component in a Z-axis direction of the first coordinate system based on coordinates of the acceleration component in the first coordinate system, the first angular velocity, the second angular velocity, and the third angular velocity comprises: determining a third heart acceleration of the acceleration component in the Z-axis direction of the first coordinate system based on the first angular velocity, the second angular velocity and coordinate values corresponding to the acceleration component in the Z-axis in the coordinate of the first coordinate system; determining a second heart acceleration of the acceleration component in the Y-axis direction of the first coordinate system based on the first angular velocity, the third angular velocity and coordinate values corresponding to the acceleration component on the Y-axis in the coordinates of the first coordinate system; and determining a first heart acceleration of the acceleration component in the X-axis direction of the first coordinate system based on the second angular velocity, the third angular velocity and coordinate values corresponding to the acceleration component on the X-axis in the coordinates of the first coordinate system.
- 6. The method of any of claims 1-5, wherein the determining an antigravity acceleration based on the first acceleration, the second acceleration, the third acceleration, the first cardiac acceleration, the second cardiac acceleration, and the third cardiac acceleration, the antigravity acceleration being an acceleration in an opposite direction of gravity comprises: Determining a first difference, a second difference and a third difference, wherein the first difference is the difference between the first acceleration and the first heart acceleration, the second difference is the difference between the second acceleration and the second heart acceleration, and the third difference is the difference between the third acceleration and the third heart acceleration; And determining an antigravity acceleration based on the first difference, the second difference, and the third difference.
- 7. The method of claim 6, wherein the antigravity acceleration is a result of a modular calculation of the first, second, and third differences.
- 8. The method of any of claims 1-7, wherein detecting a drop condition of the electronic device based on the antigravity acceleration comprises: comparing the antigravity acceleration with a preset drop threshold; And if the antigravity acceleration is smaller than the falling threshold, judging that the electronic equipment is in a falling state.
- 9. The method of any of claims 1-8, wherein the first coordinate system is a coordinate system established with a center of gravity of the electronic device as an origin.
- 10. An electronic device comprising one or more memories, one or more processors, wherein the memories are configured to store a computer program, and wherein the processors are configured to invoke the computer program to cause the electronic device to perform the method of any of claims 1-9.
- 11. A chip system for an electronic device, wherein the chip system comprises at least one processor and an interface, the interface is used for receiving instructions and transmitting the instructions to the at least one processor, and the at least one processor executes the instructions to enable the electronic device to execute the method according to any one of claims 1-9.
- 12. A computer readable storage medium having stored thereon a computer program/instruction which, when executed by a processor, implements the steps of the method according to any of claims 1-9.
- 13. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the method according to any of claims 1-9.
Description
Drop detection method, electronic device, chip system and storage medium Technical Field The present application relates to the field of computers, and in particular, to a drop detection method, an electronic device, a chip system, and a storage medium. Background The electronic equipment falls off when the gyroscope is used, and the electronic equipment can damage working gyroscope components due to collision, so that the gyroscope components are abnormal in function. So in order to avoid damage to the gyroscope caused by the impact of the electronic device, the gyroscope needs to be turned off before the electronic device is impacted, that is, when the electronic device is in the falling process. How to accurately detect the falling process of the electronic equipment becomes the current problem to be solved. Disclosure of Invention The application provides a drop detection method, electronic equipment, a chip system and a storage medium, which can accurately detect the drop state of the electronic equipment. In a first aspect, some embodiments of the present application provide a fall detection method. The drop detection method comprises the steps of determining first acceleration of the electronic equipment in the X-axis direction of a first coordinate system, second acceleration of the electronic equipment in the Y-axis direction of the first coordinate system, third acceleration of the electronic equipment in the Z-axis direction of the first coordinate system, first heart acceleration of an acceleration component in the X-axis direction of the first coordinate system, second heart acceleration of the acceleration component in the Y-axis direction of the first coordinate system and third heart acceleration of the acceleration component in the Z-axis direction of the first coordinate system, determining antigravity acceleration based on the first acceleration, the second acceleration, the third acceleration, the first heart acceleration, the second heart acceleration and the third heart acceleration, determining antigravity acceleration to be acceleration in the opposite direction of gravity, and detecting drop state of the electronic equipment based on the antigravity acceleration. By the above means, the antigravity acceleration, which is small in value when the electronic device is dropped and large in value when the electronic device has supporting force (for example, the electronic device is placed on a table), is accurately determined together by the acceleration in each axis direction and the centripetal acceleration on the coordinate system. Therefore, the falling state of the electronic device can be accurately detected based on the antigravity acceleration. In one possible mode, the method comprises the steps of determining a first acceleration of the electronic equipment in the X-axis direction of the first coordinate system, a second acceleration of the electronic equipment in the Y-axis direction of the first coordinate system, a third acceleration of the electronic equipment in the Z-axis direction of the first coordinate system, a first axial acceleration of an acceleration component in the X-axis direction of the first coordinate system, a second axial acceleration of the acceleration component in the Y-axis direction of the first coordinate system and a third axial acceleration of the acceleration component in the Z-axis direction of the first coordinate system through the acceleration component of the electronic equipment, determining a first acceleration of the electronic equipment in the X-axis direction of the first coordinate system, a second acceleration of the electronic equipment in the Y-axis direction of the first coordinate system and a third acceleration of the electronic equipment in the Z-axis direction of the first coordinate system through the gyroscope component of the electronic equipment, and determining a first axial acceleration of the acceleration component in the X-axis direction of the first coordinate system, a second axial acceleration of the acceleration component in the Y-axis direction of the first coordinate system and a third axial acceleration of the component in the Z-axis direction of the first coordinate system. By the method, the acceleration and the centripetal acceleration in the directions of all coordinate axes on the first coordinate system can be accurately determined. In one possible manner, determining, by a gyroscope component of an electronic device, a first cardiac acceleration of an acceleration component in an X-axis direction of a first coordinate system, a second cardiac acceleration of the acceleration component in a Y-axis direction of the first coordinate system, and a third cardiac acceleration of the acceleration component in a Z-axis direction of the first coordinate system, includes: when the gyroscope component of the electronic equipment is detected to be opened, determining a first axial acceleration of the acceleration compo