Building floor identification method and electronic equipment
By acquiring reference floor heights at building entrances and height data during movement, and combining data conversion and similarity comparison, the problem of inaccurate floor identification in existing technologies is solved, achieving more efficient and accurate floor identification and improving the user navigation experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2024-10-18
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, the accuracy of building floor identification is low, especially when the accuracy of barometric pressure sensors is insufficient or the height difference between adjacent floors in a building is small, making it difficult to accurately identify the floor where the mobile terminal is located.
By acquiring the reference layer height corresponding to the first entrance and the height data during movement or stay in the building, the number of identifications of reference layers of other entrances is reduced. The first and second data are used for conversion and similarity comparison to correct the data and improve the identification accuracy.
It improves the efficiency and accuracy of identifying the floor where a mobile terminal is located in a building, ensuring precise navigation and enhancing the user experience.
Smart Images

Figure CN121908218A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a method and electronic device for identifying building floors. Background Technology
[0002] When determining the location of a mobile terminal, whether it is an indoor positioning application scenario such as when parking in an underground parking lot or an outdoor positioning application scenario such as when using an elevated bridge with multiple layers of different heights, floor identification is required in order to accurately identify the floor of the building where the mobile terminal is located.
[0003] Currently, building floor identification can be achieved by using sensors to obtain air pressure changes, inferring altitude based on air pressure changes, and determining the floor of the building where the mobile terminal is located based on the altitude. However, the error is relatively large, and the accuracy of building floor identification is low, which affects the user experience. Summary of the Invention
[0004] This application provides a building floor identification method and electronic device, which can reduce the number of identifications of reference floors corresponding to other entrances in the building by obtaining the reference floor corresponding to the first entrance and the height of the reference floor, thus narrowing the identification range and improving the efficiency and accuracy of identifying the floor where the electronic device is located when it moves or stays in the building.
[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0006] In one aspect, a building floor identification method is provided, which is applied to an electronic device. In this building floor identification, firstly, the electronic device acquires first data corresponding to a first entrance, then the electronic device acquires second data corresponding to the first entrance, and finally, the electronic device obtains the target floor where the electronic device is located when it moves or stays in the building based on the first data and the second data.
[0007] For example, the electronic device can be a mobile phone or a vehicle-mounted system. In the scenario where a user drives a vehicle into an underground parking garage to park, the movement of the vehicle can be represented as the movement of the user's mobile phone or vehicle-mounted system.
[0008] For example, the first entry point is determined based on the navigation information or cellular information of the electronic device in order to improve adaptability to different scenarios.
[0009] Wherein, the first entrance is the entrance through which electronic devices enter the building from at least one entrance corresponding to the building; the first data includes at least one reference floor corresponding to the first entrance in the building and the height of each reference floor; the reference floor is used for electronic devices to move or stay in the building, and the reference floor includes a floor or an intermediate floor between floors.
[0010] The second data is a set of height data that changes over time as the electronic device enters the building from the first entrance and moves or stays in the building.
[0011] The target layer is any one of at least one reference layer corresponding to the first entry point.
[0012] In the above-mentioned building floor identification method, by obtaining the first data and the second data corresponding to the first entrance, the target floor where the electronic device moves or stays can be obtained. There is no need to obtain data from other entrances of the building, which narrows the scope of the target floor identification. Furthermore, the reference layer includes not only the floor but also the intermediate layer between floors, which can further improve the accuracy and efficiency of the target floor identification.
[0013] In one possible implementation of the first aspect, the electronic device transforms the second data based on the first data to obtain the third data. Then, based on the second and third data, the electronic device determines the target floor where it is located when moving or staying in the building. It is evident that by transforming the second data, the accuracy of determining the target floor where the electronic device is located when moving or staying in the building can be further improved.
[0014] In one possible implementation of the first aspect, the second data includes at least one subset of height data with a height fluctuation range less than a preset threshold. Therefore, the electronic device can also acquire the third data based solely on the height data with a small height fluctuation range and the first data, thus narrowing the data range and further improving the speed of acquiring the third data.
[0015] In one possible implementation of the first aspect, the electronic device obtains the similarity between the second and third data, and then, based on the similarity, determines the target layer in which the electronic device moves or remains within the building. It is evident that by obtaining the similarity between the second and third data, the accuracy of target layer identification can be further improved.
[0016] In one possible implementation of the first aspect, the third data includes multiple subsets of height data corresponding to different time periods. The heights in each subset of height data corresponding to a given time period are equal, while the heights in subsets of height data corresponding to different time periods are unequal. The electronic device can compare the similarity of the heights in the second and third data corresponding to each time period in the third data to obtain the similarity score for that time period. Then, based on the similarity score for each time period, the electronic device obtains the similarity score between the second and third data. Therefore, the electronic device can further improve the accuracy of target layer recognition by comparing the similarity between the second and third data corresponding to each time period.
[0017] In one possible implementation of the first aspect, the target layer where the electronic device is located when moving or staying in a building is obtained if the similarity is greater than or equal to a preset similarity. It is evident that obtaining the target layer only when the similarity is greater than or equal to the preset similarity can improve the accuracy of identifying the reference layer.
[0018] In one possible implementation of the first aspect, if the similarity is less than a preset similarity, the electronic device corrects the third data, and then, based on the corrected third data, the electronic device obtains the target layer where it moved or stayed in the building. It is evident that correcting the third data can improve the success rate of identifying the target layer when the similarity is less than the preset similarity.
[0019] In one possible implementation of the first aspect, the electronic device acquires a preset step size, and then, based on the preset step size, corrects the third data so that the similarity between the corrected third data and the second data is greater than or equal to a preset similarity; wherein, the preset step size is used to adjust the corresponding height in the third data. It is evident that correcting the third data by using a preset step size, making the similarity between the corrected third data and the second data greater than or equal to a preset similarity, improves the success rate of identifying the target layer.
[0020] In one possible implementation of the first aspect, the electronic device acquires a first air pressure corresponding to a first inlet, then acquires a second air pressure corresponding to the time the electronic device moves or remains stationary within the building, and finally, based on the first and second air pressures, acquires second data corresponding to the first inlet. It is evident that by acquiring the second data using the air pressure at the first inlet and the air pressure collected during movement or stationary movement, and comparing the second data with the first data corresponding to the first inlet, the accuracy of identifying the target layer where the electronic device is located during movement or stationary movement is improved.
[0021] In one possible implementation of the first aspect, the electronic device acquires terrain data corresponding to a first entrance from the map data of the building. Then, based on the terrain data corresponding to the first entrance, the electronic device acquires at least one reference layer corresponding to the first entrance and the height of each of the at least one reference layer. Finally, based on the at least one reference layer corresponding to the first entrance and the height of each of the at least one reference layer, the electronic device acquires first data corresponding to the first entrance. The map data includes terrain data corresponding to at least one entrance; the terrain data includes at least one reference layer corresponding to the entrance and the height of each of the at least one reference layer. It is evident that by acquiring the height of each of the at least one reference layer corresponding to the first entrance, the second data can be matched with the height of each of the at least one reference layer corresponding to the first entrance, reducing the number of times the heights of reference layers corresponding to other entrances are matched, and improving the speed and accuracy of matching with reference layers.
[0022] In a second aspect, a building floor identification device is provided, applied to an electronic device, comprising: a first acquisition module, configured to acquire first data corresponding to a first entrance; wherein the first entrance is the entrance through which the electronic device enters the building from at least one entrance corresponding to the building; the first data includes at least one reference floor corresponding to the first entrance in the building and the height of each reference floor; the reference floor is used for the electronic device to move or stay in the building, and the reference floor includes a floor or an intermediate floor between floors; a second acquisition module, configured to acquire second data corresponding to the first entrance; wherein the second data is a set of height data that changes over time as the electronic device enters the building from the first entrance and moves or stays in the building; and an identification module, configured to acquire the target floor where the electronic device is located when moving or staying in the building based on the first data and the second data; wherein the target floor is any one of the at least one reference floor corresponding to the first entrance.
[0023] Thirdly, an electronic device is provided, the electronic device including a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, and when the computer instructions are executed by the processor, the electronic device performs the building floor identification method as described in the first aspect and any implementation thereof.
[0024] Fourthly, a computer-readable storage medium is provided, including computer instructions that, when executed on an electronic device, cause the electronic device to perform the building floor identification method as described in the first aspect and any implementation thereof.
[0025] Fifthly, a computer program product is provided that, when run on an electronic device, causes the electronic device to execute the building floor identification method as described in the first aspect and any of its implementations.
[0026] The beneficial effects that the building floor identification device provided in the second aspect, the electronic device provided in the third aspect, the computer-readable storage medium provided in the fourth aspect, and the computer program product provided in the fifth aspect can achieve are similar to the beneficial effects that can be achieved in the first aspect and any of its implementations, and will not be repeated here. Attached Figure Description
[0027] Figure 1 This illustration shows a schematic diagram of building information in the prior art provided by an embodiment of this application;
[0028] Figure 2 This illustration shows a schematic diagram of a floor feature data packet in the prior art, as provided in an embodiment of this application.
[0029] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application is shown;
[0030] Figure 4 A schematic diagram of the software structure of an electronic device provided in an embodiment of this application is shown;
[0031] Figure 5 A schematic diagram of the software structure of another electronic device provided in an embodiment of this application is shown;
[0032] Figure 6 A flowchart of a building floor identification method provided in an embodiment of this application is shown;
[0033] Figure 7 This illustration shows a schematic diagram of an intermediate layer provided in an embodiment of this application;
[0034] Figure 8 This illustration shows one of the schematic diagrams of an entry point provided in an embodiment of this application;
[0035] Figure 9 This is a second schematic diagram of an entry point provided in an embodiment of this application;
[0036] Figure 10 This illustration shows a schematic diagram of a first type of data provided in an embodiment of this application;
[0037] Figure 11 This illustration shows one of the schematic diagrams of a target identification layer provided in an embodiment of this application;
[0038] Figure 12 This illustration shows one of the flowcharts for identifying a target layer according to an embodiment of this application;
[0039] Figure 13 This illustration shows a second schematic diagram of a target identification layer provided in an embodiment of this application;
[0040] Figure 14 This illustrates a second flowchart of a target layer identification method provided in an embodiment of this application.
[0041] Figure 15 This illustration shows a third schematic diagram of a target identification layer provided in an embodiment of this application;
[0042] Figure 16 This illustration shows one of the structural schematic diagrams of a building floor identification device provided in an embodiment of this application;
[0043] Figure 17 This is a second schematic diagram of the structure of a building floor identification device provided in an embodiment of this application;
[0044] Figure 18 A schematic diagram of the hardware structure of another electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0045] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Furthermore, to facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" are not necessarily different. Meanwhile, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is being used as an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.
[0046] Furthermore, the business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the emergence of new business scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0047] With the development of navigation software, in scenarios such as navigation in indoor environments like underground parking lots or parking garages, or in outdoor environments like elevated bridges with different heights, it is necessary to perform height recognition to indicate the user's current location in order to provide accurate navigation.
[0048] Currently, barometric pressure sensors can be used to measure changes in air pressure, thereby estimating changes in altitude, and then using this altitude to determine the floor where the mobile terminal is located.
[0049] For example, since air pressure decreases with increasing altitude, a barometric pressure sensor can be used to calculate changes in relative altitude, thereby identifying the specific floor of a building where the mobile terminal is located. Figure 1 As shown, the building information includes building identifier, building name, building location, entrance, total number of floors, height of floor 1, and height of floor 2. Among them, the information corresponding to the entrance stores the floor where the building entrance is located. If there are entrances on multiple floors, the information corresponding to the entrance can store multiple floors. The height of the terminal device is calculated by collecting air pressure from a barometric pressure sensor. The height of the terminal device is compared with the height of each floor in the building information to determine the floor where the terminal device is located. The floor where the terminal device is located is different from the floor where the entrance is located.
[0050] For example, the floor location data obtained during parking is matched with the floor feature data packet, and the matching result is used to locate the parking floor. Figure 2 The diagram shows a floor feature data packet for a parking lot. The floor number and floor height correspond one-to-one. For example, the floor number is {F1, B1, B2}, and the floor height is {3m, 5m, 5m}. The floor height of floor F1 is 3m, the floor height of floor B1 is 5m, and the floor height of floor B2 is 5m. The steps for obtaining floor positioning data based on the floor positioning algorithm and the segmented air pressure data are as follows: (1) Using the current standard atmospheric pressure P0 (e.g., 1013.25) as a reference, obtain the difference in air pressure data at each floor during the parking process to obtain the height of each floor. (2) Obtain the height difference between the driving equipment and the ground after parking based on the height of each floor. (3) Determine the parking floor based on the height difference and the floor feature data packet.
[0051] However, the accuracy of the two methods mentioned above directly depends on the accuracy of the barometric pressure sensor and the original elevation of the measurement site. If there is an error of tens of meters, it may result in a significant difference in the floor level when converted to floor level, leading to a low accuracy rate in floor identification. In particular, when the height difference between adjacent floors in a building is too small, it is even more difficult to correctly identify the floor based on the easily fluctuating barometric pressure sensor value. For example, if there is a mezzanine or a single-level floor between the floors, it is difficult to determine whether the vehicle is located on that single-level floor or a floor above or below it. Or, for example, different entrances to an underground parking garage can lead to different floors. If entrance A can lead to floors B1 and B3, while entrance B can only lead to floors B2 and B3, when the height difference between floors B1 and B2 is small, it is difficult to correctly determine the floor where the vehicle is parked.
[0052] In view of this, this application provides a building floor identification method. Taking its application to an electronic device as an example, the electronic device obtains the reference floors that the electronic device can reach through the entrance of the building and the height of each reference floor. The electronic device obtains the height changes of the electronic device as it moves or stays in the building from the entrance. Based on the height changes and the height of each reference floor corresponding to the entrance, the floor where the electronic device is moving or staying can be obtained. This reduces the number of times the reference floors corresponding to other entrances are matched, improves the efficiency of obtaining the floor where the electronic device is located, and also improves the accuracy of identifying the floor where the electronic device is located.
[0053] In some embodiments, firstly, the electronic device acquires first data corresponding to the first entry point; then, the electronic device acquires second data corresponding to the first entry point; finally, the electronic device acquires the target floor where the electronic device is located when it moves or stays in the building based on the first data and the second data.
[0054] The first entrance is the entrance through which electronic devices enter the building from at least one entrance corresponding to the building.
[0055] For example, a building can be a multi-story shopping mall, a multi-story office building, or a multi-story elevated highway, etc.
[0056] The first data includes at least one reference floor corresponding to the first entrance in the building and the height of each reference floor; the reference floor is used for electronic equipment to move or stay in the building, and the reference floor includes a floor or an intermediate floor between floors.
[0057] The second data is a set of height data that changes over time as the electronic device enters the building from the first entrance and moves or stays in the building.
[0058] The target layer is any one of at least one reference layer corresponding to the first entry point.
[0059] For example, the electronic device can be a mobile phone or a vehicle-mounted system. When parking in an underground garage or driving on a multi-level overpass, the movement of the vehicle can be represented as the movement of the mobile phone or vehicle-mounted system. The user can obtain the first entrance into which the vehicle has entered through the mobile phone or vehicle-mounted system, thereby obtaining the target floor where the vehicle is located when it is moving or when it finally stops.
[0060] In the above method, by obtaining the reference layer corresponding to the first entry and the height of each reference layer, the target layer where the electronic device is moving or stationary can be obtained. This reduces the number of times the reference layers corresponding to other entry points are identified, narrows the identification range, and improves the efficiency and accuracy of identifying the target layer where the electronic device is located, so as to perform precise navigation and thus improve the user experience.
[0061] The aforementioned building floor recognition method can be applied to various scenarios. For example, when a user is driving on a multi-level elevated highway, the user's location can be determined by identifying the floor level on the highway. Similarly, when a user drives to park in the underground parking garage of a shopping mall, the parking floor can be identified to determine the parking location. Likewise, when a user drives to charge their vehicle at a charging station on the ground floor of a building, the charging floor can be identified to determine the charging location. During the driving process, the electronic device can be a mobile phone or a vehicle-mounted system, both of which move with the vehicle. Therefore, the floor on which the user's vehicle is located can be determined by identifying the floors on which the mobile phone and vehicle-mounted system are located.
[0062] The building floor identification method provided in this application embodiment can be applied to electronic devices.
[0063] In some embodiments, such as Figure 3 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a barometric pressure sensor 180C.
[0064] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0065] Processor 110 may include one or more processing units ( Figure 3(Not shown in the image), for example, processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0066] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0067] In some possible implementations, the processor 110 can specifically control the electronic device 100 to acquire the first data corresponding to the first entry point, the processor 110 can specifically control the electronic device 100 to acquire the second data corresponding to the first entry point, and the processor 110 can also specifically control the electronic device 100 to acquire the target floor where the electronic device is located when it moves or stays in the building based on the first data and the second data.
[0068] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0069] In some embodiments, processor 110 may include one or more interfaces ( Figure 3 (Not shown in the image). For example, USB interface 130 is an interface conforming to the USB standard specification, specifically a Mini USB interface, Micro USB interface, USB Type-C interface, etc. USB interface 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0070] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger.
[0071] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.
[0072] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.
[0073] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use on the electronic device 100. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.
[0074] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 receives electromagnetic waves via antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 2.
[0075] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.
[0076] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU performs mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information. Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel.
[0077] In some possible implementations, the electronic device 100 may display the first entry point or the target layer where the electronic device 100 is located in real time via the display screen 194.
[0078] It is understood that the display screen 194 mentioned herein can serve as the screen in the following embodiments.
[0079] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0080] The ISP is used to process the data fed back by camera 193. Camera 193 is used to capture still images or videos.
[0081] A digital signal processor (DSP) is used to process digital signals, including digital image signals and other digital signals. A video codec is used to compress or decompress digital video. An NPU (Neural Processing Unit) is a neural network (NN) computing processor that, by borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, rapidly processes input information and can continuously learn. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, speech recognition, and text understanding.
[0082] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage functions.
[0083] In some possible implementations, the electronic device 100 can store the first data corresponding to the first entry and the second data corresponding to the first entry through the external memory interface 120.
[0084] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0085] In some possible implementations, the electronic device 100 may store the first data corresponding to the first entry and the second data corresponding to the first entry through the internal memory 121.
[0086] Electronic device 100 can implement audio functions through audio module 170 and application processor, such as music playback and recording. Audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. Audio module 170 can also be used for encoding and decoding audio signals.
[0087] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0088] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, or to indicate messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card.
[0089] based on Figure 3 The electronic device shown implements the building floor identification method in this application embodiment. It can obtain the target floor where the electronic device is moving or staying based on at least one reference floor corresponding to the first entrance and the height of each of the at least one reference floor. This reduces the number of matching times with reference floors corresponding to other entrances, narrows the matching range, and improves the accuracy of identifying the target floor where the electronic device is located.
[0090] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered mobile operating system as an example to exemplify the software structure of electronic device 100.
[0091] like Figure 4 As shown, the layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the mobile operating system is divided into four layers, from top to bottom: the application layer, the application framework layer, the system service layer, and the kernel layer.
[0092] The application layer can include a series of application packages.
[0093] like Figure 4 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.
[0094] In some embodiments, the application layer of the electronic device 100 may include a floor identification application, which is used to identify the target floor in the building where the electronic device is located. Taking the electronic device 100 as a mobile phone as an example, the application can be a pre-installed system application or an application downloaded by the user during use as needed. This application embodiment does not make specific limitations on this.
[0095] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0096] like Figure 4 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0097] The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build applications. The display interface can consist of one or more views.
[0098] The system service layer can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0099] In some embodiments, the system service layer of the electronic device 100 may further include a floor identification module, which is used to obtain first data corresponding to the first entrance and second data corresponding to the first entrance, and to obtain the target floor where the electronic device is located when it moves or stays in the building based on the first data and the second data.
[0100] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0101] based on Figure 4 The electronic device shown implements the building floor identification method in this application embodiment, which can reduce the number of matching times for reference floors corresponding to other entrances, narrow the matching range, and improve the efficiency and accuracy of floor identification.
[0102] In some embodiments, the structure of the electronic device 100 may also be as follows: Figure 5 As shown, the electronic device 100 includes a reference floor data acquisition module, a barometric pressure to height conversion module, and a target floor identification module. The reference floor data acquisition module is used to obtain the current position of the electronic device through positioning software, identify buildings and building entrances based on the current position, and obtain the entrance of the building closest to the current position of the electronic device. The reference floor height data corresponding to the entrance can be obtained through map data in map software. The reference floor height data is the height data of each reference floor that can be reached after entering from the entrance. The barometric pressure to height conversion module is used to obtain the barometric pressure at each collection time point during the movement or stay of the electronic device in the building from the barometric pressure sensor, and convert the barometric pressure at each collection time point into height to obtain the original height data that changes over time. The target floor identification module is used to compare the original height data that changes over time with the height data of each reference floor that can be reached from the entrance to determine the floor (target floor) where the electronic device is moving or staying in the building.
[0103] based on Figure 5 The electronic device shown implements the building floor identification method in this application embodiment. It can obtain the target floor where the electronic device is located based on the reference floor corresponding to the entrance, reducing the number of matching times with the reference floors corresponding to other entrances, narrowing the matching range, and improving the efficiency and accuracy of identifying the target floor of the electronic device.
[0104] The aforementioned electronic devices can be terminal devices such as mobile phones, tablets, wearable devices (such as smartwatches, smart bracelets, etc.), and in-vehicle systems (such as in-vehicle computers). Among them, mobile phones can be foldable screen phones or non-foldable screen phones.
[0105] The following describes the building floor identification method provided in this application embodiment, using a mobile phone as an example, in the application scenario where a user drives a vehicle to a building for parking.
[0106] See Figure 6 As shown, the above-mentioned building floor identification method may include the following steps S601-S603.
[0107] S601, The mobile phone obtains the first data corresponding to the first entry point.
[0108] The first entrance is the entrance through which a mobile phone enters the building from at least one of the building's entrances.
[0109] For example, a building may be a shopping mall, residential building, or office building with underground or above-ground parking. The building may have multiple entrances, and users can enter the building from different entrances. For example, the building may have entrance A, entrance B, and entrance C. The user's vehicle enters the building from entrance A, which is the first entrance.
[0110] The first data includes at least one reference floor corresponding to the first entrance in the building and the height of each reference floor; the reference floor is used for the mobile phone to move or stay in the building, and the reference floor includes a floor or an intermediate floor between floors.
[0111] For example, the intermediate layer can be a flat layer, a mezzanine layer, or a sloping layer, such as... Figure 7 As shown in (a), floor 1 can be understood as an intermediate floor formed by the entire planar area between two adjacent floors 1 and floor 2, as follows. Figure 7 As shown in (b), mezzanine 1 can be understood as an intermediate layer consisting of a partial planar area between two adjacent floors 1 and 2. It is evident that the reference layer includes not only floors but also intermediate layers between floors, increasing the variety of reference layers and expanding the types of target layers identified, effectively increasing the completeness and accuracy of the matching.
[0112] For example, a building can have multiple entrances, such as Figure 8 As shown, each entrance has a corresponding driving lane. Entrance 1 has no ramp in its driving lane, entrance 2 has ramp 1, and entrance 3 has ramp 2. Vehicles can enter the underground parking garage from any entrance. The underground parking garage has multiple levels (floors or intermediate levels) at different heights for users to pass through or stop at. Each entrance has at least one accessible level. The levels reached through each entrance can be the same or different. Figure 9As shown, entrance A leads to floor B1 and floor B3, and entrance B leads to floor B2 (intermediate floor) and floor B3. Floor B2 is an intermediate floor between floor B1 and floor B3.
[0113] In some embodiments, the first entrance can be determined based on the phone's navigation information or cellular information. When determining the first entrance based on navigation information, the phone can use a Global Navigation Satellite System (GNSS) or inertial navigation positioning to identify the building and its first entrance. When the phone does not have GNSS or inertial navigation positioning enabled (the phone may be in low-power mode, such as when the screen is off), the phone can determine the first entrance based on cellular information. For example, the phone can use cellular network or 5G synchronization signal block (SSB) information to locate and identify the building and its first entrance. The phone can also identify the building and its first entrance through other sensors or by using all compatible hardware or external devices that can distinguish the entrance. Therefore, the phone can obtain the first entrance in multiple ways, improving its adaptability to different scenarios.
[0114] In some embodiments, when the mobile phone obtains the first data corresponding to the first entrance, firstly, the mobile phone obtains the terrain data corresponding to the first entrance in the map data of the building; then, the mobile phone obtains at least one reference layer corresponding to the first entrance and the height of each reference layer in the at least one reference layer based on the terrain data corresponding to the first entrance; finally, the mobile phone obtains the first data corresponding to the first entrance based on at least one reference layer corresponding to the first entrance and the height of each reference layer in the at least one reference layer.
[0115] The map data includes terrain data corresponding to at least one entrance; the terrain data includes at least one reference layer corresponding to the entrance and the height of each reference layer corresponding to the entrance.
[0116] For example, map data can be obtained from mobile navigation software or crowdsourced map databases provided by map software, or from other databases. Crowdsourced map databases are map data stored in the cloud, collected, organized, updated, and maintained by a large number of users or volunteers on the Internet. In a crowdsourced map database, users can collect geographical location information, take photos, and mark locations using mobile devices (such as mobile phones, tablets, etc.) and upload this data to the cloud for storage, so that all users can share this data and form a huge map database. Map data includes feature data for identifying buildings, feature data for identifying building entrances, and feature data of reference layers corresponding to each entrance. Feature data can be obtained through sensors such as barometric pressure sensors, accelerometers, and gyroscopes. The feature data of the reference layers corresponding to each entrance can be directly obtained reference layer feature data, or it can be identified through feature data including ramp feature data, ramp length feature data, geomagnetic feature data, wireless network feature data, or other wireless signal feature data, thereby obtaining the terrain data corresponding to each entrance of the building. The terrain data includes at least one reference layer corresponding to the entrance and the height of each reference layer.
[0117] For example, the terrain data may also include at least one of the following: data on the corresponding reference layer not being open for a preset time or a temporary time, data on full parking spaces, location data of vacant parking spaces, and user habit data, which can further improve the identification efficiency and accuracy of the floor or intermediate layer where the mobile phone is located.
[0118] For example, a mobile phone can store data such as the building, entrance, and floor where the parking location is located each time the user parks to generate user parking habit data. When the user parks next time, the user can prioritize the floor or intermediate floor where the parking location is located based on the habit data, thereby improving the efficiency and accuracy of identifying the floor or intermediate floor where the parking location is located.
[0119] For example, when a mobile phone has GNSS or inertial navigation positioning function enabled, the mobile phone can obtain its location through GNSS or inertial navigation positioning. When the mobile phone is close to a specific building or a specific entrance, it can obtain the feature data of the specific building or entrance from the map data. Based on the feature data and the current location of the mobile phone, it can determine the first entrance of the building to be entered, obtain all reference layers that can be reached from the first entrance and the height of each reference layer from the map data, and construct the first data corresponding to the first entrance.
[0120] For example, when the mobile phone does not have GNSS or inertial navigation positioning enabled, it must have communication capabilities. The phone can obtain the currently connected base station information, including the cellular network identifier (Cell ID), by communicating with the cellular network. Furthermore, the phone must have a pre-installed database of cellular information (e.g., a list of Cell IDs) or the ability to communicate and interact with the cloud. The crowdsourced map database can directly contain a database with cellular information. When the phone approaches a specific building or entrance, if the currently registered cellular information matches the database containing cellular information, the feature data of the specific building or entrance can be obtained from the crowdsourced map database. Based on the feature data and the phone's current location, the first entrance to the building is determined. All reference layers accessible from the first entrance and the height of each reference layer are obtained from the map data, constructing the first data corresponding to the first entrance.
[0121] For example, the mobile phone can store the first data corresponding to the first entry point, which can be stored in the phone's memory. When the first entry point is entry point B, the first data corresponding to entry point B stored in the phone is as follows: Figure 10 As shown, the reference floors corresponding to entrance B are entrance, floor B1, level 1, level 2, floor B2, and the heights of entrance H0, B1 H1, level 1 H2, level 2 H3, and B2 H4.
[0122] As can be seen, the mobile phone has added the recognition of the first entrance of the building. It can identify the floor or intermediate floor where the mobile phone is located by the reference floor that can be reached by the first entrance. Matching and comparison are only performed on the reference floor that needs to be judged for the first entrance, which can reduce the recognition time. Even when the height difference between two floors, such as B1 and B2, is small, it can still correctly identify the floor or intermediate floor where the mobile phone is located, thus improving the recognition accuracy.
[0123] S602, The mobile phone obtains the second data corresponding to the first entry point.
[0124] The second set of data consists of the height data of a mobile phone as it enters the building from the first entrance and moves or stays in the building over time.
[0125] For example, the second data can be represented as a curve with height varying over time, as a list with height varying over time, or as a set of data with height varying over time.
[0126] For example, the mobile phone can acquire the second data while it is stably placed in a fixed position or in any posture (e.g., placed in a pocket or in any position in a car).
[0127] In some embodiments, when a mobile phone obtains the second data corresponding to the first entrance, the mobile phone first obtains the first air pressure corresponding to the first entrance, then obtains the second air pressure corresponding to the mobile phone moving or staying in the building, and finally obtains the second data corresponding to the first entrance based on the first air pressure and the second air pressure.
[0128] For example, the mobile phone can obtain the first air pressure at the first entrance and the second air pressure corresponding to movement or stillness through a barometric pressure sensor. Alternatively, when the mobile phone enters the building from the first entrance and moves or stays in the building, it can obtain the collected air pressure from the barometric pressure sensor at each collection time point, calculate the air pressure to height conversion, and perform real-time correction of air pressure and height. For example, the air pressure to height conversion can be calculated using the following formula:
[0129]
[0130] Where P0 is the ground air pressure, P is the air pressure collected by the air pressure sensor, P is the air pressure collected at the time of collection, and h is the altitude of the air pressure collected at the time of collection.
[0131] In some embodiments, the barometric pressure sensor of a mobile phone is susceptible to noise from environmental factors (such as temperature and wind speed) or vibration. Therefore, the influence of environmental factors can be reduced through filtering and smoothing processes to improve the accuracy of obtaining barometric pressure.
[0132] In other embodiments, even if the air pressure collected by the barometer remains stable over a short period, it may drift over time. If only the difference between the current air pressure and the air pressure at the entrance is considered, the phone may misidentify the floor or intermediate floor it is on. Therefore, the phone needs to perform altitude correction to address this drift. During altitude correction, the phone can use the air pressure changes collected by the barometer to determine each slope point after entering the parking garage (the turning point where the air pressure changes from relatively stable to significantly different, which can be understood as the location of entering the next intermediate floor or floor). Since the phone is on an intermediate floor... Alternatively, the air pressure changes are relatively stable on different floors, thus effectively identifying intermediate or higher floors. By acquiring all the ramps the user passes through after entering the first entrance and parking, the phone can obtain the floor or intermediate floor it passes through. Based on the phone's movement or stop on each floor (or intermediate floor), the phone can obtain the average height between each floor based on the air pressure collected at each collection point, and can also provide height compensation. The stop can be a short stop during parking or the final stop. When parking, the air pressure at the parking location is acquired and the height is converted to obtain the height at the parking location.
[0133] As can be seen, the mobile phone converts air pressure into altitude to obtain the second data, which is then matched with the height of the reference layer in the first data to identify the floor or intermediate floor where the mobile phone is located, thereby further improving the accuracy of identifying the floor or intermediate floor where the mobile phone is located.
[0134] S603: The mobile phone obtains the target floor where it is when it moves or stays in the building based on the first data and the second data.
[0135] The target layer is any one of at least one reference layer corresponding to the first entry point.
[0136] For example, the mobile phone can obtain the target layer where the mobile phone is located in real time, or it can obtain the target layer where the mobile phone is located at preset time intervals. The stop can be a short stop or the final parking. The mobile phone can display the obtained target layer (including the target layer where the parking position is located), or it can only display the target layer where the final parking position is located.
[0137] In some embodiments, when a mobile phone obtains the target floor where it is moving or staying in a building based on the first data and the second data, firstly, the mobile phone converts the second data based on the first data to obtain the third data, and then the mobile phone obtains the target floor where it is moving or staying in the building based on the second data and the third data.
[0138] For example, a mobile phone equipped with a barometric pressure sensor collects air pressure data at the first entrance and as the phone moves or stays within the building. This data is then converted into height data to obtain the height changes. The air pressure collected on each floor traversed from the first entrance to the parking location is sequentially converted into height data to obtain the height of each converted layer. Each height is then matched with the heights of reference layers in the first data set to preliminarily determine the sequentially traversed layers (including the final parking layer). Furthermore, the time-varying height data set (second data) can be matched with the heights of the reference layers corresponding to the first entrance (first data) to obtain third data, thereby determining the target layer where the phone was located while moving or staying within the building.
[0139] For example, such as Figure 11As shown in (a), with the first entrance as the base layer height, the first data is represented by a thicker polyline, the second data by a curve, and the third data by a thinner polyline. Based on the height data that changes over time in the first data, the height data that changes over time in the second data is matched in segments (matched in time segments). At least one layer that a mobile phone may pass through in sequence is determined in the second data (the area with a gentle height change in the second data, i.e. the area marked by the dashed rectangle in the curve of the second data), thereby converting the second data into the third data.
[0140] As can be seen, the mobile phone converts the first data into the second data to obtain the layers that the mobile phone may pass through. Based on the layers that may pass through, the target layer where the mobile phone is moving or staying in the building can be obtained, which can further improve the accuracy of target layer identification.
[0141] In some embodiments, the mobile phone obtains the similarity between the second data and the third data based on the second data and the third data, and then obtains the target layer where the mobile phone is located when it moves or stays in the building based on the similarity.
[0142] For example, similarity is obtained through a preset similarity algorithm. For instance, the preset similarity algorithm can be any one of the following algorithms: Euclidean distance, dynamic time warping (DTW), cosine similarity, etc.
[0143] For example, the similarity comparison between the second and third data is as follows: Figure 11 As shown in (b), the solid line represents the second data and the dashed line represents the third data. By comparing the similarity between the second data and the third data, the target layer where the mobile phone moves or stays in the building can be obtained.
[0144] In some embodiments, the third data includes multiple subsets of height data corresponding to different time periods. The heights in each subset of height data corresponding to a given time period are equal, while the heights in subsets of height data corresponding to different time periods are unequal. The mobile phone can compare the similarity of the heights in the second data corresponding to each time period with the heights in the third data to obtain the similarity score for that time period. Then, based on the similarity scores for each time period, the mobile phone obtains the similarity score between the second data and the third data. This is to further improve the accuracy of the third data used in subsequent target layer identification processes through similarity analysis.
[0145] In some embodiments, the mobile phone can obtain the similarity between the second data and the third data corresponding to each time period. If the similarity between the second data and the third data corresponding to each time period is greater than or equal to a preset similarity, the target layer where the mobile phone is moving or staying in the building can be obtained. Alternatively, the mobile phone can also obtain the average similarity of all time periods in the third data based on the similarity between the second data and the third data corresponding to each time period. If the average similarity is greater than or equal to a preset similarity, the target layer where the mobile phone is moving or staying in the building can be obtained.
[0146] It is evident that mobile phones can determine the target layer in a building when they move or stay within it by using the similarity scores corresponding to each time period, which can further improve the accuracy of target layer identification.
[0147] In some embodiments, when the similarity is greater than or equal to a preset similarity, the mobile phone can obtain the target layer where the mobile phone is moving or staying in the building; when the similarity is less than the preset similarity, the mobile phone can correct the third data and obtain the target layer where the mobile phone is moving or staying in the building based on the corrected third data.
[0148] For example, when the similarity is greater than or equal to a preset similarity, the mobile phone can determine the elevation difference between the first entry point and the current location of the mobile phone based on the third data. For instance, if the height corresponding to the first entry point (first time period) in the third data is 0, the mobile phone can directly obtain the elevation difference between the first entry point and the current location of the mobile phone through the height corresponding to the last time period in the third data. In the correspondence between the reference layer and the height in the first data, the reference layer corresponding to the elevation difference is determined as the target layer where the mobile phone is currently located, so that the mobile phone can display the target layer where the mobile phone is moving or staying in real time.
[0149] For example, when the similarity is less than a preset similarity, the mobile phone can correct the third data. The mobile phone can obtain a preset step size and correct the third data according to the preset step size so that the similarity between the corrected third data and the second data is greater than or equal to the preset similarity. This can further improve the accuracy of the third data, thereby improving the accuracy of target layer recognition.
[0150] The preset step size is used to adjust the corresponding height in the third data.
[0151] For example, if the preset step size is -1m, the height in the third data can be reduced by 1m before being compared with the second data again to further improve the success rate of identifying the target layer.
[0152] It is evident that mobile phones can correct the third data, making it closer to the second data, thereby improving the success rate of identifying the target layer.
[0153] In some embodiments, the second data includes at least one subset of height data with a height fluctuation range less than a preset threshold.
[0154] For example, based on the formula for converting air pressure to altitude, converting air pressure to altitude yields a set of altitude data that varies over time. The second data includes at least one subset of altitude data whose altitude fluctuation range is less than a preset threshold. This set of altitude data that varies over time can be represented by a curve, and the second data can be represented by a region in the curve where the air pressure / altitude change is relatively gentle (e.g.,...). Figure 11 As shown in (a) of the curve, the area within the dashed rectangle represents the region with relatively gentle height changes. Based on the first data, the heights in the subset of height data with height fluctuations less than a preset threshold are converted into the heights of the corresponding reference layers in the first data, thus obtaining the third data. It can be seen that the phone reduces the conversion process for heights with large height fluctuations, which can further improve the speed of obtaining the third data. Then, the phone performs similarity matching between the second and third data, for example, using DTW for sequence similarity matching. If the similarity is less than or equal to a preset similarity, the third data cannot be used and needs to be corrected until the similarity is greater than or equal to the preset similarity. Only then can the third data be used to obtain the target layer where the phone is located, thus further improving the accuracy of the matching.
[0155] The steps S601-S603 described above implement the building floor identification method in this application embodiment. By obtaining the first data and the second data corresponding to the first entrance, the target floor where the mobile phone is moving or staying can be obtained. This reduces the number of matching times with the reference floors corresponding to other entrances, narrows the matching range, improves the efficiency and accuracy of identifying the target floor where the mobile phone is located, and enhances the user experience.
[0156] For example, the process of the building floor identification method provided in this application embodiment can be as follows: Figure 12As shown, when navigation is enabled on the phone, the phone can use GNSS navigation information to obtain its current location. The phone retrieves map data near the current location from a crowdsourced map database. By analyzing the feature data of the entrance to the nearest building in the map data, it identifies the first entrance, obtains the corresponding first data, and uses a barometric pressure sensor to obtain the air pressure at the first entrance for altitude calculation. Altitude correction is performed along the route from the first entrance to the parking location to obtain the final parking location's altitude. The phone can calculate the altitude difference based on the first data, the altitude at the first entrance, and the parking location's altitude to identify the target floor where the parking location is located. Alternatively, the phone can obtain the parking location's altitude based on the first data, the altitude at the first entrance, and the altitude of each floor traversed, thus determining the target floor. After leaving the vehicle, the phone can also use inertial navigation to recursively determine the parking location or use wireless network scanning to provide the parking location. Figure 13 As shown, the mobile phone uses GNSS navigation to obtain the air pressure at the first entrance, converts the air pressure at the first entrance into the height at the first entrance, obtains the air pressure at the parking location, converts the air pressure at the parking location into the height at the parking location, obtains the height difference between the height at the first entrance and the height at the parking location, and converts the height difference into the corresponding reference layer B4 based on the height of the reference layer corresponding to the first entrance obtained by GNSS. This allows us to obtain the target layer where the parking location is located (for example, if the predicted target layer is -4, the target layer where the parking location is located is the corresponding layer B4).
[0157] For example, the process of the building floor identification method provided in this application embodiment can also be as follows: Figure 14 As shown, when navigation is not enabled on the phone, the phone can use cellular information to obtain its current location, retrieve cellular information of building entrances near the current location from the cellular information database, search for the cellular information of the entrance closest to the phone's current location, determine the first entrance, obtain the first data corresponding to the first entrance, and use a barometric pressure sensor to obtain the air pressure at the first entrance to calculate the height of the first entrance. Height correction is performed on the route from the first entrance to the parking position to obtain the final height of the parking position. The phone can calculate the height difference based on the first data (height difference between different reference floors corresponding to the first entrance provided by cellular information), the height of the first entrance, and the height of the parking position to obtain the target floor where the parking position is located. Alternatively, the phone can obtain the height of the parking position based on the first data, the height of the first entrance, and the height of each reference floor passed, thereby obtaining the target floor where the parking position is located. The phone can also estimate the parking position after the phone leaves the car / enters the elevator / escalator by combining wireless network scanning or reverse walking navigation. Figure 15As shown, the mobile phone determines the first entrance (the entrance closest to the building) as entrance C corresponding to cellular information identifier C by acquiring cellular information identifier A, cellular information identifier B, and cellular information identifier C. It obtains the air pressure at entrance C and performs altitude conversion to obtain the height of entrance C. It also obtains the air pressure at the parking location and performs altitude conversion to obtain the height of the parking location. It obtains the height difference between the height of the first entrance and the height of the parking location. Based on the height of the reference layer corresponding to the first entrance obtained from the cellular information, it converts this height difference into the corresponding reference layer B4, thus obtaining the target layer where the parking location is located (for example, the predicted target layer is layer B4).
[0158] As can be seen, the building floor identification method in this application embodiment has different reference floors matched by different entrances when the floors or intermediate floors passed through or reached by different entrances are different. By identifying the first entrance to the building, the reference floors that can be passed through or reached by the first entrance are obtained. The height of the obtained mobile phone is compared with the height of the reference floor corresponding to the first entrance to obtain the floor or intermediate floor where the parking position is located. Since it will not match reference floors that cannot be passed through or reached, it can effectively increase the accuracy and stability of matching.
[0159] It is understood that, in order to achieve the above functions, the aforementioned electronic device includes hardware and / or software modules corresponding to perform each function. Based on the algorithmic steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0160] This application embodiment can divide the electronic device into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0161] This application also provides a building floor identification device, such as... Figure 16As shown, the building floor identification device includes a first acquisition module 1601, a second acquisition module 1602, and an identification module 1603. The first acquisition module 1601 is used to acquire first data corresponding to a first entrance; for example, by executing the relevant steps of the aforementioned S601; wherein, the first entrance is the entrance through which a mobile phone enters the building from at least one entrance corresponding to the building; the first data includes at least one reference floor corresponding to the first entrance in the building and the height of each reference floor; the reference floor is used for the electronic device to move or stay in the building, and the reference floor includes a floor or an intermediate floor between floors; the second acquisition module 1602 is used to acquire second data corresponding to the first entrance; for example, by executing the relevant steps of the aforementioned S602; wherein, the second data is a set of height data that changes over time as the mobile phone enters the building from the first entrance and moves or stays in the building; the identification module 1603 is used to acquire the reference floor where the mobile phone is when it moves or stays in the building based on the first data and the second data; for example, by executing the relevant steps of the aforementioned S603.
[0162] like Figure 17 As shown, a complete building floor identification device is provided. The first acquisition module 1601 is further used to acquire the current location of the mobile phone from the mobile phone's positioning software, acquire map data near the current location from the mobile phone's map software, identify buildings based on the current location and map data, identify the entrance of the building based on the identified buildings, acquire the first entrance, and then acquire the first data corresponding to the first entrance based on the terrain data corresponding to the first entrance in the map data. The second acquisition module 1602 is further used to acquire the air pressure from the first entrance of the building to the current location of the mobile phone from the mobile phone's barometric pressure sensor, convert the air pressure from the first entrance to the current location into height, and acquire the second data. The identification module 1603 may include a segmented matching unit 16031 and an overall similarity evaluation unit 16032. The segmented matching unit 16031 is used to acquire the height data of at least one area with a gradual height change in the second data, and determine the floors that the mobile phone may pass through or reach in sequence based on the height data in the area with a gradual height change and the first data, thereby acquiring the third data. This can further narrow down the identification range, reduce unnecessary processing steps, and improve identification efficiency. The overall similarity evaluation unit 16032 is used to receive second data and third data, perform similarity comparison based on the second data and third data, obtain the similarity between the second data and third data, and correct the third data by a preset step size if the similarity is less than the preset similarity. The similarity comparison is then performed again with the second data based on the corrected third data. The preset step size is used to adjust the corresponding height in the third data, which can further improve the accuracy of recognition. If the similarity is greater than or equal to the preset similarity, the target layer where the mobile phone moves or stays in the building is obtained through the third data.
[0163] This application also provides an electronic device, such as... Figure 18 As shown, the electronic device may include one or more processors 1801, memory 1802, and communication interfaces 1803.
[0164] The memory 1802, communication interface 1803, and processor 1801 are coupled together. For example, the memory 1802, communication interface 1803, and processor 1801 can be coupled together via bus 1804.
[0165] The communication interface 1803 is used for data transmission with other devices. The memory 1802 stores computer program code. The computer program code includes computer instructions, which, when executed by the processor 1801, cause the electronic device to perform the building floor identification method described in this embodiment.
[0166] The processor 1801 may be a processor or controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. The processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0167] The bus 1804 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The aforementioned bus 1804 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 18 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0168] This application also provides a computer-readable storage medium storing computer program code. When the processor executes the computer program code, the electronic device executes the relevant method steps in the above method embodiments.
[0169] The electronic devices and computer storage media provided in this application are used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0170] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0171] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0172] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0173] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0174] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, in essence, or the part that contributes, or all or part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0175] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for identifying building floors, characterized in that, Applied to electronic devices, including: Obtain first data corresponding to the first entrance; wherein, the first entrance is the entrance through which the electronic device enters the building from at least one entrance corresponding to the building; the first data includes at least one reference layer corresponding to the first entrance in the building and the height of each reference layer; the reference layer is used for the electronic device to move or stay in the building, and the reference layer includes a floor or an intermediate layer between floors; Obtain the second data corresponding to the first entrance; wherein, the second data is a set of height data that changes over time as the electronic device enters the building from the first entrance and moves or stays in the building; Based on the first data and the second data, the target layer where the electronic device is located when it moves or stays in the building is obtained; wherein, the target layer is any one of the at least one reference layer corresponding to the first entrance.
2. The method according to claim 1, characterized in that, The step of obtaining the target floor where the electronic device is located when it moves or stays in the building based on the first data and the second data includes: Based on the first data, the second data is transformed to obtain the third data; Based on the second data and the third data, the target floor where the electronic device is located when it moves or stays in the building is obtained.
3. The method according to claim 2, characterized in that, The step of obtaining the target floor where the electronic device is located when it moves or stays in the building based on the second data and the third data includes: Based on the second data and the third data, obtain the similarity between the second data and the third data; Based on the similarity, the target layer where the electronic device was located when it moved or stayed in the building is obtained.
4. The method according to claim 3, characterized in that, The step of obtaining the target layer where the electronic device is located when it moves or stays in the building based on the similarity includes: If the similarity is greater than or equal to a preset similarity, the target layer where the electronic device is located when it moves or stays in the building is obtained.
5. The method according to claim 3 or 4, characterized in that, The step of obtaining the target layer where the electronic device is located when it moves or stays in the building based on the similarity includes: If the similarity is less than a preset similarity, the third data is corrected; Based on the corrected third data, the target floor where the electronic device was located when it moved or stayed in the building is obtained.
6. The method according to any one of claims 1-5, characterized in that, The step of obtaining the second data corresponding to the first entry point includes: Obtain the first air pressure corresponding to the first inlet of the electronic device; The second air pressure corresponding to when the electronic device moves or stays in the building is obtained; Based on the first air pressure and the second air pressure, obtain the second data corresponding to the first inlet.
7. The method according to any one of claims 1-6, characterized in that, The step of obtaining the first data corresponding to the first entry point includes: Obtain the terrain data corresponding to the first entrance from the map data of the building; wherein, the map data includes terrain data corresponding to at least one entrance; the terrain data includes at least one reference layer corresponding to the entrance and the height of each reference layer corresponding to the entrance; Based on the terrain data corresponding to the first entrance, obtain at least one reference layer corresponding to the first entrance and the height of each reference layer in the at least one reference layer; First data corresponding to the first entry is obtained based on at least one reference layer corresponding to the first entry and the height of each of the at least one reference layer.
8. The method according to any one of claims 1-7, characterized in that, The second data includes at least one subset of height data with a height fluctuation range less than a preset threshold.
9. The method according to any one of claims 1-8, characterized in that, The first entry point is determined based on the navigation information or cellular information of the electronic device.
10. The method according to any one of claims 3-5, characterized in that, The third data includes multiple subsets of height data corresponding to different time periods. The heights in each subset of height data corresponding to a different time period are equal, while the heights in the subsets of height data corresponding to different time periods are not equal. The step of obtaining the similarity between the second data and the third data includes: For each time period in the third data, the similarity between the height of the second data corresponding to the time period and the height of the third data is compared to obtain the similarity of the time period. Based on the similarity corresponding to each time period, the similarity between the second data and the third data is obtained.
11. The method according to claim 5, characterized in that, The correction of the third data includes: Obtain a preset step size; wherein the preset step size is used to adjust the corresponding height in the third data; The third data is corrected according to the preset step size, so that the similarity between the corrected third data and the second data is greater than or equal to the preset similarity.
12. A building floor identification device, characterized in that, Applied to electronic devices, including: A first acquisition module is used to acquire first data corresponding to the first entrance; wherein, the first entrance is the entrance through which the electronic device enters the building from at least one entrance corresponding to the building; the first data includes at least one reference layer corresponding to the first entrance in the building and the height of each reference layer; the reference layer is used for the electronic device to move or stay in the building, and the reference layer includes a floor or an intermediate layer between floors; The second acquisition module is used to acquire second data corresponding to the first entrance; wherein, the second data is a set of height data that changes over time as the electronic device enters the building from the first entrance and moves or stays in the building; The identification module is used to obtain the target layer where the electronic device is located when it moves or stays in the building based on the first data and the second data; wherein the target layer is any one of the at least one reference layer corresponding to the first entrance.
13. An electronic device, characterized in that, The device includes a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the building floor identification method as described in any one of claims 1-11.
14. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the building floor identification method as described in any one of claims 1-11.
15. A computer program product, characterized in that, When the computer program product is run on a computer, the computer performs the building floor identification method as described in any one of claims 1-11.