A terminal positioning method and device

By using the terminal's wireless LAN information and the wireless LAN information to be connected to the building, the terminal's location in the building is accurately determined, and the problem of difficulty in accurately positioning indoor positioning requests in the prior art is solved, and more accurate indoor positioning services are achieved.

CN115150935BActive Publication Date: 2025-06-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110348196.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-31
Publication Date
2025-06-24
Estimated Expiration
2041-03-31

AI Technical Summary

Technical Problem

The prior art is difficult to effectively correlate indoor positioning requests and GPS information in indoor positioning, making it difficult to accurately locate positioning requests in buildings.

Method used

By obtaining the wireless LAN information that can be connected in the target positioning request sent by the terminal, the building in the area where the terminal is located is determined, and the wireless LAN information to be connected to the building is obtained. Based on the network identification and feature information of the wireless LAN, the associated building where the terminal is located is determined, and the terminal is accurately positioned through the location information of the building.

Benefits of technology

It realizes that the global positioning system information is provided without relying on historical positioning requests, and improves the user's positioning experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115150935B_ABST
    Figure CN115150935B_ABST
Patent Text Reader

Abstract

The present application discloses a terminal positioning method and device; the present application obtains a target positioning request sent by a terminal, and the target positioning request includes the connectable wireless local area network information of the terminal; determines the buildings within the area where the terminal is located, and obtains the to-be-connected wireless local area network information corresponding to the buildings, where the to-be-connected wireless local area network information includes the network identifier and feature information of the to-be-connected wireless local area network; determines a target building associated with the location of the terminal from the buildings according to the network identifier of the connectable wireless local area network and the network identifier of the to-be-connected wireless local area network corresponding to the building; when it is determined that the terminal is inside the target building according to the feature information of the to-be-connected wireless local area network corresponding to the target building and the feature information of the connectable wireless local area network, determines the target location information of the terminal inside the target building according to the location information corresponding to the to-be-connected wireless local area network of the target building. The present application can provide more accurate indoor positioning information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a terminal positioning method and device. Background Art

[0002] With the development of network technology, users' demand for positioning services is also increasing. Indoor positioning refers to achieving specific position positioning in an indoor environment, such as locating the floor and store where a user is in a shopping mall.

[0003] In current related technologies, network fingerprint positioning is generally used to implement indoor positioning services. The network fingerprint positioning service divides the entire positioning space into grids. For positioning requests with historical GPS (Global Positioning System) information, they can be associated with the corresponding grids according to the GPS position, and then the wifi (a wireless local area network technology) fingerprint information corresponding to each grid is obtained. In the actual positioning process, the wifi feature information in the positioning request is compared with the wifi fingerprint information in different grids to find the most similar grid, and then the GPS position associated with the grid is used as the positioning result of the positioning request.

[0004] Since network fingerprint positioning requires historical positioning requests with GPS information to be associated with grids, but most indoor positioning requests do not carry GPS information, it is difficult to establish an effective association relationship for grids in buildings, which results in difficult positioning of positioning requests in buildings during actual positioning. Summary of the Invention

[0005] Embodiments of this application provide a terminal positioning method and device, which can provide more accurate indoor positioning information.

[0006] Embodiments of this application provide a terminal positioning method, including:

[0007] Obtain a target positioning request sent by a terminal, where the target positioning request includes the connectable wireless local area network information of the terminal, and the connectable wireless local area network information includes the network identifier and feature information of at least one connectable wireless local area network;

[0008] Determine at least one building within the area where the terminal is located, and obtain the connectable wireless local area network information corresponding to the building, where the connectable wireless local area network information includes the network identifier and feature information of at least one connectable wireless local area network;

[0009] Determine a target building associated with the location of the terminal in the building according to the network identifier of the connectable wireless local area network and the network identifier of the connectable wireless local area network corresponding to the building;

[0010] When it is determined that the terminal is inside the target building according to the characteristic information of the wireless local area network to be connected corresponding to the target building and the characteristic information of the connectable wireless local area network, determine the target position information of the terminal inside the target building according to the position information corresponding to the wireless local area network to be connected of the target building.

[0011] Correspondingly, an embodiment of the present application provides a terminal positioning device, including:

[0012] An acquisition unit, configured to acquire a target positioning request sent by a terminal, where the target positioning request includes connectable wireless local area network information of the terminal, and the connectable wireless local area network information includes network identifiers and characteristic information of at least one connectable wireless local area network;

[0013] A first determination unit, configured to determine at least one building within the area range where the terminal is located, and acquire the wireless local area network information to be connected corresponding to the building, where the wireless local area network information to be connected includes network identifiers and characteristic information of at least one wireless local area network to be connected;

[0014] A second determination unit, configured to determine a target building associated with the location of the terminal from the buildings according to the network identifier of the connectable wireless local area network and the network identifier of the wireless local area network to be connected corresponding to the building;

[0015] A third determination unit, configured to, when it is determined that the terminal is inside the target building according to the characteristic information of the wireless local area network to be connected corresponding to the target building and the characteristic information of the connectable wireless local area network, determine the target position information of the terminal inside the target building according to the position information corresponding to the wireless local area network to be connected of the target building.

[0016] Optionally, in some embodiments of the present application, the second determination unit may include a first determination subunit and a second determination subunit, as follows:

[0017] The first determination subunit is configured to determine the number of wireless local area networks that are the same between the terminal and each building according to the network identifier of the connectable wireless local area network and the network identifier of the wireless local area network to be connected corresponding to the building;

[0018] The second determination subunit is configured to determine a target building associated with the location of the terminal from the buildings based on the number.

[0019] Optionally, in some embodiments of the present application, the third determination unit may further include a third determination subunit and a fourth determination subunit, as follows:

[0020] The third determination subunit is configured to determine the location feature information of the terminal according to the feature information of the wireless local area network to be connected corresponding to the target building and the feature information of the connectable wireless local area network;

[0021] The fourth determination subunit is configured to determine whether the terminal is inside the target building based on the location feature information.

[0022] Optionally, in some embodiments of the present application, the third determination subunit may specifically be configured to obtain historical positioning information, where the historical positioning information includes wireless local area network information and positioning points corresponding to historical positioning requests, and the wireless local area network information includes network identifiers of at least one wireless local area network; for each wireless local area network to be connected to the building, based on the positioning points including the historical positioning information of the wireless local area network to be connected and the area information of each building, count the frequency of occurrence of the wireless local area network to be connected in each building; for each wireless local area network to be connected to the building, based on the frequency, obtain the feature information of the wireless local area network to be connected; and determine the location feature information of the terminal according to the feature information of the wireless local area network to be connected corresponding to the target building and the feature information of the connectable wireless local area network.

[0023] Optionally, in some embodiments of the present application, the step of "obtaining the feature information of the wireless local area network to be connected based on the frequency" may include:

[0024] Select the building with the highest frequency of occurrence of the wireless local area network to be connected as the associated building of the wireless local area network to be connected, where the wireless local area network to be connected is the associated wireless local area network of the associated building;

[0025] Based on the frequency of occurrence of the wireless local area network to be connected in its corresponding associated building and the frequency of occurrence of the associated wireless local area network of the building in the building, calculate the importance of the wireless local area network to be connected to the building;

[0026] Based on the frequency of occurrence of the wireless local area network to be connected in its corresponding associated building and the frequency of occurrence of the wireless local area network to be connected in all buildings, calculate the building ratio of the wireless local area network to be connected;

[0027] Based on the importance and the building ratio, determine the feature information of the wireless local area network to be connected.

[0028] Optionally, in some embodiments of the present application, the third determination unit may include a fifth determination subunit and a sixth determination subunit, as follows:

[0029] The fifth determination subunit is configured to determine a common wireless local area network shared by the terminal and the target building according to the network identifier of the wireless local area network to be connected of the target building and the network identifier of the connectable wireless local area network;

[0030] The sixth determination subunit is configured to determine target location information of the terminal in the target building based on the location information of the common wireless local area network.

[0031] Optionally, in some embodiments of the present application, the sixth determination subunit may specifically be configured to determine the weight of the common wireless local area network based on the feature information corresponding to the common wireless local area network in the target positioning request; and based on the weight, perform weighted fusion on the location information of the common wireless local area network to obtain the target location information of the terminal in the target building.

[0032] Optionally, in some embodiments of the present application, the third determination unit may include an acquisition subunit, a calculation subunit, and a seventh determination subunit, as follows:

[0033] The acquisition subunit is configured to acquire historical positioning information, where the historical positioning information includes wireless local area network information and positioning points corresponding to a historical positioning request, and the wireless local area network information includes network identifiers of at least one wireless local area network;

