Method, device and electronic equipment for detecting object state

By updating the correction value in the inertial measurement sensor and using the data at the stationary moment to correct the acceleration and angular velocity at the current moment, the problem of low error correction accuracy of the inertial measurement sensor is solved and the accuracy of object state detection is improved.

CN113405565BActive Publication Date: 2024-10-22UBTECH ROBOTICS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110583435.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-27
Publication Date
2024-10-22
Estimated Expiration
2041-05-27

AI Technical Summary

Technical Problem

Existing inertial measurement sensors have low error correction accuracy when detecting the state of objects, resulting in low detection accuracy. Especially in low-cost inertial measurement units (IMUs), there are problems such as zero offset, noise, cross-axis error, and temperature drift. .

Method used

By collecting acceleration and angular velocity data at consecutive moments that are closest to the current moment and the object is in a stationary state before the detection moment, the correction value is updated, and the data at the current moment is corrected based on the updated correction value to improve the accuracy of error correction. sex.

Benefits of technology

It improves the accuracy of object state detection, reduces errors caused by environmental changes, and enhances the accuracy of error correction, thereby improving the reliability of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113405565B_ABST
    Figure CN113405565B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of data processing technology, and provides a method, device and electronic device for detecting the state of an object, including updating a correction value according to the first acceleration and first angular velocity corresponding to the P consecutive target moments before the Tth moment, the P consecutive target moments are the P consecutive moments closest to the Tth moment and the object is in a stationary state; correcting the second acceleration and second angular velocity collected at the Tth moment according to the updated correction value; detecting the physical state of the object at the Tth moment according to the corrected second acceleration and second angular velocity. Updating the correction value according to the first acceleration and first angular velocity corresponding to the P consecutive moments closest to the Tth moment and the object is in a stationary state, correcting the second acceleration and second angular velocity collected at the Tth moment, can improve the accuracy of error correction, and detecting the state of the object based on the corrected data can make the accuracy of detecting the state of the object high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and in particular, relates to a method, device and electronic equipment for detecting the state of an object. Background Art

[0002] Modern MEMS inertial measurement sensors have achieved acceleration and angular velocity detection and are used in various objects such as mobile phones, headphones and other consumer electronic devices. However, due to various reasons such as process and environment, especially low-cost inertial sensors (such as inertial measurement units (IMUs)), there are many measurement errors, such as zero bias, noise, cross-axis error, temperature drift, etc.

[0003] Currently, sensors used for various objects usually set a reference error correction value for error correction before leaving the factory. Since the error may change with the changes in the external environment, the correction accuracy of the sensor measurement error is low, resulting in low accuracy in detecting the state of the object. Summary of the invention

[0004] The embodiments of the present application provide a method, device and electronic device for detecting the state of an object, aiming to solve the problem that the existing error correction accuracy is low, resulting in low accuracy in detecting the state of the object.

[0005] In a first aspect, an embodiment of the present application provides a method for detecting a state of an object, comprising:

[0006] Update the correction value according to the first acceleration and the first angular velocity collected corresponding to the P consecutive target moments before the Tth moment; wherein the P consecutive target moments are the P consecutive moments that are closest to the Tth moment and the object is in a stationary state, and the Tth moment is the moment at which the state of the object is currently detected;

[0007] Correcting the second acceleration and the second angular velocity acquired at the Tth moment according to the updated correction value;

[0008] The physical state of the object at the Tth moment is detected according to the corrected second acceleration and second angular velocity; wherein the physical state includes a moving state and a stationary state.

[0009] In one embodiment, updating the correction value according to the first acceleration and the first angular velocity collected corresponding to P consecutive target moments before the Tth moment includes:

[0010] Before the Tth moment, detecting whether the object is in a stationary state at each P consecutive moments in chronological order;

[0011] The P consecutive moments at which the object is detected to be in a stationary state and are closest to the Tth moment are taken as the P consecutive target moments;

[0012] updating the acceleration correction value according to the P first accelerations collected at the P consecutive target moments;

[0013] updating an angular velocity correction value according to the P first angular velocities collected at the P consecutive target moments;

[0014] Correspondingly, the second acceleration and the second angular velocity acquired at the Tth moment are corrected according to the updated correction value, including:

[0015] Correcting the second acceleration according to the updated acceleration correction value;

[0016] The second angular velocity is corrected according to the updated angular velocity correction value.

[0017] In one embodiment, the first acceleration includes three axial gravity acceleration components;

[0018] The calculation formula for updating the acceleration correction value according to the P first accelerations collected at the P consecutive target moments includes:

[0019]

[0020] Among them, a xi 、a yi and a zi are the three axial gravity acceleration components collected at the i-th target moment among the P consecutive target moments, is the updated acceleration correction value;

[0021] Correspondingly, the correcting the second acceleration according to the updated acceleration correction value includes:

[0022] The updated acceleration correction value is used as the gravity acceleration value corresponding to the T-th moment to obtain the corrected gravity acceleration.

[0023] In one embodiment, the first angular velocity includes three axial first angular velocity components;

[0024] The calculation formula for updating the angular velocity correction value according to the P first angular velocities collected at the P consecutive target moments includes:

[0025]

[0026] Among them, g xi , g yi and g zi is the first angular velocity component of the three axes collected at the i-th target moment in the P consecutive target moments, b x、b y and b z They are the updated angular velocity correction values ​​corresponding to the three axes respectively;

[0027] Correspondingly, the second angular velocity includes three axial second angular velocity components;

[0028] The correcting the second angular velocity according to the updated angular velocity correction value includes:

