Mobile information determination method and device, electronic equipment and storage medium

By calculating the relative speed and displacement information between the electronic device and the reference object, the problem of reduced measurement accuracy when the electronic device moves driven by the reference object is solved, and more accurate movement information updates are achieved.

CN118776587APending Publication Date: 2024-10-15XIAN WINGTECH INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410827978.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

When the electronic device moves driven by the reference object, the accuracy of measuring the movement information decreases, making it difficult to accurately determine the relative displacement of the electronic device relative to the reference object.

Method used

By obtaining the current acceleration of the acceleration sensor and the absolute speed of the reference object, calculate the relative speed between the electronic device and the reference object, determine the current displacement information based on the relative speed, and update the movement information of the electronic device to avoid detection driven by the reference object. Influence.

Benefits of technology

The accuracy of detection of movement information of electronic equipment when driven by a reference object is improved, and accurate updating of movement information is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118776587A_ABST
    Figure CN118776587A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a movement information determination method and device, electronic equipment and a storage medium, the electronic equipment comprises an acceleration sensor, and the method comprises the steps that the current acceleration collected by the acceleration sensor at the current collection moment is acquired; determining the relative speed of the electronic equipment between the current acquisition moment and a reference object according to the current acceleration; the reference object can drive the electronic equipment to move; determining current displacement information corresponding to a current time period according to the relative speed, wherein the current time period is a time period from a previous acquisition moment to the current acquisition moment; and updating movement information corresponding to the electronic equipment according to the current displacement information. By implementing the embodiment of the invention, the accuracy of determining the mobile information can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of position detection, and in particular to a method, device, electronic device and storage medium for determining movement information. Background Art

[0002] Currently, there is a problem when electronic devices determine the displacement distance through acceleration sensors. If the electronic device can be moved by other reference objects, for example, the electronic device is on a car or an airplane, if the electronic device needs to measure the movement information of the electronic device relative to the reference object, the movement of the reference object will affect the measurement of the electronic device, thereby reducing the accuracy of determining the movement information corresponding to the electronic device. Summary of the invention

[0003] The embodiments of the present application disclose a method, device, electronic device and storage medium for determining movement information, which can improve the accuracy of determining movement information.

[0004] The present application embodiment discloses a method for determining movement information, which is applied to an electronic device, wherein the electronic device includes an acceleration sensor, and the method includes:

[0005] Obtaining the current acceleration collected by the acceleration sensor at the current collection moment;

[0006] Determine the relative speed between the electronic device and the reference object at the current acquisition time according to the current acceleration and the absolute speed of the reference object; the reference object can drive the electronic device to move;

[0007] Determine the current displacement information corresponding to the current time period according to the relative speed, wherein the current time period is the time period between the last acquisition time and the current acquisition time;

[0008] According to the current displacement information, the movement information corresponding to the electronic device is updated.

[0009] In one embodiment, the electronic device includes an image sensor, and before updating the movement information corresponding to the electronic device according to the current displacement information, the method further includes:

[0010] Acquire multiple frames of images captured by the image sensor in the current time period;

[0011] Determining, based on the multiple frames of images, whether there is a relative displacement between the electronic device and the reference object within the current time period;

[0012] If there is a relative displacement between the electronic device and the reference object within the current time period, a step of updating the movement information corresponding to the electronic device according to the current displacement information is performed.

[0013] In one embodiment, after determining whether there is a relative displacement between the electronic device and the reference object within the current time period according to the multiple frames of images, the method further includes:

[0014] If there is no relative displacement between the electronic device and the reference object within the current time period, the movement information corresponding to the electronic device is not updated.

[0015] In one embodiment, after determining whether there is a relative displacement between the electronic device and the reference object within the current time period according to the multiple frames of images, the method further includes:

[0016] If there is no relative displacement between the electronic device and the reference object within the current time period, the absolute velocity of the reference object is updated according to the current acceleration.

[0017] In one embodiment, determining the relative speed between the electronic device and the reference object at the current acquisition time according to the current acceleration and the absolute speed of the reference object includes:

[0018] Determine the absolute speed of the electronic device at the current collection time according to the acceleration collected at each collection time between the initial collection time and the current collection time;

[0019] The relative speed between the electronic device at the current acquisition moment and the reference object is determined according to the absolute speed of the electronic device at the current acquisition moment and the absolute speed of the reference object.

[0020] In one embodiment, determining the current displacement information corresponding to the current time period according to the relative speed includes:

[0021] The relative speed is integrated within a current time period to obtain current displacement information corresponding to the current time period.

[0022] In one embodiment, the current displacement information includes a first displacement vector, the movement information corresponding to the electronic device includes a second displacement vector, and updating the movement information corresponding to the electronic device according to the current displacement information includes:

[0023] Adding the second displacement vector to the first displacement vector to obtain a new second displacement vector;

[0024] The displacement distance is determined according to the new second displacement vector.

[0025] The embodiment of the present application discloses a device for determining movement information, which is applied to an electronic device, wherein the electronic device includes an acceleration sensor, and the device includes:

[0026] An acceleration acquisition module, used to acquire the current acceleration collected by the acceleration sensor at the current collection moment;

[0027] A relative speed determination module, used to determine the relative speed between the electronic device and the reference object at the current acquisition time according to the current acceleration and the absolute speed of the reference object; the reference object can drive the electronic device to move;

[0028] A displacement information determination module, used to determine the current displacement information corresponding to the current time period according to the relative speed, wherein the current time period is the time period from the last acquisition moment to the current acquisition moment;

[0029] The movement information updating module is used to update the movement information corresponding to the electronic device according to the current displacement information.

[0030] The present application discloses an electronic device, including:

[0031] A memory storing executable program code;

[0032] a processor coupled to the memory;

[0033] The processor calls the executable program code stored in the memory to execute the method described in any one of the above embodiments.

[0034] An embodiment of the present application discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor executes the method described in any one of the above embodiments.

[0035] Through the mobile information determination method, device, electronic device and storage medium disclosed in the embodiments of the present application, the electronic device can obtain the current acceleration collected at the current collection moment, and determine the relative speed between the electronic device and the reference object at the current collection moment based on the current acceleration and the absolute speed of the reference object, thereby determining the current displacement information corresponding to the current time period between the previous collection moment and the current collection moment based on the relative speed, and then updating the corresponding mobile information of the electronic device based on the current displacement information. By implementing this embodiment, the relative speed between the electronic device and the reference object at the current collection moment can be determined based on the current acceleration and the absolute speed of the reference object, and the current displacement information is determined based on the relative speed, which can avoid affecting the mobile information detection of the electronic device when the reference object drives the electronic device to move, thereby improving the accuracy of the current displacement information, and the mobile information is updated through the current displacement information, thereby improving the accuracy of determining the mobile information. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0037] Figure 1 It is a schematic diagram of an application scenario of a method for determining mobile information disclosed in an embodiment of the present application;

[0038] Figure 2 It is a flowchart of a method for determining mobile information disclosed in an embodiment of the present application;

[0039] Figure 3 It is a flowchart of another method for determining mobile information disclosed in an embodiment of the present application;

[0040] Figure 4 It is a flowchart of another method for determining mobile information disclosed in an embodiment of the present application;

[0041] Figure 5 It is a modular schematic diagram of a mobile information determination device disclosed in an embodiment of the present application;

[0042] Figure 6 It is a structural block diagram of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0044] It should be noted that the terms "including" and "having" in the embodiments of the present application and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0045] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first displacement vector may be referred to as a second displacement vector, and similarly, a second displacement vector may be referred to as a first displacement vector without departing from the scope of this application. Both the first displacement vector and the second displacement vector are displacement vectors, but they are not the same displacement vector.

[0046] The embodiments of the present application disclose a method, device, electronic device and storage medium for determining movement information, which can improve the accuracy of determining movement information.

[0047] The following is a detailed description with reference to the accompanying drawings.

[0048] like Figure 1 As shown, Figure 1 1 is a schematic diagram of an application scenario of a method for determining mobile information disclosed in an embodiment of the present application. The application scenario may include an electronic device 110 and a reference object 120. The electronic device 110 may include but is not limited to a mobile phone, a tablet computer, a wearable device, a laptop computer, a PC (Personal Computer), etc. The reference object 120 may be an object with mobility, such as a vehicle, a flying object, a ship, etc. Optionally, the electronic device 110 may be located at any position in the reference object 120, such as the inside, top, bottom, etc. of the reference object 120, without limitation. The electronic device 110 may include an acceleration sensor, which may be used to detect the absolute acceleration of the electronic device 110.

[0049] When the reference object 120 moves, it can drive the electronic device 110 to move. If the electronic device 110 and the reference object 120 remain relatively still, the absolute speed of the reference object 120 is the same as the absolute speed of the electronic device 110. The absolute speed may refer to the speed with the ground as the reference system. However, it is understandable that the electronic device 110 and the reference object 120 are not in a fixed relationship, that is, the electronic device 110 may have a relative displacement with the reference object 120, and at this time, the absolute speed of the electronic device 110 is not the same as the absolute speed of the reference object 120.

[0050] In the case where a relative displacement occurs between the electronic device 110 and the reference object 120, if the reference object 120 is also moving, then if the absolute speed of the electronic device 110 and the acceleration detected by the acceleration sensor of the electronic device 110 are used to calculate the movement information of the electronic device 110, the relative displacement between the electronic device 110 and the ground will be obtained. In order to accurately determine the movement information corresponding to the electronic device 110, the movement information may refer to the relative displacement between the electronic device 110 and the reference object 120. In one embodiment, the electronic device 110 may obtain the current acceleration collected by the acceleration sensor at the current collection moment, and determine the relative speed between the electronic device 110 and the reference object 120 at the current collection moment based on the current acceleration and the absolute speed of the reference object, and then determine the current displacement information corresponding to the current time period based on the relative speed, so that the movement information corresponding to the electronic device 110 may be updated based on the current displacement information.

[0051] like Figure 2 As shown, Figure 2 : is a flow chart of a method for determining mobile information disclosed in an embodiment of the present application. The method for determining mobile information can be applied to the electronic device in the above embodiment. The method for determining mobile information can include the following steps:

[0052] Step 210: Obtain the current acceleration collected by the acceleration sensor at the current collection time.

[0053] The acceleration sensor of the electronic device can collect acceleration once every preset time period. It can be understood that the preset time period is usually a shorter time period, so the acceleration collected at the current collection moment can be used to characterize the acceleration of the current time period, and the current time period can be the time period between the previous collection moment and the current collection moment.

[0054] In some embodiments, the electronic device may be provided with a movement information detection control. When a touch operation on the movement information detection control is detected, an inquiry message is output to inquire whether the electronic device is currently in a movable object. If a first confirmation operation is detected, it is determined that the electronic device is not currently in a movable object. The electronic device may control the acceleration sensor to collect acceleration at a first preset frequency, and determine the movement information corresponding to the electronic device according to the acceleration collected by the acceleration sensor. If a second confirmation operation is detected, it is determined that the electronic device is currently in a movable object. The electronic device may control the acceleration sensor to collect acceleration at a second preset frequency. Optionally, in the case of being in a movable object, more acceleration needs to be collected to determine the movement information corresponding to the electronic device. The second preset frequency may be higher than the first preset frequency. The movement information may include the relative speed, relative displacement, etc. of the electronic device corresponding to the reference object as the reference system.

[0055] When the electronic device controls the acceleration sensor to collect acceleration at the second preset frequency, the electronic device can obtain the current acceleration collected by the acceleration sensor at the current collection moment. Optionally, the electronic device can also obtain the current acceleration collected by the acceleration sensor at the current collection moment and save the current acceleration corresponding to the current moment.

[0056] Step 220: Determine the relative speed between the electronic device and the reference object at the current acquisition moment according to the current acceleration and the absolute speed of the reference object.

[0057] It can be understood that when determining the current displacement information corresponding to the current time period, in addition to the current acceleration and the absolute speed of the reference object, the electronic device also needs the speed information in the current time period. The speed information may refer to the absolute speed of the electronic device at the current collection moment. The electronic device thus determines the relative speed corresponding to the electronic device at the current collection moment based on the current acceleration and speed information to avoid the absolute speed of the reference object interfering with the determination of the movement information.

[0058] Among them, the electronic device can determine the absolute speed of the electronic device at the current collection time according to the current acceleration, and obtain the absolute speed of the reference object at the current collection time, and subtract the absolute speed of the reference object at the current collection time from the absolute speed of the electronic device at the current collection time to obtain the relative speed between the electronic device and the reference object at the current collection time. Optionally, after obtaining the current acceleration collected by the acceleration sensor at the current collection time, the electronic device can calculate according to the current acceleration and the absolute speed of the electronic device at the previous collection time to obtain the absolute speed of the electronic device corresponding to the current collection time.

[0059] Optionally, the electronic device may also obtain the relative speed between the electronic device and the reference object at the last acquisition moment, thereby determining the relative speed between the electronic device and the reference object at the current acquisition moment based on the current acceleration and the relative speed between the electronic device and the reference object at the last acquisition moment. Since the acceleration acquired at the current acquisition moment can be used to characterize the acceleration of the current time period, the electronic device can determine the speed change of the current time period based on the acceleration acquired at the current acquisition moment and the duration of the current time period, thereby determining the relative speed between the electronic device and the reference object at the current acquisition moment based on the speed change and the relative speed between the electronic device and the reference object at the last acquisition moment. It should be understood that in this embodiment, the electronic device does not need the absolute speed of the reference object, but requires the relative speed between the electronic device and the reference object at the last acquisition moment.

[0060] Step 230, determining the current displacement information corresponding to the current time period according to the relative speed.

[0061] Among them, the current displacement information may include displacement distance and displacement direction. The displacement distance may refer to the distance that the electronic device actually moves relative to the reference object in the current time period. As an implementation method, the electronic device may obtain the displacement direction by integrating the relative speed in the current time period. The displacement direction may refer to the moving direction of the electronic device relative to the reference object. The displacement direction may be an angle value or a direction vector. The electronic device may determine the displacement direction by the direction vector of the relative speed. Optionally, the current displacement information may also include a first displacement vector, which may also be used to characterize the displacement distance and displacement direction.

[0062] Step 240: Update the movement information corresponding to the electronic device according to the current displacement information.

[0063] Optionally, after determining the current displacement information corresponding to the current time period, the electronic device can update the corresponding movement information of the electronic device according to the current displacement information. The electronic device can also accumulate the displacement information corresponding to multiple time periods, and after determining the displacement information corresponding to the multiple time periods, update the corresponding movement information of the electronic device according to the displacement information corresponding to the multiple time periods. Among them, the electronic device can update the corresponding movement information of the electronic device according to the displacement information corresponding to the multiple time periods when the duration corresponding to the multiple time periods reaches a preset duration.

[0064] It can be understood that the reference object may move at a constant speed or at a variable speed during its movement. If the reference object moves at a variable speed, the current acceleration collected by the acceleration sensor at the current collection moment may also include the acceleration of the reference object. Therefore, optionally, the electronic device may determine whether the current displacement information can be used to characterize the relative displacement between the electronic device and the reference object. When the current displacement information is used to characterize the relative displacement between the electronic device and the reference object, the electronic device may update the corresponding movement information of the electronic device based on the current displacement information. When the current displacement information is not used to characterize the relative displacement between the electronic device and the reference object, the electronic device may not update the corresponding movement information of the electronic device based on the current displacement information, so that the movement information can be used to characterize the relative movement between the electronic device and the reference object.

[0065] Optionally, the electronic device can be connected to a reference object for communication to obtain movement information of the reference object, and the movement information may include but is not limited to the movement speed and displacement distance of the reference object. The electronic device can determine whether the current displacement information is the relative displacement information between the electronic device and the reference object based on the movement information of the reference object. Optionally, the electronic device can also determine whether the environment changes based on the environmental data detected by the environmental detection sensor in the current time period. If the environment changes, it can be determined that the current displacement information is the relative displacement information between the electronic device and the reference object. If the environment does not change, it can be determined that the current displacement information is not the relative displacement information between the electronic device and the reference object. Among them, the target sensor may include but is not limited to an image sensor, a laser sensor, etc.

[0066] As an optional implementation, since the absolute acceleration generated by the reference object is usually greater than the absolute acceleration of the electronic device, the electronic device can store a preset acceleration threshold, and the electronic device can determine whether the absolute value of the current acceleration is greater than the acceleration threshold. If the absolute value of the current acceleration is greater than the acceleration threshold, it means that the current reference object is performing variable speed motion, and it can be determined that the current displacement information is not the relative displacement information between the electronic device and the reference object. If the absolute value of the current acceleration is not greater than the acceleration threshold, it means that the current reference object is performing uniform speed motion or remains stationary, and it can be determined that the current displacement information is the relative displacement information between the electronic device and the reference object. Implementing this implementation can improve the convenience of determining whether the current displacement information is relative displacement information.

[0067] In an embodiment of the present application, the electronic device can obtain the current acceleration collected at the current collection moment, and determine the relative speed between the electronic device and the reference object at the current collection moment based on the current acceleration and the absolute speed of the reference object, thereby determining the current displacement information corresponding to the current time period between the previous collection moment and the current collection moment based on the relative speed, and then updating the corresponding movement information of the electronic device based on the current displacement information. By implementing this embodiment, the relative speed between the electronic device and the reference object at the current collection moment can be determined through the current acceleration and the absolute speed of the reference object, and the current displacement information is determined based on the relative speed. This can avoid affecting the movement information detection of the electronic device when the reference object drives the electronic device to move, thereby improving the accuracy of the current displacement information. The movement information is updated through the current displacement information, thereby improving the accuracy of determining the movement information.

[0068] like Figure 3 As shown, Figure 3 : is a flow chart of another method for determining mobile information disclosed in an embodiment of the present application. The method for determining mobile information can be applied to the electronic device in the above embodiment. The method for determining mobile information can include the following steps:

[0069] Step 310: Obtain the current acceleration collected by the acceleration sensor at the current collection time.

[0070] Step 320, determining the absolute speed of the electronic device at the current collection time according to the accelerations collected at each collection time between the initial collection time and the current collection time.

[0071] Optionally, the electronic device can integrate the accelerations collected at each collection moment between the initial collection moment and the current collection moment to determine the absolute speed of the electronic device at the current collection moment. Optionally, the electronic device can also calculate the speed change of each time period based on the accelerations collected at each collection moment between the initial collection moment and the current collection moment, and accumulate the speed change of each time period to obtain the absolute speed of the electronic device at the current collection moment. As shown in formula (1), formula (1) is a calculation formula for representing the absolute speed of the electronic device at the current collection moment,

[0072]

