CN116761249A - Indoor positioning method, fingerprint library construction method, electronic equipment and storage medium - Google Patents

Indoor positioning method, fingerprint library construction method, electronic equipment and storage medium Download PDF

Info

Publication number
CN116761249A
CN116761249A CN202211171058.3A CN202211171058A CN116761249A CN 116761249 A CN116761249 A CN 116761249A CN 202211171058 A CN202211171058 A CN 202211171058A CN 116761249 A CN116761249 A CN 116761249A
Authority
CN
China
Prior art keywords
detection data
sample
track detection
sample track
fingerprint
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211171058.3A
Other languages
Chinese (zh)
Other versions
CN116761249B (en
Inventor
陈园园
邓照飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211171058.3A priority Critical patent/CN116761249B/en
Publication of CN116761249A publication Critical patent/CN116761249A/en
Application granted granted Critical
Publication of CN116761249B publication Critical patent/CN116761249B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/33Services specially adapted for particular environments, situations or purposes for indoor environments, e.g. buildings

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The application discloses an indoor positioning method, a fingerprint library construction method, electronic equipment and a storage medium, and belongs to the technical field of terminal positioning. The method comprises the following steps: acquiring track detection data of the positioning equipment in response to positioning operation of the positioning equipment; determining the floor where the positioning equipment is located through a first classification model based on the track detection data; the first classification model is obtained by carrying out iterative training on a second classification model based on a first fingerprint database in advance, the first fingerprint database is obtained by carrying out data expansion on the second fingerprint database based on a fingerprint test set through the second classification model, the second classification model is obtained by carrying out training on an initial classification model based on the second fingerprint database, the second fingerprint database comprises a plurality of sample track detection data, and each sample track detection data in the plurality of sample track detection data is provided with a floor label. According to the application, the fingerprint library is expanded while the model is trained, so that the reliability of the fingerprint library and the positioning accuracy of the classification model are improved.

Description

Indoor positioning method, fingerprint library construction method, electronic equipment and storage medium
Technical Field
The present application relates to the field of terminal positioning technologies, and in particular, to an indoor positioning method, a fingerprint library construction method, an electronic device, and a storage medium.
Background
With the development of terminal positioning technology, indoor positioning technology is more and more popular. Indoor location technologies are diverse and include, for example, wireless fidelity (Wireless Fidelity, wiFi) fingerprint location technologies. The WiFi fingerprint positioning technology is a technology in which a positioning device determines position information according to scanned WiFi signals. In one application scenario, the floor on which the positioning device is located may be determined using WiFi fingerprint positioning technology.
The WiFi fingerprint positioning technology comprises an off-line testing stage and an on-line positioning stage, wherein the key of the off-line testing stage is to establish a fingerprint library, namely, a corresponding relation between floors and sample track detection data is established, wherein the sample track detection data comprises WiFi signal intensity detected at each track point in a plurality of track points. The model training may then be performed using the fingerprint library to obtain a classification model. Therefore, in the online positioning stage, positioning can be performed through the classification model according to the track detection data acquired by the positioning equipment.
However, since the sample track detection data in the fingerprint library is usually collected manually, and in order to train the classification model and test the positioning performance of the trained classification model, the manually collected sample track detection data is not only needed to be used for constructing the fingerprint library, but also needed to be used for constructing a fingerprint test set, so that the number of sample track data in the fingerprint library is small, and therefore, it is difficult to construct a reliable fingerprint library, so that the classification accuracy of the classification model trained based on the fingerprint library is low, and the positioning accuracy in the on-line positioning stage is affected.
Disclosure of Invention
The application provides an indoor positioning method, a fingerprint library construction method, electronic equipment and a storage medium, which can be used for solving the problem of low accuracy of classification models caused by unreliable fingerprint libraries in related technologies. The technical scheme is as follows:
in a first aspect, there is provided an indoor positioning method, the method comprising:
acquiring track detection data of positioning equipment in response to positioning operation of the positioning equipment;
determining the floor where the positioning equipment is located through a first classification model based on the track detection data;
the first classification model is obtained by carrying out iterative training on a second classification model based on a first fingerprint database in advance, the first fingerprint database is obtained by carrying out data expansion on the second fingerprint database through the second classification model based on a fingerprint test set, the second classification model is obtained by carrying out training on an initial classification model based on the second fingerprint database, the second fingerprint database comprises a plurality of sample track detection data, and each sample track detection data in the sample track detection data is provided with a floor label.
Therefore, under the condition that indoor positioning is required, track detection data of the positioning equipment can be acquired, and then the floor where the positioning equipment is located is determined through the first classification model according to the track detection data. Because the first classification model is obtained by training the first fingerprint database through data expansion, and the first fingerprint database is obtained by expanding the data of the second fingerprint database based on the fingerprint test set, the data volume in the first fingerprint database is more reliable, and the positioning accuracy of the first classification model is improved.
As an example of the present application, the first fingerprint library is obtained by performing traversal processing on sample track detection data in the fingerprint test set through the second classification model, and adding sample track detection data with a classification result confidence greater than or equal to a confidence threshold to the second fingerprint library in the traversal process.
Therefore, in the process of testing the positioning performance of the second classification model based on the fingerprint test set, the data volume of the second fingerprint database can be expanded, so that the data volume of the first fingerprint database is ensured, and the reliability of the first fingerprint database is improved.
As an example of the present application, the second fingerprint library is obtained by performing data expansion processing on the initial fingerprint library based on an initial fingerprint library and the fingerprint test set, where the initial fingerprint library is obtained by randomly selecting a second number of flat sample track detection data from the first number of obtained sample track detection data.
Therefore, by randomly selecting the second number of flat sample track detection data, the cross-layer sample track detection data cannot appear in the initial fingerprint library, and the reliability of the initial fingerprint library is ensured.
As an example of the present application, the fingerprint test set is a set of sample trace detection data remaining after random selection from the first number of sample trace detection data.
Therefore, the fingerprint test set and the initial fingerprint library are derived from the same batch of sample track detection data, so that the convenience for constructing the initial fingerprint library and the fingerprint test set is improved.
In a second aspect, a method for constructing a fingerprint library is provided, where the method includes:
acquiring a second fingerprint database and a fingerprint test set, wherein the second fingerprint database comprises a plurality of sample track detection data, and each sample track detection data in the plurality of sample track detection data is provided with a floor label;
performing iterative training on the initial classification model based on the second fingerprint library to obtain a second classification model;
traversing the sample track detection data in the fingerprint test set through the second classification model;
in the traversal process, sample track detection data with the confidence coefficient of the classification result being greater than or equal to a confidence coefficient threshold value is added into the second fingerprint library;
And when the traversal is finished, performing iterative training on the second classification model based on a first fingerprint library to obtain a first classification model, wherein the first fingerprint library is obtained by expanding the second fingerprint library in the traversal process, and the first classification model can determine the floor where the positioning equipment is located based on track detection data of any positioning equipment.
Therefore, the first classification model is obtained through training the first fingerprint database through data expansion, and the first fingerprint database is obtained after data expansion of the second fingerprint database based on the fingerprint test set, so that the data size in the first fingerprint database is reliable, and the positioning accuracy of the first classification model is improved.
As an example of the present application, the classification result includes a floor tag and a probability value corresponding to the floor tag;
the step of adding sample track detection data with the classification result confidence degree greater than or equal to the confidence degree threshold value to the second fingerprint database in the traversal process comprises the following steps:
in the traversal process, determining the confidence coefficient of the classification result corresponding to the first sample track detection data according to the probability value in the classification result corresponding to the first sample track detection data, wherein the first sample track detection data is any sample track detection data in the fingerprint test set traversed currently;
Updating the floor label of the first sample track detection data into the floor label in the classification result corresponding to the first sample track detection data under the condition that the confidence coefficient of the classification result corresponding to the first sample track detection data is larger than or equal to a confidence coefficient threshold value;
and adding the first sample track detection data with updated labels into the second fingerprint database.
Therefore, in the process of testing the second classification model based on the fingerprint test set, the second fingerprint database can be expanded in data, so that the model training and the fingerprint database construction achieve the complementary effect.
As an example of the present application, the acquiring the second fingerprint library and the fingerprint test set includes:
acquiring first number of sample track detection data, wherein the first number of sample track detection data at least comprises flat layer sample track detection data;
randomly selecting second number of flat sample track detection data from the first number of sample track detection data to obtain an initial fingerprint library;
determining a set formed by the sample track detection data which is remained after random selection in the first number of sample track detection data as the fingerprint test set;
And based on the initial fingerprint library and the fingerprint test set, performing data expansion processing on the initial fingerprint library to obtain the second fingerprint library.
Therefore, the initial fingerprint database is expanded through the fingerprint test set, so that the data volume of sample track detection data in the second fingerprint database is ensured, and the reliability of the second fingerprint database is improved.
As an example of the present application, the performing data expansion processing on the initial fingerprint library based on the initial fingerprint library and the fingerprint test set includes:
traversing each sample track detection data in the fingerprint test set in sequence;
determining Euclidean distance and Jacquard distance between second sample track detection data and each sample track detection data in the initial fingerprint library, wherein the second sample track detection data is currently traversed sample track detection data;
determining third sample track detection data with the maximum similarity with the second sample track detection data from the at least one third sample track detection data under the condition that at least one third sample track detection data exists in the initial fingerprint library, wherein the third sample track detection data refers to sample track detection data with Euclidean distance between the third sample track detection data and the second sample track detection data being smaller than a first distance threshold value, and with Jacquard distance between the third sample track detection data and the second sample track detection data being smaller than a second distance threshold value;
Updating the floor label of the second sample track detection data to the floor label of the determined third sample track detection data;
and adding the second sample track detection data with updated labels into the initial fingerprint library.
In this way, the rationality of expanding the initial fingerprint library is ensured by determining the third sample track detection data with the maximum similarity with the second sample track detection data from the at least one third sample track detection data.
As an example of the present application, in the case where at least one third sample trajectory detection data exists in the initial fingerprint library, determining third sample trajectory detection data having the greatest similarity with the second sample trajectory detection data from the at least one third sample trajectory detection data, includes:
acquiring third sample track detection data with minimum Euclidean distance with the second sample track data from at least one third sample track detection data under the condition that the at least one third sample track detection data exists in the initial fingerprint library; or alternatively, the process may be performed,
and acquiring third sample track detection data with the minimum Jacquard distance with the second sample track data from the at least one third sample track detection data under the condition that the at least one third sample track detection data exists in the initial fingerprint library.
In this way, the third sample track detection data with the highest similarity with the second sample track detection data is selected from the at least one third sample track detection data through the Euclidean distance or the Jacquard distance, so that the selected third sample track detection data is more accurate.
As an example of the present application, the performing data expansion processing on the initial fingerprint library based on the initial fingerprint library and the fingerprint test set includes:
traversing each sample track detection data in the fingerprint test set in sequence;
determining the similarity between second sample track detection data and each sample track detection data in the initial fingerprint library to obtain a plurality of similarities, wherein the second sample track detection data is currently traversed sample track detection data;
updating the floor label of the second sample track detection data to the floor label of the sample track detection data corresponding to the maximum similarity under the condition that the maximum similarity in the plurality of similarities is larger than or equal to a similarity threshold;
and adding the second sample track detection data with updated labels into the initial fingerprint library.
Therefore, the data expansion processing is carried out on the initial fingerprint library in different modes, so that the richness of determining the data expansion mode is increased.
As an example of the present application, before the step of randomly selecting the second number of flat layer sample track detection data from the first number of sample track detection data to obtain the initial fingerprint library, the method further includes:
under the condition that the first number of sample track detection data comprises sample track detection data with the track point number being greater than a number threshold, dividing the sample track detection data with the track point number being greater than the number threshold to obtain a third number of sample track detection data, wherein the track point number of each sample track detection data in the third number of sample track detection data is smaller than or equal to the number threshold;
the step of randomly selecting a second number of flat sample track detection data from the first number of sample track detection data to obtain an initial fingerprint library comprises the following steps:
and randomly selecting the second number of flat layer sample track detection data from the third number of sample track detection data to obtain the initial fingerprint library.
Therefore, the number of track points included in the longer sample track detection data is reduced by dividing the longer sample track detection data, and the calculation amount of the subsequent calculation based on the sample track detection data is reduced.
As an example of the present application, in the case where the first number of sample trajectory detection data includes sample trajectory detection data having a number of trajectory points greater than a number threshold, the dividing processing of the sample trajectory detection data having a number of trajectory points greater than the number threshold includes:
under the condition that the first number of sample track detection data comprises sample track detection data with the number of track points being greater than the number threshold, dividing the sample track detection data with the number of track points being greater than the number threshold at intervals to obtain fourth number of sample track detection data, wherein the dividing number is a number smaller than or equal to the number threshold;
and deleting the sample track detection data with the track point number smaller than the dividing value when the sample track detection data with the track point number smaller than the dividing value is included in the sample track detection data with the fourth number.
Therefore, the sample track detection data with the track point number larger than the number threshold value is divided into the intervals, so that the number of the sample track detection data can be expanded, the calculated amount in the subsequent model training can be reduced, and the accuracy of the model training is improved.
As an example of the present application, after the traversing processing of the sample trace detection data in the fingerprint test set by the second classification model, the method further includes:
obtaining the correct amount of classifying the sample track detection data in the fingerprint test set by the second classification model, traversing the sample track detection data in the fingerprint test set by the second classification model, and adding the addition amount of the sample track detection data into the second fingerprint library;
dividing the correct amount by the total sample amount of the fingerprint test set to obtain the classification accuracy, wherein the total sample amount of the fingerprint test set is the number of sample trace detection data included in the fingerprint test set before the sample trace detection data in the fingerprint test set is added to the second fingerprint library through the second classification model;
dividing the addition amount by the total sample amount to obtain the track utilization rate, wherein the classification accuracy rate and the track utilization rate are used for evaluating the positioning performance of the first classification model.
Therefore, the accuracy of the assessment of the positioning performance of the second classification model is improved by determining the classification accuracy and the track utilization rate of the second classification model, so that the positioning performance of the second classification model can be assessed by using specific data.
In a third aspect, an indoor positioning apparatus is provided, which has a function of implementing the indoor positioning method behavior in the first aspect. The indoor positioning device comprises at least one module, and the at least one module is used for realizing the indoor positioning method provided by the first aspect. The indoor positioning device may include:
the acquisition module is used for responding to the positioning operation of the positioning equipment and acquiring track detection data of the positioning equipment;
the determining module is used for determining the floor where the positioning equipment is located through a first classification model based on the track detection data;
the first classification model is obtained by carrying out iterative training on a second classification model based on a first fingerprint database in advance, the first fingerprint database is obtained by carrying out data expansion on the second fingerprint database through the second classification model based on a fingerprint test set, the second classification model is obtained by carrying out training on an initial classification model based on the second fingerprint database, the second fingerprint database comprises a plurality of sample track detection data, and each sample track detection data in the sample track detection data is provided with a floor label.
As an example of the present application, the first fingerprint library is obtained by performing traversal processing on sample track detection data in the fingerprint test set through the second classification model, and adding sample track detection data with a classification result confidence greater than or equal to a confidence threshold to the second fingerprint library in the traversal process.
As an example of the present application, the second fingerprint library is obtained by performing data expansion processing on the initial fingerprint library based on an initial fingerprint library and the fingerprint test set, where the initial fingerprint library is obtained by randomly selecting a second number of flat sample track detection data from the first number of obtained sample track detection data.
As an example of the present application, the fingerprint test set is a set of sample trace detection data remaining after random selection from the first number of sample trace detection data.
In a fourth aspect, a fingerprint library construction apparatus is provided, where the fingerprint library construction apparatus has a function of implementing the behavior of the fingerprint library construction method in the second aspect. The fingerprint library constructing device comprises at least one module, wherein the at least one module is used for realizing the fingerprint library constructing method provided by the second aspect. The fingerprint library constructing apparatus may include:
The first acquisition module is used for acquiring a second fingerprint database and a fingerprint test set, wherein the second fingerprint database comprises a plurality of sample track detection data, and each sample track detection data in the plurality of sample track detection data is provided with a floor label;
the first training module is used for carrying out iterative training on the initial classification model based on the second fingerprint library to obtain a second classification model;
the traversing module is used for traversing the sample track detection data in the fingerprint test set through the second classification model;
the adding module is used for adding sample track detection data with the classification result confidence coefficient being greater than or equal to a confidence coefficient threshold value into the second fingerprint library in the traversal process;
and the second training module is used for carrying out iterative training on the second classification model based on the first fingerprint library when the traversal is finished to obtain a first classification model, wherein the first fingerprint library is obtained after the second fingerprint library is expanded in the traversal process, and the first classification model can determine the floor where the positioning equipment is located based on the track detection data of any positioning equipment.
As an example of the present application, the classification result includes a floor tag and a probability value corresponding to the floor tag;
The adding module is used for:
in the traversal process, determining the confidence coefficient of the classification result corresponding to the first sample track detection data according to the probability value in the classification result corresponding to the first sample track detection data, wherein the first sample track detection data is any sample track detection data in the fingerprint test set traversed currently;
updating the floor label of the first sample track detection data into the floor label in the classification result corresponding to the first sample track detection data under the condition that the confidence coefficient of the classification result corresponding to the first sample track detection data is larger than or equal to a confidence coefficient threshold value;
and adding the first sample track detection data with updated labels into the second fingerprint database.
As an example of the present application, the first obtaining module is configured to:
acquiring first number of sample track detection data, wherein the first number of sample track detection data at least comprises flat layer sample track detection data;
randomly selecting second number of flat sample track detection data from the first number of sample track detection data to obtain an initial fingerprint library;
determining a set formed by the sample track detection data which is remained after random selection in the first number of sample track detection data as the fingerprint test set;
And based on the initial fingerprint library and the fingerprint test set, performing data expansion processing on the initial fingerprint library to obtain the second fingerprint library.
As an example of the present application, the first obtaining module is configured to:
traversing each sample track detection data in the fingerprint test set in sequence;
determining Euclidean distance and Jacquard distance between second sample track detection data and each sample track detection data in the initial fingerprint library, wherein the second sample track detection data is currently traversed sample track detection data;
determining third sample track detection data with the maximum similarity with the second sample track detection data from the at least one third sample track detection data under the condition that at least one third sample track detection data exists in the initial fingerprint library, wherein the third sample track detection data refers to sample track detection data with Euclidean distance between the third sample track detection data and the second sample track detection data being smaller than a first distance threshold value, and with Jacquard distance between the third sample track detection data and the second sample track detection data being smaller than a second distance threshold value;
updating the floor label of the second sample track detection data to the floor label of the determined third sample track detection data;
And adding the second sample track detection data with updated labels into the initial fingerprint library.
As an example of the present application, the first obtaining module is configured to:
acquiring third sample track detection data with minimum Euclidean distance with the second sample track data from at least one third sample track detection data under the condition that the at least one third sample track detection data exists in the initial fingerprint library; or alternatively, the process may be performed,
and acquiring third sample track detection data with the minimum Jacquard distance with the second sample track data from the at least one third sample track detection data under the condition that the at least one third sample track detection data exists in the initial fingerprint library.
As an example of the present application, the first obtaining module is configured to:
traversing each sample track detection data in the fingerprint test set in sequence;
determining the similarity between second sample track detection data and each sample track detection data in the initial fingerprint library to obtain a plurality of similarities, wherein the second sample track detection data is currently traversed sample track detection data;
Updating the floor label of the second sample track detection data to the floor label of the sample track detection data corresponding to the maximum similarity under the condition that the maximum similarity in the plurality of similarities is larger than or equal to a similarity threshold;
and adding the second sample track detection data with updated labels into the initial fingerprint library.
As an example of the present application, the first obtaining module is further configured to:
under the condition that the first number of sample track detection data comprises sample track detection data with the track point number being greater than a number threshold, dividing the sample track detection data with the track point number being greater than the number threshold to obtain a third number of sample track detection data, wherein the track point number of each sample track detection data in the third number of sample track detection data is smaller than or equal to the number threshold;
and randomly selecting the second number of flat layer sample track detection data from the third number of sample track detection data to obtain the initial fingerprint library.
As an example of the present application, the first obtaining module is configured to:
under the condition that the first number of sample track detection data comprises sample track detection data with the number of track points being greater than the number threshold, dividing the sample track detection data with the number of track points being greater than the number threshold at intervals to obtain fourth number of sample track detection data, wherein the dividing number is a number smaller than or equal to the number threshold;
And deleting the sample track detection data with the track point number smaller than the dividing value when the sample track detection data with the track point number smaller than the dividing value is included in the sample track detection data with the fourth number.
As an example of the present application, the apparatus further comprises:
the second obtaining module is used for obtaining the correct amount of classifying the sample track detection data in the fingerprint test set by the second classification model and the addition amount of the sample track detection data added into the second fingerprint database after traversing the sample track detection data in the fingerprint test set by the second classification model;
a first calculation module, configured to divide the correct amount by a total sample amount of the fingerprint test set to obtain the classification accuracy, where the total sample amount of the fingerprint test set is a number of sample trace detection data included in the fingerprint test set before the sample trace detection data in the fingerprint test set is added to the second fingerprint library through the second classification model;
and the second calculation module is used for dividing the addition amount by the total sample amount to obtain the track utilization rate, and the classification accuracy rate and the track utilization rate are used for evaluating the positioning performance of the first classification model.
In a fifth aspect, an electronic device is provided, where the electronic device includes a processor and a memory, where the memory is configured to store a program for supporting the electronic device to execute the indoor positioning method provided in the first aspect, and store data related to implementing the indoor positioning method in the first aspect. Or, the memory is used for storing a program for supporting the electronic device to execute the method for constructing the fingerprint library provided in the second aspect, and storing data related to the method for constructing the fingerprint library in the second aspect; the processor is configured to execute a program stored in the memory. The electronic device may further comprise a communication bus for establishing a connection between the processor and the memory.
In a sixth aspect, there is provided a computer-readable storage medium having instructions stored therein, which when run on a computer, cause the computer to perform the indoor positioning method described in the first aspect above, or cause the computer to perform the fingerprint library construction method described in the second aspect above.
In a seventh aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the indoor positioning method as described in the first aspect above, or cause the computer to perform the fingerprint library construction method as described in the second aspect above.
The technical effects obtained by the second, third, fourth, fifth, sixth and seventh aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and are not described in detail herein.
Drawings
Fig. 1 is a schematic diagram of an application scenario for collecting sample track detection data according to an embodiment of the present application;
fig. 2 is a schematic diagram of an application scenario of indoor positioning provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 4 is a block diagram of a software system of an electronic device provided by an embodiment of the present application;
fig. 5 is a schematic diagram of an application scenario of indoor positioning provided by an embodiment of the present application;
fig. 6 is a schematic diagram of another indoor positioning application scenario provided by an embodiment of the present application;
fig. 7 is a schematic diagram of another indoor positioning application scenario provided by an embodiment of the present application;
Fig. 8 is a schematic diagram of another indoor positioning application scenario provided by an embodiment of the present application;
FIG. 9 is a schematic flow chart of a method for indoor positioning according to an embodiment of the present application;
FIG. 10 is a schematic flow chart of a method for constructing a fingerprint library according to an embodiment of the present application;
FIG. 11 is a schematic diagram of sample trace detection data of a different type according to an embodiment of the present application;
FIG. 12 is a flowchart of a method for performing data expansion processing on an initial fingerprint database according to an embodiment of the present application;
FIG. 13 is a flowchart of another method for constructing a fingerprint library according to an embodiment of the present application;
fig. 14 is a schematic structural view of an indoor positioning device according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of a fingerprint library constructing apparatus according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that references to "a plurality" in this disclosure refer to two or more. In the description of the present application, "/" means or, unless otherwise indicated, for example, A/B may represent A or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and function. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
In an application scenario, if the electronic device is in an indoor environment, the electronic device may be located by an indoor location technology, for example, the electronic device may be located by a WiFi fingerprint location technology. Under the condition that the electronic equipment is in an indoor environment, a plurality of manually collected sample track detection data and floor labels corresponding to each sample track detection data can be obtained in advance. For example, referring to fig. 1, at least one acquisition person uses a data acquisition device to acquire sample trajectory detection data at different floors and sends the acquired sample trajectory detection data and corresponding floors to an electronic device. For convenience of explanation, in the drawings of the embodiment of the present application, 4 floors are taken as an example, and one collected person exists for each floor. After the electronic device acquires the plurality of sample track detection data and the floor label corresponding to each sample track detection data, the electronic device can select a fixed number of sample track detection data from the sample track data corresponding to each floor, so as to form a fingerprint library, and perform model training by using the fingerprint library, so as to obtain a classification model. Typically, the electronic device may also obtain a fingerprint test set, based on which the positioning performance of the classification model may be tested, i.e. whether the classification model may be used for indoor positioning.
However, because the manually collected sample track detection data is not only needed to construct a fingerprint library, but also a fingerprint test set is needed to be constructed, the sample track data in the fingerprint library is less, so that a reliable fingerprint library is difficult to construct, the classification accuracy of a classification model trained based on the fingerprint library is lower, and the positioning accuracy in an online positioning stage is further affected. For example, referring to fig. 2, if the electronic device is in floor 3, the electronic device may acquire track detection data in any time period of floor 3 and perform positioning according to the track detection data through the classification model, where the positioning result of the classification model should be originally in floor 3, but since the classification model is trained according to a fingerprint library with a smaller number of sample track data, the fingerprint library is unreliable, resulting in inaccurate positioning of the classification model, so that the classification model outputs a positioning result of floor 4, and the electronic device displays a positioning result of "currently in floor 4" in the positioning interface.
In order to improve the positioning accuracy of the classification model, the embodiment of the application provides an indoor positioning method, wherein under the condition that the electronic equipment needs to perform indoor positioning, track detection data of the positioning equipment can be obtained, and then the floor where the positioning equipment is located is determined through a first classification model according to the track detection data. Because the first classification model is obtained by training the first fingerprint database through data expansion, and the first fingerprint database is obtained by expanding the data of the second fingerprint database based on the fingerprint test set, the data volume in the first fingerprint database is more reliable, and the positioning accuracy of the first classification model is improved. Namely, the electronic equipment in the embodiment of the application expands the data volume in the fingerprint database and improves the reliability of the fingerprint database, thereby improving the positioning accuracy of the classification model.
Before explaining the indoor positioning method provided by the embodiment of the application in detail, the electronic equipment related to the embodiment of the application is explained. The method provided by the embodiment of the application can be executed by the electronic equipment, and the electronic equipment can be configured with a wifi signal detection function and a positioning function. Further, applications such as navigation, social interaction, shopping and the like, which can trigger the electronic device to be positioned in the using process, can be installed in the electronic device. By way of example and not limitation, the electronic device may be, but is not limited to, a cell phone, a wearable smart device, a digital camera, a tablet, a desktop, a laptop, a handheld computer, a notebook, a vehicle-mounted device, an ultra-mobile personal computer, a UMPC, a netbook, a cellular telephone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR), a Virtual Reality (VR) device, a cell phone, a smart appliance, a server, and the like, to which embodiments of the present application are not limited.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 3, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces, such as may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. Such as: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. Wireless communication techniques may include global system for mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, and so on.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. Such as storing files of music, video, etc. in an external memory card.
The internal memory 121 may be used to store computer-executable program code that includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data (e.g., audio data, phonebook, etc.) created by the electronic device 100 during use, and so forth. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding in positioning and navigation.
The software system of the electronic device 100 will be described next.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the application, an Android (Android) system with a layered architecture is taken as an example, and a software system of the electronic device 100 is illustrated.
Fig. 4 is a block diagram of a software system of the electronic device 100 according to an embodiment of the present application. Referring to fig. 4, the layered architecture divides the software into several layers, each with a clear role and division of work. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run time) and system layer, and a kernel layer, respectively.
The application layer may include a series of application packages. As shown in fig. 4, the application package may include map, navigation, camera, gallery, calendar, talk, WLAN, bluetooth, music, video, etc. applications.
As an example, a WiFi management module may be further included in the application layer, where the WiFi management module is configured to manage functions related to WiFi, such as opening WiFi, disconnecting WiFi, viewing a WiFi list, dynamically refreshing a WiFi list, dynamically pulling down to refresh a WiFi list, connecting a designated network, disconnecting a network connection, and so on.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions. As shown in fig. 4, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like. The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like. The content provider is used to store and retrieve data, which may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, track detection data, etc., and to make such data accessible to the application. The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to construct a display interface for an application, which may be comprised of one or more views, such as a view that includes displaying a text notification icon, a view that includes displaying text, and a view that includes displaying a picture. The telephony manager is used to provide communication functions of the electronic device 100, such as management of call status (including on, off, etc.). The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like. The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. For example, a notification manager is used to inform that the download is complete, a message alert, etc. The notification manager may also be a notification that appears in the system top status bar in the form of a chart or a scroll bar text, such as a notification of a background running application. The notification manager may also be a notification that appears on the screen in the form of a dialog window, such as a text message being prompted in a status bar, a notification sound being emitted, the electronic device vibrating, a flashing indicator light, etc.
As one example, an algorithm library and a data receiving module may also be included in the application framework layer.
As an example, the algorithm module is used for storing various algorithm models, and the algorithm models comprise a first classification model for realizing indoor positioning; under the condition that indoor positioning is required, the algorithm module can call the stored first classification module, and under the condition that track detection data of the positioning equipment are acquired, the floor where the positioning equipment is located is determined through the first classification module based on the track detection data. For example, if the algorithm module receives a positioning request triggered by an application program such as a map or navigation, the algorithm module may call the first classification module, and determine, based on the trajectory detection data, a floor where the positioning device is located through a set positioning algorithm, where the trajectory detection data is obtained from the content provider.
As an example, the algorithm module may also be used for model training, and in the case of model training, the algorithm module may receive a certain amount of sample trajectory detection data sent by the data acquisition module, and then perform model training based on the acquired sample trajectory detection data.
As an example, the data acquisition module may be configured to receive sample trace detection data sent by other electronic devices and send the received sample trace detection data to the algorithm module.
As an example, the data acquisition module may further receive a WiFi signal periodically acquired by a WiFi acquisition unit in the hardware layer, determine a WiFi signal strength of the WiFi signal received each time as a WiFi signal strength corresponding to a track point, so as to obtain track detection data, and send the track detection data to the algorithm module.
As an example, the data acquisition module may also be used to store the acquired track detection data into the content provider.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system. The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android. The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules, such as: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc. The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications. Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as: MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc. The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like. The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver, a sensor driver and a WiFi driver;
as one example, the WiFi driver is used to drive a hardware device WiFi collector to periodically collect WiFi signals.
The workflow of the electronic device 100 software and hardware is illustrated below in connection with capturing a photo scene.
When touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into the original input event (including information such as touch coordinates, time stamp of touch operation, etc.). The original input event is stored at the kernel layer. The application framework layer acquires an original input event from the kernel layer, and identifies a control corresponding to the original input event. Taking the touch operation as a click operation, the control corresponding to the click operation is a control of a camera application icon as an example, the camera application calls an interface of an application program framework layer, starts the camera application, calls a kernel layer to start a camera driver, and captures a still image or video through a camera 193.
In order to facilitate understanding, before describing the method provided by the embodiment of the present application in detail, the application scenario related to the embodiment of the present application is described below based on the execution body provided by the foregoing embodiment.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating an application scenario according to an exemplary embodiment. In one possible scenario, when a user visits a factory building, in order to avoid the user from running into a floor where access is not allowed, the user can carry a mobile phone special for positioning, and in the process that the user carries the mobile phone special for positioning, the mobile phone can perform positioning operation on the user in real time or at intervals, and warn the user when the user is positioned to the floor where access is not allowed. For example, in response to a positioning operation on the mobile phone, the mobile phone may obtain track detection data of the user in a specified time period, and determine, based on the track detection data, that a floor where the mobile phone is currently located is 3 floors through the first classification model, and if the 3 floors are floors where the user is not allowed to enter, the mobile phone may prompt the user to leave the 3 floors in a vibration, ringing, text prompting and/or voice prompting manner. For example, the handset may display "please leave building 3 as soon as possible" on the location interface.
It should be noted that the specified time interval may be set in advance, for example, the specified time interval may be 3 minutes, 5 minutes, 10 minutes, or the like. The specified time period may be set in advance according to the need, and also differs according to the positioning object. For example, in the case where the electronic device needs to perform self-positioning, the specified period is a period of time for acquiring the track detection data before and closest to the time of receiving the positioning operation, and the period of time may be 5 minutes, 3 minutes, 1 minute, or the like. Under the condition that the electronic device needs to locate other devices, the specified time period is a time period for collecting track detection data, which is 5 minutes, 3 minutes or 1 minute, of the time period before the receiving time of the track acquisition request sent by the electronic device is received by the other devices and is the nearest to the receiving time.
As an example, since the electronic device may scan the WiFi signal of the current environment according to its own signal scanning period, and obtain a trace point and the signal strength of the WiFi signal detected at the trace point at each scan, the electronic device may determine the trace points in any one period and the signal strength of the WiFi signal detected at each trace point in the plurality of trace points as trace detection data.
As an example of the present application, a mall building typically houses a plurality of intelligent cleaning devices for cleaning the environmental sanitation of the mall building. In order to facilitate management and planning, in order to clearly know the number of intelligent cleaning devices in each floor, a manager can perform indoor positioning on each intelligent cleaning device through electronic devices such as a mobile phone, a notebook computer and a desktop computer, and in fig. 6 of the embodiment of the application, the electronic devices are taken as mobile phones for illustration. Referring to fig. 6 (a), the manager may trigger a positioning operation on the intelligent cleaning device in the management interface displayed on the mobile phone, for example, the manager may click on the "cleaning device distribution" option in the management interface; responding to clicking operation of a manager on the cleaning equipment distribution condition, and sending a track acquisition request to each intelligent cleaning equipment by the mobile phone; each intelligent cleaning device can send track detection data acquired in a specified time period to the electronic device under the condition that the track acquisition request is received; the electronic equipment receives track detection data sent by each intelligent cleaning equipment and determines the floor where each intelligent cleaning equipment is located through a first classification model based on the track detection data of each intelligent cleaning equipment; thereafter, referring to the (b) diagram in fig. 6, the electronic device may count the number of intelligent cleaning devices placed per floor and display the number of intelligent cleaning devices placed per floor in the management interface.
As an example of the present application, in order to facilitate parents to determine the location of a child, the child will typically wear a smart wearable device, and in the event that parents are inadvertently separated from the child in a mall, the parents can locate the child's smart wearable device through a mobile phone to determine the floor on which the child is located. For example, referring to fig. 7 (a), after an application program corresponding to an intelligent wearable device installed in a mobile phone is opened, a parent may click on an "indoor positioning" option in a search interface of the application program; the mobile phone responds to clicking operation of an indoor positioning option and sends a track acquisition request to the intelligent wearable device; under the condition that the intelligent wearable device receives the track acquisition request, track detection data acquired in a specified time period can be sent to a mobile phone of a parent; under the condition that track detection data sent by the intelligent wearable device are received, the mobile phone determines the floor where the intelligent wearable device is located through the first classification model based on the track detection data, and then, referring to the (b) diagram in fig. 7, the mobile phone displays the current floor where the intelligent wearable device is located in a searching interface, so that parents can know the current floor where the child is located.
As an example of the application, after a car is parked in a parking space of an underground garage, if the number of floors of the underground garage is large and a driver does not pay attention to the floor where the car is parked in the parking process, the driver can position the car indoors through a mobile phone to determine the floor where the car is located when the car is subsequently found out of the parking space. For example, the driver may open the car positioning application, see (a) in fig. 8, and trigger a positioning operation on the car at the positioning interface of the car positioning application; responding to the positioning operation of the automobile, and sending a track acquisition request to the vehicle-mounted equipment of the automobile by the mobile phone; under the condition that the vehicle-mounted equipment of the automobile receives the track acquisition request, track detection data in a specified time period before flameout of the automobile can be sent to the mobile phone. Under the condition that track detection data sent by vehicle-mounted equipment of an automobile are received, the mobile phone determines that the floor where the automobile is located is minus 2 floors through a first classification model based on the track detection data, and then, referring to a (b) diagram in fig. 8, the mobile phone displays the current floor where the automobile is located in an automobile positioning interface.
It should be noted that, the embodiment of the present application is only described by taking the application scenario shown in fig. 5 to 8 as an example, and the embodiment of the present application is not limited to the above description.
Based on the execution subject and the application scenario provided by the above embodiment, the method for indoor positioning provided by the embodiment of the present application is described next. Referring to fig. 9, fig. 9 is a flowchart illustrating a method for indoor positioning according to an exemplary embodiment. By way of example and not limitation, the method is described herein as applied to an electronic device having a positioning function, and may include some or all of the following:
step 901: track detection data of the positioning device is acquired in response to a positioning operation of the positioning device.
The positioning device may be an electronic device that performs positioning, or may be another electronic device that performs positioning by the electronic device. That is, the positioning device may position itself, or may be positioned by another electronic device.
In one possible implementation manner, in a case where the electronic device needs to perform self-positioning, that is, in a case where the electronic device is a positioning device, the electronic device responds to a positioning operation on the positioning device to acquire track detection data detected by the positioning device in a specified period of time. For example, the process may refer to the application scenario shown in fig. 5 above.
In another possible manner, in the case that the electronic device and the positioning device are two independent devices, and the electronic device positions the positioning device, in response to a positioning operation of the positioning device, the electronic device sends a track acquisition request to the positioning device; under the condition that the positioning equipment receives the track acquisition request, acquiring track detection data detected in a specified time period, and transmitting the track detection data to the electronic equipment; the electronic device receives track detection data sent by the positioning device. For example, the process may refer to the application scenario shown in fig. 6, 7 or 8 described above.
Step 902: and determining the floor where the positioning equipment is located through a first classification model based on the track detection data.
As an example, the electronic device may input the trajectory detection data to the first classification model, classify the trajectory detection data by the first classification model, and output a classification result of the trajectory detection data by the first classification model; and determining the classification result as the floor where the positioning equipment is located.
It should be noted that, the first classification model is obtained by performing iterative training on the second classification model based on the first fingerprint library in advance, the first fingerprint library is obtained by performing data expansion on the second fingerprint library through the second classification model based on the fingerprint test set, the second classification model is obtained by performing training on the initial classification model based on the second fingerprint library, the second fingerprint library comprises a plurality of sample track detection data, and each sample track detection data in the plurality of sample track detection data is provided with a floor label.
As an example, the first fingerprint library is obtained after data expansion of the second fingerprint library by the second classification model based on the fingerprint test set, and the operation of data expansion of the second fingerprint library by the second classification model based on the fingerprint test set includes: and traversing the sample track detection data in the fingerprint test set through a second classification model, and adding the sample track detection data with the classification result confidence degree larger than or equal to a confidence degree threshold value into the second fingerprint library in the traversing process. The first fingerprint database is obtained by performing traversal processing on sample track detection data in a fingerprint test set through a second classification model, and adding the sample track detection data with the classification result confidence degree being greater than or equal to a confidence degree threshold value into the second fingerprint database in the traversal process.
It is worth to say that, in the process of testing the positioning performance of the second classification model based on the fingerprint test set, the data size of the second fingerprint database can be further expanded, so that the data size of the first fingerprint database is ensured, and the reliability of the first fingerprint database is improved.
As an example, the second fingerprint library is obtained by performing data expansion processing on the initial fingerprint library by the electronic device based on the initial fingerprint library and the fingerprint test set, and the initial fingerprint library is obtained by randomly selecting a second number of flat layer sample track detection data from the first number of obtained sample track detection data by the electronic device.
Therefore, by randomly selecting the second number of flat sample track detection data, the cross-layer sample track detection data cannot appear in the initial fingerprint library, and the reliability of the initial fingerprint library is ensured.
As one example, the fingerprint test set is a set of sample trace detection data remaining after the electronic device randomly selects from the first number of sample trace detection data.
It is worth to say that the fingerprint test set and the initial fingerprint library are derived from the same batch of sample track detection data, so that convenience in constructing the initial fingerprint library and the fingerprint test set is improved.
In some embodiments, the fingerprint test set may be obtained in other ways, for example, the electronic device may also obtain other sample trace detection data than the first number of sample trace detection data, and determine a set of other sample trace detection data as the fingerprint test set. Wherein, the other sample trace detection data are also sample trace detection data for the same indoor floor.
In some embodiments, the operation of training the initial classification model based on the second fingerprint library to obtain the second classification model, the operation of performing data expansion on the second fingerprint library based on the fingerprint test set through the second classification model to obtain the first fingerprint library, and the operation of performing iterative training on the second classification model based on the first fingerprint library to obtain the first classification model may refer to a method for constructing the fingerprint library as shown in fig. 10 below.
In the embodiment of the application, under the condition that indoor positioning is required, the electronic equipment can acquire the track detection data of the positioning equipment, and then the floor where the positioning equipment is located is determined through the first classification model according to the track detection data. Because the first classification model is obtained by training the first fingerprint database through data expansion, and the first fingerprint database is obtained by expanding the data of the second fingerprint database based on the fingerprint test set, the data volume in the first fingerprint database is more reliable, and the positioning accuracy of the first classification model is improved.
Referring to fig. 10, fig. 10 is a flowchart illustrating a method for constructing a fingerprint library according to an exemplary embodiment. By way of example and not limitation, the method is described herein as applied to an electronic device having a positioning function, and may include some or all of the following:
step 1001: and acquiring a second fingerprint database and a fingerprint test set.
It should be noted that the second fingerprint database includes a plurality of sample trace detection data, and each sample trace detection data in the plurality of sample trace detection data has a floor tag.
In some embodiments, the operation of the electronic device to obtain the second fingerprint library and the fingerprint test set may refer to the operations of step A1-step A4 described below.
Step A1: the electronic device obtains a first number of sample trace detection data including at least flat layer sample trace detection data.
In some embodiments, in the process of constructing the fingerprint library, it is generally required to manually acquire sample track detection data, that is, an acquiring person carries an electronic device for data acquisition to acquire sample track detection data in each floor of the current indoor environment, and assigns a corresponding floor tag to each sample track detection data, and then sends each acquired sample track detection data carrying the floor tag to the electronic device, so that the electronic device can acquire a first number of sample track detection data.
Step A2: the electronic equipment randomly selects second number of flat layer sample track detection data from the first number of sample track detection data to obtain an initial fingerprint library.
In the process of data acquisition, the acquisition personnel can acquire cross-layer sample track detection data besides the flat-layer sample track detection data, and the flat-layer sample track detection data are data with an effect on positioning, so that the electronic equipment can randomly select the second number of flat-layer sample track detection data from the first number of sample tracks to obtain an initial fingerprint library. In addition, after the model training is performed subsequently, in order to verify the model training result, a fingerprint test set is usually set, so that the electronic device can determine a set formed by the sample track detection data remaining after random selection in the first number of sample track detection data as the fingerprint test set.
It should be noted that the flat-layer sample track detection data is sample track detection data collected by the electronic device for data collection in the same floor, and the cross-layer sample track detection data is sample track detection data collected by the electronic device for data collection between different floors. In order to facilitate understanding of different types of sample trace detection data, referring to fig. 11, an embodiment of the present application provides a schematic diagram of different types of sample trace detection data, where the embodiment of the present application is only illustrated by taking the sample trace detection data shown in fig. 11 as an example, and the embodiment of the present application is not limited to this.
It should be noted that the second number is a number preset according to the requirement, for example, the second number is 100 or 200.
Because in some cases, the number of track points included in some sample track detection data is large, which may cause trouble to the calculation amount of subsequent positioning, the electronic device randomly selects the second number of flat sample track detection data from the first number of sample track detection data, and before obtaining the initial fingerprint library, may further perform some processing on the sample track detection data including the large number of track points, so as to reduce the number of track points in the sample track detection data.
In some embodiments, when the first number of sample trace detection data includes sample trace detection data with a number of trace points greater than a number threshold, dividing the sample trace detection data with a number of trace points greater than the number threshold to obtain a third number of sample trace detection data, where the number of trace points of each sample trace detection data in the third number of sample trace detection data is less than or equal to the number threshold. In this way, the electronic device may randomly select the second number of sample track detection data from the third number of sample track detection data, to obtain the initial fingerprint library.
Since the calculation trouble is brought when the subsequent positioning operation based on the sample trajectory detection data is described in the case where the number of the trajectory points included in the sample trajectory detection data is greater than the number threshold, the electronic device can perform the division processing on the sample trajectory detection data where the number of the trajectory points is greater than the number threshold.
It should be noted that the number threshold may be preset according to the requirement, for example, the number threshold may be 15, 20, or 30, etc.
It should be noted that, by dividing the longer sample trajectory detection data, the number of trajectory points included in the longer sample trajectory detection data is reduced, and thus the calculation amount of subsequent calculation based on the sample trajectory detection data is reduced.
As one example, in a case where the first number of sample trajectory detection data includes sample trajectory detection data having a number of trajectory points greater than the number threshold, the operation of the electronic device to segment the sample trajectory detection data having the number of trajectory points greater than the number threshold includes: under the condition that the first number of sample track detection data comprises sample track detection data with the number of track points being greater than a number threshold, dividing the sample track detection data with the number of track points being greater than the number threshold at intervals to obtain fourth number of sample track detection data, wherein the dividing number is a number smaller than or equal to the number threshold; and deleting the sample track detection data with the track points smaller than the division value to obtain the sample track detection data with the third number under the condition that the sample track detection data with the fourth number comprises the sample track detection data with the track points smaller than the division value.
It should be noted that the dividing value may be preset according to the requirement, and the dividing value may be the same as or smaller than the number threshold, which is not limited in the embodiment of the present application.
Since the sample trajectory detection data may affect the accuracy of model training in the case where the number of trajectory points included in the sample trajectory detection data is too small, the electronic device may delete the sample trajectory detection data having the number of trajectory points smaller than the division value.
It is worth to say that, through dividing the sample track detection data with the number of track points being greater than the number threshold into intervals, the number of the sample track detection data can be expanded, the calculated amount in the subsequent model training can be reduced, and the accuracy of the model training is improved.
Because the flat layer sample track data is the sample track data for model training, the electronic device can segment the flat layer sample track detection data with the track point number larger than the number threshold under the condition of segment the sample track detection data with the track point number larger than the number threshold.
Step A3: the electronic device determines a set of sample trace detection data remaining after random selection of the first number of sample trace detection data as a fingerprint test set.
In some embodiments, the electronic device may determine not only the set of sample trace detection data remaining after the random selection in the first number of sample trace detection data as the fingerprint test set, but also other manners, for example, the electronic device may also acquire other sample trace detection data except for the first number of sample trace detection data, and determine the set of other sample trace detection data as the fingerprint test set. Wherein, the other sample trace detection data are also sample trace detection data for the same indoor floor.
Step A4: and the electronic equipment performs data expansion processing on the initial fingerprint library based on the initial fingerprint library and the fingerprint test set to obtain a second fingerprint library.
Under the condition that the number of sample track detection data in the initial fingerprint library is small, the method has influence on the accuracy of model training and the accuracy of subsequent positioning, so that in order to improve the accuracy of subsequent model training and the accuracy of positioning, the electronic equipment can perform data expansion processing on the initial fingerprint library based on the initial fingerprint library and the fingerprint test set.
It is worth to say that the initial fingerprint database is expanded through the fingerprint test set, so that the data volume of sample track detection data in the second fingerprint database is ensured, and the reliability of the second fingerprint database is improved.
In one possible implementation manner, the operation of performing data expansion processing on the initial fingerprint library by the electronic device based on the initial fingerprint library and the fingerprint test set includes: traversing each sample track detection data in the fingerprint test set in sequence; determining the Euclidean distance and the Jacquard distance between second sample track detection data and each sample track detection data in the initial fingerprint library, wherein the second sample track detection data is currently traversed sample track detection data; determining third sample track detection data with the maximum similarity with second sample track detection data from at least one third sample track detection data under the condition that at least one third sample track detection data exists in an initial fingerprint library, wherein the third sample track detection data refers to sample track detection data with Euclidean distance between the third sample track detection data and the second sample track detection data being smaller than a first distance threshold value and with Jacquard distance between the third sample track detection data and the second sample track detection data being smaller than a second distance threshold value; updating the floor label of the second sample trace detection data to the floor label of the determined third sample trace detection data; and adding the second sample track detection data updated by the label into the initial fingerprint library.
Since the euclidean distance and the Jaccard distance (Jaccard distance) can describe the similarity between the two data, and the smaller the distance, the greater the similarity, the electronic device can determine the euclidean distance and the Jaccard distance between the second sample trace detection data and each sample trace detection data in the initial fingerprint library.
In some embodiments, the electronic device deletes the second sample trace detection data from the fingerprint test set while adding the label updated second sample trace detection data to the initial fingerprint library.
In some embodiments, the electronic device may end the extension of the initial fingerprint library in the absence of at least one third sample trace detection data.
It should be noted that, by determining the third sample track detection data with the maximum similarity with the second sample track detection data from the at least one third sample track detection data, the rationality of expanding the initial fingerprint library is ensured.
In order to facilitate determining the euclidean distance and the jaccard distance between the second sample trace detection data and each sample trace detection data in the initial fingerprint library, for each trace Point in each sample trace detection data in the fingerprint test set and each trace Point in each sample trace detection data in the initial fingerprint library, the electronic device may be represented by m wifi signal intensities, where m is the number of wireless Access Points (APs) installed in the current indoor environment. For example, m may be 8000, 10000, 100, or the like.
Illustratively, the initial fingerprint library F may be represented by the following first formula (1), wherein in the following first formula (1), the initial fingerprint library F includes N pieces of sample trajectory detection data; arbitrary sample trace detection data B i The number of the track points included in the sample track detection data is different, so that the value of x is a variable value; each locus point C i Represented by m WiFi signal strengths, AP 1 Representing AP 1 Corresponding wifi signalWifi signal strength of (a).
/>
The fingerprint test set T may be expressed by the following second formula (2), wherein in the following second formula (2), P pieces of sample trajectory detection data, any sample trajectory detection data a, are included in the fingerprint test set T i The method comprises the steps of including x track points, and similarly, taking x as a variable value; each track point D i Represented by m WiFi signal strengths, AP 1 Representing AP 1 Wifi signal strength of corresponding wifi signal.
In some embodiments, the electronic device may determine the euclidean distance between the second sample trace detection data and each sample trace detection data in the initial fingerprint library by the following third equation (3).
d Ai_F =min i∈(1,N) |A j -B i | (3)
In the third formula (3), d Aj_F For the Euclidean distance between the second sample track detection data and any sample track detection data in the initial fingerprint database, A j For the second sample trace detection data, B i Data is detected for any sample trace in the initial fingerprint library.
In some embodiments, the electronic device may determine the jaccard distance between the second sample trace detection data and each sample trace detection data in the initial fingerprint library by the fourth formula (4) below.
In the fourth formula (4), the first and second formulas,for the Jacquard distance between the second sample trace detection data and any sample trace detection data in the initial fingerprint library, A j For the second sample trace detection data, B i Data is detected for any sample trace in the initial fingerprint library.
Because the electronic device may determine the euclidean distance and the jaccard distance between the second sample trace detection data and each sample trace detection data in the initial fingerprint library, the electronic device needs to determine sample trace detection data that satisfies both the euclidean distance requirement and the jaccard distance requirement, i.e., the electronic device needs to determine at least one third sample trace detection data of the sample trace detection data whose euclidean distance with the second sample trace detection data is less than the first distance threshold and whose jaccard distance with the second sample trace detection data is less than the second distance threshold.
It should be noted that, the first distance threshold and the second distance threshold may be set in advance according to the requirement. And the first distance threshold and the second distance threshold may be fixed thresholds or dynamic thresholds.
Because in the process of constructing the fingerprint library, the electronic device selects a fixed number of sample trace detection data from the sample trace detection data corresponding to each floor and adds the sample trace detection data to the fingerprint library, the manually collected sample trace detection data usually has limitations, for example, the manually collected sample trace detection data presents a phenomenon of uneven data distribution, that is, the number of sample trace detection data corresponding to some floors is more, the number of sample trace detection data corresponding to some floors is less, and even the number of sample trace detection data corresponding to some floors may not reach the required number. Therefore, the first distance threshold and the second distance threshold may also be dynamic thresholds, and both the first distance threshold and the second distance threshold may be determined according to the number of sample trace detection data corresponding to each floor in the initial fingerprint library. When the number of the sample trace detection data corresponding to any floor is small, the first distance threshold value and the second distance threshold value corresponding to the floor are larger in order to expand a large amount of data of the sample trace detection data corresponding to the floor; when the number of sample trace detection data corresponding to any floor is large, the first distance threshold value and the second distance threshold value corresponding to the floor are smaller.
For example, a correspondence relationship between the number, the first distance threshold and the second distance threshold is set in the electronic device, so the electronic device may determine, from the correspondence relationship, the first distance threshold and the second distance threshold corresponding to each sample trajectory detection data according to the number of sample trajectory detection data corresponding to each floor in the initial fingerprint database.
Because the first distance threshold and the second distance threshold are dynamic thresholds, after determining the euclidean distance and the jaccard distance between the second sample track detection data and each sample track detection data in the initial fingerprint library, the electronic device can determine the first distance threshold and the second distance threshold corresponding to each sample track detection data according to the number of sample track detection data corresponding to each floor in the initial fingerprint library, and then determine whether at least one third sample track detection data exists according to the first distance threshold and the second distance threshold corresponding to each sample track detection data; and under the condition that at least one third sample track detection data exists, determining the third sample track detection data with the largest similarity from the at least one third sample track detection data, updating the floor label of the second sample track detection data to the floor label of the determined third sample track detection data, adding the second sample track detection data with the updated label into the initial fingerprint library, and simultaneously deleting the second sample track detection data from the fingerprint test set. In the absence of at least one third sample trace detection data, the extension of the initial fingerprint library is ended. This process may be represented by the schematic diagram shown in fig. 12 described below, for example.
It is worth to describe that, by setting the first distance threshold and the second distance threshold, after the third sample track detection data after label updating is added into the initial fingerprint database, the sample track detection data corresponding to each floor in the second fingerprint database is more balanced.
In some embodiments, where at least one third sample trace detection data is present in the initial fingerprint library, the operation of the electronic device determining third sample trace detection data from the at least one third sample trace detection data that has the greatest similarity to the second sample trace detection data comprises: under the condition that at least one third sample track detection data exists in the initial fingerprint database, acquiring the third sample track detection data with the minimum Euclidean distance with the second sample track data from the at least one third sample track detection data; or, in the case that at least one third sample track detection data exists in the initial fingerprint library, acquiring the third sample track detection data with the minimum Jacquard distance with the second sample track data from the at least one third sample track detection data.
Since the smaller the euclidean distance is, the greater the similarity is, the electronic device may select, in the case where at least one third sample trajectory detection data exists in the initial fingerprint library, third sample trajectory detection data having the smallest euclidean distance with the second sample trajectory data from among the at least one third sample trajectory, the selected third sample trajectory detection data being sample trajectory detection data having the largest similarity with the second sample trajectory detection data. Of course, since the jetty distance can measure the similarity between two data as well, and the smaller the jetty distance is, the larger the similarity is, so that in the case that at least one third sample track detection data exists in the initial fingerprint library, the electronic device can also select the third sample track detection data with the minimum jetty distance from the at least one third sample track to the second sample track data, and the selected third sample track detection data is the sample track detection data with the maximum similarity to the second sample track detection data.
It should be noted that, since the euclidean distance and the jaccard distance can both describe the similarity between the two data, the third sample trace detection data with the maximum similarity with the second sample trace detection data is selected from the at least one third sample trace detection data by the euclidean distance or the jaccard distance, so that the selected third sample trace detection data can be more accurate.
In some embodiments, since both the euclidean distance and the jaccard distance may describe the similarity between two data, the jaccard distance between the two data may also be the smallest in the case where the euclidean distance between the two data is the smallest, and thus the electronic device may determine not only the third sample trace detection data having the largest similarity with the second sample trace detection data from the at least one third sample trace detection data in the above manner, but also may determine in other manners. For example, in the case where at least one third sample trajectory detection data exists in the initial fingerprint library, third sample trajectory detection data having the smallest euclidean distance with the second sample trajectory data and the smallest jaccard distance with the second sample trajectory data is acquired from the at least one third sample trajectory detection data.
In another possible implementation manner, the operation of performing data expansion processing on the initial fingerprint database by the electronic device based on the initial fingerprint database and the fingerprint test set includes: traversing each sample track detection data in the fingerprint test set in sequence; determining the similarity between second sample track detection data and each sample track detection data in the initial fingerprint library to obtain a plurality of similarities, wherein the second sample track detection data is currently traversed sample track detection data; updating the floor label of the second sample track detection data to the floor label of the sample track detection data corresponding to the maximum similarity under the condition that the maximum similarity in the plurality of similarities is larger than or equal to a similarity threshold; and adding the second sample track detection data updated by the label into the initial fingerprint library.
As one example, the electronic device may represent the similarity between the second sample trace detection data and each sample trace detection data in the initial fingerprint library by any one of euclidean distance, jaccard distance, cosine distance, manhattan distance, chebyshev distance, and the like between the second sample trace detection data and each sample trace detection data in the initial fingerprint library.
It should be noted that the similarity threshold may be preset according to a similarity algorithm selected by the electronic device.
It is worth to say that the data expansion processing is performed on the initial fingerprint library in different modes, so that the richness of determining the data expansion mode is increased.
Step 1002: and performing iterative training on the initial classification model based on the second fingerprint library to obtain a second classification model.
It should be noted that, the operation of the electronic device to perform iterative training on the initial classification model based on the second fingerprint database to obtain the second classification model may include a plurality of different manners, for example, the electronic device may input each sample track detection data in the second fingerprint database into the initial classification model, train the initial classification model based on the WiFi signal strength corresponding to each track point in each sample track detection data, and then continue performing iterative training according to the training result of each track point in each sample track detection data to obtain the second classification model.
Because each trace point in each sample trace detection data can be represented by m WiFi signal intensities, and the corresponding m WiFi signal intensities are different according to the different positions of the trace points, each trace point belongs to the same floor, that is, the floor label corresponding to each trace point in each sample trace detection data is the same. Under the condition that any sample track detection data comprises a plurality of track points, the sample track detection data corresponds to a plurality of groups of m WiFi signal intensities, and floor labels corresponding to the plurality of groups of m WiFi signal intensities are the same, so that in order to enable the initial classification model to be fully trained, the electronic equipment can train the initial classification model based on the WiFi signal intensity corresponding to each track point in each sample track detection data. In some embodiments, the manner in which the electronic device trains the initial classification model based on the WiFi signal strength corresponding to each track point in each sample track detection data also includes multiple manners, which are not described in detail in the embodiments of the present application.
The electronic device trains the initial classification model based on the WiFi signal intensity corresponding to each track point in each sample track detection data, so that the initial classification model can identify the characteristic of the WiFi signal intensity corresponding to the track point of each floor, and further can identify the track points which do not belong to the same floor.
In some embodiments, the electronic device may further perform a dimension reduction process on each sample trace detection data in the second fingerprint library before performing iterative training on the initial classification model based on the second fingerprint library to obtain the second classification model.
Illustratively, the electronic device may perform the dimension reduction processing on each sample trace detection data in the second fingerprint library through an algorithm such as principal component analysis (Principal Component Analysis, PCA) or singular value decomposition (Singular Value Decomposition, SVD), so that the dimension of each sample trace detection data after the dimension reduction processing is the target dimension.
It should be noted that the target dimension is a dimension set in advance according to the requirement, for example, the target dimension is 64 dimensions.
Step 1003: and traversing the sample track detection data in the fingerprint test set through a second classification model.
To determine the positioning performance of the second classification model, the electronic device may test the second classification model based on the fingerprint test set. That is, the electronic device may traverse the sample trace detection data in the fingerprint test set through the second classification model.
In some embodiments, the electronic device may input each sample trace detection data in the fingerprint test set into the second classification model, and classify each sample trace detection data in the fingerprint test set through the second classification model to complete the traversal process of the sample trace detection data in the fingerprint test set.
In some embodiments, the electronic device may further perform a dimension reduction process on each sample trace detection data in the fingerprint test set before performing the traversal process on the sample trace detection data in the fingerprint test set by the second classification model. The dimension reduction processing of the electronic device on each sample track detection data in the second fingerprint library can be performed simultaneously with the dimension reduction processing of each sample track detection data in the fingerprint test set, or the dimension reduction processing of each sample track detection data in the second fingerprint library can be performed first, or the dimension reduction processing of each sample track detection data in the fingerprint test set is performed first.
The electronic device may perform the dimension reduction processing on each sample trace detection data in the fingerprint test set through an algorithm such as PCA or SVD, so that the dimension of each sample trace detection data after the dimension reduction processing is the target dimension.
Step 1004: during the traversal, sample track detection data with the confidence of the classification result being greater than or equal to the confidence threshold is added to the second fingerprint library.
In order to improve reliability of the fingerprint database, the electronic device may further add sample trace detection data with a confidence coefficient of the classification result greater than or equal to a confidence coefficient threshold to the second fingerprint database during the process of testing positioning performance of the second classification model based on the fingerprint test set test.
In some embodiments, the classification result includes a floor label and a probability value corresponding to the floor label; the operation of the electronic device in the traversal process to add the sample track detection data with the classification result confidence greater than or equal to the confidence threshold to the second fingerprint library includes: in the traversal process, determining the confidence coefficient of the classification result corresponding to the first sample track detection data according to the probability value in the classification result corresponding to the first sample track detection data, wherein the first sample track detection data is any sample track detection data in the currently traversed fingerprint test set; updating the floor label of the first sample track detection data into the floor label in the classification result corresponding to the first sample track detection data under the condition that the confidence coefficient of the classification result corresponding to the first sample track detection data is larger than or equal to the confidence coefficient threshold value; and adding the first sample track detection data after label updating into a second fingerprint database.
After the electronic device classifies the first sample trace detection data through the second classification model, the classification result may include a plurality of floor labels and probability values corresponding to each of the plurality of floor labels, so the electronic device may obtain a maximum probability value from the probability values corresponding to each of the plurality of floor labels, and determine the maximum probability value as the confidence level of the classification result.
In some embodiments, the electronic device may further determine the confidence level of the classification result by other manners, for example, the electronic device may further obtain a maximum probability value from probability values corresponding to each of the plurality of floor tags; multiplying the maximum probability value by a preset coefficient to obtain a product result; the product result is determined as a classification result confidence. Or the electronic equipment selects at least one probability value which is larger than a preset probability value from the probability values corresponding to each of the plurality of floor labels; determining an average value of the acquired at least one probability value; the average is determined as the outcome confidence.
It should be noted that the confidence threshold value can be set in advance according to the requirement, for example, the confidence threshold value may be 0.7, 0.8, or 0.9. The preset probability value may be preset, for example, the preset probability value may be 40%, 35%, 30%, or the like.
In some embodiments, the electronic device may also delete the first sample trace detection data from the fingerprint test set while adding the tag updated first sample trace detection data to the second fingerprint library.
It is worth to say that, in the process of testing the second classification model based on the fingerprint test set, data expansion can be performed on the second fingerprint database, so that the model training and the fingerprint database construction achieve the complementary effect.
Step 1005: and when the traversal is finished, performing iterative training on the second classification model based on the first fingerprint library to obtain a first classification model.
It should be noted that, the first fingerprint database is obtained by expanding the second fingerprint database during the traversal process, that is, the first fingerprint database is obtained by updating the label of the first sample trace detection data with the confidence coefficient of the classification result in the fingerprint test set greater than or equal to the confidence coefficient threshold value during the traversal process according to the operation of the step 1004, and then adding the updated label to the second fingerprint database. The first classification model can determine the floor where the positioning device is located based on the track detection data of any positioning device.
In some embodiments, after traversing the sample track detection data in the fingerprint test set by the electronic device through the second classification model, the electronic device may further obtain a correct amount of classifying the sample track detection data in the fingerprint test set by the second classification model, and an adding amount of the sample track detection data added to the second fingerprint library after traversing the sample track detection data in the fingerprint test set by the second classification model; dividing the correct quantity by the total sample quantity of the fingerprint test set to obtain classification accuracy, wherein the total sample quantity of the fingerprint test set is the quantity of sample track detection data included in the fingerprint test set before the sample track detection data in the fingerprint test set is added to a second fingerprint library through a second classification model; dividing the addition amount by the total sample amount to obtain a track utilization rate, wherein the classification accuracy rate and the track utilization rate are used for evaluating the positioning performance of the first classification model.
It is worth to say that, by determining the classification accuracy and the track utilization rate of the second classification model, the positioning performance of the second classification model can be evaluated by using specific data, and the accuracy of evaluating the positioning performance of the second classification model is improved.
After traversing the sample track data of the fingerprint test set through the second classification model, the electronic device performs iterative training on the second classification model based on the first fingerprint library to obtain a first classification model, that is, the first classification model is obtained by iterative training on the basis of the second classification model, and the positioning performance of the first classification model is highly likely to be higher than or equal to that of the second classification model. Therefore, the classification accuracy and the track utilization of the second classification model can be used for evaluating the positioning performance of the second classification model and also can be used for evaluating the positioning performance of the first classification model.
It should be noted that, the evaluation of the positioning performance of the first classification model may be performed manually, or may be performed by the electronic device according to the classification accuracy and the track utilization.
As one example, the electronic device may compare the classification accuracy to an accuracy threshold and compare the trajectory utilization to a utilization threshold; determining the positioning performance of the first classification model as first-level performance under the condition that the classification accuracy is greater than or equal to an accuracy threshold and the track utilization is greater than or equal to a utilization threshold; determining the positioning performance of the first classification model as the secondary performance under the condition that the classification accuracy is smaller than an accuracy threshold or the track utilization is smaller than a utilization threshold; and determining the positioning performance of the first classification model as three-level performance under the condition that the classification accuracy is smaller than the accuracy threshold and the track utilization is smaller than the utilization threshold. The positioning accuracy of the classification model with the first-level performance is greater than that of the classification model with the second-level performance, and the positioning accuracy of the classification model with the second-level performance is greater than that of the classification model with the third-level performance.
The accuracy rate threshold value and the utilization rate threshold value may be set in advance, for example, the accuracy rate threshold value may be 90% or 80%, and the utilization rate threshold value may be 60% or 70%.
In some embodiments, the electronic device performs iterative training on the second classification model based on the first fingerprint library, so as to obtain a first classification model, and then may further perform traversal processing on the remaining sample track data in the fingerprint test set through the first classification model. The operation of performing traversal processing on the remaining sample track data in the fingerprint test set through the first classification model is the same as or similar to the operation of performing traversal processing on the sample track data in the fingerprint test set through the second classification model, and the embodiments of the present application will not be described in detail.
In the embodiment of the application, under the condition that the indoor positioning of the positioning equipment is required, the track detection data of the positioning equipment can be acquired, and then the floor where the positioning equipment is located is determined through the first classification model according to the track detection data. Because the first classification model is obtained by training the first fingerprint database through data expansion, and the first fingerprint database is obtained by expanding the data of the second fingerprint database based on the fingerprint test set, the data volume in the first fingerprint database is more reliable, and the positioning accuracy of the first classification model is improved. The electronic equipment in the embodiment of the application not only expands the data volume in the fingerprint database and improves the reliability of the fingerprint database, but also improves the positioning accuracy of the classification model.
Referring to fig. 13, fig. 13 is a flowchart illustrating a method for constructing a fingerprint library according to another exemplary embodiment. By way of example and not limitation, the method is described herein as applied to an electronic device having a positioning function, and may include some or all of the following:
step 1301: and acquiring a first number of manually acquired sample track detection data.
Step 1302: determining whether the first number of sample track detection data comprises flat layer sample track detection data with the number of track points being greater than a number threshold; if so, the following operation of step 1303 is performed; if not, the operation of step 1304 is performed.
Step 1303: under the condition that the first number of sample track detection data comprises evaluating sample track detection data with the track point number being greater than the number threshold, dividing the flat layer sample track detection data with the track point number being greater than the number threshold to obtain third number of sample track detection data.
Step 1304: each trace point in each sample trace detection data is represented by m WiFi signal intensities.
Step 1305: and randomly selecting the second number of flat layer sample track detection data to obtain an initial fingerprint library.
It should be noted that, in the case that the first number of sample track detection data does not include flat layer sample track detection data with the number of track points being greater than the number threshold, the electronic device randomly selects the second number of flat layer sample track detection data from the first number of sample track detection data, so as to obtain the initial fingerprint library. Under the condition that the first number of sample track detection data comprises flat layer sample track detection data with the track point number being greater than the number threshold value, the electronic equipment randomly selects the second number of flat layer sample track detection data from the third number of sample track detection data, and an initial fingerprint library is obtained.
Step 1306: and determining a set formed by the sample track detection data remained after random selection as a fingerprint test set.
Step 1307: and carrying out data expansion processing on the initial fingerprint library based on the initial fingerprint library and the fingerprint test set to obtain a second fingerprint library.
Step 1308: and performing iterative training on the initial classification model based on the second fingerprint library to obtain a second classification model.
Step 1309: and traversing the sample track detection data in the fingerprint test set through a second classification model.
Step 1310: in the traversal process, it is determined whether there is sample trace detection data with the confidence level of the classification result greater than or equal to the confidence level threshold, if so, the operation of step 1311 described below is performed, and if not, the operation of step 1313 described below is performed.
Step 1311: and adding sample track detection data with the confidence coefficient of the classification result being greater than or equal to a confidence coefficient threshold value into a second fingerprint library.
Step 1312: and performing iterative training on the second classification model based on the first fingerprint library to obtain a first classification model.
It should be noted that, in the case of obtaining the first classification model, the electronic device may further perform the following operation of step 1313.
Step 1313: and determining the classification accuracy and the track utilization rate of the second classification model.
Step 1314: and (5) ending model training.
It should be noted that the operations of the steps 1301-1314 may refer to the operations of the steps 1001-1005, and the embodiments of the present application will not be described in detail.
In the embodiment of the application, under the condition that the indoor positioning of the positioning equipment is required, the track detection data of the positioning equipment can be acquired, and then the floor where the positioning equipment is located is determined through the first classification model according to the track detection data. Because the first classification model is obtained by training the first fingerprint database through data expansion, and the first fingerprint database is obtained by expanding the data of the second fingerprint database based on the fingerprint test set, the data volume in the first fingerprint database is more reliable, and the positioning accuracy of the first classification model is improved. The electronic equipment in the embodiment of the application not only expands the data volume in the fingerprint database and improves the reliability of the fingerprint database, but also improves the positioning accuracy of the classification model.
Fig. 14 is a schematic structural diagram of an indoor positioning device according to an embodiment of the present application, where the device may be implemented as part or all of a computer device, which may be the computer device shown in fig. 3, by software, hardware, or a combination of both. Referring to fig. 14, the apparatus includes: an acquisition module 1401 and a determination module 1402.
An obtaining module 1401, configured to obtain track detection data of a positioning device in response to a positioning operation on the positioning device;
a determining module 1402, configured to determine, based on the trajectory detection data, a floor on which the positioning device is located through a first classification model;
the first classification model is obtained by carrying out iterative training on a second classification model based on a first fingerprint database in advance, the first fingerprint database is obtained by carrying out data expansion on the second fingerprint database through the second classification model based on a fingerprint test set, the second classification model is obtained by carrying out training on an initial classification model based on the second fingerprint database, the second fingerprint database comprises a plurality of sample track detection data, and each sample track detection data in the sample track detection data is provided with a floor label.
As an example of the present application, the first fingerprint library is obtained by performing traversal processing on sample track detection data in the fingerprint test set through the second classification model, and adding sample track detection data with a classification result confidence greater than or equal to a confidence threshold to the second fingerprint library in the traversal process.
As an example of the present application, the second fingerprint library is obtained by performing data expansion processing on the initial fingerprint library based on an initial fingerprint library and the fingerprint test set, where the initial fingerprint library is obtained by randomly selecting a second number of flat sample track detection data from the first number of obtained sample track detection data.
As an example of the present application, the fingerprint test set is a set of sample trace detection data remaining after random selection from the first number of sample trace detection data.
In the embodiment of the application, under the condition that indoor positioning is required, the track detection data of the positioning equipment can be acquired, and then the floor where the positioning equipment is located is determined through the first classification model according to the track detection data. Because the first classification model is obtained by training the first fingerprint database through data expansion, and the first fingerprint database is obtained by expanding the data of the second fingerprint database based on the fingerprint test set, the data volume in the first fingerprint database is more reliable, and the positioning accuracy of the first classification model is improved.
It should be noted that: in the indoor positioning device provided in the above embodiment, only the division of the above functional modules is used for illustration, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
The functional units and modules in the above embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiments of the present application.
The indoor positioning device and the indoor positioning method provided in the foregoing embodiments belong to the same concept, and specific working processes and technical effects of the units and modules in the foregoing embodiments may be referred to a method embodiment part, which is not described herein again.
Fig. 15 is a schematic structural diagram of a fingerprint library constructing apparatus according to an embodiment of the present application, where the apparatus may be implemented by software, hardware, or a combination of both as part or all of a computer device, and the computer device may be the computer device shown in fig. 3. Referring to fig. 15, the apparatus includes: a first acquisition module 1501, a first training module 1502, a traversal module 1503, an addition module 1504, and a second training module 1505.
A first obtaining module 1501, configured to obtain a second fingerprint library and a fingerprint test set, where the second fingerprint library includes a plurality of sample trace detection data, and each sample trace detection data in the plurality of sample trace detection data has a floor tag;
a first training module 1502, configured to perform iterative training on an initial classification model based on the second fingerprint library, to obtain a second classification model;
a traversing module 1503, configured to perform traversing processing on the sample track detection data in the fingerprint test set through the second classification model;
an adding module 1504, configured to add, in the traversal process, sample trace detection data with a classification result confidence level greater than or equal to a confidence level threshold to the second fingerprint library;
and the second training module 1505 is configured to perform iterative training on the second classification model based on a first fingerprint library when the traversal is finished, to obtain a first classification model, where the first fingerprint library is obtained by expanding the second fingerprint library in the traversal process, and the first classification model can determine a floor where the positioning device is located based on track detection data of any positioning device.
As an example of the present application, the classification result includes a floor tag and a probability value corresponding to the floor tag;
The adding module 1504 is configured to:
in the traversal process, determining the confidence coefficient of the classification result corresponding to the first sample track detection data according to the probability value in the classification result corresponding to the first sample track detection data, wherein the first sample track detection data is any sample track detection data in the fingerprint test set traversed currently;
updating the floor label of the first sample track detection data into the floor label in the classification result corresponding to the first sample track detection data under the condition that the confidence coefficient of the classification result corresponding to the first sample track detection data is larger than or equal to a confidence coefficient threshold value;
and adding the first sample track detection data with updated labels into the second fingerprint database.
As an example of the present application, the first obtaining module 1501 is configured to:
acquiring first number of sample track detection data, wherein the first number of sample track detection data at least comprises flat layer sample track detection data;
randomly selecting second number of flat sample track detection data from the first number of sample track detection data to obtain an initial fingerprint library;
determining a set formed by the sample track detection data which is remained after random selection in the first number of sample track detection data as the fingerprint test set;
And based on the initial fingerprint library and the fingerprint test set, performing data expansion processing on the initial fingerprint library to obtain the second fingerprint library.
As an example of the present application, the first obtaining module 1501 is configured to:
traversing each sample track detection data in the fingerprint test set in sequence;
determining Euclidean distance and Jacquard distance between second sample track detection data and each sample track detection data in the initial fingerprint library, wherein the second sample track detection data is currently traversed sample track detection data;
determining third sample track detection data with the maximum similarity with the second sample track detection data from the at least one third sample track detection data under the condition that at least one third sample track detection data exists in the initial fingerprint library, wherein the third sample track detection data refers to sample track detection data with Euclidean distance between the third sample track detection data and the second sample track detection data being smaller than a first distance threshold value, and with Jacquard distance between the third sample track detection data and the second sample track detection data being smaller than a second distance threshold value;
updating the floor label of the second sample track detection data to the floor label of the determined third sample track detection data;
And adding the second sample track detection data with updated labels into the initial fingerprint library.
As an example of the present application, the first obtaining module 1501 is configured to:
acquiring third sample track detection data with minimum Euclidean distance with the second sample track data from at least one third sample track detection data under the condition that the at least one third sample track detection data exists in the initial fingerprint library; or alternatively, the process may be performed,
and acquiring third sample track detection data with the minimum Jacquard distance with the second sample track data from the at least one third sample track detection data under the condition that the at least one third sample track detection data exists in the initial fingerprint library.
As an example of the present application, the first obtaining module 1501 is configured to:
traversing each sample track detection data in the fingerprint test set in sequence;
determining the similarity between second sample track detection data and each sample track detection data in the initial fingerprint library to obtain a plurality of similarities, wherein the second sample track detection data is currently traversed sample track detection data;
Updating the floor label of the second sample track detection data to the floor label of the sample track detection data corresponding to the maximum similarity under the condition that the maximum similarity in the plurality of similarities is larger than or equal to a similarity threshold;
and adding the second sample track detection data with updated labels into the initial fingerprint library.
As an example of the present application, the first obtaining module 1501 is further configured to:
under the condition that the first number of sample track detection data comprises sample track detection data with the track point number being greater than a number threshold, dividing the sample track detection data with the track point number being greater than the number threshold to obtain a third number of sample track detection data, wherein the track point number of each sample track detection data in the third number of sample track detection data is smaller than or equal to the number threshold;
and randomly selecting the second number of flat layer sample track detection data from the third number of sample track detection data to obtain the initial fingerprint library.
As an example of the present application, the first obtaining module 1501 is configured to:
under the condition that the first number of sample track detection data comprises sample track detection data with the number of track points being greater than the number threshold, dividing the sample track detection data with the number of track points being greater than the number threshold at intervals to obtain fourth number of sample track detection data, wherein the dividing number is a number smaller than or equal to the number threshold;
And deleting the sample track detection data with the track point number smaller than the dividing value when the sample track detection data with the track point number smaller than the dividing value is included in the sample track detection data with the fourth number.
As an example of the present application, the apparatus further comprises:
the second obtaining module is used for obtaining the correct amount of classifying the sample track detection data in the fingerprint test set by the second classification model and the addition amount of the sample track detection data added into the second fingerprint database after traversing the sample track detection data in the fingerprint test set by the second classification model;
a first calculation module, configured to divide the correct amount by a total sample amount of the fingerprint test set to obtain the classification accuracy, where the total sample amount of the fingerprint test set is a number of sample trace detection data included in the fingerprint test set before the sample trace detection data in the fingerprint test set is added to the second fingerprint library through the second classification model;
and the second calculation module is used for dividing the addition amount by the total sample amount to obtain the track utilization rate, and the classification accuracy rate and the track utilization rate are used for evaluating the positioning performance of the first classification model.
In the embodiment of the application, the first classification model is obtained by training the first fingerprint database through data expansion, and the first fingerprint database is obtained by expanding the data of the second fingerprint database based on the fingerprint test set, so that the data volume in the first fingerprint database is more reliable, and the positioning accuracy of the first classification model is improved.
It should be noted that: in the fingerprint library constructing apparatus provided in the above embodiment, only the division of the above functional modules is used for illustration, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to perform all or part of the functions described above.
The functional units and modules in the above embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiments of the present application.
The device for constructing the fingerprint library provided in the above embodiment belongs to the same concept as the embodiment of the method for constructing the fingerprint library, and specific working processes and technical effects brought by the units and modules in the above embodiment can be referred to in the method embodiment section, and are not repeated here.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, data subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium such as a floppy Disk, a hard Disk, a magnetic tape, an optical medium such as a digital versatile Disk (Digital Versatile Disc, DVD), or a semiconductor medium such as a Solid State Disk (SSD), etc.
The above embodiments are not intended to limit the present application, and any modifications, equivalent substitutions, improvements, etc. within the technical scope of the present application should be included in the scope of the present application.