[0029] The second angular velocity component of each axial direction collected at the Tth moment is subtracted from the updated angular velocity correction value of the corresponding axial direction to obtain the corrected second angular velocity component of each axial direction.

[0030] In one embodiment, detecting the physical state of the object at the Tth moment according to the corrected second acceleration and second angular velocity includes:

[0031] If the first synthetic vector value corresponding to the corrected three-axis second angular velocity components is greater than or equal to a first preset threshold, it is determined that the object is in motion at the Tth moment.

[0032] In one embodiment, the detecting the physical state of the object at the Tth moment according to the corrected second acceleration and second angular velocity further includes:

[0033] If the difference between the second synthetic vector value of the second acceleration of the three axes collected at the Tth time and the corrected gravity acceleration is greater than or equal to the second preset threshold, it is determined that the object is in motion at the Tth time;

[0034] If the first resultant vector value is smaller than a first preset threshold value, and the difference between the second resultant vector value and the corrected gravity acceleration is smaller than a second preset threshold value, it is determined that the object is stationary at the Tth time.

[0035] In one embodiment, before the Tth moment, detecting whether the object is in a stationary state at each P consecutive moments in chronological order includes:

[0036] Before the Tth moment, determining the first acceleration variance according to the P first accelerations collected corresponding to each P consecutive moments in chronological order;

[0037] Before the T-th moment, determining the first angular velocity variance according to the P first angular velocities collected corresponding to each P consecutive moment in chronological order;

[0038] If the first acceleration variance is smaller than an acceleration reference threshold, and the first angular velocity variance is smaller than an angular velocity reference threshold, it is determined that the object is in a stationary state at the corresponding P consecutive moments.

[0039] In one embodiment, the object is provided with an inertial sensor, and the acceleration and angular velocity of the object are collected by the inertial sensor;

[0040] The angular velocity reference threshold and the acceleration reference threshold are obtained by the following steps:

[0041] In advance, K inertial sensors are respectively collected M times of acceleration and M times of angular velocity;

[0042] Determine a first mean of M accelerations of each inertial sensor, and determine a corresponding second acceleration variance according to the first mean and the M accelerations;

[0043] Determine a second mean of M angular velocities of each inertial sensor, and determine a corresponding second angular velocity variance according to the second mean and the M angular velocities;

[0044] Calculating and obtaining a first average value of second acceleration variances of the K inertial sensors;

[0045] Calculating and obtaining a second average value of second angular velocity variances of the K inertial sensors;

[0046] Determining the acceleration reference threshold value according to the first average value and a first preset margin coefficient;

[0047] The angular velocity reference threshold is determined according to the second average value and a second preset margin coefficient.

[0048] In a second aspect, an embodiment of the present application provides a device for detecting a state of an object, comprising:

[0049] An updating module, configured to update the correction value according to the first acceleration and the first angular velocity collected corresponding to P consecutive target moments before the Tth moment; wherein the P consecutive target moments are the P consecutive moments that are closest to the Tth moment and the object is in a stationary state, and the Tth moment is the moment at which the state of the object is currently detected;

[0050] a correction module, configured to correct the second acceleration and the second angular velocity acquired at the Tth moment according to the updated correction value;

[0051] The detection module is used to detect the physical state of the object at the Tth moment according to the corrected second acceleration and second angular velocity; wherein the physical state includes a motion state and a static state.

[0052] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned object state detection method when executing the computer program.

[0053] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the object state detection method are implemented.

[0054] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the steps of the above-mentioned method for detecting the state of the object.

[0055] Compared with the prior art, the embodiment of the present application has the following beneficial effects: the embodiment of the present application can update the correction value according to the first acceleration and the first angular velocity collected corresponding to the P consecutive target moments before the Tth moment; wherein the P consecutive target moments are the P consecutive moments closest to the Tth moment and the object is in a stationary state, and the Tth moment is the moment when the state of the object is currently detected; according to the updated correction value, the second acceleration and the second angular velocity collected at the Tth moment are corrected; according to the corrected second acceleration and the second angular velocity, the physical state of the object at the Tth moment is detected; wherein the physical state includes a motion state and a stationary state. Since the data collected at the stationary moment can more stably reflect the factors affected by the environment, the correction value is updated according to the first acceleration and the first angular velocity collected corresponding to the P consecutive moments closest to the Tth moment and the object is in a stationary state, and the second acceleration and the second angular velocity collected at the Tth moment are corrected, which can improve the accuracy of error correction, and the detection of the object state based on the corrected data can make the detection of the object state more accurate.

[0056] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0058] Figure 1 It is a flowchart of a method for detecting an object state provided in an embodiment of the present application;

[0059] Figure 2 is a schematic diagram of a flow chart of determining an angular velocity reference threshold and an acceleration reference threshold provided by an embodiment of the present application;

[0060] Figure 3 is a flow chart of a detection method provided in another embodiment of the present application;

[0061] Figure 4 is a specific flow chart of step S103 provided in one embodiment of the present application;

[0062] Figure 5 is a specific flow chart of step S103 provided in another embodiment of the present application;

[0063] Figure 6 is a schematic diagram of the structure of a device for detecting the state of an object provided in one embodiment of the present application;

[0064] Figure 7 It is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0065] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0066] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0067] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0068] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0069] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0070] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0071] The object state detection method provided in the embodiment of the present application can be applied to electronic devices such as objects provided with sensors for collecting acceleration and angular velocity, such as inertial sensors, specifically low-cost inertial measurement units (IMUs). The embodiment of the present application does not impose any restrictions on the specific type of sensors.

