WiFi-based positioning method and apparatus, and electronic device
By acquiring WiFi signal strength and the maximum matching KM algorithm model, the problem of insufficient indoor positioning accuracy was solved, and accurate positioning of mobile devices in the room was achieved.
Patent Information
- Application Number
- CN202511700535.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-02-06
AI Technical Summary
In indoor environments, existing positioning technologies such as GPS and BeiDou have poor accuracy, making it difficult to accurately locate mobile devices.
By obtaining the WiFi signal strength of the target mobile device received by the target WiFi access point (AP) device, and combining it with the coordinates of the target WiFi AP device, the target location of the target mobile device is determined. Then, using the maximum matching KM algorithm model, the matching weight between the mobile device and the workstation is calculated, thereby determining the specific location of the mobile device.
It improves the positioning accuracy of indoor mobile devices, enabling accurate location of the mobile device's specific workstation within the room.
Smart Images

Figure CN121486967A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication network technology, and in particular to a WiFi-based positioning method, apparatus, and electronic device. Background Technology
[0002] With the development of wireless communication network technology, positioning technologies such as Global Positioning System (GPS) and BeiDou have become relatively mature. When a mobile device is outdoors, these positioning technologies can accurately determine its location. However, when the mobile device is indoors, due to building obstructions and signal interference, the accuracy of these positioning technologies is poor. Summary of the Invention
[0003] This application provides a WiFi-based positioning method, device, and electronic device to solve the problem of poor accuracy when positioning indoor mobile devices.
[0004] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide a WiFi-based positioning method, the method comprising: The WiFi signal strength of the WiFi signal sent by the target mobile device is obtained from the target WiFi access point (AP) device. Based on the WiFi signal strength and the coordinates of the target WiFi AP device, the target location of the target mobile device is determined, and the target room where the target mobile device is located is determined based on the target location. Obtain a first WiFi signal strength set corresponding to multiple workstations in the target room. The first WiFi signal strength set includes the WiFi signal strength of the WiFi signal sent by the mobile device at each workstation location, which can be received by the WiFi AP device. Obtain a second WiFi signal strength set corresponding to at least one mobile device in the target room. The second WiFi signal strength set includes the WiFi signal strength of the WiFi signal received by the WiFi AP device corresponding to the at least one mobile device. The at least one mobile device includes the target mobile device. Using the first WiFi signal strength set and the second WiFi signal strength set, calculate the matching weight between the first mobile device in the at least one mobile device and each workstation, where the first mobile device is each mobile device or each type of mobile device in the at least one mobile device; The information of the multiple workstations, the information of the at least one mobile device, and the matching weight are input into the maximum matching KM algorithm model to obtain the target workstation matched by the target mobile device, and the coordinate position of the target workstation is determined as the position of the target mobile device.
[0005] Secondly, embodiments of this application provide a WiFi-based positioning device, the device comprising: The first determining module is used to obtain the WiFi signal strength of the WiFi signal sent by the target mobile device received by the target WiFi access point AP device, determine the target location of the target mobile device based on the WiFi signal strength and the coordinate position of the target WiFi AP device, and determine the target room where the target mobile device is located based on the target location; The first acquisition module is used to acquire a first WiFi signal strength set corresponding to multiple workstations in the target room. The first WiFi signal strength set includes the WiFi signal strength of the WiFi signal sent by the mobile device at each workstation location, which can be received by the WiFi AP device. The second acquisition module is used to acquire a second WiFi signal strength set corresponding to at least one mobile device in the target room. The second WiFi signal strength set includes the WiFi signal strength of the WiFi signal received by the WiFi AP device corresponding to the at least one mobile device. The at least one mobile device includes the target mobile device. The calculation module is used to calculate the matching weight between the first mobile device in the at least one mobile device and each workstation using the first WiFi signal strength set and the second WiFi signal strength set, wherein the first mobile device is each mobile device or each type of mobile device in the at least one mobile device; The second determining module is used to input the information of the multiple workstations, the information of the at least one mobile device, and the matching weight into the maximum matching KM algorithm model to obtain the target workstation matched by the target mobile device, and determine the coordinate position of the target workstation as the position of the target mobile device.
[0006] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, it implements the steps of the WiFi-based positioning method described in the first aspect.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the WiFi-based positioning method described in the first aspect.
[0008] Fifthly, a computer program product is provided, including computer instructions that, when executed by a processor, implement the steps of the WiFi-based positioning method as described in the first aspect.
[0009] In this embodiment, based on the WiFi signal strength of the WiFi signal sent by the mobile device received by the WiFi AP device, the room where the mobile device is located is first determined, and then the workstation corresponding to the mobile device is determined according to the matching weight of the mobile device and the workstation in the room, which can improve the accuracy of the positioning of indoor mobile devices. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is one of the flowcharts of a WiFi-based positioning method provided in the embodiments of this application; Figure 2 This is a diagram illustrating a WiFi-based positioning system architecture provided in an embodiment of this application. Figure 3 This is a schematic diagram of a polygonal configuration provided in an embodiment of this application; Figure 4 This is a schematic diagram of a mobile device's MAC address provided in an embodiment of this application; Figure 5 This is a second flowchart of a WiFi-based positioning method provided in an embodiment of this application; Figure 6 This is the third flowchart of a WiFi-based positioning method provided in the embodiments of this application; Figure 7 This is a schematic diagram of the structure of a WiFi-based positioning device provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0013] This application provides a positioning method, apparatus, and electronic device based on wireless fidelity (WiFi) technology to solve the problem of poor accuracy in locating indoor mobile devices.
[0014] See Figure 1 , Figure 1 This is a flowchart of a WiFi-based positioning method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes the following steps: Step 101: Obtain the WiFi signal strength of the WiFi signal sent by the target mobile device received by the target WiFi access point (AP) device; determine the target location of the target mobile device based on the WiFi signal strength and the coordinates of the target WiFi AP device; and determine the target room where the target mobile device is located based on the target location. Step 102: Obtain the first WiFi signal strength set corresponding to multiple workstations in the target room. The first WiFi signal strength set includes the WiFi signal strength of the WiFi signal sent by the mobile device at each workstation location, which can be received by the WiFi AP device. Step 103: Obtain a second WiFi signal strength set corresponding to at least one mobile device in the target room. The second WiFi signal strength set includes the WiFi signal strength of the WiFi signal received by the WiFi AP device corresponding to the at least one mobile device. The at least one mobile device includes the target mobile device. Step 104: Using the first WiFi signal strength set and the second WiFi signal strength set, calculate the matching weight between the first mobile device in the at least one mobile device and each workstation. The first mobile device is each mobile device or each type of mobile device in the at least one mobile device. Step 105: Input the information of the multiple workstations, the information of the at least one mobile device, and the matching weight into the maximum matching KM algorithm model to obtain the target workstation matched by the target mobile device, and determine the coordinate position of the target workstation as the position of the target mobile device.
[0015] When a mobile device connects to WiFi, it sends probe frames, data frames, and other data to the WiFi access point (AP). This data can be collected by configuring the WiFi AP's Arescout interface and then reported to the server in real time. The data includes timestamps, the WiFi AP's Media Access Control (MAC) address, the MAC address of the signal transmitter (i.e., the mobile device), and the received signal strength (RSSI).
[0016] After receiving data reported by the WiFi AP, the server can perform data verification and parsing to obtain data sent by mobile devices. It can determine whether the data sender is a mobile device based on the MAC address of the data sender. Furthermore, certain MAC address ranges may be associated with virtual machine software, which are usually not mobile devices.
[0017] By acquiring data sent by mobile devices, data received and reported by different WiFi APs from the same mobile device can be aggregated to obtain data sent by the same mobile device received by multiple WiFi APs at the same time.
[0018] In step 101, the WiFi signal strength of the WiFi signal transmitted by the target mobile device is obtained from the WiFi signal received by the target WiFi AP device. The target WiFi AP device may include one or more devices. Based on the WiFi signal strength and the coordinates of the target WiFi AP device, the target location of the target mobile device can be determined. For example, when the target mobile device is close to the WiFi AP device, the WiFi signal strength received by the target WiFi AP device is strong; when the target mobile device is far from the WiFi AP device, the WiFi signal strength received by the target WiFi AP device is weak. When the target mobile device is connected to multiple WiFi AP devices simultaneously, the relative positions of the target mobile device and the multiple WiFi AP devices can be determined based on the multiple signal strengths and the positions of the multiple WiFi AP devices, thereby determining the target location.
[0019] Based on a pre-built indoor map and the target location of the target mobile device, the target room where the target mobile device is located can be determined. The indoor map may include room layout, workstation coordinates, and the coordinates of WiFi access points, etc. (The indoor map is shown below.) Figure 2 As shown.
[0020] In step 102, a workstation can be understood as an area in an indoor setting used for production, work, etc. For example, in an office building, a workstation can be a workbench or seat; in a laboratory, a workstation can be the location of experimental equipment or the operating position of experimental personnel; in a factory, a workstation can be an operating table. A first set of WiFi signal strengths corresponding to multiple workstations within the target room can be obtained, where multiple workstations can be some or all of the workstations in the target room. Before performing this step, the WiFi signal strengths corresponding to all workstations in the target room can be pre-determined and stored in a database, thereby allowing the WiFi signal strengths corresponding to multiple workstations to be retrieved from the database.
[0021] The WiFi signal strength corresponding to each workstation can be understood as the WiFi signal strength received by the WiFi AP device when the mobile device sends a WiFi signal to the WiFi AP device at each workstation location. Specifically, this can be achieved by the WiFi AP device receiving the WiFi signal strength sent by the mobile device at each workstation, or by calculating the WiFi signal strength corresponding to each workstation based on the signal attenuation model of the WiFi AP device and the distance between the workstation and the WiFi AP device. The WiFi signal strengths corresponding to multiple workstations constitute the first WiFi signal strength set, which can also be called the workstation fingerprint. The fingerprint of the i-th workstation is represented as: , in, Let L be the set of WiFi signal strengths corresponding to the i-th workstation, and L be the number of AP devices.
[0022] In step 103, a second set of WiFi signal strengths corresponding to at least one mobile device in the target room can be obtained. The at least one mobile device can be a transmitting device corresponding to a WiFi signal received by a WiFi AP device within a predetermined time period. The at least one mobile device can be all or some of the mobile devices in the target room.
[0023] When at least one mobile device includes a mobile device, the data sent by the mobile device reported by each AP device within a predetermined time period are aggregated to obtain a set of WiFi signal strengths, which can also be called the fingerprint of the mobile device.
[0024] When at least one mobile device includes multiple mobile devices, by aggregating the data sent by the same mobile device reported by each AP device within a predetermined time period, a set of WiFi signal strengths corresponding to multiple mobile devices can be obtained. , in, Let be the set of WiFi signal strengths corresponding to the i-th mobile device. This represents the signal strength value of the WiFi signal sent by the mobile device received by the j-th WiFi AP device. A total of C AP devices receive the data. When C is greater than 5, the data received by the AP devices can be filtered to select the top few (e.g., 4 or 5) data with the highest signal strength.
[0025] In addition, the set of WiFi signal strengths corresponding to at least one mobile device may include the set of WiFi signal strengths of WiFi signals received by the AP device (sent by at least one mobile device), or it may be the set of WiFi signal strengths obtained by averaging the signal strengths of multiple WiFi signals (sent by at least one mobile device) received by the AP device according to different types.
[0026] After obtaining the first WiFi signal strength set corresponding to multiple workstations and the second WiFi signal strength set corresponding to at least one mobile device, in step 104, the matching weight between the first mobile device and each workstation is calculated based on the first WiFi signal strength set and the second WiFi signal strength set.
[0027] Taking the i-th mobile device and the j-th workstation as an example, we represent the WiFi signal strength set corresponding to the i-th mobile device and the WiFi signal strength set corresponding to the j-th workstation as vectors. The matching weight between the i-th mobile device and the j-th workstation is the product of the two vectors divided by the product of their magnitudes. Following this method, we can obtain the matching weight between each mobile device and each workstation. When the first mobile device is a type of mobile device, the matching weight between each type of mobile device and each workstation can be calculated similarly.
[0028] In step 105, information from multiple workstations, information from at least one mobile device, and matching weights are input into the maximum matching KM (Kuhn-Munkres) algorithm model. Based on this algorithm, the target workstation with the highest matching degree to the target mobile device can be obtained, and the coordinates of the target workstation are determined as the location of the target mobile device. By inputting information from multiple workstations, multiple mobile devices, and multiple matching weights into the KM algorithm model, the workstation matching each mobile device can be obtained, thus determining the location of multiple mobile devices and enabling rapid localization of multiple mobile devices.
[0029] The information for the aforementioned workstations may include workstation number, workstation identifier, or other information used to represent the characteristics of the workstations, while the information for the mobile devices may include MAC address or other information used to represent the characteristics of each mobile device.
[0030] In this embodiment, based on the WiFi signal strength received by the WiFi AP device, the room where the mobile device is located is first roughly located. Then, based on the matching weight of the mobile device and the workstation in the room, the workstation corresponding to the mobile device is determined, which can improve the accuracy of the positioning of indoor mobile devices.
[0031] Optionally, determining the target location of the target mobile device based on the WiFi signal strength and the coordinates of the target WiFi AP device includes: When the number of target WiFi AP devices is 1, if the WiFi signal strength of the WiFi signal sent by the target mobile device received by the target WiFi AP device is greater than a preset value, then the coordinate position of the target WiFi AP device is determined as the target position of the target mobile device. When the number of target WiFi AP devices is greater than 1, the location weight of each target WiFi AP device is determined based on the WiFi signal strength of the WiFi signal sent by the target mobile device received by the target WiFi AP device; the target location of the target mobile device is obtained by summing the product of the coordinate position of the target WiFi AP device and the corresponding location weight.
[0032] When performing coarse positioning of a mobile device, you can first obtain the number of target WiFi AP devices that have received WiFi signals sent by the mobile device.
[0033] When there is only one target WiFi AP device, the signal strength of the WiFi signal received by the target WiFi AP device is further determined. If the signal strength is greater than a preset value, it indicates that the mobile device is relatively close to the target WiFi AP device, and the coordinates of the target WiFi AP device can be used to determine the location of the mobile device. The preset value can be the signal strength value corresponding to a distance of a certain number (e.g., 3 or 5 meters) according to the signal distance model in the AP product manual. The specific value can be set according to accuracy requirements; for example, the preset value might correspond to a signal strength of -65dBm.
[0034] When the number of target WiFi access points (APs) is greater than one, it means that multiple WiFi APs are receiving WiFi signals from the target mobile device. The location weight of each target WiFi AP is determined based on the WiFi signal strength received by each of these APs. For example, a stronger WiFi signal results in a higher location weight for the corresponding target WiFi AP, and vice versa. The location weight of each target WiFi AP is determined based on the signal strength of the WiFi signal received by each AP.
[0035] Once the location weight of each target WiFi AP device is calculated, the coordinates of each target WiFi AP device are multiplied by its corresponding location weight to obtain the data for each target WiFi AP device. Then, the multiple calculated data are summed to obtain the coordinates of the target mobile device.
[0036] In this way, by determining the target location of the target mobile device based on the number of target WiFi AP devices and the corresponding signal strength received from the WiFi signal, the accuracy of target location determination can be improved.
[0037] Optionally, determining the location weight of each target WiFi AP device based on the WiFi signal strength of the WiFi signal transmitted by the target mobile device received by the target WiFi AP device includes: (1) in, Let i be the location weight of the i-th target WiFi AP device. Let A be the WiFi signal strength of the WiFi signal transmitted by the target mobile device received by the i-th target WiFi AP device. Let A be a constant, and A is greater than 1. The absolute value of M, where M is the number of the target WiFi AP devices; The step of summing the products of the coordinates of the target WiFi AP device and its corresponding position weights to obtain the target location of the target mobile device includes: (2) (3) Where x and y represent the x-axis and y-axis coordinates of the target mobile device, respectively. y and x are the coordinates of the i-th target WiFi AP device, respectively.
[0038] The location weight of each target WiFi AP device can be calculated using the formula described above. The specific value of A can be set according to actual conditions; for example, A=100 or A=200 can be set to achieve the desired result. +A is a positive number.
[0039] After calculating the location weight of each target WiFi AP device, the coordinates of each target WiFi AP device are obtained based on a pre-built indoor map, including the x-coordinate and y-coordinate. The coordinates of each target WiFi AP device are multiplied by its corresponding weight to obtain a data set. The data sets for all target WiFi AP devices are then summed to obtain the x-coordinate of the target mobile device. Similarly, the y-coordinate of the target mobile device can be obtained using the same formula.
[0040] In this way, calculating the coordinates of the target mobile device based on the weight of the coordinates of each target WiFi AP device can improve the accuracy of coordinate position calculation.
[0041] Optionally, before determining the location weight of each target WiFi AP device based on the WiFi signal strength of the WiFi signal transmitted by the target mobile device received by the target WiFi AP device, the method further includes: Obtain the coordinates of N WiFi AP devices that received the WiFi signal sent by the target mobile device, where N is an integer greater than 2; Connect the N coordinate positions with straight lines to form a polygon; If the smallest interior angle of any triangle contained in the polygon is greater than or equal to a preset angle value, then the N WiFi AP devices are identified as the target WiFi AP devices. If the minimum interior angle of each triangle in the polygon is less than the preset angle value, then the two WiFi AP devices with the strongest signal strength among the N WiFi AP devices are determined as the target WiFi AP devices.
[0042] If N WiFi access points (APs) receive WiFi signals from a target mobile device, the N coordinates of the N APs can be obtained. Connecting these N coordinates with straight lines yields a polygon; for example, N=3 results in a triangle, N=4 results in a quadrilateral, and so on.
[0043] In one scenario, any triangle contained in the polygon is obtained. If the smallest interior angle of any triangle is greater than or equal to a preset angle value, it indicates that the polygon has a good configuration. The N WiFi AP devices corresponding to the N coordinate points are then identified as the target WiFi AP devices.
[0044] In another scenario, all triangles within the polygon are identified. If the smallest interior angle of each triangle is less than a preset angle value, the polygon's configuration is considered poor. The two WiFi APs with the strongest signal strength out of the N WiFi APs are then selected as the target WiFi APs. The preset angle value can be set according to actual conditions.
[0045] When the polygon is a triangle, only the smallest interior angle of the triangle needs to be determined. For example, as... Figure 3 As shown in the diagram, the triangle formed by the coordinates of three WiFi access points (AP1, AP2, AP3) is represented. In the right-hand diagram, the smallest interior angle of the triangle (the angle corresponding to AP3) is greater than 10°, indicating a good triangle configuration. Therefore, the three WiFi access points corresponding to these three coordinates are selected. In the left-hand diagram, the smallest interior angle of the triangle (the angle corresponding to AP3) is less than 10°, indicating a poor triangle configuration. Therefore, the two WiFi access points with the strongest signal strength are selected from these three coordinates.
[0046] By using the above method, obtaining a WiFi AP device with a strong signal associated with the target mobile device as the target WiFi AP device can improve the accuracy of determining the location of the target mobile device.
[0047] Optionally, obtaining the first set of WiFi signal strengths corresponding to multiple workstations in the target room includes: Obtain the distance between each workstation and each WiFi AP device in the target room; Based on the distance, the ideal signal strength of the WiFi signal transmitted by the mobile device at each workstation location can be calculated using the following formula to obtain the first WiFi signal strength set: (4) Where d represents the distance between the workstation and the WiFi AP device; This represents the WiFi signal strength value that the WiFi AP device can receive from the WiFi signal sent by the mobile device at the location of the workstation when the distance between the workstation and the WiFi AP device is d meters. a and b are coefficients, respectively. The step of calculating the matching weight between the first mobile device and each workstation using the first WiFi signal strength set and the second WiFi signal strength set includes: (5) in, Let be the set of second WiFi signal strengths corresponding to the i-th mobile device, denoted as ,in, This represents the Wi-Fi signal strength received by C Wi-Fi AP devices from the Wi-Fi signal sent by the i-th mobile device. Let be the set of first WiFi signal strengths corresponding to the j-th workstation, denoted as: ,in, This represents the Wi-Fi signal strength that L Wi-Fi AP devices can receive from the Wi-Fi signal transmitted by the mobile device at the j-th workstation. express The model, express The model.
[0048] The coordinates of the workstation and each WiFi AP device can be determined based on a pre-built map, and then the distance between the workstation and each WiFi AP device can be obtained.
[0049] Based on the distances mentioned above, the WiFi signal strength at each workstation can be calculated using the formula described above. The coefficients 'a' and 'b' can be obtained from the AP device's product manual or through actual measurement and calibration. This calculation allows for the determination of WiFi signal strength at multiple workstations, improving the efficiency of signal strength acquisition.
[0050] Wherein, the set of second WiFi signal strengths corresponding to the i-th mobile device A total of C AP devices received WiFi signals; the set of the first WiFi signal strength corresponding to the j-th workstation. A total of L AP devices are capable of receiving WiFi signals; multiple data points in each set can be treated as a vector, and the magnitude of each vector is calculated. The matching weight between the i-th mobile device and the j-th workstation can be calculated using the above formula.
[0051] Optionally, obtaining the second WiFi signal strength set corresponding to at least one mobile device in the target room includes: Obtain the K Media Access Control (MAC) addresses of the K electronic devices connected to the WiFi AP device in the target room, where K is an integer greater than 0; From the K MAC addresses, obtain P MAC addresses with preset characteristics, where the P MAC addresses correspond to P mobile devices, P is an integer greater than 0, and P≤K; Obtain the WiFi signal strength of the WiFi signals sent by the P mobile devices received by the WiFi AP device, and obtain the second WiFi signal strength set.
[0052] A WiFi access point (AP) device can obtain the K Media Access Control (MAC) addresses of K electronic devices connected to the WiFi AP device in the target room by receiving signal data sent by electronic devices. Based on the characteristics of each MAC address, P mobile devices can be identified from among the K electronic devices. These K electronic devices can include terminal devices such as computers, tablets, and mobile phones, and P mobile devices can be identified from among them.
[0053] For example, such as Figure 4 As shown, the MAC address of the data sender can be used to determine whether the signal data is sent by a mobile device. Specifically, if the second bit of the MAC address is '2', '6', 'a', or 'e', then it is usually data sent by a mobile device.
[0054] The WiFi signal strengths received by multiple WiFi AP devices from P mobile devices form a second WiFi signal strength set.
[0055] In this way, by identifying multiple mobile devices in electronic devices connected to the WiFi AP device through their MAC addresses, and thus determining the second WiFi signal strength set corresponding to the mobile device, the accuracy of matching mobile devices and workstations can be improved.
[0056] Optionally, if the number of mobile devices in the target room is less than or equal to the number of workstations in the target room, obtaining the second WiFi signal strength set corresponding to at least one mobile device in the target room includes: The WiFi signal strength of the WiFi signal sent by the at least one mobile device received by the WiFi AP device is determined as the second WiFi signal strength set, which includes the WiFi signal strength of the WiFi signal sent by each mobile device received by the WiFi AP device. When the number of mobile devices in the target room is greater than the number of workstations in the target room, obtaining the second WiFi signal strength set corresponding to at least one mobile device in the target room includes: Based on the WiFi signal strength corresponding to the mobile device, the at least one mobile device is clustered to obtain at least one type of mobile device. The average WiFi signal strength of the WiFi signal sent by each type of mobile device received by the same WiFi AP device is calculated, and the average WiFi signal strength is used to determine the second WiFi signal strength set, wherein the second WiFi signal strength set includes the average WiFi signal strength of each type of mobile device received by each WiFi AP device. The step of calculating the matching weight between the first mobile device and each workstation using the first WiFi signal strength set and the second WiFi signal strength set includes: Using the first WiFi signal strength set and the second WiFi signal strength set, calculate the matching weight between each type of mobile device and each workstation; The step of inputting the information of the multiple workstations, the information of the at least one mobile device, and the matching weight into the maximum matching KM algorithm model to obtain the target workstation matched by the target mobile device, and determining the coordinate position of the target workstation as the position of the target mobile device, includes: The information of the multiple workstations, the information of the at least one type of mobile device, and the matching weight are input into the maximum matching KM algorithm model to obtain the target workstation matched by the target type of mobile device, and the coordinate position of the target workstation is determined as the position of each mobile device in the target type of mobile device, wherein the target type of mobile device includes the target mobile device.
[0057] If the number of mobile devices in the target room is less than or equal to the number of workstations in the target room, obtain the WiFi signal strength of the WiFi signal sent by the same mobile device received by each WiFi AP device, and form a second WiFi signal strength set. .
[0058] When the number of mobile devices in the target room exceeds the number of workstations in the target room, multiple mobile devices are clustered based on the similarity of the signal strength of the WiFi signals received by the WiFi AP devices from the mobile devices. Specifically, the signal strength of the WiFi signals received by the WiFi AP devices from each category of mobile devices is similar. The average WiFi signal strength of the WiFi signals received by the same WiFi AP device from each category of mobile devices is calculated. The average WiFi signal strength of the WiFi signals received by multiple AP devices from at least one category of mobile devices forms a second WiFi signal strength set. .in, Let represent the average WiFi signal strength received by the AP device from the WiFi signal sent by the i-th type of mobile device, and let C represent the number of AP devices.
[0059] Using the first WiFi signal strength set and the second WiFi signal strength set, the matching weight between each type of mobile device and each workstation is calculated. The formula for calculating the matching weight between the i-th type of mobile device and the j-th workstation is as follows: (6) After the matching workstation location is calculated, mobile devices of the same type share the location coordinates of the matched workstation.
[0060] After inputting information from multiple workstations, information from at least one type of mobile device, and matching weights into the KM algorithm, a target workstation matching the target type of mobile device is obtained, and the position coordinates of the target workstation are used as the coordinates of the target type of mobile device. In other words, the coordinates of each mobile device in the target type of mobile device are the coordinates of the target workstation.
[0061] In this way, based on the number of workstations and mobile devices in the same room, the coordinates of the workstations are assigned to the mobile devices. When the number of mobile devices is greater than the number of workstations, the mobile devices are clustered, and the coordinates of the same workstation are assigned to the same type of mobile device, which can improve the accuracy and efficiency of matching.
[0062] To facilitate understanding of this embodiment, specific examples are provided below.
[0063] like Figure 2 As shown, Figure 2 This is a WiFi-based positioning system architecture diagram, applied to a server, including a workstation fingerprint generation module, a WiFi data collection module, and a positioning module.
[0064] The workstation fingerprint generation module primarily extracts and stores workstation coordinates. Specifically, based on a pre-collected and constructed indoor map, the locations of workstations and access points (APs) within the room are marked. The coordinates of the workstations and APs are calculated based on the origin. Then, the distance from each workstation to all APs can be calculated using these coordinates. Furthermore, by referring to the signal distance attenuation model in the AP's product manual, the RSSI value of the signal strength from each workstation to each AP can be calculated. The RSSI values of all APs corresponding to each workstation constitute a workstation fingerprint. All workstation fingerprints are combined to form a workstation fingerprint database, which is then stored in a file for later use.
[0065] The WiFi data collection module primarily collects WiFi data, including data from all WiFi access point (AP) base station devices in the indoor office area. Generally, each room has at least one AP device. Each AP device is configured to enable its Aeroscout interface for collecting probe frames, data frames, and other data sent by the device, and then reports this collected data to the data processing server.
[0066] The positioning module, after receiving data from all AP devices, combines it with workstation fingerprint information to complete the positioning and stores the final positioning result in the database. This includes steps such as data preprocessing, mobile device area determination, and matching positioning.
[0067] Based on the above architecture, the system uses WiFi data collected from mobile devices in the office environment and combines it with workstation fingerprints for maximum matching location. This process includes data collection, data preprocessing, mobile device area determination, and maximum matching location. The specific details of each step are explained below: Step 1: Data Acquisition and Preprocessing.
[0068] After a mobile device connects to WiFi, it sends probe frames, data frames, and other data to the access point (AP) device. The AP device collects this data and then reports it to the server in real time.
[0069] After receiving data reported by the AP device, the server first performs data verification and parsing; then, it filters the data that passes verification, retaining only the data sent by the mobile terminal (the MAC address of the data sender can be used to determine whether it is signal data sent by a mobile device; for example, if the second bit of the MAC address is '2', '6', 'a', or 'e', it is usually data sent by a mobile device such as a mobile phone). Figure 4 (As shown); Finally, the data sent by the same mobile device and received and reported by different AP devices are aggregated to obtain the data sent by the same mobile device received by multiple APs at the same time.
[0070] Step 2: Perform a coarse location of the mobile device to determine the target room to which the mobile device belongs.
[0071] like Figure 5 As shown, different positioning calculations are performed depending on the number of AP devices that receive WiFi signal data.
[0072] When only one access point (AP) device receives data, the strength of the received WiFi signal is determined, and the location is calculated according to the following formula: , , Where x and y represent the x and y coordinates of the mobile device to be located. These represent the x and y coordinates of the AP that received the data, respectively. rssi represents the signal strength of the data sent by the mobile device currently received by the AP. Valid_rssi is a preset value set according to different AP device models.
[0073] When multiple access points (APs) receive data, filtering and judgment are required. When more than two APs receive data, the data from a number of APs with the strongest signal strength (e.g., no more than four) are selected for configuration judgment. If the configuration is poor, the two data points with the strongest signal strength are selected for location calculation. The quality of the configuration is judged by calculating the minimum interior angle of the triangle formed by connecting any three AP coordinates. If the minimum interior angle is less than a preset angle, such as 10°, the configuration is considered poor. Figure 3 As shown.
[0074] The filtered data are used to calculate the preliminary positioning results according to formulas (1)-(3), and the room where the mobile device is located is determined by combining the positioning results with the room outline.
[0075] Step 3: Obtain the fingerprint data of the mobile devices and workstations in the target room, and use the maximum matching algorithm to calculate and obtain the workstations that match the mobile devices.
[0076] Obtain the set of MAC addresses of mobile devices in each room, denoted as . N is the number of mobile device MAC addresses in the room, and the set of all workstations in the room is denoted as N. K represents the number of workstations in the room. Then, the maximum matching algorithm is used to find the most likely workstation for each MAC address, and the workstation's coordinates are assigned to the MAC address's location coordinates, achieving maximum matching positioning. Specifically, this includes three steps: fingerprint extraction, weight calculation, and maximum matching. 1. Fingerprint extraction Based on the indoor map collected and constructed in advance, the workstation coordinates and WiFi-AP coordinates are extracted. The workstation fingerprint in the target room is calculated according to formula (4). The fingerprints of all workstations can also be pre-calculated and generated, which is the WiFi signal strength value at different distances from the AP device.
[0077] By aggregating the data sent by the same mobile device reported by each AP device within 1 minute, the fingerprint of the mobile device is obtained, which is the strength value of the WiFi signal sent by the mobile device received by the AP device.
[0078] 2. Weight Calculation After obtaining the fingerprint of the mobile device, the matching weight between the mobile device and each workstation in the room to which it belongs can be calculated. For the i-th MAC, the matching weight from it to the j-th workstation is calculated as shown in formula (5).
[0079] 3. Maximum Matching like Figure 6 As shown, the maximum matching location is performed based on the relationship between the number of MAC addresses and the number of workstations.
[0080] When the number of MAC addresses is no greater than the number of workstations, input the set of MAC addresses of the mobile device, the set of all workstations, and the matching weights, and run the maximum matching KM (Kuhn-Munkres) algorithm to obtain the matching workstation for each MAC address. Then, assign the coordinates of the workstation to the coordinates of the mobile device to obtain the location of the mobile device, thus achieving positioning.
[0081] When the number of MAC addresses exceeds the number of workstations (possibly due to one or more employees using multiple phones), first cluster all MAC addresses using the K-means clustering algorithm to obtain T clusters of MAC addresses, where T is the number of workstations in the room. Then, average the fingerprints corresponding to all MAC addresses in each cluster to obtain... Using the fingerprint and the fingerprints of each workstation, the matching weights are obtained as shown in formula (6). The set of mobile device MACs, the set of all workstations, and the matching weights corresponding to each category are input. The maximum matching KM algorithm is run to obtain the matching results. Multiple MACs in each category share the location coordinates of the same matching workstation. Finally, the location coordinates of each MAC are obtained.
[0082] In addition, trilateration or fingerprint matching algorithms can be used to locate devices sending WiFi signals. For trilateration, the distance between the access point (AP) and the target to be located needs to be calculated based on the received signal strength using a signal distance attenuation model. Then, the target location is calculated based on the distances between at least three APs and the target. In practical use, data from at least three APs is required, and since the signal distance attenuation model of the AP often has a large error in indoor environments, direct use will introduce significant errors. For fingerprint positioning, fingerprints are collected offline from various locations within the area to be located. For example, the area to be located is first divided into grids. Then, a tester holds one or more mobile devices and connects to WiFi, standing in each grid for a period of time. Finally, the AP collects the RSSI values of the signal strength sent by the mobile devices in each grid and stores these values. Each grid corresponds to a fingerprint (the fingerprint is composed of RSSI values received by multiple APs), forming a fingerprint database. During online positioning, the target's fingerprint data is obtained based on the collected RSSI values sent by the target. Then, a similarity calculation is performed between this fingerprint and the fingerprints in the fingerprint database. The center coordinates of the grid corresponding to the most similar fingerprint are the target location. In this case, the positioning accuracy is related to the grid size and AP deployment density. In addition, when the fingerprint database is large, the calculation time is also relatively long. At the same time, the fingerprint database needs to be manually built and maintained, which is costly.
[0083] This application's embodiments construct a maximum matching positioning system based on workstation semantics and WiFi data to solve the problem of mobile device positioning in office scenarios. On one hand, workstation and WiFi-AP coordinates are extracted based on map data, and a workstation fingerprint database is automatically generated through calculation, reducing the cost of fingerprint creation and maintenance. On the other hand, signal strength RSSI data reported by WiFi-APs is collected, and the MAC addresses of mobile devices in each room are calculated. Then, maximum matching is used to match mobile devices with workstations, thereby achieving positioning. By fully utilizing existing WiFi-AP devices in the office scenario without installing additional AP devices, and automatically generating workstation fingerprints and achieving workstation-level positioning accuracy through calculation, the implementation cost of positioning technology in this type of scenario is greatly reduced.
[0084] The system in this application includes WiFi access points (APs) and a data processing server. The APs are existing devices used by staff for internet access in an office environment. The data processing server automatically generates workstation fingerprints and calculates location-related algorithms, ultimately writing the location coordinates of each mobile device in the room to a database for persistent storage. Using the RSSI signal strength data reported by the WiFi APs, the system first determines the room to which the mobile device sending the WiFi signal belongs. Then, it obtains the MAC addresses of all mobile devices in the room. Next, it combines the signal strength data of all WiFi APs corresponding to each MAC address with the workstation fingerprint to calculate the matching weight. Finally, it uses a maximum matching algorithm to match the MAC address to the workstation, thereby achieving mobile device location. In this way, with only 1 to 2 WiFi APs deployed in each room of an office environment, it achieves workstation-level location within the room, improving positioning accuracy.
[0085] See Figure 7 , Figure 7 This is a schematic diagram of the structure of a WiFi-based positioning device provided in an embodiment of this application, as shown below. Figure 7 As shown, the WiFi-based positioning device 700 includes: The first determining module 701 is used to obtain the WiFi signal strength of the WiFi signal sent by the target mobile device received by the target WiFi access point AP device, determine the target location of the target mobile device based on the WiFi signal strength and the coordinate position of the target WiFi AP device, and determine the target room where the target mobile device is located based on the target location. The first acquisition module 702 is used to acquire a first WiFi signal strength set corresponding to multiple workstations in the target room. The first WiFi signal strength set includes the WiFi signal strength of the WiFi signal sent by the mobile device at each workstation location, which can be received by the WiFi AP device. The second acquisition module 703 is used to acquire a second WiFi signal strength set corresponding to at least one mobile device in the target room. The second WiFi signal strength set includes the WiFi signal strength of the WiFi signal received by the WiFi AP device corresponding to the at least one mobile device. The at least one mobile device includes the target mobile device. The calculation module 704 is used to calculate the matching weight between the first mobile device in the at least one mobile device and each workstation using the first WiFi signal strength set and the second WiFi signal strength set, wherein the first mobile device is each mobile device or each type of mobile device in the at least one mobile device; The second determining module 705 is used to input the information of the multiple workstations, the information of the at least one mobile device, and the matching weight into the maximum matching KM algorithm model to obtain the target workstation matched by the target mobile device, and to determine the coordinate position of the target workstation as the position of the target mobile device.
[0086] Optionally, the first determining module 701 includes: The first determining submodule is used to determine the coordinate position of the target WiFi AP device as the target position of the target mobile device if the WiFi signal strength of the WiFi signal sent by the target mobile device received by the target WiFi AP device is greater than a preset value when the number of target WiFi AP devices is 1. The second determining submodule is used to determine the location weight of each target WiFi AP device based on the WiFi signal strength of the WiFi signal sent by the target mobile device received by the target WiFi AP device when the number of target WiFi AP devices is greater than 1; and to obtain the target location of the target mobile device by summing the product of the coordinate position of the target WiFi AP device and the corresponding location weight.
[0087] Optionally, the second determining submodule is used to determine the location weight of each target WiFi AP device according to the following formula: , in, Let i be the location weight of the i-th target WiFi AP device. Let A be the WiFi signal strength of the WiFi signal transmitted by the target mobile device received by the i-th target WiFi AP device. Let A be a constant, and A is greater than 1. The absolute value of M, where M is the number of the target WiFi AP devices; The target location of the target mobile device is calculated using the following formula: , , Where x and y represent the x-axis and y-axis coordinates of the target mobile device, respectively. y and x are the coordinates of the i-th target WiFi AP device, respectively.
[0088] Optionally, the first determining module 701 further includes: The first acquisition submodule is used to acquire the coordinate positions of N WiFi AP devices that have received the WiFi signal sent by the target mobile device, where N is an integer greater than 2; The connecting submodule is used to connect the N coordinate positions with straight lines to form a polygon; The third determining submodule is used to determine the N WiFi AP devices as the target WiFi AP devices if the smallest interior angle of any triangle contained in the polygon is greater than or equal to a preset angle value. The fourth determination submodule is used to determine the two WiFi AP devices with the strongest signal strength among the N WiFi AP devices as the target WiFi AP devices if the minimum interior angle of each triangle in all triangles contained in the polygon is less than the preset angle value.
[0089] Optionally, the first acquisition module 702 includes: The second acquisition submodule is used to acquire the distance between each workstation and each WiFi AP device in the target room. The first calculation submodule is used to calculate, based on the distance, the ideal signal strength of the WiFi signal transmitted by the mobile device at each workstation location that the WiFi AP device can receive, according to the following formula, to obtain the first WiFi signal strength set: , Where d represents the distance between the workstation and the WiFi AP device; This represents the WiFi signal strength value that the WiFi AP device can receive from the WiFi signal sent by the mobile device at the location of the workstation when the distance between the workstation and the WiFi AP device is d meters. a and b are coefficients, respectively. The calculation module 704 is used to calculate the matching weight between the first mobile device and each workstation according to the following formula: , in, Let be the set of second WiFi signal strengths corresponding to the i-th mobile device, denoted as ,in, This represents the WiFi signal strength received by C WiFi AP devices from the WiFi signal sent by the i-th mobile device. Let be the set of first WiFi signal strengths corresponding to the j-th workstation, denoted as: ,in, This represents the WiFi signal strength that L WiFi AP devices can receive from the WiFi signal transmitted by the mobile device at the j-th workstation. express The model, express The model.
[0090] Optionally, the second acquisition module 703 includes: The third acquisition submodule is used to acquire K media access control MAC addresses of K electronic devices connected to the WiFi AP device in the target room, where K is an integer greater than 0; The fourth acquisition submodule is used to acquire P MAC addresses with preset characteristics from the K MAC addresses, wherein the P MAC addresses correspond to P mobile devices, P is an integer greater than 0, and P≤K; The fifth acquisition submodule is used to acquire the WiFi signal strength of the WiFi signals sent by the P mobile devices received by the WiFi AP device, and obtain the second WiFi signal strength set.
[0091] Optionally, when the number of mobile devices in the target room is less than or equal to the number of workstations in the target room, the second acquisition module 703 is specifically used for: The WiFi signal strength of the WiFi signal sent by the at least one mobile device received by the WiFi AP device is determined as the second WiFi signal strength set, which includes the WiFi signal strength of the WiFi signal sent by each mobile device received by the WiFi AP device. When the number of mobile devices in the target room is greater than the number of workstations in the target room, the second acquisition module 703 is specifically used for: Based on the WiFi signal strength corresponding to the mobile device, the at least one mobile device is clustered to obtain at least one type of mobile device. The average WiFi signal strength of the WiFi signal sent by each type of mobile device received by the same WiFi AP device is calculated, and the average WiFi signal strength is used to determine the second WiFi signal strength set, wherein the second WiFi signal strength set includes the average WiFi signal strength of each type of mobile device received by each WiFi AP device. The computing module 704 is specifically used for: Using the first WiFi signal strength set and the second WiFi signal strength set, calculate the matching weight between each type of mobile device and each workstation; The second determining module 705 is specifically used for: The information of the multiple workstations, the information of the at least one type of mobile device, and the matching weight are input into the maximum matching KM algorithm model to obtain the target workstation matched by the target type of mobile device, and the coordinate position of the target workstation is determined as the position of each mobile device in the target type of mobile device, wherein the target type of mobile device includes the target mobile device.
[0092] The WiFi-based positioning device 700 can achieve Figure 1 The various processes implemented in the method embodiments can achieve the same technical effect, and will not be described again here to avoid repetition.
[0093] like Figure 8 As shown, this application embodiment also provides an electronic device 800, including: a processor 801, a memory 802, and a program stored in the memory 802 and executable on the processor 801. When the program is executed by the processor 801, it implements the various processes of the above-described WiFi-based positioning method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0094] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, this computer program implements the various processes of the WiFi-based positioning method embodiments described above, achieving the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0095] This application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above-described... Figure 1 The various processes of the method embodiments shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0096] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0097] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0098] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A WiFi-based positioning method, characterized in that, The method comprises the following steps: obtaining a WiFi signal strength of a WiFi signal sent by a target mobile device and received by a target WiFi access point (AP) device, determining a target position of the target mobile device according to the WiFi signal strength and a coordinate position of the target WiFi AP device, and determining a target room in which the target mobile device is located according to the target position; obtaining a first set of WiFi signal strengths corresponding to a plurality of workstations in the target room, wherein the first set of WiFi signal strengths comprises WiFi signal strengths of WiFi signals sent by mobile devices at positions of the workstations and received by a WiFi AP device; obtaining a second set of WiFi signal strengths corresponding to at least one mobile device in the target room, wherein the second set of WiFi signal strengths comprises WiFi signal strengths of WiFi signals corresponding to the at least one mobile device and received by the WiFi AP device, and the at least one mobile device comprises the target mobile device; calculating a matching weight of a first mobile device in the at least one mobile device and each workstation by using the first set of WiFi signal strengths and the second set of WiFi signal strengths, wherein the first mobile device is each mobile device or each type of mobile device in the at least one mobile device; inputting information of the plurality of workstations, information of the at least one mobile device, and the matching weight into a maximum matching (KM) algorithm model to obtain a target workstation matched by the target mobile device, and determining a coordinate position of the target workstation as a position of the target mobile device.
2. The method of claim 1, wherein, The method further comprises the following steps: in a case where the number of the target WiFi AP devices is 1, if the WiFi signal strength of the WiFi signal sent by the target mobile device and received by the target WiFi AP device is greater than a preset value, determining the coordinate position of the target WiFi AP device as the target position of the target mobile device; in a case where the number of the target WiFi AP devices is greater than 1, determining a position weight of each target WiFi AP device according to the WiFi signal strength of the WiFi signal sent by the target mobile device and received by the target WiFi AP device, and summing a product of the coordinate position of the target WiFi AP device and the corresponding position weight to obtain the target position of the target mobile device.
3. The method of claim 2, wherein, The method further comprises the following steps: calculating the position weight of each target WiFi AP device according to the following formula: , wherein, is a position weight of the i-th target WiFi AP device, is a WiFi signal strength of a WiFi signal sent by the target mobile device and received by the i-th target WiFi AP device, A is a constant, and A is greater than an absolute value of the WiFi signal strength, and M is a number of the target WiFi AP devices. The method further comprises the following steps: calculating the target position of the target mobile device according to the following formula: , , Wherein, x, y respectively represent the x-axis, y-axis coordinates of the target mobile device, Respectively, the x-axis, y-axis coordinates of the i-th target WiFi AP device.
4. The method of claim 2, wherein, Before the determining the position weight of each target WiFi AP device according to the WiFi signal strength of the WiFi signal sent by the target mobile device and received by the target WiFi AP device, the method further comprises: obtaining N coordinate positions of N WiFi AP devices receiving the WiFi signal sent by the target mobile device, N being an integer greater than 2; connecting the N coordinate positions with straight lines to form a polygon; if the minimum internal angle of any triangle contained in the polygon is greater than or equal to a preset angle value, determining the N WiFi AP devices as the target WiFi AP devices; if the minimum internal angle of each triangle contained in the polygon is less than the preset angle value, obtaining two WiFi AP devices with the maximum signal strength from the N WiFi AP devices to determine as the target WiFi AP devices.
5. The method according to any one of claims 1 to 4, characterized in that, The obtaining the first WiFi signal strength set corresponding to the plurality of workstations in the target room comprises: obtaining the distance between each workstation and each WiFi AP device in the target room; calculating the ideal signal strength of the WiFi signal sent by the mobile device at the position of each workstation and received by the WiFi AP device according to the distance according to the following formula to obtain the first WiFi signal strength set: , Wherein, d represents the distance between the station and the WiFi AP device; The WiFi signal strength value of the WiFi signal sent by the mobile device at the position of the station and received by the WiFi AP device when the distance between the station and the WiFi AP device is d meters, a and b are coefficients respectively. The calculating the matching weight of the first mobile device in the at least one mobile device and each workstation using the first WiFi signal strength set and the second WiFi signal strength set comprises: calculating the matching weight of the first mobile device and each workstation according to the following formula: , wherein, is a second set of WiFi signal strengths corresponding to the i-th mobile device, denoted as wherein, represents the WiFi signal strength of the WiFi signal transmitted by the i-th mobile device and received by the C WiFi AP devices; is a first set of WiFi signal strengths corresponding to the j-th workstation, denoted as wherein, represents the WiFi signal strength of the WiFi signal transmitted by the mobile device at the j-th workstation and received by the L WiFi AP devices, represents the modulus of represents the modulus of . 6. The method of claim 5, wherein, The obtaining the second WiFi signal strength set corresponding to the at least one mobile device in the target room comprises: obtaining K media access control (MAC) addresses of K electronic devices connected with the WiFi AP device in the target room, K being an integer greater than 0; obtaining P MAC addresses with preset characteristics from the K MAC addresses, the P MAC addresses corresponding to P mobile devices, P being an integer greater than 0 and P≤K; obtaining the WiFi signal strength of the WiFi signal sent by the P mobile devices and received by the WiFi AP device to obtain the second WiFi signal strength set.
7. The method of claim 1, wherein, In the case that the number of mobile devices in the target room is less than or equal to the number of workstations in the target room, the obtaining the second WiFi signal strength set corresponding to the at least one mobile device in the target room comprises: determining the WiFi signal strength of the WiFi signal sent by the at least one mobile device and received by the WiFi AP device as the second WiFi signal strength set, the second WiFi signal strength set comprising the WiFi signal strength of the WiFi signal sent by each mobile device and received by the WiFi AP device; In a case where the number of mobile devices in the target room is greater than the number of workstations in the target room, the obtaining of the second set of WiFi signal strengths corresponding to at least one mobile device in the target room comprises: According to the WiFi signal strengths corresponding to the mobile devices, clustering the at least one mobile device to obtain at least one type of mobile device, calculating an average value of the WiFi signal strengths of the WiFi signals sent by each type of mobile device and received by each WiFi AP device, and determining the second set of WiFi signal strengths by using the average values of the WiFi signal strengths, wherein the second set of WiFi signal strengths comprises the average values of the WiFi signal strengths of the WiFi signals sent by each type of mobile device and received by each WiFi AP device; The calculation of the matching weight of a first mobile device in the at least one mobile device and each workstation by using the first set of WiFi signal strengths and the second set of WiFi signal strengths comprises: The calculation of the matching weight of each type of mobile device and each workstation by using the first set of WiFi signal strengths and the second set of WiFi signal strengths; The inputting of the information of the plurality of workstations, the information of the at least one mobile device, and the matching weight into a maximum matching KM algorithm model to obtain a target workstation matched by the target mobile device, and the determination of the coordinate position of the target workstation as the position of the target mobile device comprises: The inputting of the information of the plurality of workstations, the information of the at least one type of mobile device, and the matching weight into a maximum matching KM algorithm model to obtain a target workstation matched by a target type of mobile device, and the determination of the coordinate position of the target workstation as the position of each mobile device in the target type of mobile device, wherein the target type of mobile device comprises the target mobile device.
8. A WiFi-based positioning apparatus, comprising: Comprise: The first determination module is configured to obtain a WiFi signal strength of a WiFi signal sent by a target mobile device and received by a target WiFi access point (AP) device, determine a target position of the target mobile device according to the WiFi signal strength and a coordinate position of the target WiFi AP device, and determine a target room in which the target mobile device is located according to the target position; The first obtaining module is configured to obtain a first set of WiFi signal strengths corresponding to a plurality of workstations in the target room, wherein the first set of WiFi signal strengths comprises a WiFi signal strength of a WiFi signal sent by a mobile device at a position of each workstation and received by a WiFi AP device; The second obtaining module is configured to obtain a second set of WiFi signal strengths corresponding to at least one mobile device in the target room, wherein the second set of WiFi signal strengths comprises a WiFi signal strength of a WiFi signal corresponding to the at least one mobile device and received by a WiFi AP device, and the at least one mobile device comprises the target mobile device. a calculating module, configured to calculate a matching weight of a first mobile device in the at least one mobile device and each workstation by using the first set of WiFi signal strengths and the second set of WiFi signal strengths, the first mobile device being each mobile device or each type of mobile device in the at least one mobile device; a second determining module, configured to input information of the multiple workstations, information of the at least one mobile device and the matching weight into a maximum matching KM algorithm model, to obtain a target workstation matched by the target mobile device, and to determine a coordinate position of the target workstation as a position of the target mobile device.
9. An electronic device, comprising: comprising: a processor, a memory, and a program stored on the memory and executable on the processor, the program, when executed by the processor, implementing steps of the WiFi-based positioning method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, a computer readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing steps of the WiFi-based positioning method according to any one of claims 1 to 7.
11. A computer program product, characterised in that, computer instructions, which, when executed by a processor, implement steps of the WiFi-based positioning method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Indoor passive positioning method based on WiFi
CN111866742A
WiFi-based signal indoor positioning method
CN119071750A
Location detection system and location detection device
JP2017207295A
Indoor Location System
US20170230801A1
Zero-shot deep learning for multi-target RF positioning
US20240259984A1