Floor determination method, device, terminal equipment and storage medium

By obtaining the historical direct change information and the real-time altitude of the barometer, the floor height is evaluated, which solves the problem of inaccurate floor positioning in the existing technology and improves the accuracy and efficiency of floor positioning.

CN115127515BActive Publication Date: 2024-09-24GUANGDONG XIAOTIANCAI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210347187.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-01
Publication Date
2024-09-24
Estimated Expiration
2042-04-01

AI Technical Summary

Technical Problem

Existing floor positioning technology has poor accuracy on the floor where the user is located due to the large height difference between single floors in buildings.

Method used

By obtaining the altitude change value interval of multiple historical direct change information, the height value of each floor in the floor height range is evaluated, and the target floor height is determined based on the altitude obtained by the barometer in real time, thereby improving the accuracy of floor positioning.

Benefits of technology

It achieves the accurate determination of the floor height of the building where the terminal equipment is located, improves the accuracy of floor positioning, reduces power consumption and avoids waste of network resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115127515B
    Figure CN115127515B
Patent Text Reader

Abstract

The embodiment of the present application discloses a floor determination method, device, terminal device and storage medium, the method comprising: obtaining multiple historical direct change information; evaluating each floor height value contained in the floor height range according to the altitude change value intervals corresponding to the multiple historical direct change information, so as to determine the target floor height; obtaining the air pressure value of the terminal device in the building in real time through a barometer, and determining the real-time altitude according to the air pressure value; determining the target floor where the terminal device is located according to the real-time altitude and the target floor height. The implementation of the embodiment of the present application can accurately determine the height of a single floor of the building where the terminal device is located, and can improve the accuracy of the determined target floor where the terminal device is located.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of positioning technology, and in particular to a floor determination method, device, terminal equipment and storage medium. Background Art

[0002] With the development of positioning technology, the demand for indoor positioning technology is also increasing, and positioning the floor where the user is located is an important part of indoor positioning technology. The existing floor positioning method is generally to determine the height of the user, and then determine the floor where the user is located based on the height of the single floor. However, due to the large difference in the height of the single floor between different buildings, the accuracy of the determined floor of the building where the user is located is poor. Summary of the invention

[0003] The embodiments of the present application disclose a floor determination method, apparatus, terminal device and storage medium, which can accurately determine the floor height of the building where the terminal device is located, thereby improving the accuracy of the determined floor of the building where the terminal device is located.

[0004] A first aspect of an embodiment of the present application provides a floor determination method, which is applied to a terminal device, and the method includes:

[0005] Acquire multiple pieces of historical direct change information, each piece of historical direct change information includes an altitude change value interval of the terminal device directly changing from the first floor to the second floor, the direct change means that the terminal device directly changes from the first floor to the second floor without stopping at an intermediate floor between the first floor and the second floor, and the first floor and the second floor are any different floors;

[0006] According to the altitude change value intervals respectively corresponding to the plurality of historical direct change information, each floor height value included in the floor height range is evaluated to determine a target floor height, wherein the target floor height is the most likely floor height value in the floor height range;

[0007] Obtaining the air pressure value of the terminal device in the building in real time through a barometer, and determining the real-time altitude according to the air pressure value;

[0008] The target floor where the terminal device is located is determined according to the real-time altitude and the target floor height.

[0009] As an optional implementation manner, in the first aspect of this embodiment, the evaluating each floor height value included in the floor height range according to the altitude change value intervals respectively corresponding to the multiple historical direct change information to determine the target floor height includes:

[0010] Compare the multiple values ​​of each floor height value in the floor height range with the altitude change value intervals respectively corresponding to the plurality of historical direct change information;

[0011] If the multiple value of the first floor height value is within the altitude change value interval corresponding to any historical direct change information, the score value of the first floor height value is accumulated according to the historical direct change information in which the multiple value of the first floor height value is located; the first floor height value is any floor height value within the floor height range;

[0012] The total score values ​​corresponding to the floor height values ​​are calculated, and the floor height value with the largest total score value is determined as the target floor height.

[0013] As an optional implementation manner, in the first aspect of this embodiment, the obtaining of multiple historical direct change information includes:

[0014] Acquire a first altitude set and a second altitude set corresponding to the terminal device directly changing from the first floor to the second floor, wherein the first altitude set includes real-time altitudes collected within a first time period of the first floor, and the second altitude set includes real-time altitudes collected within a second time period of the second floor;

[0015] Corresponding historical direct change information is determined according to the first altitude set and the second altitude set.

[0016] As an optional implementation manner, in the first aspect of this embodiment, determining the historical direct change information according to the first altitude set and the second altitude set includes:

[0017] Determine a minimum altitude change value according to a maximum real-time altitude value in the first altitude set and a minimum real-time altitude value in the second altitude set;

[0018] Determine a maximum altitude change according to a minimum altitude change value in the first altitude set and a maximum altitude change value in the second altitude set;

[0019] The numerical interval between the minimum altitude change value and the maximum altitude change value is determined as the altitude change value interval included in the corresponding historical direct change information.

[0020] As an optional implementation manner, in the first aspect of this embodiment, if the multiple value of the first floor height value is in the altitude change value interval corresponding to any historical direct change information, before accumulating the score value of the first floor height value according to the historical direct change information in which the multiple value of the first floor height value is located, the method further includes:

[0021] Determine a first real-time altitude median of a first altitude set corresponding to each of the historical direct access change information and a second real-time altitude median of a second altitude set corresponding to each of the historical direct access change information;

[0022] Determine the score corresponding to each of the historical direct access change information according to the first real-time altitude median and the second real-time altitude median corresponding to each of the historical direct access change information;

[0023] The step of accumulating the score value of the first floor height value according to the historical direct change information of the multiple value of the first floor height value includes:

[0024] The score of the first floor height value is accumulated according to the score corresponding to the historical direct change information of the multiple value of the first floor height value.

[0025] As an optional implementation manner, in the first aspect of this embodiment, the obtaining of multiple historical direct change information includes:

[0026] If the change range of the real-time altitude in the third time period is greater than the altitude difference threshold, multiple historical direct change information is obtained.

[0027] As an optional implementation manner, in the first aspect of this embodiment, determining the target floor where the terminal device is located according to the real-time altitude and the target floor height includes:

[0028] Determine the real-time altitude of the terminal device on the third floor and the current real-time altitude, the third floor being the starting floor of the terminal device in this direct change;

[0029] The altitude difference is determined according to the real-time altitude on the third floor and the current real-time altitude, and the target floor where the terminal device is located is determined according to the altitude difference and the target floor height.

[0030] A second aspect of an embodiment of the present application provides a floor determination device, the device comprising:

[0031] A historical information acquisition module, used to acquire a plurality of historical direct change information, each of which includes an altitude change value interval of the terminal device directly changing from the first floor to the second floor, wherein the direct change means that the terminal device directly changes from the first floor to the second floor without stopping at an intermediate floor between the first floor and the second floor, and the first floor and the second floor are any different floors;

[0032] A floor height determination module, configured to evaluate each floor height value included in the floor height range according to the altitude change value intervals respectively corresponding to the plurality of historical direct change information, so as to determine a target floor height, wherein the target floor height is the most likely floor height value in the floor height range;

[0033] An altitude determination module, used to obtain the air pressure value of the terminal device in the building in real time through a barometer, and determine the real-time altitude according to the air pressure value;

[0034] The target floor determination module is used to determine the target floor where the terminal device is located according to the real-time altitude and the target floor height.

[0035] A third aspect of an embodiment of the present application provides a terminal device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor implements any one of the floor determination methods disclosed in the embodiments of the present application.

[0036] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, any one of the floor determination methods disclosed in the embodiments of the present application is implemented.

[0037] Compared with the related art, the embodiments of the present application have the following beneficial effects:

[0038] By obtaining multiple historical direct change information, which refers to the altitude change value interval when two different floors undergo direct change, the altitude values ​​of each floor in the floor height range are evaluated according to the altitude change value intervals corresponding to the multiple historical direct change information, and the target floor height is determined, so that the floor height of the building where the terminal device is located can be accurately determined. The real-time altitude is determined by the air pressure value obtained by the barometer, and finally the target floor of the terminal device is determined according to the real-time altitude and the target floor, so that the accuracy of the determined target floor of the terminal device can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0040] Figure 1 It is a schematic diagram of an application scenario of a floor determination method disclosed in an embodiment of the present application;

[0041] Figure 2 It is a method flow chart of a floor determination method disclosed in an embodiment of the present application;

[0042] Figure 3 This is a schematic diagram of a method flow of another floor determination method in an embodiment of the present application;

[0043] Figure 4 A flowchart of obtaining multiple historical direct change information in one embodiment;

[0044] Figure 5 is a structural schematic diagram of a floor determination device disclosed in an embodiment of the present application;

[0045] Figure 6 The present invention is a schematic diagram of the structure of a terminal device disclosed in an embodiment. DETAILED DESCRIPTION

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

[0047] 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 inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0048] The embodiments of the present application disclose a floor determination method, device, terminal device and storage medium, which can avoid the waste of network resources and reduce the power consumption required by the terminal device.

[0049] See also Figure 1 , Figure 1Schematic diagram of an application scenario of a floor determination method disclosed in an embodiment of the present application. Figure 1 As shown, it may include a terminal device 10, which may be a wearable device such as a smart watch, a smart bracelet or a smart headset, or a mobile device such as a smart phone, a tablet computer or a laptop computer. The terminal device 10 obtains multiple historical direct change information, and evaluates each floor height value contained in the floor height range according to the altitude change value intervals corresponding to the multiple historical direct change information to determine the target floor height. The terminal device 10 obtains the air pressure value of the terminal device 10 in the building in real time through a barometer, and determines the real-time altitude based on the air pressure value. The terminal device determines the target floor where the terminal device is located based on the real-time altitude and the target floor height.

[0050] See also Figure 2 , Figure 2 1 is a flow chart of a method for determining a floor disclosed in an embodiment of the present application, and the method can be applied to the aforementioned terminal device 10. Figure 2 As shown, the method may include the following steps:

[0051] 210. Obtain multiple historical direct change information, each historical direct change information includes an altitude change value interval of the terminal device directly changing from the first floor to the second floor. The direct change means that the terminal device directly changes from the first floor to the second floor without staying on the intermediate floors between the first floor and the second floor. The first floor and the second floor are arbitrarily different floors.

[0052] In an embodiment of the present application, the terminal device obtains multiple historical direct change information from the cloud or the database of the terminal device itself. Among them, since the altitude value may fluctuate when on the same floor, the historical direct change information is the range of the altitude change value that the terminal device may be in after changing from the first floor to the second floor. For example, when the terminal device is on the first floor, the altitude may vary in the range of 10m-10.5m, and when the terminal device is on the second floor, the altitude may vary in the range of 20m-20.5m. It can be seen that when the terminal device changes directly from the first floor to the second floor, the altitude change value can be any value in the range of 9.5m-10.5m, that is, the range of 9.5m-10.5m is the altitude change value interval of the historical direct change information of the terminal device changing from the first floor to the second floor.

[0053] In addition, direct change means that in the process of moving from the first floor to the second floor, there is no stop at the floors between the first floor and the second floor. For example, the first floor is the 2nd floor of the building, and the second floor is the 5th floor of the building. In the process of moving from the 2nd floor to the 5th floor, there is no stop at the 3rd floor and the 4th floor. In this case, it can be considered that the terminal device has directly changed from the 2nd floor to the 5th floor.

[0054] In the embodiment of the present application, each time the terminal device changes from the first floor to the second floor, it can obtain the direct change information and store it in the cloud or the database of the terminal device itself as historical direct change information, so as to be used in the subsequent process of determining the floor height. The first floor and the second floor can be any different floors, and the first floor and the second floor of each direct change may be the same or different. For example, the first floor of the last direct change may be the same as the first floor of this direct change, and the second floor of the last direct change may be different from the second floor of this direct change.

[0055] 220. According to the altitude change value intervals corresponding to the multiple historical direct change information, each floor height value included in the floor height range is evaluated to determine the target floor height, and the target floor height is the most likely floor height value in the floor height range.

[0056] In an embodiment of the present application, the terminal device uses the altitude change value interval corresponding to each historical direct change information to evaluate the possibility that each floor height value contained in the floor height range satisfies each altitude change value interval, and determines the floor height value with the highest possibility as the target floor height. Among them, the floor height range can be set by the user according to the experience value. For example, the user can set the floor height range to a range of 2.5m-5m, but is not limited to this. In addition, each floor height value within the floor height range can be divided at equal intervals to obtain a discrete sequence of floor height values, for example, the floor height range of 2.5m-5m is divided at intervals of 1cm; each floor height value within the floor height range can also be divided at unequal intervals, for example, the floor height range of 2.5m-5m is divided into 5 floor height values, namely 2.5m, 2.7m, 3m, 4m and 5m.

[0057] In some embodiments, the process of evaluating each floor height value included in the floor height range according to the altitude change value intervals corresponding to the plurality of historical direct change information in step 220 to determine the target floor height may include the following steps:

[0058] Compare the multiple values ​​of each floor height value in the floor height range with the altitude change value intervals corresponding to the plurality of historical direct change information;

[0059] If the multiple value of the first floor height value is within the altitude change value interval corresponding to any historical direct change information, the number of times of the first floor height value is accumulated; the first floor height value is any floor height value in the floor height range;

[0060] The total comparison values ​​corresponding to the height values ​​of each floor are calculated, and the floor height value with the largest total comparison value is determined as the target floor height.

[0061] In an embodiment of the present application, the terminal device compares the multiple values ​​of each floor height value in the floor height range with the altitude change value intervals corresponding to each historical direct change information. The comparison method may include: determining whether the multiple value of the floor height value is in an altitude change value interval corresponding to a historical direct change information.

[0062] If the multiple value of the first floor height value is within the altitude change value interval corresponding to any historical direct change information, that is, the multiple value of the first floor height value satisfies the altitude change value interval corresponding to this historical direct change information, then the terminal device accumulates the number of times the first floor height value is added by 1, and the number is used to calculate the number of times the first floor height value is within the altitude change value interval corresponding to the historical direct change information.

[0063] In an embodiment of the present application, the terminal device can calculate the number of accumulations of each floor height value, that is, the total number of times corresponding to each floor height, and select the floor height value with the largest total comparison value and determine it as the target floor height value.

[0064] In the embodiment of the present application, if the floor height value with the largest total number of times is not unique, a target floor height value can be arbitrarily selected from the multiple floor height values ​​with the largest total number of times as the target height value.

[0065] In an embodiment of the present application, a comparison value of the floor height value is calculated based on the number of multiples of each floor height value that are in the altitude change value interval corresponding to each historical direct change information, and the floor height value with the highest total number of times is selected as the target floor height, so that the determined target floor height is the floor height value that is in the altitude change value interval corresponding to the most historical direct change information, thereby improving the accuracy of the determined target floor height.

[0066] In some embodiments, the process of evaluating each floor height value included in the floor height range according to the altitude change value intervals corresponding to the plurality of historical direct change information in step 220 to determine the target floor height may include the following steps:

[0067] Determine the probability value that each floor height value in the floor height range satisfies the altitude change value intervals corresponding to the plurality of historical direct change information;

[0068] If the probability value of the first floor height value satisfying the altitude change value interval corresponding to any historical direct change information is greater than the preset probability threshold, the score value of the first floor height value is accumulated according to the historical direct change information satisfied by the first floor height value; the first floor height value is any floor height value in the floor height range;

[0069] The total score corresponding to each floor height value is calculated, and the floor height value with the largest total score value is determined as the target floor height.

[0070] In the embodiment of the present application, the probability value of each floor height value satisfying the altitude change value interval corresponding to each historical direct change information can be determined by an algorithm such as a decision tree. For example, if the probability that the floor height value a satisfies the altitude change value interval corresponding to the historical direct change information A is greater than a preset probability threshold, then the terminal device can accumulate the score value of the floor height value a according to the historical direct change information A.