[0072] In order to illustrate the technical solution described in this application, the following embodiments are used for illustration.

[0073] See also Figure 1 , a method for detecting an object state provided in an embodiment of the present application includes:

[0074] Step S101, updating the correction value according to the first acceleration and the first angular velocity collected corresponding to the P consecutive target moments before the Tth moment; wherein the P consecutive target moments are the P consecutive moments that are closest to the Tth moment and the object is in a stationary state, and the Tth moment is the moment for currently detecting the state of the object.

[0075] Specifically, if the object is various electronic devices, an inertial sensor is provided in the electronic device. The Tth moment may be the moment corresponding to the current state of the object that needs to be detected. Before detecting the state of the object, the acceleration and angular velocity of the object collected at P consecutive moments are acquired in chronological order by the inertial sensor, and whether the object is in a stationary state at the corresponding P consecutive moments is detected based on the acceleration and angular velocity of the object at each P times. When the object is in a stationary state, an updated correction value is determined, and the stored correction value is updated with the updated correction value. The latest updated correction value is determined based on the acceleration and angular velocity within the corresponding time range when the object is in a stationary state in the most recent period of time at the current moment.

[0076] If P is 5, the first P consecutive moments are the first second, the second, the third second, the fourth second, and the fifth second, the second P consecutive moments are the second second, the third second, the fourth second, the fifth second, and the sixth second, and so on. If the acceleration and angular velocity collected for the first second, the second second, the third second, the fourth second, and the fifth second meet the preset static state condition, the correction value determined by the acceleration and angular velocity collected for the first second, the second second, the third second, the fourth second, and the fifth second is used as the new correction value, and the new correction value replaces the initial pre-stored correction value; if the second P consecutive moments are If the acceleration and angular velocity collected for five consecutive seconds, i.e., the second second, the third second, the fourth second, the fifth second, and the sixth second, meet the preset static state condition, then the correction value determined by the acceleration and angular velocity collected for five consecutive seconds, i.e., the second second, the third second, the fourth second, and the fifth second, is used as the new correction value, and the new correction value replaces the correction value pre-stored after the first update, and the correction value is updated in this way, so that the latest correction value is determined based on the acceleration and angular velocity within the time range when the object is in the static state in the most recent period, so that the correction value can be updated according to the actual environment. This is just an example for understanding and is not a limitation of the present application.

[0077] If the Tth moment is the moment that needs to be detected, and if the sixth second is the moment that needs to be detected, the acceleration and angular velocity collected in the first second, the second second, the third second, the fourth second, and the fifth second for five consecutive seconds meet the preset static state condition, and the second second, the third second, the fourth second, the fifth second, and the sixth second do not meet the preset static state condition, then the first second, the second second, the third second, the fourth second, and the fifth second are the P consecutive target moments of the sixth second; if the second second, the third second, the fourth second, the fifth second, and the sixth second meet the preset static state condition, then the P consecutive target moments of the sixth second are the second second, the third second, the fourth second, the fifth second, and the sixth second. This is just an example for understanding and is not intended to be a limitation of this application.

[0078] In one embodiment, before the Tth moment, detecting whether the object is in a stationary state for each P consecutive moments in chronological order includes: determining a first acceleration variance according to the P first accelerations corresponding to each P consecutive moments in chronological order before the Tth moment; determining a first angular velocity variance according to the P first angular velocities corresponding to each P consecutive moments in chronological order before the Tth moment; if the first acceleration variance is less than an acceleration reference threshold and the first angular velocity variance is less than an angular velocity reference threshold, then determining that the object is in a stationary state at the corresponding P consecutive moments.

[0079] Specifically, P accelerations and angular velocities collected at every P consecutive moments by the three-axis accelerometer and gyroscope in the inertial sensor can be obtained, and the variances of the acceleration and angular velocity at every P consecutive moments can be calculated. If both variances are smaller than their respective preset thresholds (i.e., the acceleration equation is smaller than the acceleration reference threshold and the angular velocity equation is smaller than the angular velocity reference threshold), then it is considered that the object at the corresponding P consecutive moments is at rest.

[0080] Assume that P is 5, and data sampling is performed according to the preset sampling time interval of 1s, and the acceleration and angular velocity collected by the inertial sensor at each of the five consecutive moments are detected, such as the first second, the second second, the third second, the fourth second, and the fifth second are the first five consecutive moments, and the second second, the third second, the fourth second, the fifth second, and the sixth second are the second five consecutive moments, and so on. For example, to detect whether the acceleration and angular velocity data corresponding to the five consecutive moments (such as 5 consecutive seconds) meet the conditions of the stationary state, specifically, the five accelerations collected corresponding to the five moments can be used as an acceleration array, and the variance of the acceleration array can be determined by the variance calculation method of the array. Similarly, the five angular velocities collected corresponding to the five moments can be used as an angular velocity array, and the variance of the angular velocity array can be determined by the variance calculation method of the array. When the variance of the acceleration array is less than the acceleration reference threshold, and the variance of the angular velocity array is less than the angular velocity reference threshold, it is determined that the corresponding P consecutive moments are in a stationary state. This is just an example for understanding, and is not a limitation of the present application.

[0081] In one embodiment, Figure 2 As shown, the object is provided with an inertial sensor, and the acceleration and angular velocity of the object are collected by the inertial sensor; the angular velocity reference threshold and the acceleration reference threshold are obtained by the following steps S201 to S207, which can be executed by the execution terminal of the object state detection method in the present application; or can be executed on any offline computing device without executing the object state detection method in the present application to obtain the angular velocity reference threshold and the acceleration reference threshold and save them in the inertial sensor:

[0082] Step S201 : Preliminarily collect M accelerations and M angular velocities from K inertial sensors.

[0083] Specifically, K inertial sensors may be placed in a stationary state in advance, and data may be collected at preset sampling times, and M raw data of accelerometers and gyroscopes may be collected to determine M accelerations and M angular velocities of each inertial sensor at this time.

[0084] Step S202: determining a first mean value of M accelerations of each inertial sensor, and determining a corresponding second acceleration variance according to the first mean value and the M accelerations.

[0085] Specifically, the mean and variance of the M accelerations of each inertial sensor are calculated, and the variance value is saved. The specific calculation formula can be:

[0086]

[0087] Among them, E a is the first mean value of M accelerations, is the second acceleration variance, a xi 、a yi and a zi They are respectively the three axial gravity acceleration components collected for the i-th time in the M times.

[0088] Step S203: determining a second mean of the M angular velocities of each inertial sensor, and determining a corresponding second angular velocity variance according to the second mean and the M angular velocities.

[0089] Specifically, the mean and variance of the M angular velocities of each inertial sensor are calculated, and the variance value is saved. The specific calculation formula can be:

[0090]

[0091] Among them, E g is the second mean, is the second angular velocity variance, g xi , g yi and g zi is the first angular velocity component of the three axes collected for the i-th time in the M times.

[0092] Step S204: Calculate and obtain a first average value of the second acceleration variances of the K inertial sensors.

[0093] Specifically, the accelerations of K inertial sensors are collected, and a first average value of the second acceleration variances of the K inertial sensors is calculated according to the second acceleration variance of each inertial sensor. The specific calculation formula may be:

[0094]

[0095] in, is the first average value, is the second acceleration variance of the jth inertial sensor among the K inertial sensors.

[0096] Step S205: Calculate and obtain a second average value of second angular velocity variances of the K inertial sensors.

[0097] Specifically, the angular velocities of K inertial sensors are collected, and the second average value of the second angular velocity variances of the K inertial sensors is calculated according to the second angular velocity variance of each inertial sensor. The specific calculation formula may be:

[0098]

[0099] in, is the first average value, is the second angular velocity variance of the jth inertial sensor among the K inertial sensors.

[0100] Step S206: determining the acceleration reference threshold value according to the first average value and a first preset margin coefficient.

[0101] Specifically, according to the first average value and the first preset margin coefficient, the calculation formula for determining the acceleration reference threshold value may be:

[0102]

[0103] Wherein, C is the acceleration reference threshold, h1 is the first preset margin coefficient, is the first average value.

[0104] Step S207: determining the angular velocity reference threshold value according to the second average value and a second preset margin coefficient.

[0105]

[0106] Wherein, C is the acceleration reference threshold, h2 is the second preset margin coefficient, is the second average value.

[0107] In an application scenario, the number of inertial sensors K and the number of acquisition times M need to be determined according to the actual situation. Generally, the more M and K, the better. However, larger M and K will lead to larger calculation amount and longer data acquisition time. The calculation amount and acquisition time can be considered to be M = 10000 and K = 100. The calculated average value is multiplied by the design margin h1 and h2 to obtain the angular velocity reference threshold and the acceleration reference threshold for stationary detection. The design margins h1 and h2 are generally 2 or 3 times the value.

[0108] Step S102: Correcting the second acceleration and the second angular velocity collected at the Tth moment according to the updated correction value.

[0109] Specifically, the updated correction value is the correction value updated based on the acceleration and angular velocity collected during the most recent static time period before the Tth moment. The correction value can be determined based on the acceleration and angular velocity collected during the static time period, and the second acceleration and second angular velocity collected at the second target moment are corrected based on the determined correction value.

[0110] In one embodiment, Figure 3 As shown, the step S101 includes steps S301 to S304, and correspondingly, the step S102 includes steps S305 to S306:

[0111] Step S301, before the Tth moment, detect whether the object is in a stationary state at each P consecutive moments in chronological order.

[0112] Specifically, before detecting the state of the object, the acceleration and angular velocity of the object collected P times at each P consecutive moments are obtained in chronological order, and whether the object is in a stationary state at the corresponding P consecutive moments is detected based on the acceleration and angular velocity of the object at each P times. Whether the object is in a stationary state at the corresponding P consecutive moments can be to regard the P accelerations collected corresponding to the P moments as an acceleration array, and determine the variance of the acceleration array by using the variance calculation method of the array. Similarly, the P angular velocities collected corresponding to the P moments are regarded as an angular velocity array, and the variance of the angular velocity array is determined by using the variance calculation method of the array. When the variance of the acceleration array is less than the acceleration reference threshold, and the variance of the angular velocity array is less than the angular velocity reference threshold, it is determined that the corresponding P consecutive moments are in a stationary state.

[0113] Step S302: The P consecutive moments at which the object is detected to be in a stationary state and are closest to the Tth moment are taken as the P consecutive target moments.

[0114] Specifically, before detecting the state of the object, the acceleration and angular velocity of the object collected P times at each P consecutive moments are acquired in chronological order, and whether the object is in a stationary state at the corresponding P consecutive moments is detected based on the acceleration and angular velocity of the object at each P times, and the latest P consecutive moments corresponding to the object being in a stationary state are taken as the P consecutive target moments.

[0115] Step S303: updating the acceleration correction value according to the P first accelerations collected at the P consecutive target moments.

