A driving direction acquisition method, system, storage medium and terminal device

By calculating the relative directional difference between sensor data and positioning information on the terminal device, the problem of dependence on map information in the prior art is solved, and the vehicle driving direction can be obtained in the absence of a map, with strong scalability and accuracy.

CN116263336BActive Publication Date: 2025-11-28TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111539917.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2025-11-28
Estimated Expiration
2041-12-15

AI Technical Summary

Technical Problem

Existing methods for obtaining vehicle direction of travel rely on map information, which limits their widespread application across various terminal devices.

Method used

By acquiring sensor data and positioning information from terminal devices at multiple time points, the relative direction is calculated, and the difference between the driving direction and the relative direction is determined using a preset correspondence, thereby obtaining the driving direction of the target object and avoiding dependence on map data.

Benefits of technology

It achieves accurate vehicle direction acquisition without relying on map data, is highly scalable, and is suitable for various terminal devices, especially providing navigation support in environments without map information, such as basements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116263336B_ABST
    Figure CN116263336B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a driving direction acquisition method and system, a storage medium and a terminal device, and are applied to the technical field of information processing. When the terminal device is in a mounted state, the relative directions of each time point are calculated through sensor data of the terminal device at multiple time points, and then the difference value between the driving direction and the relative direction of a target object mounted by the terminal device is obtained by combining the positioning information of each time point and the preset corresponding relationship, and then the driving direction of the target object mounted by the terminal device can be acquired based on the difference value. In this process, the terminal device does not need to rely on other map data, but can acquire the driving direction of the target object based on sensor data and positioning information. The sensor data and positioning information can be collected by any terminal device itself, so that the dependence on other data is small when the driving direction is acquired, and the expansibility is strong.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information processing, in particular to a driving direction acquisition method, system, storage medium and terminal device. BACKGROUND

[0002] In the field of vehicle navigation, the Bluetooth information collected by the terminal device mounted in the vehicle can be used to acquire the driving direction of the vehicle. For example, when the vehicle is driving in a garage, the current road where the terminal device is located can be acquired according to the current Bluetooth position of the terminal device under the condition that the map of the garage is known, so that the approximate direction of the terminal device can be obtained, and the exact driving direction of the terminal device can be further obtained by combining the historical Bluetooth position of the terminal device.

[0003] However, the existing vehicle driving direction acquisition method depends on the map information of the area where the vehicle is currently located, and the driving direction of the vehicle can only be obtained in the case that the map information is available, which is not conducive to the popularization of the existing driving direction acquisition method in various terminal devices. SUMMARY

[0004] The embodiments of the present application provide a driving direction acquisition method, system, storage medium and terminal device, and provide a driving direction acquisition method with less dependence on map data.

[0005] In one aspect, the embodiments of the present application provide a driving direction acquisition method, comprising:

[0006] obtaining sensor data and positioning information of a terminal device at multiple time points;

[0007] when the terminal device is in a mounted state, calculating the relative direction of the terminal device at the multiple time points according to the sensor data at the multiple time points, respectively;

[0008] determining the difference value between the driving direction and the relative direction of the target object mounted by the terminal device according to the relative direction at the multiple time points, the positioning information and the preset corresponding relationship; the corresponding relationship is a functional relationship between the positioning information, the relative direction and the difference value;

[0009] acquiring the driving direction of the target object mounted by the terminal device according to the difference value and the relative direction of the terminal device.

[0010] In another aspect, the embodiments of the present application provide a driving direction acquisition system, comprising:

[0011] an information acquisition unit, configured to obtain sensor data and positioning information of a terminal device at multiple time points;

[0012] A direction calculation unit is used to calculate the relative direction of the terminal device at the multiple time points based on the sensor data at the multiple time points when the terminal device is in a mounted state.

[0013] The difference determination unit is used to determine the difference value between the driving direction and the relative direction of the target object mounted on the terminal device based on the relative direction, positioning information and preset correspondence at the multiple time points; the correspondence is a functional relationship between positioning information, relative direction and difference value.

[0014] The driving direction unit is used to obtain the driving direction of the target object mounted on the terminal device based on the difference value and the relative direction of the terminal device.

[0015] Another aspect of the present invention provides a computer-readable storage medium storing a plurality of computer programs adapted for loading by a processor and executing the driving direction acquisition method as described in one aspect of the present invention.

[0016] Another embodiment of the present invention provides a terminal device, including a processor and a memory;

[0017] The memory is used to store multiple computer programs, which are loaded and executed by a processor as described in one aspect of the present invention for obtaining the driving direction; the processor is used to implement each of the multiple computer programs.