[0071] In an embodiment of the present application, an algorithm is used to calculate the probability that the floor height value satisfies each altitude change value interval, and then the floor height value is scored, which can effectively determine the most likely floor height value from the floor height range as the target floor height.

[0072] 230. Obtain the air pressure value of the terminal device in the building in real time through a barometer, and determine the real-time altitude based on the air pressure value.

[0073] In the embodiment of the present application, the terminal device collects the air pressure value of the terminal device in the building in real time through a barometer, and the terminal device can determine the real-time altitude based on the mathematical relationship between the air pressure value and the altitude. For example, the real-time altitude can be determined based on the air pressure value, which can be formula (1):

[0074]

[0075] Among them, H is the real-time altitude, P is the real-time collected air pressure value, and P0 is the atmospheric pressure value (0°C, 101.325kPa).

[0076] In an embodiment of the present application, the barometer may be disposed in the terminal device, or may be disposed outside the terminal device and communicatively connected to the terminal device, so that the barometer can transmit the collected air pressure value data to the terminal device.

[0077] 240. Determine the target floor where the terminal device is located according to the real-time altitude and the target floor height.

[0078] In an embodiment of the present application, the terminal device determines the target floor of the terminal device based on the determined real-time altitude and the target floor height, which may include: the terminal device first calculates the difference between the determined real-time altitude and the real-time altitude when the terminal device is on the first floor of the building, divides the difference by the target floor height, and rounds the result obtained, and the obtained integer is the target floor of the terminal device.

[0079] By adopting the above embodiment, the height of a single floor of the building where the terminal device is located can be accurately determined, and the real-time altitude can be determined by the air pressure value obtained by the barometer. Finally, the target floor of the terminal device can be determined based on the real-time altitude and the target floor, which can improve the accuracy of the determined target floor of the terminal device.

[0080] In one embodiment, the process of determining the target floor where the terminal device is located according to the real-time altitude and the target floor height in step 240 may include the following steps:

[0081] Determine the real-time altitude of the terminal device on the third floor and the current real-time altitude, where the third floor is the starting floor of the terminal device in this direct change;

[0082] The altitude difference is determined according to the real-time altitude on the third floor and the current real-time altitude, and the target floor where the terminal device is located is determined according to the altitude difference and the height of the target floor.

[0083] In the embodiment of the present application, before determining the target floor where the terminal device is located, the terminal device may first obtain the air pressure value of the floor where the terminal device is located before the direct change to the terminal device. The floor where the terminal device is located before the direct change refers to the third floor. The terminal device determines the real-time altitude of the terminal device when it is on the third floor according to the air pressure value of the third floor obtained. Since the terminal device can determine the target floor where it is located in real time, the terminal device can determine the difference between the real-time altitude of the floor where it is located after the direct change and the real-time altitude of the third floor, that is, the difference between the current real-time altitude and the real-time altitude of the third floor, divide this difference by the determined target floor height value, and then perform rounding operation, add the obtained positive integer value to the known value of the third floor, and the result obtained is the target floor where the terminal device is located. Since the terminal device determines the real-time altitude and floor value of each floor in real time, it can directly retrieve the real-time altitude and floor value of the floor where it is located before the direct change to determine the target floor, which can reduce the data required for the target floor determination process and improve the efficiency of the target floor determination process.

[0084] In one embodiment, the multiple historical direct change information is obtained in step 210, including:

[0085] If the change range of the real-time altitude in the third time period is greater than the altitude difference threshold, multiple historical direct change information is obtained.

[0086] In an embodiment of the present application, before obtaining multiple historical direct change information, the terminal device may first analyze the change in the real-time altitude determined by the terminal device, which may include: the terminal device compares the change amplitude of the real-time altitude within the third time period with a preset height difference threshold. If the change amplitude of the real-time altitude within the third time period is greater than the height difference threshold, then it can be considered that the terminal device has undergone a floor change. At this time, multiple historical change information can be obtained to determine the target floor height; if the change amplitude of the real-time altitude within the third time period is less than or equal to the height difference threshold, then it can be considered that the terminal device has not undergone a floor change. At this time, the terminal device does not need to obtain multiple historical change information to determine the target floor height, and then determine the target floor after the direct change.

[0087] In an embodiment of the present application, multiple historical information can be obtained after the floor change occurs in the terminal device to gradually determine the target floor after the floor change, thereby avoiding continuous determination of the floor where the terminal device is located and reducing the power consumption of the terminal device.

[0088] In one embodiment, see Figure 3 , Figure 3 FIG. 1 is a flow chart of another method for determining a floor in an embodiment of the present application, which method can be applied to the aforementioned terminal device 10. Figure 3 As shown, the method may include the following steps:

[0089] 310. Obtain a first altitude set and a second altitude set corresponding to a direct change of the terminal device from the first floor to the second floor, wherein the first altitude set includes real-time altitudes collected within a first time period on the first floor, and the second altitude set includes real-time altitudes collected within a second time period on the second floor.

[0090] In an embodiment of the present application, the terminal device acquires an air pressure value collected within a first time period when the terminal device is on the first floor, and determines the real-time altitude within the first time period based on the air pressure value. Since there are multiple real-time altitudes within the first time period, the real-time altitude within the first time period is taken as the first altitude set. In addition, the terminal device also acquires an air pressure value collected within a second time period when the terminal device is on the second floor, and determines the real-time altitude within the second time period based on the air pressure value. Similarly, the real-time altitude within the second time period is taken as the second altitude set. Among them, the first time period and the second time period can be the same time length, or different time lengths, which are not specifically limited here.

