Equipment control method and device, electronic equipment and storage medium

By using sensors in electronic devices to determine the flight phase and automatically control the operation, the problem of users forgetting to turn on or off the flight mode is solved, improving flight safety and user experience.

CN119472356APending Publication Date: 2025-02-18BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311014686.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-11
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

When riding in an airplane, users are prone to forget to turn on the flight mode before the plane takes off, or fail to turn off the flight mode in time at the end of the flight, which affects flight safety and the normal use of electronic equipment.

Method used

Acquire sensing data through sensors in electronic devices such as acceleration sensors and angular velocity sensors, determine the flight phase of the electronic device, and automatically control the electronic device to perform corresponding operations, such as turning on or off the flight mode.

Benefits of technology

Without manual operation by users, electronic devices can automatically judge the flight stage and perform corresponding operations, improving user experience and flight safety and ensuring the normal operation of electronic devices at different flight stages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119472356A_ABST
    Figure CN119472356A_ABST
Patent Text Reader

Abstract

The invention provides an equipment control method and device, electronic equipment and a storage medium, the method is executed by the electronic equipment, and the method comprises the following steps: obtaining sensing data of the electronic equipment in a moving state according to at least one sensor in the electronic equipment; determining a flight stage of the electronic equipment in the flight process according to the sensing data; and controlling the electronic equipment to execute equipment operation corresponding to the flight stage of the electronic equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic devices, and in particular to a device control method, apparatus, electronic device and storage medium. Background Art

[0002] In the scenario of taking an airplane, in order to ensure the flight safety of the airplane, the user on the airplane is required to switch the working mode of the electronic device to the airplane mode before the airplane takes off. In addition, at the end of the flight, the user is required to turn off the airplane mode to restore the normal operation of the electronic device.

[0003] However, in some cases, users may forget to turn on the flight mode before the plane takes off, thereby affecting the flight safety of the aircraft, or fail to turn off the flight mode in time at the end of the flight, affecting the user's normal use of electronic devices. Summary of the invention

[0004] Embodiments of the present application provide a device control method, apparatus, electronic device, and storage medium.

[0005] According to a first aspect of an embodiment of the present application, a device control method is provided, which is executed by an electronic device, and the method includes:

[0006] Obtaining sensing data of the electronic device in a moving state according to at least one sensor in the electronic device;

[0007] Determining the flight phase of the electronic device during the flight process according to the sensor data;

[0008] The electronic device is controlled to perform a device operation corresponding to the flight phase in which the electronic device is located.

[0009] Optionally, the sensor data includes acceleration data and / or angular velocity data, and determining the flight phase of the electronic device during the flight process according to the sensor data includes:

[0010] Determining a change in the flying altitude of the electronic device during the flight according to the acceleration data and / or angular velocity data of the electronic device during the flight;

[0011] The flight phase of the electronic device is determined based on the change of the flight altitude of the electronic device during the flight.

[0012] Optionally, determining the change of the flying height of the electronic device during the flight according to the acceleration data and / or the angular velocity data of the electronic device during the flight includes:

[0013] Determining the attitude angle of the electronic device during the flight according to the acceleration data and / or angular velocity data of the electronic device during the flight;

[0014] Based on the attitude angle, the change in the flying altitude of the electronic device during the flight is determined.

[0015] Optionally, the attitude angle includes: a pitch angle, a roll angle and / or a heading angle, and determining the change of the flight altitude of the electronic device during the flight based on the attitude angle includes:

[0016] The change of the flying altitude of the electronic device during the flight is determined according to the pitch angle, the roll angle and / or the heading angle of the electronic device during the flight.

[0017] Optionally, the determining the flight phase of the electronic device based on the change of the flight altitude of the electronic device during the flight includes:

[0018] If the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, it is determined that the electronic device is in the first flight stage, wherein the second moment is later than the first moment.

[0019] Optionally, if the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, determining that the electronic device is in the first flight phase includes:

[0020] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the electronic device at the first moment is greater than a first preset value, it is determined that the electronic device is in a climbing phase;

[0021] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude at the first moment is less than or equal to the first preset value, and the electronic device is in an overweight state during the duration from the first moment to the second moment, it is determined that the electronic device is in the take-off stage.

[0022] Optionally, if the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, determining that the electronic device is in the first flight stage further includes:

[0023] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the first moment is less than or equal to the first preset value, and the electronic device is not in an overweight state during at least part of the time from the first moment to the second moment, it is determined that the electronic device is in the cruising stage;

[0024] If the flight altitude of the electronic device at the second moment is equal to the flight altitude at the first moment, it is determined that the electronic device is in the cruising phase.

[0025] Optionally, if the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the electronic device at the first moment is greater than a first preset value, determining that the electronic device is in a climbing phase includes:

[0026] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the first moment is greater than a first preset value, determining whether the change amplitude of the pitch angle, the roll angle and / or the heading angle of the electronic device from the first moment to the second moment is within a corresponding first preset range;

[0027] In response to the change amplitude of the pitch angle, the roll angle and / or the heading angle of the electronic device being within a corresponding first preset range, it is determined that the electronic device is in a climbing phase.

[0028] Optionally, the controlling the electronic device to perform a device operation corresponding to the flight phase in which the electronic device is located includes:

[0029] In response to the electronic device being in the first flight stage, the electronic device is controlled to be in or maintain an airplane mode.

[0030] Optionally, the determining the flight phase of the electronic device based on the change of the flight altitude of the electronic device during the flight includes:

[0031] If the flight altitude of the electronic device at the second moment is lower than the flight altitude at the first moment, it is determined that the electronic device is in the second flight phase.

[0032] Optionally, if the flight altitude of the electronic device at the second moment is lower than the flight altitude at the first moment, determining that the electronic device is in the second flight phase includes:

[0033] When the difference between the flight altitude at the first moment and the flight altitude at the second moment is greater than a second preset value, determining whether the electronic device is in a hovering state;

[0034] In response to the electronic device being in a hovering state, it is determined that the electronic device is in a landing phase.

[0035] Optionally, in response to the electronic device being in a hovering state, determining that the electronic device is in a landing stage includes:

[0036] In response to the electronic device being in a hovering state, determining whether a change amplitude of the pitch angle, the roll angle and / or the heading angle of the electronic device is within a corresponding second preset range;

[0037] If the variation range of the pitch angle, the roll angle and / or the heading angle of the electronic device is within a corresponding second preset range, it is determined that the electronic device is in the landing stage.

[0038] Optionally, if the variation range of the pitch angle, the roll angle and / or the heading angle of the electronic device is within a corresponding second preset range, determining that the electronic device is in a landing stage further includes:

[0039] If the pitch angle, the roll angle and / or the heading angle of the electronic device is within a corresponding second preset range, acquiring acceleration data of the electronic device from the first moment to the second moment;

[0040] Based on the acceleration data, determining whether the electronic device is in a weightless state during a time period from the first moment to the second moment;

[0041] In response to the electronic device being in a weightless state during a time period from the first moment to the second moment, it is determined that the electronic device is in a landing phase.

[0042] Optionally, determining whether the electronic device is in a hovering state includes:

[0043] Acquire the heading angle of the electronic device from the first moment to the second moment;

[0044] Inputting the heading angle into a trained neural network model;

[0045] Based on the output of the neural network model, determine whether the electronic device is in a hovering state from the first moment to the second moment.

[0046] Optionally, the sensing data further includes magnetic field information, and the inputting the heading angle into a trained neural network model includes:

[0047] Acquire magnetic field information around the electronic device from the first moment to the second moment;

[0048] Based on the magnetic field information, correcting the heading angle;

[0049] The corrected heading angle is input into the neural network model.

[0050] Optionally, the method further comprises:

[0051] In response to the electronic device not being in the hovering state from the first moment to the second moment, adjusting the second preset range;

[0052] After adjusting the second preset range, return to the step of determining whether the change amplitude of the pitch angle, the roll angle and / or the heading angle of the electronic device is within the corresponding second preset range.

[0053] Optionally, obtaining sensor data of the electronic device in a moving state according to at least one sensor in the electronic device includes:

[0054] Acquiring the network status of the electronic device;

[0055] When it is determined based on the network status that the electronic device is not connected to the network, sensing data of the electronic device in a mobile state is obtained according to at least one sensor in the electronic device.

[0056] Optionally, the controlling the electronic device to perform a device operation corresponding to the flight phase in which the electronic device is located includes:

[0057] In response to the electronic device being in the second flight phase, the electronic device is controlled to start a network connection operation.

[0058] According to a second aspect of the present application, there is provided a device control apparatus, the device comprising:

[0059] A sensor module, used for obtaining sensor data of the electronic device in a moving state according to at least one sensor in the electronic device;

[0060] A determination module, used to determine the flight phase of the electronic device during the flight process according to the sensing data;

[0061] The first execution module is used to control the electronic device to execute a device operation corresponding to the flight phase of the electronic device.

[0062] Optionally, the sensing data includes acceleration data and / or angular velocity data, and the determining module is used to:

[0063] Determining a change in the flying altitude of the electronic device during the flight according to the acceleration data and / or angular velocity data of the electronic device during the flight;

[0064] The flight phase of the electronic device is determined based on the change of the flight altitude of the electronic device during the flight.

[0065] Optionally, the determining module is used to:

[0066] Determining the attitude angle of the electronic device during the flight according to the acceleration data and / or angular velocity data of the electronic device during the flight;

[0067] Based on the attitude angle, the change in the flying altitude of the electronic device during the flight is determined.

[0068] Optionally, the attitude angle includes: a pitch angle, a roll angle and / or a heading angle, and the determination module is specifically used to:

[0069] The change of the flying altitude of the electronic device during the flight is determined according to the pitch angle, the roll angle and / or the heading angle of the electronic device during the flight.

[0070] Optionally, the determining module is further used to:

[0071] If the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, it is determined that the electronic device is in the first flight stage, wherein the second moment is later than the first moment.