Claims (15)

1. An indoor positioning method, comprising:
acquiring track detection data of positioning equipment in response to positioning operation of the positioning equipment;
determining the floor where the positioning equipment is located through a first classification model based on the track detection data;
the first classification model is obtained by carrying out iterative training on a second classification model based on a first fingerprint database in advance, the first fingerprint database is obtained by carrying out data expansion on the second fingerprint database through the second classification model based on a fingerprint test set, the second classification model is obtained by carrying out training on an initial classification model based on the second fingerprint database, the second fingerprint database comprises a plurality of sample track detection data, and each sample track detection data in the sample track detection data is provided with a floor label.
2. The method of claim 1, wherein the first fingerprint library is obtained by traversing sample trace detection data in the fingerprint test set by the second classification model, and adding sample trace detection data with classification result confidence greater than or equal to a confidence threshold to the second fingerprint library during the traversing.
3. The method according to claim 1 or 2, wherein the second fingerprint library is obtained by performing data expansion processing on an initial fingerprint library based on an initial fingerprint library and the fingerprint test set, and the initial fingerprint library is obtained by randomly selecting a second number of flat-layer sample track detection data from the first number of acquired sample track detection data.
4. The method of claim 3, wherein the fingerprint test set is a set of sample trace detection data remaining after random selection from the first number of sample trace detection data.
5. A method for constructing a fingerprint library, the method comprising:
acquiring a second fingerprint database and a fingerprint test set, wherein the second fingerprint database comprises a plurality of sample track detection data, and each sample track detection data in the plurality of sample track detection data is provided with a floor label;
performing iterative training on the initial classification model based on the second fingerprint library to obtain a second classification model;
traversing the sample track detection data in the fingerprint test set through the second classification model;
in the traversal process, sample track detection data with the confidence coefficient of the classification result being greater than or equal to a confidence coefficient threshold value is added into the second fingerprint library;
And when the traversal is finished, performing iterative training on the second classification model based on a first fingerprint library to obtain a first classification model, wherein the first fingerprint library is obtained by expanding the second fingerprint library in the traversal process, and the first classification model can determine the floor where the positioning equipment is located based on track detection data of any positioning equipment.
6. The method of claim 5, wherein the classification result comprises a floor label and a probability value corresponding to the floor label;
the step of adding sample track detection data with the classification result confidence degree greater than or equal to the confidence degree threshold value to the second fingerprint database in the traversal process comprises the following steps:
in the traversal process, determining the confidence coefficient of the classification result corresponding to the first sample track detection data according to the probability value in the classification result corresponding to the first sample track detection data, wherein the first sample track detection data is any sample track detection data in the fingerprint test set traversed currently;
updating the floor label of the first sample track detection data into the floor label in the classification result corresponding to the first sample track detection data under the condition that the confidence coefficient of the classification result corresponding to the first sample track detection data is larger than or equal to a confidence coefficient threshold value;
And adding the first sample track detection data with updated labels into the second fingerprint database.
7. The method of claim 5, wherein the obtaining a second fingerprint library and fingerprint test set comprises:
acquiring first number of sample track detection data, wherein the first number of sample track detection data at least comprises flat layer sample track detection data;
randomly selecting second number of flat sample track detection data from the first number of sample track detection data to obtain an initial fingerprint library;
determining a set formed by the sample track detection data which is remained after random selection in the first number of sample track detection data as the fingerprint test set;
and based on the initial fingerprint library and the fingerprint test set, performing data expansion processing on the initial fingerprint library to obtain the second fingerprint library.
8. The method of claim 7, wherein the performing data expansion processing on the initial fingerprint library based on the initial fingerprint library and the fingerprint test set comprises:
traversing each sample track detection data in the fingerprint test set in sequence;
determining Euclidean distance and Jacquard distance between second sample track detection data and each sample track detection data in the initial fingerprint library, wherein the second sample track detection data is currently traversed sample track detection data;
Determining third sample track detection data with the maximum similarity with the second sample track detection data from the at least one third sample track detection data under the condition that at least one third sample track detection data exists in the initial fingerprint library, wherein the third sample track detection data refers to sample track detection data with Euclidean distance between the third sample track detection data and the second sample track detection data being smaller than a first distance threshold value, and with Jacquard distance between the third sample track detection data and the second sample track detection data being smaller than a second distance threshold value;
updating the floor label of the second sample track detection data to the floor label of the determined third sample track detection data;
and adding the second sample track detection data with updated labels into the initial fingerprint library.
9. The method of claim 8, wherein determining third sample trace detection data having a greatest similarity to the second sample trace detection data from the at least one third sample trace detection data if the at least one third sample trace detection data is present in the initial fingerprint library, comprises:
acquiring third sample track detection data with minimum Euclidean distance with the second sample track data from at least one third sample track detection data under the condition that the at least one third sample track detection data exists in the initial fingerprint library; or alternatively, the process may be performed,
And acquiring third sample track detection data with the minimum Jacquard distance with the second sample track data from the at least one third sample track detection data under the condition that the at least one third sample track detection data exists in the initial fingerprint library.
10. The method of claim 7, wherein the performing data expansion processing on the initial fingerprint library based on the initial fingerprint library and the fingerprint test set comprises:
traversing each sample track detection data in the fingerprint test set in sequence;
determining the similarity between second sample track detection data and each sample track detection data in the initial fingerprint library to obtain a plurality of similarities, wherein the second sample track detection data is currently traversed sample track detection data;
updating the floor label of the second sample track detection data to the floor label of the sample track detection data corresponding to the maximum similarity under the condition that the maximum similarity in the plurality of similarities is larger than or equal to a similarity threshold;
and adding the second sample track detection data with updated labels into the initial fingerprint library.
11. The method of any of claims 7-10, wherein the randomly selecting a second number of flat layer sample trace detection data from the first number of sample trace detection data, prior to deriving an initial fingerprint library, further comprises:
under the condition that the first number of sample track detection data comprises sample track detection data with the track point number being greater than a number threshold, dividing the sample track detection data with the track point number being greater than the number threshold to obtain a third number of sample track detection data, wherein the track point number of each sample track detection data in the third number of sample track detection data is smaller than or equal to the number threshold;
the step of randomly selecting a second number of flat sample track detection data from the first number of sample track detection data to obtain an initial fingerprint library comprises the following steps:
and randomly selecting the second number of flat layer sample track detection data from the third number of sample track detection data to obtain the initial fingerprint library.
12. The method of claim 11, wherein, in the case where the first number of sample trajectory detection data includes sample trajectory detection data having a number of trajectory points greater than a number threshold, the dividing the sample trajectory detection data having a number of trajectory points greater than the number threshold includes:
Under the condition that the first number of sample track detection data comprises sample track detection data with the number of track points being greater than the number threshold, dividing the sample track detection data with the number of track points being greater than the number threshold at intervals to obtain fourth number of sample track detection data, wherein the dividing number is a number smaller than or equal to the number threshold;
and deleting the sample track detection data with the track point number smaller than the dividing value when the sample track detection data with the track point number smaller than the dividing value is included in the sample track detection data with the fourth number.
13. The method of claim 5, wherein after traversing the sample trace detection data in the fingerprint test set by the second classification model, further comprising:
obtaining the correct amount of classifying the sample track detection data in the fingerprint test set by the second classification model, traversing the sample track detection data in the fingerprint test set by the second classification model, and adding the addition amount of the sample track detection data into the second fingerprint library;
Dividing the correct amount by the total sample amount of the fingerprint test set to obtain the classification accuracy, wherein the total sample amount of the fingerprint test set is the number of sample trace detection data included in the fingerprint test set before the sample trace detection data in the fingerprint test set is added to the second fingerprint library through the second classification model;
dividing the addition amount by the total sample amount to obtain the track utilization rate, wherein the classification accuracy rate and the track utilization rate are used for evaluating the positioning performance of the first classification model.
14. An electronic device, the electronic device comprising: a processor and a memory for storing one or more programs, the one or more programs comprising instructions, which when executed by the processor, the electronic device is for performing the indoor positioning method of any of claims 1-4, or the electronic device is for performing the fingerprint library construction method of any of claims 5-13.
15. A computer-readable storage medium storing one or more programs, wherein the one or more programs are configured to be executed by one or more processors, the one or more programs comprising instructions that cause an electronic device to perform the indoor positioning method of any of claims 1-4, or that cause an electronic device to perform the fingerprint library construction method of any of claims 5-13.
CN202211171058.3A 2022-09-23 2022-09-23 Indoor positioning method, fingerprint library construction method, electronic equipment and storage medium Active CN116761249B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211171058.3A CN116761249B (en) 2022-09-23 2022-09-23 Indoor positioning method, fingerprint library construction method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211171058.3A CN116761249B (en) 2022-09-23 2022-09-23 Indoor positioning method, fingerprint library construction method, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116761249A true CN116761249A (en) 2023-09-15
CN116761249B CN116761249B (en) 2024-04-12