[0091] 320. Determine corresponding historical direct change information according to the first altitude set and the second altitude set.

[0092] In the embodiment of the present application, the terminal device can determine a historical direct change information according to the change range of the real-time altitude in the first altitude set and the change range of the real-time altitude in the second altitude set. Since the first floor and the second floor are any different floors, different first floors and second floors can determine multiple historical direct change information.

[0093] In an embodiment of the present application, a historical direct change information is determined based on a first altitude set corresponding to the first floor and a second altitude set corresponding to the second floor, and multiple historical direct change information are determined based on combinations of different first floors and different second floors. The altitude change value interval corresponding to the historical direct change information can be obtained based on the altitude set at the time of the direct change of the floor, so that the historical direct change information can include a more accurate altitude change value interval.

[0094] 330. Compare the multiple values ​​of each floor height value in the floor height range with the altitude change value intervals corresponding to the multiple historical direct change information.

[0095] In an embodiment of the present application, the terminal device compares the multiple values ​​of each floor height value in the floor height range with the altitude change value intervals corresponding to each historical direct change information, to determine whether the multiple values ​​of each floor height value satisfy each altitude change value interval. The comparison method may include: determining whether the multiple value of the floor height value is in an altitude change value interval corresponding to a historical direct change information, and if so, it is considered that the multiple value of the floor height value satisfies the altitude change value interval corresponding to the historical direct change information; if not, it is considered that the multiple value of the floor height value does not satisfy the altitude change value interval corresponding to the historical direct change information.

[0096] 340. If the multiple value of the first floor height value is in the altitude change value interval corresponding to any historical direct change information, the score value of the first floor height value is accumulated according to the historical direct change information in which the multiple value of the first floor height value is located; the first floor height value is any floor height value in the floor height range.

[0097] In the embodiment of the present application, each historical direct access change information may correspond to a score, and the scores corresponding to each historical direct access change information may be the same score or different scores. For example, the scores corresponding to historical direct access change information A and historical direct access change information B may both be 2; or the score corresponding to historical direct access change information A may be 2, and the score corresponding to historical direct access change information B may be 3. The score values ​​of each floor height value may be initially 0 or other identical values.

[0098] In an embodiment of the present application, if the multiple value of the first floor height value is in the altitude interval corresponding to any historical direct change information, then the terminal device can accumulate the score value of the first floor height value according to the score corresponding to the historical direct change information where the multiple value of the first floor height value is located. The first floor height value is any floor height value. The multiple can be a fixed integer value, such as 5, and the multiple value of each floor height value is the product of each floor height value and 5.

[0099] In some embodiments, in step 330, if the multiple value of the first floor height value is within the altitude change value interval corresponding to any historical direct change information, the process of accumulating the score value of the first floor height value according to the historical direct change information in which the multiple value of the first floor height value is located may include the following steps:

[0100] If the product of the first floor height value and any positive integer is in the altitude change value interval corresponding to any historical direct change information, the score value of the first floor height value is accumulated according to the historical direct change information in which the multiple value of the first floor height value lies.

[0101] For example, the floor height values ​​included in the floor height range are 2.5, 3 and 3.5 respectively, and the altitude change value interval corresponding to the historical direct change information A is (3.2, 5.3). It can be seen that the product of the floor height value 2.5 and the positive integer 2 is in the altitude change value interval corresponding to the historical direct change information A, and the product of the floor height value 3.5 and the positive integer 1 is in the altitude change value interval corresponding to the historical direct change information A. Then the terminal device accumulates the scoring values ​​of the floor height value 2.5 and the floor height value 3.5 according to the historical direct change information A.

[0102] In the embodiment of the present application, the target floor height can be determined more accurately from the floor height range, thereby improving the accuracy of the determined target floor.

[0103] 350. Calculate the total score values ​​corresponding to the height values ​​of each floor, and determine the floor height value with the largest total score value as the target floor height.

[0104] In an embodiment of the present application, the terminal device can calculate the accumulated score value of each floor height value, that is, the total score value corresponding to each floor height, and select the floor height value with the largest total score value and determine it as the target floor height value.

[0105] In the embodiment of the present application, if the floor height value with the largest total score value is not unique, a target floor height value can be arbitrarily selected from multiple floor height values ​​with the largest total score values ​​as the target height value.

[0106] In an embodiment of the present application, the scoring value of the floor height value is calculated based on the relationship between the multiple values ​​of each floor height value and the altitude change value interval corresponding to each historical direct change information, and the floor height value with the highest total scoring value is selected as the target floor height, so that the determined target floor height is the floor height value that best satisfies the altitude change value intervals corresponding to multiple historical direct change information, thereby improving the accuracy of the determined target floor height.

[0107] In some embodiments, the terminal device may first compare the multiple values ​​of each floor height value in the floor height range with the altitude change value interval corresponding to a historical direct change information, and according to the historical direct change information, accumulate the score values ​​of the floor height values ​​whose multiple values ​​are in the altitude change value interval corresponding to the historical direct change information, and then calculate the total score value corresponding to each floor height value. If the floor height value with the largest total score value is unique, the floor height value with the largest total score value is determined as the target floor height. If the floor height value with the largest total score value is not unique, the terminal device continues to compare the multiple values ​​of each floor height value in the floor height range with the altitude change value interval corresponding to another historical direct change information, until the floor height value with the largest total score value is unique.

[0108] For example, the floor height values ​​included in the floor height range are 2.5, 3, and 3.5, respectively, and the historical direct change information includes A, B, and C. The terminal device compares the multiple values ​​of 2.5, 3, and 3.5 with the altitude change value interval corresponding to the historical direct change information A. If only the multiple value of 3 is in the altitude change value interval corresponding to the historical direct change information A, then the terminal device accumulates the score value of the floor height value 3 according to the historical direct change information A. At this time, the floor height value with the largest total score value is unique, that is, the floor height value is 3. At this time, the terminal device no longer needs to compare the multiple values ​​of the floor height values ​​2.5, 3, and 3.5 with the altitude change value interval corresponding to the historical direct change information B or C.

[0109] In the embodiment of the present application, the amount of calculation required for the target floor height determination process can be effectively reduced, thereby improving the efficiency of the floor determination process.

[0110] 360. Obtain the air pressure value of the terminal device in the building in real time through the barometer, and determine the real-time altitude based on the air pressure value.

[0111] 370. Determine the target floor where the terminal device is located according to the real-time altitude and the target floor height.

[0112] In one embodiment, see Figure 4 , Figure 4 The flowchart of obtaining multiple historical direct change information in one embodiment is as follows. The process of determining the historical direct change information according to the first altitude set and the second altitude set in step 320 may include the following steps:

[0113] 410. Determine a minimum altitude change value according to a maximum real-time altitude value in the first altitude set and a minimum real-time altitude value in the second altitude set.

[0114] In the embodiment of the present application, the terminal device collects air pressure values ​​within a first time period when the terminal device is on the first floor to determine a real-time altitude set within a first time period when the terminal device is on the first floor, that is, a first altitude set. In addition, the terminal device collects air pressure values ​​within a second time period when the terminal device is on the second floor to determine a real-time altitude set within a second time period when the terminal device is on the second floor, that is, a second altitude set.

[0115] The terminal device determines the maximum real-time altitude from the first altitude set, that is, the first altitude maximum value, and determines the minimum real-time altitude from the second altitude set, that is, the second altitude minimum value, and determines the minimum altitude change value according to the first altitude maximum value and the second altitude minimum value. For example, if the first altitude maximum value is A and the second altitude minimum value is B, then the altitude change value minimum change_min is BA.

[0116] 420. Determine a maximum altitude change according to a minimum altitude change value in the first altitude set and a maximum altitude change value in the second altitude set.

[0117] In the embodiment of the present application, the terminal device determines the minimum real-time altitude from the first altitude set, that is, the first altitude minimum value, and at the same time, determines the maximum real-time altitude from the second altitude set, that is, the second altitude maximum value, and determines the maximum altitude change value according to the first altitude minimum value and the second altitude maximum value. For example, if the first altitude minimum value is C and the second altitude maximum value is D, then the maximum altitude change value change_max is DC.

[0118] 430. Determine a numerical range between a minimum altitude change value and a maximum altitude change value as an altitude change value range included in the corresponding historical direct change information.

[0119] In the embodiment of the present application, the terminal device determines the altitude change value interval (change_min, change_max) corresponding to the direct change from the first floor to the second floor according to the minimum altitude change value change_min and the maximum altitude change value change_max. According to the direct changes between different first floors and different second floors, the altitude change value interval corresponding to other historical direct change information is determined.

[0120] In the embodiment of the present application, the accuracy of the altitude change value interval corresponding to the determined historical direct change information can be improved.

[0121] In one embodiment, in step 330, if the multiple value of the first floor height value is within the altitude change value interval corresponding to any historical direct change information, the following steps are further included before accumulating the score value of the first floor height value according to the historical direct change information where the multiple value of the first floor height value is located:

[0122] Determine a first real-time altitude median of a first altitude set corresponding to each historical direct change information and a second real-time altitude median of a second altitude set corresponding to each historical direct change information;

[0123] The score corresponding to each piece of historical direct access change information is determined according to the first real-time altitude median and the second real-time altitude median corresponding to each piece of historical direct access change information.

[0124] In an embodiment of the present application, when the terminal device changes from the first floor to the second floor directly, for this direct change, the terminal device acquires the air pressure value collected within the first time period when the terminal device is on the first floor, and determines the real-time altitude set within the first time period based on the air pressure value, that is, the first altitude set. And acquires the air pressure value collected within the second time period when the terminal device is on the second floor, and determines the real-time altitude set within the second time period based on the air pressure value, that is, the second altitude set. The first altitude set and the second altitude set determined by the terminal device are the first altitude set and the second altitude set corresponding to the direct change from the first floor to the second floor.

[0125] The terminal device determines the first real-time median altitude according to the first altitude set, and determines the second real-time median altitude according to the second altitude set. The terminal device uses the absolute value of the difference between the first real-time median altitude and the second real-time median altitude as the score corresponding to the direct change from the first floor to the second floor. According to the historical direct change information corresponding to the direct change from the first floor to the second floor, the score is determined to be the score corresponding to the historical direct change information. According to the direct changes between different first floors and different second floors, the scores corresponding to different historical direct change information are determined.

[0126] In addition, the process of accumulating the score value of the first floor height value according to the historical direct change information of the multiple value of the first floor height value in step 340 may include:

[0127] The score of the first floor height value is accumulated according to the score corresponding to the historical direct change information of the multiple value of the first floor height value.

[0128] In the embodiment of the present application, the terminal device accumulates the score value of the first floor height value whose multiple value is in the altitude change value interval corresponding to the historical direct change information according to the score corresponding to the historical direct change information. For example, the score corresponding to the historical direct change information A is 2, and among the floor height values ​​a, b, and c, only the multiple value of the floor height value a is in the altitude change value interval corresponding to the historical direct change information A, then the terminal device accumulates the score corresponding to the historical direct change information A, which is 2, into the score value of the floor height value a.

[0129] The terminal device accumulates the score values ​​of the first floor height values ​​whose multiple values ​​are in the altitude change value interval corresponding to the historical direct change information in the above-mentioned manner according to the scores corresponding to other historical direct change information. When the multiple values ​​of the floor height values ​​are in the altitude change value interval corresponding to different historical direct change information, the scores corresponding to the historical direct change information can be accumulated to reflect the differences in the altitude change value intervals satisfied by different floor height values, thereby selecting a more suitable floor height value as the target floor height. And the score corresponding to the historical direct change information determined based on the first real-time altitude median of the first altitude set corresponding to the historical direct change information and the second real-time altitude median of the corresponding second altitude set can more accurately characterize the altitude change value interval corresponding to the historical direct change information.

[0130] See also Figure 5 , Figure 5 Schematic diagram of a floor determination device disclosed in an embodiment of the present application, which can be applied to a terminal device. Figure 5As shown, the floor determination device 500 may include: a history information acquisition module 510, a floor height determination module 520, an altitude determination module 530 and a target floor determination module 540.

[0131] The historical information acquisition module 510 is used to obtain multiple historical direct change information, each historical direct change information includes the altitude change value interval of the terminal device directly changing from the first floor to the second floor. The direct change means that the terminal device directly changes from the first floor to the second floor without staying on the intermediate floors between the first floor and the second floor. The first floor and the second floor are arbitrarily different floors.

[0132] The floor height determination module 520 is used to evaluate each floor height value contained in the floor height range according to the altitude change value intervals corresponding to multiple historical direct change information to determine the target floor height, and the target floor height is the most likely floor height value in the floor height range.

[0133] The altitude determination module 530 is used to obtain the air pressure value of the terminal device in the building in real time through a barometer, and determine the real-time altitude according to the air pressure value.

[0134] The target floor determination module 540 is used to determine the target floor where the terminal device is located according to the real-time altitude and the target floor height.

[0135] In one embodiment, the floor height determination module 520 is further configured to:

[0136] Compare the multiple values ​​of each floor height value in the floor height range with the altitude change value intervals corresponding to the plurality of historical direct change information;

[0137] If the multiple value of the first floor height value is within the altitude change value interval corresponding to any historical direct change information, the score value of the first floor height value is accumulated according to the historical direct change information where the multiple value of the first floor height value is located; the first floor height value is any floor height value within the floor height range;

[0138] The total score corresponding to each floor height value is calculated, and the floor height value with the largest total score value is determined as the target floor height.

[0139] In one embodiment, the historical information acquisition module 510 is further used to:

[0140] If the change range of the real-time altitude in the third time period is greater than the altitude difference threshold, multiple historical direct change information is obtained.

[0141] In one embodiment, the target floor determination module 540 is further configured to:

[0142] Determine the real-time altitude of the terminal device on the third floor and the current real-time altitude, where the third floor is the starting floor of the terminal device in this direct change;

[0143] The altitude difference is determined according to the real-time altitude on the third floor and the current real-time altitude, and the target floor where the terminal device is located is determined according to the altitude difference and the height of the target floor.

[0144] In one embodiment, the historical information acquisition module 510 is further used to:

[0145] Obtain a first altitude set and a second altitude set corresponding to a direct change of the terminal device from the first floor to the second floor, wherein the first altitude set includes real-time altitudes collected within a first time period on the first floor, and the second altitude set includes real-time altitudes collected within a second time period on the second floor.

[0146] Corresponding historical direct change information is determined according to the first altitude set and the second altitude set.

[0147] In one embodiment, the historical information acquisition module 510 is further used to:

[0148] Determine a minimum altitude change value according to a maximum real-time altitude value in the first altitude set and a minimum real-time altitude value in the second altitude set;

[0149] Determine a maximum altitude change value according to a minimum altitude change value in the first altitude set and a maximum altitude change value in the second altitude set;

[0150] The numerical range between the minimum altitude change value and the maximum altitude change value is determined as the altitude change value range included in the corresponding historical direct change information.

[0151] In one embodiment, the floor height determination module 520 is further configured to:

[0152] Determine a first real-time altitude median of a first altitude set corresponding to each historical direct change information and a second real-time altitude median of a second altitude set corresponding to each historical direct change information;

[0153] Determine the score corresponding to each piece of historical direct access change information according to the first real-time altitude median and the second real-time altitude median corresponding to each piece of historical direct access change information;

[0154] The score of the first floor height value is accumulated according to the score corresponding to the historical direct change information of the multiple value of the first floor height value.

[0155] See also Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a terminal device disclosed in an embodiment. The terminal device can be used for driving a vehicle, and no specific limitation is made here. Figure 6 As shown, the terminal device 600 may include:

[0156] A memory 610 storing executable program code;

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

[0158] The processor 620 calls the executable program code stored in the memory 610 to execute any one of the floor determination methods disclosed in the embodiments of the present application.

[0159] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute any one of the floor determination methods disclosed in the embodiments of the present application.

[0160] An embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute any one of the floor determination methods disclosed in the embodiments of the present application.

[0161] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for the present application.

[0162] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0163] 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 distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

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

[0165] 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 the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the above-mentioned methods of various embodiments of the present application.

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

[0167] The above is a detailed introduction to a floor determination method, device, terminal device and storage medium disclosed in the embodiment of the present application. The principle and implementation method of the present application are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present application.

Claims

1. A floor determination method, characterized in that: Applied to a terminal device, the method comprises: Acquire multiple pieces of historical direct change information, each piece of historical direct change information includes an altitude change value interval of the terminal device directly changing from the first floor to the second floor, the direct change means that the terminal device directly changes from the first floor to the second floor without stopping at an intermediate floor between the first floor and the second floor, and the first floor and the second floor are any different floors; Compare the multiple values ​​of each floor height value in the floor height range with the altitude change value intervals respectively corresponding to the plurality of historical direct change information; If the multiple value of the first floor height value is within the altitude change value interval corresponding to any historical direct change information, the score value of the first floor height value is accumulated according to the historical direct change information in which the multiple value of the first floor height value is located; the first floor height value is any floor height value within the floor height range; Calculate the total score values ​​corresponding to the various floor height values, and determine the floor height value with the largest total score value as the target floor height, wherein the target floor height is the floor height value with the highest probability in the floor height range; Obtaining the air pressure value of the terminal device in the building in real time through a barometer, and determining the real-time altitude according to the air pressure value; The target floor where the terminal device is located is determined according to the real-time altitude and the target floor height.

2. The method according to claim 1, characterized in that The obtaining of multiple historical direct change information includes: Acquire a first altitude set and a second altitude set corresponding to the terminal device directly changing from the first floor to the second floor, wherein the first altitude set includes real-time altitudes collected within a first time period of the first floor, and the second altitude set includes real-time altitudes collected within a second time period of the second floor; Corresponding historical direct change information is determined according to the first altitude set and the second altitude set.

3. The method according to claim 2, characterized in that The determining, according to the first altitude set and the second altitude set, historical direct change information includes: Determine a minimum altitude change value according to a maximum real-time altitude value in the first altitude set and a minimum real-time altitude value in the second altitude set; Determine a maximum altitude change according to a minimum altitude change value in the first altitude set and a maximum altitude change value in the second altitude set; The numerical interval between the minimum altitude change value and the maximum altitude change value is determined as the altitude change value interval included in the corresponding historical direct change information.

4. The method according to claim 2, characterized in that: Before accumulating the score value of the first floor height value according to the historical direct change information in which the multiple value of the first floor height value is located if the multiple value of the first floor height value is within the altitude change value interval corresponding to any historical direct change information, the method further includes: Determine a first real-time altitude median of a first altitude set corresponding to each of the historical direct access change information and a second real-time altitude median of a second altitude set corresponding to each of the historical direct access change information; Determine the score corresponding to each of the historical direct access change information according to the first real-time altitude median and the second real-time altitude median corresponding to each of the historical direct access change information; The step of accumulating the score value of the first floor height value according to the historical direct change information of the multiple value of the first floor height value includes: The score of the first floor height value is accumulated according to the score corresponding to the historical direct change information of the multiple value of the first floor height value.

5. The method according to any one of claims 1 to 4, characterized in that: The obtaining of multiple historical direct change information includes: If the change range of the real-time altitude in the third time period is greater than the altitude difference threshold, multiple historical direct change information is obtained.

6. The method according to claim 1, characterized in that The determining the target floor where the terminal device is located according to the real-time altitude and the target floor height includes: Determine the real-time altitude of the terminal device on the third floor and the current real-time altitude, the third floor being the starting floor of the terminal device in this direct change; The altitude difference is determined according to the real-time altitude on the third floor and the current real-time altitude, and the target floor where the terminal device is located is determined according to the altitude difference and the target floor height.

7. A floor determination device, characterized in that: The floor determination device is applied to a terminal device, and the device comprises: A historical information acquisition module, used to acquire a plurality of historical direct change information, each of which includes an altitude change value interval of the terminal device directly changing from the first floor to the second floor, wherein the direct change means that the terminal device directly changes from the first floor to the second floor without stopping at an intermediate floor between the first floor and the second floor, and the first floor and the second floor are any different floors; A floor height determination module, used for comparing the multiple values ​​of each floor height value in the floor height range with the altitude change value intervals respectively corresponding to the multiple historical direct change information; if the multiple value of the first floor height value is in the altitude change value interval corresponding to any historical direct change information, then accumulating the score value of the first floor height value according to the historical direct change information in which the multiple value of the first floor height value is located; the first floor height value is any floor height value in the floor height range; calculating the total score value corresponding to each of the floor height values, and determining the floor height value with the largest total score value as the target floor height, and the target floor height is the most likely floor height value in the floor height range; An altitude determination module, used to obtain the air pressure value of the terminal device in the building in real time through a barometer, and determine the real-time altitude according to the air pressure value; The target floor determination module is used to determine the target floor where the terminal device is located according to the real-time altitude and the target floor height.

8. A terminal device, characterized in that: The method comprises 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 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.