A WiFi fingerprint library updating method and device and electronic equipment
Patent Information
- Application Number
- CN202210237223.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2042-03-11
AI Technical Summary
[0004]本公开提供了一种一种WiFi指纹库更新方法、装置、电子设备及存储介质,以解决WiFi指纹库中更新定位精度较差的问题
[0020]本公开中,首先获取需要获取采集位置中一部分采集位置的WiFi信号强度值,并以收集到的WiFi信号强度值构建信号强度分布矩阵,从信号强度分布矩阵中可以得到信号分布数据,依据信号分布数据和采集到的WiFi信号强度值可以得到需要采集位置中未采集位置的WiFi信号强度值,通过此方法完成对WiFi指纹库的更新操作,并且提高WiFi指纹库中更新的定位精度。
Smart Images

Figure CN116782374B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of mobile communication and Internet of Things (IoT) technology, and in particular to a method, apparatus, and electronic device for updating a WIFI fingerprint database. Background Technology
[0002] With the rapid development of IoT technology, indoor positioning technology has become a hot topic, and WiFi-based fingerprint positioning algorithms have received widespread attention. In this system, the WiFi signal strength received at each location in an indoor environment is related to the distance to an Access Point (AP). Each location can be called a fingerprint point, and the fingerprint point and its received WiFi signal strength constitute a fingerprint. The fingerprint database represents a set of fingerprints within the indoor testing area. When the locations of some Access Points change, the WiFi fingerprint database also needs to be updated.
[0003] In existing technologies, to achieve automatic updates to the WiFi fingerprint database, signal strength at each point can be directly calculated by manually collecting on-site measurement data. Alternatively, signal strength at each point can be obtained by collecting data from a small number of known points and constructing a signal attenuation model. However, most existing technologies are based on ideal conditions, assuming that the signal collection area exhibits a complete Gaussian-like distribution. In reality, WiFi signals in many indoor scenarios can only cover part of the collection area. For some WiFi signal distribution curves, only one side or a segment of the Gaussian-like curve can be collected. If Gaussian functions are used for fitting directly, there will be significant differences, or even no fitting at all, resulting in a large error in the final result. Summary of the Invention
[0004] This disclosure provides a method, apparatus, electronic device, and storage medium for updating a WiFi fingerprint database, in order to solve the problem of poor positioning accuracy in updating WiFi fingerprint databases.
[0005] According to one aspect of this disclosure, a method for updating a WiFi fingerprint database is provided, comprising:
[0006] Obtain the WiFi signal strength values of N collection locations out of M locations in the WiFi fingerprint database, where M is an integer greater than 1 and N is a positive integer less than M;
[0007] A signal strength distribution matrix is created based on the WiFi signal strength values from the N collection locations;
[0008] Signal distribution data is generated based on the signal intensity distribution matrix;
[0009] Based on the signal distribution data and the WiFi signal strength values at the N collection locations, the WiFi signal strength values at the M locations in the WiFi fingerprint database are updated.
[0010] According to another aspect of this disclosure, a WiFi fingerprint database update apparatus is provided, comprising:
[0011] The acquisition module is used to acquire the WiFi signal strength values of N collection locations out of M locations in the WiFi fingerprint database, where M is an integer greater than 1 and N is a positive integer less than M;
[0012] A module is created to generate a signal strength distribution matrix based on the WiFi signal strength values from the N collection locations;
[0013] The generation module is used to generate signal distribution data based on the signal strength distribution matrix;
[0014] The update module is used to update the WiFi signal strength values of the M locations in the WiFi fingerprint database based on the signal distribution data and the WiFi signal strength values of the N collection locations.
[0015] According to another aspect of this disclosure, an electronic device is provided, comprising:
[0016] At least one processor; and
[0017] A memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the WiFi fingerprint database update method provided in this disclosure.
[0019] According to another aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the WiFi fingerprint database update method provided in this disclosure.
[0020] In this disclosure, the WiFi signal strength values of a portion of the collection locations to be collected are first obtained, and a signal strength distribution matrix is constructed using the collected WiFi signal strength values. Signal distribution data can be obtained from the signal strength distribution matrix. Based on the signal distribution data and the collected WiFi signal strength values, the WiFi signal strength values of the uncollected locations in the collection locations to be collected can be obtained. This method completes the update operation of the WiFi fingerprint database and improves the positioning accuracy of the updated WiFi fingerprint database.
[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0022] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0023] Figure 1 This is a flowchart of a WiFi fingerprint database update method provided in this disclosure;
[0024] Figure 2 This is a structural diagram of a WiFi fingerprint database update device disclosed herein;
[0025] Figure 3 This is another structural diagram of a WiFi fingerprint database update device provided in this disclosure;
[0026] Figure 4 This is another structural diagram of a WiFi fingerprint database update device provided in this disclosure;
[0027] Figure 5 This is another structural diagram of a WiFi fingerprint database update device provided in this disclosure;
[0028] Figure 6 This is a block diagram of an electronic device used to implement the WiFi fingerprint database update method according to embodiments of the present disclosure. Detailed Implementation
[0029] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0030] Please see Figure 1 , Figure 1 This is a flowchart of a WiFi fingerprint database update method provided in this disclosure, such as... Figure 1 As shown, it includes the following steps:
[0031] Step S101: Obtain the WiFi signal strength values of N collection locations out of M locations in the WiFi fingerprint database, where M is an integer greater than 1 and N is a positive integer less than M.
[0032] The M locations mentioned above can be any location indoors where signal strength collection is to be performed, and the N collection locations mentioned above can be parts of the indoor WiFi signal coverage area.
[0033] WiFi signal strength values are collected at the above N collection locations. The collected data can be from a WiFi fingerprint database, and the WiFi signal strength values at the above N collection locations can be calculated from the distance to the AP wireless access point (Access Point) and environmental factors.
[0034] In addition, the above N acquisition locations can be selected at even intervals from the above M locations and the signals can be acquired.
[0035] Step S102: Create a signal strength distribution matrix based on the WiFi signal strength values of the N collection locations.
[0036] The above signal intensity distribution matrix can be constructed in the following way:
[0037] Suppose that the WiFi signal strength values of the above M locations need to be collected in the WiFi fingerprint database, and M = m * n. Then, N collection locations are selected at even intervals among the above M locations as signal collection locations, where N = m / 2 * n / 2. The above N collection locations represent 1 / 4 of the above M locations, and the interval between m and n is 1.
[0038] If fingerprints with the same identifier are stored together in the collected data, the WiFi signal strength value of the collection location of the k-th identifier can be expressed by this formula:
[0039]
[0040] Where m and n represent the x-coordinate and y-coordinate of the acquisition location within the acquisition area, respectively, rssi i,j This represents the WiFi signal strength value at the sampling location (i,j).
[0041] It should be noted that if no WiFi signal is detected at the location, then the rssi value for that location will be 0.
[0042] In addition, the signal strength distribution matrix described above can clearly represent the WiFi signal strength values at the above N collection locations, which not only intuitively reflects the data but also facilitates the calculation of WiFi signal strength values.
[0043] It should be understood that the number of the above N collection locations can be set according to the indoor collection environment or computing needs. The number of the above N collection locations can be 1 / 2, 1 / 3 or 1 / 4 of the number of the above M locations. This embodiment of the invention does not limit this.
[0044] Step S103: Generate signal distribution data based on the signal strength distribution matrix.
[0045] The above signal distribution data represent the specific parts of the Gaussian function corresponding to the elements in the above intensity distribution matrix.
[0046] The signal distribution data mentioned above can be obtained by analyzing and calculating the signal strength distribution matrix row by row or column by column. For example, the signal strength distribution matrix can be grouped into rows or columns, and the WiFi signal strength value can be analyzed for each row group or column group. The maximum WiFi signal strength value in each row group or column group and the minimum WiFi signal strength value at the beginning and end of each row group or column group can be found. The WiFi signal strength values of each collection location that meet the conditions can be obtained. The collected data can be compared with the preset conditions to finally obtain the signal distribution data mentioned above.
[0047] The minimum WiFi signal strength value at the beginning and end of each row group or column group can be determined within a preset unit range. For example, the minimum WiFi signal strength value can be found in the first x elements of each row group or in the first x elements of each column group; the minimum WiFi signal strength value can be found in the last x elements of each row group or in the last x elements of each column group.
[0048] In addition, the signal distribution data mentioned above may include specific parts of the signal distribution of the row group or column group that resemble a Gaussian function, such as: the signal distribution of the row or column resembling the monotonically decreasing part of a Gaussian function; the signal distribution of the row or column resembling the monotonically increasing part of a Gaussian function; the signal distribution of the row or column resembling a Gaussian function that tends towards zero; or the signal distribution of the row or column resembling a Gaussian function that lies on both sides of the central axis.
[0049] It should be noted that the above signal distribution can be selected by comparing the differences in WiFi signal strength values to determine the corresponding part of the function. For example, if the difference between the maximum WiFi signal strength value in each row or column group and the minimum WiFi signal strength value at the beginning of each row or column group does not exceed a preset threshold, then the signal distribution of that row or column group is considered to resemble the monotonically decreasing part of a Gaussian function; if the difference between the maximum WiFi signal strength value in each row or column group and the minimum WiFi signal strength value at the end of each row or column group does not exceed a preset threshold, then the signal distribution of that row or column group is considered to resemble the monotonically increasing part of a Gaussian function. If the difference between the maximum WiFi signal strength value in a column group, the minimum WiFi signal strength value at the beginning of each row group or column group, and the minimum WiFi signal strength value at the end of each row group or column group does not exceed a preset threshold, then the signal distribution of that row group or column group resembles the portion of a Gaussian function approaching zero. If the difference between the maximum WiFi signal strength value in each row group or column group, the minimum WiFi signal strength value at the beginning of each row group or column group, and the minimum WiFi signal strength value at the end of each row group or column group all exceed a preset threshold, then the signal distribution of that row group or column group resembles the two sides of the central axis of a Gaussian function.
[0050] Step S104: Based on the signal distribution data and the WiFi signal strength values of the N collection locations, update the WiFi signal strength values of the M locations in the WiFi fingerprint database.
[0051] The signal distribution data described above can represent the function part corresponding to the signal distribution of each row or column group in the above N collection locations. Based on the corresponding function part, a corresponding signal attenuation model can be generated. By substituting the WiFi signal strength value of the required location in the above N collection locations into the signal attenuation model, the WiFi signal strength value of the uncollected location can be obtained.
[0052] One approach is to fit the WiFi signal distribution curve using partial curves from the corresponding functions. For example, partial curves from Gaussian, Cauchy, and multi-peak Gaussian functions can be used to fit the WiFi signal distribution curves, thereby estimating the WiFi signal strength value at locations not sampled.
[0053] In this implementation scheme, the number of fingerprint point locations to be collected is first set. Then, a portion of these locations are selected to collect and acquire WiFi signal strength values. The acquired WiFi signal strength values are used to construct a signal strength distribution matrix. Signal distribution data is obtained from the signal strength distribution matrix, which represents the signal distribution of the WiFi signal strength values in the matrix and the specific parts of the corresponding Gaussian-like functions. Based on this, a corresponding signal attenuation model is constructed. The WiFi signal strength values of the collected locations are substituted into the constructed signal attenuation model to obtain the WiFi signal strength values of the uncollected locations, thus completing the update of the WiFi fingerprint database. This method can improve the positioning accuracy of updating the WiFi fingerprint database with limited collection locations.
[0054] As an optional implementation, before generating signal distribution data based on the signal strength distribution matrix, the method further includes: if there is a target acquisition location with a WiFi signal strength value of 0 in the signal strength distribution matrix, and at least one of the signal strengths of the two adjacent acquisition locations to the left and right of the target acquisition location in the signal strength distribution matrix is not 0, then taking the average signal strength of the two adjacent acquisition locations to the left and right of the target acquisition location as the WiFi signal strength value of the target acquisition location; if there is a target acquisition location with a WiFi signal strength value of 0 in the signal strength distribution matrix, and both of the two adjacent acquisition locations to the left and right of the target acquisition location in the signal strength distribution matrix are 0, and at least one of the two adjacent acquisition locations to the top and bottom of the target acquisition location in the signal strength distribution matrix is not 0, then taking the average signal strength of the two adjacent acquisition locations to the top and bottom of the target acquisition location as the WiFi signal strength value of the target acquisition location.
[0055] In this implementation scheme, the zero element in the aforementioned signal strength distribution matrix undergoes optimization processing. First, the position of the zero element within the matrix is located, and the non-zero nature of its left and right adjacent elements is determined. If both are non-zero, the WiFi signal strength value of the zero element is replaced with the average of the WiFi signal strength values of its two adjacent elements. If at least one of the left and right elements is zero, the non-zero nature of its two upper and lower adjacent elements is determined. If both upper and lower adjacent elements are non-zero, the WiFi signal strength value of the zero element is replaced with the average of the WiFi signal strength values of its two upper and lower adjacent elements. This overall operation essentially preprocesses the aforementioned signal strength distribution matrix, reducing errors in subsequent calculations and thus improving the positioning accuracy updated in the WiFi fingerprint database.
[0056] As an optional implementation, generating signal distribution data based on the signal strength distribution matrix includes: dividing the WiFi signal strength values of the multiple fingerprint collection locations into several groups according to a first rule based on the signal strength distribution matrix, wherein the first rule includes the following: if the number of rows in the signal strength distribution matrix is greater than or equal to the number of columns, then the WiFi signal strength values of the multiple fingerprint collection locations are grouped by columns; if the number of rows in the signal strength distribution matrix is less than or equal to the number of columns, then the signal strength values of the multiple fingerprint collection locations are grouped by rows; obtaining the first numerical signal strength of each independent group in the several groups. The first numerical information includes the maximum WiFi signal strength value in each independent group, the minimum WiFi signal strength value among the first H sampling locations in each independent group, and the minimum WiFi signal strength value among the last K sampling locations in each independent group, where H and K are integers greater than 1; based on the first numerical information, signal distribution data for each independent group is generated, and the signal distribution data includes at least one of the following: the signal distribution is a monotonically decreasing part of a Gaussian-like function, the signal distribution is a monotonically increasing part of a Gaussian-like function, the signal distribution is a part of a Gaussian-like function approaching zero, and the signal distribution is a part on both sides of the central axis of a Gaussian-like function.
[0057] The first rule mentioned above can be set according to the distribution of WiFi signal strength values in the signal strength distribution matrix. Specifically, if the number of rows in the signal strength distribution matrix is greater than or equal to the number of columns, the WiFi signal strength values of the multiple fingerprint collection locations are grouped by columns; if the number of rows in the signal strength distribution matrix is less than or equal to the number of columns, the signal strength values of the multiple fingerprint collection locations are grouped by rows. This method ensures that the number of elements in each group meets the calculation requirements, thereby improving the accuracy of the calculation.
[0058] In this implementation scheme, the signal strength distribution matrix is grouped so that each group can match a curve in a Gaussian-like function. This allows the signal curve of each group to be highly matched with a function with higher similarity, thereby fitting a signal attenuation model or other calculation method with higher matching degree. This method can improve the positioning accuracy of the updated WiFi fingerprint database.
[0059] It should be noted that the specific values of H and K can be set according to the size of the signal strength distribution matrix and the actual indoor environment. On the other hand, H and K can be represented by values of the same size, and then data analysis can be performed on the signal strength distribution matrix, for example, to obtain the maximum WiFi signal strength value in each independent group, the minimum WiFi signal strength value in the first 3 collection locations, and the minimum WiFi signal strength value in the last 3 collection locations.
[0060] As an optional implementation, generating the signal distribution data for each independent group based on the first numerical information includes: if the difference between the largest WiFi signal strength value in each independent group and the smallest WiFi signal strength value in the first H sampling locations does not exceed a preset threshold, then the signal distribution of the independent group is a monotonically decreasing part of a Gaussian-like function; if the difference between the largest WiFi signal strength value in each independent group and the smallest WiFi signal strength value in the last K sampling locations does not exceed a preset threshold, then the signal distribution of the independent group is a monotonically increasing part of a Gaussian-like function; if the difference between the largest WiFi signal strength value in each independent group, the smallest WiFi signal strength value in the first H sampling locations, and the smallest WiFi signal strength value in the last K sampling locations does not exceed a preset threshold, then the signal distribution of the independent group is a Gaussian-like function approaching zero; if the difference between the largest WiFi signal strength value in each independent group, the smallest WiFi signal strength value in the first H sampling locations, and the smallest WiFi signal strength value in the last K sampling locations all exceed a preset threshold, then the signal distribution of the independent group is the portion on both sides of the central axis of a Gaussian-like function.
[0061] The aforementioned preset threshold can be set according to the signal acquisition environment or the signal strength of the AP wireless access point (Access Point), and this embodiment of the invention does not limit this.
[0062] Additionally, under normal circumstances, the preset threshold can be set around 5dB. For example: if the difference between the maximum WiFi signal strength value in each independent group and the minimum WiFi signal strength value in the first H sampling locations does not exceed ±5dB, then the signal distribution of the independent group is a monotonically decreasing part of a Gaussian-like function; if the difference between the maximum WiFi signal strength value in each independent group and the minimum WiFi signal strength value in the last K sampling locations does not exceed ±5dB, then the signal distribution of the independent group is a monotonically increasing part of a Gaussian-like function; if the difference between each If the difference between the largest WiFi signal strength value in each independent group, the smallest WiFi signal strength value in the first H sampling locations, and the smallest WiFi signal strength value in the last K sampling locations does not exceed ±5dB, then the signal distribution of the independent group is a Gaussian-like function approaching zero. If the difference between the largest WiFi signal strength value in each independent group, the smallest WiFi signal strength value in the first H sampling locations, and the smallest WiFi signal strength value in the last K sampling locations exceeds ±5dB, then the signal distribution of the independent group is a Gaussian-like function on both sides of the central axis.
[0063] In this implementation scheme, by determining the relationship between the largest WiFi signal strength value in each independent group, the smallest WiFi signal strength value in the first H collection locations, and the smallest WiFi signal strength value in the last K collection locations, the corresponding Gaussian function curve part of the signal curve matching for that independent group is determined, thereby fitting a signal attenuation model or other calculation method with a higher matching degree, and thus improving the calculation accuracy of WiFi signal strength values for uncollected locations.
[0064] As an optional implementation, determining the WiFi signal strength value of a set location based on the signal distribution data and the WiFi signal strength values of the plurality of fingerprint collection locations includes: determining a signal attenuation model of the signal strength distribution matrix based on the signal distribution data, wherein the signal attenuation model includes at least one of the following: a first attenuation model, a second attenuation model, a third attenuation model, and a fourth attenuation model, wherein the first signal attenuation model is generated based on the WiFi signal strength values of fingerprint collection locations whose signal distribution is a monotonically decreasing part of a Gaussian-like function; the second signal attenuation model is generated based on the WiFi signal strength values of fingerprint collection locations whose signal distribution is a monotonically increasing part of a Gaussian-like function; the third signal attenuation model is generated based on the WiFi signal strength values of fingerprint collection locations whose signal distribution is a Gaussian-like function approaching zero; and the fourth signal attenuation model is generated based on the WiFi signal strength values of fingerprint collection locations whose signal distribution is a Gaussian-like function on both sides of the central axis; and the WiFi signal strength values of the plurality of fingerprint collection locations are used as input to obtain the WiFi signal strength value of the set location through the corresponding attenuation model.
[0065] The Gaussian-like function in the above signal distribution data can be a Cauchy function, which serves as the basis for constructing the above signal attenuation model. The Cauchy function can be set in the following form:
[0066]
[0067] In addition, the first attenuation model, the second attenuation model, the third attenuation model and the fourth attenuation model mentioned above are all generated from the WiFi signal strength values of the fingerprint collection locations corresponding to the Cauchy function curves.
[0068] The generation of the first attenuation model described above can be represented by the following steps:
[0069] 1. Normalize the maximum WiFi signal strength value in each independent group, the minimum WiFi signal strength value in the first H collection locations, and the minimum WiFi signal strength value in the last K collection locations:
[0070] R(max) = rssi max / |rssimin(2) +1
[0071] R(min(1))=rssi min(1) / |rssi min(2) +1
[0072] R(min(2))=rssi min(2) / |rssi min(2) +1
[0073] Among them, rssi max RSSI represents the maximum WiFi signal strength value in each independent group. min(1) The rssi value represents the minimum WiFi signal strength among the first H sampling locations. min(2) This represents the minimum WiFi signal strength value among the last K sampling locations.
[0074] 2. Substituting (0, R(max)) into the Cauchy function above, we obtain γ = 1 / πR(max), and taking the x value of f(x; 0, 1) = 0.01 as the right-hand boundary of the attenuation model, we use the following formula as the attenuation model in this case:
[0075]
[0076] in,
[0077] The generation of the second attenuation model described above can be represented by the following steps:
[0078] 1. Normalize the maximum WiFi signal strength value in each independent group, the minimum WiFi signal strength value in the first H collection locations, and the minimum WiFi signal strength value in the last K collection locations:
[0079] R(max) = rssi max / |rssi min(2) +1
[0080] R(min(1))=rssi min(1) / |rssi min(2) +1
[0081] R(min(2))=rssi min(2) / |rssi min(2) +1
[0082] Among them, rssi max RSSI represents the maximum WiFi signal strength value in each independent group. min(1) The rssi value represents the minimum WiFi signal strength among the first H sampling locations. min(2)This represents the minimum WiFi signal strength value among the last K sampling locations.
[0083] 2. The attenuation model in this case is obtained by applying the opposite conditions to the first attenuation model described above:
[0084]
[0085] The generation of the third attenuation model described above can be represented by the following steps:
[0086] The maximum WiFi signal strength value in each independent group, the minimum WiFi signal strength value in the first H collection locations, and the minimum WiFi signal strength value in the last K collection locations are normalized.
[0087] R(max) = rssi max / |rssi min(2) +1
[0088] R(min(1))=rssi min(1) / |rssi min(2) +1
[0089] R(min(2))=rssi min(2) / |rssi min(2) +1
[0090] Among them, rssi max RSSI represents the maximum WiFi signal strength value in each independent group. min(1) The rssi value represents the minimum WiFi signal strength among the first H sampling locations. min(2) This represents the minimum WiFi signal strength value among the last K sampling locations.
[0091] 2. The attenuation model is determined to be a straight line, therefore the attenuation model for this case is:
[0092]
[0093] The generation of the fourth attenuation model described above can be represented by the following steps:
[0094] 1. Normalize the maximum WiFi signal strength value in each independent group, the minimum WiFi signal strength value in the first H collection locations, and the minimum WiFi signal strength value in the last K collection locations:
[0095] R(max) = rssi max / |min(rssi min(1) ,rssi min(2) )|+1
[0096] R(min(1))=rssi min(1) / |min(rssi min(1) ,rssi min(2) )|+1
[0097] R(min(2))=rssi min(2) / |min(rssi min(1) ,rssi min(2) )|+1
[0098] Among them, rssi max RSSI represents the maximum WiFi signal strength value in each independent group. min(1) The rssi value represents the minimum WiFi signal strength among the first H sampling locations. min(2) Min(rssi) represents the minimum WiFi signal strength value among the last K sampling locations. min(1) ,rssi min(2) ) indicates rssi min(1) and rssi min(2) The smaller one.
[0099] 2. Substituting R(max) into f(x; 0, γ) yields the following formula:
[0100]
[0101] 3. Then transfer the RSSI min(1) and rssi min(2) The larger of (α, max(rssi)) min(1) ,rssi min(2) Substituting into the above formula, we get:
[0102]
[0103] That is, the fourth attenuation model mentioned above can be expressed by the following formula:
[0104]
[0105] In this implementation scheme, by classifying different signal curves and generating corresponding signal attenuation models for different signal curves and WiFi signal strength, the prediction and calculation of WiFi signal strength values can be completed in various situations, thereby improving the calculation accuracy of WiFi signal strength values for uncollected locations.
[0106] It should be noted that each independent group corresponds to a signal attenuation model, that is, a segment curve of the Cauchy distribution function.
[0107] As an optional implementation, obtaining the WiFi signal strength value of the set location by using the WiFi signal strength values of the multiple fingerprint collection locations as input through the signal attenuation model includes: determining the value range and the number of unknown collection locations in the signal attenuation model, wherein the number of unknown collection locations is the number of set locations minus the number of multiple fingerprint collection locations; determining the input value of the signal attenuation model based on the value range and the number of unknown collection locations; substituting the input value of the signal attenuation model into the signal attenuation model to obtain the WiFi signal strength value of the unknown collection location; and merging the WiFi signal strength value of the unknown collection location and the WiFi signal strength values of the multiple fingerprint collection locations to obtain the WiFi signal strength value of the set location.
[0108] The WiFi signal strength value of uncollected locations can be obtained by uniformly subtracting the signal strength from the collected locations using the signal attenuation model described above. The following example uses the fourth attenuation model to calculate the WiFi signal strength value of uncollected locations:
[0109] The formula for the fourth attenuation model mentioned above is as follows:
[0110]
[0111] 1. Divide the independent variable x into ranges, i.e., when x = 0, the maximum value of a certain row in the above signal intensity distribution matrix is given, and the minimum value at the beginning and end of the row is given respectively.
[0112] 2. Count the number of unknown sampling positions between the position of the maximum WiFi signal strength value in the row and the position of the minimum WiFi signal strength value at the beginning of the row (α), and the number of unknown sampling positions between the position of the minimum WiFi signal strength value at the end of the row (σ).
[0113] For example: the WiFi signal strength values of a certain independent group in the signal strength distribution matrix are distributed as follows:
[0114] h=[-53,-58,-56,-52,-43,-50,-55,-63,-64]
[0115] The maximum value is -43, and the minimum values among the first three values at the beginning and end of the row are -58 and -64 respectively. Therefore, in 'h', there are two other WiFi signal strength values between -58 and -43, and three other WiFi signal strength values between -43 and -64. Since these collected locations were collected at intervals of one, meaning there are half of the uncollected locations, there are a total of four collected locations between -58 and -43, and six collected locations between -43 and -64.
[0116] 3. Divide the interval of the fourth decay model above into 2*(i+1) equal parts and 2*(j+1) equal parts. The corresponding values of the independent variable x are... and
[0117] 4. Substitute the obtained x value into the fourth attenuation model above to obtain the corresponding y value. Since normalization has been performed before, inverse normalization is required to obtain the corresponding WiFi signal strength value, which is the estimated value of the corresponding sequential acquisition location.
[0118] In this implementation scheme, the generated signal attenuation model is first divided into value intervals. Then, the number of unknown sampling locations between known sampling locations needs to be obtained. The interval is then divided equally according to the number of unknown sampling locations, and the corresponding independent variable values are obtained. The independent variables are then substituted into the signal attenuation model to obtain the corresponding dependent variable values. Finally, the WiFi signal strength values of the corresponding unknown sampling locations are obtained through data processing optimization. This method can improve the positioning accuracy of the updated WiFi fingerprint database.
[0119] Please see Figure 2 , Figure 2 This disclosure provides a WiFi fingerprint database update device, such as... Figure 2 As shown, the WiFi fingerprint database update device 200 includes:
[0120] The acquisition module 201 is used to acquire the WiFi signal strength values of N collection locations out of M locations in the WiFi fingerprint database, where M is an integer greater than 1 and N is a positive integer less than M;
[0121] The creation module 202 is used to create a signal strength distribution matrix based on the WiFi signal strength values of the N collection locations;
[0122] Generation module 203 is used to generate signal distribution data based on the signal strength distribution matrix;
[0123] The update module 204 is used to update the WiFi signal strength values of the M locations in the WiFi fingerprint database based on the signal distribution data and the WiFi signal strength values of the N collection locations.
[0124] Optional, such as Figure 3 As shown, the device 200 further includes:
[0125] The first determining module 205 is used to determine the average signal strength of the target acquisition location as the WiFi signal strength value of the target acquisition location when there is a target acquisition location with a WiFi signal strength value of 0 in the signal strength distribution matrix, and at least one of the signal strengths of the two adjacent acquisition locations in the left and right of the target acquisition location in the signal strength distribution matrix is not 0.
[0126] The second determining module 206 is used to take the average signal strength of the two adjacent acquisition positions above and below the target acquisition position as the WiFi signal strength value of the target acquisition position when there is a target acquisition position with a WiFi signal strength value of 0 in the signal strength distribution matrix, and the two adjacent acquisition positions to the left and right of the target acquisition position in the signal strength distribution matrix are both 0, and at least one of the two adjacent acquisition positions to the top and bottom of the target acquisition position in the signal strength distribution matrix is not 0.
[0127] Optional, such as Figure 4 As shown, the generation module 203 includes:
[0128] Grouping unit 2031 is used to divide the WiFi signal strength values of the plurality of fingerprint collection locations into several groups according to the signal strength distribution matrix and a first rule, wherein the first rule includes the following: if the number of rows in the signal strength distribution matrix is greater than or equal to the number of columns, then the WiFi signal strength values of the plurality of fingerprint collection locations are grouped by columns; if the number of rows in the signal strength distribution matrix is less than or equal to the number of columns, then the signal strength values of the plurality of fingerprint collection locations are grouped by rows.
[0129] The acquisition unit 2032 is used to acquire the first numerical information of each independent group in the plurality of groups. The first numerical information includes the largest WiFi signal strength value in each independent group, the smallest WiFi signal strength value among the first H collection locations in each independent group, and the smallest WiFi signal strength value among the last K collection locations in each independent group, where H and K are integers greater than 1.
[0130] The first generation unit 2033 is used to generate the signal distribution data of each independent group based on the first numerical information. The signal distribution data includes at least one of the following: the signal distribution is a monotonically decreasing part of a Gaussian-like function, the signal distribution is a monotonically increasing part of a Gaussian-like function, the signal distribution is a part of a Gaussian-like function approaching zero, and the signal distribution is a part on both sides of the central axis of a Gaussian-like function.
[0131] Optionally, the generation unit 2033 includes: if the difference between the largest WiFi signal strength value in each independent group and the smallest WiFi signal strength value in the first H sampling locations does not exceed a preset threshold, then the signal distribution of the independent group is a monotonically decreasing part of a Gaussian-like function; if the difference between the largest WiFi signal strength value in each independent group and the smallest WiFi signal strength value in the last K sampling locations does not exceed a preset threshold, then the signal distribution of the independent group is a monotonically increasing part of a Gaussian-like function; if the difference between the largest WiFi signal strength value in each independent group, the smallest WiFi signal strength value in the first H sampling locations, and the smallest WiFi signal strength value in the last K sampling locations does not exceed a preset threshold, then the signal distribution of the independent group is a Gaussian-like function approaching zero; if the difference between the largest WiFi signal strength value in each independent group, the smallest WiFi signal strength value in the first H sampling locations, and the smallest WiFi signal strength value in the last K sampling locations all exceed a preset threshold, then the signal distribution of the independent group is the portion on both sides of the central axis of a Gaussian-like function.
[0132] Optional, such as Figure 5 As shown, the update module 204 includes:
[0133] The determining unit 2041 is used to determine a signal attenuation model of the signal strength distribution matrix based on the signal distribution data. The signal attenuation model includes at least one of the following: a first attenuation model, a second attenuation model, a third attenuation model, and a fourth attenuation model. The first signal attenuation model is generated based on the WiFi signal strength value of the fingerprint acquisition location where the signal distribution is a monotonically decreasing part of a Gaussian-like function. The second signal attenuation model corresponds to the fingerprint acquisition location where the signal distribution is a monotonically increasing part of a Gaussian-like function. The third signal attenuation model corresponds to the fingerprint acquisition location where the signal distribution is a Gaussian-like function approaching zero. The fourth signal attenuation model corresponds to the fingerprint acquisition location where the signal distribution is a Gaussian-like function with the signal distribution on both sides of the central axis.
[0134] The second generation unit 2042 is used to take the WiFi signal strength values of the multiple fingerprint collection locations as input and obtain the WiFi signal strength value of the set location through the corresponding attenuation model.
[0135] Optionally, the second generation unit 2042 includes: determining the value range and the number of unknown sampling locations in the signal attenuation model, wherein the number of unknown sampling locations is the number of set locations minus the number of multiple fingerprint sampling locations; determining the input value of the signal attenuation model based on the value range and the number of unknown sampling locations; substituting the input value of the signal attenuation model into the signal attenuation model to obtain the WiFi signal strength value of the unknown sampling location; and merging the WiFi signal strength value of the unknown sampling location and the WiFi signal strength value of the multiple fingerprint sampling locations to obtain the WiFi signal strength value of the set location.
[0136] According to embodiments of this disclosure, this disclosure also provides an electronic device and a readable storage medium.
[0137] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0138] like Figure 6 As shown, device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 602 or a computer program loaded from storage unit 608 into random access memory (RAM) 603. RAM 603 may also store various programs and data required for the operation of device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0139] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0140] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the WiFi fingerprint database update method. For example, in some embodiments, the WiFi fingerprint database update method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the WiFi fingerprint database update method described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the WiFi fingerprint database update method by any other suitable means (e.g., by means of firmware).
[0141] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0142] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0143] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0144] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0145] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0146] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0147] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0148] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for updating a WiFi fingerprint database, characterized in that, include: Obtain the WiFi signal strength values of N collection locations out of M locations in the WiFi fingerprint database, where M is an integer greater than 1 and N is a positive integer less than M; A signal strength distribution matrix is created based on the WiFi signal strength values from the N collection locations; Signal distribution data is generated based on the signal intensity distribution matrix; Based on the signal distribution data and the WiFi signal strength values at the N collection locations, the WiFi signal strength values at the M locations in the WiFi fingerprint database are updated; The generation of signal distribution data based on the signal strength distribution matrix includes: Based on the signal strength distribution matrix, the WiFi signal strength values of multiple fingerprint collection locations are divided into several groups according to a first rule. The first rule includes the following: if the number of rows in the signal strength distribution matrix is greater than or equal to the number of columns, the WiFi signal strength values of the multiple fingerprint collection locations are grouped by columns; if the number of rows in the signal strength distribution matrix is less than or equal to the number of columns, the signal strength values of the multiple fingerprint collection locations are grouped by rows. Obtain the first numerical information of each independent group in the plurality of groups. The first numerical information includes the largest WiFi signal strength value in each independent group, the smallest WiFi signal strength value among the first H collection locations in each independent group, and the smallest WiFi signal strength value among the last K collection locations in each independent group, where H and K are integers greater than 1. Based on the first numerical information, the signal distribution data of each independent group is generated. The signal distribution data includes at least one of the following: the signal distribution is a monotonically decreasing part of a Gaussian-like function, the signal distribution is a monotonically increasing part of a Gaussian-like function, the signal distribution is a part of a Gaussian-like function approaching zero, and the signal distribution is a part on both sides of the central axis of a Gaussian-like function.
2. The WiFi fingerprint database update method according to claim 1, characterized in that, Before generating signal distribution data based on the signal intensity distribution matrix, the method further includes: If there is a target sampling location with a WiFi signal strength value of 0 in the signal strength distribution matrix, and at least one of the signal strengths of the two adjacent sampling locations in the signal strength distribution matrix is not 0, the average signal strength of the two adjacent sampling locations is taken as the WiFi signal strength value of the target sampling location. If there is a target sampling location with a WiFi signal strength value of 0 in the signal strength distribution matrix, and the two adjacent sampling locations to the left and right of the target sampling location in the signal strength distribution matrix are both 0, and at least one of the two adjacent sampling locations above and below the target sampling location in the signal strength distribution matrix is not 0, then the average signal strength of the two adjacent sampling locations above and below is taken as the WiFi signal strength value of the target sampling location.
3. The WiFi fingerprint database update method according to claim 1, characterized in that, The step of generating the signal distribution data for each independent group based on the first numerical information includes: If the difference between the largest WiFi signal strength value in each independent group and the smallest WiFi signal strength value in the first H collection locations does not exceed a preset threshold, then the signal distribution of the independent group is a monotonically decreasing part of a Gaussian-like function. If the difference between the largest WiFi signal strength value in each independent group and the smallest WiFi signal strength value in the last K collection locations does not exceed a preset threshold, then the signal distribution of the independent group is a monotonically increasing part of a Gaussian-like function. If the difference between the largest WiFi signal strength value in each independent group, the smallest WiFi signal strength value in the first H collection locations, and the smallest WiFi signal strength value in the last K collection locations does not exceed a preset threshold, then the signal distribution of the independent group is a Gaussian-like function approaching zero. If the difference between the largest WiFi signal strength value in each independent group, the smallest WiFi signal strength value in the first H sampling locations, and the smallest WiFi signal strength value in the last K sampling locations all exceed a preset threshold, then the signal distribution of the independent group is the part on both sides of the central axis of a Gaussian-like function.
4. The WiFi fingerprint database update method according to claim 1, characterized in that, The process of determining the WiFi signal strength value at a set location based on the signal distribution data and the WiFi signal strength values at the multiple fingerprint collection locations includes: A signal attenuation model is determined based on the signal distribution data to establish the signal strength distribution matrix. The signal attenuation model includes at least one of the following: a first attenuation model, a second attenuation model, a third attenuation model, and a fourth attenuation model. Specifically, the first attenuation model generates WiFi signal strength values at fingerprint locations where the signal distribution is a monotonically decreasing portion of a Gaussian-like function; the second attenuation model generates WiFi signal strength values at fingerprint locations where the signal distribution is a monotonically increasing portion of a Gaussian-like function; the third attenuation model generates WiFi signal strength values at fingerprint locations where the signal distribution is a Gaussian-like function approaching zero; and the fourth attenuation model generates WiFi signal strength values at fingerprint locations where the signal distribution is a Gaussian-like function with the signal distribution occurring on both sides of the central axis. The WiFi signal strength values at the multiple fingerprint collection locations are used as inputs to obtain the WiFi signal strength value at the designated location through the corresponding attenuation model.
5. The WiFi fingerprint database update method according to claim 4, characterized in that, The step of obtaining the WiFi signal strength value of the designated location by using the WiFi signal strength values of the multiple fingerprint collection locations as input and passing them through the signal attenuation model includes: The value range and the number of unknown acquisition locations in the signal attenuation model are determined, wherein the number of unknown acquisition locations is the number of set locations minus the number of multiple fingerprint acquisition locations; The input value of the signal attenuation model is determined based on the value range and the number of unknown acquisition locations; Substitute the input value of the signal attenuation model into the signal attenuation model to obtain the WiFi signal strength value at the unknown sampling location; The WiFi signal strength values of the unknown collection location and the WiFi signal strength values of the multiple fingerprint collection locations are combined to obtain the WiFi signal strength value of the set location.
6. A WiFi fingerprint database update device, characterized in that, include: The acquisition module is used to acquire the WiFi signal strength values of N collection locations out of M locations in the WiFi fingerprint database, where M is an integer greater than 1 and N is a positive integer less than M; A module is created to generate a signal strength distribution matrix based on the WiFi signal strength values from the N collection locations; The generation module is used to generate signal distribution data based on the signal strength distribution matrix; An update module is used to update the WiFi signal strength values of the M locations in the WiFi fingerprint database based on the signal distribution data and the WiFi signal strength values of the N collection locations; The generation module includes: A grouping unit is used to divide the WiFi signal strength values of multiple fingerprint collection locations into several groups according to the signal strength distribution matrix and a first rule, wherein the first rule includes the following: if the number of rows in the signal strength distribution matrix is greater than or equal to the number of columns, then the WiFi signal strength values of the multiple fingerprint collection locations are grouped by columns; if the number of rows in the signal strength distribution matrix is less than or equal to the number of columns, then the signal strength values of the multiple fingerprint collection locations are grouped by rows. The acquisition unit is used to acquire first numerical information of each independent group in the plurality of groups. The first numerical information includes the largest WiFi signal strength value in each independent group, the smallest WiFi signal strength value among the first H collection locations in each independent group, and the smallest WiFi signal strength value among the last K collection locations in each independent group, where H and K are integers greater than 1. The first generation unit is used to generate the signal distribution data of each independent group based on the first numerical information. The signal distribution data includes at least one of the following: the signal distribution is a monotonically decreasing part of a Gaussian-like function, the signal distribution is a monotonically increasing part of a Gaussian-like function, the signal distribution is a part of a Gaussian-like function approaching zero, and the signal distribution is a part on both sides of the central axis of a Gaussian-like function.
7. The WiFi fingerprint database update device according to claim 6, characterized in that, The device further includes: The first determining module is used to determine the WiFi signal strength value of the target acquisition location when there is a target acquisition location with a WiFi signal strength value of 0 in the signal strength distribution matrix, and at least one of the signal strengths of the two adjacent acquisition locations in the signal strength distribution matrix is not 0. The second determining module is used to take the average signal strength of the two adjacent sampling positions above and below the target sampling position as the WiFi signal strength value of the target sampling position when there is a target sampling position with a WiFi signal strength value of 0 in the signal strength distribution matrix, and the two adjacent sampling positions to the left and right of the target sampling position in the signal strength distribution matrix are both 0, and at least one of the two adjacent sampling positions to the top and bottom of the target sampling position in the signal strength distribution matrix is not 0.
8. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 5.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, in, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 5.