[0116] Specifically, based on the P first accelerations collected at the P consecutive target moments, an acceleration correction value for updating is determined, and the acceleration correction value determined for updating is updated. The P consecutive target moments are P consecutive moments determined to be in a stationary state. In the stationary state, theoretically, the accelerometer only has components of gravity acceleration on three axes. The acceleration correction value determined for updating can specifically be the gravity acceleration correction value determined for updating.

[0117] Step S304: updating the angular velocity correction value according to the P first angular velocities collected at the P consecutive target moments.

[0118] Specifically, the P consecutive target moments are P consecutive moments determined to be in a stationary state. In the stationary state, the angular velocity is theoretically 0, but due to environmental or process issues, the angular velocity will be collected in the stationary state. Therefore, the angular velocity correction value used for updating is determined based on the P first angular velocities collected at the P consecutive target moments.

[0119] Step S305: Correct the second acceleration according to the updated acceleration correction value.

[0120] Specifically, the acceleration correction value determined for updating is used as the updated acceleration correction value, and correcting the second acceleration according to the updated acceleration correction value may be correcting the gravity acceleration in the second acceleration according to the updated gravity acceleration correction value.

[0121] In one embodiment, the first acceleration includes three axial gravity acceleration components;

[0122] The calculation formula for updating the acceleration correction value according to the P first accelerations collected at the P consecutive target moments includes:

[0123]

[0124] Among them, a xi 、a yi and a zi are the three axial gravity acceleration components collected at the i-th target moment among the P consecutive target moments, is the updated acceleration correction value;

[0125] Correspondingly, the correcting the second acceleration according to the updated acceleration correction value includes: using the updated acceleration correction value as the gravity acceleration value corresponding to the T-th moment to obtain a corrected gravity acceleration.

[0126] Step S306: correcting the second angular velocity according to the updated angular velocity correction value.

[0127] Specifically, the instantaneous value of the angular velocity detected by the current gyroscope has three axial components, namely gx, gy and gz; according to the angular velocity correction value, correcting the second angular velocity can be correcting the angular velocity of three axes in the second angular velocity according to the three axial angular velocity correction values.

[0128] In one embodiment, the first angular velocity includes three axial first angular velocity components;

[0129] The calculation formula for updating the angular velocity correction value according to the P first angular velocities collected at the P consecutive target moments includes:

[0130]

[0131] Among them, g xi , g yi and g zi is the first angular velocity component of the three axes collected at the i-th target moment in the P consecutive target moments, b x 、b y and b z They are the updated angular velocity correction values ​​corresponding to the three axes respectively;

[0132] Correspondingly, the second angular velocity includes three axial second angular velocity components;

[0133] The correcting the second angular velocity according to the updated angular velocity correction value includes:

[0134] The second angular velocity component of each axial direction collected at the Tth moment is subtracted from the updated angular velocity correction value of the corresponding axial direction to obtain the corrected second angular velocity component of each axial direction.

[0135] Specifically, the second angular velocity component of each axis acquired at the Tth moment is subtracted from the angular velocity correction value of the corresponding axis after update, and the calculation formula for obtaining the second angular velocity component of each axis after correction can be:

[0136]

[0137] Among them, g' x is the second angular velocity component of the x-axis collected at time T, g' y is the second angular velocity component of the y-axis collected at the Tth moment, g' z is the second angular velocity component of the z-axis collected at the Tth moment, b x is the angular velocity correction value in the x-axis direction, b y is the angular velocity correction value along the y-axis, b z is the angular velocity correction value along the z axis, g xis the second angular velocity component of the x-axis after correction, g y is the second angular velocity component of the y-axis after correction, g z is the second angular velocity component in the z-axis direction after correction.

[0138] Step S103: detecting the physical state of the object at the Tth moment according to the corrected second acceleration and second angular velocity; wherein the physical state includes a moving state and a stationary state.

[0139] Specifically, if the corrected second acceleration is greater than the first preset threshold, or the corrected second angular velocity is greater than the second preset value, it is determined that the physical state of the object at the Tth moment is a moving state. If the corrected second acceleration is less than or equal to the first preset threshold, and the corrected second angular velocity is less than or equal to the second preset value, it is determined that the physical state of the object at the Tth moment is a stationary state.

[0140] In one embodiment, Figure 4 As shown, the step S103 includes:

[0141] Step S1031: If the first synthetic vector value corresponding to the corrected three-axis second angular velocity components is greater than or equal to a first preset threshold, it is determined that the object is in motion at the Tth moment.

[0142] Specifically, if the composite vector of the three axes of the second angular velocity collected at the second target time is greater than or equal to the first preset threshold, it is determined that the object is in motion at the time T. The composite vector of the three axes of the second acceleration can be Among them, g x is the second angular velocity component of the x-axis after correction, g y is the second angular velocity component of the y-axis after correction, g z is the second angular velocity component in the z-axis direction after correction. It is determined that the object is in motion at time T, and A is the first preset threshold.

[0143] In one embodiment, Figure 5 , the step S103 further includes steps S1032 to S1033:

[0144] Step S1032: If the difference between the second synthetic vector value of the second acceleration in the three axes collected at the Tth moment and the corrected gravity acceleration is greater than or equal to a second preset threshold, it is determined that the object is in motion at the Tth moment.

[0145] Specifically, in a stationary state, there are only components of gravity acceleration on three axes, and the difference between the second acceleration collected at time T and the corrected gravity acceleration is greater than a second preset threshold, which is considered to be in a moving state. It is determined that the object is in motion at time T, where B is the second preset threshold. The second synthetic vector value of the second acceleration of the three axes collected at the Tth time, Corrected gravity acceleration.