Family

ID=87953880

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211171058.3A Active CN116761249B (en) 2022-09-23 2022-09-23 Indoor positioning method, fingerprint library construction method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116761249B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106162868A (en) * 2016-06-08 2016-11-23 南京理工大学 High efficiency indoor localization method based on location fingerprint
CN107203754A (en) * 2017-05-26 2017-09-26 北京邮电大学 A kind of license plate locating method and device based on deep learning
US20170371023A1 (en) * 2014-12-04 2017-12-28 Here Global B.V. Supporting positioning quality assurance
CN108984785A (en) * 2018-07-27 2018-12-11 武汉大学 A kind of update method and device of the fingerprint base based on historical data and increment
CN110636466A (en) * 2019-09-06 2019-12-31 联泰集群(北京)科技有限责任公司 WiFi indoor positioning system based on channel state information under machine learning
WO2020215783A1 (en) * 2019-04-25 2020-10-29 华为技术有限公司 Locating method and apparatus, and storage medium
CN112135250A (en) * 2020-08-12 2020-12-25 浙江大华技术股份有限公司 Indoor positioning method and device, computer equipment and readable storage medium
CN112437485A (en) * 2020-10-29 2021-03-02 北京邮电大学 Positioning method and device of fingerprint space interpolation method based on neural network
CN113747385A (en) * 2021-08-27 2021-12-03 中移(杭州)信息技术有限公司 Indoor positioning method, device, equipment and computer readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170371023A1 (en) * 2014-12-04 2017-12-28 Here Global B.V. Supporting positioning quality assurance
CN106162868A (en) * 2016-06-08 2016-11-23 南京理工大学 High efficiency indoor localization method based on location fingerprint
CN107203754A (en) * 2017-05-26 2017-09-26 北京邮电大学 A kind of license plate locating method and device based on deep learning
CN108984785A (en) * 2018-07-27 2018-12-11 武汉大学 A kind of update method and device of the fingerprint base based on historical data and increment
WO2020215783A1 (en) * 2019-04-25 2020-10-29 华为技术有限公司 Locating method and apparatus, and storage medium
CN110636466A (en) * 2019-09-06 2019-12-31 联泰集群(北京)科技有限责任公司 WiFi indoor positioning system based on channel state information under machine learning
CN112135250A (en) * 2020-08-12 2020-12-25 浙江大华技术股份有限公司 Indoor positioning method and device, computer equipment and readable storage medium
CN112437485A (en) * 2020-10-29 2021-03-02 北京邮电大学 Positioning method and device of fingerprint space interpolation method based on neural network
CN113747385A (en) * 2021-08-27 2021-12-03 中移(杭州)信息技术有限公司 Indoor positioning method, device, equipment and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
谭航: "基于机器学习的室内无线指纹定位技术研究", 中国优秀硕士论文 *