[0073] The current collection time can be the nth collection time, a i is the acceleration collected at the i-th collection moment, Δt i The i-th time period refers to the time period between the i-1-th collection moment and the i-th collection moment.

[0074] Among them, when the electronic device detects the second confirmation operation, it can also output a prompt message to prompt that the electronic device and the reference object should be kept relatively still at the initial moment. Therefore, the relative speed between the electronic device and the reference object at the initial acquisition moment is 0, but the initial absolute speed of the electronic device and the reference object can be 0 or not. Since the initial absolute speed of the electronic device and the reference object has no effect on determining the relative displacement information of the electronic device relative to the reference object, the embodiment of the present application does not limit the initial absolute speed of the electronic device and the reference object. Therefore, the absolute speed in the above embodiment can refer to the absolute speed change from the initial acquisition moment to the current acquisition moment.

[0075] Step 330 , determining the relative speed between the electronic device at the current collection time and the reference object according to the absolute speed of the electronic device at the current collection time and the absolute speed of the reference object.

[0076] The electronic device can obtain the absolute speed of the reference object, and subtract the absolute speed of the reference object from the absolute speed of the electronic device at the current acquisition time to obtain the relative speed between the electronic device and the reference object at the current acquisition time. The electronic device can update the absolute speed of the reference object from the initial acquisition time to obtain the absolute speed of the reference object at the current time. As shown in formula (2), formula (2) is the calculation formula for the relative speed between the electronic device and the reference object at the current acquisition time,

[0077] Δv=v n -v m Formula (2);

[0078] Among them, v m is the absolute speed of the reference object, and Δv is the relative speed between the electronic device and the reference object at the current acquisition moment.

[0079] Optionally, the electronic device can be communicatively connected with a reference object to obtain the absolute speed of the reference object, wherein the electronic device can send a speed acquisition request to the reference object, and the reference object can send the absolute speed of the reference object to the electronic device based on the speed acquisition request, and optionally, the sending time of the speed acquisition request can be synchronized with the collection time.

[0080] Optionally, the electronic device may also obtain an environmental image through an image sensor to extract speed information features from the environmental image to obtain the absolute speed of the reference object. For example, an electronic device on a high-speed train may capture an environmental image, which may contain speed information. In an application scenario example, a user may measure the length of a high-speed train carriage through an electronic device. The user may hold the electronic device and move it from one side of the high-speed train carriage to the other side, and the electronic device may capture the display screen in the high-speed train vehicle. The electronic device may determine the absolute speed of the high-speed train through the environmental image, thereby determining the relative speed between the electronic device and the high-speed train at the current acquisition time, and then determine the current displacement information of the electronic device through subsequent steps to obtain the length of the high-speed train carriage.

[0081] Step 340, integrating the relative speed in the current time period to obtain current displacement information corresponding to the current time period, where the current displacement information includes a first displacement vector.

[0082] Specifically, as shown in formula (3), formula (3) is used to represent the calculation formula of the first displacement vector,

[0083] x n =∫ΔvdΔt n Formula (3);

[0084] Among them, Δt n is the nth time period, i.e. the current time period, x n is the first displacement vector corresponding to the nth time period, that is, the first displacement vector corresponding to the current time period.

[0085] Step 350: Add the second displacement vector to the first displacement vector to obtain a new second displacement vector, where the second displacement vector is used to represent the movement information corresponding to the electronic device.

[0086] Before updating, the second displacement vector may be the cumulative displacement vector of the electronic device relative to the reference object in the time period from the initial acquisition moment to the previous acquisition moment. After updating, the new second displacement vector may be the cumulative displacement vector of the electronic device relative to the reference object in the time period from the initial acquisition moment to the current acquisition moment.

[0087] Step 360, determining the displacement distance according to the new second displacement vector.

[0088] The electronic device may perform scalarization processing on the new second displacement vector to determine a displacement distance, which is the vector magnitude of the second displacement vector.

[0089] In an embodiment of the present application, the electronic device can also determine the absolute speed of the electronic device at the current collection time according to the acceleration collected at each collection time between the initial collection time and the current collection time, and determine the relative speed between the electronic device and the reference object at the current collection time according to the absolute speed of the electronic device at the current collection time and the absolute speed of the reference object, thereby improving the accuracy of the relative speed. The electronic device can also integrate the relative speed in the current time period to obtain the current displacement information corresponding to the current time period, thereby improving the accuracy of the current displacement information. The electronic device then obtains a new second displacement vector by adding the second displacement vector to the first displacement vector, and determines the displacement distance according to the new second displacement vector, and can measure the displacement distance under the curve movement, avoiding the integration of the displacement distance, thereby determining it as the movement distance of the electronic device, meeting the end-to-end displacement measurement requirements of the user.

[0090] like Figure 4 As shown, Figure 4 : is a flow chart of another method for determining mobile information disclosed in an embodiment of the present application. The method for determining mobile information can be applied to the electronic device in the above embodiment. The method for determining mobile information can include the following steps:

[0091] Step 410: Obtain the current acceleration collected by the acceleration sensor at the current collection time.

[0092] Step 420: Determine the relative speed between the electronic device and the reference object at the current acquisition time according to the current acceleration and the absolute speed of the reference object.

[0093] Step 430, determining the current displacement information corresponding to the current time period according to the relative speed.

[0094] The methods of steps 410 to 430 may refer to the methods of steps 210 to 230 in the above embodiment, which will not be described in detail.

[0095] Step 440: Acquire multiple frames of images captured by the image sensor in the current time period.

[0096] The electronic device may also include an image sensor, and there is no restriction on the shooting position of the image sensor. When the acceleration sensor collects acceleration at each collection time, the image sensor may synchronously collect images, and the electronic device may obtain multiple frames of images collected by the image sensor in the current time period. The current time period includes the previous collection time and the current collection time. The multiple frames of images collected by the image sensor in the current time period may include images collected at the previous collection time and the current collection time. Optionally, the image sensor may not synchronously collect images at the frequency at which the acceleration sensor collects acceleration, but collect images at a third preset frequency. It can be understood that in order to enable the image sensor to collect multiple frames of images in each time period, the third preset frequency may be higher than the second preset frequency.

[0097] Step 450: determine whether there is a relative displacement between the electronic device and the reference object within the current time period based on the multiple frames of images.

[0098] The electronic device can extract the target features corresponding to the target image, and the target features may include image object features and / or image background features, without limitation. The electronic device then determines whether the target features corresponding to each frame of the target image have position changes based on the image position information of the target features corresponding to each frame of the target image. If the target features corresponding to each frame of the target image have position changes, it is determined that there is a relative displacement between the electronic device and the reference object in the current time slice. If the target features corresponding to each frame of the target image do not have position changes, it is determined that there is no relative displacement between the electronic device and the reference object in the current time slice. Optionally, the electronic device can also process multiple frames of images using an image stabilization algorithm to eliminate the impact of jitter and improve the accuracy of relative displacement judgment. The image stabilization algorithm may include an OIS (Optical Image Stabilizer) algorithm or a DIS (Digital Image Stabilization) algorithm.

[0099] It is understandable that, since the electronic device is carried by the user to move relative to the reference object, the electronic device and the reference object usually do not accelerate or decelerate at the same time. When the reference object accelerates or decelerates, the electronic device usually remains stationary with the reference object. Only when the reference object remains absolutely stationary or moves at a constant speed, the user carries the electronic device to move. However, if the acceleration collected at each collection moment is considered to be the acceleration of the electronic device relative to the reference object, the determination of the movement information will also be wrong, that is, the determined movement information is not the relative displacement of the electronic device relative to the reference object, but the relative displacement relative to the ground. Therefore, in the case of determining that there is a relative displacement between the electronic device and the reference object in the current time slice, the electronic device can determine that the current displacement information is the relative displacement information between the electronic device and the reference object. In the case of determining that there is no relative displacement between the electronic device and the reference object in the current time slice, the electronic device can determine that the current displacement information is the displacement information of the reference object in the current time period.

[0100] If there is a relative displacement between the electronic device and the reference object in the current time period, step 460 may be executed; if there is no relative displacement between the electronic device and the reference object in the current time period, step 470 and / or 480 may be executed.

[0101] Step 460: Update the movement information corresponding to the electronic device according to the current displacement information.

[0102] In order to improve the updating efficiency of the movement information, the electronic device can synchronously execute steps 410 to 430 and steps 440 to 450, so that when it is determined that there is a relative displacement between the electronic device and the reference object in the current time period, the movement information corresponding to the electronic device can be updated immediately according to the previous displacement information. In addition, while updating the movement information corresponding to the electronic device according to the current displacement information, the electronic device can also obtain the acceleration collected at the next collection moment, and execute steps 410 to 430 and steps 440 to 450 corresponding to the next collection moment, thereby further improving the updating efficiency of the movement information.

[0103] Step 470: Do not update the movement information corresponding to the electronic device.

[0104] If there is no relative displacement between the electronic device and the reference object in the current time period, it means that the current displacement information is the displacement information of the reference object in the current time period, and the electronic device and the reference object remain stationary, then the movement information corresponding to the electronic device may not be updated, thereby improving the accuracy of the movement information determination.

[0105] Step 480: Update the absolute velocity of the reference object according to the current acceleration.

[0106] If there is no relative displacement between the electronic device and the reference object in the current time period, it means that the current acceleration can be used to characterize the acceleration of the reference object in the current time period, and the electronic device can update the absolute speed of the reference object according to the current acceleration. The initial absolute speed of the reference object can be predetermined.

[0107] At the initial acquisition moment, that is, before the first acquisition moment, the electronic device can remain stationary with the reference object. In one embodiment, the electronic device can control the acceleration sensor to acquire acceleration at a preset moment before the initial acquisition moment, and the electronic device can determine the absolute speed of the reference object at the initial acquisition moment based on the acceleration acquired at the preset moment, the acceleration acquired at the initial acquisition moment, and the preset time period between the preset moment and the initial acquisition moment. Optionally, the preset time period can be a smaller time period, so the preset time period can be considered as a time period in which a reference object performs uniform acceleration or uniform deceleration motion, and the electronic device can determine the absolute speed of the reference object at the initial acquisition moment based on the acceleration acquired at the initial acquisition moment and the preset time period between the preset moment and the initial acquisition moment. By implementing this embodiment, the absolute speed of the reference object at the initial acquisition moment can be determined, thereby improving the accuracy of the absolute speed update.

[0108] To explain in another form, the electronic device can divide the time period into a first time period and a second time period, the first time period being the time period of relative displacement between the electronic device and the reference object, and the second time period being the time period when there is no relative displacement between the electronic device and the reference object. When the current time period is the first time period, the electronic device can update the movement information corresponding to the electronic device according to the current displacement information, so that the displacement information corresponding to each first time period is accumulated to obtain the movement information corresponding to the electronic device. When the current time period is the second time period, the electronic device can update the absolute speed of the reference object according to the current acceleration, so that the speed change corresponding to each second time period is accumulated to obtain the absolute speed corresponding to the reference object.

[0109] like Figure 5 As shown, Figure 5 is a modular schematic diagram of a mobile information determination device disclosed in an embodiment of the present application. The mobile information determination device 500 can be applied to the electronic device in the above embodiment. The mobile information determination device 500 may include an acceleration acquisition module 510, a relative speed determination module 520, a displacement information determination module 530 and a mobile information update module 540, wherein:

[0110] The acceleration acquisition module 510 is used to acquire the current acceleration collected by the acceleration sensor at the current collection time;

[0111] The relative speed determination module 520 is used to determine the relative speed between the electronic device and the reference object at the current acquisition time according to the current acceleration and the absolute speed of the reference object; the reference object can drive the electronic device to move;

[0112] The displacement information determination module 530 is used to determine the current displacement information corresponding to the current time period according to the relative speed, and the current time period is the time period between the last acquisition time and the current acquisition time;

[0113] The movement information updating module 540 is used to update the movement information corresponding to the electronic device according to the current displacement information.

[0114] In one embodiment, the electronic device may further include an image sensor, and the movement information determination device 500 may further include a relative displacement judgment module, which is used to obtain multiple frames of images collected by the image sensor in a current time period; based on the multiple frames of images, determine whether there is a relative displacement between the electronic device and the reference object in the current time period; if there is a relative displacement between the electronic device and the reference object in the current time period, execute the step of updating the movement information corresponding to the electronic device according to the current displacement information.

[0115] In one embodiment, the relative displacement judgment module is further configured to not update the movement information corresponding to the electronic device if there is no relative displacement between the electronic device and the reference object within the current time period.

[0116] In one embodiment, the relative displacement judgment module is further used to update the absolute speed of the reference object according to the current acceleration if there is no relative displacement between the electronic device and the reference object in the current time period.

[0117] In one embodiment, the relative speed determination module 520 is further used to determine the absolute speed of the electronic device at the current collection time based on the acceleration collected at each collection time between the initial collection time and the current collection time; and to determine the relative speed between the electronic device and the reference object at the current collection time based on the absolute speed of the electronic device at the current collection time and the absolute speed of the reference object.

[0118] In one embodiment, the displacement information determination module 530 is further used to integrate the relative speed in the current time period to obtain the current displacement information corresponding to the current time period.

[0119] In one embodiment, the current displacement information includes a first displacement vector, and the movement information corresponding to the electronic device includes a second displacement vector; the movement information update module 540 is also used to add the second displacement vector to the first displacement vector to obtain a new second displacement vector; and determine the displacement distance based on the new second displacement vector.

[0120] In an embodiment of the present application, the electronic device can obtain the current acceleration collected at the current collection moment, and determine the relative speed between the electronic device and the reference object at the current collection moment based on the current acceleration and the absolute speed of the reference object, thereby determining the current displacement information corresponding to the current time period between the previous collection moment and the current collection moment based on the relative speed, and then updating the corresponding movement information of the electronic device based on the current displacement information. By implementing this embodiment, the relative speed between the electronic device and the reference object at the current collection moment can be determined through the current acceleration and the absolute speed of the reference object, and the current displacement information is determined based on the relative speed. This can avoid affecting the movement information detection of the electronic device when the reference object drives the electronic device to move, thereby improving the accuracy of the current displacement information. The movement information is updated through the current displacement information, thereby improving the accuracy of determining the movement information.

[0121] like Figure 6 As shown, in one embodiment, an electronic device is provided, which may include:

[0122] A memory 610 storing executable program codes;

[0123] a processor 620 coupled to the memory 610;

[0124] The processor 620 calls the executable program code stored in the memory 610 to implement the movement information determination method provided in the above embodiments.

[0125] The memory 610 may include a random access memory (RAM) or a read-only memory (ROM). The memory 610 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 610 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the electronic device during use, etc.

[0126] The processor 620 may include one or more processing cores. The processor 620 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 610, and calling data stored in the memory 610. Optionally, the processor 620 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 620 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 620, but may be implemented separately through a communication chip.

[0127] It is understandable that the electronic device may include more or fewer structural elements than those in the above structural block diagram, for example, a power module, physical buttons, a WiFi (Wireless Fidelity) module, a speaker, a Bluetooth module, a sensor, etc., and no limitation is made here.

[0128] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the methods described in the above embodiments.

[0129] In addition, an embodiment of the present application further discloses a computer program product. When the computer program product is run on a computer, the computer can execute all or part of the steps in any one of the mobile information determination methods described in the above embodiments.

[0130] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0131] The above is a detailed introduction to a mobile information determination method, device, electronic device and storage medium disclosed in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for determining mobile information, characterized in that: Applied to an electronic device, the electronic device includes an acceleration sensor, and the method includes: Obtaining the current acceleration collected by the acceleration sensor at the current collection moment; Determine the relative speed between the electronic device and the reference object at the current acquisition time according to the current acceleration and the absolute speed of the reference object; the reference object can drive the electronic device to move; Determine the current displacement information corresponding to the current time period according to the relative speed, wherein the current time period is the time period between the last acquisition time and the current acquisition time; According to the current displacement information, the movement information corresponding to the electronic device is updated.

2. The method according to claim 1, characterized in that The electronic device includes an image sensor, and before updating the movement information corresponding to the electronic device according to the current displacement information, the method further includes: Acquire multiple frames of images captured by the image sensor in the current time period; Determining, based on the multiple frames of images, whether there is a relative displacement between the electronic device and the reference object within the current time period; If there is a relative displacement between the electronic device and the reference object within the current time period, a step of updating the movement information corresponding to the electronic device according to the current displacement information is performed.

3. The method according to claim 2, characterized in that After determining whether there is a relative displacement between the electronic device and the reference object within the current time period according to the multiple frames of images, the method further includes: If there is no relative displacement between the electronic device and the reference object within the current time period, the movement information corresponding to the electronic device is not updated.

4. The method according to claim 2, characterized in that: After determining whether there is a relative displacement between the electronic device and the reference object within the current time period according to the multiple frames of images, the method further includes: If there is no relative displacement between the electronic device and the reference object within the current time period, the absolute velocity of the reference object is updated according to the current acceleration.

5. The method according to any one of claims 1 to 4, characterized in that: The determining, according to the current acceleration and the absolute speed of the reference object, the relative speed between the electronic device and the reference object at the current acquisition moment comprises: Determine the absolute speed of the electronic device at the current collection time according to the acceleration collected at each collection time between the initial collection time and the current collection time; The relative speed between the electronic device at the current acquisition moment and the reference object is determined according to the absolute speed of the electronic device at the current acquisition moment and the absolute speed of the reference object.

6. The method according to claim 1, characterized in that The determining the current displacement information corresponding to the current time period according to the relative speed includes: The relative speed is integrated within a current time period to obtain current displacement information corresponding to the current time period.

7. The method according to claim 1, characterized in that The current displacement information includes a first displacement vector, the movement information corresponding to the electronic device includes a second displacement vector, and updating the movement information corresponding to the electronic device according to the current displacement information includes: Adding the second displacement vector to the first displacement vector to obtain a new second displacement vector; The displacement distance is determined according to the new second displacement vector.

8. A mobile information determining device, characterized in that: Applied to electronic equipment, the electronic equipment includes an acceleration sensor, and the device includes: An acceleration acquisition module, used to acquire the current acceleration collected by the acceleration sensor at the current collection moment; A relative speed determination module, used to determine the relative speed between the electronic device and the reference object at the current acquisition time according to the current acceleration and the absolute speed of the reference object; the reference object can drive the electronic device to move; A displacement information determination module, used to determine the current displacement information corresponding to the current time period according to the relative speed, wherein the current time period is the time period from the last acquisition moment to the current acquisition moment; The movement information updating module is used to update the movement information corresponding to the electronic device according to the current displacement information.

9. An electronic device, characterized in that: include: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.