[0146] In one embodiment, if the difference between the composite vector of the three axes of the second acceleration collected at the Tth time and the corrected gravity acceleration is greater than a second preset threshold, it is determined that the object is in motion at the Tth time. The composite vector of the three axes of the second acceleration collected at the Tth time can be Among them, a x is the second acceleration component in the x-axis direction collected at the Tth moment, a y is the second acceleration component of the y-axis collected at the Tth moment, a z It is the second acceleration component in the z-axis direction collected at the Tth moment.

[0147] Step S1033: if the first synthetic vector value is smaller than a first preset threshold, and the difference between the second synthetic vector value and the corrected gravity acceleration is smaller than a second preset threshold, it is determined that the object is stationary at the Tth moment.

[0148] Specifically, if the first synthetic vector value corresponding to the corrected three-axis second angular velocity components is less than the first preset threshold, and the difference between the second acceleration collected at the Tth moment and the corrected gravity acceleration is less than or equal to the second preset threshold, then it is determined that the object is stationary at the Tth moment. and It is determined that the object is in a stationary state at time T.

[0149] In one embodiment, the above step S101 includes acquiring acceleration and angular velocity data of the inertial sensor according to a preset sampling time interval, and storing them in a queue of a preset storage length in chronological order. When the queue is full, detecting whether the data stored in the queue meets the requirement that the object is in a stationary state. When the data stored in the queue meets the requirement that the object is in a stationary state (at this time, the moment corresponding to the data stored in the acquisition queue is the above P continuous target moments), updating the acceleration correction value and the angular velocity correction value; when the queue is not full, continuing to acquire the acceleration and angular velocity data of the inertial sensor and storing them in a queue of a preset storage length; when the queue is full, detecting whether the data stored in the queue meets the requirement that the object is in a stationary state. When the data stored in the queue meets the requirement that the object is not in a stationary state, the acceleration correction value and the angular velocity correction value are not updated. Step S102 includes taking the latest acceleration and angular velocity stored in the queue, and correcting the latest acceleration and angular velocity stored in the queue according to the most recently updated acceleration correction value and angular velocity correction value, where the latest stored acceleration and angular velocity correspond to the second acceleration and second angular velocity collected at the aforementioned Tth moment; step S103 includes determining whether the object is in motion or stationary state according to the latest corrected stored acceleration and angular velocity, and then returning to step S101 to execute the next moment to continue to obtain the acceleration and angular velocity data of the inertial sensor, and store them in a queue with a preset storage length. The acceleration and angular velocity data of the inertial sensor can be obtained to replace the data stored in the queue according to the first-in-first-out method of the queue, and then the acceleration check value and the angular velocity check value are updated according to the above-mentioned method for updating the acceleration correction value and the angular velocity correction value, and then step S102 and subsequent steps are continued.

[0150] The embodiment of the present application can update the correction value according to the first acceleration and first angular velocity collected corresponding to the P consecutive target moments before the Tth moment; wherein the P consecutive target moments are the P consecutive moments closest to the Tth moment and the object is in a stationary state, and the Tth moment is the moment of currently detecting the state of the object; according to the updated correction value, the second acceleration and second angular velocity collected at the Tth moment are corrected; according to the corrected second acceleration and second angular velocity, the physical state of the object at the Tth moment is detected; wherein the physical state includes a motion state and a stationary state. Since the data collected at the stationary moment can more stably reflect the factors affected by the environment, therefore, according to the first acceleration and first angular velocity collected corresponding to the P consecutive moments closest to the Tth moment and the object is in a stationary state, the correction value is updated, and the second acceleration and second angular velocity collected at the Tth moment are corrected, which can improve the accuracy of error correction, and detecting the state of the object based on the corrected data can make the accuracy of detecting the state of the object high.

[0151] The present application also provides an object state detection device for executing the steps in the above-mentioned object state detection method embodiment. The object state detection device can be a virtual appliance in an electronic device, which is run by a processor of the electronic device, or it can be the electronic device itself, or a sensor in the electronic device itself.

[0152] like Figure 6 As shown, the object state detection device 600 provided in the embodiment of the present application includes:

[0153] An updating module 601 is used to update the correction value according to the first acceleration and the first angular velocity collected corresponding to P consecutive target moments before the Tth moment; wherein the P consecutive target moments are the P consecutive moments that are closest to the Tth moment and the object is in a stationary state, and the Tth moment is the moment at which the state of the object is currently detected;

[0154] A correction module 602, configured to correct the second acceleration and the second angular velocity acquired at the Tth moment according to the updated correction value;

[0155] The detection module 603 is used to detect the physical state of the object at the Tth moment according to the corrected second acceleration and second angular velocity; wherein the physical state includes a moving state and a stationary state.

[0156] In one embodiment, the update module includes:

[0157] a detection unit, used to detect whether the object is in a stationary state at each P consecutive moments in chronological order before the Tth moment;

[0158] as a unit, used to take the P consecutive moments at which the object is detected to be in a stationary state and are closest to the Tth moment as the P consecutive target moments;

[0159] A first updating unit, configured to update an acceleration correction value according to the P first accelerations collected at the P consecutive target moments;

[0160] A second updating unit, configured to update an angular velocity correction value according to the P first angular velocities collected at the P consecutive target moments;

[0161] A first correction unit, configured to correct the second acceleration according to the updated acceleration correction value;

[0162] The second correction unit is used to correct the second angular velocity according to the updated angular velocity correction value.

[0163] In one embodiment, the calculation formula for updating the acceleration correction value according to the P first accelerations collected at the P consecutive target moments includes:

[0164]

[0165] Among them, a xi 、a yi and a zi are the three axial gravity acceleration components collected at the i-th target moment among the P consecutive target moments, is the updated acceleration correction value;

[0166] Correspondingly, the first correction unit is specifically used to: use the updated acceleration correction value as the gravity acceleration value corresponding to the T-th moment to obtain the corrected gravity acceleration.

[0167] In one embodiment, the first angular velocity includes first angular velocity components in three axes; the calculation formula for updating the angular velocity correction value according to the P first angular velocities collected at the P consecutive target moments includes:

[0168]

[0169] Among them, g xi , g yi and g zi is the first angular velocity component of the three axes collected at the i-th target moment in the P consecutive target moments, b x , b y and b z They are the updated angular velocity correction values ​​corresponding to the three axes respectively;

[0170] Correspondingly, the second angular velocity includes three-axial second angular velocity components; the second correction module is specifically used to: subtract the updated angular velocity correction value of the corresponding axis from the second angular velocity component of each axis collected at the Tth moment to obtain the corrected second angular velocity component of each axis.

[0171] In one embodiment, the detection module includes:

[0172] The first determination unit is configured to determine that the object is in motion at the Tth moment if a first synthetic vector value corresponding to the corrected three-axis second angular velocity components is greater than or equal to a first preset threshold.

[0173] In one embodiment, the detection module further includes:

[0174] a second determination unit, configured to determine that the object is in motion at the Tth moment if a difference between a second synthetic vector value of the second acceleration in three axes collected at the Tth moment and the corrected gravity acceleration is greater than or equal to a second preset threshold;

[0175] The third determination unit is configured to determine that the object is stationary at the Tth moment if the first synthetic vector value is smaller than a first preset threshold value and the difference between the second synthetic vector value and the corrected gravity acceleration is smaller than a second preset threshold value.

[0176] In one embodiment, the detection unit comprises:

[0177] A first determination unit, configured to determine a first acceleration variance according to the P first accelerations collected corresponding to each P consecutive moments in chronological order before the Tth moment;

[0178] A second determining unit is used to determine the first angular velocity variance according to the P first angular velocities collected corresponding to each P consecutive moments in chronological order before the T-th moment;

[0179] The fourth determination unit is configured to determine that the object is in a stationary state at corresponding P consecutive moments if the first acceleration variance is smaller than an acceleration reference threshold and the first angular velocity variance is smaller than an angular velocity reference threshold.

[0180] In one embodiment, the object is provided with an inertial sensor, and the acceleration and angular velocity of the object are collected by the inertial sensor; the object state detection device 600 includes an acquisition module, and the acquisition module is used to: acquire the angular velocity reference threshold and the acceleration reference threshold;

[0181] The acquisition module is specifically used to: collect M accelerations and M angular velocities of K inertial sensors in advance; determine a first mean of the M accelerations of each inertial sensor, and determine a corresponding second acceleration variance according to the first mean and the M accelerations; determine a second mean of the M angular velocities of each inertial sensor, and determine a corresponding second angular velocity variance according to the second mean and the M angular velocities; calculate a first average value of the second acceleration variances of the K inertial sensors; calculate a second average value of the second angular velocity variances of the K inertial sensors; determine the acceleration reference threshold according to the first average value and a first preset margin coefficient; and determine the angular velocity reference threshold according to the second average value and a second preset margin coefficient.

[0182] The embodiment of the present application can update the correction value according to the first acceleration and first angular velocity collected corresponding to the P consecutive target moments before the Tth moment; wherein the P consecutive target moments are the P consecutive moments closest to the Tth moment and the object is in a stationary state, and the Tth moment is the moment of currently detecting the state of the object; according to the updated correction value, the second acceleration and second angular velocity collected at the Tth moment are corrected; according to the corrected second acceleration and second angular velocity, the physical state of the object at the Tth moment is detected; wherein the physical state includes a motion state and a stationary state. Since the data collected at the stationary moment can more stably reflect the factors affected by the environment, therefore, according to the first acceleration and first angular velocity collected corresponding to the P consecutive moments closest to the Tth moment and the object is in a stationary state, the correction value is updated, and the second acceleration and second angular velocity collected at the Tth moment are corrected, which can improve the accuracy of error correction, and detecting the state of the object based on the corrected data can make the accuracy of detecting the state of the object high.

[0183] like Figure 7 As shown, an embodiment of the present invention further provides an electronic device 700 including: a processor 701, a memory 702, and a computer program 703 stored in the memory 702 and executable on the processor 701, such as an object state detection program. When the processor 701 executes the computer program 703, the steps in the above-mentioned object state detection method embodiments are implemented. When the processor 701 executes the computer program 703, the functions of the modules in the above-mentioned device embodiments are implemented, such as Figure 6 Functions of modules 601 to 603 are shown.

[0184] Exemplarily, the computer program 703 may be divided into one or more modules, which are stored in the memory 702 and executed by the processor 701 to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 703 in the electronic device 700. For example, the computer program 703 may be divided into an update module, a correction module, and a detection module, and the specific functions of each module have been described in the above embodiments and will not be repeated here.

[0185] The electronic device 700 may be a consumer electronic device such as a mobile phone, earphone, watch or wearable product, or an electronic device such as a desktop computer, notebook, PDA or cloud server. The electronic device may include, but is not limited to, a processor 701 and a memory 702. Those skilled in the art will understand that Figure 7It is only an example of the electronic device 700 and does not constitute a limitation of the electronic device 700. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0186] The processor 701 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0187] The memory 702 may be an internal storage unit of the electronic device 700, such as a hard disk or memory of the electronic device 700. The memory 702 may also be an external storage device of the electronic device 700, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 700. Further, the memory 702 may also include both an internal storage unit of the electronic device 700 and an external storage device. The memory 702 is used to store the computer program and other programs and data required by the electronic device. The memory 702 may also be used to temporarily store data that has been output or is to be output.