Also Published As

Publication number Publication date
CN116761249B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
CN113434288B (en) Memory management method and electronic equipment
WO2020259529A1 (en) Indoor location method and electronic device
WO2022100221A1 (en) Retrieval processing method and apparatus, and storage medium
CN110866254B (en) Vulnerability detection method and electronic equipment
CN114881711B (en) Method for carrying out exception analysis based on request behaviors and electronic equipment
CN115655310B (en) Data calibration method, electronic device and readable storage medium
CN116070035B (en) Data processing method and electronic equipment
CN116668580B (en) Scene recognition method, electronic device and readable storage medium
CN113409041B (en) Electronic card selection method, device, terminal and storage medium
CN116761249B (en) Indoor positioning method, fingerprint library construction method, electronic equipment and storage medium
CN116709501A (en) Service scene identification method, electronic equipment and storage medium
CN116033069A (en) Notification message display method, electronic device and computer readable storage medium
CN109451295A (en) A kind of method and system obtaining virtual information
CN115543496A (en) Message processing method and related device
CN116668576B (en) Method, device, cloud management platform, system and storage medium for acquiring data
CN117376830B (en) Geofence matching method, electronic device and computer readable storage medium
CN117128985B (en) Point cloud map updating method and equipment
CN116723460B (en) Method for creating personal geofence and related equipment thereof
CN116088955B (en) Process processing method and terminal equipment
CN115550844B (en) Region dividing method, device, electronic equipment and readable storage medium
CN116668951B (en) Method for generating geofence, electronic equipment and storage medium
CN115712745B (en) Method, system and electronic device for acquiring user annotation data
CN116437293B (en) Geofence establishment method, server and communication system
CN116033333B (en) Method for determining position information, electronic device and readable storage medium
CN116033344B (en) Geofence determination method, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant