Positioning method, readable storage medium, electronic device and program product

By acquiring building positioning capabilities, determining appropriate floor positioning methods, and outputting results and accuracy, the problem of inaccurate floor positioning in multi-entrance buildings is solved, improving positioning accuracy and user experience.

CN119729749BActive Publication Date: 2026-07-07HUAWEI DEVICE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI DEVICE CO LTD
Filing Date
2023-09-26
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing floor location methods are not accurate enough in buildings with multiple entrances, resulting in users receiving incorrect floor location results and a poor user experience.

Method used

By acquiring the positioning capabilities of the building where the electronic device is located, the appropriate floor positioning method is determined, and the floor positioning results and accuracy are output to avoid misleading users.

Benefits of technology

It improves the accuracy of floor positioning and user experience by taking into account factors such as building structure, supported positioning methods, and user input information, and provides accurate and reliable floor positioning results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119729749B_ABST
    Figure CN119729749B_ABST
Patent Text Reader

Abstract

The application relates to the computer technical field, in particular to a positioning method, a readable storage medium, an electronic device and a program product. In the positioning method, when positioning, the electronic device acquires the current positioning capability of the building where the electronic device is located. The first positioning capability relates to the building structure of the building to be positioned, whether the fingerprint positioning mode is supported, whether the floor information manually input by the user is provided and the like. After obtaining the positioning capability of the building to be positioned, the first floor positioning mode is determined, the floor positioning result is obtained, and the floor positioning result and the accuracy of the floor positioning result are sent to the electronic device to be used to display the floor positioning result. It can be understood that, since the floor positioning result and the accuracy of the floor positioning result are sent, the positioning result of the floor and the positioning accuracy can be displayed, so that the user is not misled, and the positioning accuracy is related to the positioning capability, so that the positioning accuracy is more reliable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a positioning method, a readable storage medium, an electronic device, and a program product. Background Technology

[0002] Some electronic devices can locate a user's floor within a building.

[0003] For example, when children are playing indoors, children carry things like... Figure 1A The watch 100 shown can be used to locate the child's current floor. The watch 100 can communicate with a mobile phone 200 via the cloud 300, allowing parents to view the child's floor information through the mobile phone 200. For example, parents can click on... Figure 1A As shown in the image, the "Location" control in the "Smart Care" APP supports location display. At this time, the cloud 300 will, upon request from the mobile phone 200, send the floor location result received from the watch 100 to the mobile phone 200. The mobile phone 200's interface will then display the location as shown in the image. Figure 1B The positioning results shown are as follows: Figure 1B The display box k1 shows "5th floor", indicating that the child is currently on the 5th floor of the building.

[0004] Currently, there are many methods for achieving indoor floor positioning, such as barometric positioning and fingerprint positioning methods involving wireless fidelity (Wi-Fi) / Bluetooth.

[0005] However, the accuracy of some floor location results is related to the building structure and the location method used. For example, barometric positioning can output relatively accurate floor location results when the building has only one entrance, but it cannot provide accurate floor location results when the building has multiple entrances on different floors. Furthermore, if other floor location methods cannot be used in the building—for example, if the building does not have a pre-built Wi-Fi fingerprint database and Wi-Fi fingerprint positioning is not possible—then the floor location results output by the electronic device will be incorrect. For instance, for buildings with multiple entrances on different floors, only barometric positioning can be used. Figure 1B As shown, although the display box k1 shows "5th floor", the child is actually on "7th floor", which will provide users with incorrect floor location results and mislead them. Summary of the Invention

[0006] To address the aforementioned problems, this application proposes a positioning method, a readable storage medium, an electronic device, and a program product. In this positioning method, when the electronic device performs positioning, it can obtain the current positioning capabilities of the building to be positioned. These capabilities may include the building structure, whether it supports fingerprint positioning, and whether it has manually entered floor information. Once the positioning capabilities of the building are obtained, a first floor positioning method can be determined. Based on this method, the positioning result of the floor where the electronic device is located can be obtained. Then, the floor positioning result and its accuracy are sent to the electronic device that displays the floor positioning result. The second electronic device can then display the result according to the positioning accuracy. It is understood that because the floor positioning result and its accuracy are sent along with the accuracy, the displaying electronic device will show not only the floor positioning result but also the positioning accuracy, thus avoiding misleading the user. Furthermore, the positioning accuracy is related to both the current positioning capabilities of the building and the floor positioning method used, making the positioning accuracy more reliable.

[0007] In a first aspect, embodiments of this application provide a positioning method applied to a first electronic device, comprising: acquiring the current first positioning capability of the building to be positioned where the first electronic device is located; determining a first floor positioning method based on the first positioning capability; using the first floor positioning method to obtain a first floor positioning result of the floor where the first electronic device is located; and sending the first floor positioning result and the accuracy of the first floor positioning result to a second electronic device.

[0008] Understandably, the accuracy of floor positioning results is related to the positioning capabilities of the building (i.e., the floor itself). Furthermore, different positioning methods yield different levels of accuracy. Therefore, when the first electronic device detects a floor positioning requirement, it acquires the positioning capability and determines the positioning method accordingly. Then, it calculates the positioning result using the chosen method and outputs the result and its accuracy. Understandably, sending the positioning result and accuracy simultaneously to the second electronic device avoids misleading the user. Moreover, the positioning method used is related to the positioning capability; since positioning accuracy and the positioning result are both related to the building's current positioning capability and the floor positioning method used, the output positioning accuracy is more reliable, further preventing user misunderstanding.

[0009] For example, the first electronic device is the watch mentioned below, and the second electronic device is the mobile phone mentioned below.

[0010] In one possible implementation of the first aspect above, it further includes: determining a first positioning accuracy for current positioning using a first floor positioning method; and selecting the positioning accuracy with the lower accuracy from the first positioning accuracy and the positioning accuracy corresponding to the pre-stored first floor positioning method as the accuracy of the first floor positioning result.

[0011] Understandably, the first floor positioning method is determined based on the initial positioning capability, and this method will have a corresponding positioning accuracy. After selecting the positioning methods, using the selected methods for the current positioning will yield a positioning result, which will also have a positioning accuracy. The lower of these positioning accuracy results in the output positioning accuracy, making the output positioning accuracy more reliable.

[0012] In one possible implementation of the first aspect mentioned above, it further includes: using the positioning accuracy corresponding to the pre-stored first floor positioning method as the accuracy of the first floor positioning result.

[0013] Understandably, the positioning method for the first floor is determined based on the initial positioning capability, and this method will have a corresponding positioning accuracy. Using the pre-stored positioning accuracy corresponding to the first floor positioning method as the accuracy of the first floor positioning result allows for a convenient and quick way to obtain the positioning accuracy.

[0014] In one possible implementation of the first aspect described above, the first positioning capability includes at least one of the following: building structure, positioning method type supported by the first electronic device, and whether the user has manually entered floor information.

[0015] Understandably, the first positioning capability includes at least one of the following: building structure, the type of positioning method supported by the first electronic device, and whether the user has manually entered floor information. This fully considers the factors that affect the accuracy of the floor positioning results, and is comprehensive in its consideration.

[0016] In one possible implementation of the first aspect above, the building structure includes at least one of the following: equal floor spacing, unequal floor spacing, single entrance / exit, multiple entrances / exits located on the same floor, and multiple entrances / exits located on different floors. The type of positioning method includes whether fingerprint positioning is supported, wherein the fingerprint positioning method includes a Bluetooth-based fingerprint positioning method or a wireless fidelity-based fingerprint positioning method.

[0017] Understandably, the accuracy of floor location results is related to the building's location capabilities, such as its structure (e.g., whether the building's entrance and exit are the same, whether the entrance and exit span floors, the number of entrances and exits, floor spacing, etc.) and the types of floor location methods supported (e.g., whether fingerprint location is included). Furthermore, different location methods yield different levels of accuracy. The first location capability includes at least one of the following: building structure, the types of location methods supported by the first electronic device, and whether the user has manually entered floor information. This comprehensive consideration fully takes into account the factors affecting the accuracy of floor location results.

[0018] In one possible implementation of the first aspect above, determining the first floor positioning method based on the first positioning capability includes: when the first positioning capability includes: having floor information manually entered by the user, the first floor positioning method is determined to be using the floor information manually entered by the user as the first floor positioning result; when the first positioning capability includes: not having floor information manually entered by the user, and the building to be located supports fingerprint positioning, the first floor positioning method is determined to be fingerprint positioning; when the first positioning capability includes: not having floor information manually entered by the user, and the building to be located does not support fingerprint positioning, the first floor positioning method is determined to be barometric positioning.

[0019] Understandably, when the first positioning capability includes floor information manually entered by the user, this information can be directly used as the positioning result, resulting in a relatively accurate location. When the first positioning capability does not include manually entered floor information (i.e., the user has not manually entered floor information), but the building supports fingerprint positioning (i.e., a fingerprint database exists for the building), fingerprint positioning can be used, and generally, fingerprint positioning is more accurate than barometric positioning, so fingerprint positioning is chosen as the first floor positioning method. When the first positioning capability does not include manually entered floor information (i.e., the user has not manually entered floor information), and the building does not support fingerprint positioning, barometric positioning is used. It is understandable that different positioning methods are used for different positioning capabilities to obtain the most accurate positioning results possible.

[0020] In one possible implementation of the first aspect above, determining the first floor positioning method based on the first positioning capability includes: determining multiple floor positioning methods supported by the building to be positioned based on the first positioning capability; and selecting the first floor positioning method that meets the first priority condition from the multiple floor positioning methods based on the positioning accuracy corresponding to the multiple floor positioning methods.

[0021] Understandably, in some cases, positioning capabilities can have multiple capability items. During setup, each capability item can have a corresponding positioning method, and multiple capability items may correspond to the same positioning method. Therefore, multiple floor positioning methods may be determined based on the first positioning capability. In this case, the floor positioning method to be used is selected from the multiple floor positioning methods based on the accuracy of each floor positioning method related to the positioning capability, so that the positioning result obtained when using the floor positioning method for subsequent positioning is more accurate.

[0022] In one possible implementation of the first aspect above, determining multiple floor positioning methods supported by the building to be positioned based on the first positioning capability includes: when the first positioning capability includes: having floor information manually entered by the user, and the building to be positioned supporting fingerprint positioning, determining that the building to be positioned supports user correction positioning and fingerprint positioning, wherein the user correction positioning method uses the floor information manually entered by the user as the first floor positioning result; when the first positioning capability includes: not having floor information manually entered by the user, the building to be positioned supporting fingerprint positioning, the building structure having equal floor spacing, unequal floor spacing, a single entrance / exit, multiple entrances / exits located on the same floor, or multiple entrances / exits located on different floors, determining that the building to be positioned supports fingerprint positioning. The first positioning capability includes: having floor information manually entered by the user; the building to be located does not support fingerprint positioning; the floor spacing of the building structure is equal; the floor spacing is unequal; there is a single entrance / exit; multiple entrances / exits are located on the same floor; or multiple entrances / exits are located on different floors. Therefore, it is determined that the building to be located supports user correction positioning and barometric positioning.

[0023] Understandably, the building to be located can use multiple floor positioning methods, such as commonly used ones like user-corrected positioning, fingerprint positioning, and barometric positioning. When the positioning capability includes the ability to access floor information manually entered by the user, it corresponds to user-corrected positioning; when it includes the ability to support fingerprint positioning, it corresponds to fingerprint positioning; when the positioning capability includes one or more of the following: equal floor spacing, unequal floor spacing, single entrance / exit, multiple entrances / exits on the same floor, or multiple entrances / exits on different floors, it is determined that the building supports barometric positioning. Therefore, when the first positioning capability includes multiple capabilities that conform to various positioning methods, the multiple floor positioning methods supported by the building can be reasonably and scientifically determined based on the first positioning capability.

[0024] In one possible implementation of the first aspect mentioned above, it also includes determining the positioning accuracy corresponding to each floor positioning method.

[0025] Understandably, when determining the positioning method for each floor, it is also necessary to determine the corresponding positioning accuracy for each floor's positioning method, in order to facilitate subsequent use.

[0026] In one possible implementation of the first aspect above, determining the positioning accuracy corresponding to each floor positioning method includes: when the floor positioning method is the user correction positioning method, and floor information manually entered by the user is detected, determining the positioning accuracy corresponding to the user correction positioning method as a first accuracy; when the floor positioning method is the fingerprint positioning method, and the building to be positioned supports the fingerprint positioning method, determining the positioning accuracy corresponding to the fingerprint positioning method as a first accuracy; when the floor positioning method is the barometric pressure positioning method, and the building structure is detected as having a single entrance / exit, determining the positioning accuracy corresponding to the barometric pressure positioning method as a first accuracy or a second accuracy; when the floor positioning method is the barometric pressure positioning method, and the floor spacing is equal, or multiple entrances / exits are located on the same floor, determining the positioning accuracy corresponding to the barometric pressure positioning method as a second accuracy; when the floor positioning method is the barometric pressure positioning method, and the building structure is detected as having multiple entrances / exits located on different floors, or the floor spacing is detected as unequal, determining the positioning accuracy corresponding to the barometric pressure positioning method as a third accuracy, wherein the first accuracy is greater than the second accuracy, and the second accuracy is greater than the third accuracy.

[0027] For example, the first level of accuracy is high accuracy, the second level is general accuracy, and the third level is low accuracy. Understandably, when determining the positioning accuracy corresponding to each floor's positioning method, the positioning capabilities of the building being located are fully considered, thus enabling a reasonable and scientific determination of the positioning accuracy corresponding to each floor's positioning method.

[0028] In one possible implementation of the first aspect above, when the floor positioning method is barometric positioning and the building structure is detected to have a single entrance / exit, determining the positioning accuracy corresponding to the barometric positioning method as a first accuracy or a second accuracy includes: when the floor positioning method is barometric positioning and the building structure is detected to have a single entrance / exit using the first method, then the positioning accuracy corresponding to the barometric positioning method is determined to be the first accuracy; when the floor positioning method is barometric positioning and the building structure is detected to have a single entrance / exit using the second method, then the positioning accuracy corresponding to the barometric positioning method is determined to be the second accuracy.

[0029] Understandably, while the same capability items can be obtained using different methods of determination, the reliability of the obtained capability items varies. Therefore, for the same positioning method, the accuracy of the positioning method will differ depending on the capability items obtained under different methods. Thus, when supporting multiple positioning methods, selecting the positioning method based on its accuracy results in a more scientific and reliable positioning method.

[0030] In one possible implementation of the first aspect above, obtaining the building structure as a single entrance / exit in a first manner includes: when the first electronic device enters and exits the building to be located, acquiring first data, wherein the first data includes a fingerprint corresponding to Wi-Fi data or Bluetooth data collected by the first electronic device, or a fingerprint corresponding to Wi-Fi data or Bluetooth data acquired by other electronic devices used by other users when entering and exiting the building to be located; when the first data acquired when the first electronic device enters the building to be located is the same as the first data acquired when exiting the building to be located, the building structure is determined to be a single entrance / exit.

[0031] Understandably, the first set of data includes the fingerprints corresponding to the wireless fidelity data or Bluetooth data collected by the electronic device currently being located, as well as the fingerprint data obtained by other users' electronic devices that are stored in advance. The amount of data is sufficient to effectively determine the entrance and exit of the building.

[0032] In one possible implementation of the first aspect above, obtaining the building structure as a single entrance / exit in a second manner includes: acquiring map data of the building to be located; determining, based on the map data of the building to be located, that there is only one entrance / exit in a first spatial region, and thus determining that the building structure is a single entrance / exit, wherein the first spatial region is a spherical spatial region with the entrance / exit of the first electronic device entering and exiting the building to be located as its center, and the distance from the center of the sphere is within a first distance threshold.

[0033] Understandably, map data can be used to scientifically and effectively determine entrances and exits.

[0034] In one possible implementation of the first aspect above, selecting a first floor positioning method that satisfies the first priority condition from multiple floor positioning methods based on the positioning accuracy corresponding to multiple floor positioning methods includes: obtaining the weight coefficients of the positioning accuracy corresponding to multiple floor positioning methods; and selecting the positioning method corresponding to the positioning accuracy with the largest weight coefficient from multiple floor positioning methods as the first floor positioning method.

[0035] Understandably, setting weighting coefficients makes the process easier.

[0036] In one possible implementation of the first aspect above, the method for determining that the building structure has multiple entrances and exits located on different floors includes: acquiring map data of the building to be located, determining, based on the map data, that there are multiple entrances and exits located on different floors within a first spatial region, and thus determining that the building structure has multiple entrances and exits located on different floors, wherein the first spatial region is a spherical spatial region with the entrance and exit of the first electronic device entering and exiting the building to be located as the center, and the distance from the center of the sphere is within a first distance threshold; or, acquiring first air pressure data collected by the first electronic device, determining, based on the first air pressure data, that the height deviation value of the first electronic device entering and exiting the building to be located along the building height direction is greater than a first height change threshold, and thus determining that the building structure has multiple entrances and exits located on different floors, wherein the first air pressure data is used to characterize multiple air pressure-related parameters generated when the first electronic device moves multiple times within the building to be located.

[0037] It is understandable that using map data to determine the location of multiple entrances and exits on different floors is more scientific, while using air pressure data to determine the location of multiple entrances and exits on different floors is easier to operate.

[0038] In one possible implementation of the first aspect above, the method for determining whether the building structure has unequal or equal floor spacing includes: acquiring first air pressure data collected by a first electronic device; calculating a first height difference generated by the first electronic device each time it moves within the building to be located based on the first air pressure data, wherein the first air pressure data is used to characterize multiple air pressure-related parameters generated when the first electronic device moves multiple times within the building to be located; calculating a first difference between the first height difference and a second preset height difference, wherein the second preset height difference is the height difference generated by the first electronic device each time it moves within the building to be located, assuming equal floor spacing; determining that the floor spacing is unequal when the sum of multiple first differences obtained when the first electronic device moves multiple times within the building to be located is greater than the second deviation threshold; and determining that the floor spacing is equal when the sum of multiple first errors obtained when the first electronic device moves multiple times within the building to be located is less than or equal to the second deviation threshold.

[0039] It is understandable that using the height of the first electronic device as it moves within the building to be located to determine the floor spacing is a scientific and reasonable approach.

[0040] In one possible implementation of the first aspect above, the method for determining that a building structure has multiple entrances and exits located on the same floor includes: acquiring map data of the building to be located, determining, based on the map data, that there are multiple entrances and exits located on the same floor within a first spatial region, and thus determining that the building structure has multiple entrances and exits located on the same floor, wherein the first spatial region is a spherical spatial region with the entrance and exit of the first electronic device entering and exiting the building to be located as the center, and the distance from the center of the sphere is within a first distance threshold; or, acquiring first air pressure data collected by the first electronic device, determining, based on the first air pressure data, that the height deviation value of the first electronic device entering and exiting the building to be located along the building height direction is less than or equal to a first height change threshold, and thus determining that the building structure has multiple entrances and exits located on the same floor, wherein the first air pressure data is used to characterize multiple air pressure-related parameters generated when the first electronic device moves multiple times within the building to be located.

[0041] Understandably, using map data to determine that multiple entrances and exits are located on the same floor is more scientific, while using air pressure data to determine that multiple entrances and exits are located on the same floor is easier to operate.

[0042] Secondly, this application proposes a positioning method for a second electronic device, comprising: receiving the positioning result of the first floor of the building to be positioned where the first electronic device is located and the accuracy of the positioning result of the first floor; and displaying the positioning result of the first floor according to the display method corresponding to the accuracy of the positioning result of the first floor.

[0043] Understandably, displaying the floor positioning results in a way that corresponds to the accuracy of the floor positioning results can provide users with an intuitive experience of the accuracy.

[0044] In one possible implementation of the second aspect above, the display of the first floor positioning result according to the display method corresponding to the accuracy of the first floor positioning result includes: when the accuracy of the first floor positioning result is a first accuracy, displaying the floor number where the first electronic device is located and the accuracy of the first floor positioning result; when the accuracy of the first floor positioning result is a second accuracy, displaying the number of floors located or the range of floors located; when the accuracy of the first floor positioning result is a third accuracy, displaying the number of floors traversed by the first electronic device; wherein, the first accuracy is greater than the second accuracy, and the second accuracy is greater than the third accuracy.

[0045] Understandably, when the floor positioning accuracy is at the first level, the system displays the floor number where the electronic device is located and the accuracy of the first floor positioning result. When the accuracy of the first floor positioning result is at the second level, it displays the number of floors located or the range of floors located. When the accuracy of the first floor positioning result is at the third level, it displays the number of floors the electronic device has traversed. This allows for the differentiation of different levels of accuracy, and displaying the number of floors traversed when the accuracy of the first floor positioning result is at the third level provides users with more effective reference information.

[0046] Thirdly, embodiments of this application provide an electronic device, including: one or more processors; one or more memories; the one or more memories storing one or more programs, which, when executed by one or more processors, cause the electronic device to perform any of the positioning methods described in the first aspect and various implementations thereof, as well as any of the positioning methods described in the second aspect and various implementations thereof.

[0047] Fourthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform any of the positioning methods described in the first aspect and various implementations thereof, as well as any of the positioning methods described in the second aspect and various implementations thereof.

[0048] Fifthly, a computer program product is provided, including computer-readable code or a non-volatile computer-readable storage medium carrying the computer-readable code, wherein when the computer-readable code is run in an electronic device, a processor in the electronic device executes any of the positioning methods described in the first aspect and various implementations thereof, as well as any of the positioning methods described in the second aspect and various implementations thereof.

[0049] The beneficial effects of the third to fifth aspects can be referred to the beneficial effects of the first and second aspects, and will not be elaborated here. Attached Figure Description

[0050] Figure 1A According to some embodiments of this application, a schematic diagram of a positioning scenario is shown;

[0051] Figure 1B According to some embodiments of this application, a schematic diagram of a display method is shown;

[0052] Figure 2 According to some embodiments of this application, a schematic diagram of a positioning accuracy and the corresponding display method is shown;

[0053] Figure 3AAccording to some embodiments of this application, a schematic diagram of a high-precision display method is shown;

[0054] Figure 3B According to some embodiments of this application, a schematic diagram of a floating display method is shown;

[0055] Figure 3C According to some embodiments of this application, a schematic diagram of a floating display method is shown;

[0056] Figure 3D According to some embodiments of this application, a schematic diagram of a cross-layer display method is shown;

[0057] Figure 3E According to some embodiments of this application, a schematic diagram of a user correction method is shown;

[0058] Figure 4 According to some embodiments of this application, a process diagram of a floor positioning method is shown;

[0059] Figure 5 According to some embodiments of this application, a schematic diagram of the framework of a positioning method is shown;

[0060] Figure 6 According to some embodiments of this application, a schematic diagram of a system architecture 6000 based on a positioning method is shown;

[0061] Figure 7 According to an embodiment of this application, a schematic diagram of the hardware structure of a watch 100 is shown. Detailed Implementation

[0062] The illustrative embodiments of this application include, but are not limited to, a positioning method, a readable storage medium, an electronic device, and a program product.

[0063] It is understandable that the positioning method provided in this application, in addition to the scenario mentioned above where parents need the location of their children, can also be used in other scenarios such as guardianship of special groups, clocking in at work, locating floors during navigation in shopping malls, and locating floors during construction in buildings. The examples of the aforementioned application scenarios are merely illustrative and this application does not limit them.

[0064] It is understandable that the electronic device used for positioning and the electronic device used to display the positioning results can be the same electronic device or different electronic devices.

[0065] It is understood that the watch capable of location tracking mentioned in this application can be any electronic device with location tracking function, including the mobile phone mentioned above, and also including but not limited to tablet computers, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), servers, and other electronic devices. This application does not impose any restrictions.

[0066] It is understood that the mobile phone mentioned in this application that can display the location results can also be the aforementioned watch, as well as any other electronic device with a display function, including but not limited to tablet computers, in-vehicle devices, AR / VR devices, UMPCs, netbooks, PDAs, servers, etc., and this application makes no restrictions.

[0067] Understandably, the positioning method proposed in this application can be applied to any type of building. For example, a building can be a commercial building, specifically a shopping mall, train station, airport, bus station, or other building where location data can be collected manually, or a residential building, office building, or other building where location data cannot be collected manually at present. Furthermore, there are no restrictions on the structure of the building; it is applicable to buildings with multiple entrances or buildings with a single entrance.

[0068] The following section uses a building as an example to illustrate this plan.

[0069] The following is a brief introduction to barometric positioning and fingerprint positioning methods.

[0070] Baroque positioning method: This method primarily uses a barometer to detect changes in air pressure and calculates the change in altitude based on these pressure changes. The floor number can then be calculated based on the floor spacing. When a user enters a building from the outside, the floor where the user enters is designated as the first floor. This gives the current specific floor. It's important to understand that the above description of the barometer-based positioning method is only a simple introduction to its principle. In actual implementations, various adaptive adjustments can be made. For example, the floor spacing values ​​can be updated as the user repeatedly enters the same building, resulting in a more accurate result. Specific details will not be elaborated upon here.

[0071] It is understandable that due to the existence of multiple entrances in a building or differences in building structure such as varying floor spacing, the barometer may miscalculate the floor at the user's entrance, for example, calculating the second-floor entrance as the first floor, resulting in inaccurate results and poor precision.

[0072] Fingerprint positioning method: The fingerprint positioning method involves two stages: offline and online. Offline refers to the need for manual collection of signal characteristic values, such as received signal strength (RSS), of wireless access points (APs) at various locations within the building beforehand, thus creating a fingerprint database. This database can include AP names, numbers, signal strengths, and location parameters for each AP, such as latitude and longitude, building height, and specific floor. Then, in the online stage, i.e., the fingerprint positioning stage, the user measures the received signal characteristic values ​​using an electronic device and matches these values ​​with pre-stored signal characteristic values ​​in the fingerprint database (e.g., using a similarity matching algorithm). The matching algorithm then determines the location parameters of the electronic device (e.g., the specific floor). When fingerprint positioning involves Wi-Fi, the wireless access point (AP) can be a router or similar device. When fingerprint positioning involves Bluetooth, the wireless access point (AP) can be a Bluetooth base station or similar device. Understandably, the aforementioned fingerprint database-based location method is only a simple introduction to the principle. In the specific implementation of the fingerprint database-based location method, there can be various adaptive adjustments, which are not required.

[0073] Understandably, although fingerprint positioning method has high accuracy (i.e., high precision), it is limited because it requires data collection by humans beforehand. Currently, only a few buildings such as shopping malls, train stations, and airports support this positioning method.

[0074] Therefore, as mentioned above, current floor positioning methods may provide positioning results with varying degrees of accuracy due to limitations in building structure or the floor positioning methods supported by the building (such as the floor not supporting fingerprint positioning methods). This results in users being unable to know the accuracy of the provided floor positioning results, leading to a poor user experience.

[0075] For example, if a user receives a location result of "5th floor", but the building structure has multiple entrances on different floors, the accuracy of "5th floor" obtained by barometric positioning is different from that obtained by fingerprint positioning. Furthermore, the "5th floor" obtained by barometric positioning is likely to be wrong, while the positioning method obtained by fingerprint database is likely to be correct. However, the user cannot perceive the accuracy of the location result of "5th floor", resulting in a poor user experience.

[0076] Understandably, the accuracy of floor location results is related to the building's location capabilities, such as its structure (e.g., whether the building's entrances and exits are the same, whether the entrances and exits span floors, the number of entrances and exits, and the floor spacing), and the types of floor location methods supported (e.g., whether fingerprint location is included). Furthermore, different location methods yield different levels of accuracy (i.e., precision).

[0077] Therefore, this application discloses a floor positioning method. In this method, positioning capabilities (e.g., including equal / unequal floor spacing, high-precision single entrance / exit, general-precision single entrance / exit, multiple entrances / exits on the same floor / multiple entrances / exits on different floors, whether there is floor data actively entered by the user, whether fingerprint positioning is supported, etc.), the relationship between positioning methods and accuracy are pre-set. When the electronic device detects a floor positioning requirement, it can determine the positioning capabilities, determine the positioning method based on the positioning capabilities, calculate the positioning result based on the positioning method, and output the positioning result and positioning accuracy.

[0078] For example, the location result can be the exact floor (i.e., the floor number where the electronic device to be located is located), the floor range, or the number of floors the user has traversed (i.e., the number of floors the electronic device to be located has traversed). Location accuracy can include three accuracy types: high accuracy, general accuracy, and low accuracy. High accuracy means the exact floor obtained using the current positioning method is highly likely to match the actual floor. General accuracy means the exact floor or floor range obtained is unlikely to match the actual floor. Low accuracy means the exact floor obtained is highly likely to be inconsistent with the actual floor; in this case, the number of floors the user has traversed can be calculated as the location result to provide the user with more useful information.

[0079] In some embodiments, when the positioning method is not determined based on the positioning capability, the current default positioning method will be used for calculation, such as barometric positioning. If the positioning capability can be obtained and the corresponding positioning method can be determined based on the positioning capability, for example, if the positioning method corresponding to the positioning capability is determined to be fingerprint positioning, then fingerprint positioning will be used to obtain the corresponding positioning result.

[0080] In other embodiments, after obtaining the positioning capability, this capability may support only one positioning method or multiple positioning methods. If only one positioning method is currently available, that method is used; if the current positioning capability supports multiple positioning methods, and each positioning method has its own corresponding accuracy under different positioning capabilities, the corresponding positioning method can be selected based on the accuracy of the multiple positioning methods. Understandably, in some implementations, the positioning accuracy L1 corresponding to the selected positioning method can be used as the output positioning accuracy. In other implementations, after selecting the positioning method, a positioning result is obtained when the selected positioning method is used for the actual positioning calculation. This positioning result will have a corresponding positioning accuracy L2 (i.e., the first positioning accuracy). The lower of the positioning accuracy L1 corresponding to the positioning method under the positioning capability and the positioning accuracy L2 obtained when using the positioning method to calculate the positioning result for the current positioning is used as the positioning accuracy of the output floor positioning result. For example, if positioning accuracy L1 is high and positioning accuracy L2 is low, then the output positioning accuracy will be low; if positioning accuracy L1 is low and positioning accuracy L2 is high, then the output positioning accuracy will be low; if positioning accuracy L1 is high and positioning accuracy L2 is high, then the output positioning accuracy will be high. Understandably, using the lower positioning accuracy as the output positioning accuracy will result in a more accurate output positioning result.

[0081] The following section introduces the positioning methods under different positioning capabilities and the corresponding positioning accuracy.

[0082] For example, it is determined whether the positioning capability meets the requirement of having accurate floor information manually entered by the user (hereinafter referred to as "user correction" for ease of explanation). When the user correction capability is met, it is determined that the positioning capability includes the user correction capability, that is, there is accurate floor information manually entered by the user. Since the floor information manually entered by the user is always accurate, the positioning accuracy is the highest. At this time, the accurate floor information entered by the user is selected as the positioning result (referred to as "user correction positioning method"), and the positioning accuracy corresponding to the user correction positioning method is higher.

[0083] For example, when determining whether fingerprint positioning is supported, the positioning capability includes the absence of user correction and the support for fingerprint positioning. Since fingerprint positioning has higher accuracy, it is preferred in this case, and it is determined that the fingerprint positioning method has higher positioning accuracy.

[0084] Understandably, for other capability assessments, if the positioning capabilities do not currently support fingerprint positioning, lack user correction, and support any other capabilities related to the building structure, the default positioning method can be used, such as barometric positioning for floor location. However, when the positioning capabilities include different specific capabilities related to the building structure, the positioning accuracy corresponding to the chosen positioning method will vary.

[0085] For example, if the positioning capability is determined to include the entrance and exit of a building structure as a high-precision single entrance and exit capability item, then since the building has only one entrance and exit, the location data of this single entrance and exit is used as the first floor for floor calculation using barometric positioning to obtain the positioning result. In this case, the positioning result is considered to have high accuracy.

[0086] If the positioning capability is determined to include multiple entrances and exits located on different floors, then when using barometric positioning, the user's entrance location is taken as the first floor for floor calculation. Furthermore, since the entrances and exits of the current building are not on the same floor, it is highly likely that the current entrance location is not the first floor. Therefore, the positioning result calculated using barometric positioning is likely to be wrong, and the corresponding positioning accuracy is poor.

[0087] The positioning capability is determined to include unequal floor spacing. In this case, for the current building with unequal floor spacing, since the barometer positioning method uses a floor spacing to roughly estimate the number of floors, it can be determined that the positioning result calculated by the barometer positioning method is likely to be wrong, and the corresponding positioning accuracy is poor.

[0088] In addition, when the positioning capability is determined to include any one of the following: general accuracy single entrance / exit, multiple entrances / exits located on the same floor, or equal floor spacing, the default positioning method, i.e. barometric positioning method, is adopted. The current entrance location data is used as the first floor for floor calculation to obtain the positioning result, and the determined current positioning accuracy is considered to be the default accuracy, i.e. general accuracy.

[0089] Understandably, when the positioning method is barometric positioning, different positioning accuracies can be achieved, including high accuracy, general accuracy, or low accuracy.

[0090] It is understandable that, since the capability items in the positioning capability can be obtained through different capability identification methods, the positioning capability can include multiple capability items at the same time, so there will be support for multiple positioning methods.

[0091] For example, the positioning capabilities include: floor information that the user has manually entered, and support for fingerprint positioning, thus determining the support for user correction positioning and fingerprint positioning.

[0092] For example, if the positioning capabilities include: no floor information manually entered by the user, support for fingerprint positioning, equal floor spacing in the building structure, unequal floor spacing, single entrance / exit, multiple entrances / exits on the same floor, or multiple entrances / exits on different floors, then it is determined that fingerprint positioning and barometric positioning are supported.

[0093] For example, if the positioning capabilities include: floor information manually entered by the user, no support for fingerprint positioning, equal floor spacing in the building structure, unequal floor spacing, single entrance / exit, multiple entrances / exits on the same floor, or multiple entrances / exits on different floors, then it is determined that the system supports user correction positioning and barometric positioning.

[0094] For example, if the positioning capabilities include: floor information manually entered by the user, support for fingerprint positioning, equal floor spacing in the building structure, unequal floor spacing, single entrance / exit, multiple entrances / exits on the same floor, or multiple entrances / exits on different floors, then it is determined that the positioning methods supported are user correction positioning, fingerprint positioning, and barometric positioning.

[0095] It is understandable that when multiple positioning methods are supported, each positioning method also has its corresponding positioning accuracy.

[0096] At this point, a suitable positioning accuracy can be selected from multiple accuracy options as the required positioning accuracy (i.e., positioning accuracy L1), and the positioning method corresponding to the required positioning accuracy will be the final positioning method adopted. In some embodiments, when the multiple positioning accuracies obtained based on the capability items included in the positioning capability include high accuracy, low accuracy, and general accuracy, since general accuracy is the default accuracy, the high accuracy and low accuracy obtained are selected first to obtain the corresponding positioning method. If no accuracy level including high accuracy or low accuracy is included, the default accuracy is adopted, that is, general accuracy is used as the required positioning accuracy. It is understandable that in some implementations, when high accuracy or low accuracy exists simultaneously, high accuracy can be prioritized as the required positioning accuracy; or low accuracy can be prioritized as the required positioning accuracy; in addition, the required positioning accuracy can also be determined based on the reliability of the identification method of the capability items corresponding to each positioning accuracy, that is, the positioning accuracy corresponding to the capability item obtained based on the identification method with the highest reliability is used as the required positioning accuracy.

[0097] For example, current positioning capabilities include high-precision single-entry / exit and unequal floor spacing. The accuracy level corresponding to high-precision single-entry / exit is high, while the accuracy level corresponding to unequal floor spacing is low. Therefore, we can compare the reliability (i.e., the accuracy rate of the capability identification method for the corresponding capability item) between the high-precision single-entry / exit capability identification method and the unequal floor spacing capability identification method. Assuming that the high-precision single-entry / exit capability identification method is more reliable than the unequal floor spacing capability identification method, then the accuracy level corresponding to the high-precision single-entry / exit is adopted as the required positioning accuracy.

[0098] As can be seen, different positioning capabilities correspond to different positioning methods and different levels of positioning accuracy. After determining the positioning capability of the building where the electronic device to be located is situated, the appropriate positioning method can be determined based on that capability, resulting in a precise positioning result. This allows the user to perceive the accuracy of the current result, preventing misjudgment. Furthermore, even if the calculated positioning result is considered to have low accuracy, the user can still understand the accuracy of the current positioning result based on the perceived accuracy, avoiding any misleading information.

[0099] In some embodiments, location-related parameters can be acquired. These parameters include building type (such as residential area, shopping mall, or station), map data, Wi-Fi data, Bluetooth data, Global Navigation Satellite System (GNSS) data, fingerprint database data, and user-inputted data. These location-related parameters are used to determine the supported positioning capabilities; that is, the supported positioning capabilities are determined based on the specific location-related parameters. Therefore, when a user performs a location check, the electronic device needs to collect all available location-related parameters and determine the corresponding positioning capabilities based on these parameters.

[0100] In some embodiments, after determining the required floor positioning result and positioning accuracy, the result can be displayed according to the display method corresponding to the output positioning accuracy to demonstrate the positioning accuracy. For example, as Figure 2 The positioning accuracy shown corresponds to the display method. High positioning accuracy corresponds to "high-precision display method," medium positioning accuracy corresponds to "floating display method," and low positioning accuracy corresponds to "cross-layer display method." (Reference) Figures 3A-3D As shown, Figure 3A The high-precision display method is shown, with the floor display box k2 displaying "High-precision 5th floor"; Figure 3B as well as Figure 3C The floating display method is shown, where Figure 3B The middle floor display box is labeled "5th floor" (k3). Figure 3C The floor display box k3' in the text indicates "floors 3-5"; Figure 3D The diagram shows a cross-floor display method. In the diagram, floor display box k4 is "cross-floor 5th floor" and the display interface has a crossing starting point (i.e., the entry point).

[0101] Understandably, in some embodiments, regarding the aforementioned user-initiated manual input of floor information (i.e., user correction), specifically, the user can perform correction operations by displaying the positioning result on the electronic device and then using the correction controls on the display interface to input the actual floor result. After the actual floor result is entered into the electronic device, user correction is performed. Understandably, as long as the current user input of positioning information is detected, no judgment is made on the positioning method selection; the user-input correction result is directly used as the positioning result, and the electronic device display interface displays it in a high-precision display mode.

[0102] For example, such as Figure 3E The illustration shows the process where, when the user discovers an error in the floor information on the mobile phone 200 in high-precision display mode, the user actively corrects the floor information, and the mobile phone 200 displays it again in high-precision display mode. The floor display box is used as an example for correction. Figure 3E On the display interface W11 of the mobile phone 200, the floor display box B11 displays "High Precision 5th Floor". The user then clicks on "High Precision 5th Floor" in the floor display box B11, at which point the mobile phone 200 enters display interface W12. The user enters the actual floor information, "Building xx, 4th Floor," in the modification input box B1, and then clicks the confirmation control B12. The mobile phone 200 completes the modification and enters display interface W13, where the result is displayed as "High Precision 4th Floor" in the floor display box B13. It is understandable that the correction control can be any possible control, custom-designed by the developers; for example, it could be a floor display box or a cartoon character control, etc., with no specific requirements. It is also understandable that the watch 100 will update the positioning result or positioning accuracy at this time, using the specific positioning information entered by the user as the specific positioning result, and using "High Precision" as the output positioning accuracy.

[0103] Understandably, when the mobile phone 200 displays in a floating or cross-floor mode, after the user manually inputs the correction information, the floor result entered by the user will be used as the positioning result, and the mobile phone 200 will display it in a high-precision mode.

[0104] Understandably, when a user actively corrects the floor information, the electronic device displays it in a high-precision manner, which ensures the reliability of the display results seen by the user.

[0105] Figure 4According to some embodiments of this application, a schematic diagram of a floor positioning method is shown. This schematic diagram shows that the process can be executed by a single electronic device or by multiple electronic devices working together. The specific steps are as follows:

[0106] S401, floor location requirement detected.

[0107] Understandably, electronic devices can detect whether a user is moving from indoors to outdoors or vice versa by observing the differences in GNSS signal strength and the number of satellites between indoors and outdoors. They can also use temperature sensors to monitor changes in the user's ambient temperature, such as temperature changes when a user moves outdoors or indoors, thus determining whether the user is moving from indoors to outdoors or vice versa. It's understandable that using the number of satellites and temperature sensors are just two methods to detect whether a user is moving from indoors to outdoors or vice versa; other monitoring methods exist, but are not limited to here.

[0108] In some embodiments, when the electronic device detects a change in GNSS signal strength and number of satellites, or a change in ambient temperature, i.e. after the user enters indoors, it determines that a floor positioning requirement has been generated.

[0109] S402, obtain the available positioning-related parameters.

[0110] In some embodiments, upon detecting a floor positioning requirement, if sensors such as barometers, Wi-Fi, and Bluetooth are not activated, they can be automatically activated to collect signals, or a prompt box can pop up to remind the user to enable Wi-Fi / Bluetooth or other wireless methods for wireless signal collection. Additionally, it checks whether fingerprint database data can be obtained and whether previously entered correction data by the user can be retrieved.

[0111] S403: Based on the positioning-related parameters, determine the required capability items, thereby obtaining the corresponding positioning capability.

[0112] In some embodiments, the required capability items can be determined based on positioning-related parameters. It is understood that the fulfillment of each capability item is related to the accuracy of the positioning result. These capability items include supported positioning methods (e.g., whether fingerprint positioning is supported, including Bluetooth-based or Wi-Fi-based fingerprint positioning), user correction functionality, high-precision single entrance / exit, general-precision single entrance / exit, multiple entrances / exits on the same floor, multiple entrances / exits on different floors, equal floor spacing, and unequal floor spacing.

[0113] Specifically, the fulfillment status of capability items can be determined by combining the following five capability identification methods. In the actual implementation process, any one or more of the following capability identification methods can be used for judgment.

[0114] (1) Fingerprint database capability identification method: The system determines whether fingerprint positioning is supported by searching the fingerprint database for the fingerprint data corresponding to the building to be located. If the fingerprint database contains fingerprint data for the building to be located, the capability to support fingerprint positioning can be identified, thus confirming that the positioning capability includes support for fingerprint positioning. Understandably, if fingerprint positioning is used, the corresponding positioning accuracy can be determined to be high.

[0115] Understandably, the data in this fingerprint database can be collected manually before location tracking, or it can be fingerprint data obtained through crowdsourcing. The fingerprint data obtained through crowdsourcing is the fingerprint data automatically collected by the electronic device when each user uses the electronic device for location tracking. For example, if the electronic device can obtain relatively accurate location parameters, it will automatically store the corresponding fingerprint and the corresponding location parameters.

[0116] (2) Barometric Pressure Cross-Floor Capability Identification Method: Based on barometer data, the floor variation is calculated, and the building height deviation is determined under the assumption of equal floor spacing to identify whether the entrance / exit is on the same floor, and whether the floor spacing is equal / unequal. Specifically, if it is determined that the entrance / exit is not on the same floor or the current floor spacing is unequal, then the positioning capability includes the entrance / exit not being on the same floor or the current floor spacing being unequal. Understandably, when the positioning capability includes the entrance / exit not being on the same floor or the current floor spacing being unequal, it can be determined that the barometric pressure positioning method is used, and the positioning accuracy corresponding to the barometric pressure positioning method is low. If it is determined that the capability of the entrance / exit being on the same floor or the current floor spacing being equal is met, then the positioning capability includes the entrance / exit being on the same floor or the current floor spacing being equal. Understandably, when the positioning capability includes the entrance / exit being on the same floor or the current floor spacing being equal, the positioning accuracy corresponding to the barometric pressure positioning method is general accuracy. In some implementations, when it is determined that the entrance and exit are on the same floor and the current floor spacing is equal, the calculated building height and the fingerprint information corresponding to the currently collected Wi-Fi / Bluetooth wireless signals (e.g., wireless access point name, number of wireless access points, and corresponding signal strength) and the location parameters corresponding to the fingerprint information (which correspond to the location of the current building's entrance and exit) can be recorded for subsequent use.

[0117] Specifically, when a user (i.e., the electronic device to be located) moves indoors, a barometer is used to measure elevation changes. Based on the rate of elevation change, it is determined whether the user has crossed floors (i.e., crossed floors). Each time the user crosses a floor, the barometric pressure and elevation values ​​at the start and end points of the crossing are recorded to obtain the amount of elevation change (i.e., elevation displacement change). Based on the elevation changes generated by the user crossing multiple floors, cluster analysis is performed to determine the characteristics of the changes, and to determine whether the entrance / exit is on the same floor, as well as the floor spacing. Understandably, a user can enter the building multiple times, thus allowing for a more accurate determination of entrances / exits and floor spacing based on elevation changes.

[0118] Furthermore, cluster analysis of height changes: Assuming the user moves across floors n times indoors, n corresponding height changes across floors are generated, i.e., the height changes measured by the barometer after each continuous movement of the user indoors: ΔH1, ΔH2, ..., ΔH n The change in height is a vector quantity with a direction. The change in height corresponding to the user's movement trajectory going upstairs is recorded as "positive", and the change in height corresponding to the user's movement trajectory going downstairs is recorded as "negative".

[0119] Formulas (1) and (2) below show a formula for determining whether an entrance or exit is on the same floor based on the change in height during the process of a user moving up and down stairs after entering the room and finally exiting:

[0120] sumΔH= abs(ΔH1+ ΔH2+…+ ΔH n ) Formula (1)

[0121]

[0122] Here, abs() is the absolute value function, and sumΔH represents the altitude deviation after the user enters from the entrance and exits from the exit. Because barometer data can have errors, an error threshold Threshold1 is set (as the first altitude change threshold). When the altitude deviation is less than Threshold1, i.e., close to 0, the entrance and exit are considered to be on the same level; otherwise, they are not on the same level.

[0123] Formulas (3) to (5) below show the formulas for judging whether the floor spacing is equal (i.e., equal height or different height) based on the height change corresponding to the user's movement up and down the stairs after entering the room and finally leaving:

[0124]

[0125] L i =2.0+i*0.1 (i is an integer, ranging from 1 to 40) Formula (4)

[0126]

[0127] Where, ΔH i Li is the change in height during each movement within the room (i.e., the height across floors), where Li is the floor spacing and sumD is the vertical distance between floors. i This represents the total deviation between the height across floors and the actual height moved, assuming equal height. Threshold2 is the set deviation threshold corresponding to the total deviation.

[0128] When the value of i is fixed, the floor spacing is also fixed. This means that, assuming the current floor has equal floor spacing, the corresponding span height can be calculated by recalculating the floor spacing under the same conditions. The deviation between the cross-layer height obtained from the calculated air pressure data and the inversely calculated cross-layer height was determined. Then, the deviation across multiple layers is calculated to obtain the total deviation sumD. i Calculate sumD for all possible cases of i. i Select the minimum min(sumD) i ), at this time sumD i It should be relatively small. We will check if it is less than a threshold. If it is less than a threshold, we will determine that the current building has equal floor spacing, that is, the floors in the building are of equal height. Otherwise, it is a building with different heights.

[0129] Understandably, the information obtained from this capability identification method regarding the floor spacing and whether the entrances and exits are on the same floor can be stored. This information can then be used to determine the location capability when the user re-enters the building or when other users enter the building.

[0130] (3) User Correction Capability Identification Method: Based on the data manually input by the user, the system determines the capability items related to user correction. Specifically, it detects in real-time whether the user has actively corrected the floor information at the current location. If the user has actively corrected the floor information, the system determines that the user correction capability is met, and the positioning capability includes user correction. Understandably, when the positioning capability includes user correction, the user correction positioning method can be used, and the positioning accuracy corresponding to this method is high. In some implementations, the current floor information and the fingerprint information of the corresponding Wi-Fi / Bluetooth wireless signal, as well as the corresponding location parameters, can be collected and recorded for use by electronic devices when positioning again, or by other electronic devices.

[0131] (4) Multi-entry signal difference identification method: The ability to identify a high-precision single entry / exit is determined by acquiring the differences in Wi-Fi / Bluetooth and other wireless signals at different entry / exit locations. Specifically, the results of indoor and outdoor change events obtained from GNSS signals (i.e., moving from indoors to outdoors / moving from outdoors to indoors) are combined with the differences in the parameters related to Wi-Fi / Bluetooth and other wireless signals at the entry and exit points of the building (e.g., the fingerprints corresponding to Wi-Fi / Bluetooth and other wireless signals). For example, the differences in the AP names, number, and signal strength detected by Wi-Fi / Bluetooth at the entry / exit (e.g., obtaining fingerprint data of the corresponding entry / exit collected through crowdsourcing) can be compared. If there are no significant differences in the data such as AP names, number, and signal strength corresponding to Wi-Fi / Bluetooth and other wireless signals collected by multiple people at the entry / exit, then the building with a single entry / exit (i.e., "high-precision single entry / exit") is determined, and the positioning capability can include high-precision single entry / exit. Understandably, if the positioning capability includes high-precision single entrance / exit, then setting the entrance / exit floor to the first floor and using barometric positioning will result in high-precision positioning. Otherwise, if the condition of not having a high-precision single entrance / exit is met, then the positioning capability includes non-high-precision single entrance / exit. Understandably, if the positioning capability includes non-high-precision single entrance / exit, then the positioning accuracy corresponding to barometric positioning is generally considered to be normal. Understandably, when detecting entrances / exits via wireless signals such as Wi-Fi / Bluetooth, the fingerprint information and corresponding location parameters corresponding to the Wi-Fi / Bluetooth signals can be recorded for use by electronic devices for re-positioning or by other electronic devices.

[0132] (5) Map Data Capability Identification Method: Capability items such as single entrance / exit with general accuracy, multiple entrances / exits on the same floor, and multiple entrances / exits on different floors are determined by combining map data. Specifically, based on indoor and outdoor change event monitoring results obtained from GNSS data, the coordinates of users entering and exiting the building are recorded. The recorded entrance / exit coordinates are compared with existing building map data. If the building map shows only one entrance / exit (i.e., "single entrance / exit with general accuracy") or multiple entrances / exits on the same floor within a certain range of that location (e.g., within a spherical space area with that location as the center and the distance from the center as the first distance threshold), then the capability item of single entrance / exit with general accuracy or multiple entrances / exits on the same floor is determined. It is understandable that when the positioning capability only includes single entrance / exit with general accuracy or multiple entrances / exits on the same floor, it can be determined that barometric positioning is used, and the positioning accuracy corresponding to barometric positioning is general accuracy. If a building map shows multiple entrances / exits distributed across different floors within a certain range of a given point (e.g., a spherical space area with the point as its center and a distance from the center as a first distance threshold), then the capability of having multiple entrances / exits on different floors is determined. In this case, the positioning capability includes multiple entrances / exits on different floors. Understandably, when the positioning capability includes multiple entrances / exits on different floors, it can be determined that the positioning result obtained using barometric positioning is likely incorrect, thus the positioning accuracy is determined to be low.

[0133] Understandably, knowing the exact floor of the entrance / exit allows us to record the fingerprint information from wireless signals like Wi-Fi / Bluetooth to enrich the fingerprint database. Furthermore, when it's determined that the system meets the general accuracy requirements for a single entrance / exit or multiple entrances / exits located on the same floor, this information is used to facilitate subsequent location calculations using barometric positioning, or for use by electronic devices for re-location and other electronic equipment. In this case, we can record the user's entrance / exit floor information and the corresponding fingerprint information from Wi-Fi / Bluetooth to enrich the fingerprint database.

[0134] Understandably, once the currently satisfied capability item is obtained through the supported capability identification method (at least one of five capability identification methods can be supported), the corresponding positioning capability can be obtained. That is, the positioning capability includes the capability item determined through the capability identification method.

[0135] Understandably, when making a judgment, the capability items determined by each capability identification method, as well as the positioning method and positioning accuracy corresponding to each capability item, can be stored as prior data to serve as the basis for judgment in the next floor positioning. In addition, the valid fingerprint information and corresponding location parameters obtained by the capability identification method can also be stored and recorded to provide the necessary positioning-related parameters for subsequent floor positioning.

[0136] Understandably, in some embodiments, during each positioning process, when each capability identification method obtains the capability item it satisfies, and when the positioning capability only includes that capability item, the corresponding positioning method and positioning accuracy will be changed after recalculation based on positioning-related parameters. For example, user correction data will only be updated after the user correction data is received again.

[0137] Understandably, in some embodiments, since only one capability identification method is supported, only a single capability item result can be obtained; in other embodiments, if multiple capability identification methods in the above steps are currently used, multiple capability items will be obtained, and the specific capability item is determined by the supported capability identification method and the result obtained by the capability identification method used.

[0138] S404, determine the positioning method based on positioning capabilities.

[0139] Understandably, positioning capabilities encompass multiple capabilities, each supporting different positioning methods, and each method exhibiting varying levels of accuracy. Furthermore, when determining the positioning method based on the positioning capabilities, the corresponding positioning accuracy for that method can also be obtained.

[0140] In some embodiments, there are default positioning methods and default positioning accuracies. For example, the default positioning method is barometric positioning, and the default positioning accuracies are general accuracy. In other embodiments, when the positioning capability includes multiple capability items, multiple positioning methods are supported. In this case, the positioning method that meets the priority condition can be selected according to the positioning accuracies corresponding to each positioning method, thereby obtaining the positioning method used for floor positioning and the positioning accuracies L1 corresponding to the selected positioning method.

[0141] Specifically, in some embodiments, different scaling factors can be set for the positioning accuracy of the capability items obtained through the above steps and the positioning method corresponding to the capability items. The scaling factor is set by comprehensively considering the accuracy (i.e., reliability) of the capability items obtained by the capability identification method and the accuracy of the positioning method corresponding to the capability items; specific setting requirements are not limited here.

[0142] For example, the percentage coefficient for the capability item that detects user correction (corresponding to high precision) can be set to 100%; the percentage coefficient for the capability item that supports fingerprint positioning (corresponding to high precision) can be set to 90%; the percentage coefficient for the capability item with unequal floor spacing or multiple entrances and exits located on different floors obtained by the air pressure cross-floor capability identification method (corresponding to low precision) can be set to 70%; the percentage coefficient for the capability item with high precision for a single entrance and exit obtained by the multi-entry signal capability identification method (corresponding to high precision) can be set to 85%; the percentage coefficient for the capability item with multiple entrances and exits located on different floors obtained by the map data capability identification method (corresponding to low precision) can be set to 88%; and the percentage coefficient for the capability item corresponding to general precision obtained by the capability identification methods shown above can be set to 0%. Since the positioning method corresponding to the general precision capability item is the default positioning method, and general precision is also the default positioning precision, when it is necessary to prioritize non-default positioning methods and non-default positioning precision, the percentage coefficient for the capability item corresponding to general precision is set to 0%, thereby avoiding interference when selecting the positioning method.

[0143] Understandably, when the positioning capability includes multiple capability items, the capability item with the largest proportion coefficient is selected based on the configured proportion coefficient. At this point, the subsequent positioning method and corresponding positioning accuracy L1 can be obtained (i.e., the priority condition is the positioning method and positioning accuracy corresponding to the capability item with the largest proportion coefficient). When the final positioning method and positioning accuracy cannot be obtained through configuring the proportion coefficient, the default positioning method and positioning accuracy are used, i.e., barometric positioning is used, and the default is general accuracy.

[0144] Based on the above-mentioned proportional coefficients, the following describes the positioning methods and positioning accuracy under some possible positioning capabilities.

[0145] For example, when the positioning capability includes user correction and other capability items, since the user correction capability item has the largest weight coefficient, the user correction positioning method corresponding to user correction is selected, and the positioning accuracy L1 is high accuracy.

[0146] When the positioning capability does not include user correction and supports fingerprint positioning, the positioning method is determined to be fingerprint positioning, and the positioning accuracy L1 is high accuracy.

[0147] When the positioning capabilities include the absence of user correction and fingerprint positioning, and the building structure has multiple entrances on different floors (the corresponding ratios for the two recognition methods are 88% or 70% respectively) and unequal floor spacing (the corresponding ratio is 70%), the positioning method corresponding to the building structure with multiple entrances on different floors (the corresponding ratio is 88%) will be used as the final positioning method. That is, the positioning method is barometric positioning, and the positioning accuracy L1 is low accuracy.

[0148] When the positioning capability includes the absence of user correction and the lack of support for fingerprint positioning, and the building structure is a high-precision single entrance / exit (configured ratio coefficient of 85%) and the floor spacing is unequal (configured ratio coefficient of 70%), the positioning method corresponding to the high-precision single entrance / exit will be used as the positioning method, that is, the positioning method is barometric positioning, and the positioning accuracy L1 is high precision.

[0149] When the positioning capabilities lack user correction and fingerprint positioning, and the building structure is a high-precision single-entrance / exit (configured ratio coefficient of 85%), and multiple entrances to the building are not on the same floor: If the location of multiple entrances not on the same floor is determined by map data capabilities, with a corresponding ratio coefficient of 88%, then the positioning method corresponding to the location of multiple entrances not on the same floor will be used as the final positioning method, i.e., barometric positioning, with low precision (i.e., the precision level corresponding to multiple entrances not on the same floor). Alternatively, if the location of multiple entrances not on the same floor is determined by barometric cross-floor capabilities, with a corresponding ratio coefficient of 70%, then the positioning method corresponding to the high-precision single-entrance / exit will be used as the final positioning method, i.e., barometric positioning, with a positioning precision L1 of high precision (i.e., the precision level corresponding to the high-precision single-entrance / exit).

[0150] Understandably, when the positioning capabilities include the absence of user correction, lack of support for fingerprint positioning, single entrance / exit with general accuracy, multiple entrances located on the same floor, and equal floor spacing, the default barometric positioning method is used, and the positioning accuracy L1 is general accuracy.

[0151] Understandably, the above only lists some situations, not all of them, and will not be elaborated upon here.

[0152] S405 outputs the positioning result and positioning accuracy.

[0153] Understandably, in some embodiments, after determining the positioning method and positioning accuracy L1, the current positioning result can be calculated according to the positioning method. Understandably, when calculating the current positioning result using the determined positioning method, a positioning accuracy L2 will also be obtained. For example, if fingerprint positioning is used, and the fingerprint database contains relatively few fingerprints related to the building to be located, the positioning accuracy L2 obtained using the fingerprint positioning method will be low. In this case, the lower positioning accuracy L2 is selected as the output positioning accuracy from the obtained positioning accuracy L2 and the pre-stored positioning accuracy L1 corresponding to the adopted positioning method.

[0154] Understandably, in some other embodiments, after determining the positioning method and positioning accuracy L1, the current positioning result is calculated according to the positioning method, and the positioning accuracy L1 is directly used as the output positioning accuracy.

[0155] Understandably, in specific outputs, to allow users to experience different levels of precision and perceive the positioning accuracy, a display method corresponding to the output positioning accuracy can be used to avoid misjudgment. For example, the high-precision display method, floating display method, and cross-layer display method mentioned above can be used, or other methods can be employed, which will not be elaborated upon here. Understandably, when the positioning method and its accuracy cannot be determined, a default positioning method can be set, such as barometric positioning, with a corresponding positioning accuracy of, for example, general accuracy. In this case, the positioning result calculated using barometric positioning is then displayed using the general accuracy display method.

[0156] For example, when the positioning method is determined to be user-corrected positioning, and the positioning result is the result of user correction, and both positioning accuracy L1 and positioning accuracy L2 are high precision, then the output positioning accuracy is high precision. In this case, the user correction result and the positioning accuracy can be displayed in a high precision display mode. For example, refer to the above. Figure 3A The high-precision display method shown.

[0157] For example, when the positioning method is determined to be fingerprint positioning, the floor information in the fingerprint database is used as the positioning result, and both positioning accuracy L1 and positioning accuracy L2 are high precision, then the output positioning accuracy is high precision. In this case, the fingerprint positioning result and positioning accuracy can be displayed in a high precision display mode.

[0158] For example, when the positioning method is determined to be barometric positioning, and the current positioning capability supports high-precision positioning (e.g., the positioning capability includes "high-precision single entrance / exit," and this positioning precision L1 is high-precision, i.e., determined by "high-precision single entrance / exit"), and the positioning precision L2 is low-precision (e.g., when using floor-based positioning in a basement), the floor result of the barometric positioning method is used as the positioning result, and the output positioning precision is the low-precision positioning precision corresponding to L2. Furthermore, the results and positioning precision of the barometric positioning method can be displayed in a low-precision display mode. Additionally, the number of floors traversed and the positioning precision can be displayed in a cross-floor display mode. For example, refer to the above. Figure 3D The cross-layer display method shown.

[0159] For example, when the positioning method is determined to be barometric positioning, and the current positioning capability supports a low positioning accuracy L1 (e.g., the positioning capability includes multiple entrances / exits located on different floors or with varying floor spacing, and the positioning accuracy is determined by a "high-precision single entrance / exit"), when calculating the positioning result using barometric positioning, the current positioning accuracy is L2. Therefore, the output positioning accuracy is the low accuracy corresponding to positioning accuracy L1. In this case, the number of floors traversed by the user can be calculated, and the number of floors traversed obtained from barometric positioning can be used as the positioning result, with the output positioning accuracy being low.

[0160] For example, when the positioning method is determined to be barometric positioning, and the positioning accuracy supported by the current positioning capability is general accuracy (e.g., the positioning capability includes "general accuracy single entrance / exit," entrances / exits on the same floor or equal floor spacing, and this positioning capability does not include capability items involving high accuracy and low accuracy), barometric positioning is used, and the positioning accuracy L1 is general accuracy. The floor result is obtained based on the barometric positioning method, and the positioning accuracy L2 is also general accuracy. In this case, the output positioning accuracy is general accuracy. Furthermore, the results of the barometric positioning method and the positioning accuracy can be displayed in a floating display mode. For example, refer to the above. Figure 3B or Figure 3C The floating display method shown.

[0161] It is understood that the execution order of steps 401 to S405 above is only an example. In other embodiments, other execution orders may be used, and some steps may be split or combined. This is not limited here.

[0162] Understandably, the above Figure 4 The positioning method shown can be executed by the watch 100 as the main executor, or it can be executed by the watch 100 in conjunction with the cloud 300. The specific execution method is not required here.

[0163] Figure 5 According to some embodiments of this application, a schematic diagram of the framework of a positioning method is shown. For example... Figure 5 The schematic diagram illustrates a simplified process for determining the positioning method and accuracy after a user initiates a location request, utilizing positioning-related parameters such as barometer readings, Wi-Fi / Bluetooth wireless signals, GNSS, map information, building type data, and user correction data. During positioning, the necessary pre-acquired data (e.g., fingerprint database data, map data, and prior data such as capability items obtained from each capability identification method, the corresponding positioning method for each capability item, and the corresponding positioning accuracy) can be stored in the cloud for later use.

[0164] Specifically, such as Figure 5 As shown in box 01, when the electronic device detects a floor positioning request, for example, if it determines that floor positioning is needed based on GNSS signal data, it will enter box 02 to determine the positioning method and output the positioning result and positioning accuracy. At this point, as shown in box 02... Figure 5 As shown in box 03, the electronic device can acquire sensor data such as GNSS, Wi-Fi, and Bluetooth data. It can also acquire the floor data input by the user (as shown in box 04) and the location-related parameters recorded or stored in the cloud (as shown in box 05), such as fingerprint database data, map data, and prior data, to obtain positioning capabilities, determine the positioning method, and output the positioning result and accuracy. The specific process of determining the positioning method and outputting the positioning result and accuracy is as described in steps S404-S405 above, and will not be repeated here.

[0165] Understandably, during the process of determining the positioning method and accuracy, useful data collected during the process, such as fingerprint data corresponding to wireless signals like Bluetooth / Wifi, capability items updated by each capability recognition method, positioning method, positioning accuracy, and floor data input by the user, can be uploaded to the cloud and stored for later use.

[0166] Understandably, when outputting the positioning result and positioning accuracy as shown in box 02, three possible positioning accuracy results will be obtained. Specifically, as follows... Figure 5 As shown in boxes 021, 022, and 023, these correspond to "high-precision positioning accuracy," "general-precision positioning accuracy," and "low-precision positioning accuracy," respectively. Understandably, to improve the user's perception of accuracy and enhance reliability, a display method corresponding to the positioning accuracy can be set, such as... Figure 5 As shown in boxes 051, 052, and 053, the display modes corresponding to the high-precision positioning mode, the general-precision positioning mode, and the low-precision positioning mode are respectively the high-precision display mode, the floating display mode, and the cross-layer display mode.