[0018] As can be seen, in the method of this embodiment, when the terminal device is in a mounted state, the relative direction at each time point is calculated using sensor data from the terminal device at multiple time points. Then, by combining the positioning information at each time point with a preset correspondence, the difference between the driving direction of the target object mounted on the terminal device and its relative direction is obtained. Based on this difference, the driving direction of the target object mounted on the terminal device can be obtained. In this process, the terminal device does not need to rely on other map data; it can obtain the driving direction of the target object based on sensor data and positioning information. Furthermore, any terminal device can easily acquire sensor data and positioning information, making the reliance on other data for obtaining the driving direction relatively small and highly scalable. In addition, this embodiment of the invention considers the difference between the direction calculated from the terminal device using sensor data and the actual driving direction of the target object, resulting in a more accurate obtained driving direction of the target object. Attached Figure Description

[0019] In order to make the technical solutions of the embodiments of the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description only need to be some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor.

[0020] Figure 1 is a schematic diagram of a driving direction acquisition method provided by an embodiment of the present application;

[0021] Figure 2 is a flowchart of a driving direction acquisition method provided by an embodiment of the present application;

[0022] Figure 3a is a schematic diagram of a coordinate axis of a terminal device in a mounting state in an embodiment of the present application;

[0023] Figure 3b is a schematic diagram of a coordinate axis of an adjusted terminal device in an embodiment of the present application;

[0024] Figure 3c is a schematic diagram of a coordinate axis of a terminal device in another mounting state in an embodiment of the present application;

[0025] Figure 4 is a flowchart of a driving direction acquisition method in an application embodiment of the present application;

[0026] Figure 5 is a schematic diagram of a distributed system to which a driving direction acquisition method in another application embodiment of the present application is applied;

[0027] Figure 6 is a schematic diagram of a block structure in another application embodiment of the present application;

[0028] Figure 7 is a logical structure schematic diagram of a driving direction acquisition system provided by an embodiment of the present application;

[0029] Figure 8 is a logical structure schematic diagram of a terminal device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0030] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.

[0031] The terms "first", "second", "third", "fourth" and the like in the description and in the claims of the present application, and above-described drawings, if any, are used to distinguish between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so-termed, data, can be interchanged, where appropriate, to enable the embodiments of the application described herein to be carried out in other than the order depicted or described herein. Also, the terms "comprises", "comprising", "includes", "including" and any change thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or apparatus that comprises a list of steps or units not necessarily limited to those explicitly listed, but can include other steps or units not expressly listed or inherent to such process, method, product, or apparatus.

[0032] The embodiments of the present application provide a driving direction acquisition method, which can be mainly applied to a terminal device with positioning function, such as Figure 1 As shown in the figure, the terminal device can acquire the driving direction of the target object mounted by the terminal device according to the following method:

[0033] Acquire sensor data and positioning information of the terminal device at multiple time points; when the terminal device is in a mounted state, calculate the relative direction of the terminal device at the multiple time points according to the sensor data at the multiple time points respectively; determine the difference value between the driving direction and the relative direction of the target object mounted by the terminal device according to the relative direction at the multiple time points, the positioning information and the preset corresponding relationship; the corresponding relationship is a functional relationship between the positioning information, the relative direction and the difference value; and acquire the driving direction of the target object mounted by the terminal device according to the difference value and the relative direction of the terminal device.

[0034] In actual application, the terminal device can specifically include but is not limited to a mobile phone, a computer, a smart voice interactive device, a vehicle-mounted terminal and the like.

[0035] In this way, in the process of acquiring the driving direction, the terminal device does not need to rely on other map data, but can acquire the driving direction of the target object based on the sensor data and the positioning information. The sensor data and the positioning information can be simply acquired by any terminal device itself, so that the dependence on other data is small when acquiring the driving direction, and the expansibility is strong. In addition, the difference between the direction of the terminal device calculated by the sensor data and the actual driving direction of the target object is considered in the embodiments of the present application, so that the driving direction of the target object acquired finally is more accurate.

[0036] The embodiments of the present application provide a driving direction acquisition method, which is mainly a method executed by a terminal device, and the flow chart is as shown in Figure 2 The embodiments of the present application provide a driving direction acquisition method, which is mainly a method executed by a terminal device, and the flow chart is as shown in

[0037] In step 101, sensor data and positioning information of the terminal device at multiple time points are acquired.

[0038] It can be understood that the terminal device in the embodiment can be mounted on a target object, such as the terminal device being installed on a support of a vehicle or placed on the vehicle, and so on, and then the terminal device and the target object are in a stable state, and at this time, the terminal device can be considered to be in a mounted state, and the terminal device runs along with the running of the target object. If the user holds the terminal device on the target object, the terminal device and the target object are not in a stable state, and at this time, the terminal device can be considered to be in a non-mounted state. In this way, for the terminal device in the mounted state, the driving direction acquisition process of the embodiment can be initiated according to a preset period, or the driving direction acquisition process of the embodiment can be initiated when a preset event (such as the target object mounted by the terminal device entering a basement space, and so on) occurs.

[0039] The terminal device of the embodiment has positioning functions, such as Wireless-Fidelity (WI-FI) positioning, Ultra Wideband (UWB) positioning, Global Positioning System (GPS) positioning, and Bluetooth positioning, and so on. In addition, sensors such as an accelerometer, a gyroscope sensor, and a magnetic field sensor, and so on are also arranged in the terminal device. In this way, the terminal device can acquire positioning information and sensor data of the terminal device at each time point, and the sensor data can mainly include acceleration data and gyroscope data of the terminal device, and so on.

[0040] The accelerometer can perceive the acceleration of the terminal device in any direction, perceive the movement behavior of the terminal device, and then the acceleration data at any time point can include the acceleration size and direction of the terminal device in the axial direction. The gyroscope sensor can perceive the rotation angular rate value of the terminal device around a certain axial direction, and can accurately perceive the intensity of the movement of the terminal device, and then the gyroscope data at any time point can include the rotation angle of the terminal device around the axial direction, and so on.

[0041] In step 102, when the terminal device is in the mounted state, the relative directions of the terminal device at the multiple time points are calculated according to the sensor data at the multiple time points.

[0042] The terminal device can first determine whether the terminal device is in the mounted state according to the above-mentioned acquired sensor data. Specifically, the terminal device can calculate the roll and pitch of the terminal device according to the acceleration data in the sensor data at the multiple time points, and then determine whether the terminal device is in the mounted state according to the roll and the pitch.

[0043] Wherein, the roll angle is a rotation angle along the x-axis of the terminal device, the pitch angle is a rotation angle along the y-axis of the terminal device, and the rotation angle of the terminal device along the z-axis is a yaw angle. The terminal device can use an Automatic Heading Reference System (AHRS) or an Inertial Navigation System (INS) algorithm to calculate the roll and pitch. Alternatively, the terminal device can obtain the roll and pitch of the terminal device by using a rotation vector sensor or magnetic yaw angle data. Here, the AHRS is a kind of attitude and heading reference system, which is a commonly used attitude acquisition algorithm in the field of navigation and positioning.

[0044] When the terminal device determines whether the terminal device is in a mounted state according to the roll angle and the pitch angle, the terminal device can determine according to a preset classification model. The classification model is a machine learning model based on artificial intelligence, which can be trained in advance by a certain training method and the running logic thereof is stored in the terminal device. The classification model can extract features of the roll angle and the pitch angle, and obtain information of whether the terminal device is in a mounted state based on the extracted features. Alternatively, the terminal device can obtain an angle between a coordinate system of the terminal device and a coordinate system of the natural world (for example, a coordinate system with three axes of north, east and ground) according to the roll angle and the pitch angle, and then determine whether the terminal device is in a mounted state according to the angle. For example, when the angle remains unchanged or changes less than a certain range within a period of time, it can be considered that the terminal device is in a mounted state, otherwise the terminal device is in a non-mounted state.

[0045] Wherein, artificial intelligence (AI) is to use a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, and artificial intelligence attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machine has the functions of perception, reasoning and decision-making.

[0046] Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, both hardware and software technologies. Artificial intelligence basic technologies generally include sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.

[0047] Machine Learning (ML) is a multi-disciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is a specialized study of how computers simulate or implement human learning behavior to acquire new knowledge or skills, reorganize existing knowledge structure, and continuously improve performance. Machine learning is the core of artificial intelligence and the fundamental approach to making computers intelligent. It is applied in various fields of artificial intelligence. Machine learning and deep learning generally include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.

[0048] Further, the terminal device calculates the relative direction of the terminal device at each time point according to the sensor data at each time point. Here, the relative direction refers to the angle change between the coordinate system of the terminal device and the coordinate system of nature, specifically the rotation angle of the terminal device along the coordinate axis currently pointing to the sky. Specifically, the terminal device can first adjust the coordinate axis of the terminal device to obtain an adjusted coordinate axis, and then calculate the relative direction of the terminal device at each time point based on the adjusted coordinate axis, so that the calculated relative direction is more accurate. That is, the coordinate system of the terminal device itself is first adjusted to another coordinate system, and the angle change between the adjusted coordinate system and the coordinate system of nature is calculated. The calculation of the relative direction can be calculated by using AHRS, INS, etc. or using some types of terminal device rotation vector sensors or magnetic heading angle data to obtain the relative direction.

[0049] For example Figure 3a The coordinate system of the terminal device is shown, which includes x-axis, y-axis and z-axis. Wherein, the terminal device is mounted on the target object in the vertical state as shown in Figure 3a , the y-axis points to the sky, the x-axis points to the right, and the z-axis points to the front. Therefore, the z-axis of the terminal device is consistent with the forward direction of the target object, and when the target object turns, the y-axis of the terminal device is the sensitive axis of the turning angle change, and the pitch of the terminal device along the y-axis can better reflect the direction of the target object. Therefore, the relative direction of the terminal device at each time point calculated by the terminal device is the pitch angle.

[0050] When the terminal device is in the mounted state, the pitch angle of the terminal device along the y-axis has a singular value problem, but the yaw angle along the z-axis does not have this problem. Therefore, the coordinate axis of the terminal device needs to be adjusted. Specifically, the original y-axis and z-axis of the terminal device are exchanged. In actual application, a 3x3 matrix with a determinant value of 1 can be multiplied on the left of the original coordinate axis. When the values in the matrix only contain 0, 1 and -1, it is equivalent to axis change. For example: [0, 1, 0]*[x] = [y], [0, 0, 1]*[y] = [z], [1, 0, 0]*[z] = [x].

[0051] After the coordinate axis of the terminal device is adjusted, the coordinate axis of the terminal device is as shown in FIG. 3B, the rotation angle of the terminal device along the adjusted y-axis calculated based on the adjusted coordinate axis is the yaw angle, and the rotation angle along the adjusted z-axis is the pitch angle, that is, the relative direction of the terminal device, and there is no problem of singular value, so that the determined relative direction is more accurate. Figure 3b

[0052] It should be noted that the directions of the x-axis, the y-axis and the z-axis of the terminal device will change with the state of the terminal device mounted on the target object, for example, as shown in FIG. 3B, when the terminal device is mounted horizontally on the target object, the z-axis of the terminal device also points to the sky, the y-axis points to the left, and the x-axis points to the upper side, so that the z-axis of the terminal device is the sensitive axis of the turning angle change of the target object at this time, and the rotation angle of the terminal device along the z-axis, that is, the yaw, can better reflect the direction of the target object, and the relative direction of the terminal device calculated at each time point is the yaw angle. Figure 3c

[0053] In step 103, the difference value between the driving direction and the relative direction of the target object mounted by the terminal device is determined according to the relative direction at multiple time points, the positioning information and the preset corresponding relationship, and the corresponding relationship is a functional relationship between the positioning information, the relative direction and the difference value.

[0054] Specifically, the terminal device can create a plurality of corresponding relationship groups according to the relative direction at multiple time points, the positioning information and the preset corresponding relationship, any corresponding relationship group includes: the difference value between the positioning information of any two adjacent time points, and the functional relationship between the speed information of the terminal device at one of the two adjacent time points, the relative direction and the difference value; the difference value between the driving direction and the relative direction of the terminal device is obtained by iterative calculation according to a plurality of corresponding relationship groups.

[0055] The positioning information of any two adjacent time points refers to the positioning information of adjacent time points corresponding to multiple time points t1, t2, …, tn, which can include: the positioning information corresponding to time point t1 and time point t2, the positioning information corresponding to time point t2 and time point t3, …, and the positioning information corresponding to time point tn-1 and time point tn. Therefore, if the relative direction and the positioning information of n time points in the above steps are obtained, n-1 corresponding relationship groups can be created, and the difference value between the driving direction and the relative direction of the target object mounted by the terminal device can be obtained by iterative calculation of the n-1 corresponding relationship groups. The iterative calculation can include but is not limited to any one of the following algorithms: gradient descent method, Levenberg-Marquardt (L-M) method and Gauss-Newton iteration method, etc. ​​

[0056] Further, when the terminal device iteratively calculates the difference value between the driving direction of the target object mounted by the terminal device and the relative direction according to the plurality of corresponding relationship groups, the terminal device can first set an initial value of the difference value and a target function of the iterative calculation; adjust the initial value of the difference value according to the plurality of corresponding relationship groups, so that the target function satisfies a preset condition, to obtain an adjusted difference value; and take the adjusted difference value as the difference value between the driving direction of the target object mounted by the terminal device and the relative direction.

[0057] Wherein, when setting the initial value of the difference value, the following several ways can be adopted, but are not limited to:

[0058] (1) The absolute direction of the terminal device is determined by the positioning information of the terminal device at any time point, and the difference value between the absolute direction and the relative direction of the terminal device at the corresponding time point is taken as the initial value of the difference value.

[0059] (2) The data provided by some sensors of the terminal device, such as a rotation vector sensor, is taken as the absolute direction of the terminal device, and then the difference value between the absolute direction and the relative direction of the terminal device is taken as the initial value of the difference value.

[0060] (3) The initial value is directly set as a fixed value, such as 0.

[0061] (4) The historical data of the difference value is taken as the initial value of the difference value. Here, the historical data of the difference value refers to the difference value obtained when the terminal device initiates the driving direction acquisition process before initiating the process of the embodiment, and the data is stored in the terminal device.

[0062] Step 104, according to the difference value determined in step 103 and the relative direction of the terminal device at any time point, the driving direction of the target object mounted by the terminal device is obtained.

[0063] Specifically, the sum of the relative direction of the terminal device at any time point and the difference value is the driving direction of the target object mounted by the terminal device.