[0072] If the flight altitude of the electronic device at the second moment is lower than the flight altitude at the first moment, it is determined that the electronic device is in the second flight phase.

[0073] Optionally, the determining module is further used to:

[0074] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the electronic device at the first moment is greater than a first preset value, it is determined that the electronic device is in a climbing phase;

[0075] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude at the first moment is less than or equal to the first preset value, and the electronic device is in an overweight state during the duration from the first moment to the second moment, it is determined that the electronic device is in the take-off stage.

[0076] Optionally, the determining module is further used to:

[0077] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the first moment is less than or equal to the first preset value, and the electronic device is not in an overweight state during at least part of the time from the first moment to the second moment, it is determined that the electronic device is in the cruising stage;

[0078] If the flight altitude of the electronic device at the second moment is equal to the flight altitude at the first moment, it is determined that the electronic device is in the cruising phase.

[0079] Optionally, the determining module is further used to:

[0080] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the first moment is greater than a first preset value, determining whether the change amplitude of the pitch angle, the roll angle and / or the heading angle of the electronic device from the first moment to the second moment is within a corresponding first preset range;

[0081] In response to the change amplitude of the pitch angle, the roll angle and / or the heading angle of the electronic device being within a corresponding first preset range, it is determined that the electronic device is in a climbing phase.

[0082] Optionally, the first execution module is used to:

[0083] In response to the electronic device being in the first flight stage, the electronic device is controlled to be in or maintain an airplane mode.

[0084] Optionally, the determining module is further used to:

[0085] If the flight altitude of the electronic device at the second moment is lower than the flight altitude at the first moment, it is determined that the electronic device is in the second flight phase.

[0086] Optionally, the determining module is further used to:

[0087] When the difference between the flight altitude at the first moment and the flight altitude at the second moment is greater than a second preset value, determining whether the electronic device is in a hovering state;

[0088] In response to the electronic device being in a hovering state, it is determined that the electronic device is in a landing phase.

[0089] Optionally, the determining module is further used to:

[0090] In response to the electronic device being in a hovering state, determining whether a change amplitude of the pitch angle, the roll angle and / or the heading angle of the electronic device is within a corresponding second preset range;

[0091] If the variation range of the pitch angle, the roll angle and / or the heading angle of the electronic device is within a corresponding second preset range, it is determined that the electronic device is in the landing stage.

[0092] Optionally, the determining module is further used to:

[0093] If the pitch angle, the roll angle and / or the heading angle of the electronic device is within a corresponding second preset range, acquiring acceleration data of the electronic device from the first moment to the second moment;

[0094] Based on the acceleration data, determining whether the electronic device is in a weightless state during a time period from the first moment to the second moment;

[0095] In response to the electronic device being in a weightless state during a time period from the first moment to the second moment, it is determined that the electronic device is in a landing phase.

[0096] Optionally, the determining module is further used to:

[0097] Acquire the heading angle of the electronic device from the first moment to the second moment;

[0098] Inputting the heading angle into a trained neural network model;

[0099] Based on the output of the neural network model, determine whether the electronic device is in a hovering state from the first moment to the second moment.

[0100] Optionally, the sensing data further includes magnetic field information, and the determining module is further used to:

[0101] Acquire magnetic field information around the electronic device from the first moment to the second moment;

[0102] Based on the magnetic field information, correcting the heading angle;

[0103] The corrected heading angle is input into the neural network model.

[0104] Optionally, the device further comprises:

[0105] an adjusting module, configured to adjust the second preset range in response to the electronic device not being in a hovering state from the first moment to the second moment;

[0106] The second execution module is configured to return to the step of determining whether the change amplitude of the pitch angle, the roll angle and / or the heading angle of the electronic device is within the corresponding second preset range after adjusting the second preset range.

[0107] Optionally, the sensor module is used to:

[0108] Acquiring the network status of the electronic device;

[0109] When it is determined based on the network status that the electronic device is not connected to the network, sensing data of the electronic device in a mobile state is obtained according to at least one sensor in the electronic device.

[0110] Optionally, the first execution module is further used to:

[0111] In response to the electronic device being in the second flight phase, the electronic device is controlled to start a network connection operation.

[0112] According to a third aspect of the present application, an electronic device is provided, including:

[0113] a memory for storing processor-executable instructions;

[0114] A processor connected to the memory;

[0115] Wherein, the processor is used to execute the device control method as described above.

[0116] In a fourth aspect of an embodiment of the present application, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a computer, the computer is enabled to execute the above-mentioned device control method.

[0117] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0118] In the embodiment of the present application, considering that when a user is on an airplane, the electronic device carried by the user will take off with the airplane and land with the airplane, therefore, the flight phase of the electronic device can be judged by the sensor in the electronic device, and then the flight phase of the airplane can be determined, so that the electronic device can determine the current flight phase of the airplane without the need for additional information input, and automatically perform corresponding operations based on the flight phase of the airplane without the need for manual operation by the user, thereby improving the user experience.

[0119] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0120] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0121] Figure 1 is a flow chart of a device control method according to an exemplary embodiment;

[0122] Figure 2 is a schematic diagram showing a pitch angle, a roll angle and a heading angle of an aircraft according to an exemplary embodiment;

[0123] Figure 3 is a flight requirement of a different type of flying device according to an exemplary embodiment;

[0124] Figure 4is a schematic diagram of a flight route of a different type of flying device according to an exemplary embodiment;

[0125] Figure 5 is a schematic diagram showing a five-side take-off and landing process of a flying device according to an exemplary embodiment;

[0126] Figure 6 is a flow chart of a method for determining an attitude angle according to an exemplary embodiment;

[0127] Figure 7 is a schematic diagram of a flow chart of determining a flight phase of an electronic device according to an exemplary embodiment;

[0128] Figure 8 is a schematic diagram of a flow chart of determining a flight phase of an electronic device according to another exemplary embodiment;

[0129] Fig. 9 is a schematic diagram of a flow chart of determining a hovering state according to another exemplary embodiment;

[0130] Fig.10 is a schematic diagram of a flow chart of determining a flight phase of an electronic device according to another exemplary embodiment;

[0131] Fig.11 is a schematic structural diagram of a device control apparatus according to an exemplary embodiment;

[0132] Fig.12 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0133] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.

[0134] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0135] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at..." or "when..." or "in response to determination".

[0136] refer to Figure 1 , Figure 1 A flow chart of a device control method is provided, which is executed by an electronic device. The charging method includes:

[0137] S101: obtaining, according to at least one sensor in the electronic device, sensor data transmitted by the electronic device in a moving state;

[0138] S102: Determine the flight phase of the electronic device during the flight process according to the sensor data;

[0139] S103: Control the electronic device to perform a device operation corresponding to the flight phase in which the electronic device is located.

[0140] The electronic device mentioned above may be an electronic device having a sensor.

[0141] Exemplarily, the above-mentioned electronic device may be a communication device such as a mobile phone, a tablet computer, and a phone watch having a sensor.

[0142] Exemplarily, the sensor on the electronic device includes at least one of an acceleration sensor, a gyroscope sensor and a geomagnetic sensor.

[0143] Exemplarily, the above-mentioned sensors may include but are not limited to inertial sensors.

[0144] The above-mentioned sensor data includes at least one of the following:

[0145] Based on the acceleration sensor sensing the movement state of the electronic device, the acceleration data of the electronic device in various directions is obtained;

[0146] Based on the gyro sensor sensing the movement state of the electronic device, the angular velocity data of the electronic device in various directions is obtained;

[0147] The magnetic field information around the electronic device is obtained based on the geomagnetic sensor sensing the movement state of the electronic device.

[0148] The above directions include at least a z-axis direction, a y-axis direction and a z-axis direction.

[0149] For example, when the electronic device is located in the flying device, the x-axis direction, y-axis direction, and z-axis direction of the electronic device may refer to Figure 2 The z-axis direction, y-axis direction and z-axis direction of the aircraft.

[0150] It should be noted that Figure 2 The x-axis direction and the y-axis direction shown in the figure are positive directions, and the z-axis direction is a negative direction.

[0151] If the electronic device is located in a flying device, the electronic device will obtain different sensing data when the flying device is in different flight phases. Therefore, the flight phase of the flying device where the electronic device is located can be determined based on the sensing data of the electronic device.

[0152] Among them, the flying devices in the embodiments of the present application may include various types of manned aircraft or transport aircraft, etc.

[0153] refer to Figures 3 to 5 , Figure 3 Flight requirements for a different type of flying device are provided. Figure 4 A schematic diagram of the flight routes of different types of flying devices is provided. Figure 5 A schematic diagram of the five-sided takeoff and landing process of a flying device is provided.

[0154] Figure 5 The middle side refers to the take-off edge; the second side refers to the crosswind side, which is 90 degrees to the runway; the third side refers to the leeward side, which is parallel to the take-off direction of the runway; the fourth side refers to the bottom side, which is perpendicular to the runway and where landing preparations begin; the fifth side refers to the fifth side, the approach edge, which is in the same direction as the take-off direction and where landing braking is performed.

[0155] The flight phase in the embodiment of the present application includes: at least one of a take-off phase, a climb phase, a cruise phase and a landing phase.

[0156] In the embodiment of the present application, considering that when a user is on an airplane, the electronic device carried by the user will take off with the airplane and land with the airplane, therefore, the flight phase of the electronic device can be judged by the sensor in the electronic device, and then the flight phase of the airplane can be determined, so that the electronic device can determine the current flight phase of the airplane without the need for additional information input, and automatically perform corresponding operations based on the flight phase of the airplane without the need for manual operation by the user, thereby improving the user experience.

[0157] In one embodiment, the sensor data includes acceleration data and / or angular velocity data, and determining the flight phase of the electronic device during the flight process according to the sensor data includes:

[0158] Determine the change of the flying altitude of the electronic device during the flight according to the acceleration data and / or angular velocity data of the electronic device during the flight;

[0159] The flight phase of the electronic device is determined based on the change of the flight altitude of the electronic device during the flight.

[0160] Exemplarily, considering that the acceleration data and / or angular velocity data of the electronic device in different flight phases are different, the acceleration data and / or angular velocity data of the electronic device in a period of time before the current moment can be obtained through the acceleration sensor and / or angular velocity sensor in the electronic device, and based on the acceleration data and angular velocity data of the electronic device in the period of time before the current moment, the change in the flight altitude of the electronic device in the period of time before the current moment can be determined.

[0161] If it is determined that the flying altitude of the electronic device is increasing over a period of time, it is determined that the electronic device is in the take-off phase or the climbing phase. If it is determined that the flying altitude of the electronic device is unchanged over a period of time, or the altitude change is small, it is determined that the electronic device is in the cruising phase.

[0162] If it is determined based on the acceleration data and / or angular velocity data of the electronic device in a period of time before the current moment that the flying altitude of the electronic device in a period of time before the current moment is decreasing, it is determined that the electronic device is in a landing state.

[0163] Exemplarily, the speed of the electronic device in the positive z direction can also be determined based on the acceleration data of the electronic device over a period of time before the current moment. When the speed of the electronic device in the positive z direction is a positive value, it indicates that the speed of the electronic device relative to the ground is continuously increasing. At this time, it can be determined that the electronic device is currently in the take-off stage or the climbing stage.

[0164] When the speed of the electronic device in the positive z direction is negative within a period of time before the current moment, it indicates that the height of the electronic device relative to the ground is decreasing. At this time, it can be determined that the electronic device is in a descending stage.

[0165] For example, if it is determined based on the angular velocity data of the electronic device that the plane where the electronic device is located is tilted along the positive x direction and toward the positive z direction during a period of time before the current moment, it is indicated that the electronic device is in the take-off phase or the climbing phase. If it is determined based on the angular velocity data of the electronic device during a period of time before the current moment that the plane where the electronic device is located is a horizontal plane, it is indicated that the electronic device is in the cruising phase. If it is determined based on the angular velocity data of the electronic device during a period of time before the current moment that the plane where the electronic device is located is tilted along the positive x direction and toward the negative z direction, it is determined that the electronic device is in the landing phase.

[0166] Among them, based on the acceleration data and / or angular velocity data of the electronic device over a period of time, the implementation method of determining the flight altitude of the electronic device over a period of time can refer to the inertial navigation algorithm in the relevant technology, or can be implemented by other feasible methods, which is not limited in the embodiments of the present application.

[0167] For example, the flying height of the electronic device can be calculated based on the acceleration data and / or angular velocity data of the electronic device over a period of time using the following formulas (1) to (4).

[0168]

[0169] Where Δv t is the speed increment of the electronic device from time t-1 to time t, Δv t-1 is the velocity increment from time t-2 to time t-1, which can be calculated by the following formula (2). Δθ(t) is the angular velocity increment from time t-1 to time t, which can be calculated by the following formula (3).

[0170]

[0171] Wherein, f(t) is the acceleration data output by the acceleration sensor at time t.

[0172]

[0173] Wherein, ω(t) is the angular velocity data output by the gyroscope sensor at time t.

[0174] Exemplarily, the flying height of the electronic device at time t can be calculated by the following formula (4).

[0175]

[0176] Among them, h t is the height of the electronic device at time t, h t-1 is the height of the electronic device at time t-1, v t-1 is the speed of the electronic device at time t-1, v t is the speed of the electronic device at time t, v t =v t-1 +Δv t , Δt is the duration from time t-1 to time t.

[0177] In the embodiment of the present application, considering that the flight altitude of the electronic device changes differently in different flight stages, the acceleration sensor and / or angular velocity sensor in the electronic device can sense the movement state of the electronic device to obtain the acceleration data and / or angular velocity data of the electronic device in a period of time before the current moment. Based on the acceleration data and angular velocity data of the electronic device in a period of time before the current moment, the change of the flight altitude of the electronic device is determined, and then based on the change of the flight altitude of the electronic device in a period of time before the current moment, the flight stage of the electronic device is determined. In this way, the flight stage of the electronic device can be determined without additional input, which improves the convenience of determining the flight stage of the electronic device.

[0178] In one embodiment, determining a change in the flying height of the electronic device during the flight according to acceleration data and / or angular velocity data of the electronic device during the flight includes:

[0179] Determining the attitude angle of the electronic device during the flight according to the acceleration data and / or angular velocity data of the electronic device during the flight;

[0180] Based on the attitude angle, the change in the flying altitude of the electronic device during the flight is determined.

[0181] For example, considering that the attitude angle of the flying device will change during the flight of the flying device, and the attitude angle of the flying device is different in different flight stages, based on this, the attitude angle of the electronic equipment located in the flying device will also change according to the change of the attitude angle of the flying device.

[0182] Therefore, the attitude angle of the electronic device during flight can be determined based on the acceleration data and / or angular velocity data of the electronic device during flight, and the change in the flying altitude of the electronic device can be determined based on the attitude angle of the electronic device over a period of time at the current moment.

[0183] The above-mentioned attitude angle can be represented in a variety of ways. For example, the attitude angle of the electronic device can be represented by a pitch angle, a heading angle and / or a roll angle, or by a quaternion.

[0184] For example, the specific directions of the pitch angle, roll angle and / or heading angle of the electronic device during flight can refer to Figure 2 The pitch angle, roll angle and heading angle of the aircraft in.

[0185] The pitch angle is the angle between the positive direction of the carrier's longitudinal axis and its horizontal projection line. It is defined as positive when the carrier (flying device) raises its head, and its value range is -90° to 90°.

[0186] The roll angle is the angle between the vertical axis of the carrier and the vertical plane of the longitudinal axis of the carrier. It is positive when the carrier tilts to the right, such as when the right wing of the flying device is pressed down. The value range is -180° to 180°.

[0187] The heading angle is the angle between the projection of the positive direction of the carrier's longitudinal axis on the local horizontal plane and the local geographic north, with north-east being positive; the value range is -180° to 180°.

[0188] Exemplarily, when the attitude angle of the electronic device is a pitch angle, a roll angle and / or a heading angle, the pitch angle, the roll angle and / or the heading angle of the electronic device in a period of time before the current moment can be determined through Kalman filtering based on the acceleration data and the angular velocity data of the electronic device in various directions. The pitch angle, the roll angle and / or the heading angle of the electronic device in a period of time before the current moment can also be calculated based on the acceleration data and the angular velocity data of the electronic device in other achievable directions. The embodiments of the present application are not limited to this.

[0189] For example, reference Figure 6 The implementation process of determining the pitch angle, roll angle and / or heading angle of an electronic device based on Kalman filtering can be referred to Figure 6 First, through the gyroscope sensor in the electronic device ( Figure 6 The gyroscope in the electronic device) obtains the angular velocity data of the electronic device from the first moment to the second moment, and the acceleration sensor ( Figure 6 The accelerometer in the electronic device) obtains the acceleration data of the electronic device from the first moment to the second moment, and the geomagnetic sensor ( Figure 6 The magnetometer in the apparatus) obtains the magnetic field information sensed by the electronic device from the first moment to the second moment.

[0190] Afterwards, the attitude angle of the electronic device from the first moment to the second moment is estimated based on the acquired angular velocity data, that is, the pitch angle, roll angle and / or heading angle. Afterwards, the estimated pitch angle and roll angle of the electronic device are corrected based on the acceleration data acquired by the acceleration sensor (accelerometer), and the estimated heading angle of the electronic device is corrected through the acquired magnetic field information, thereby obtaining the pitch angle, roll angle and heading angle of the electronic device from the first moment to the second moment after correction.

[0191] The second moment mentioned above is the current moment, and the first moment is the historical moment before the second moment.

[0192] The pitch angle, roll angle and / or heading angle of the electronic device can be determined based on the angular velocity data obtained by the gyroscope sensor in the electronic device, the acceleration data obtained by the acceleration sensor, and the geomagnetic information obtained by the geomagnetic sensor through the following formulas (5) to (20).

[0193]

[0194] in, and is the estimated value of the quaternion at time t, q w ,q x ,q y and q z is the quaternion at time t-1, w x 、w y and w z is the angular velocity data obtained by the gyroscope sensor, and Δt is the sampling time interval of the gyroscope, that is, the time interval between two consecutive acquisitions of angular velocity data by the gyroscope.

[0195] Of course, the above is only an example of determining the pitch angle, roll angle and / or heading angle of the electronic device, and the specific implementation is not limited to this example.

[0196] The quaternion is converted into an attitude angle represented by a pitch angle, a roll angle and / or a heading angle by performing an inverse conversion using the following formulas (6) to (20).

[0197]

[0198] Among them, q t is the quaternion at time t, is the heading angle, θ is the pitch angle, φ is the roll angle

[0199]

[0200] Among them, q t is the quaternion at time t, K t is the Kalman gain coefficient, K t It can be obtained by the following formula (8), v t It can be obtained by the following formula (18).

[0201]

[0202] in, It can be obtained by the following formula (9): It can be obtained by the following formula (13): It can be obtained by the following formula (16).

[0203]

[0204] in, is the error matrix at time t, F(q t-1 , w t ) can be obtained by the following formula (10), P t-1is the error matrix at time t-1, It can be obtained by the following formula (11), W t and W t T It can be obtained by the following formula (12).

[0205]

[0206]

[0207] Among them, σ wx is the noise level of the gyroscope in the x-axis direction, σ wy is the noise level of the gyroscope in the x-axis direction, σ wz is the noise level of the gyroscope in the z-axis direction.

[0208]

[0209]

[0210] Among them, g x , g y and g z It can be obtained by the following formula (14), r x 、r y and r z It can be obtained by the following formula (15).

[0211]