[0034] The calculation subunit is configured to calculate the location information of each wireless local area network to be connected to the target building based on the positioning points of the historical positioning information including the wireless local area network to be connected;

[0035] The seventh determination subunit is configured to determine the target location information of the terminal in the target building based on the location information corresponding to each wireless local area network to be connected to the target building.

[0036] Optionally, in some embodiments of the present application, the third determination subunit may specifically be configured to determine the location feature information of the terminal through a building visit determination model according to the feature information of the wireless local area network to be connected corresponding to the target building and the feature information of the connectable wireless local area network;

[0037] The fourth determination subunit may specifically be configured to determine whether the terminal is inside the target building through a building visit determination model based on the location feature information.

[0038] Optionally, in some embodiments of the present application, the terminal positioning device may further include a training unit; the training unit is configured to train the building visit determination model; specifically as follows:

[0039] The training unit is configured to obtain training data, where the training data includes sample positioning information for training. The sample positioning information includes the wireless local area network information and positioning points corresponding to a sample positioning request. Among them, the sample positioning information with positioning points outside the sample target building is used as negative samples, and the reference probability that the positioning points of the negative samples are inside the sample target building is less than a preset first probability. The sample positioning information with positioning points inside the sample target building is used as positive samples, and the reference probability that the positioning points of the positive samples are inside the sample target building is greater than a preset second probability;

[0040] Based on a preset building visit judgment model, according to the feature information of the wireless local area network in the sample positioning information and the feature information of the wireless local area network corresponding to the sample target building, generate the position feature information corresponding to the sample positioning information;

[0041] Based on the position feature information, predict the actual probability that the positioning point of the sample positioning information is inside the sample target building;

[0042] Based on the reference probability and actual probability corresponding to the positive samples in the sample positioning information, and the reference probability and actual probability corresponding to the negative samples in the sample positioning information, adjust the parameters of the preset building visit judgment model to obtain a building visit judgment model.

[0043] An electronic device provided by an embodiment of the present application includes a processor and a memory. The memory stores multiple instructions, and the processor loads the instructions to execute the steps in the terminal positioning method provided by the embodiment of the present application.

[0044] In addition, an embodiment of the present application further provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the terminal positioning method provided by the embodiment of the present application are implemented.

[0045] The embodiments of the present application provide a terminal positioning method and device, which can obtain a target positioning request sent by a terminal. The target positioning request includes the information of the connectable wireless local area networks (WLANs) of the terminal, and the information of the connectable WLANs includes the network identifiers and characteristic information of at least one connectable WLAN. Determine at least one building within the area where the terminal is located, and obtain the information of the to-be-connected WLANs corresponding to the building. The information of the to-be-connected WLANs includes the network identifiers and characteristic information of at least one to-be-connected WLAN. Determine a target building associated with the location of the terminal from the buildings according to the network identifier of the connectable WLAN and the network identifier of the to-be-connected WLAN corresponding to the building. When it is determined that the terminal is inside the target building according to the characteristic information of the to-be-connected WLAN corresponding to the target building and the characteristic information of the connectable WLAN, determine the target location information of the terminal inside the target building according to the location information corresponding to the to-be-connected WLAN of the target building. The present application does not need to rely on the global positioning system information in the historical positioning request and can provide more accurate indoor positioning information. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative efforts.

[0047] Figure 1a It is a schematic diagram of the scenario of the terminal positioning method provided by the embodiments of the present application;

[0048] Figure 1b It is a flowchart of the terminal positioning method provided by the embodiments of the present application;

[0049] Figure 1c It is an explanatory diagram of the terminal positioning method provided by the embodiments of the present application;

[0050] Figure 1d It is an explanatory diagram of the existing positioning technology;

[0051] Figure 1e It is an explanatory diagram of the terminal positioning method provided by the embodiments of the present application;

[0052] Figure 2a It is another flowchart of the terminal positioning method provided by the embodiments of the present application;

[0053] Figure 2b It is another flowchart of the terminal positioning method provided by the embodiments of the present application;

[0054] Figure 3aIt is a schematic structural diagram of the terminal positioning device provided by an embodiment of the present application;

[0055] Figure 3b It is another schematic structural diagram of the terminal positioning device provided by an embodiment of the present application;

[0056] Figure 3c It is another schematic structural diagram of the terminal positioning device provided by an embodiment of the present application;

[0057] Figure 3d It is another schematic structural diagram of the terminal positioning device provided by an embodiment of the present application;

[0058] Figure 3e It is another schematic structural diagram of the terminal positioning device provided by an embodiment of the present application;

[0059] Figure 3f It is another schematic structural diagram of the terminal positioning device provided by an embodiment of the present application;

[0060] Figure 4 It is a schematic structural diagram of the electronic device provided by an embodiment of the present application. Detailed implementation manners

[0061] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present application.

[0062] An embodiment of the present application provides a terminal positioning method and device. The terminal positioning device may be specifically integrated in an electronic device, and the electronic device may be a device such as a terminal or a server.

[0063] It can be understood that the terminal positioning method in this embodiment can be executed on the terminal, or on the server, or jointly executed by the terminal and the server. The above examples should not be construed as a limitation to the present application.

[0064] As Figure 1a shown, taking the terminal and the server jointly executing the terminal positioning method as an example. The terminal positioning system provided by an embodiment of the present application includes a terminal 10 and a server 11, etc.; the terminal 10 and the server 11 are connected through a network, for example, through a wired or wireless network connection, etc. Among them, the terminal positioning device may be integrated in the server.

[0065] Among them, the server 11 can be used to: obtain a target positioning request sent by a terminal, where the target positioning request includes the connectable wireless local area network information of the terminal, and the connectable wireless local area network information includes the network identifiers and feature information of at least one connectable wireless local area network; determine at least one building within the area where the terminal is located, and obtain the to-be-connected wireless local area network information corresponding to the building, where the to-be-connected wireless local area network information includes the network identifiers and feature information of at least one to-be-connected wireless local area network; determine a target building associated with the location of the terminal from the buildings according to the network identifier of the connectable wireless local area network and the network identifier of the to-be-connected wireless local area network corresponding to the building; when it is determined that the terminal is inside the target building according to the feature information of the to-be-connected wireless local area network corresponding to the target building and the feature information of the connectable wireless local area network, determine the target location information of the terminal inside the target building according to the location information corresponding to the to-be-connected wireless local area network of the target building. Among them, the server 11 can be a single server, or a server cluster or cloud server composed of multiple servers.

[0066] Among them, the terminal 10 can send a target positioning request to the server 11 so that the server 11 can determine the specific location of the terminal based on the connectable wireless local area network information in the target positioning request. The terminal 10 can also receive the target location information sent by the server 11. Among them, the terminal 10 can include a mobile phone, a smart TV, a tablet computer, a laptop computer, or a personal computer (PC, Personal Computer), etc. A client can also be set on the terminal 10, and the client can be an application client or a browser client, etc.

[0067] The steps for the above server 11 to determine the target location information can also be executed by the terminal 10.

[0068] The terminal positioning method provided in the embodiments of the present application relates to machine learning in the field of artificial intelligence. The embodiments of the present application can provide more accurate indoor positioning information.

[0069] Among them, artificial intelligence (AI) uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, including theories, methods, technologies, and application systems that can perceive the environment, acquire knowledge, and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines, enabling machines to have the functions of perception, reasoning, and decision-making. Artificial intelligence technology is an interdisciplinary subject with a wide range of fields, including both hardware-level and software-level technologies. Among them, artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.

[0070] Among them, machine learning (ML) is an interdisciplinary subject that involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and rote learning.

[0071] The following will be described in detail respectively. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments.

[0072] This embodiment will be described from the perspective of a terminal positioning device, which can be specifically integrated in an electronic device, and the electronic device can be a device such as a server or a terminal.

[0073] The terminal positioning method of the embodiments of this application can be applied to various indoor positioning scenarios. For example, through the terminal positioning method provided in this embodiment, the floor and store where the user is located can be located in a shopping mall, providing accurate indoor positioning services.

[0074] As Figure 1b shown, the specific process of this terminal positioning method can be as follows:

[0075] 101. Obtain a target positioning request sent by the terminal, where the target positioning request includes the connectable wireless local area network information of the terminal, and the connectable wireless local area network information includes the network identifier and feature information of at least one connectable wireless local area network.

[0076] Among them, the target positioning request can be an indoor positioning request or an outdoor positioning request.

[0077] Among them, a wireless local area network (WLAN, Wireless Local Area Networks) is a network system that uses wireless communication technology to interconnect computer devices, enabling them to communicate with each other and share resources. The essential feature of a wireless local area network is that it no longer uses communication cables to connect computers to the network, but instead connects wirelessly. Specifically, radio waves or electric and magnetic fields can be used as the medium for data transmission, making the construction of the network and the movement of terminals more flexible. Specifically, the connectable WLAN information can be Wi-Fi. Wi-Fi, also known as "mobile hotspot", is a wireless local area network technology that can connect network devices wirelessly to each other.

[0078] Among them, the connectable WLAN information includes the network identifiers and characteristic information of at least one connectable WLAN. Specifically, the connectable WLAN information includes the network identifiers and characteristic information of at least one Wi-Fi scanned by the terminal. The network identifier of Wi-Fi can be the id (Identity document) of Wi-Fi, such as name, number, etc. The network identifier of Wi-Fi is used to distinguish and identify each Wi-Fi. The characteristic information of the connectable WLAN can include signal strength, mac address, etc. Mac (media access control), that is, the media access control layer. In a local area network, the hardware address is also called the physical address or mac address.

[0079] In a scenario, when a user needs to determine their current specific location, they can use a terminal such as a mobile phone to obtain location information. Specifically, multiple Wi-Fis scanned by the mobile phone can be used to determine the target location information where the user is located. These Wi-Fis are available for the terminal to connect to. For each scanned Wi-Fi, the characteristic information of each Wi-Fi is different. For example, the signal strength of Wi-Fi is different.

[0080] 102. Determine at least one building within the area where the terminal is located, and obtain the connectable WLAN information corresponding to the building. The connectable WLAN information includes the network identifiers and characteristic information of at least one connectable WLAN.

[0081] Specifically, based on the base station signals, GPS (Global Positioning System) information, and connectable WLAN information scanned by the terminal, etc., the terminal can be roughly located to generally determine the area where the terminal is located, and at least one building within this area can be determined.

[0082] For example, at least one building within the range of the area where the terminal is located can be recalled based on the Wi-Fi scanned by the terminal. For instance, the terminal scans a total of 10 connectable Wi-Fi signals. Based on which buildings' Wi-Fi networks these 10 Wi-Fi signals belong to, these buildings are determined as the buildings within the range of the area where the terminal is located. Among them, if a Wi-Fi signal belongs to the Wi-Fi networks of buildings a and b that are to be connected, then buildings a and b are regarded as the buildings within the range of the area where the terminal is located.

[0083] In this embodiment, the Wi-Fi networks to be connected of a building can refer to the Wi-Fi networks that can be connected when in that building, and these Wi-Fi networks can be regarded as the Wi-Fi networks to be connected that belong to that building.

[0084] In one embodiment, the Wi-Fi networks to be connected of a building can be determined based on historical location information. For example, historical location information can be obtained. The historical location information includes the Wi-Fi network information corresponding to the historical location request and the location points. The Wi-Fi network information includes the network identifiers of at least one Wi-Fi network. The Wi-Fi network corresponding to the historical location information where the location point is within the building is taken as the Wi-Fi network to be connected of that building.

[0085] 103. Determine a target building associated with the location of the terminal from the buildings according to the network identifier of the connectable Wi-Fi network and the network identifier of the Wi-Fi network to be connected corresponding to the building.

[0086] Optionally, in this embodiment, the step of "determining a target building associated with the location of the terminal from the buildings according to the network identifier of the connectable Wi-Fi network and the network identifier of the Wi-Fi network to be connected corresponding to the building" may include:

[0087] Determine the number of the same Wi-Fi networks between the terminal and each building according to the network identifier of the connectable Wi-Fi network and the network identifier of the Wi-Fi network to be connected corresponding to the building;

[0088] Based on the number, determine a target building associated with the location of the terminal from the buildings.

[0089] Specifically, the building with the largest number of the same Wi-Fi networks can be taken as the target building associated with the location of the terminal, and this target building can be regarded as the building closest to the location of the terminal.

[0090] In some embodiments, it is also possible to determine the wireless local area networks (WLANs) shared by each building and the terminal based on the connectable WLAN information included in the target location request and the to-be-connected WLAN information corresponding to each building. For each building, based on the number of WLANs shared by the building and the terminal, as well as the signal strengths of these WLANs scanned by the terminal, determine the proportion associated with the location of the terminal for each building. Then, based on this proportion, determine the target building associated with the location of the terminal from these buildings, and this target building can be regarded as the building closest to the location of the terminal.

[0091] 104. When it is determined that the terminal is inside the target building based on the characteristic information of the to-be-connected WLAN corresponding to the target building and the characteristic information of the connectable WLAN, determine the target location information of the terminal inside the target building according to the location information corresponding to the to-be-connected WLAN of the target building.

[0092] In this embodiment, after determining the target building associated with the location of the terminal, first determine whether the terminal is inside the target building. If it is inside the target building, further determine the specific target location information of the terminal inside the target building.

[0093] Optionally, the terminal positioning method may further include:

[0094] Determine the location characteristic information of the terminal according to the characteristic information of the to-be-connected WLAN corresponding to the target building and the characteristic information of the connectable WLAN;

[0095] Based on the location characteristic information, determine whether the terminal is inside the target building.

[0096] Among them, the characteristic information of the to-be-connected WLAN corresponding to the target building is also the fingerprint information of its corresponding to-be-connected WLAN. The location characteristic information of the terminal can be constructed according to the characteristic information of the to-be-connected WLAN corresponding to the target building and the characteristic information of the connectable WLAN.

[0097] Among them, the characteristic information of the WLAN may include building ratio, signal strength, location information, and the importance of the WLAN to the building, etc.

[0098] Among them, the building ratio of the wireless LAN can represent the frequency of the wireless LAN in the building, which can be obtained by counting the historical positioning information. Specifically, the historical positioning information includes the wireless LAN information and positioning points corresponding to the historical positioning request. If the positioning point of a historical positioning request is in a certain building, the wireless LAN corresponding to the historical positioning request is marked as the (to be connected) wireless LAN of the building, and the frequency of the wireless LAN appearing in the building is increased by 1. By analogy, the frequency of each wireless LAN appearing in each building is counted; the ratio of the number of times the wireless LAN appears in the associated building to the number of times the wireless LAN appears in all buildings can be used as the building ratio of the wireless LAN, wherein the associated building is the building with the highest frequency of the wireless LAN, and the wireless LAN is also the associated wireless LAN of the associated building. For example, the building ratio of a certain Wi-Fi is equal to the number of times the Wi-Fi appears in the associated building divided by the number of times the Wi-Fi appears in all buildings.

[0099] In a specific embodiment, the importance of a wireless local area network to a building can be calculated by taking the ratio of the frequency of wireless local area network 1 appearing in its corresponding associated building to the frequency of the associated wireless local area network corresponding to building a appearing in building a as the importance of wireless local area network 1 to building a. The associated building is the building with the highest frequency of the wireless local area network appearing, and the wireless local area network is also the associated wireless local area network of the associated building. For example, the importance of Wi-Fi1 to building a is equal to the number of times Wi-Fi1 appears in its corresponding associated building divided by the number of times the associated Wi-Fi corresponding to building a appears in building a, that is, the importance of Wi-Fi1 to building a is equal to the number of times Wi-Fi1 appears in its corresponding associated building divided by the number of times the Wi-Fi that appears most frequently in building a appears.

[0100] In some embodiments, the public wireless local area network shared by the target building and the terminal can be determined, and then based on the characteristic information of the public wireless local area network, the location characteristic information of the terminal can be constructed. For example, the characteristics of the public wireless local area network in multiple dimensions can be calculated, and a feature vector can be constructed through the characteristics in multiple dimensions. The feature vector is the location characteristic information of the terminal.

[0101] Specifically, the location feature information of the terminal may include:

[0102] 1. The number of public wireless LANs, for example, the number of public wireless LANs n / 30;

[0103] 2. The ratio of the number of public wireless LANs to the number of connectable wireless LANs;

[0104] 3. The number of public wireless local area networks (WLANs) at specific signal strength levels. For example, public WLANs can be divided into four signal strength RSSI level intervals: [-60, +∞), [-70, -60), [-80, -70), (-∞, -80)], and then calculate the number of public WLANs within these four level intervals. Optionally, the number of public WLANs at a specific signal strength level can also be divided by a certain value as the location feature information of the terminal. For example, divide the number of Wi-Fi shared by the target building and the terminal at a specific RSSI level by 30;

[0105] 4. The ratio of the number of public WLANs at a specific signal strength level to the number of connectable WLANs at the corresponding signal strength level;

[0106] 5. The average value of the building ratio of public WLANs;

[0107] 6. The average value of the building ratio of public WLANs at a specific signal strength level;

[0108] 7. The average value of the importance of public WLANs to the target building;

[0109] 8. The maximum value of the importance of public WLANs to the target building;

[0110] 9. The minimum value of the importance of public WLANs to the target building;

[0111] 10. The average value of the importance of public WLANs to the target building at a specific signal strength level;

[0112] 11. The maximum value of the importance of public WLANs to the target building at a specific signal strength level;

[0113] 12. The minimum value of the importance of public WLANs to the target building at a specific signal strength level;

[0114] 13. The difference in signal strength between the WLAN with the maximum signal strength and the WLAN with the minimum signal strength in the connectable WLAN information. For example, it can be the difference between the maximum RSSI and the minimum RSSI in the connectable WLANs;

[0115] 14. The connectable WLANs with signal strength ranking among the top k and belonging to public WLANs are called top k WLANs;

[0116] Divide the number of top 3 WLANs by 3, the number of top 5 WLANs by 5, and the number of top 10 WLANs by 10;

[0117] 15. The average value of the building proportion of the top 3, top 5, and top 10 wireless local area networks;

[0118] 16. The average value of the importance of the top 3, top 5, and top 10 wireless local area networks to the target building;

[0119] 17. The maximum value of the importance of the top 3, top 5, and top 10 wireless local area networks to the target building;

[0120] 18. The minimum value of the importance of the top 3, top 5, and top 10 wireless local area networks to the target building;

[0121] The above are the location feature information of the terminal. It can be understood that the location feature information of the terminal in this embodiment is not limited to the features listed above.

[0122] Among them, the signal strength can be RSSI (Received Signal Strength Indication). RSSI is the indication of the received signal strength, and it is also a positioning technology that measures the distance between the signal point and the receiving point through the strength of the received signal, and then performs positioning calculations according to the corresponding data; it can be applied to the distance measurement between the transmitter and the receiver.

[0123] In this embodiment, a trained building visit judgment model can be used to determine whether the terminal is inside the target building based on the location feature information. The building visit judgment model can be a neural network, such as a residual network (ResNet, Residual Network) and a dense connection convolutional network (DenseNet, Dense Convolutional Network), etc. However, it should be understood that the building visit judgment model in this embodiment is not limited to the several types listed above.

[0124] Optionally, in this embodiment, the step of "determining the location feature information of the terminal according to the feature information of the wireless local area network to be connected corresponding to the target building and the feature information of the connectable wireless local area network" may include:

[0125] Obtain historical positioning information, where the historical positioning information includes the wireless local area network information and the positioning point corresponding to the historical positioning request, and the wireless local area network information includes the network identifiers of at least one wireless local area network;

[0126] For each wireless local area network to be connected to the building, based on the positioning points of the historical positioning information including the wireless local area network to be connected and the area information of each building, count the frequency of occurrence of the wireless local area network to be connected in each building;

[0127] For each wireless local area network (WLAN) to be connected to the building, based on the frequency, obtain the feature information of the WLAN to be connected.

[0128] Based on the feature information of the WLAN to be connected corresponding to the target building and the feature information of the connectable WLANs, determine the location feature information of the terminal.

[0129] Among them, the positioning points in the historical positioning information are the positioning results of historical positioning requests, which can be specifically represented in the form of latitude and longitude coordinates. The area information of the building can specifically be the location coordinates of the building. As Figure 1c shown, it is the identification of the floor information of the building on the map.

[0130] Optionally, in this embodiment, the step of "based on the frequency, obtain the feature information of the WLAN to be connected" may include:

[0131] Select the building with the highest frequency of occurrence of the WLAN to be connected as the associated building of the WLAN to be connected, where the WLAN to be connected is the associated WLAN of the associated building.

[0132] Based on the frequency of occurrence of the WLAN to be connected in its corresponding associated building and the frequency of occurrence of the associated WLAN of the building in the building, calculate the importance of the WLAN to be connected to the building.

[0133] Based on the frequency of occurrence of the WLAN to be connected in its corresponding associated building and the frequency of occurrence of the WLAN to be connected in all buildings, calculate the building ratio of the WLAN to be connected.

[0134] Based on the importance and the building ratio, determine the feature information of the WLAN to be connected.

[0135] Optionally, in this embodiment, the steps of "based on the feature information of the WLAN to be connected corresponding to the target building and the feature information of the connectable WLANs, determine the location feature information of the terminal; based on the location feature information, determine whether the terminal is inside the target building" may include:

[0136] Use a building visit judgment model to determine the location feature information of the terminal based on the feature information of the WLAN to be connected corresponding to the target building and the feature information of the connectable WLANs; based on the location feature information, determine whether the terminal is inside the target building.

[0137] It should be noted that the building arrival judgment model can be trained by multiple pieces of labeled training data. The training data in this embodiment includes sample location information, and the sample location information includes the wireless local area network information corresponding to the sample location request and the location point. Among them, the sample location information with the location point outside the sample target building is used as a negative sample, and the sample location information with the location point inside the sample target building is used as a positive sample. This label indicates whether the location point of the sample location information is inside the sample target building. The building arrival judgment model can specifically be trained by other devices and then provided to the terminal positioning device, or it can also be trained by the terminal positioning device itself.

[0138] If the terminal positioning device trains itself, before the step of "determining the location feature information of the terminal according to the feature information of the wireless local area network to be connected corresponding to the target building and the feature information of the connectable wireless local area network through the building arrival judgment model", the terminal positioning method may further include:

[0139] Obtain training data, where the training data includes sample location information for training. The sample location information includes the wireless local area network information corresponding to the sample location request and the location point. Among them, the sample location information with the location point outside the sample target building is used as a negative sample, and the reference probability that the location point of the negative sample is inside the sample target building is less than a preset first probability. The sample location information with the location point inside the sample target building is used as a positive sample, and the reference probability that the location point of the positive sample is inside the sample target building is greater than a preset second probability;

[0140] Through a preset building arrival judgment model, generate the location feature information corresponding to the sample location information according to the feature information of the wireless local area network in the sample location information and the feature information of the wireless local area network corresponding to the sample target building;

[0141] Based on the location feature information, predict the actual probability that the location point of the sample location information is inside the sample target building;

[0142] Based on the reference probability and actual probability corresponding to the positive samples in the sample location information, and the reference probability and actual probability corresponding to the negative samples in the sample location information, adjust the parameters of the preset building arrival judgment model to obtain a building arrival judgment model.

[0143] Among them, the method for generating the location feature information corresponding to the sample location information can refer to the method for generating the location feature information of the above terminal, which will not be elaborated here.

[0144] Among them, in the training process, the actual probability of the positioning point of the sample positioning information in the sample target building is first calculated, and then the backpropagation algorithm is used to adjust the parameters of the preset building visit judgment model. Based on the reference probability and the actual probability corresponding to the positive samples in the sample positioning information, and the reference probability and the actual probability corresponding to the negative samples in the sample positioning information, the parameters of the preset building visit judgment model are optimized to make the actual probability of the positive samples approach the reference probability of the positive samples, and the actual probability of the negative samples approach the reference probability of the negative samples, so as to obtain a trained building visit judgment model. Specifically, the calculated actual probability of the positive samples can be made higher than the reference probability of the positive samples, and the actual probability of the negative samples can be made lower than the reference probability of the negative samples.

[0145] Among them, the reference probability is also the expected probability. The preset first probability and the preset second probability can be set according to the actual situation, and this embodiment does not limit this. However, it should be noted that the preset first probability is less than the preset second probability.

[0146] Optionally, in some embodiments, if the sample positioning request carries GPS information, the sample positioning information may further include the GPS positioning result at that time. Specifically, the sample positioning information that the positioning point is in the sample target building, includes at least one wireless local area network corresponding to the sample target building with a signal strength greater than the preset value, and does not include GPS information can be used as the positive sample during training, that is, the in-building positioning information; the sample positioning information that the positioning point is 10 meters outside the sample target building and includes GPS positioning can be used as the negative sample during training, that is, the out-of-building positioning information. It can be understood that the selection of positive and negative samples can be set according to the actual situation, and this embodiment does not limit this. For example, it can also be required that only the sample positioning information connected to the wireless local area network corresponding to the sample target building can be used as the positive sample during training.

[0147] Optionally, the feature information of the wireless local area network may further include the ratio feature of the proportion of GPS information carried in the historical positioning information of the wireless local area network, that is, the ratio of the number of historical positioning information containing the wireless local area network and carrying GPS information to the number of historical positioning information containing the wireless local area network.

[0148] In this embodiment, the building visit judgment model is a classification model, which can specifically be any classification model such as xgboost, KNN (k-Nearest Neighbors), logistic regression model (LR, LogisticRegression), SVM (Support Vector Machine), neural network, etc. The model can predict each sample to determine whether it is in the sample target building.

[0149] Among them, XGBoost (eXtreme Gradient Boosting) is the extreme gradient boosting, which is an ensemble machine learning algorithm based on decision trees and uses gradient boosting as the framework.

[0150] In a specific embodiment, the building access judgment model is an XGBoost classification model. The maximum depth of the tree can be set to 6, the minimum leaf node weight can be set to 1, and the learning rate can be set to 0.1. It can be understood that other hyperparameters can also be set according to actual needs and experience. This embodiment does not limit the model selection and training method.

[0151] After determining that the terminal is inside the target building, in this embodiment, the step of "determining the target location information of the terminal inside the target building according to the location information corresponding to the wireless local area network to be connected of the target building" may include:

[0152] Determine the common wireless local area network shared by the terminal and the target building according to the network identifier of the wireless local area network to be connected of the target building and the network identifier of the connectable wireless local area network;

[0153] Based on the location information of the common wireless local area network, determine the target location information of the terminal inside the target building.

[0154] Among them, the arithmetic mean of the location information of all common wireless local area networks can be calculated to obtain the target location information of the terminal inside the target building; or the location information of the common wireless local area network can be weighted and averaged based on the signal strength in the target positioning request to obtain the target location information of the terminal inside the target building.

[0155] Optionally, in this embodiment, the step of "based on the location information of the common wireless local area network, determine the target location information of the terminal inside the target building" may include:

[0156] Determine the weight of the common wireless local area network based on the feature information corresponding to the common wireless local area network in the target positioning request;

[0157] Based on the weight, perform weighted fusion on the location information of the common wireless local area network to obtain the target location information of the terminal inside the target building.

[0158] Among them, the feature information corresponding to the common wireless local area network in the target positioning request may specifically be the signal strength, etc. Based on the magnitude of the signal strength, determine the weight of the common wireless local area network. The greater the signal strength, the greater the weight; conversely, the smaller the signal strength, the smaller the weight.

[0159] Optionally, in this embodiment, the step of "determining the target location information of the terminal in the target building according to the location information corresponding to the wireless local area network to be connected of the target building" may include:

[0160] Obtain historical positioning information, where the historical positioning information includes wireless local area network information and positioning points corresponding to a historical positioning request, and the wireless local area network information includes network identifiers of at least one wireless local area network;

[0161] For each wireless local area network to be connected of the target building, calculate the location information of the wireless local area network to be connected based on the positioning points included in the historical positioning information containing the wireless local area network to be connected;

[0162] Determine the target location information of the terminal in the target building based on the location information corresponding to each wireless local area network to be connected of the target building.

[0163] Among them, the step of "calculating the location information of the wireless local area network to be connected based on the positioning points included in the historical positioning information containing the wireless local area network to be connected" may include:

[0164] Based on the characteristic information of the wireless local area network to be connected in the historical positioning information containing the wireless local area network to be connected, determine the weight of the positioning points included in the historical positioning information containing the wireless local area network to be connected;

[0165] Based on the weight, perform weighted fusion on the positioning points included in each historical positioning information containing the wireless local area network to be connected to obtain the location information of the wireless local area network to be connected.

[0166] Among them, the characteristic information of the wireless local area network to be connected may be signal strength, etc.

[0167] Among them, in some embodiments, the location information of the wireless local area network to be connected may be calculated based on the positioning points included in all historical positioning information that contains the wireless local area network to be connected and is located on the associated building corresponding to the wireless local area network to be connected.

[0168] Among them, in some other embodiments, the average position of all positioning points included in the historical positioning information containing the wireless local area network to be connected may be used as the location information of the wireless local area network to be connected.

[0169] In the current related technologies, positioning can be performed through GPS. However, GPS positioning has very poor quality or even cannot provide location information in case of occlusion. In a general indoor environment within a building, due to the occlusion of the walls, GPS signals cannot be received. At this time, the positioning result of GPS may be on the floor where the user is located, and it is impossible to obtain relatively accurate location information, resulting in low positioning accuracy and poor quality of the positioning points. GPS positioning may only be effective at special locations such as by the window indoors.

[0170] This application does not require manual fingerprint collection. At the same time, it does not rely on GPS information. It can use the wireless local area network information carried in the target positioning request to determine the specific location of the terminal, such as the specific location in which building. This application can provide accurate indoor positioning services and improve the user's positioning experience.

[0171] As Figure 1d shown, it is the indoor positioning effect of the current related technologies; as Figure 1e shown, it is the indoor positioning effect of this application. By comparing Figure 1d and Figure 1e it can be known that the accuracy of the indoor positioning result of the current related technologies is relatively low, mostly located on the floor where the user is located, while this application can provide relatively accurate indoor positioning services.

[0172] As can be seen from the above, this embodiment can obtain the target positioning request sent by the terminal. The target positioning request includes the connectable wireless local area network information of the terminal. The connectable wireless local area network information includes the network identifier and characteristic information of at least one connectable wireless local area network; determine at least one building within the area where the terminal is located, and obtain the to-be-connected wireless local area network information corresponding to the building. The to-be-connected wireless local area network information includes the network identifier and characteristic information of at least one to-be-connected wireless local area network; according to the network identifier of the connectable wireless local area network and the network identifier of the to-be-connected wireless local area network corresponding to the building, determine the target building associated with the location of the terminal from the building; when it is determined that the terminal is inside the target building according to the characteristic information of the to-be-connected wireless local area network corresponding to the target building and the characteristic information of the connectable wireless local area network, determine the target location information of the terminal inside the target building according to the location information corresponding to the to-be-connected wireless local area network of the target building. This application does not need to rely on the global positioning system information in the historical positioning request and can provide more accurate indoor positioning information.

[0173] According to the method described in the previous embodiment, the following will take the terminal positioning device being specifically integrated in the server as an example for further detailed description.

[0174] This application embodiment provides a terminal positioning method, as Figure 2aAs shown in the figure, the specific process of the terminal positioning method can be as follows:

[0175] 201. The server obtains a target positioning request sent by the terminal. The target positioning request includes the connectable wireless local area network information of the terminal, and the connectable wireless local area network information includes the network identifier and feature information of at least one connectable wireless local area network.

[0176] Among them, the connectable wireless local area network information includes the network identifier and feature information of at least one connectable wireless local area network. Specifically, the connectable wireless local area network information includes the network identifier and feature information of at least one Wi-Fi scanned by the terminal. The network identifier of the Wi-Fi can be the id (Identity document) of the Wi-Fi, such as the name, number, etc. The network identifier of the Wi-Fi is used to distinguish and identify each Wi-Fi. The feature information of the connectable wireless local area network can include signal strength, mac address, and so on. Mac (media access control), that is, the media access control layer. In a local area network, the hardware address is also called the physical address or mac address.

[0177] In a scenario, a user needs to determine their current specific location. They can use a terminal such as a mobile phone to obtain location information. Specifically, they can use multiple Wi-Fi scanned by the mobile phone to determine the target location information where the user is located. These Wi-Fi can be connected by the terminal. For each scanned Wi-Fi, the feature information of each Wi-Fi is different. For example, the signal strength of the Wi-Fi is different.

[0178] 202. The server determines at least one building within the area where the terminal is located and obtains the connectable wireless local area network information corresponding to the building. The connectable wireless local area network information includes the network identifier and feature information of at least one connectable wireless local area network.

[0179] Specifically, based on the base station signal, GPS (Global Positioning System) information, and connectable wireless local area network information scanned by the terminal, etc., the terminal can be roughly positioned to generally determine the area where the terminal is located and determine at least one building within this area.

[0180] In this embodiment, the connectable wireless local area network of the building can refer to the wireless local area network that can be connected when in the building. These wireless local area networks can be regarded as the connectable wireless local area networks belonging to the building.

[0181] 203. The server determines a target building associated with the location of the terminal in the building according to the network identifier of the connectable wireless local area network and the network identifier of the connectable wireless local area network corresponding to the building.

[0182] Optionally, in this embodiment, the step of "determining, from the buildings, a target building associated with the location of the terminal according to the network identifier of the wireless local area network that can be connected and the network identifier of the wireless local area network to be connected corresponding to the building" may include:

[0183] Determining the number of the same wireless local area networks of the terminal and each building according to the network identifier of the wireless local area network that can be connected and the network identifier of the wireless local area network to be connected corresponding to the building;

[0184] Based on the number, determining, from the buildings, a target building associated with the location of the terminal.

[0185] 204. The server determines the location feature information of the terminal according to the feature information of the wireless local area network to be connected corresponding to the target building and the feature information of the wireless local area network that can be connected.

[0186] Among them, the feature information of the wireless local area network may include building ratio, signal strength, location information, and the importance of the wireless local area network to the building, etc.