[0188] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0189] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0190] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0191] In the embodiments provided by the present invention, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0192] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0193] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0194] If the integrated module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0195] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A method for detecting an object state, characterized in that: include: Before the Tth moment, detect whether the object is in a stationary state at each P consecutive moments in chronological order; The P consecutive moments at which the object is detected to be in a stationary state and are closest to the Tth moment are taken as the P consecutive target moments; updating the acceleration correction value according to the P first accelerations collected at the P consecutive target moments; updating an angular velocity correction value according to the P first angular velocities collected at the P consecutive target moments; The P consecutive target moments are the P consecutive moments that are closest to the Tth moment and the object is in a stationary state, and the Tth moment is the moment at which the state of the object is currently detected; Correcting the second acceleration acquired at the Tth moment according to the updated acceleration correction value; Correcting the second angular velocity acquired at the Tth moment according to the updated angular velocity correction value; Detecting the physical state of the object at the Tth moment according to the corrected second acceleration and second angular velocity; wherein the physical state includes a moving state and a stationary state; The first acceleration includes three axial gravity acceleration components; The calculation formula for updating the acceleration correction value according to the P first accelerations collected at the P consecutive target moments includes: Among them, a xi 、a yi and a zi are the three axial gravity acceleration components collected at the i-th target moment among the P consecutive target moments, is the updated acceleration correction value; Correspondingly, the correcting the second acceleration according to the updated acceleration correction value includes: Using the updated acceleration correction value as the gravity acceleration value corresponding to the Tth moment to obtain the corrected gravity acceleration; The first angular velocity includes first angular velocity components in three axes; The calculation formula for updating the angular velocity correction value according to the P first angular velocities collected at the P consecutive target moments includes: Among them, g xi , g yi and g zi is the first angular velocity component of the three axes collected at the i-th target moment in the P consecutive target moments, b x 、b y and b z They are the updated angular velocity correction values ​​corresponding to the three axes respectively; Correspondingly, the second angular velocity includes three axial second angular velocity components; The correcting the second angular velocity according to the updated angular velocity correction value includes: The second angular velocity component of each axial direction collected at the Tth moment is subtracted from the updated angular velocity correction value of the corresponding axial direction to obtain the corrected second angular velocity component of each axial direction.

2. The detection method according to claim 1, characterized in that: The detecting the physical state of the object at the Tth moment according to the corrected second acceleration and second angular velocity comprises: If the first synthetic vector value corresponding to the corrected three-axis second angular velocity components is greater than or equal to a first preset threshold, it is determined that the object is in motion at the Tth moment.

3. The detection method according to claim 2, characterized in that: The detecting the physical state of the object at the Tth moment according to the corrected second acceleration and second angular velocity further includes: If the difference between the second synthetic vector value of the second acceleration of the three axes collected at the Tth time and the corrected gravity acceleration is greater than or equal to the second preset threshold, it is determined that the object is in motion at the Tth time; If the first resultant vector value is smaller than a first preset threshold value, and the difference between the second resultant vector value and the corrected gravity acceleration is smaller than a second preset threshold value, it is determined that the object is stationary at the Tth time.

4. The detection method according to claim 1, characterized in that: Before the Tth moment, detecting whether the object is in a stationary state at each P consecutive moments in chronological order includes: Before the Tth moment, determining the first acceleration variance according to the P first accelerations collected corresponding to each P consecutive moments in chronological order; Before the T-th moment, determining the first angular velocity variance according to the P first angular velocities collected corresponding to each P consecutive moment in chronological order; If the first acceleration variance is smaller than an acceleration reference threshold, and the first angular velocity variance is smaller than an angular velocity reference threshold, it is determined that the object is in a stationary state at the corresponding P consecutive moments.

5. The detection method according to claim 4, characterized in that: The object is provided with an inertial sensor, and the acceleration and angular velocity of the object are collected by the inertial sensor; The angular velocity reference threshold and the acceleration reference threshold are obtained by the following steps: In advance, K inertial sensors are respectively collected M times of acceleration and M times of angular velocity; Determine a first mean of M accelerations of each inertial sensor, and determine a corresponding second acceleration variance according to the first mean and the M accelerations; Determine a second mean of M angular velocities of each inertial sensor, and determine a corresponding second angular velocity variance according to the second mean and the M angular velocities; Calculating and obtaining a first average value of second acceleration variances of the K inertial sensors; Calculating and obtaining a second average value of second angular velocity variances of the K inertial sensors; Determining the acceleration reference threshold value according to the first average value and a first preset margin coefficient; The angular velocity reference threshold is determined according to the second average value and a second preset margin coefficient.

6. A device for detecting the state of an object, applied to the detection method according to any one of claims 1 to 5, characterized in that: include: An updating module, configured to update the correction value according to the first acceleration and the first angular velocity collected corresponding to P consecutive target moments before the Tth moment; wherein the P consecutive target moments are the P consecutive moments that are closest to the Tth moment and the object is in a stationary state, and the Tth moment is the moment at which the state of the object is currently detected; a correction module, configured to correct the second acceleration and the second angular velocity acquired at the Tth moment according to the updated correction value; The detection module is used to detect the physical state of the object at the Tth moment according to the corrected second acceleration and second angular velocity; wherein the physical state includes a motion state and a static state.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.