[0212] Among them, the Northeast Earth Coordinate System (NEN) refers to the x-axis, y-axis, and z-axis being collinear with the geographic directions North, East, and Down, respectively. The Northeast Celestial Coordinate System (ENU) indicates that the z-axis, y-axis, and z-axis are collinear with the North, East, and Up directions, respectively.

[0213]

[0214]

[0215] Here, R can be obtained by the following formula (17).

[0216]

[0217] Among them, σ a is the noise level of the acceleration sensor on the x-axis, y-axis, and z-axis, σ m is the noise level of the acceleration sensor on the x-axis, y-axis and z-axis, and I is a third-order unit matrix.

[0218]

[0219] Among them, z t is the acceleration data and magnetic field information at time t, which can be obtained by the following formula (19): It can be obtained by the following formula (20).

[0220]

[0221] Among them, a x The acceleration data in the x-axis direction obtained by the acceleration sensor in the electronic device, a y The acceleration data in the y-axis direction obtained by the acceleration sensor in the electronic device, a z The acceleration data in the z-axis direction obtained by the acceleration sensor in the electronic device, m x The magnetic field information in the x-axis direction obtained by the geomagnetic sensor in the electronic device, m y The magnetic field information in the y-axis direction obtained by the geomagnetic sensor in the electronic device, m z The geomagnetic sensor in the electronic device obtains the magnetic field information in the z-axis direction.

[0222]

[0223] After obtaining the pitch angle, roll angle and / or lateral angle of the electronic device during flight, the flight altitude change of the electronic device can be determined based on the pitch angle, roll angle and / or heading angle of the electronic device during flight.

[0224] Among them, the implementation method of determining the flight altitude of the electronic device based on the pitch angle, roll angle and / or heading angle of the electronic device within a period of time before the current moment can refer to the relevant technology, and the embodiments of the present application will not be repeated here.

[0225] In one embodiment, determining the flight phase of the electronic device based on the change of the flight altitude of the electronic device during the flight process includes:

[0226] If the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, it is determined that the electronic device is in the first flight stage, wherein the second moment is later than the first moment.

[0227] In the embodiment of the present application, it is considered that the flying height and the change of the flying height of the flying device at different flight stages are different, which leads to the flying height and the change of the flying height of the electronic device in the flying device at different stages. Therefore, the flight stage of the electronic device can also be determined based on the change of the current flying height of the electronic device relative to the flying height at the previous moment.

[0228] Exemplarily, the above-mentioned first stage may be a take-off stage, a climbing stage or a cruising stage.

[0229] When the flight altitude of the electronic device at the second moment is lower than the flight altitude at the first moment, it indicates that the flight altitude of the electronic device is increasing, and thus it is determined that the electronic device is in the take-off stage or the climbing stage.

[0230] When the flight altitude of the electronic device at the second moment is equal to the flight altitude at the first moment, it indicates that the flight altitude of the electronic device from the first moment to the second moment remains unchanged, or the change in the flight altitude is small. At this time, it is determined that the electronic device is in the cruising stage.

[0231] The duration from the first moment to the second moment mentioned above can be set as needed, for example, any value from 10s to 60s, which is not limited in the embodiment of the present application.

[0232] In one embodiment, if the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, determining that the electronic device is in the first flight stage includes:

[0233] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the electronic device at the first moment is greater than a first preset value, it is determined that the electronic device is in a climbing phase;

[0234] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude at the first moment is less than or equal to the first preset value, and the electronic device is in an overweight state during the duration from the first moment to the second moment, it is determined that the electronic device is in the take-off stage.

[0235] In the embodiment of the present application, considering that the flight speeds of the aircraft device in the take-off phase, the climb phase and the cruise phase are different, which leads to different flight altitudes of the electronic device in the same time. Therefore, it is also possible to determine whether the electronic device is currently in the take-off phase, the climb phase and the cruise phase based on the height change amplitude of the electronic device from the first moment to the second moment.

[0236] Exemplarily, based on an acceleration sensor and a gyroscope sensor in the electronic device, acceleration data and angular velocity data of the electronic device from a first moment to a second moment can be obtained, and based on the acceleration data and angular velocity data of the electronic device from the first moment to the second moment, the pitch angle, roll angle and heading angle of the electronic device from the first moment to the second moment can be determined.

[0237] If, based on the pitch angle, roll angle and heading angle of the electronic device from the first moment to the second moment, it is determined that the difference between the flight altitude of the electronic device at the second moment and the flight altitude at the first moment is greater than a first preset value, it means that the speed of the electronic device in the positive z direction is large and the electronic device is rising rapidly. At this time, it can be determined that the electronic device is in the climbing stage.

[0238] When it is determined based on the pitch angle, roll angle and heading angle of the electronic device from the first moment to the second moment that the difference between the flight altitude of the electronic device at the second moment and the flight altitude at the first moment is less than or equal to the first preset value, it indicates that the electronic device is slowly ascending. At this time, the acceleration data of the electronic device from the first moment to the second moment can be further obtained, and based on the acceleration data of the electronic device from the first moment to the second moment, it is determined whether the electronic device is in an overweight state from the first moment to the second moment.

[0239] If the electronic device is in an overweight state during the time period from the first moment to the second moment, it can be determined that the electronic device is in the take-off stage.

[0240] Among them, the above-mentioned first preset value can be set as needed, and the embodiment of the present application does not limit this.

[0241] For example, if the electronic device is located in a flying device, taking into account that different types of flying devices have different take-off speeds and climbing speeds, the size of the first preset value may also be determined according to the type of the flying device.

[0242] In one embodiment, if the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, determining that the electronic device is in the first flight stage further includes:

[0243] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the first moment is less than or equal to the first preset value, and the electronic device is not in an overweight state during at least part of the time from the first moment to the second moment, it is determined that the electronic device is in the cruising stage;

[0244] If the flight altitude of the electronic device at the second moment is equal to the flight altitude at the first moment, it is determined that the electronic device is in the cruising phase.

[0245] Exemplarily, considering that the flying device may also experience altitude fluctuations during the cruising phase, which in turn causes the altitude of the electronic equipment located in the flying device to fluctuate, it is also possible to obtain acceleration data of the electronic device from the first moment to the second moment when it is determined that the difference between the flying altitude of the electronic device at the second moment and the flying altitude at the first moment is less than or equal to a first preset value, and determine that the electronic device is in the cruising phase when it is determined based on the acceleration data of the electronic device from the first moment to the second moment that the electronic device is not in an overweight state during at least part of the time from the first moment to the second moment.

[0246] Exemplarily, when the flight altitude of the electronic device at the second moment is equal to or lower than the flight altitude at the first moment, it is also determined that the electronic device is in the cruising phase.

[0247] In one embodiment, if the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the electronic device at the first moment is greater than a first preset value, determining that the electronic device is in a climbing phase includes:

[0248] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the electronic device at the first moment is greater than a first preset value, determining whether the change amplitude of the pitch angle, roll angle and / or heading angle of the electronic device from the first moment to the second moment is within a corresponding first preset range;

[0249] In response to the change amplitude of the pitch angle, roll angle and / or heading angle of the electronic device being within the corresponding first preset range, it is determined that the electronic device is in a climbing stage.

[0250] For example, considering that the flight stage of the electronic device can indicate the flight stage of the flight device where the electronic device is located to a certain extent, since the electronic device is controlled by the user, if the acceleration data and angular velocity data collected by the electronic device are abnormal due to the user's operation of the electronic device from the first moment to the second moment, therefore, in order to further improve the accuracy of the judgment, when it is determined that the difference between the flight altitude of the electronic device at the second moment and the flight altitude at the first moment is greater than the first preset value, the change amplitude of the pitch angle, roll angle and heading angle of the electronic device from the first moment to the second moment can be further determined.

[0251] When the variation range of the pitch angle, roll angle and heading angle of the electronic device from the first moment to the second moment is greater than the corresponding first preset range, it is determined that the electronic device is in the climbing stage.

[0252] The variation range of the pitch angle, roll angle and heading angle of the electronic device from the first moment to the second moment is within the corresponding preset range, which includes:

[0253] The maximum pitch angle and the minimum pitch angle, the maximum roll angle and the minimum roll angle, and the maximum heading angle and the minimum heading angle of the electronic device from the first moment to the second moment meet a first preset condition;

[0254] and / or,

[0255] The change slopes of the pitch angle, roll angle and heading angle of the electronic device from the first moment to the second moment meet the second preset condition.

[0256] The maximum pitch angle and the minimum pitch angle, the maximum roll angle and the minimum roll angle, and the maximum heading angle and the minimum heading angle of the electronic device from the first moment to the second moment meet the first preset condition, including:

[0257] The difference between the maximum pitch angle and the minimum pitch angle is less than a preset pitch angle value, the difference between the maximum roll angle and the minimum roll angle is less than a preset roll angle value, and / or the difference between the maximum heading angle and the minimum heading angle is less than a preset heading angle value.

[0258] The change slopes of the pitch angle, roll angle, and heading angle of the electronic device from the first moment to the second moment meet the second preset condition, including at least one of the following:

[0259] The change slope of the pitch angle of the electronic device from the first moment to the second moment is greater than the first slope;

[0260] The change slope of the roll angle of the electronic device from the first moment to the second moment is greater than the second slope;

[0261] The change slope of the heading angle of the electronic device from the first moment to the second moment is greater than the third slope.

[0262] Exemplarily, since multiple acceleration data and angular velocity data of the electronic device can be obtained from the first moment to the second moment, multiple pitch angle data can be obtained based on the multiple acceleration data and multiple angular velocity data. After the pitch angle data obtained by the electronic device from the first moment to the second moment is obtained, a scatter plot can be made through the multiple pitch angle data to obtain the change slope of the pitch angle from the first moment to the second moment. The change slope of the pitch angle of the electronic device from the first moment to the second moment can also be obtained by other methods, which is not limited in the embodiments of the present application.

[0263] The method for obtaining the change slope of the roll angle and the heading angle of the electronic device can refer to the method for obtaining the change slope of the pitch angle mentioned above, and the embodiments of the present application will not be repeated here.

[0264] The sizes of the above-mentioned preset pitch angle, preset roll angle, preset heading angle, first slope, second slope and third slope can be set as needed, and the embodiments of the present application are not limited to this.

[0265] When the electronic device is located in the flying device, the sizes of the preset pitch angle, the preset roll angle, the preset heading angle, the first slope, the second slope and the third slope can be set according to the type of the flying device.

[0266] In one embodiment, controlling the electronic device to perform a device operation corresponding to the flight phase in which the electronic device is located includes:

[0267] In response to the electronic device being in the first flight stage, the electronic device is controlled to be in or maintain the flight mode.

[0268] Exemplarily, when it is determined based on the above method that an electronic device is in the take-off phase, the climb phase or the cruise phase, it means that the flying device where the electronic device is located is currently in the take-off phase, the climb phase or the cruise phase. At this time, the electronic device can be controlled to enter the flight mode to reduce the interference of the signal of the electronic device to the flight safety of the flying device.

[0269] In one embodiment, determining the flight phase of the electronic device based on the change of the flight altitude of the electronic device during the flight process includes:

[0270] If the flight altitude of the electronic device at the second moment is lower than the flight altitude at the first moment, it is determined that the electronic device is in the second flight stage.

[0271] Exemplarily, the second stage mentioned above may be a hovering landing stage or a direct landing stage.

[0272] When the flying height of the electronic device at the second moment is lower than the flying height at the first moment, it indicates that the flying height of the electronic device is continuously decreasing, and thus it is determined that the electronic device is in the landing stage.

[0273] In one embodiment, if the flight altitude of the electronic device at the second moment is lower than the flight altitude at the first moment, determining that the electronic device is in the second flight stage includes:

[0274] When the difference between the flight altitude at the first moment and the flight altitude at the second moment is greater than a second preset value, determining whether the electronic device is in a hovering state;

[0275] In response to the electronic device being in a hovering state, it is determined that the electronic device is in a landing phase.

[0276] For example, considering that the flying height of the flying device will drop rapidly during the descent process, the height of the electronic device inside the flying device will also drop rapidly. Therefore, when the difference between the flying height of the electronic device at the first moment and the flying height at the second moment is greater than the second preset value, it means that the flying height of the electronic device is dropping rapidly, and at this time, it can be determined that the electronic device is in the landing stage.

[0277] However, considering that the flying device may also experience a sudden drop due to a sudden change in the environment during the cruising phase, in order to improve the accuracy of the judgment, when it is determined that the difference between the flight altitude of the electronic device at the first moment and the flight altitude at the second moment is greater than a second preset value, it is determined whether the electronic device is in a hovering state based on the heading angle of the electronic device from the first moment to the second moment; when the electronic device is in a hovering state, it is determined that the electronic device is in a descending phase.

[0278] Among them, the setting method of the second preset value in the embodiment of the present application can refer to the setting method of the first preset value mentioned above, and the embodiment of the present application will not be repeated here.

[0279] In one embodiment, in response to the electronic device being in a hovering state, determining that the electronic device is in a landing phase includes:

[0280] In response to the electronic device being in a hovering state, determining whether a change amplitude of a pitch angle, a roll angle, and / or a heading angle of the electronic device is within a corresponding second preset range;

[0281] If the variation range of the pitch angle, the roll angle and / or the heading angle of the electronic device is within the corresponding second preset range, it is determined that the electronic device is in the landing stage.

[0282] For example, considering that the pitch angle, roll angle and heading angle of the flying device when landing are different from the pitch angle, roll angle and heading angle of the flying device during the climbing process, the pitch angle, roll angle and heading angle of the electronic device in the flying device are also different during the climbing stage and the landing stage. Therefore, in order to further improve the accuracy of flight stage judgment, when determining that the electronic device is in a hovering state based on the pitch angle, roll angle and heading angle of the electronic device from the first moment to the second moment, the change amplitude of the pitch angle, roll angle and / or heading angle of the electronic device from the first moment to the second moment can also be obtained.

[0283] If the variation range of the pitch angle, the roll angle and / or the heading angle of the electronic device from the first moment to the second moment is within the corresponding second preset range, it is determined that the electronic device is in the landing stage.

[0284] Among them, the implementation method of determining whether the electronic device is in a hovering state based on the pitch angle, roll angle and / or heading angle of the electronic device from the first moment to the second moment can refer to the relevant technology, and the embodiments of the present application will not be repeated here.

[0285] Among them, the implementation method of determining whether the change amplitude of the pitch angle, roll angle and / or heading angle of the electronic device from the first moment to the second moment is within the second preset range can refer to the above-mentioned implementation method of determining whether the pitch angle, roll angle and / or heading angle of the electronic device from the first moment to the second moment is within the first preset range, and the embodiments of the present application will not be repeated here.

[0286] In one embodiment, if the variation range of the pitch angle, the roll angle and / or the heading angle of the electronic device is within the corresponding second preset range, it is determined that the electronic device is in the landing stage, further comprising:

[0287] If the pitch angle, roll angle and / or heading angle of the electronic device are within the corresponding second preset range, acquiring acceleration data of the electronic device from the first moment to the second moment;

[0288] Based on the acceleration data, determining whether the electronic device is in a weightless state during a duration from the first moment to the second moment;

[0289] In response to the electronic device being in a weightless state during a time period from the first moment to the second moment, it is determined that the electronic device is in a landing phase.

[0290] Exemplarily, it is also considered that the flying device is usually in a weightless state during the landing process, based on which the electronic equipment located in the flying device will also be in a weightless state. Therefore, when it is determined that the change amplitude of the pitch angle, roll angle and / or heading angle of the electronic device from the first moment to the second moment is within the corresponding second preset range, the acceleration data of the electronic device from the first moment to the second moment can be obtained based on the acceleration sensor in the electronic device, and based on the acceleration data of the electronic device from the first moment to the second moment, it is determined whether the electronic device is in a weightless state from the first moment to the second moment. If the electronic device is in a weightless state from the first moment to the second moment, it is determined that the flying device where the electronic device is located is rapidly landing, and at this time, it can be determined that the electronic device is in a landing state.

[0291] If it is determined based on the acceleration data of the electronic device from the first moment to the second moment that the electronic device is not in a weightless state during at least a partial time period from the first moment to the second moment, then it means that the electronic device may have suddenly dropped during the cruising phase, and it can be determined that the electronic device is not in a landing state.

[0292] In one embodiment, determining whether the electronic device is in a hovering state includes:

[0293] Acquire a heading angle of the electronic device from the first moment to the second moment;

[0294] Input the heading angle into the trained neural network model;

[0295] Based on the output of the neural network model, it is determined whether the electronic device is in a hovering state from the first moment to the second moment.

[0296] For example, the acceleration data and angular velocity data of electronic devices located in each flying device of different types may be collected when the flying devices are in the hovering phase, and the heading angle of each electronic device may be determined based on the acceleration data and the angular velocity data.

[0297] The obtained multiple heading angles and the corresponding hovering states of the flight device are used as training sets to train the neural network model, and the loss value is calculated during the training process. The weight coefficients and bias parameters of each layer of the neural network model are corrected based on the loss value until the neural network model converges or the preset number of training times is reached.

[0298] The above-mentioned loss value may be the mean absolute error and / or mean square error between the preset value and the control value.

[0299] The above-mentioned neural network model can be a feedforward neural network model, a convolutional neural network model or a generative adversarial network, etc. The embodiment of the present application does not limit the type of the neural network model.

[0300] After completing the training of the neural network model, the acquired heading angle of the electronic device from the first moment to the second moment can be input into the trained neural network model, and based on the output of the neural network model, it is determined whether the electronic device is in a hovering stage from the first moment to the second moment.

[0301] In one embodiment, the sensing data also includes magnetic field information, and the heading angle is input into the trained neural network model, including:

[0302] Acquire magnetic field information around the electronic device from the first moment to the second moment;

[0303] Based on the magnetic field information, the heading angle is corrected;

[0304] The corrected heading angle is input into the neural network model.

[0305] Exemplarily, considering the acceleration data and angular velocity data of the electronic device from the first moment to the second moment, there may be a gap between the determined heading angle of the electronic device and the actual heading angle of the electronic device. Therefore, if the electronic device also has a geomagnetic sensor, the magnetic field information sensed by the electronic device from the first moment to the second moment can be obtained based on the geomagnetic sensor in the electronic device, and the heading angle of the electronic device can be corrected based on the magnetic field information around the electronic device, and the corrected heading angle is input into the neural network model. This can improve the accuracy of the neural network model in judging whether the electronic device is in a hovering state.

[0306] The above-mentioned magnetic field information at least includes the magnetic field strength around the electronic device.

[0307] Among them, the implementation method of correcting the heading angle of the electronic device based on the magnetic field information around the electronic device can refer to the above implementation process, and the embodiments of the present application will not be repeated here.

[0308] In one example, the method further comprises:

[0309] In response to the electronic device not being in the hovering state from the first moment to the second moment, adjusting the second preset range;

[0310] After adjusting the second preset range, the process returns to the step of determining whether the change amplitude of the pitch angle, roll angle and / or heading angle of the electronic device is within the corresponding second preset range.

[0311] Exemplarily, when the difference between the flight altitude of the electronic device at the first moment and the flight altitude of the electronic device at the second moment is greater than a second preset value, if it is determined that the electronic device is not in a hovering state based on the heading angle of the electronic device from the first moment to the second moment, the second preset range is adjusted.

[0312] Afterwards, the acceleration data and angular velocity data of the electronic device over a period of time are obtained, and based on the acceleration data and angular velocity data, it is determined whether the change amplitude of the pitch angle, roll angle and / or heading angle of the electronic device over a period of time is within the adjusted second preset range.

[0313] In one embodiment, obtaining sensing data of the electronic device in a moving state according to at least one sensor in the electronic device includes:

[0314] Obtain the network status of the electronic device;

[0315] When it is determined based on the network status that the electronic device is not connected to the network, sensing data of the electronic device in a moving state is obtained according to at least one sensor in the electronic device.

[0316] For example, considering that as the flying device where the electronic device is located takes off, the distance between the electronic device and the ground base station will continue to increase, causing the electronic device to leave the coverage of the base station, and then causing the electronic device to be disconnected from the network. Therefore, when it is detected that the electronic device is not connected to the network, the sensor in the electronic device can be used to obtain the sensor data of the electronic device, which can reduce the waste of computing resources of the electronic device caused by determining the flight stage of the electronic device based on the sensor in the electronic device before the electronic device takes off.

[0317] In one embodiment, controlling the electronic device to perform a device operation corresponding to the flight phase in which the electronic device is located includes:

[0318] In response to the electronic device being in the second flight stage, the electronic device is controlled to initiate a network connection operation.

[0319] Exemplarily, when it is determined based on the above method that the electronic device is currently in the landing stage, it means that the flight device where the electronic device is located is landing. At this time, the electronic device can be controlled to automatically exit the flight mode, or automatically exit the flight mode after a preset time, and perform a network search. This can reduce the impact on the user's normal use of the electronic device due to forgetting to exit the flight mode after getting off the plane.

[0320] It should be noted that, in the embodiment of the present application, if the electronic device is located in a flying device, the current flight phase of the electronic device is the flight phase of the flying device in which the electronic device is located.

[0321] refer to Figure 7 , the embodiment of the present application also provides another device control method, including:

[0322] S701: Acquire acceleration data and angular velocity data of the electronic device from a first moment to a second moment based on an acceleration sensor and a gyroscope sensor in the electronic device;

[0323] S702: Acquire current network status information of the electronic device, wherein the network status information is mainly used to determine whether the electronic device is currently connected to the operator network. If the normal network connection status of the electronic device is not detected within a certain period of time, it is assumed that the electronic device is in an off-network state, and S703 is executed;

[0324] S703: Calculating the attitude angle of the electronic device from the first moment to the second moment based on the acceleration data and the angular velocity data from the first moment to the second moment;

[0325] S704: Obtaining a flight height of the electronic device from the first moment to the second moment by performing an integral operation based on the acceleration data and / or angular velocity data of the electronic device from the first moment to the second moment;

[0326] S705: Based on the flight speed and flight altitude of the electronic device from the first moment to the second moment, determining whether the electronic device is in the take-off phase, the climb phase, or the cruise phase, wherein the specific process of identifying whether the aircraft is in the take-off phase, the climb phase, or the cruise phase is as follows: Figure 8 As shown;

[0327] S706: Acquire magnetic field information from the first moment to the second moment based on the geomagnetic sensor in the electronic device:

[0328] S707: Identify the circling state of the aircraft. The specific process is as follows: Fig. 9 shown.

[0329] S708: Based on the hovering state of the aircraft, the aircraft attitude angle is calculated in combination with the acceleration data and the angular velocity data, the flight altitude change is obtained, the descending state of the electronic equipment is identified, the aircraft landing process is predicted, the prediction result is reported, and the process ends. The specific process of determining whether the aircraft is in the landing stage is as follows: Fig.10 shown.

[0330] refer to Figure 8 The specific process of determining whether the electronic equipment is in the take-off phase, climb phase or cruise phase is as follows:

[0331] S801: Acquire acceleration data and angular velocity data of the electronic device from a first moment to a second moment based on an acceleration sensor and a gyroscope sensor in the electronic device;

[0332] S802: Determine the attitude angle of the electronic device from the first moment to the second moment based on the acceleration data and the angular velocity data of the electronic device from the first moment to the second moment;

[0333] S803: Determine a flight height of the electronic device from the first moment to the second moment based on the attitude angle of the electronic device from the first moment to the second moment;

[0334] S804: Calculating the change range of the attitude angle of the electronic device from the first moment to the second moment;

[0335] S805: Determine whether the flight height of the electronic device from the second moment to the first moment exceeds a first preset value, if yes, execute S806, if no, execute S807;

[0336] S806: Determine whether the attitude angle change amplitude is within a first preset range, and if so, determine that the electronic device is in a climbing stage;

[0337] S807: Determine whether the electronic device is in a continuous overweight state from the first moment to the second moment. If yes, determine that the electronic device is in the take-off phase; if not, determine that the electronic device is in the cruising phase.

[0338] refer to Fig. 9 , the specific process of judging whether the aircraft is in a hovering state is as follows:

[0339] S901: Obtain magnetic field information, acceleration data and angular velocity data:

[0340] S902: Calculate heading angle;

[0341] S903: Inputting the heading angle into the trained deep neural network model;

[0342] S904: Identify the hovering state based on the deep neural network model.

[0343] The above deep neural network model can be a feedforward neural network model:

[0344] Training process: Input the heading angle into the feedforward neural network model to predict whether it is currently in a hovering state; calculate the loss function, such as the mean absolute error (L1 loss) and the mean square error (L2 loss), and correct the parameters of the feedforward neural network, that is, the weight coefficients and bias parameters of each layer in the network, until the predicted result and the actual state error meet the preset conditions, thereby obtaining the preset model.

[0345] Use phase:

[0346] The obtained preset model is written into the hardware system of the mobile terminal. During the use phase, a set of real-time heading angle information sequences is obtained; it is input into the trained feedforward neural network model and the prediction results are output.

[0347] refer to Fig.10 , the specific process of determining whether the electronic equipment is in the landing phase is as follows:

[0348] S1001: Acquire the attitude angle of the electronic device from the first moment to the second moment;

[0349] S1002: Calculating the change range of the attitude angle of the electronic device from the first moment to the second moment;

[0350] S1003: Calculating the flight altitude of the electronic device from the first moment to the second moment according to the acceleration data and / or angular velocity data of the electronic device during the flight;

[0351] S1004: Whether the flight altitude from the first moment to the second moment exceeds a second preset value, if yes, executing S1005;

[0352] S1005: Is the hovering state detected? If yes, execute S1007; if no, execute S1006 and then S1007;

[0353] S1006: Adjust the second preset range;

[0354] S1007: Determine whether the amplitude of the attitude angle change is within a first preset range, and if so, determine that the electronic device is in a landing stage.

[0355] refer to Fig.11 The present application also provides a device control device, the device comprising:

[0356] The sensing module 1101 is used to obtain sensing data of the electronic device in a moving state according to at least one sensor in the electronic device;

[0357] A determination module 1102 is used to determine the flight phase of the electronic device during the flight process according to the sensing data;

[0358] The first execution module 1103 is used to control the electronic device to execute a device operation corresponding to the flight phase of the electronic device.

[0359] Optionally, the sensing data includes acceleration data and / or angular velocity data, and the determination module 1102 is configured to:

[0360] Determine the change of the flying altitude of the electronic device during the flight according to the acceleration data and / or angular velocity data of the electronic device during the flight;

[0361] The flight phase of the electronic device is determined based on the change of the flight altitude of the electronic device during the flight.

[0362] Optionally, the determination module 1102 is configured to:

[0363] Determining the attitude angle of the electronic device during the flight according to the acceleration data and / or angular velocity data of the electronic device during the flight;

[0364] Based on the attitude angle, the change in the flying altitude of the electronic device during the flight is determined.

[0365] Optionally, the attitude angle includes: a pitch angle, a roll angle and / or a heading angle, and the determination module 1102 is specifically configured to:

[0366] The change of the flying altitude of the electronic device during the flight is determined according to the pitch angle, roll angle and / or heading angle of the electronic device during the flight.

[0367] Optionally, the determination module 1102 is further configured to:

[0368] If the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, it is determined that the electronic device is in the first flight stage, wherein the second moment is later than the first moment.

[0369] Optionally, the determination module 1102 is further configured to:

[0370] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the electronic device at the first moment is greater than a first preset value, it is determined that the electronic device is in a climbing phase;

[0371] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude at the first moment is less than or equal to the first preset value, and the electronic device is in an overweight state during the duration from the first moment to the second moment, it is determined that the electronic device is in the take-off stage.

[0372] Optionally, the determination module 1102 is further configured to:

[0373] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the first moment is less than or equal to the first preset value, and the electronic device is not in an overweight state during at least part of the time from the first moment to the second moment, it is determined that the electronic device is in the cruising stage;

[0374] If the flight altitude of the electronic device at the second moment is equal to the flight altitude at the first moment, it is determined that the electronic device is in the cruising phase.

[0375] Optionally, the determination module 1102 is further configured to:

[0376] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the electronic device at the first moment is greater than a first preset value, determining whether the change amplitude of the pitch angle, roll angle and / or heading angle of the electronic device from the first moment to the second moment is within a corresponding first preset range;

[0377] In response to the change amplitude of the pitch angle, roll angle and / or heading angle of the electronic device being within the corresponding first preset range, it is determined that the electronic device is in a climbing stage.

[0378] Optionally, the first execution module 1103 is configured to:

[0379] In response to the electronic device being in the first flight stage, the electronic device is controlled to be in or maintain the flight mode.

[0380] Optionally, the determination module 1102 is further configured to:

[0381] If the flight altitude of the electronic device at the second moment is lower than the flight altitude at the first moment, it is determined that the electronic device is in the second flight stage.

[0382] Optionally, the determination module 1102 is further configured to:

[0383] When the difference between the flight altitude at the first moment and the flight altitude at the second moment is greater than a second preset value, determining whether the electronic device is in a hovering state;

[0384] In response to the electronic device being in a hovering state, it is determined that the electronic device is in a landing phase.

[0385] Optionally, the determination module is further configured to:

[0386] In response to the electronic device being in a hovering state, determining whether a change amplitude of a pitch angle, a roll angle, and / or a heading angle of the electronic device is within a corresponding second preset range;

[0387] If the variation range of the pitch angle, the roll angle and / or the heading angle of the electronic device is within the corresponding second preset range, it is determined that the electronic device is in the landing stage.

[0388] Optionally, the determination module 1102 is further configured to:

[0389] If the pitch angle, roll angle and / or heading angle of the electronic device are within the corresponding second preset range, acquiring acceleration data of the electronic device from the first moment to the second moment;

[0390] Based on the acceleration data, determining whether the electronic device is in a weightless state during a duration from the first moment to the second moment;

[0391] In response to the electronic device being in a weightless state during a time period from the first moment to the second moment, it is determined that the electronic device is in a landing phase.

[0392] Optionally, the determination module 1102 is further configured to:

[0393] Acquire a heading angle of the electronic device from the first moment to the second moment;

[0394] Input the heading angle into the trained neural network model;

[0395] Based on the output of the neural network model, it is determined whether the electronic device is in a hovering state from the first moment to the second moment.

[0396] Optionally, the sensing data also includes magnetic field information, and the determination module is further used to:

[0397] Acquire magnetic field information around the electronic device from the first moment to the second moment;

[0398] Based on the magnetic field information, the heading angle is corrected;

[0399] The corrected heading angle is input into the neural network model.

[0400] Optionally, the device further comprises:

[0401] An adjustment module, configured to adjust a second preset range in response to the electronic device not being in a hovering state from the first moment to the second moment;

[0402] The second execution module is used to return to the step of determining whether the change amplitude of the pitch angle, roll angle and / or heading angle of the electronic device is within the corresponding second preset range after adjusting the second preset range.

[0403] Optionally, the sensor module is used to:

[0404] Obtain the network status of the electronic device;

[0405] When it is determined based on the network status that the electronic device is not connected to the network, sensing data of the electronic device in a moving state is obtained according to at least one sensor in the electronic device.

[0406] Optionally, the first execution module 1103 is further configured to:

[0407] In response to the electronic device being in the second flight stage, the electronic device is controlled to start a network connection operation.

[0408] refer to Fig.12 In an embodiment of the present application, an electronic device 1200 is provided, including:

[0409] Memory 1204 for storing processor executable instructions;

[0410] A processor 1220 connected to the memory 1204;

[0411] Among them, the processor 1220 is configured to execute the device control method provided by any of the aforementioned technical solutions.

[0412] A block diagram of an electronic device 1200 is shown according to an exemplary embodiment. For example, the electronic device 1200 may be a mobile phone, a tablet computer, a notebook computer, a portable learning machine, and the like.

[0413] refer to Fig.12 , the electronic device 1200 may include one or more of the following components: a processing component 1202 , a memory 1204 , a power component 1206 , a multimedia component 1208 , an audio component 1210 , an input / output (I / O) interface 1212 , a sensor component 1214 , and a communication component 1218 .

[0414] The processing component 1202 generally controls the overall operation of the electronic device 1200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1202 may include one or more processors 1220 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1202 may include one or more modules to facilitate the interaction between the processing component 1202 and other components. For example, the processing component 1202 may include a multimedia module to facilitate the interaction between the multimedia component 1208 and the processing component 1202.

[0415] The memory 1204 is configured to store various types of data to support operations on the electronic device 1200. Examples of such data include instructions for any application or method operating on the electronic device 1200, contact data, phone book data, messages, pictures, videos, etc. The memory 1204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0416] The power supply component 1206 provides power to the various components of the electronic device 1200. The power supply component 1206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1200.

[0417] The multimedia component 1208 includes a screen that provides an output interface between the electronic device 1200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1208 includes a front camera and / or a rear camera. When the electronic device 1200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0418] The audio component 1210 is configured to output and / or input audio signals. For example, the audio component 1210 includes a microphone (MIC), and when the electronic device 1200 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1204 or sent via the communication component 1218. In some embodiments, the audio component 1210 also includes a speaker for outputting audio signals.

[0419] I / O interface 1212 provides an interface between processing component 1202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0420] The sensor assembly 1214 includes one or more sensors for providing various aspects of status assessment for the electronic device 1200. For example, the sensor assembly 1214 can detect the open / closed state of the electronic device 1200, the relative positioning of components, such as the display and keypad of the electronic device 1200, and the sensor assembly 1214 can also detect the position change of the electronic device 1200 or a component of the electronic device 1200, the presence or absence of user contact with the electronic device 1200, the orientation or acceleration / deceleration of the electronic device 1200, and the temperature change of the electronic device 1200. The sensor assembly 1214 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1214 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1214 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0421] The communication component 1218 is configured to facilitate wired or wireless communication between the electronic device 1200 and other devices. The electronic device 1200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1218 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1218 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0422] In an exemplary embodiment, the electronic device 1200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0423] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1204 including instructions, and the instructions can be executed by a processor 1220 of the electronic device 1200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0424] An embodiment of the present application provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of a computer, the computer can execute the device control method described in one or more of the aforementioned technical solutions.

[0425] When the processor executes the instruction, it can at least perform the following steps:

[0426] Obtaining sensing data of the electronic device in a moving state according to at least one sensor in the electronic device;

[0427] Determine the flight phase of the electronic device during the flight process based on the sensor data;

[0428] The electronic device is controlled to perform device operations corresponding to the flight phase in which the electronic device is located.

[0429] Optionally, the sensing data includes acceleration data and / or angular velocity data, and determining the flight phase of the electronic device during the flight process according to the sensing data includes:

[0430] Determine the change of the flying altitude of the electronic device during the flight according to the acceleration data and / or angular velocity data of the electronic device during the flight;

[0431] The flight phase of the electronic device is determined based on the change of the flight altitude of the electronic device during the flight.

[0432] Optionally, determining a change in the flying height of the electronic device during the flight according to acceleration data and / or angular velocity data of the electronic device during the flight includes:

[0433] Determining the attitude angle of the electronic device during the flight according to the acceleration data and / or angular velocity data of the electronic device during the flight;

[0434] Based on the attitude angle, the change in the flying altitude of the electronic device during the flight is determined.

[0435] Optionally, the attitude angle includes: a pitch angle, a roll angle and / or a heading angle, and based on the attitude angle, determining a change in the flight altitude of the electronic device during flight includes:

[0436] The change of the flying altitude of the electronic device during the flight is determined according to the pitch angle, roll angle and / or heading angle of the electronic device during the flight.

[0437] Optionally, determining the flight phase of the electronic device based on a change in the flight altitude of the electronic device during flight includes:

[0438] If the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, it is determined that the electronic device is in the first flight stage, wherein the second moment is later than the first moment.

[0439] Optionally, if the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, determining that the electronic device is in the first flight stage includes:

[0440] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the electronic device at the first moment is greater than a first preset value, it is determined that the electronic device is in a climbing phase;

[0441] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude at the first moment is less than or equal to the first preset value, and the electronic device is in an overweight state during the duration from the first moment to the second moment, it is determined that the electronic device is in the take-off stage.

[0442] Optionally, if the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, determining that the electronic device is in the first flight stage further includes:

[0443] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the first moment is less than or equal to the first preset value, and the electronic device is not in an overweight state during at least part of the time from the first moment to the second moment, it is determined that the electronic device is in the cruising stage;

[0444] If the flight altitude of the electronic device at the second moment is equal to the flight altitude at the first moment, it is determined that the electronic device is in the cruising phase.

[0445] Optionally, if the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the electronic device at the first moment is greater than a first preset value, determining that the electronic device is in a climbing phase includes:

[0446] If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the electronic device at the first moment is greater than a first preset value, determining whether the change amplitude of the pitch angle, roll angle and / or heading angle of the electronic device from the first moment to the second moment is within a corresponding first preset range;

[0447] In response to the change amplitude of the pitch angle, roll angle and / or heading angle of the electronic device being within the corresponding first preset range, it is determined that the electronic device is in a climbing stage.

[0448] Optionally, controlling the electronic device to perform a device operation corresponding to the flight phase in which the electronic device is located includes:

[0449] In response to the electronic device being in the first flight stage, the electronic device is controlled to be in or maintain the flight mode.

[0450] Optionally, determining the flight phase of the electronic device based on a change in the flight altitude of the electronic device during flight includes:

[0451] If the flight altitude of the electronic device at the second moment is lower than the flight altitude at the first moment, it is determined that the electronic device is in the second flight stage.

[0452] Optionally, if the flight altitude of the electronic device at the second moment is lower than the flight altitude at the first moment, determining that the electronic device is in the second flight stage includes:

[0453] When the difference between the flight altitude at the first moment and the flight altitude at the second moment is greater than a second preset value, determining whether the electronic device is in a hovering state;

[0454] In response to the electronic device being in a hovering state, it is determined that the electronic device is in a landing phase.

[0455] Optionally, in response to the electronic device being in a hovering state, determining that the electronic device is in a landing stage includes:

[0456] In response to the electronic device being in a hovering state, determining whether a change amplitude of a pitch angle, a roll angle, and / or a heading angle of the electronic device is within a corresponding second preset range;

[0457] If the variation range of the pitch angle, the roll angle and / or the heading angle of the electronic device is within the corresponding second preset range, it is determined that the electronic device is in the landing stage.

[0458] Optionally, if the variation range of the pitch angle, the roll angle and / or the heading angle of the electronic device is within a corresponding second preset range, it is determined that the electronic device is in the landing stage, further comprising:

[0459] If the pitch angle, roll angle and / or heading angle of the electronic device are within the corresponding second preset range, acquiring acceleration data of the electronic device from the first moment to the second moment;

[0460] Based on the acceleration data, determining whether the electronic device is in a weightless state during a duration from the first moment to the second moment;

[0461] In response to the electronic device being in a weightless state during a time period from the first moment to the second moment, it is determined that the electronic device is in a landing phase.