[0064] It can be seen that in the method of the embodiment, when the terminal device is in the mounted state, the relative direction of each time point is calculated by the sensor data of the terminal device at the time point, and then the difference value between the driving direction and the relative direction of the target object mounted by the terminal device is obtained by combining the positioning information of each time point and the preset corresponding relationship, and then the driving direction of the target object mounted by the terminal device can be obtained based on the difference value. In this process, the terminal device does not need to rely on other map data, but can obtain the driving direction of the target object based on the sensor data and the positioning information. The sensor data and the positioning information can be easily obtained by any terminal device, so that the dependence on other data is small when obtaining the driving direction, and the expansibility is strong. In addition, the difference between the direction of the terminal device and the actual driving direction of the target object is considered in the embodiment, so that the driving direction of the target object obtained finally is more accurate.

[0065] The driving direction obtaining method in the application will be described below with a specific application example. In the embodiment, the target object mounted by the terminal device is a vehicle, the positioning function of the terminal device includes Bluetooth positioning, and a sensor is arranged in the terminal device. The method of the embodiment can include the following steps, as shown in the flowchart of Figure 4

[0066] In step 201, the terminal device is mounted on the support of the vehicle, and during the operation of the vehicle, the terminal device can initiate the flowchart of the embodiment at a certain period. First, the sensor data and the positioning information of multiple time points are obtained. In the embodiment, the positioning information is Bluetooth positioning information, and the sensor data is described in the above embodiment and will not be described here.

[0067] When the number of time points is small (for example, less than 5), the accuracy of the driving direction obtained will be insufficient due to the influence of the Bluetooth positioning error. When the number of time points is greater than 5, the accuracy of the driving direction obtained can basically meet the requirements. When the number of time points reaches 20, the accuracy will not be further improved. Therefore, a small number of time points can be used at the initial stage of obtaining the driving direction, and the number of time points can be gradually increased subsequently.

[0068] In step 202, the terminal device determines whether the terminal device is in the mounted state according to the sensor data of multiple time points. If yes, step 203 is performed; if not, the flowchart is ended.

[0069] In step 203, the terminal device calculates the relative direction of the vehicle mounted by the terminal device at each time point according to the sensor data of multiple time points.

[0070] ​Specifically, the terminal device adjusts the original coordinate axis to obtain an adjusted coordinate axis

[0071] In step 204, the terminal device creates a plurality of corresponding relationship groups according to the relative directions and the Bluetooth positioning information at the plurality of time points obtained in the above steps.

[0072] Specifically, each corresponding relationship group established can be shown in the following formula 1:

[0073]

[0074] wherein subscript k represents the kth time point, ble represents the Bluetooth information, t k , θ k respectively represent the Bluetooth positioning information at the kth time point, the speed scalar, the corresponding time and the relative direction, which are known quantities obtained in the above steps, and x is a difference value to be determined, which is an unknown quantity. and are the Bluetooth positioning information at two adjacent time points.

[0075] The above speed information can be obtained through the Bluetooth positioning information at the k time points, the Bluetooth positioning information at the historical time and the time length. Specifically, in one case, the speed information is obtained by dividing the distance by the time, and then a more accurate and smoother speed result is obtained through weighted average and low-pass filtering.

[0076] In another case, the terminal device obtains the speed information according to the Bluetooth raw observation quantity, i.e. the received signal strength indication (RSSI). Specifically, the RSSI of a Bluetooth beacon received by the terminal device is determined, and the preset exponential function relationship between the RSSI and the distance is combined to obtain the distance change of the terminal device to the Bluetooth beacon, and then the speed of the terminal device is obtained.

[0077] In step 205, the terminal device sets an initial value of the difference value x and sets a target function for iterative calculation.

[0078] Specifically, the initial value of the difference value x can be set in the above four ways, but is not limited to the above four ways. In this embodiment, considering the Bluetooth positioning error and the possible installation angle when the terminal device is mounted on a vehicle, the initial value of the difference value can be set in combination with the ways (1) and (2) in the initial process of obtaining the driving direction of the vehicle, and the initial value of the difference value can be set in combination with the ways (1) and (4) in the subsequent process of obtaining the driving direction of the vehicle.

[0079] The target function set can be represented by formula 2 as follows:

[0080]

[0081] Step 206, adjust the initial value of the difference value according to the plurality of corresponding relationship groups, so that the target function satisfies the preset condition, to obtain the adjusted difference value, and the adjusted difference value is taken as the difference value between the driving direction of the vehicle and the relative direction.

[0082] Specifically, the initial value of the difference value can be adjusted by iterating multiple times (such as 10 times), so that the value v of the target function is minimized, and the accuracy of the adjusted difference value is high. When the value v of the target function is less than the preset value, the adjusted difference value x is effective, otherwise the adjusted difference value x is invalid.

[0083] Step 207, the terminal device determines the driving direction of the vehicle according to the difference value determined in the above steps and the relative direction of the terminal device at any time point. Specifically, the driving mode of the vehicle is the sum of the difference value and the relative direction.

[0084] It can be seen that the driving direction acquisition method in the embodiment can acquire the driving direction of the vehicle. In particular, for the vehicle garage navigation scene, the driving direction of the vehicle can be acquired by using the Bluetooth positioning information in the garage and the sensor data of the terminal device in the fixed state, and then the heading information is provided for the navigation and positioning of the vehicle in the garage. It does not depend on map information, vehicle driving assumption, installation angle estimation, etc., and has small calculation amount and strong real-time performance, and only needs to keep the mobile phone stable (without large amplitude fluctuation of attitude angle) during driving.

[0085] The driving direction acquisition method in the embodiment is mainly a distributed system 100, which can include a client 300 and a plurality of nodes 200 (any form of computing device in the access network, such as a server, a user terminal). The client 300 and the node 200 are connected through network communication.

[0086] Taking the distributed system as a block chain system as an example, referring to Figure 5is an optional structural schematic diagram of a distributed system 100 provided by an embodiment of the present application applied to a blockchain system, formed by a plurality of nodes 200 (any form of computing device in an access network, such as a server, a user terminal) and clients 300, a point-to-point (P2P, Peer To Peer) network is formed between the nodes, and the P2P protocol is an application layer protocol running on a transmission control protocol (TCP, Transmission Control Protocol) protocol. In the distributed system, any machine such as a server, a terminal can join to become a node, and the node includes a hardware layer, an intermediate layer, an operating system layer and an application layer.

[0087] Referring to Figure 5 The functions of the nodes in the blockchain system are shown, and the functions involved include:

[0088] 1) Routing, a basic function of the node, used to support communication between nodes.

[0089] In addition to the routing function, the node can also have the following functions:

[0090] 2) Application, used to be deployed in the blockchain, to implement specific business according to actual business needs, to record data related to the implementation function to form record data, to carry a digital signature in the record data to represent the source of the task data, to send the record data to other nodes in the blockchain system, and to add the record data to the temporary block when the other nodes successfully verify the source and integrity of the record data.

[0091] For example, the business implemented by the application includes code implementing a driving direction acquisition function, which mainly includes:

[0092] Obtaining sensor data and positioning information of a terminal device at a plurality of time points; when the terminal device is in a mounted state, calculating relative directions of the terminal device at the plurality of time points according to the sensor data at the plurality of time points; determining a difference value between a driving direction and a relative direction of a target object mounted by the terminal device according to the relative directions at the plurality of time points, the positioning information and a preset corresponding relationship; the corresponding relationship is a functional relationship between the positioning information, the relative direction and the difference value; and obtaining the driving direction of the target object mounted by the terminal device according to the difference value and the relative direction of the terminal device.

[0093] 3) Blockchain, including a series of blocks (Block) sequentially connected according to the time sequence of generation, once a new block is added to the blockchain, it will not be removed, and the block records the record data submitted by the nodes in the blockchain system.

[0094] Referring to Figure 6An optional schematic diagram of a block structure provided by the embodiment of the present application is shown in the figure, each block includes a hash value of a transaction record stored in the block (hash value of the block) and a hash value of a previous block, and each block is connected by a hash value to form a block chain. In addition, the block can also include information such as a timestamp when the block is generated. The blockchain is essentially a decentralized database, and is a series of data blocks associated by using cryptographic methods, each data block contains relevant information, which is used to verify the validity of the information (anti-fake) and generate the next block.

[0095] The embodiment of the present application also provides a driving direction acquisition system, which can be applied to the terminal device, and a structure diagram thereof is shown in the figure, and the system can specifically include: Figure 7

[0096] An information acquisition unit 10 is configured to acquire sensor data and positioning information of the terminal device at multiple time points.

[0097] A direction calculation unit 11 is configured to calculate relative directions of the terminal device at the multiple time points according to the sensor data at the multiple time points acquired by the information acquisition unit 10 when the terminal device is in a mounted state.

[0098] The direction calculation unit 11 is further configured to calculate a roll angle and a pitch angle of the terminal device according to the acceleration data at the multiple time points when the sensor data includes acceleration data, and determine whether the terminal device is in the mounted state according to the roll angle and the pitch angle of the terminal device.

[0099] The direction calculation unit 11 is specifically configured to adjust a coordinate axis of the terminal device to obtain an adjusted coordinate axis, and calculate the relative directions of the terminal device at the multiple time points based on the adjusted coordinate axis and the sensor data at the multiple time points.

[0100] A difference determination unit 12 is configured to determine a difference value between a driving direction of a target object mounted by the terminal device and the relative direction according to the relative directions at the multiple time points calculated by the direction calculation unit 11, the positioning information and a preset corresponding relationship; the corresponding relationship is a functional relationship between the positioning information, the relative direction and the difference value.

[0101] ​The difference determination unit 12 is specifically configured to create a plurality of corresponding relation groups according to the relative directions, the positioning information of the plurality of time points, and a preset corresponding relation, any corresponding relation group including a difference value between the positioning information of any two adjacent time points, and a function relation between the speed information, the relative direction, and the difference value of the terminal device at one of the two adjacent time points; and iteratively calculating according to the plurality of corresponding relation groups to obtain a difference value between the driving direction of the target object mounted by the terminal device and the relative direction.

[0102] In the difference determination unit 12, when iteratively calculating according to the plurality of corresponding relation groups to obtain the difference value between the driving direction of the target object mounted by the terminal device and the relative direction, the difference determination unit 12 is specifically configured to set an initial value of the difference value, and set a target function of the iterative calculation; adjust the initial value of the difference value according to the plurality of corresponding relation groups, so that the target function satisfies a preset condition, to obtain an adjusted difference value; and take the adjusted difference value as the difference value between the driving direction of the target object mounted by the terminal device and the relative direction.

[0103] In the difference determination unit 12, when setting the initial value of the difference value, the difference determination unit 12 is specifically configured to determine an absolute direction of the terminal device through the positioning information of the terminal device at any time point, take a difference value between the absolute direction and the relative direction of the terminal device at the corresponding time point as the initial value of the difference value; or take certain sensor data in the terminal device as the absolute direction of the terminal device, and take a difference value between the absolute direction and the relative direction of the terminal device as the initial value of the difference value; or set the initial value of the difference value as a fixed value; or take historical data of the difference value as the initial value of the difference value.

[0104] The driving direction unit 13 is configured to obtain the driving direction of the target object mounted by the terminal device according to the difference value determined by the difference determination unit 12 and the relative direction of the terminal device.

[0105] It can be seen that in the system of the embodiment, when the terminal device is in the mounting state, the direction calculation unit 11 calculates the relative direction of each time point by the sensor data of the terminal device at multiple time points, and then the difference determination unit 12 obtains the difference value between the driving direction of the target object mounted by the terminal device and the relative direction in combination with the positioning information of each time point and the preset corresponding relationship, and then the driving direction unit 13 can obtain the driving direction of the target object mounted by the terminal device based on the difference value. In this process, the driving direction acquisition system does not need to rely on other map data, but can obtain the driving direction of the target object based on the sensor data and the positioning information. The sensor data and the positioning information can be collected by any terminal device itself, so that the driving direction acquisition system has less dependence on other data and strong expansibility. In addition, the driving direction acquisition system in the embodiment considers the difference between the direction of the terminal device calculated by the sensor data and the actual driving direction of the target object, so that the driving direction of the target object obtained finally is more accurate.

[0106] The embodiment of the present application further provides a terminal device, a structure diagram of which is shown in Figure 8 The terminal device can be different in configuration or performance, and can include one or more central processing units (CPUs) 20 (for example, one or more processors) and a memory 21, one or more storage media 22 (for example, one or more mass storage devices) for storing application programs 221 or data 222. The memory 21 and the storage media 22 can be temporary storage or persistent storage. The programs stored in the storage media 22 can include one or more modules (not shown in the figure), and each module can include a series of instruction operations in the terminal device. Further, the central processing unit 20 can be configured to communicate with the storage medium 22 and execute a series of instruction operations in the storage medium 22 on the terminal device.

[0107] Specifically, the application programs 221 stored in the storage medium 22 include application programs for acquiring the driving direction, and the programs can include the information acquisition unit 10, the direction calculation unit 11, the difference determination unit 12 and the driving direction unit 13 in the driving direction acquisition system described above, and details are not described herein. Further, the central processing unit 20 can be configured to communicate with the storage medium 22 and execute a series of operations corresponding to the application programs for acquiring the driving direction stored in the storage medium 22 on the terminal device.

[0108] The terminal device can also include one or more power supplies 23, one or more wired or wireless network interfaces 24, one or more input / output interfaces 25, and / or one or more operating systems 223, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0109] The steps performed by the terminal device in the above method embodiments can be based on the Figure 8 The structure of the terminal device is shown.

[0110] Further, another aspect of the embodiments of the present application also provides a computer readable storage medium storing a plurality of computer programs, the computer programs being adapted to be loaded and executed by a processor to perform the driving direction acquisition method performed by the terminal device.

[0111] Another aspect of the embodiments of the present application also provides a terminal device including a processor and a memory;

[0112] The memory is configured to store a plurality of computer programs, the computer programs being configured to be loaded and executed by the processor to perform the driving direction acquisition method performed by the terminal device; and the processor is configured to implement each of the plurality of computer programs.

[0113] In addition, according to an aspect of the present application, a computer program product or computer program is provided, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the driving direction acquisition method provided in the various optional implementation manners.

[0114] Those skilled in the art can understand that all or part of the steps of the various methods of the above embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer readable storage medium, which can include read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.

[0115] The above describes in detail the driving direction acquisition method, system, storage medium and terminal device provided by the embodiments of the present application. The principles and implementation manners of the present application are described by applying specific examples in this paper, and the above description of the embodiments is only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges will be changed, and the above description of the present application should not be understood as a limitation.

Claims

1. A travel direction acquisition method characterized by comprising: The method comprises the following steps: obtaining sensor data and positioning information of a terminal device at multiple time points; when the terminal device is in a mounting state, calculating relative directions of the terminal device at the multiple time points according to the sensor data at the multiple time points respectively; determining a difference value between a driving direction and a relative direction of a target object mounted by the terminal device according to the relative directions at the multiple time points, the positioning information, and a preset corresponding relationship, comprising: creating multiple corresponding relationship groups according to the relative directions at the multiple time points, the positioning information, and the preset corresponding relationship; setting an initial value of the difference value and a target function of iterative calculation; adjusting the initial value of the difference value according to the multiple corresponding relationship groups, so that the target function satisfies a preset condition, to obtain an adjusted difference value; taking the adjusted difference value as the difference value between the driving direction and the relative direction of the target object mounted by the terminal device; the corresponding relationship is a functional relationship among the positioning information, the relative direction, and the difference value; obtaining the driving direction of the target object mounted by the terminal device according to the difference value and the relative direction of the terminal device.

2. The method of claim 1, wherein, The sensor data comprises acceleration data, and before the step of calculating the relative directions of the terminal device at the multiple time points according to the sensor data at the multiple time points, the method further comprises the following steps: calculating a roll angle and a pitch angle of the terminal device according to the acceleration data at the multiple time points respectively; judging whether the terminal device is in the mounting state according to the roll angle and the pitch angle of the terminal device.

3. The method of claim 1, wherein, The step of calculating the relative directions of the terminal device at the multiple time points according to the sensor data at the multiple time points comprises the following steps: adjusting a coordinate axis of the terminal device to obtain an adjusted coordinate axis; calculating the relative directions of the terminal device at the multiple time points based on the adjusted coordinate axis and the sensor data at the multiple time points respectively.

4. The method of claim 1, wherein, Each corresponding relationship group comprises a difference value between the positioning information of any two adjacent time points, and a functional relationship among the speed information of the terminal device at one of the two adjacent time points, the relative direction, and the difference value.

5. The method of claim 1, wherein, The step of setting the initial value of the difference value comprises the following steps: determining an absolute direction of the terminal device through the positioning information of the terminal device at any time point, and taking a difference value between the absolute direction and the relative direction of the terminal device at the corresponding time point as the initial value of the difference value; or, taking certain sensor data in the terminal device as the absolute direction of the terminal device, and taking a difference value between the absolute direction and the relative direction of the terminal device as the initial value of the difference value. The step of setting the initial value of the difference value comprises the following steps:

6. The method of claim 1, wherein, setting the initial value of the difference value as a fixed value; or, taking historical data of the difference value as the initial value of the difference value. The method comprises the following steps: an information obtaining unit is configured to obtain sensor data and positioning information of a terminal device at multiple time points; 7. A travel direction acquisition system characterized by comprising: a direction calculating unit is configured to calculate relative directions of the terminal device at the multiple time points according to the sensor data at the multiple time points when the terminal device is in a mounting state; ​ ​ The difference determining unit is configured to determine a difference value between the driving direction of the target object mounted on the terminal device and the relative direction according to the relative directions, the positioning information and the preset corresponding relationship of the plurality of time points, and includes: creating a plurality of corresponding relationship groups according to the relative directions, the positioning information and the preset corresponding relationship of the plurality of time points; setting an initial value of the difference value and setting a target function of iterative calculation; adjusting the initial value of the difference value according to the plurality of corresponding relationship groups so that the target function satisfies a preset condition to obtain an adjusted difference value; and taking the adjusted difference value as the difference value between the driving direction of the target object mounted on the terminal device and the relative direction; and the corresponding relationship is a functional relationship between the positioning information, the relative direction and the difference value. The driving direction unit is configured to obtain the driving direction of the target object mounted on the terminal device according to the difference value and the relative direction of the terminal device.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a plurality of computer programs, and the computer programs are adapted to be loaded and executed by the processor to implement the driving direction obtaining method according to any one of claims 1 to 6.

9. A terminal device, comprising: The processor and the memory are included. The memory is configured to store a plurality of computer programs, and the computer programs are used to load and execute the driving direction obtaining method according to any one of claims 1 to 6 by the processor; and the processor is configured to implement each computer program in the plurality of computer programs.

10. A computer program product, characterised in that, The computer program product includes a computer program, and the computer program is executed by the processor to implement the steps in the driving direction obtaining method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Unmanned aerial vehicle course angle dynamic calibration method

    CN109407696A

  • Method for detecting place direction of portable navigation device and apparatus thereof

    WO2009061060A1