[0187] In some embodiments, a common wireless local area network shared by the target building and the terminal may be determined, and then based on the feature information of the common wireless local area network, the location feature information of the terminal may be constructed. For example, the features in multiple dimensions of the common wireless local area network may be calculated, and a feature vector may be constructed through the features in multiple dimensions, and the feature vector is the location feature information of the terminal.

[0188] Optionally, in this embodiment, the step of "determining the location feature information of the terminal according to the feature information of the wireless local area network to be connected corresponding to the target building and the feature information of the wireless local area network that can be connected" may include:

[0189] Obtaining historical positioning information, where the historical positioning information includes wireless local area network information and positioning points corresponding to a historical positioning request, and the wireless local area network information includes network identifiers of at least one wireless local area network;

[0190] For each wireless local area network to be connected of the building, based on the positioning points including the historical positioning information of the wireless local area network to be connected and the area information of each building, counting the frequency of occurrence of the wireless local area network to be connected in each building;

[0191] For each wireless local area network to be connected of the building, obtaining the feature information of the wireless local area network to be connected based on the frequency;

[0192] Determine the location feature information of the terminal according to the feature information of the wireless local area network to be connected corresponding to the target building and the feature information of the connectable wireless local area network.

[0193] Optionally, in this embodiment, the step of "obtaining the feature information of the wireless local area network to be connected based on the frequency" may include:

[0194] Select the building with the highest frequency of occurrence of the wireless local area network to be connected as the associated building of the wireless local area network to be connected, where the wireless local area network to be connected is the associated wireless local area network of the associated building;

[0195] Calculate the importance of the wireless local area network to be connected to the building based on the frequency of occurrence of the wireless local area network to be connected in its corresponding associated building and the frequency of occurrence of the associated wireless local area network of the building in the building;

[0196] Calculate the building ratio of the wireless local area network to be connected based on the frequency of occurrence of the wireless local area network to be connected in its corresponding associated building and the frequency of occurrence of the wireless local area network to be connected in all buildings;

[0197] Determine the feature information of the wireless local area network to be connected based on the importance and the building ratio.

[0198] 205. The server determines whether the terminal is inside the target building based on the location feature information.

[0199] 206. When the terminal is inside the target building, the server determines the target location information of the terminal inside the target building according to the location information corresponding to the wireless local area network to be connected of the target building.

[0200] After determining that the terminal is inside the target building, in this embodiment, the step of "determining the target location information of the terminal inside the target building according to the location information corresponding to the wireless local area network to be connected of the target building" may include:

[0201] Determine the common wireless local area network shared by the terminal and the target building according to the network identifier of the wireless local area network to be connected of the target building and the network identifier of the connectable wireless local area network;

[0202] Determine the target location information of the terminal inside the target building based on the location information of the common wireless local area network.

[0203] Specifically, such as Figure 2bAs shown in the figure, it is a flowchart of terminal positioning. First, a building visit judgment model can be trained, which can be used to judge whether a user enters a building and which building the user enters; then, the trained building visit judgment model is applied to the terminal positioning service.

[0204] Among them, as Figure 2b shown on the left side, in the training process of the building visit judgment model, historical positioning information and regional information of each building can be obtained. The historical positioning information includes the wireless local area network information and positioning points corresponding to historical positioning requests; according to the positioning points in the historical positioning information and the regional information of each building, the positioning distribution of the historical positioning information in different buildings is determined, and then the in-building positioning information and out-of-building positioning information are obtained from the historical positioning information. The in-building positioning information is used as positive samples, and the out-of-building positioning information is used as negative samples. The building visit judgment model is trained based on the characteristic information of the wireless local area network in the in-building and out-of-building positioning information. For the specific training process, refer to the description of the above embodiments. Among them, the characteristic information of the wireless local area network included in the positioning information can be obtained from the wireless local area network fingerprint library. The wireless local area network fingerprint library stores some statistical characteristics of the wireless local area network corresponding to the building obtained by mining, and these statistical characteristics can be used as the wireless local area network fingerprint of the building.

[0205] Among them, as Figure 2b shown on the right side, in the online positioning process, based on the connectable wireless local area network information included in the target positioning request sent by the terminal and the connectable wireless local area network information of each building in the wireless local area network fingerprint library, the target building associated with the location of the terminal is determined, and then through the trained building visit judgment model, it is determined whether the terminal is inside the target building. If not, other positioning methods (such as GPS positioning) can be used to determine the specific target location information of the terminal; if so, based on the connectable wireless local area network information in the target positioning request, the specific target location information of the terminal inside the target building can be determined.

[0206] Among them, the characteristic information of the wireless local area network in the wireless local area network fingerprint library can be updated regularly. The characteristic information of the wireless local area network is generated according to the wireless local area network information included in the historical positioning information. In this embodiment, every once in a while, the historical positioning information in a specific recent time period is used to generate new characteristic information of the wireless local area network; for example, every 1 week, the latest 1-week positioning log data (i.e., historical positioning information) is used to regenerate a new wireless local area network fingerprint library.

[0207] As can be seen from the above, in this embodiment, the server can obtain a target positioning request sent by the terminal. The target positioning request includes the wireless local area network (WLAN) information that the terminal can connect to. The WLAN information that the terminal can connect to includes the network identifiers and characteristic information of at least one WLAN that the terminal can connect to. Determine at least one building within the area where the terminal is located, and obtain the WLAN information to be connected corresponding to the building. The WLAN information to be connected includes the network identifiers and characteristic information of at least one WLAN to be connected. According to the network identifier of the WLAN that the terminal can connect to and the network identifier of the WLAN to be connected corresponding to the building, determine the target building associated with the location of the terminal from the buildings. According to the characteristic information of the WLAN to be connected corresponding to the target building and the characteristic information of the WLAN that the terminal can connect to, determine the location characteristic information of the terminal. Based on the location characteristic information, determine whether the terminal is inside the target building. When the terminal is inside the target building, the server determines the target location information of the terminal inside the target building according to the location information corresponding to the WLAN to be connected of the target building. This application does not need to rely on the global positioning system information in the historical positioning request and can provide more accurate indoor positioning information.

[0208] To better implement the above method, an embodiment of this application also provides a terminal positioning device, as Figure 3a shown. The terminal positioning device may include an acquisition unit 301, a first determination unit 302, a second determination unit 303, and a third determination unit 304, as follows:

[0209] (1) Acquisition unit 301;

[0210] The acquisition unit 301 is configured to acquire a target positioning request sent by the terminal. The target positioning request includes the WLAN information that the terminal can connect to. The WLAN information that the terminal can connect to includes the network identifiers and characteristic information of at least one WLAN that the terminal can connect to.

[0211] (2) First determination unit 302;

[0212] The first determination unit 302 is configured to determine at least one building within the area where the terminal is located, and acquire the WLAN information to be connected corresponding to the building. The WLAN information to be connected includes the network identifiers and characteristic information of at least one WLAN to be connected.

[0213] (3) Second determination unit 303;

[0214] The second determination unit 303 is configured to determine, according to the network identifier of the WLAN that the terminal can connect to and the network identifier of the WLAN to be connected corresponding to the building, the target building associated with the location of the terminal from the buildings.

[0215] Optionally, in some embodiments of the present application, the second determination unit 303 may include a first determination subunit 3031 and a second determination subunit 3032. Refer to Figure 3b as follows:

[0216] The first determination subunit 3031 is configured to determine the number of wireless local area networks that are the same for the terminal and each building according to the network identifier of the connectable wireless local area network and the network identifier of the to-be-connected wireless local area network corresponding to the building;

[0217] The second determination subunit 3032 is configured to determine a target building associated with the location of the terminal from the buildings based on the quantity.

[0218] (4) The third determination unit 304;

[0219] The third determination unit 304 is configured to determine the target location information of the terminal in the target building according to the location information corresponding to the to-be-connected wireless local area network of the target building when it is determined that the terminal is inside the target building according to the characteristic information of the to-be-connected wireless local area network corresponding to the target building and the characteristic information of the connectable wireless local area network.

[0220] Optionally, in some embodiments of the present application, the third determination unit 304 may further include a third determination subunit 3041 and a fourth determination subunit 3042. Refer to Figure 3c as follows:

[0221] The third determination subunit 3041 is configured to determine the location characteristic information of the terminal according to the characteristic information of the to-be-connected wireless local area network corresponding to the target building and the characteristic information of the connectable wireless local area network;

[0222] The fourth determination subunit 3042 is configured to determine whether the terminal is inside the target building based on the location characteristic information.

[0223] Optionally, in some embodiments of the present application, the third determination subunit 3041 may specifically be configured to obtain historical positioning information, where the historical positioning information includes wireless local area network information and positioning points corresponding to a historical positioning request, and the wireless local area network information includes network identifiers of at least one wireless local area network; for each wireless local area network to be connected to the building, based on the positioning points of the historical positioning information including the wireless local area network to be connected and the area information of each building, count the frequency of occurrence of the wireless local area network to be connected in each building; for each wireless local area network to be connected to the building, based on the frequency, obtain the characteristic information of the wireless local area network to be connected; according to the characteristic information of the wireless local area network to be connected corresponding to the target building and the characteristic information of the connectable wireless local area network, determine the position characteristic information of the terminal.

[0224] Optionally, in some embodiments of the present application, the step of "based on the frequency, obtain the characteristic information of the wireless local area network to be connected" may include:

[0225] Select the building with the highest frequency of occurrence of the wireless local area network to be connected as the associated building of the wireless local area network to be connected, where the wireless local area network to be connected is the associated wireless local area network of the associated building;

[0226] Based on the frequency of occurrence of the wireless local area network to be connected in its corresponding associated building and the frequency of occurrence of the associated wireless local area network of the building in the building, calculate the importance of the wireless local area network to be connected to the building;

[0227] Based on the frequency of occurrence of the wireless local area network to be connected in its corresponding associated building and the frequency of occurrence of the wireless local area network to be connected in all buildings, calculate the building ratio of the wireless local area network to be connected;

[0228] Based on the importance and the building ratio, determine the characteristic information of the wireless local area network to be connected.

[0229] Optionally, in some embodiments of the present application, the third determination unit 304 may include a fifth determination subunit 3043 and a sixth determination subunit 3044, see Figure 3d , as follows:

[0230] The fifth determination subunit 3043 is configured to determine the common wireless local area network shared by the terminal and the target building according to the network identifier of the wireless local area network to be connected to the target building and the network identifier of the connectable wireless local area network;

[0231] The sixth determination subunit 3044 is configured to determine the target position information of the terminal in the target building based on the position information of the common wireless local area network.

[0232] Optionally, in some embodiments of the present application, the sixth determination subunit 3044 may specifically be configured to determine the weight of the public wireless local area network based on the feature information corresponding to the public wireless local area network in the target positioning request; and based on the weight, perform weighted fusion on the location information of the public wireless local area network to obtain the target location information of the terminal within the target building.

[0233] Optionally, in some embodiments of the present application, the third determination unit 304 may include an acquisition subunit 3045, a calculation subunit 3046, and a seventh determination subunit 3047, as shown in Figure 3e , as follows:

[0234] The acquisition subunit 3045 is configured to acquire historical positioning information, where the historical positioning information includes wireless local area network information and positioning points corresponding to a historical positioning request, and the wireless local area network information includes network identifiers of at least one wireless local area network;

[0235] The calculation subunit 3046 is configured to calculate the location information of each to-be-connected wireless local area network of the target building based on the positioning points of the historical positioning information including the to-be-connected wireless local area network;

[0236] The seventh determination subunit 3047 is configured to determine the target location information of the terminal within the target building based on the location information corresponding to each to-be-connected wireless local area network of the target building.

[0237] Optionally, in some embodiments of the present application, the third determination subunit 3041 may specifically be configured to determine the location feature information of the terminal through a building visit determination model according to the feature information of the to-be-connected wireless local area network corresponding to the target building and the feature information of the connectable wireless local area network;

[0238] The fourth determination subunit 3042 may specifically be configured to determine whether the terminal is within the target building through a building visit determination model based on the location feature information.

[0239] Optionally, in some embodiments of the present application, the terminal positioning device may further include a training unit 305; the training unit 305 is configured to train the building visit determination model, as shown in Figure 3f ; specifically as follows:

[0240] The training unit 305 is configured to obtain training data, where the training data includes sample location information for training. The sample location information includes the wireless local area network information and location points corresponding to a sample location request. Among them, the sample location information with the location point outside the sample target building is used as a negative sample, and the reference probability of the location point of the negative sample inside the sample target building is less than a preset first probability. The sample location information with the location point inside the sample target building is used as a positive sample, and the reference probability of the location point of the positive sample inside the sample target building is greater than a preset second probability. Through a preset building visit judgment model, based on the feature information of the wireless local area network in the sample location information and the feature information of the wireless local area network corresponding to the sample target building, generate the location feature information corresponding to the sample location information. Based on the location feature information, predict the actual probability that the location point of the sample location information is inside the sample target building. Based on the reference probability and actual probability corresponding to the positive samples in the sample location information, and the reference probability and actual probability corresponding to the negative samples in the sample location information, adjust the parameters of the preset building visit judgment model to obtain a building visit judgment model.

[0241] As can be seen from the above, in this embodiment, the acquisition unit 301 can obtain a target location request sent by a terminal. The target location request includes the connectable wireless local area network information of the terminal, and the connectable wireless local area network information includes the network identifier and feature information of at least one connectable wireless local area network. The first determination unit 302 determines at least one building within the area where the terminal is located and obtains the connectable wireless local area network information corresponding to the building. The connectable wireless local area network information includes the network identifier and feature information of at least one connectable wireless local area network. The second determination unit 303 determines a target building associated with the location of the terminal from the buildings according to the network identifier of the connectable wireless local area network and the network identifier of the connectable wireless local area network corresponding to the building. When it is determined that the terminal is inside the target building according to the feature information of the connectable wireless local area network corresponding to the target building and the feature information of the connectable wireless local area network, the third determination unit 304 determines the target location information of the terminal inside the target building according to the location information corresponding to the connectable wireless local area network of the target building. This application does not need to rely on the global positioning system information in the historical location request and can provide more accurate indoor location information.

[0242] An embodiment of this application also provides an electronic device, as Figure 4 shown, which shows a schematic structural diagram of the electronic device involved in the embodiment of this application. The electronic device can be a terminal or a server, etc. Specifically:

[0243] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art can understand that Figure 4 the structure of the electronic device shown in

[0244] does not limit the electronic device. It may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Among them:

[0245] The processor 401 is the control center of the electronic device, connecting various parts of the entire electronic device through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 402, and by calling the data stored in the memory 402, it executes various functions of the electronic device and processes data. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 401.

[0246] The electronic device further includes a power supply 403 for supplying power to each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 403 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0247] The electronic device may further include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0248] Although not shown, the electronic device may further include a display unit and the like, which will not be elaborated here. Specifically, in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402 to implement various functions as follows:

[0249] Obtain a target positioning request sent by the terminal, where the target positioning request includes the connectable wireless local area network information of the terminal, and the connectable wireless local area network information includes the network identifiers and feature information of at least one connectable wireless local area network; determine at least one building within the area where the terminal is located, and obtain the to-be-connected wireless local area network information corresponding to the building, where the to-be-connected wireless local area network information includes the network identifiers and feature information of at least one to-be-connected wireless local area network; determine a target building associated with the location of the terminal from the buildings according to the network identifier of the connectable wireless local area network and the network identifier of the to-be-connected wireless local area network corresponding to the building; when it is determined that the terminal is inside the target building according to the feature information of the to-be-connected wireless local area network corresponding to the target building and the feature information of the connectable wireless local area network, determine the target location information of the terminal inside the target building according to the location information corresponding to the to-be-connected wireless local area network of the target building.

[0250] For the specific implementation of each of the above operations, reference may be made to the previous embodiments and will not be elaborated here.

[0251] As can be seen from the above, this embodiment can obtain a target positioning request sent by the terminal, where the target positioning request includes the connectable wireless local area network information of the terminal, and the connectable wireless local area network information includes the network identifiers and feature information of at least one connectable wireless local area network; determine at least one building within the area where the terminal is located, and obtain the to-be-connected wireless local area network information corresponding to the building, where the to-be-connected wireless local area network information includes the network identifiers and feature information of at least one to-be-connected wireless local area network; determine a target building associated with the location of the terminal from the buildings according to the network identifier of the connectable wireless local area network and the network identifier of the to-be-connected wireless local area network corresponding to the building; when it is determined that the terminal is inside the target building according to the feature information of the to-be-connected wireless local area network corresponding to the target building and the feature information of the connectable wireless local area network, determine the target location information of the terminal inside the target building according to the location information corresponding to the to-be-connected wireless local area network of the target building. This application does not need to rely on the global positioning system information in the historical positioning request and can provide more accurate indoor positioning information.

[0252] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions or by controlling related hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0253] Therefore, an embodiment of the present application provides a storage medium in which multiple instructions are stored. The instructions can be loaded by a processor to execute the steps in any one of the terminal positioning methods provided by the embodiments of the present application. For example, the instructions can perform the following steps:

[0254] Obtain a target positioning request sent by a terminal, where the target positioning request includes the connectable wireless local area network information of the terminal, and the connectable wireless local area network information includes the network identifier and feature information of at least one connectable wireless local area network; determine at least one building within the area where the terminal is located, and obtain the to-be-connected wireless local area network information corresponding to the building, where the to-be-connected wireless local area network information includes the network identifier and feature information of at least one to-be-connected wireless local area network; determine a target building associated with the location of the terminal from the buildings according to the network identifier of the connectable wireless local area network and the network identifier of the to-be-connected wireless local area network corresponding to the building; when it is determined that the terminal is inside the target building according to the feature information of the to-be-connected wireless local area network corresponding to the target building and the feature information of the connectable wireless local area network, determine the target location information of the terminal inside the target building according to the location information corresponding to the to-be-connected wireless local area network of the target building.

[0255] For the specific implementation of each of the above operations, reference can be made to the previous embodiments and will not be elaborated here.

[0256] Among them, the storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.

[0257] Since the instructions stored in the storage medium can execute the steps in any one of the terminal positioning methods provided by the embodiments of the present application, the beneficial effects achievable by any one of the terminal positioning methods provided by the embodiments of the present application can be achieved. For details, refer to the previous embodiments and will not be elaborated here.

[0258] According to one aspect of the present application, there is provided a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various alternative implementations of the above terminal positioning aspect.

[0259] The above has introduced in detail a terminal positioning method and apparatus provided by an embodiment of the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation on the present application.

Claims

1. A terminal positioning method, characterized in that, Including: Obtain a target positioning request sent by a terminal, where the target positioning request includes the connectable wireless local area network information of the terminal, and the connectable wireless local area network information includes the network identifiers and characteristic information of at least one connectable wireless local area network; Determine at least one building within the area where the terminal is located, and obtain the to-be-connected wireless local area network information corresponding to the building, where the to-be-connected wireless local area network information includes the network identifiers and characteristic information of at least one to-be-connected wireless local area network; Determine the number of wireless local area networks that are the same between the terminal and each building according to the network identifier of the connectable wireless local area network and the network identifier of the to-be-connected wireless local area network corresponding to the building; Based on the number and the signal strength of the same wireless local area network scanned by the terminal, determine the association ratio of each building with the location where the terminal is located; Based on the ratio, determine a target building associated with the location where the terminal is located from the buildings; When it is determined that the terminal is inside the target building according to the characteristic information of the to-be-connected wireless local area network corresponding to the target building and the characteristic information of the connectable wireless local area network, determine the target location information of the terminal inside the target building according to the location information corresponding to the to-be-connected wireless local area network of the target building; Among them, the determining the target location information of the terminal inside the target building according to the location information corresponding to the to-be-connected wireless local area network of the target building includes: Determine the common wireless local area network shared by the terminal and the target building according to the network identifier of the to-be-connected wireless local area network of the target building and the network identifier of the connectable wireless local area network; Based on the location information of the common wireless local area network, determine the target location information of the terminal inside the target building.

2. The method according to claim 1, characterized in that, The method further includes: Determine the location characteristic information of the terminal according to the characteristic information of the to-be-connected wireless local area network corresponding to the target building and the characteristic information of the connectable wireless local area network; Based on the location characteristic information, determine whether the terminal is inside the target building.

3. The method according to claim 2, wherein The determining the location characteristic information of the terminal according to the characteristic information of the to-be-connected wireless local area network corresponding to the target building and the characteristic information of the connectable wireless local area network includes: Obtain historical positioning information, where the historical positioning information includes the wireless local area network information and positioning points corresponding to the historical positioning request, and the wireless local area network information includes the network identifiers of at least one wireless local area network; For each to-be-connected wireless local area network of the building, based on the positioning points of the historical positioning information including the to-be-connected wireless local area network and the area information of each building, count the frequency of occurrence of the to-be-connected wireless local area network in each building; For each to-be-connected wireless local area network of the building, based on the frequency, obtain the characteristic information of the to-be-connected wireless local area network; Determine the location characteristic information of the terminal according to the characteristic information of the to-be-connected wireless local area network corresponding to the target building and the characteristic information of the connectable wireless local area network.

4. The method according to claim 3, wherein The obtaining the characteristic information of the to-be-connected wireless local area network based on the frequency includes: Select the building with the highest frequency of occurrence of the to-be-connected wireless local area network as the associated building of the to-be-connected wireless local area network, where the to-be-connected wireless local area network is the associated wireless local area network of the associated building; Calculate the importance of the to-be-connected wireless local area network to the building based on the frequency of occurrence of the to-be-connected wireless local area network in its corresponding associated building and the frequency of occurrence of the associated wireless local area network corresponding to the building in the building; Calculate the building ratio of the to-be-connected wireless local area network based on the frequency of occurrence of the to-be-connected wireless local area network in its corresponding associated building and the frequency of occurrence of the to-be-connected wireless local area network in all buildings; Determine the characteristic information of the to-be-connected wireless local area network based on the importance and the building ratio; 5. The method according to claim 1, wherein The determining the target location information of the terminal in the target building based on the location information of the public wireless local area network includes: Determine the weight of the public wireless local area network based on the characteristic information corresponding to the public wireless local area network in the target location request; Perform weighted fusion on the location information of the public wireless local area network based on the weight to obtain the target location information of the terminal in the target building; 6. The method according to claim 1, wherein The determining the target location information of the terminal in the target building according to the location information corresponding to the to-be-connected wireless local area network of the target building further includes: Obtain historical location information, where the historical location information includes wireless local area network information and a location point corresponding to a historical location request, and the wireless local area network information includes network identifiers of at least one wireless local area network; For each to-be-connected wireless local area network of the target building, calculate the location information of the to-be-connected wireless local area network based on the location points of the historical location information including the to-be-connected wireless local area network; Determine the target location information of the terminal in the target building based on the location information corresponding to each to-be-connected wireless local area network of the target building; 7. The method according to claim 2, wherein Determine the location characteristic information of the terminal through a building visit judgment model according to the characteristic information of the to-be-connected wireless local area network corresponding to the target building and the characteristic information of the connectable wireless local area network; Determine whether the terminal is inside the target building based on the location characteristic information; The method further includes: Obtain training data, where the training data includes sample location information for training, and the sample location information includes wireless local area network information and a location point corresponding to a sample location request. Among them, the sample location information with the location point outside the sample target building is used as a negative sample, and the reference probability of the location point of the negative sample inside the sample target building is less than a preset first probability. The sample location information with the location point inside the sample target building is used as a positive sample, and the reference probability of the location point of the positive sample inside the sample target building is greater than a preset second probability; Generate the location characteristic information corresponding to the sample location information through a preset building visit judgment model according to the characteristic information of the wireless local area network in the sample location information and the characteristic information of the wireless local area network corresponding to the sample target building; Predict the actual probability that the positioning point of the sample positioning information is within the sample target building based on the position feature information; Based on the reference probability and the actual probability corresponding to the positive samples in the sample positioning information, and the reference probability and the actual probability corresponding to the negative samples in the sample positioning information, adjust the parameters of the preset building visit judgment model to obtain the building visit judgment model.

8. A terminal positioning device, characterized in that, Including: An acquisition unit, configured to acquire a target positioning request sent by a terminal, where the target positioning request includes connectable wireless local area network information of the terminal, and the connectable wireless local area network information includes network identifiers and feature information of at least one connectable wireless local area network; A first determination unit, configured to determine at least one building within the range of the area where the terminal is located, and acquire the connectable wireless local area network information corresponding to the building, where the connectable wireless local area network information includes network identifiers and feature information of at least one connectable wireless local area network; A second determination unit, configured to determine the number of wireless local area networks that are the same between the terminal and each building according to the network identifier of the connectable wireless local area network and the network identifier of the connectable wireless local area network corresponding to the building; determine the proportion of the association between each building and the location where the terminal is located based on the number and the signal strength of the same wireless local area network scanned by the terminal; Based on the proportion, determine a target building associated with the location where the terminal is located from the buildings; A third determination unit, configured to, when it is determined that the terminal is within the target building according to the feature information of the connectable wireless local area network corresponding to the target building and the feature information of the connectable wireless local area network, determine the target position information of the terminal within the target building according to the position information corresponding to the connectable wireless local area network of the target building; where, determining the target position information of the terminal within the target building according to the position information corresponding to the connectable wireless local area network of the target building includes: determining a common wireless local area network shared by the terminal and the target building according to the network identifier of the connectable wireless local area network of the target building and the network identifier of the connectable wireless local area network; determining the target position information of the terminal within the target building based on the position information of the common wireless local area network.

9. An electronic device, characterized in that, Including a memory and a processor; the memory stores multiple instructions, and the processor loads the instructions to execute the steps in the terminal positioning method according to any one of claims 1 to 7.

10. A storage medium, characterized in that, A computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps in the terminal positioning method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Indoor positioning method and device, medium and equipment

    CN110719568A