Ride Status Recognition Method, Device, Electronic Device and Storage Medium
By acquiring the positioning point and calculation speed of the mobile terminal within the preset time period, the problem of low accuracy of riding status recognition in the prior art is solved, and higher recognition accuracy and lower error judgment rate are achieved.
Patent Information
- Application Number
- CN202211323066.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-27
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-10-27
AI Technical Summary
The existing vehicle status recognition method has low accuracy, making it difficult to accurately determine whether the mobile terminal is in a vehicle status.
By acquiring at least three positioning points of the mobile terminal within a preset time period, the speed of the mobile terminal between these positioning points is calculated, and the ride status is determined based on the speed. The specific steps include obtaining the positioning point, calculating the positioning distance and speed, and judging the ride status based on the speed threshold.
The accuracy of riding status recognition is improved, and it is possible to more accurately determine whether the mobile terminal is in riding status, reducing the misjudgment rate.
Smart Images

Figure CN115546731B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and particularly to a method, device, electronic device, and storage medium for identifying a riding state. Background Art
[0002] Parents and teachers attach great importance to the safety of children. Since many children need to take school buses to school, accurately identifying the riding state of children is beneficial for parents and teachers to monitor the safety status of children in a timely manner. The existing method for identifying the riding state is to use hardware sensor data and certain algorithms to determine whether the current mobile terminal is in a riding state. However, the accuracy of identifying the riding state by this method is relatively low, and there is an urgent need to propose a more accurate method for identifying the riding state. Summary of the Invention
[0003] Embodiments of this application disclose a method, device, electronic device, and storage medium for identifying a riding state, which can improve the accuracy of identifying the riding state.
[0004] Embodiments of this application disclose a method for identifying a riding state, which is characterized in that the method includes:
[0005] Obtain at least three first positioning points of the mobile terminal within a first preset time period; among the at least three first positioning points, the positioning distance between the earliest collected first positioning point and the latest collected first positioning point within the first preset time period is the longest, and the positioning distance between two adjacent first positioning points in terms of collection time is greater than a first distance threshold;
[0006] Calculate a first speed at which the mobile terminal moves between the at least three first positioning points;
[0007] Determine the riding state of the mobile terminal according to the first speed.
[0008] As an optional implementation manner, the number of the at least three first positioning points is three; the three first positioning points correspond to three positioning distances, and the three positioning distances include the distances between every two of the three first positioning points; the three positioning distances conform to the relationship of the three sides of a right triangle.
[0009] As an optional implementation manner, the obtaining at least three first positioning points of the mobile terminal within a first preset time period includes:
[0010] Obtain the positioning point collected latest by the mobile terminal within the first preset time period as an ending positioning point;
[0011] Based on the positioning interval between the two first positioning points adjacent to each other in the acquisition time, an intermediate positioning point and a starting positioning point are acquired in sequence; the acquisition time of the starting positioning point within the first preset time is earlier than the acquisition time of the intermediate positioning point within the first preset time;
[0012] The positioning distance between the starting positioning point and the middle positioning point, and the positioning distance between the middle positioning point and the ending positioning point are respectively used as the length of the right-angled side of the right triangle, and the length of the hypotenuse of the right triangle is calculated;
[0013] Calculate the positioning distance between the starting positioning point and the ending positioning point;
[0014] When it is determined that the positioning interval between the starting positioning point and the ending positioning point is greater than or equal to the hypotenuse length, the starting positioning point, the middle positioning point and the ending positioning point are determined as the three first positioning points.
[0015] As an optional implementation manner, determining the riding state of the mobile terminal according to the first speed includes:
[0016] When the first speed exceeds a first speed threshold, determining that the boarding state of the mobile terminal is a boarding state; or,
[0017] When the first speed does not exceed a first speed threshold, it is determined that the riding state of the mobile terminal is a non-riding state.
[0018] As an optional implementation, the first speed threshold is determined according to a step number change rate detected by the mobile terminal and / or a heart rate detected by the mobile terminal.
[0019] As an optional implementation, among the at least three first positioning points, the two first positioning points collected latest within the first preset time period are GPS positioning points.
[0020] As an optional implementation manner, determining the riding state of the mobile terminal according to the first speed includes:
[0021] When the first speed does not exceed the first speed threshold, at least three second positioning points of the mobile terminal within a second preset time period are obtained; the duration of the second preset time period is greater than the duration of the first preset time period; among the at least three second positioning points, the sampling time interval of two second positioning points with adjacent collection times within the second preset time period exceeds the first sampling time threshold, and the positioning interval between the earliest collected second positioning point and the latest collected second positioning point is the longest, and the positioning interval between two second positioning points with adjacent collection times is greater than the first interval threshold;
[0022] Calculate a second speed at which the mobile terminal moves between the at least three second positioning points;
[0023] Determine a riding state of the mobile terminal according to the second speed.
[0024] As an optional implementation manner, among the at least three first positioning points, a sampling time interval between two adjacent first positioning points collected within the first preset time period exceeds a first sampling duration threshold.
[0025] As an optional implementation manner, among the at least three first positioning points, a positioning distance between every two first positioning points is a sum of accuracy error values; the sum of the accuracy error values is determined by the accuracy error values respectively corresponding to every two first positioning points.
[0026] As an optional implementation manner, after determining that the riding state of the mobile terminal is a state of being in a vehicle according to the first speed, the method further includes:
[0027] Obtain a plurality of third positioning points of the mobile terminal within a third preset time period; among the plurality of third positioning points, a sampling time interval between two adjacent third positioning points collected within the third preset time period exceeds a second sampling duration threshold;
[0028] When it is detected that a positioning distance between every two third positioning points among the plurality of third positioning points is less than a second distance threshold, determine that the mobile terminal has got off the vehicle.
[0029] As an optional implementation manner, after determining that the riding state of the mobile terminal is a state of being in a vehicle according to the first speed, the method further includes:
[0030] Obtain a fourth positioning point of the mobile terminal within a fourth preset time period;
[0031] According to geographical location information corresponding to the fourth positioning point, determine whether the mobile terminal is in a preset scenario area;
[0032] When it is determined that the mobile terminal is in the preset scenario area, determine that the mobile terminal has got off the vehicle.
[0033] As an optional implementation manner, there are at least two fourth positioning points; among the at least two fourth positioning points, a sampling time interval between two adjacent fourth positioning points collected exceeds a third sampling duration threshold;
[0034] After obtaining the fourth positioning point of the mobile terminal within the fourth preset time period, the method further includes:
[0035] Calculate a third speed at which the mobile terminal moves between the at least two fourth positioning points;
[0036] Determining whether the mobile terminal is in a preset scenario area according to the geographical location information corresponding to the fourth positioning point includes:
[0037] When the third speed is lower than the second speed threshold, determine whether the mobile terminal is in a preset scenario area according to the geographical location information corresponding to the at least two fourth positioning points respectively.
[0038] As an alternative implementation, determining whether the mobile terminal is in a preset scenario area according to the geographical location information corresponding to the fourth positioning point includes:
[0039] When the geographical location information corresponding to the fourth positioning point matches the geographical location information of the preset scenario area, determine that the mobile terminal is in the preset scenario area; the geographical location information of the preset scenario area is set by the user.
[0040] As an alternative implementation, the preset scenario area is determined according to parameters called from a database;
[0041] Determining whether the mobile terminal is in a preset scenario area according to the geographical location information corresponding to the fourth positioning point includes:
[0042] According to the geographical location information corresponding to the fourth positioning point, use the corresponding relationship between the geographical location information included in the map data and the scenario area to determine the real scenario area corresponding to the fourth positioning point;
[0043] When the real scenario area where the mobile terminal is located conforms to the preset scenario area, determine that the mobile terminal is in the preset scenario area.
[0044] An embodiment of the present application discloses a device for identifying a riding state, and the device includes:
[0045] An acquisition module, configured to acquire at least three first positioning points of the mobile terminal within a first preset time period; among the at least three first positioning points, the positioning distance between the earliest acquired first positioning point and the latest acquired first positioning point within the first preset time period is the longest, and the positioning distance between two adjacent first positioning points in terms of acquisition time is greater than a first distance threshold;
[0046] A calculation module, configured to calculate a first speed at which the mobile terminal moves between the at least three first positioning points;
[0047] A determination module, configured to determine the riding state of the mobile terminal according to the first speed.
[0048] An embodiment of the present application discloses an electronic device, including a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the processor implements any one of the ride state recognition methods disclosed in the embodiments of the present application.
[0049] An embodiment of the present application discloses a computer-readable storage medium, which stores a computer program. Wherein, the computer program enables a computer to execute any one of the ride state recognition methods disclosed in the embodiments of the present application.
[0050] Compared with the related art, the embodiments of the present application have the following beneficial effects:
[0051] Obtain at least three first positioning points of the mobile terminal within a first preset time period; among the at least three first positioning points, the positioning distance between the first positioning point with the earliest acquisition time and the first positioning point with the latest acquisition time is the longest, and the positioning distance between two adjacent first positioning points in terms of acquisition time is greater than a first distance threshold; calculate the first speed of the mobile terminal moving between the at least three first positioning points; based on the first speed, obtain the ride state of the mobile terminal. By obtaining at least three first positioning points with relatively large positioning distances and determining the ride state of the mobile terminal based on the first speed of the mobile terminal between the at least three first positioning points, the accuracy of recognizing the ride state is improved in the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0053] Figure 1 It is a schematic diagram of an application scenario of a ride state recognition method disclosed in an embodiment of the present application;
[0054] Figure 2 It is a schematic flowchart of a ride state recognition method disclosed in an embodiment of the present application;
[0055] Figure 3 It is a schematic flowchart of another ride state recognition method disclosed in an embodiment of the present application;
[0056] Figure 4 It is a schematic flowchart of another ride state recognition method disclosed in an embodiment of the present application;
[0057] Figure 5 It is a schematic flowchart of another ride state recognition method disclosed in an embodiment of the present application;
[0058] Figure 6 is a schematic structural diagram of a riding state recognition device disclosed in an embodiment of the present application;
[0059] Figure 7 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application. Detailed implementation manners
[0060] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0061] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally further include steps or units not listed, or may optionally further include other steps or units inherent to these processes, methods, products, or devices.
[0062] The embodiments of the present application disclose a riding state recognition method, device, electronic device, and storage medium, which can improve the accuracy of recognizing the riding state. The following will be described in detail respectively.
[0063] Please refer to Figure 1 , Figure 1 is a schematic application scenario diagram of a riding state recognition method disclosed in an embodiment of the present application. As Figure 1 shown, a first operating environment is given, and this operating environment may include a mobile terminal 101 and a server 102.
[0064] The mobile terminal 101 may include electronic devices such as wearable devices, mobile phones, and tablet computers; among them, the wearable devices may include, but are not limited to, smart watches or smart bracelets supported by the wrist, smart rings supported by the finger, smart shoes or smart socks supported by the foot, smart glasses, smart helmets or smart headbands supported by the head, etc., as well as various non-mainstream products such as smart clothing, schoolbags, crutches, and accessories. The embodiments of the present application do not make limitations.
[0065] The user can carry or wear the mobile terminal 101 and obtain data through the mobile terminal 101.
[0066] The server 102 is used to provide background services for the mobile terminal 101 to process the data obtained by the mobile terminal 101, so as to complete the ride status recognition method provided in the embodiments of the present application. Optionally, the server 102 can also generate corresponding control instructions according to the results of data processing and send the control instructions to the mobile terminal 101 to control the mobile terminal 101. For example, the server 102 can be a background server, which can be a single server, a server cluster composed of multiple servers, or a cloud computing service center. Optionally, the server 102 provides background services for multiple mobile terminals 101 at the same time.
[0067] Next, a second operating environment is given. This operating environment only includes the mobile terminal 101, and the mobile terminal 101 can include various types of electronic devices described above. The mobile terminal 101 not only has the ability to obtain data, but also has the ability to process data, that is, it can implement the functions realized by the ride status recognition method provided in the present application by calling program code in the processor of the mobile terminal 101. The program code can be stored in a computer storage medium. Obviously, the mobile terminal 101 includes at least a processor and a storage medium.
[0068] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a ride status recognition method disclosed in the embodiments of the present application. This ride status recognition method can be applied to any electronic device with data processing capabilities, including but not limited to any of the aforementioned mobile terminals, or a background server that provides background services for mobile terminals. As Figure 2 shown, the method includes the following steps:
[0069] 201. Obtain at least three first positioning points of the mobile terminal within a first preset time period.
[0070] Among the at least three first positioning points, the positioning distance between the first positioning point collected earliest and the first positioning point collected latest within the first preset time period is the longest, and the positioning distance between two adjacent first positioning points in terms of collection time is greater than a first distance threshold.
[0071] The first distance threshold can be set to a relatively large value, such as 90 meters to 150 meters, and there is no specific limitation. Thus, it can be ensured that the positioning distances between the at least three first positioning points obtained are long enough.
[0072] The first preset time period can be set as a time period with a shorter duration, such as 1 minute to 6 minutes, or it can be set as a time period with a longer duration, such as 10 minutes to 20 minutes, and there is no specific limitation. Among them, when the duration of the first preset time period is shorter, such as set to 1 minute to 6 minutes, the riding state can be quickly identified. At the same time, since the positioning intervals between at least three first positioning points are long enough, even if the first positioning points are selected within a short time period, the accuracy of riding state identification can be improved.
[0073] The mobile terminal can collect the first positioning point through the global positioning system (GPS) positioning method. Specifically, the current position is obtained by searching for satellite data information as the first positioning point collected by the mobile terminal; alternatively, the mobile terminal can collect the first positioning point through the Wi-Fi base station positioning method. Specifically, by scanning the information of surrounding Wi-Fi base stations and then requesting a third-party positioning service to obtain the current position as the first positioning point collected by the mobile terminal. Among them, the time interval for collecting the first positioning point can be 1 second or 5 seconds, and there is no specific limitation.
[0074] Among at least three first positioning points, the positioning interval between the first positioning point collected earliest and the first positioning point collected latest within the first preset time period is the longest, indicating that the movement trajectory of the mobile terminal can be a straight line, a turning trajectory, etc., but does not include a U-turn movement trajectory.
[0075] The electronic device obtains at least three first positioning points of the mobile terminal within the first preset time period. Among them, the positioning interval between two adjacent first positioning points in terms of collection time is greater than the first interval threshold, indicating that the electronic device is moving at a long distance. From this, it can be further determined whether the electronic device is moving quickly, so as to determine the riding state of the electronic device. For example, if the number of at least three first positioning points is four, and the four first positioning points are A, B, C, and D respectively. If the collection time of A is earlier than that of B, the collection time of B is earlier than that of C, and the collection time of C is earlier than that of D, then A and B are two adjacent first positioning points in terms of collection time, B and C are two adjacent first positioning points in terms of collection time, and C and D are two adjacent first positioning points in terms of collection time. Then the positioning interval between two adjacent first positioning points in terms of collection time is greater than the first interval threshold, that is, the positioning intervals between A and B, B and C, and C and D are all greater than the first interval threshold.
[0076] Therefore, when the number of the first positioning points obtained by the electronic device is at least three, it can be indicated that the electronic device can determine the riding state of the mobile terminal through a sufficient number of the first positioning points, improving the accuracy of identifying the riding state. At the same time, among the at least three first positioning points, the positioning distance between two adjacent first positioning points in terms of acquisition time is greater than the first distance threshold, indicating that the positioning distances between the at least three first positioning points are far enough apart. That is, the electronic device can determine the riding state of the mobile terminal through at least three first positioning points that are far enough apart, further improving the accuracy of identifying the riding state. If the electronic device fails to obtain at least three first positioning points of the mobile terminal within the first preset time period, it means that the electronic device fails to obtain at least three first positioning points with a far enough positioning distance, and thus it can be directly determined that the mobile terminal is in a non-riding state.
[0077] As an optional implementation manner, the number of the at least three first positioning points is three. The three first positioning points correspond to three positioning distances, and the three positioning distances include the distances between every two of the three first positioning points. The three positioning distances correspond to three third distance thresholds, where each positioning distance corresponds to one third distance threshold. The three third distance thresholds satisfy a right triangle relationship. Among the three first positioning points, the positioning distance between the first positioning point collected earliest and the first positioning point collected latest within the first preset time period is the hypotenuse of the right triangle. The positioning distance between every two first positioning points is greater than or equal to the third distance threshold corresponding to this positioning distance. For example, the three first positioning points include A, B, and C, and A, B, and C are sorted in the order of acquisition time. The third distance threshold corresponding to the positioning distance between A and B can be 90 meters, so the positioning distance between A and B is greater than or equal to 90 meters. The third distance threshold corresponding to the positioning distance between B and C can be 120 meters, so the positioning distance between B and C is greater than or equal to 120 meters. The third distance threshold corresponding to the positioning distance between A and C can be 150 meters, so the positioning distance between A and C is greater than or equal to 150 meters.
[0078] Further optionally, the positioning distance between every two first positioning points can be greater than or equal to a multiple of the third distance threshold corresponding to this positioning distance, and the multiple can be any real number less than 1 and greater than 0. For example, the third distance threshold corresponding to the positioning distance between A and C can be 0.9 times of 150 meters, so the positioning distance between A and C is greater than or equal to 0.9 times of 150 meters.
[0079] It can be seen that when the number of the three first positioning points is three, the third spacing thresholds corresponding to the positioning spacings between every two first positioning points conform to the right triangle relationship, so that it can be determined that the mobile terminal is moving continuously and moving a long distance according to the three acquired first positioning points, which is beneficial to quickly determining the riding state of the mobile terminal according to the first speed of the mobile terminal moving between the three first positioning points subsequently.
[0080] As another alternative implementation manner, among at least three first positioning points, the sampling time interval between two first positioning points with adjacent acquisition times within the first preset time period exceeds the first sampling duration threshold.
[0081] Exemplarily, the first preset time period can be 10 minutes to 20 minutes, and the first sampling duration threshold can be greater than or equal to 1 minute, which is not specifically limited; thus, the electronic device can not only obtain at least three first positioning points with a sufficiently far positioning spacing, but also ensure that the acquisition time between at least three first positioning points is long enough, so that it can be ensured that the mobile terminal is moving continuously and moving a long distance, and thus it can be further determined whether the mobile terminal is moving fast, thereby improving the accuracy of identifying the riding state of the mobile terminal. For example, if the number of at least three first positioning points is four, and the four first positioning points are A, B, C, and D respectively, if the acquisition time of A is earlier than that of B, the acquisition time of B is earlier than that of C, and the acquisition time of C is earlier than that of D, then the sampling time interval between two first positioning points with adjacent acquisition times within the first preset time period exceeds the first sampling duration threshold, that is, the sampling time intervals between A and B, between B and C, and between C and D all exceed the first sampling duration threshold.
[0082] As another alternative implementation manner, among at least three first positioning points, the positioning spacing between every two first positioning points is the sum of the precision error values; the sum of the precision error values is determined by the precision error values respectively corresponding to every two first positioning points.
[0083] The accuracy error value can be a positioning error value. Since the positioning method of a Wi-Fi base station has a larger positioning error compared to the Global Positioning System (GPS) positioning method, generally, the positioning error value of the Wi-Fi base station positioning method is about 40 meters. Therefore, if a mobile terminal obtains at least three first positioning points through the Wi-Fi base station positioning method, a certain positioning error value will be generated for each first positioning point. The electronic device can read the positioning error value and use the positioning error value of each first positioning point as the accuracy error value. Exemplarily, if at least three positioning points are A, B, and C respectively, and the accuracy error value of A is 50 meters and the accuracy error value of B is 60 meters, then the positioning distance between A and B can be the sum of the accuracy error values corresponding to A and B, which is equal to 110 meters. Therefore, considering the positioning error value of positioning methods such as the Wi-Fi base station positioning method is beneficial to improving the effectiveness of at least three first positioning points obtained for identifying the riding state, thereby improving the efficiency and accuracy of identifying the riding state of the mobile terminal.
[0084] 202. Calculate a first speed at which the mobile terminal moves between at least three first positioning points.
[0085] The electronic device calculates a first speed at which the mobile terminal moves between at least three first positioning points; wherein, the first speed can be the average speed at which the mobile terminal moves between at least three first positioning points, that is, the first speed is equal to the positioning distance between the earliest collected first positioning point and the latest collected first positioning point of the mobile terminal within a first preset time period, divided by the total time for the mobile terminal to move between at least three first positioning points; or, the first speed can be the median value of multiple speeds at which the mobile terminal moves between at least three first positioning points.
[0086] 203. Determine the riding state of the mobile terminal according to the first speed.
[0087] In the embodiment of the present application, at least three first positioning points with a long enough positioning distance are obtained, and the at least three first positioning points with a long enough positioning distance are used to identify the riding state, which can effectively improve the accuracy rate of riding state recognition. Moreover, based on the first speed of the mobile terminal between at least three first positioning points, the riding state of the mobile terminal is further determined, improving the accuracy rate of identifying the riding state.
[0088] As an optional implementation manner, when the electronic device determines the riding state of the mobile terminal according to the first speed, the following steps can be executed:
[0089] When the first speed exceeds the first speed threshold, determine that the riding state of the mobile terminal is the state of having taken a ride; or,
[0090] When the first speed does not exceed the first speed threshold, it is determined that the riding state of the mobile terminal is the non-riding state.
[0091] Exemplarily, the first speed threshold can be 6 m / s or 7 m / s, and there is no specific limitation.
[0092] As another alternative implementation, the first speed threshold is determined according to the step change rate detected by the mobile terminal and / or the heart rate detected by the mobile terminal.
[0093] It should be noted that the riding state recognition method described in the embodiments of the present application can handle the riding situations in various traffic scenarios in real life, such as scenarios of taking buses, private cars, subways, high-speed rails and other transportation devices, excluding the scenario of riding a bicycle.
[0094] Optionally, the first speed threshold is determined according to the step change rate detected by the mobile terminal. If the step change rate detected by the mobile terminal is greater than the step threshold, the first speed threshold can be 6 m / s or 7 m / s, and there is no specific limitation; if the step change rate detected by the mobile terminal is less than the step threshold, the first speed threshold can be 3 m / s or 4 m / s, and there is no specific limitation; where the step threshold can be 5 steps / minute, and there is no specific limitation.
[0095] Optionally, the first speed threshold is determined according to the heart rate detected by the mobile terminal. If the heart rate detected by the mobile terminal is greater than the heart rate threshold, the first speed threshold can be 7 m / s, and there is no specific limitation; if the heart rate detected by the mobile terminal is less than the heart rate threshold, the first speed threshold can be 3 m / s, and there is no specific limitation; where the heart rate threshold can be 120 beats / min to 140 beats / min, and there is no specific limitation. Therefore, the electronic device can avoid misjudging the riding state of the user, which is beneficial to distinguishing the state of the user riding a bicycle and taking a car. For example, when the user is riding a bicycle, the speed may be close to that of a car, but the heart rate will be too high, so it can be determined that the user is not taking a car.
[0096] Optionally, the first speed threshold is determined according to the step change rate detected by the mobile terminal and the heart rate detected by the mobile terminal. For example, if the step change rate detected by the mobile terminal is greater than the step threshold and the detected heart rate is greater than the heart rate threshold, the first speed threshold can be 7 m / s; if the step change rate detected by the mobile terminal is less than the step threshold and the detected heart rate is less than the heart rate threshold, the first speed threshold can be 3 m / s.
[0097] Therefore, the electronic device can determine the riding state of the mobile terminal by combining multiple parameters such as speed, step change rate, heart rate, etc. In the embodiments of the present application, multiple types of data are used as fusion calculation data, including different types of positioning data (such as GPS positioning data and Wi-Fi positioning data), step sensor data, heart rate data, etc., and a multi-strategy algorithm is used for fusion calculation to improve the real-time performance, accuracy, and stability of the obtained riding state recognition result as much as possible.
[0098] In the embodiments of the present application, the electronic device can fuse multiple types of relevant data obtained by the mobile terminal to identify the riding state of the mobile terminal. The multiple types of relevant data may include: positioning trajectory data (such as GPS positioning data, Wi-Fi positioning data, and start-stop sensor data), step sensor data, current geographical location area data, motion state data, heart rate data, etc. In addition, the riding state recognition method in the embodiments of the present application can also combine the hardware sensor data (such as 9-axis sensor data) of the mobile terminal to obtain a more accurate or more diverse application scenario solution through fusion.
[0099] By comprehensively applying multiple sets of data, it is possible to obtain the riding state within a short time, with high accuracy and strong stability, and it is possible to quickly adjust configuration parameters and quickly supplement the strategy algorithm.
[0100] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of another riding state recognition method disclosed in the embodiments of the present application. This riding state recognition method can be applied to any electronic device with data processing capabilities, including but not limited to any of the aforementioned mobile terminals, or a background server that provides background services for the mobile terminal. As Figure 3 shown, the method includes the following steps:
[0101] 301. Obtain the last collected positioning point of the mobile terminal within the first preset time period as the ending positioning point.
[0102] The electronic device can query the positioning points of the mobile terminal in the recent first preset time period and obtain the last collected positioning point of the mobile terminal within the first preset time period as the ending positioning point; that is to say, the ending positioning point is the latest obtained positioning point of the mobile terminal, which is used to indicate the current position of the mobile terminal.
[0103] 302. Based on the positioning distance between two adjacent first positioning points in terms of collection time, sequentially obtain the intermediate positioning points and the starting positioning point.
[0104] Among them, the acquisition time of the starting positioning point within the first preset time is earlier than the acquisition time of the middle positioning point within the first preset time. That is to say, the electronic device takes the ending positioning point as a reference, and in reverse order, obtains the middle positioning point and the starting positioning point in sequence according to the positioning interval between two adjacent first positioning points with adjacent acquisition times. For example, the electronic device obtains the ending positioning point, and successively obtains the middle positioning point and the starting positioning point with positioning intervals of 120 meters and 90 meters.
[0105] 303. Respectively take the positioning interval between the starting positioning point and the middle positioning point, and the positioning interval between the middle positioning point and the ending positioning point as the lengths of the right-angled sides of a right triangle, and calculate the length of the hypotenuse of the right triangle.
[0106] For example, the positioning interval between the starting positioning point and the middle positioning point is 90 meters, and the positioning interval between the middle positioning point and the ending positioning point is 120 meters. Taking 90 meters and 120 meters as the lengths of the two right-angled sides of a right triangle, the length of the hypotenuse of the right triangle is equal to
[0107] 304. Calculate the positioning interval between the starting positioning point and the ending positioning point.
[0108] The electronic device can calculate the straight-line distance between the starting positioning point and the ending positioning point as the positioning interval. For example, the electronic device can obtain the GPS coordinates of the starting positioning point and the GPS coordinates of the ending positioning point through the Global Positioning System, and calculate the positioning interval between the starting positioning point and the ending positioning point according to the GPS coordinates of the starting positioning point and the GPS coordinates of the ending positioning point.
[0109] 305. When it is determined that the positioning interval between the starting positioning point and the ending positioning point is greater than or equal to the length of the hypotenuse, determine the starting positioning point, the middle positioning point, and the ending positioning point as three first positioning points.
[0110] Among them, among the three first positioning points, the positioning interval between the first positioning point collected earliest and the first positioning point collected latest within the first preset time period is the longest, and the positioning interval between two adjacent first positioning points with adjacent acquisition times is greater than the first interval threshold.
[0111] When the electronic device determines that the positioning interval between the starting positioning point and the ending positioning point is equal to the length of the hypotenuse, it determines the starting positioning point, the middle positioning point, and the ending positioning point as three first positioning points. For example, the positioning interval between the starting positioning point and the middle positioning point is 90 meters, the positioning interval between the middle positioning point and the ending positioning point is 120 meters, and the positioning interval between the starting positioning point and the ending positioning point is 150 meters.
[0112] Alternatively, when the electronic device determines that the positioning distance between the starting positioning point and the ending positioning point is greater than the hypotenuse length, it determines the starting positioning point, the intermediate positioning point, and the ending positioning point as three first positioning points. For example, the positioning distance between the starting positioning point and the intermediate positioning point is 90 meters, the positioning distance between the intermediate positioning point and the ending positioning point is 120 meters, and the positioning distance between the starting positioning point and the ending positioning point is 170 meters.
[0113] As an alternative implementation, the three first positioning points correspond to three positioning distances, and the three positioning distances include the distances between every two of the three first positioning points; the three positioning distances conform to the relationship of the three sides of a right triangle. Among them, the right triangle can be an isosceles right triangle or a right triangle that conforms to the Pythagorean theorem. For example, if the positioning distance between the starting positioning point and the intermediate positioning point is 90 meters, the positioning distance between the intermediate positioning point and the ending positioning point is 120 meters, and the positioning distance between the starting positioning point and the ending positioning point is 150 meters, then the positioning distances between every two of the three first positioning points conform to the relationship of the three sides of a right triangle that conforms to the Pythagorean theorem; another example is that the positioning distance between the starting positioning point and the intermediate positioning point is 90 meters, the positioning distance between the intermediate positioning point and the ending positioning point is 90 meters, and the positioning distance between the starting positioning point and the ending positioning point is 127 meters, then the positioning distances between every two of the three first positioning points conform to the relationship of the three sides of an isosceles right triangle.
[0114] Therefore, among the three first positioning points, the positioning distances between every two of the three first positioning points conform to the relationship of the three sides of a right triangle. The electronic device can more accurately determine whether the mobile terminal is in continuous movement and long-distance movement through the three first positioning points, and thus can further determine the riding state of the mobile terminal according to the first speed at which the mobile terminal moves between the three first positioning points, improving the accuracy and efficiency of identifying the riding state.
[0115] 306. Calculate the first speed at which the mobile terminal moves between the three first positioning points.
[0116] 307. Determine the riding state of the mobile terminal according to the first speed.
[0117] For the implementation manners of the foregoing steps 306 to 307, reference may be made to the foregoing embodiments, and the following content will not be elaborated.
[0118] In an embodiment of the present application, by obtaining a starting positioning point, an intermediate positioning point, and an ending positioning point, and taking the positioning distance between the starting positioning point and the intermediate positioning point, and the positioning distance between the intermediate positioning point and the ending positioning point as the lengths of the right-angled sides of a right triangle, and when the positioning distance between the starting positioning point and the ending positioning point is greater than or equal to the length of the hypotenuse of the right triangle, determining the starting positioning point, the intermediate positioning point, and the ending positioning point as three first positioning points, constructing a right triangle using the positioning distances between the respective positioning points, and determining the three first positioning points, the reliability and effectiveness of using the three first positioning points to determine the riding state of the mobile terminal are improved. Thus, the riding state of the mobile terminal is determined according to the first speed between the three first positioning points, and the accuracy of identifying the riding state is improved.
[0119] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of another method for identifying a riding state disclosed in an embodiment of the present application. This method for identifying a riding state can be applied to any electronic device with data processing capabilities, including but not limited to any of the aforementioned mobile terminals, or a back-end server that provides back-end services for the mobile terminal.
[0120] When this method for identifying a riding state is applied to a back-end server that provides back-end services for a mobile terminal, it is easy to achieve fast dynamic adjustment, that is, the back-end server cloud can implement algorithm strategies, and iterative optimization and update do not require the user to upgrade, and fast release of applications and personalized configuration can be achieved.
[0121] As Figure 4 shown, the method includes the following steps:
[0122] 401. Obtain at least three first positioning points of the mobile terminal within a first preset time period.
[0123] Among the at least three first positioning points, the positioning distance between the first positioning point collected earliest and the first positioning point collected latest within the first preset time period is the longest, and the positioning distance between two adjacent first positioning points in terms of collection time is greater than a first distance threshold.
[0124] In an embodiment of the present application, the first preset time period can be from 1 minute to 6 minutes. For example, the first preset time period can be 2 minutes, and the specific value is not limited. That is to say, the electronic device obtains the first positioning points within a relatively short first preset time period to quickly identify whether the mobile terminal is in a riding state based on the positioning points obtained within the short time period.
[0125] Among at least three first positioning points, the two first positioning points collected latest within the first preset time period are GPS positioning points. Since a mobile terminal can usually collect satellite positioning data through a GPS positioning system only outdoors, GPS positioning is relatively fast and accurate, and the positioning error value of the collected GPS positioning points is relatively small, usually within a few meters. Therefore, to quickly identify whether the mobile terminal is in a state of having boarded a vehicle within a short first preset time period, it is necessary to ensure that among the at least three first positioning points obtained, the two first positioning points collected latest are GPS positioning points, or all three first positioning points are GPS positioning points.
[0126] The obtaining method of at least three first positioning points can refer to the above steps 301 to 305.
[0127] 402. Calculate a first speed at which the mobile terminal moves between at least three first positioning points.
[0128] For the implementation manner of the foregoing step 402, reference may be made to the foregoing embodiments, and the following content will not be elaborated.
[0129] When the first speed exceeds the first speed threshold, the electronic device can determine that the mobile terminal is in a state of having boarded a vehicle and no longer execute steps 403 to 405.
[0130] Therefore, the electronic device quickly identifies that the mobile terminal is in a state of having boarded a vehicle within a short time through steps 401 to 402. In the prior art, the boarding state is obtained only relying on hardware sensor data, and the recognition time is relatively long. Steps 401 to 402 not only improve the accuracy of recognizing the boarding state by obtaining at least three first positioning points that are far enough apart and ensuring that the two first positioning points collected latest are GPS positioning points, but also greatly reduce the recognition time of the boarding state.
[0131] 403. When the first speed does not exceed the first speed threshold, obtain at least three second positioning points of the mobile terminal within a second preset time period.
[0132] When the first speed does not exceed the first speed threshold, the electronic device has not yet been able to quickly determine whether the mobile terminal is in a state of having boarded a vehicle within the first preset time period, that is, the mobile terminal may be in a slow driving and staying state during the boarding process, such as waiting for a traffic light, being stuck in traffic, etc., or may have already got off the vehicle. Therefore, in order to further determine whether the mobile terminal has boarded, not boarded, or has got off the vehicle, the electronic device can obtain at least three second positioning points of the mobile terminal within a longer second preset time period to further determine the boarding state of the mobile terminal.
[0133] Among them, the duration of the second preset time period is greater than that of the first preset time period; among at least three second positioning points, the sampling time interval between two adjacent second positioning points collected within the second preset time period exceeds the first sampling duration threshold, and the positioning distance between the earliest collected second positioning point and the latest collected second positioning point is the longest, and the positioning distance between two adjacent second positioning points collected in terms of sampling time is greater than the first distance threshold.
[0134] The duration of the second preset time period is greater than that of the first preset time period. The duration of the second preset time period can be 10 minutes to 20 minutes. For example, it can be 15 minutes, and there is no specific limitation. Since the duration of the second preset time period is relatively long, it can be ensured that the sampling time interval between two adjacent second positioning points collected within the second preset time period exceeds the first sampling duration threshold, and thus it can be ensured that the sampling time interval between two adjacent second positioning points collected in terms of sampling time is long enough. Among them, the first sampling duration threshold can be 1 minute or 2 minutes.
[0135] Since the second preset time period is long, at least three second positioning points obtained by the electronic device can be not only GPS positioning points, but also Wi-Fi positioning points collected by the mobile terminal through the Wi-Fi base station positioning method. For example, when the GPS positioning signal is lower than the signal threshold, the mobile terminal can collect Wi-Fi positioning points as second positioning points through the Wi-Fi base station positioning method.
[0136] As an optional implementation manner, the first sampling duration threshold can be determined according to the positioning type of the second positioning point. For example, the first sampling duration threshold corresponding to the case where the second positioning point is of the GPS type can be less than the first sampling duration threshold corresponding to the case where the second positioning point is a Wi-Fi positioning point. For example, the first sampling duration threshold corresponding to the case where the second positioning point is of the GPS type can be 1 minute, and the first sampling duration threshold corresponding to the case where the second positioning point is a Wi-Fi positioning point can be 2 minutes, because GPS positioning is faster than Wi-Fi positioning. Thus, the influence of different positioning methods on determining at least three second positioning points can be taken into account, and the effectiveness of at least three second positioning points for identifying the riding state is improved.
[0137] As another optional implementation manner, among at least three second positioning points, the positioning distance between every two second positioning points is the sum of the precision error values; the sum of the precision error values is determined by the precision error values respectively corresponding to every two second positioning points.
[0138] As another alternative implementation, among at least three second positioning points, the positioning distance between every two second positioning points is the larger value of the sum of the first distance threshold and the precision error value; the sum of the precision error values is determined by the precision error values respectively corresponding to every two second positioning points. For example, if the first distance threshold is 90 meters and the sum of the precision error values is 120 meters, then the positioning distance between every two second positioning points is 120 meters.
[0139] 404. Calculate the second speed at which the mobile terminal moves between at least three second positioning points.
[0140] The electronic device calculates the second speed at which the mobile terminal moves between at least three second positioning points; wherein, the second speed may be the average speed at which the mobile terminal moves between at least three second positioning points, that is, the second speed is equal to the positioning distance between the earliest collected second positioning point and the latest collected second positioning point of the mobile terminal within the second preset time period, divided by the total time for the mobile terminal to move between the three second positioning points; or, the second speed may be the median value of multiple speeds at which the mobile terminal moves between at least three second positioning points.
[0141] 405. Determine the riding state of the mobile terminal according to the second speed.
[0142] As an alternative implementation, for the electronic device to determine the riding state of the mobile terminal according to the second speed, the following steps may be executed:
[0143] When the second speed exceeds the second speed threshold, determine that the riding state of the mobile terminal is the state of having taken a ride; or,
[0144] When the second speed does not exceed the second speed threshold, determine that the riding state of the mobile terminal is the state of not having taken a ride.
[0145] As another alternative implementation, the second speed threshold is determined according to the step change rate detected by the mobile terminal and / or the heart rate detected by the mobile terminal.
[0146] In the prior art, the riding state obtained only relying on the hardware sensor data is too single, and there is a certain probability of misidentification rate. Due to various usage scenarios and motion scenarios in life, without a large amount of data support and algorithm tuning, it is difficult to achieve a relatively accurate result.
[0147] The embodiments of the present application are based on multi-scenario data source applications, multi-strategy algorithm fusion applications, and rapid expansion and configuration. Experiments show that the above embodiments can identify the riding state within 1 minute to 2 minutes (a driving range of 210 meters) from indoors to outdoors, can identify the riding state within 40 seconds to 2 minutes (a driving range of 210 meters) when riding outdoors, and can still correctly identify the riding state as the already-riding state during short-term (1 minute to 3 minutes) traffic jams or waiting for traffic lights.
[0148] In the embodiments of the present application, the electronic device can obtain at least three relatively distant first positioning points within a relatively short first preset time period, and when the first speed at which the mobile terminal moves between at least three first positioning points exceeds the first speed threshold, it can quickly and accurately identify that the mobile terminal is in the already-riding state within a short time; when the first speed does not exceed the first speed threshold, that is, the electronic device fails to quickly identify whether the mobile terminal is in the riding state within the relatively short first preset time period. At this time, the mobile terminal may be in the slow driving and staying states of the already-riding state, such as waiting for traffic lights, traffic jams, etc. Therefore, it is necessary to further obtain at least three second positioning points within a relatively long second preset time period, and further determine the riding state of the mobile terminal through the second speed at which the mobile terminal moves between at least three second positioning points, so as to take into account the complex traffic scenarios and the usage scenarios of the mobile terminal in real life, accurately identify the riding state of the mobile terminal, and reduce the misjudgment rate of identifying the riding state.
[0149] Please refer to Figure 5 , Figure 5 which is a schematic flowchart of another method for identifying the riding state disclosed in the embodiments of the present application. This method for identifying the riding state can be applied to any electronic device with data processing capabilities, including but not limited to any of the aforementioned mobile terminals, or a background server that provides background services for the mobile terminal. As Figure 3 shown, the method includes the following steps:
[0150] 501. Obtain at least three first positioning points of the mobile terminal within the first preset time period.
[0151] Among the at least three first positioning points, the positioning distance between the earliest collected first positioning point and the latest collected first positioning point within the first preset time period is the longest, and the positioning distance between two adjacent first positioning points in terms of collection time is greater than the first distance threshold.
[0152] 502. Calculate the first speed at which the mobile terminal moves between at least three first positioning points.
[0153] 503. Determine that the riding state of the mobile terminal is the already-riding state according to the first speed.
[0154] For the implementation manners of the foregoing step 501 to step 503, reference may be made to the foregoing embodiments, and details will not be described hereinafter.
[0155] When the first speed exceeds the first speed threshold, the electronic device may determine that the mobile terminal is in a state of being in a vehicle.
[0156] 504. Obtain a plurality of third positioning points of the mobile terminal within a third preset time period.
[0157] Among the plurality of third positioning points, the sampling time interval between two adjacent third positioning points collected within the third preset time period exceeds the second sampling duration threshold.
[0158] The number of the third positioning points may be 5 or more, and no specific limitation is made.
[0159] The third preset time period may be 5 minutes to 10 minutes, and no specific limitation is made.
[0160] The second sampling duration threshold may be 1 minute to 2 minutes, and no specific limitation is made.
[0161] 505. When it is detected that the positioning distance between every two of the plurality of third positioning points is less than the second distance threshold, determine that the mobile terminal has got off the vehicle.
[0162] When the positioning distance between every two of the plurality of third positioning points is less than the second distance threshold, the electronic device may uniformly determine the plurality of third positioning points as staying points, that is, the mobile terminal stays within a certain range, and it can be determined that the mobile terminal has got off the vehicle. For example, the second distance threshold may be a value close to 0, or may be 1 meter to 10 meters, and no specific limitation is made.
[0163] 506. Obtain a fourth positioning point of the mobile terminal within a fourth preset time period.
[0164] Wherein, the fourth positioning point may be one or at least two; the fourth positioning point may be the same as or different from the third positioning point.
[0165] In some alternative implementation manners, the fourth positioning point is one; after the electronic device obtains the fourth positioning point of the mobile terminal within the fourth preset time period, according to the geographical location information corresponding to the fourth positioning point, determine whether the mobile terminal is in a preset scene area; if the mobile terminal is in the preset scene area, determine that the mobile terminal has got off the vehicle.
[0166] In some other alternative implementation manners, the fourth positioning point is at least two; among the at least two fourth positioning points, the sampling time interval between two adjacent fourth positioning points collected exceeds the third sampling duration threshold.
[0167] Among them, the third sampling duration threshold can be from 1 minute to 2 minutes, and no specific limitation is made.
[0168] 507. Calculate the third speed at which the mobile terminal moves between at least two fourth positioning points.
[0169] By determining whether the third speed at which the mobile terminal moves between at least two fourth positioning points is lower than the second speed threshold, it is an important prerequisite for judging whether the mobile terminal has got off the vehicle.
[0170] The second speed threshold is determined according to the step change rate detected by the mobile terminal and / or the heart rate detected by the mobile terminal. For example, the second speed threshold can be 6 m / s. If the step change rate is less than the step threshold, the second speed threshold can be reduced to 3 m / s.
[0171] Optionally, the electronic device can also determine whether the mobile terminal has got off the vehicle by combining the third speed, the step change rate collected by the mobile terminal, and the heart rate. For example, when the mobile terminal is moving slowly with a large step change rate and a high heart rate, it indicates that the mobile terminal has got off the vehicle.
[0172] 508. When the third speed is lower than the second speed threshold, judge whether the mobile terminal is in a preset scenario area according to the geographical location information corresponding to at least two fourth positioning points.
[0173] As an optional implementation manner, judging whether the mobile terminal is in a preset scenario area according to the geographical location information corresponding to at least two fourth positioning points may include the following steps:
[0174] When the geographical location information corresponding to the fourth positioning point matches the geographical location information of the preset scenario area, it is determined that the mobile terminal is in the preset scenario area; among them, the geographical location information of the preset scenario area is set by the user.
[0175] For example, the user can set the geographical location information of the preset scenario area as the geographical location information of home and the geographical location information of school. Among them, the geographical location information can be the longitude and latitude of the geographical location where the mobile terminal is located, or the country information, city information, municipal district information, street address, building information, floor information, etc. of the geographical location where the mobile terminal is located, but not limited thereto. The mobile terminal can directly obtain geographical location information such as longitude and latitude through the GPS positioning method. Or, when the mobile terminal obtains the MAC address of a wireless local area network access point (AP), it sends the MAC address to the location server, determines the geographical location of the AP through the location server, and calculates the geographical location of the mobile terminal in combination with the strength of each signal.
[0176] As another alternative embodiment, determining whether the mobile terminal is in a preset scenario area according to the geographical location information respectively corresponding to at least two fourth positioning points may include the following steps:
[0177] According to the geographical location information corresponding to the fourth positioning point, determine the real scenario area corresponding to the fourth positioning point by using the corresponding relationship between the geographical location information included in the map data and the scenario area;
[0178] When the real scenario area where the mobile terminal is located conforms to the preset scenario area, determine that the mobile terminal is in the preset scenario area.
[0179] Among them, the map data can be data provided by a third-party platform; specifically, the third-party platform can use the reverse geocoding service interface to convert geographical location information such as longitude and latitude into corresponding scenario areas, and store the corresponding relationship between the geographical location information and the scenario areas as map data. For example, the geographical location information can be information such as street addresses and longitude and latitude, and the corresponding scenario areas can be parks, hospitals, shopping malls, restaurants, etc.
[0180] Among them, the preset scenario area is determined according to the parameters called from the database. For example, the electronic device can call out the non-drivable area from the database as the preset scenario area. Among them, the preset scenario area can include: areas such as shopping malls, parks, restaurants, rivers, etc.
[0181] For example, when the real scenario area is a shopping mall, that is, when the real scenario area conforms to the preset scenario area, it is determined that the mobile terminal is in the preset scenario area.
[0182] 509. If the mobile terminal is in the preset scenario area, it is determined that the mobile terminal has got off the vehicle.
[0183] If the mobile terminal is in the preset scenario area, it means that the mobile terminal is in a non-drivable area, and the electronic device can determine that the mobile terminal has got off the vehicle.
[0184] Implementing the embodiments of the present application, after quickly and accurately confirming that the mobile terminal is in the on-vehicle state, the electronic device can, according to the positioning distance between every two of the multiple third positioning points, and / or according to the third speed at which the mobile terminal moves between at least two fourth positioning points, and / or according to the geographical location information corresponding to the fourth positioning point, determine whether the mobile terminal is in the preset scenario area, identify the situation where the mobile terminal does not continue to take the vehicle, can timely update the on-vehicle state of the mobile terminal, consider the situation where the mobile terminal gets off the vehicle midway, effectively reduce the misjudgment rate of the on-vehicle state, and improve the accuracy of identifying the on-vehicle state of the mobile terminal.
[0185] Experiments show that the foregoing embodiments can identify that the riding state is the non-riding state within 1 minute to 2 minutes after a person gets off the vehicle.
[0186] Please refer to Figure 6 , Figure 6 which is a schematic structural diagram of a riding state recognition device disclosed in an embodiment of the present application. This riding state recognition device can be applied to any electronic device with data processing capabilities, including but not limited to any of the foregoing mobile terminals, or a background server that provides background services for the mobile terminal. As Figure 6 shown, the riding state recognition device 600 may include: an acquisition module 610, a calculation module 620, and a determination module 630.
[0187] The acquisition module 610 is configured to acquire at least three first positioning points of the mobile terminal within a first preset time period; among the at least three first positioning points, the positioning distance between the earliest acquired first positioning point and the latest acquired first positioning point within the first preset time period is the longest, and the positioning distance between two adjacent first positioning points in terms of acquisition time is greater than a first distance threshold;
[0188] The calculation module 620 is configured to calculate a first speed at which the mobile terminal moves between at least three first positioning points;
[0189] The determination module 630 is configured to determine the riding state of the mobile terminal according to the first speed.
[0190] In one embodiment, the number of at least three first positioning points is three; the three first positioning points correspond to three positioning distances, and the three positioning distances include the distances between every two of the three first positioning points; the three positioning distances conform to the relationship of the three sides of a right triangle.
[0191] In one embodiment, the acquisition module 610 may include: a first acquisition unit, a first calculation unit, and a first determination unit;
[0192] The first acquisition unit is configured to acquire the positioning point that is acquired latest by the mobile terminal within the first preset time period as an ending positioning point; based on the positioning distance between two adjacent first positioning points in terms of acquisition time, sequentially acquire an intermediate positioning point and a starting positioning point; the acquisition time of the starting positioning point within the first preset time is earlier than the acquisition time of the intermediate positioning point within the first preset time;
[0193] The first calculation unit is configured to respectively use the positioning distance between the starting positioning point and the intermediate positioning point, and the positioning distance between the intermediate positioning point and the ending positioning point as the lengths of the right sides of a right triangle, and calculate the length of the hypotenuse of the right triangle; calculate the positioning distance between the starting positioning point and the ending positioning point;
[0194] The first determination unit is configured to determine the starting positioning point, the intermediate positioning point, and the ending positioning point as three first positioning points when it is determined that the positioning distance between the starting positioning point and the ending positioning point is greater than or equal to the hypotenuse length.
[0195] In one embodiment, the determination module 630 is further configured to determine that the riding state of the mobile terminal is the boarded state when the first speed exceeds the first speed threshold; or,
[0196] to determine that the riding state of the mobile terminal is the unboarded state when the first speed does not exceed the first speed threshold.
[0197] In one embodiment, the first speed threshold is determined according to the step change rate detected by the mobile terminal and / or the heart rate detected by the mobile terminal.
[0198] In one embodiment, among at least three first positioning points, the two first positioning points collected latest within the first preset time period are GPS positioning points.
[0199] In one embodiment, the determination module 630 may include: a second acquisition unit, a second calculation unit, and a second determination unit;
[0200] The second acquisition unit is configured to acquire at least three second positioning points of the mobile terminal within a second preset time period when the first speed does not exceed the first speed threshold; the duration of the second preset time period is greater than the duration of the first preset time period; among at least three second positioning points, the sampling time interval between two adjacent second positioning points collected within the second preset time period exceeds the first sampling duration threshold, and the positioning distance between the earliest collected second positioning point and the latest collected second positioning point is the longest, and the positioning distance between two adjacent second positioning points collected is greater than the first distance threshold;
[0201] The second calculation unit is configured to calculate a second speed at which the mobile terminal moves between at least three second positioning points;
[0202] The second determination unit is configured to determine the riding state of the mobile terminal according to the second speed.
[0203] In one embodiment, among at least three first positioning points, the sampling time interval between two adjacent first positioning points collected within the first preset time period exceeds the first sampling duration threshold.
[0204] In one embodiment, among at least three first positioning points, the positioning distance between every two first positioning points is the sum of accuracy error values; the sum of accuracy error values is determined by the accuracy error values respectively corresponding to every two first positioning points.
[0205] In one embodiment, the ride status recognition device 600 further includes: a third acquisition unit and a third determination unit;
[0206] The third acquisition unit is configured to acquire a plurality of third positioning points of the mobile terminal within a third preset time period; among the plurality of third positioning points, the sampling time interval between two adjacent third positioning points collected within the third preset time period exceeds a second sampling duration threshold;
[0207] The third determination unit is configured to determine that the mobile terminal has got off the vehicle when it is detected that the positioning distance between every two third positioning points among the plurality of third positioning points is less than a second distance threshold.
[0208] In one embodiment, the ride status recognition device 600 further includes: a fourth acquisition unit, a judgment unit, and a fourth determination unit;
[0209] The fourth acquisition unit is configured to acquire a fourth positioning point of the mobile terminal within a fourth preset time period;
[0210] The judgment unit is configured to judge whether the mobile terminal is in a preset scene area according to the geographical location information corresponding to the fourth positioning point;
[0211] The fourth determination unit is configured to determine that the mobile terminal has got off the vehicle when it is judged that the mobile terminal is in the preset scene area.
[0212] In one embodiment, there are at least two fourth positioning points; among the at least two fourth positioning points, the sampling time interval between two adjacent fourth positioning points collected exceeds a third sampling duration threshold;
[0213] In one embodiment, the ride status recognition device 600 further includes a third calculation unit;
[0214] The third calculation unit is further configured to calculate a third speed at which the mobile terminal moves between at least two fourth positioning points after the fourth acquisition unit acquires the fourth positioning point of the mobile terminal within the fourth preset time period;
[0215] The judgment unit is further configured to judge whether the mobile terminal is in a preset scene area according to the geographical location information corresponding to at least two fourth positioning points when the third speed is lower than a second speed threshold.
[0216] In one embodiment, the judgment unit is further configured to determine that the mobile terminal is in the preset scene area when the geographical location information corresponding to the fourth positioning point matches the geographical location information of the preset scene area; the geographical location information of the preset scene area is set by the user.
[0217] In one embodiment, the determination unit is further configured to determine the real scenario area corresponding to the fourth positioning point according to the geographical location information corresponding to the fourth positioning point by using the correspondence between the geographical location information included in the map data and the scenario area;
[0218] When the real scenario area where the mobile terminal is located conforms to the preset scenario area, it is determined that the mobile terminal is in the preset scenario area; the preset scenario area is determined according to the parameters called from the database.
[0219] Please refer to Figure 7 , Figure 7 which is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application. As Figure 7 shown, the electronic device 700 may include:
[0220] A memory 710 storing executable program code;
[0221] A processor 720 coupled to the memory 710;
[0222] Wherein, the processor 720 calls the executable program code stored in the memory 710 and executes any one of the ride state recognition methods disclosed in the embodiments of the present application.
[0223] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by the processor, the processor implements any one of the ride state recognition methods disclosed in the embodiments of the present application.
[0224] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the present application. Therefore, the appearances of "in one embodiment" or "in an embodiment" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present application.
[0225] In various embodiments of the present application, it should be understood that the magnitudes of the sequence numbers of the above processes do not necessarily mean the order of execution is necessarily sequential. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0226] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0227] In addition, in each embodiment of the present application, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0228] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc., specifically, the processor in the computer device) to execute some or all of the steps of the above methods in each embodiment of the present application.
[0229] Those of ordinary skill 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 relevant hardware through a program. This program can be stored in a computer-readable storage medium. The storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disk memories, tape memories, or any other computer-readable medium that can be used to carry or store data.
[0230] The above has introduced in detail a method, device, electronic device, and storage medium for recognizing a riding state disclosed in the embodiments of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. At the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for identifying a riding state, characterized in that The method includes: Obtaining at least three first positioning points of the mobile terminal within a first preset time period; among the at least three first positioning points, the positioning distance between the earliest collected first positioning point and the latest collected first positioning point within the first preset time period is the longest, and the positioning distance between two adjacent first positioning points in terms of collection time is greater than a first distance threshold; Calculating a first speed at which the mobile terminal moves between the at least three first positioning points; Determining a riding state of the mobile terminal according to the first speed; the riding state includes a state of being in a vehicle and a state of not being in a vehicle; After determining that the riding state of the mobile terminal is the state of being in a vehicle according to the first speed, obtaining a plurality of third positioning points of the mobile terminal within a third preset time period; among the plurality of third positioning points, the sampling time interval between two adjacent third positioning points in terms of collection time within the third preset time period exceeds a second sampling duration threshold; When it is detected that the positioning distance between every two of the plurality of third positioning points is less than a second distance threshold, determining that the mobile terminal has got off the vehicle.
2. The method according to claim 1, wherein The number of the at least three first positioning points is three; the three first positioning points correspond to three positioning distances, and the three positioning distances include the distances between every two of the three first positioning points; the three positioning distances conform to the relationship of the three sides of a right triangle.
3. The method according to claim 2, wherein The obtaining at least three first positioning points of the mobile terminal within a first preset time period includes: Obtaining the positioning point collected latest by the mobile terminal within the first preset time period as an ending positioning point; Based on the positioning distance between two adjacent first positioning points in terms of collection time, sequentially obtaining a middle positioning point and a starting positioning point; the collection time of the starting positioning point within the first preset time is earlier than the collection time of the middle positioning point within the first preset time; Respectively taking the positioning distance between the starting positioning point and the middle positioning point, and the positioning distance between the middle positioning point and the ending positioning point as the lengths of the right sides of the right triangle, and calculating the length of the hypotenuse of the right triangle; Calculating the positioning distance between the starting positioning point and the ending positioning point; When it is determined that the positioning distance between the starting positioning point and the ending positioning point is greater than or equal to the length of the hypotenuse, determining the starting positioning point, the middle positioning point, and the ending positioning point as the three first positioning points.
4. The method according to claim 1, wherein The determining the riding state of the mobile terminal according to the first speed includes: When the first speed exceeds a first speed threshold, determining that the riding state of the mobile terminal is the state of being in a vehicle; or, When the first speed does not exceed the first speed threshold, determining that the riding state of the mobile terminal is the state of not being in a vehicle.
5. The method according to claim 4, wherein The first speed threshold is determined according to the step change rate detected by the mobile terminal and / or the heart rate detected by the mobile terminal.
6. The method according to claim 1, characterized in that Among the at least three first positioning points, the two first positioning points collected latest within the first preset time period are GPS positioning points.
7. The method according to claim 6, characterized in that, Determining the riding state of the mobile terminal according to the first speed includes: When the first speed does not exceed the first speed threshold, obtaining at least three second positioning points of the mobile terminal within a second preset time period; the duration of the second preset time period is greater than the duration of the first preset time period; among the at least three second positioning points, the sampling time interval between two adjacent second positioning points collected within the second preset time period exceeds the first sampling duration threshold, and the positioning distance between the earliest collected second positioning point and the latest collected second positioning point is the longest, and the positioning distance between two adjacent second positioning points collected is greater than the first distance threshold; Calculating a second speed at which the mobile terminal moves between the at least three second positioning points; Determining the riding state of the mobile terminal according to the second speed.
8. The method according to claim 1, wherein Among the at least three first positioning points, the sampling time interval between two adjacent first positioning points collected within the first preset time period exceeds the first sampling duration threshold.
9. The method according to claim 8, characterized in that Among the at least three first positioning points, the positioning distance between every two first positioning points is the sum of precision error values; the sum of precision error values is determined by the precision error values respectively corresponding to every two first positioning points.
10. The method according to claim 1, characterized in that, After determining that the riding state of the mobile terminal is the state of being in a vehicle according to the first speed, the method further includes: Obtaining a fourth positioning point of the mobile terminal within a fourth preset time period; Judging whether the mobile terminal is in a preset scenario area according to the geographical location information corresponding to the fourth positioning point; When it is judged that the mobile terminal is in the preset scenario area, determining that the mobile terminal has got off the vehicle.
11. The method according to claim 10, wherein There are at least two fourth positioning points; among the at least two fourth positioning points, the sampling time interval between two adjacent fourth positioning points collected exceeds the third sampling duration threshold; After obtaining the fourth positioning point of the mobile terminal within the fourth preset time period, the method further includes: Calculating a third speed at which the mobile terminal moves between the at least two fourth positioning points; The judging whether the mobile terminal is in a preset scenario area according to the geographical location information corresponding to the fourth positioning point includes: When the third speed is lower than the second speed threshold, judging whether the mobile terminal is in a preset scenario area according to the geographical location information respectively corresponding to the at least two fourth positioning points.
12. The method according to claim 10 or 11, characterized in that, The judging whether the mobile terminal is in a preset scenario area according to the geographical location information corresponding to the fourth positioning point includes: When the geographical location information corresponding to the fourth positioning point matches the geographical location information of the preset scenario area, determining that the mobile terminal is in the preset scenario area; the geographical location information of the preset scenario area is set by the user.
13. The method according to claim 10 or 11, characterized in that, The preset scenario area is determined according to parameters called from a database; The judging whether the mobile terminal is in a preset scenario area according to the geographical location information corresponding to the fourth positioning point includes: Based on the geographical location information corresponding to the fourth positioning point, determine the real scene area corresponding to the fourth positioning point by using the corresponding relationship between the geographical location information included in the map data and the scene area; When the real scene area where the mobile terminal is located conforms to the preset scene area, determine that the mobile terminal is in the preset scene area.
14. A device for recognizing the riding state, characterized in that, Comprising: An acquisition module, configured to acquire at least three first positioning points of the mobile terminal within a first preset time period; Among the at least three first positioning points, the positioning distance between the earliest acquired first positioning point and the latest acquired first positioning point within the first preset time period is the longest, and the positioning distance between two adjacent first positioning points in terms of acquisition time is greater than a first distance threshold; A calculation module, configured to calculate a first speed at which the mobile terminal moves between the at least three first positioning points; A determination module, configured to determine the riding state of the mobile terminal according to the first speed; the riding state includes a state of having boarded and a state of not having boarded; A third acquisition unit, configured to, after determining that the riding state of the mobile terminal is the state of having boarded according to the first speed, acquire a plurality of third positioning points of the mobile terminal within a third preset time period; among the plurality of third positioning points, the sampling time interval between two adjacent third positioning points in terms of acquisition time within the third preset time period exceeds a second sampling duration threshold; A third determination unit, configured to determine that the mobile terminal has alighted when it is detected that the positioning distance between every two of the plurality of third positioning points is less than a second distance threshold.
15. An electronic device, characterized in that, Comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method according to any one of claims 1 to 13.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Method and device for whether user is in rapid moving state or not and intelligent wearable equipment
CN112346095A
Mobile advertisement self-adaptive putting method, server and storage medium
CN113393274A