[0167] Understandably, once the positioning accuracy is determined, it is displayed in different ways on the user's product interface, and low-precision positioning results are displayed across floors to improve the overall floor positioning accuracy and reliability.

[0168] Understandably, the positioning method mentioned in this application can be performed on one or more electronic devices, and the resulting positioning results and accuracy can be displayed on multiple electronic devices. For example, in the scenario mentioned above where a parent displays the floor location of a child wearing a watch 100 via a mobile phone 200, the watch 100 can cooperate with a cloud device 300 containing the relevant parameters required for positioning to perform positioning, obtaining the positioning results and accuracy. Then, when the parent wants to know the child's floor location, they can click on... Figure 1A As shown in the "Location" control, mobile phone 200 sends a location request to cloud 300. Cloud 300 obtains the location result and accuracy from watch 100 and sends it to mobile phone 200. After receiving the location result and accuracy, mobile phone 200's page displays the specific floor result according to the display method corresponding to the location accuracy, for example... Figures 3A-3D The data includes possible location information for the current building where the child is located, as well as floor information reflecting the accuracy of the location.

[0169] For ease of understanding, Figure 6 According to some embodiments of this application, a schematic diagram of a system architecture 6000 corresponding to the positioning method proposed in this application between a watch 100, a mobile phone 200, and a cloud 300 is shown. It is understood that the system architecture 6000 includes a watch processing unit 600, a cloud processing unit 610, and a mobile phone processing unit 620.

[0170] The watch processing unit 600 includes a positioning detection module 601, a data acquisition module 602, an identification module 603A, and a positioning result and accuracy output module 604.

[0171] The cloud processing unit 610 includes a fingerprint data storage module 611, a mode accuracy data storage module 612, an identification module 603B, and a positioning mode determination module 613.

[0172] The mobile phone processing unit 620 includes an acquisition module 621 and a display module 622.

[0173] Specifically, the watch processing unit 600 and the cloud processing unit 610 can work together to obtain the positioning result and positioning accuracy. The fingerprint data storage module 611 in the cloud processing unit 610 stores fingerprint data and its corresponding location parameters, namely the name, number, and coordinates of the wireless access point, as well as the building height and floor. The positioning accuracy data storage module 612 stores the positioning method and the corresponding positioning accuracy obtained after applying various capability recognition methods. For example, it stores each capability item obtained from the five capability recognition methods in step S403 above, along with the corresponding positioning method and positioning accuracy for each capability item.

[0174] The positioning detection module 601 is used to detect a child's positioning needs after entering a building. For example, when the watch 100 detects that a child has entered the building based on GNSS data, it will begin positioning.

[0175] After detecting a positioning request, the data acquisition module 602 begins acquiring fingerprint database data from Bluetooth, Wi-Fi, and the cloud processing unit 610, as well as prior data on positioning methods and accuracy under various positioning capabilities obtained through previous judgments. For example, as shown in the figure, the fingerprint database data and prior data (marked "①") acquired by the watch processing unit 600 from the cloud processing unit 610. Figure 6 The data acquisition module 602 supports the acquisition of signals such as barometer, GNSS, Wifi and Bluetooth.

[0176] The recognition module 603A in the watch processing unit 600 can determine the required capabilities based on received sensor data, fingerprint database data, and prior data. These capabilities correspond to the positioning method and its accuracy. Specifically, the following methods can be used... Figure 4 The capability identification method shown in step S403 is used to determine the currently satisfied capability. It is understood that in some embodiments, due to the limited memory and insufficient computing power of the watch 100, some of the five capability identification methods listed in step S403 can be processed in the cloud processing unit 610 within the cloud 300. That is, in some implementations, the watch 100 sends some received sensor data to the cloud processing unit 610, where the identification module 603B makes a judgment to determine the currently satisfied capability. For example, the barometric pressure cross-level capability identification method in step S403 is performed in the watch processing unit 600. The fingerprint capability identification method, map data capability identification method, and multi-entry signal difference capability identification method in step S403 are operated in the cloud. Furthermore, since the user correction data is obtained from the mobile phone 200, after the cloud 300 receives the floor data input by the user, the corresponding user correction capability identification method in step S403 is also performed in the cloud. For example, all capability identification methods can be performed in the cloud. The specific method for recognizing each capability is either a watch or the cloud; no restrictions are placed here.

[0177] Once the recognition module 603A in the watch processing unit 600 and the recognition module 603B in the cloud processing unit 610 obtain the required capability items, the recognition module 603A will send the capability items satisfied by each capability recognition method to the cloud processing unit 610, such as... Figure 6The capability item corresponding to the label "①" sent in the cloud processing unit 610, obtained according to the supported capability identification methods, can be used by the positioning method determination module 613 to determine the positioning capability based on the capability items obtained from the received and identified capability identification methods from the identification module 603B. Based on the positioning capability, the corresponding positioning method and positioning accuracy are then obtained. This is understandable; the specific process is as follows: Figure 4 The specific steps in S404 are shown in the process and will not be repeated here.

[0178] Once the positioning method determination module 613 determines the positioning method, it sends the determined positioning method and the corresponding positioning accuracy L1 to the watch processing unit 600. Figure 6 The positioning method and positioning accuracy L1 corresponding to the label "②" sent in the watch processing unit 600 are calculated based on the received positioning method. This yields a positioning accuracy L2. The lower accuracy between L1 and L2 is selected as the output positioning accuracy, and the positioning result and accuracy are then output. For example, the watch can run the final positioning result and accuracy in the background, displaying the specific data on the watch. It can also send a request from the cloud 300 to the mobile phone 200 to obtain the positioning result and accuracy, and then relay this information back to the mobile phone via the cloud 300.

[0179] When the acquisition module 621 in the mobile phone processing unit 620 detects a parent's request to obtain the child's location results, the acquisition module 621 sends an acquisition request to the cloud processing unit 610. The cloud processing unit 610 obtains the location results and location accuracy from the location result and accuracy output module 604 in the watch 100, for example... Figure 6 The cloud processing unit 610 obtains the positioning result and positioning accuracy shown in the label "②" from the watch processing unit 600. Then, the cloud processing unit 610 sends the positioning result and positioning accuracy to the mobile phone 200. After receiving the positioning result and positioning accuracy, the display module 622 of the mobile phone 200 displays it according to the display method corresponding to the accuracy.

[0180] It is understood that the system architecture 6000 shown above is only an example. In other embodiments, other modules may be included, and some modules may be split or merged. This is not limited here.

[0181] It is understood that in some other embodiments, the watch processing unit 600 may also include the fingerprint data storage module 611, the mode accuracy data storage module 612, and the positioning mode determination module in the cloud processing unit 610 to implement steps S401-S405. The specific situation depends on the developers and the computing power supported by the watch, and the specific implementation process is not required here.

[0182] Figure 7 According to an embodiment of this application, a schematic diagram of the hardware structure of a watch 100 is shown.

[0183] further, Figure 7 According to some embodiments of this application, a structural schematic diagram of a watch 100 is shown.

[0184] like Figure 7 As shown, the watch 100 includes: a processor 101, a microcontroller unit 102, a memory 103, a display screen 104, a communication module 105, a sensor module 106, an interface module 107, buttons 108, a power module 109, etc.

[0185] The processor 101 may include one or more processing units, such as processing modules or circuits of a central processing unit (CPU), graphics processing unit (GPU), digital signal processor (DSP), artificial intelligence (AI) processor, or field programmable gate array (FPGA). Different processing units may be independent devices or integrated within one or more processors. For example, the processor 101 may be used in the positioning method provided in the embodiments of this application.

[0186] The memory 103 may include volatile memories such as random-access memory (RAM) and double-data-rate synchronous dynamic random access memory (DDR SDRAM), as well as non-volatile memories such as programmable read-only memory (PROM), electrically alterable read-only memory (EAROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, and secure digital storage (SD). The memory 103 can be used to store instructions and data.

[0187] Display screen 104 is used to display images, videos, etc., such as desktops and GUIs of various applications. Display screen 104 includes a display panel, which can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini-LED, a Micro-LED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.

[0188] The communication module 105 may include a mobile communication module and a wireless communication module.

[0189] The mobile communication module provides solutions for wireless communication applications in smartwatches, including 2G / 3G / 4G / 5G. The mobile communication module may include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. The mobile communication module can receive electromagnetic waves via an antenna, filter and amplify the received electromagnetic waves, and then transmit them to a modem processor for demodulation. The mobile communication module can also amplify the signal modulated by the modem processor and radiate it as electromagnetic waves via the antenna.

[0190] The wireless communication module can provide solutions for wireless communication applications on the watch 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), NFC, and infrared (IR) technology. The wireless communication module can be one or more devices integrating at least one communication processing module. The wireless communication module receives electromagnetic waves via an antenna, frequency-modulates and filters the electromagnetic wave signals, and sends the processed signal to the processor 101. The wireless communication module can also receive signals to be transmitted from the processor 101, frequency-modulate and amplify them, and then convert them into electromagnetic waves for radiation via the antenna.

[0191] The sensor module 106 may include data acquisition for barometers, Bluetooth, Wi-Fi, and GNSS.

[0192] Interface module 107 may include physical interfaces for connecting watch 100 to other devices. For example, interface module 107 may include interfaces for connecting external storage cards (such as SD card interfaces for connecting Micro SD cards, SIM card interfaces for connecting subscriber identity modules (SIM) cards, universal serial bus (USB) interfaces for connecting other devices, etc.).

[0193] Button 108 may include a crown, dial, etc.

[0194] The power module 109 may include a battery, which can be used to charge the battery or to supply power to the processor 101, microcontroller unit 102, memory 103, display screen 104, communication module 105, sensor module 106, interface module 107, and buttons 108.

[0195] Understandable. Figure 7 The illustrated structure of watch 100 does not constitute a specific limitation on watch 100. In other embodiments of this application, watch 100 may include more or fewer components than illustrated, or combine some components, or separate some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0196] It is understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the watch 100.

[0197] It should be noted that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiments can be completed by the integrated logic circuitry in the processor's hardware or by instructions or program code in software form. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0198] According to the method provided in the embodiments of this application, this application also provides a computer program product containing instructions, the computer program product including: computer program code, which, when run on a computer, causes the computer to perform the steps executed by the electronic device in any of the above embodiments.

[0199] According to the method provided in the embodiments of this application, this application also provides a computer-readable medium storing program code, which, when run on a computer, causes the computer to perform the steps executed by the electronic device in any of the above embodiments.

[0200] The various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0201] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.

[0202] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0203] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or via other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, optical discs, magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other propagation signals. Therefore, machine-readable media include any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.

[0204] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.

[0205] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.

[0206] It should be noted that in the examples and description of this patent, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0207] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art should understand that various changes in form and detail may be made thereto without departing from the spirit and scope of this application.

Claims

1. A positioning method applied to a first electronic device, characterized in that, include: Obtain the current first positioning capability of the building to be located where the first electronic device is located; The positioning method for the first floor is determined based on the first positioning capability; Using the first floor positioning method, the first floor positioning result of the floor where the first electronic device is located is obtained; Determine the first positioning accuracy when using the first floor positioning method for the current positioning; From the first positioning accuracy and the positioning accuracy corresponding to the pre-stored first floor positioning method, select the one with lower positioning accuracy as the accuracy of the first floor positioning result; Send the first floor positioning result and the accuracy of the first floor positioning result to the second electronic device.

2. The method according to claim 1, characterized in that, Also includes: The positioning accuracy corresponding to the pre-stored first floor positioning method is used as the accuracy of the first floor positioning result.

3. The method according to claim 1 or 2, characterized in that, The first positioning capability includes at least one of the following: building structure, positioning method type supported by the first electronic device, and whether the user has manually entered floor information.

4. The method according to claim 3, characterized in that, The building structure includes at least one of the following: equal floor spacing, unequal floor spacing, single entrance / exit, multiple entrances / exits on the same floor, and multiple entrances / exits on different floors. The type of positioning method includes whether fingerprint positioning is supported, wherein the fingerprint positioning method includes Bluetooth-based fingerprint positioning or wireless fidelity-based fingerprint positioning.

5. The method according to claim 4, characterized in that, The method for determining the first floor location based on the first positioning capability includes: When the first positioning capability includes: having floor information manually entered by the user, the first floor positioning method is determined to be using the floor information manually entered by the user as the first floor positioning result; If the first positioning capability includes: not having floor information manually entered by the user, and the building to be located supports fingerprint positioning, then the first floor positioning method is determined to be the fingerprint positioning method. If the first positioning capability includes: the floor information not being manually entered by the user, and the building to be located does not support the fingerprint positioning method, then the first floor positioning method is determined to be the barometric positioning method.

6. The method according to claim 4, characterized in that, The method for determining the first floor location based on the first positioning capability includes: Based on the first positioning capability, determine the multiple floor positioning methods supported by the building to be positioned; Based on the positioning accuracy corresponding to the multiple floor positioning methods, the first floor positioning method that meets the first priority condition is selected from the multiple floor positioning methods.

7. The method according to claim 6, characterized in that, The step of determining the multiple floor positioning methods supported by the building to be positioned based on the first positioning capability includes: When the first positioning capability includes: having floor information manually entered by the user, and the building to be positioned supports fingerprint positioning, it is determined that the building to be positioned supports user correction positioning and the fingerprint positioning, wherein the user correction positioning is to use the floor information manually entered by the user as the first floor positioning result; If the first positioning capability includes: no floor information manually entered by the user, the building to be positioned supports fingerprint positioning, the floor spacing of the building structure is equal, the floor spacing is unequal, there is a single entrance / exit, multiple entrances / exits are located on the same floor, or multiple entrances / exits are located on different floors, then it is determined that the building to be positioned supports the fingerprint positioning method and the barometric positioning method. If the first positioning capability includes: having floor information manually entered by the user, the building to be positioned does not support fingerprint positioning, the floor spacing of the building structure is equal, the floor spacing is unequal, there is a single entrance / exit, multiple entrances / exits are located on the same floor, or multiple entrances / exits are located on different floors, then it is determined that the building to be positioned supports the user correction positioning method and the barometric positioning method. If the first positioning capability includes: having floor information manually entered by the user, the building to be positioned supporting fingerprint positioning, the building structure having equal floor spacing, unequal floor spacing, a single entrance / exit, multiple entrances / exits located on the same floor, or multiple entrances / exits located on different floors, then it is determined that the building to be positioned supports the user correction positioning method, the fingerprint positioning method, and the barometric positioning method.

8. The method according to claim 7, characterized in that, It also includes determining the positioning accuracy corresponding to the positioning method for each floor.

9. The method according to claim 8, characterized in that, Determining the positioning accuracy corresponding to each floor's positioning method includes: When the floor positioning method is the user correction positioning method, and floor information manually entered by the user is detected, the positioning accuracy corresponding to the user correction positioning method is determined to be the first accuracy. When the floor positioning method is the fingerprint positioning method, and the building to be located is detected to support the fingerprint positioning method, the positioning accuracy corresponding to the fingerprint positioning method is determined to be the first accuracy. When the floor positioning method is the barometric positioning method, and the building structure is detected to be the single entrance / exit, the positioning accuracy corresponding to the barometric positioning method is determined to be either the first accuracy or the second accuracy. When the floor positioning method is the barometric positioning method, and the floor spacing is equal, or when the multiple entrances and exits are located on the same floor, the positioning accuracy corresponding to the barometric positioning method is determined to be the second accuracy. When the floor positioning method is the barometric positioning method, and it is detected that the building structure has multiple entrances located on different floors, or that the floor spacing is unequal, the positioning accuracy corresponding to the barometric positioning method is determined to be the third accuracy. The first precision is greater than the second precision, and the second precision is greater than the third precision.

10. The method according to claim 9, characterized in that, When the floor positioning method is the barometric positioning method, and the building structure is detected to be a single entrance / exit, determining the positioning accuracy corresponding to the barometric positioning method as the first accuracy or the second accuracy includes: When the floor positioning method is the barometric positioning method, and it is detected that the building structure is the single entrance / exit obtained in the first way, then the positioning accuracy corresponding to the barometric positioning method is determined to be the first accuracy. When the floor positioning method is the barometric positioning method, and it is detected that the building structure is the single entrance / exit obtained by the second method, the positioning accuracy corresponding to the barometric positioning method is determined to be the second accuracy.

11. The method according to claim 10, characterized in that, The method of obtaining the building structure as the single entrance / exit in the first manner includes: When the first electronic device enters and exits the building to be located, it acquires first data, wherein the first data includes fingerprints corresponding to Wi-Fi data or Bluetooth data collected by the first electronic device, or fingerprints corresponding to Wi-Fi data or Bluetooth data acquired by other electronic devices used by other users when entering and exiting the building to be located. When the first electronic device enters the building to be located, the first data obtained is the same as the first data obtained when leaving the building to be located, thus determining that the building structure is the single entrance / exit.

12. The method according to claim 10, characterized in that, The method of obtaining the building structure as the single entrance / exit in the second manner includes: Obtain map data for the building to be located; If, based on the map data of the building to be located, it is determined that there is only one entrance / exit within the first spatial area, then the building structure is determined to be the single entrance / exit. The first spatial area is a spherical spatial area with the entrance / exit of the first electronic device entering and exiting the building to be located as the center, and the distance from the center of the sphere is within a first distance threshold.

13. The method according to claim 6, characterized in that, The step of selecting a first floor positioning method that meets the first priority condition from the multiple floor positioning methods based on the positioning accuracy corresponding to the multiple floor positioning methods includes: Obtain the weighting coefficients of the positioning accuracy corresponding to the multiple floor positioning methods; The positioning method with the highest weight coefficient and the highest positioning accuracy among the multiple floor positioning methods is selected as the first floor positioning method.

14. The method according to claim 4, characterized in that, The method for determining that the multiple entrances and exits are located on different floors in the building structure includes: Obtain map data of the building to be located, and determine that there are multiple entrances and exits on different floors in the first spatial area based on the map data of the building to be located. Then determine that the building structure is that the multiple entrances and exits are located on different floors. The first spatial area is a spherical spatial area with the entrance and exit of the first electronic device entering and exiting the building to be located as the center and the distance from the center of the sphere within a first distance threshold. or, The first air pressure data collected by the first electronic device is obtained. Based on the first air pressure data, if the height deviation value of the first electronic device entering and exiting the building to be located along the building height direction is greater than the first height change threshold, then the building structure is determined to be that the multiple entrances and exits are located on different floors. The first air pressure data is used to characterize multiple air pressure-related parameters generated when the first electronic device moves multiple times in the building to be located.

15. The method according to claim 4, characterized in that, The methods for determining whether the building structure has unequal or equal floor spacing include: The first air pressure data collected by the first electronic device is obtained, and the first height difference generated by the first electronic device each time it moves in the building to be positioned is calculated based on the first air pressure data. The first air pressure data is used to characterize multiple air pressure-related parameters generated by the first electronic device when it moves multiple times in the building to be positioned. Calculate the first difference between the first height difference and the second preset height difference, wherein the second preset height difference is the height difference predicted each time the first electronic device moves within the building to be located, assuming that the floor spacing is equal; When the sum of multiple first differences obtained by the first electronic device when it moves multiple times within the building to be located is greater than the second deviation threshold, it is determined that the floor spacing is not equal. When the sum of multiple first errors obtained by the first electronic device when it moves multiple times within the building to be located is less than or equal to the second deviation threshold, it is determined that the floor spacing is equal.

16. The method according to claim 4, characterized in that, The method for determining that the multiple entrances and exits are located on the same floor in the building structure includes: Obtain map data of the building to be located. Based on the map data, determine that there are multiple entrances / exits on the same floor within a first spatial region. Then, determine that the building structure is such that the multiple entrances / exits are located on the same floor. The first spatial region is a spherical spatial region centered on the entrance / exit of the first electronic device entering or exiting the building to be located, and within a first distance threshold from the center of the sphere; or... The first air pressure data collected by the first electronic device is obtained. Based on the first air pressure data, if the height deviation value of the first electronic device entering and exiting the building to be located along the building height direction is less than or equal to a first height change threshold, then the structure of the building to be located is determined to be that the multiple entrances and exits are located on the same floor. The first air pressure data is used to characterize multiple air pressure-related parameters generated when the first electronic device moves multiple times in the building to be located.

17. A positioning method applied to a second electronic device, characterized in that, include: The system receives the positioning result of the first floor of the building to be located and the accuracy of the first floor positioning result; wherein the positioning result of the first floor and the accuracy of the first floor positioning result are obtained based on the positioning method as described in any one of claims 1 to 16. The first floor positioning result is displayed according to the display method corresponding to the accuracy of the first floor positioning result.

18. The method according to claim 17, characterized in that, The step of displaying the first floor positioning result according to the display method corresponding to the accuracy of the first floor positioning result includes: When the accuracy of the first floor positioning result is the first accuracy, the floor number where the first electronic device is located and the accuracy of the first floor positioning result are displayed. When the accuracy of the first floor positioning result is the second accuracy, the number of floors located or the range of floors located is displayed; When the accuracy of the first floor positioning result is the third accuracy, the number of floors traversed by the first electronic device is displayed; Wherein, the first precision is greater than the second precision, and the second precision is greater than the third precision.

19. An electronic device, characterized in that, include: One or more processors; One or more memories; the one or more memories store one or more instructions that, when executed by the one or more processors, cause the electronic device to perform the positioning method of any one of claims 1 to 18.

20. A computer-readable storage medium, characterized in that, The storage medium stores instructions that, when executed on a computer, cause the computer to perform the positioning method according to any one of claims 1 to 18.

21. A computer program product containing instructions, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the positioning method as described in any one of claims 1 to 18.