[0462] Optionally, determining whether the electronic device is in a hovering state includes:

[0463] Acquire a heading angle of the electronic device from the first moment to the second moment;

[0464] Input the heading angle into the trained neural network model;

[0465] Based on the output of the neural network model, it is determined whether the electronic device is in a hovering state from the first moment to the second moment.

[0466] Optionally, the sensing data also includes magnetic field information, and the heading angle is input into the trained neural network model, including:

[0467] Acquire magnetic field information around the electronic device from the first moment to the second moment;

[0468] Based on the magnetic field information, the heading angle is corrected;

[0469] The corrected heading angle is input into the neural network model.

[0470] Optionally, the method further comprises:

[0471] In response to the electronic device not being in the hovering state from the first moment to the second moment, adjusting the second preset range;

[0472] After adjusting the second preset range, the process returns to the step of determining whether the change amplitude of the pitch angle, roll angle and / or heading angle of the electronic device is within the corresponding second preset range.

[0473] Optionally, using at least one sensor of the electronic device to sense the movement state of the electronic device to obtain sensing data includes:

[0474] Obtain the network status of the electronic device;

[0475] When it is determined based on the network status that the electronic device is not connected to the network, sensing data of the electronic device in a mobile state is obtained according to at least one sensor in the electronic device.

[0476] Optionally, controlling the electronic device to perform a device operation corresponding to the flight phase in which the electronic device is located includes:

[0477] In response to the electronic device being in the second flight stage, the electronic device is controlled to initiate a network connection operation.

[0478] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.

[0479] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A device control method, characterized in that: Executed by an electronic device, the method includes: Obtaining sensing data of the electronic device in a moving state according to at least one sensor in the electronic device; Determining the flight phase of the electronic device during the flight process according to the sensor data; The electronic device is controlled to perform a device operation corresponding to the flight phase in which the electronic device is located.

2. The method according to claim 1, characterized in that The sensing data includes acceleration data and / or angular velocity data, and determining the flight phase of the electronic device during the flight process according to the sensing data includes: Determining a change in the flying altitude of the electronic device during the flight according to the acceleration data and / or angular velocity data of the electronic device during the flight; The flight phase of the electronic device is determined based on the change of the flight altitude of the electronic device during the flight.

3. The method according to claim 2, characterized in that The step of determining a change in the flying height of the electronic device during the flying process according to the acceleration data and / or the angular velocity data of the electronic device during the flying process comprises: Determining the attitude angle of the electronic device during the flight according to the acceleration data and / or angular velocity data of the electronic device during the flight; Based on the attitude angle, the change in the flying altitude of the electronic device during the flight is determined.

4. The method according to claim 3, characterized in that The attitude angle includes: a pitch angle, a roll angle and / or a heading angle. The determining, based on the attitude angle, a change in the flight altitude of the electronic device during flight includes: The change of the flying altitude of the electronic device during the flight is determined according to the pitch angle, the roll angle and / or the heading angle of the electronic device during the flight.

5. The method according to claim 4, characterized in that The determining the flight phase of the electronic device based on the change of the flight altitude of the electronic device during the flight process includes: If the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, it is determined that the electronic device is in the first flight stage, wherein the second moment is later than the first moment.

6. The method according to claim 5, characterized in that If the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, determining that the electronic device is in the first flight phase includes: If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the electronic device at the first moment is greater than a first preset value, it is determined that the electronic device is in a climbing phase; If the difference between the flight altitude of the electronic device at the second moment and the flight altitude at the first moment is less than or equal to the first preset value, and the electronic device is in an overweight state during the duration from the first moment to the second moment, it is determined that the electronic device is in the take-off stage.

7. The method according to claim 6, characterized in that If the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, determining that the electronic device is in the first flight stage further includes: If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the first moment is less than or equal to the first preset value, and the electronic device is not in an overweight state during at least part of the time from the first moment to the second moment, it is determined that the electronic device is in the cruising stage; If the flight altitude of the electronic device at the second moment is equal to the flight altitude at the first moment, it is determined that the electronic device is in the cruising phase.

8. The method according to claim 6, characterized in that If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the electronic device at the first moment is greater than a first preset value, determining that the electronic device is in the climbing stage includes: If the difference between the flight altitude of the electronic device at the second moment and the flight altitude of the first moment is greater than a first preset value, determining whether the change amplitude of the pitch angle, the roll angle and / or the heading angle of the electronic device from the first moment to the second moment is within a corresponding first preset range; In response to the change amplitude of the pitch angle, the roll angle and / or the heading angle of the electronic device being within a corresponding first preset range, it is determined that the electronic device is in a climbing phase.

9. The method according to claim 5, characterized in that The controlling the electronic device to perform a device operation corresponding to the flight phase in which the electronic device is located includes: In response to the electronic device being in the first flight stage, the electronic device is controlled to be in or maintain an airplane mode.

10. The method according to claim 5, characterized in that The determining the flight phase of the electronic device based on the change of the flight altitude of the electronic device during the flight process includes: If the flight altitude of the electronic device at the second moment is lower than the flight altitude at the first moment, it is determined that the electronic device is in the second flight phase.

11. The method according to claim 10, characterized in that If the flight altitude of the electronic device at the second moment is lower than the flight altitude at the first moment, determining that the electronic device is in the second flight phase includes: When the difference between the flight altitude at the first moment and the flight altitude at the second moment is greater than a second preset value, determining whether the electronic device is in a hovering state; In response to the electronic device being in a hovering state, it is determined that the electronic device is in a landing phase.

12. The method according to claim 11, characterized in that In response to the electronic device being in a hovering state, determining that the electronic device is in a landing stage includes: In response to the electronic device being in a hovering state, determining whether a change amplitude of the pitch angle, the roll angle and / or the heading angle of the electronic device is within a corresponding second preset range; If the variation range of the pitch angle, the roll angle and / or the heading angle of the electronic device is within a corresponding second preset range, it is determined that the electronic device is in the landing stage.

13. The method according to claim 12, characterized in that If the variation range of the pitch angle, the roll angle and / or the heading angle of the electronic device is within a corresponding second preset range, determining that the electronic device is in the landing stage further includes: If the pitch angle, the roll angle and / or the heading angle of the electronic device is within a corresponding second preset range, acquiring acceleration data of the electronic device from the first moment to the second moment; Based on the acceleration data, determining whether the electronic device is in a weightless state during a time period from the first moment to the second moment; In response to the electronic device being in a weightless state during a time period from the first moment to the second moment, it is determined that the electronic device is in a landing phase.

14. The method according to claim 11, characterized in that The determining whether the electronic device is in a hovering state comprises: Acquire the heading angle of the electronic device from the first moment to the second moment; Inputting the heading angle into a trained neural network model; Based on the output of the neural network model, determine whether the electronic device is in a hovering state from the first moment to the second moment.

15. The method according to claim 14, characterized in that The sensing data also includes magnetic field information, and the inputting the heading angle into the trained neural network model includes: Acquire magnetic field information around the electronic device from the first moment to the second moment; Based on the magnetic field information, correcting the heading angle; The corrected heading angle is input into the neural network model.

16. The method according to claim 12, characterized in that The method further comprises: In response to the electronic device not being in the hovering state from the first moment to the second moment, adjusting the second preset range; After adjusting the second preset range, return to the step of determining whether the change amplitude of the pitch angle, the roll angle and / or the heading angle of the electronic device is within the corresponding second preset range.

17. The method according to claim 1, characterized in that The obtaining, according to at least one sensor in the electronic device, sensing data of the electronic device in a moving state comprises: Acquiring the network status of the electronic device; When it is determined based on the network status that the electronic device is not connected to the network, sensing data of the electronic device in a mobile state is obtained according to at least one sensor in the electronic device.

18. The method according to claim 10, characterized in that The controlling the electronic device to perform a device operation corresponding to the flight phase in which the electronic device is located includes: In response to the electronic device being in the second flight phase, the electronic device is controlled to start a network connection operation.

19. A device control device, characterized in that: The device comprises: A sensor module, used to obtain sensor data of the electronic device in a moving state according to at least one sensor in the electronic device; A determination module, used to determine the flight phase of the electronic device during the flight process according to the sensing data; The first execution module is used to control the electronic device to execute a device operation corresponding to the flight phase of the electronic device.

20. The device according to claim 19, characterized in that The sensing data includes acceleration data and / or angular velocity data, and the determining module is used to: Determining a change in the flying altitude of the electronic device during the flight according to the acceleration data and / or angular velocity data of the electronic device during the flight; The flight phase of the electronic device is determined based on the change of the flight altitude of the electronic device during the flight.

21. The device according to claim 20, characterized in that The determining module is used for: Determining the attitude angle of the electronic device during the flight according to the acceleration data and / or angular velocity data of the electronic device during the flight; Based on the attitude angle, the change in the flying altitude of the electronic device during the flight is determined.

22. The device according to claim 21, characterized in that The attitude angle includes: a pitch angle, a roll angle and / or a heading angle, and the determination module is further used for: The change of the flying altitude of the electronic device during the flight is determined according to the pitch angle, the roll angle and / or the heading angle of the electronic device during the flight.

23. The device according to claim 22, characterized in that The determining module is also used for: If the flight altitude of the electronic device at the second moment is higher than or equal to the flight altitude at the first moment, it is determined that the electronic device is in the first flight stage, wherein the second moment is later than the first moment.

24. The device according to claim 23, characterized in that The determining module is also used for: If the flight altitude of the electronic device at the second moment is lower than the flight altitude at the first moment, it is determined that the electronic device is in the second flight phase.

25. An electronic device, characterized in that: include: a memory for storing processor-executable instructions; A processor connected to the memory; Wherein, the processor is used to execute the device control method as described in any one of claims 1 to 18. 26 . A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a computer, enables the computer to execute the device control method according to any one of claims 1 to 18.