Indoor positioning method and device in dynamic environment based on feature migration, and readable medium

By calculating the differences in marginal and conditional probability distributions and dynamic balance factors, a total optimization objective is constructed, which solves the domain offset problem of Wi-Fi indoor positioning in dynamic environments and achieves higher positioning accuracy and robustness.

CN116528163BActive Publication Date: 2026-03-27XIAMEN ZHIXIAOJIN INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-10
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing Wi-Fi indoor positioning technologies suffer from domain offset issues in dynamic environments, leading to data drift and decreased positioning accuracy. Existing transfer learning methods cannot adequately reduce the domain adaptation effect and also suffer from confusion alignment problems.

Method used

By calculating the differences in marginal probability distribution, conditional probability distribution, and dynamic balance factor, a total optimization objective is constructed. A mapping matrix is ​​used to adapt the overall feature distribution of the data and preserve local geometric characteristics. The KNN algorithm is then used for localization.

Benefits of technology

The indoor positioning algorithm has improved environmental robustness and positioning accuracy, reduced the impact of environmental changes on positioning, and enhanced positioning accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116528163B_ABST
    Figure CN116528163B_ABST
Patent Text Reader

Abstract

The application discloses an indoor positioning method and device in a dynamic environment based on feature migration, a readable medium, first source domain data and first target domain data are acquired, edge probability distribution difference and conditional probability distribution difference are respectively calculated according to the first source domain data and the first target domain data, and a dynamic balance factor is calculated; a data overall feature distribution adaptation optimization target is determined according to the edge probability distribution difference, the conditional probability distribution difference and the dynamic balance factor; the intraclass distance of the same class data in the second source domain data and the interclass distance of the different class data in the second source domain data are respectively calculated according to the first source domain data, and a data local geometric characteristic reservation optimization target is determined; a total optimization target is constructed according to the data overall feature distribution adaptation optimization target and the data local geometric characteristic reservation optimization target, and a mapping matrix is solved, positioning is realized through the mapping matrix, and the environmental robustness and the positioning precision are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of indoor passive positioning, in particular to an indoor positioning method and device based on feature migration in a dynamic environment and a readable medium. BACKGROUND

[0002] With the continuous development of Internet of Things technology, intelligentization has gradually become the research direction of various indoor scenes, and indoor positioning technology based on location-based services has attracted widespread attention. As a widely existing signal source in various home scenes, Wi-Fi signal has become the focus of research in the field of indoor positioning.

[0003] In early Wi-Fi positioning technology, the link layer received signal strength indication (RSSI) is usually used. RSSI can only provide coarse-grained feature information, which can only describe the overall superposition result of the received different path distortion signals, and cannot distinguish different path signals. Therefore, once the environmental conditions change, the stability of the RSSI signal itself will be destroyed, causing problems such as data drift, so RSSI is difficult to continuously complete high-precision indoor positioning work.

[0004] With the opening of the physical layer information of Wi-Fi signal, the research on signal source has gradually shifted from RSSI data at the link layer to channel state information (CSI) data at the physical layer. Compared with RSSI, CSI can provide fine-grained data features for algorithms. A large number of studies have shown that CSI data has improved the stability of the signal and the positioning effect of the positioning algorithm to some extent, but the core problem of Wi-Fi-based positioning algorithm has not been solved. Wi-Fi signal itself produces domain offset with environmental changes, causing the training and testing data to not meet the independent and identically distributed conditions, thereby greatly reducing the positioning accuracy.

[0005] In recent years, in order to solve the domain offset problem between collected data, transfer learning methods have been used in the field of indoor positioning and have been widely applied. Common transfer learning methods such as TCA, JDA, CORAL, etc. can reduce the distribution difference between two-domain data to some extent. However, they still have some shortcomings, mainly as follows:

[0006] (1) The knowledge transfer is not sufficient, resulting in limited domain adaptation effect and limited improvement of indoor positioning accuracy.

[0007] (2) Only from the overall perspective of two-domain data to achieve domain adaptation, causing confusion alignment problem, which greatly disturbs the subsequent positioning algorithm classification. SUMMARY

[0008] In view of the above technical problems. Embodiments of the present application aim to provide a feature transfer-based indoor positioning method in a dynamic environment, a feature transfer-based indoor positioning device in a dynamic environment and a readable medium, to solve the technical problems mentioned in the background section.

[0009] In a first aspect, the present application provides a feature transfer-based indoor positioning method in a dynamic environment, comprising the following steps:

[0010] S1, obtaining first source domain data and first target domain data, calculating the edge probability distribution difference between the second source domain data and the second target domain data according to the input data matrix composed of the first source domain data and the first target domain data, calculating the conditional probability distribution difference between the second source domain data and the second target domain data according to the first source domain data and the first target domain data of each category, and calculating the dynamic balance factor according to the distance between the first source domain data and the first target domain data as a whole and the distance between each category data in the first source domain data and the first target domain data;

[0011] S2, determining the data overall feature distribution adaptation optimization target according to the edge probability distribution difference, the conditional probability distribution difference and the dynamic balance factor;

[0012] S3, calculating the intra-class distance of the same class data in the second source domain data and the inter-class distance of the different class data in the second source domain data according to the first source domain data, and determining the data local geometric feature reservation optimization target according to the intra-class distance and the inter-class distance;

[0013] S4, constructing the total optimization target according to the data overall feature distribution adaptation optimization target and the data local geometric feature reservation optimization target, solving the mapping matrix according to the total optimization target, and realizing positioning through the mapping matrix.

[0014] Preferably, in step S1, the edge probability distribution difference between the second source domain data and the second target domain data is calculated according to the input data matrix composed of the first source domain data and the first target domain data, specifically comprising:

[0015] The edge probability distribution difference is calculated according to MMD, and the formula is as follows:

[0016]

[0017] Wherein, represents the reproducing Hilbert space, M is the mapping matrix, M T represents the transpose matrix of the mapping matrix, X=[X src ,X tar ] represents the input data matrix composed of the first source domain X src and the second target domain data X tar ​ represents the i-th data in the first source domain X src represents the j-th data in the second target domain data X tar s and n t respectively represent the number of the first source domain data and the number of the first target domain data, tr(·) represents the trace of a matrix, is an MMD matrix, which is constructed in the following way:

[0018]

[0019] As a preferred, the step S1 calculates the conditional probability distribution difference between the second source domain data and the second target domain data according to the first source domain data and the first target domain data of each category, specifically comprising:

[0020] training the classifier using the first source domain data to obtain a trained classifier, and inputting the first target domain data into the trained classifier to obtain the category corresponding to the first target domain data;

[0021] using the sufficient statistics of the category conditional probability distribution to approximately replace the conditional probability distribution, so as to calculate the conditional probability distribution between the second source domain data and the second target domain data, the formula is as follows:

[0022]

[0023] wherein, y src =c represents that the category of the first source domain data is c, y tar =c represents that the category of the first target domain data is c, and c∈{1,2,…,C} represents the category of the label;

[0024] calculating the conditional probability distribution difference according to the MMD, the formula is as follows:

[0025]

[0026] represents the sample of the first source domain data with the category c, represents the sample of the first target domain data with the category c, and respectively represent the number of the sample of the first source domain data and the second source domain data with the category c, is a weight matrix, which is constructed in the following way:

[0027]

[0028] wherein, and ​​respectively represent the prior class probability of class c on the first source domain data and the first target domain data.

[0029] As preferred, the dynamic balance factor is calculated according to the distance between the first source domain data and the first target domain data as a whole and the distance between each class data in the first source domain data and the first target domain data in step S1, and specifically includes:

[0030]

[0031] wherein δ ∈ [0, 1], dist AM and respectively represent the A-distance between the first source domain data and the first target domain data as a whole and between each class data in the first source domain data and the first target domain data, and the calculation formula of the A-distance is as follows:

[0032] dist A (X src ,X tar ) = 2(1-2loss(h));

[0033] wherein loss(h) represents the classification loss of the binary classifier h trained by the first source domain data and the first target domain data.

[0034] As preferred, step S2 specifically includes:

[0035] The edge probability distribution difference, the conditional probability distribution difference and the dynamic balance factor are combined, and the data variance is added as a limiting condition to ensure that the feature of the two domain data remains unchanged before and after the mapping, and the overall feature distribution adaptation optimization target of the data is obtained as:

[0036]

[0037] wherein H is a center matrix and H = I-(1 / n s +n t )1, is an identity matrix, is a regularization term, wherein λ is a regularization parameter, is the Frobenius norm.

[0038] As preferred, step S3 specifically includes:

[0039] The intra-class distance value is used to calculate the intra-class distance of the same class data in the second source domain data, and the calculation formula is as follows:

[0040]

[0041] wherein c ∈ {1, 2, …, C} represents the class of the label, n cis the number of samples of the first source domain data of class c, and has:

[0042]

[0043] wherein L ij is a matrix whose element in the i-th row and j-th column is 1 and other elements are 0;

[0044] The inter-class distance of different classes of data in the second source domain data is calculated using the inter-class distance value, and the calculation formula is as follows:

[0045]

[0046] wherein n k ,n l are the number of samples of the first source domain data of classes k and l, respectively, and have:

[0047]

[0048] The data local geometry characteristic reservation optimization objective is:

[0049]

[0050] As a preferred, step S4 specifically comprises:

[0051] The total optimization objective is:

[0052]

[0053] wherein λ is a regularization parameter, δ is a dynamic balance factor, and α is a weight parameter;

[0054] After transformation, it is equivalent to solving the following formula:

[0055]

[0056] By solving the above generalized eigenvalue decomposition problem, the mapping matrix M can be obtained, and the mapping matrix M is multiplied with the first source domain data respectively to obtain the second source domain data and the second target domain data.

[0057] The second source domain data is used in combination with the KNN algorithm to realize positioning on the second target domain data.

[0058] In a second aspect, the present application provides an indoor positioning device in a dynamic environment based on feature migration, comprising:

[0059] The difference module is configured to obtain the first source domain data and the first target domain data, calculate the edge probability distribution difference between the second source domain data and the second target domain data according to an input data matrix composed of the first source domain data and the first target domain data, calculate the conditional probability distribution difference between the second source domain data and the second target domain data according to the first source domain data and the first target domain data of each category, and calculate the dynamic balance factor according to the distance between the first source domain data and the first target domain data as a whole and the distance between each category data in the first source domain data and the first target domain data.

[0060] The overall optimization module is configured to determine a data overall feature distribution adaptation optimization target according to the edge probability distribution difference, the conditional probability distribution difference and the dynamic balance factor.

[0061] The local optimization module is configured to calculate the intra-class distance of the same category data in the second source domain data and the inter-class distance of different category data in the second source domain data according to the first source domain data respectively, and determine a data local geometric feature reservation optimization target according to the intra-class distance and the inter-class distance.

[0062] The total optimization module is configured to construct a total optimization target according to the data overall feature distribution adaptation optimization target and the data local geometric feature reservation optimization target, solve the mapping matrix according to the total optimization target, and realize positioning through the mapping matrix.

[0063] In a third aspect, the present application provides an electronic device, comprising one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the implementation manners of the first aspect.

[0064] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, when the computer program is executed by a processor, the method described in any of the implementation manners of the first aspect is implemented.

[0065] Compared with the prior art, the present application has the following beneficial effects:

[0066] (1) The present application realizes the minimization of the probability distribution difference of two domain data by the mapping migration method, and maximally retains the local geometric characteristics in the two domain data, thereby reducing the influence of confusion alignment on classification.

[0067] (2) The indoor positioning method based on feature migration in a dynamic environment proposed by the present application to a certain extent overcomes the influence of environmental changes on the indoor positioning algorithm, and effectively improves the environmental robustness and positioning accuracy of the algorithm.

[0068] (3) The application maps the first source domain data and the first target domain data to a latent feature space based on a target function of data overall feature constraint and data local feature constraint, thereby solving the data distribution difference problem caused by domain shift and improving the indoor positioning accuracy in a dynamic environment. BRIEF DESCRIPTION OF DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.

[0070] Figure 1 is an exemplary device architecture diagram in which an embodiment of the present application can be applied;

[0071] Figure 2 is a flowchart of the feature transfer-based indoor positioning method in a dynamic environment according to an embodiment of the present application;

[0072] Figure 3 is a block diagram of the overall flow of the feature transfer-based indoor positioning method in a dynamic environment according to an embodiment of the present application;

[0073] Figure 4 is an optimization target diagram of the feature transfer-based indoor positioning method in a dynamic environment according to an embodiment of the present application;

[0074] Figure 5 is a schematic diagram of the feature transfer-based indoor positioning device in a dynamic environment according to an embodiment of the present application;

[0075] Figure 6 is a structural schematic diagram of a computer device of an electronic device suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION

[0076] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort fall within the scope of protection of the present application.

[0077] Figure 1 is an exemplary device architecture 100 in which the feature transfer-based indoor positioning method in a dynamic environment or the feature transfer-based indoor positioning device according to an embodiment of the present application can be applied.

[0078] AsFigure 1 As shown, the apparatus architecture 100 can include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links or fiber optic cables, etc.

[0079] A user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various applications can be installed on the terminal devices 101, 102, 103, such as data processing applications, file processing applications, etc.

[0080] The terminal devices 101, 102, 103 can be hardware or software. When the terminal devices 101, 102, 103 are hardware, they can be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers and desktop computers, etc. When the terminal devices 101, 102, 103 are software, they can be installed in the above-mentioned electronic devices. They can be implemented as multiple software or software modules (such as software or software modules used to provide distributed services) or as a single software or software module. No specific limitation is made herein.

[0081] The server 105 can be a server providing various services, such as a background data processing server processing files or data uploaded by the terminal devices 101, 102, 103. The background data processing server can process the obtained files or data to generate processing results.

[0082] It should be noted that the indoor positioning method in a dynamic environment based on feature migration provided by the embodiments of the present application can be executed by the server 105 or the terminal devices 101, 102, 103, and accordingly, the indoor positioning apparatus in a dynamic environment based on feature migration can be arranged in the server 105 or the terminal devices 101, 102, 103.

[0083] It should be understood that Figure 1 The number of terminal devices, networks and servers in the apparatus architecture 100 is only illustrative. Any number of terminal devices, networks and servers can be provided according to implementation needs. In the case that the data to be processed does not need to be obtained from a remote place, the above-mentioned apparatus architecture can not include a network, but only a server or a terminal device.

[0084] Figure 2 An indoor positioning method in a dynamic environment based on feature migration provided by an embodiment of the present application is shown, including the following steps:

[0085] S1, obtaining first source domain data and first target domain data, calculating edge probability distribution difference between second source domain data and second target domain data according to input data matrix composed of the first source domain data and the first target domain data, calculating conditional probability distribution difference between the second source domain data and the second target domain data according to the first source domain data and the first target domain data of each category, and calculating a dynamic balance factor according to the distance between the first source domain data and the first target domain data as a whole and the distance between each category data in the first source domain data and the first target domain data.

[0086] Specifically, referring to Figure 3 , the indoor space to be positioned is divided into a plurality of grid fingerprint points at an interval of 1m, and the CSI data of each reference fingerprint point is collected in turn for preprocessing operation and is combined with two-dimensional position coordinates and label information to form a position fingerprint point to form a CSI fingerprint database, i.e., the first source domain data. The fingerprint data of the to-be-positioned point is collected for preprocessing, i.e., the first target domain data. The first source domain data and the first target domain data are input into the TL-GLMA algorithm to perform feature migration on the first source domain data and the first target domain data, and the second source domain data and the second target domain data are obtained. In order to minimize the distribution difference between the second source domain data and the second target domain data, the TL-GLMA algorithm needs to consider two parts, i.e., data overall feature distribution adaptation and data local geometric characteristic reservation, and the total optimization target of the algorithm is as shown in the following formula (1). Figure 4 When calculating the data overall feature distribution adaptation, the distribution difference of the two kinds of probabilities of minimizing the edge probability and the conditional probability is considered, and the weight relationship of the two is adaptively adjusted.

[0087] In a specific embodiment, the edge probability distribution difference between the second source domain data and the second target domain data is calculated according to the input data matrix composed of the first source domain data and the first target domain data in step S1, and specifically includes:

[0088] The edge probability distribution difference is calculated according to MMD, and the formula is as follows:

[0089]

[0090] wherein, represents a reproducing Hilbert space, M is a mapping matrix, M T represents the transpose matrix of the mapping matrix, X=[X src ,X tar ] represents an input data matrix composed of the first source domain X src and the second target domain data X tar , represents the i-th data in the first source domain X src , represents the second target domain data Xtar the jth data in the first source domain, n s and n t respectively represent the number of the first source domain data and the number of the first target domain data, tr(·) represents the trace of a matrix, is an MMD matrix, which is constructed in the following way:

[0091]

[0092] Specifically, when calculating the difference of the marginal probability distribution, MMD can be used as a measurement formula.

[0093] In a specific embodiment, the difference of the conditional probability distribution between the second source domain data and the second target domain data is calculated according to the first source domain data and the first target domain data of each category in step S1, and specifically includes:

[0094] The classifier is trained using the first source domain data to obtain a trained classifier, and the first target domain data is input into the trained classifier to obtain the category corresponding to the first target domain data;

[0095] The sufficient statistics of the category conditional probability distribution is used to approximate and replace the conditional probability distribution, so as to calculate the conditional probability distribution between the second source domain data and the second target domain data, and the formula is as follows:

[0096]

[0097] wherein, y src =c represents that the category of the first source domain data is c, y tar =c represents that the category of the first target domain data is c, and c∈{1,2,…,C} represents the category of the label;

[0098] The difference of the conditional probability distribution is calculated according to MMD, and the formula is as follows:

[0099]

[0100] represents the sample of the first source domain data with the category c, represents the sample of the first target domain data with the category c, and respectively represent the number of the sample of the first source domain data and the second source domain data with the category c, is a weight matrix, which is constructed in the following way:

[0101]

[0102] wherein, and respectively represent the prior class probability of the class c on the first source domain data and the first target domain data.

[0103] Specifically, since the target domain data is unlabeled data, the conditional probability cannot be directly calculated. Therefore, the embodiments of the present application use the first source domain data X src to train the classifier, and the first target domain data X tar is used to predict the soft label of the first target domain data X tar for subsequent calculation. Since the posterior probability has a large amount of calculation, the sufficient statistics of the class conditional probability distribution is used to approximate the conditional probability, so as to calculate the conditional probability distribution of the two domain data. Then the above MMD is modified to measure the difference of the class conditional probability distribution between the two domains, so as to obtain the size of the approximate representation of the conditional probability distribution difference.

[0104] In specific embodiments, the dynamic balance factor is calculated according to the distance between the first source domain data and the first target domain data as a whole and the distance between each class data in the first source domain data and the first target domain data in step S1, and specifically includes:

[0105]

[0106] wherein δ∈[0,1], dist AM and respectively represent the A-distance between the first source domain data and the first target domain data as a whole and each class data in the first source domain data and the first target domain data, and the calculation formula of A-distance is as follows:

[0107] dist A (X src ,X tar )=2(1-2loss(h));

[0108] wherein loss(h) represents the classification loss of the binary classifier h trained by the first source domain data and the first target domain data.

[0109] Specifically, since the weights of the marginal probability distribution and the conditional probability distribution need to be dynamically adjusted according to actual situations, the TL-GLMA algorithm adds a dynamic balance factor δ∈[0, 1] to the difference between the two distributions, and dynamically adjusts the importance between the two probability distributions according to the data collected at different times. The A-distance of the first source domain data and the first target domain data corresponds to inputting all data in the first source domain data and the second target domain data into the binary classifier h to distinguish whether the data belongs to the first source domain data or the second target domain data. The A-distance between each class of data in the first source domain data and the first target domain data is to input all data belonging to this class in the first source domain data and the second target domain data into the binary classifier h, and distinguish whether the data belongs to the first source domain data or the second target domain data through the binary classifier h.

[0110] S2, determining a data overall feature distribution adaptation optimization target according to the marginal probability distribution difference, the conditional probability distribution difference, and the dynamic balance factor.

[0111] In specific embodiments, step S2 specifically includes:

[0112] The marginal probability distribution difference, the conditional probability distribution difference, and the dynamic balance factor are combined, and the data variance is added as a constraint condition to ensure that the feature of the two domain data remains unchanged before and after mapping, so that the data overall feature distribution adaptation optimization target is:

[0113]

[0114] where H is a center matrix and H=I-(1 / n s +n t )1, is an identity matrix, is a regularization term for ensuring that the mapping matrix M is not too complex, where λ is a regularization parameter, is the Frobenius norm.

[0115] Specifically, the data overall feature distribution adaptation is achieved by minimizing the difference between the two domain marginal probability and the conditional probability distribution, and adding a dynamic balance factor δ to dynamically adjust the weight size of the two probability differences.

[0116] S3, calculating the intra-class distance of the same class data in the second source domain data and the inter-class distance of different class data in the second source domain data according to the first source domain data, and determining a data local geometric feature preservation optimization target according to the intra-class distance and the inter-class distance.

[0117] In specific embodiments, step S3 specifically includes:

[0118] The within-class distance of the same class data in the second source domain data is calculated using a within-class distance value, and the calculation formula is as follows:

[0119]

[0120] Wherein, c∈{1,2,…,C} represents the class of the label, n c is the number of samples of the class c in the first source domain data, and has:

[0121]

[0122] Wherein, L ij is a matrix, the element in the i-th row and the j-th column is 1, and other elements are 0;

[0123] The between-class distance of different class data in the second source domain data is calculated using a between-class distance value, and the calculation formula is as follows:

[0124]

[0125] Wherein, n k , n l are the number of samples of the class k and l in the first source domain data, respectively, and have:

[0126]

[0127] Because the local geometric feature preservation can be converted into minimizing the within-class distance while maximizing the between-class distance, the data local geometric feature preservation optimization target is as follows:

[0128]

[0129] Specifically, in order to prevent confusion alignment during domain adaptation, the second source domain data and the second target domain data obtained after mapping should satisfy the requirement that the within-class distance of the same class data is as small as possible, and the between-class distance of different class data is as large as possible. Therefore, the within-class distance (WCD) is used to calculate the within-class distance of the same class data in the mapped source domain, and the between-class distance (BCD) is used to calculate the between-class distance of different class data in the mapped source domain.

[0130] S4, the total optimization target is constructed according to the data overall feature distribution adaptation optimization target and the data local geometric feature preservation optimization target, and the mapping matrix is solved according to the total optimization target, and the positioning is realized through the mapping matrix.

[0131] In specific embodiments, step S4 specifically includes:

[0132] The total optimization objective is:

[0133]

[0134] wherein λ is a regularization parameter, δ is a dynamic balance factor, and α is a weight parameter;

[0135] After transformation, it is equivalent to solving the following formula:

[0136]

[0137] The mapping matrix M is obtained by solving the above generalized eigenvalue decomposition problem. The mapping matrix M is multiplied by the first source domain data to obtain the second source domain data and the second target domain data.

[0138] The second source domain data is used in combination with the KNN algorithm to realize positioning on the second target domain data.

[0139] Specifically, the data overall feature distribution adaptation and the data local geometric property reservation are simultaneously minimized, and the optimal mapping matrix M is found, so that the second source domain data and the second target domain data are obtained. Specifically, the optimal mapping matrix M is obtained by solving the generalized eigenvalue decomposition problem of the above formula, and then the second source domain data and the second target domain data obtained after data mapping and dimensionality reduction are obtained and the second target domain data are used for subsequent positioning algorithms. The second source domain data is used in combination with the KNN algorithm to realize positioning on the second target domain data. By combining the data overall distribution adaptation optimization objective and the data local geometric property reservation optimization objective, the total optimization function of the TL-GLMA algorithm can be finally obtained. The KNN algorithm is one of the positioning models, and other positioning models can also be used in other embodiments.

[0140] Further referring to Figure 5 , as an implementation of the method shown in the above figures, the present application provides an embodiment of an indoor positioning device in a dynamic environment based on feature transfer. The device embodiment corresponds to the method embodiment shown in Figure 2 , and the device can be applied to various electronic devices.

[0141] The present application embodiment provides an indoor positioning device in a dynamic environment based on feature transfer, which comprises:

[0142] The difference module 1 is configured to acquire first source domain data and first target domain data, calculate an edge probability distribution difference between second source domain data and second target domain data according to an input data matrix composed of the first source domain data and the first target domain data, calculate a conditional probability distribution difference between the second source domain data and the second target domain data according to the first source domain data and the first target domain data of each category, and calculate a dynamic balance factor according to a distance between the first source domain data and the first target domain data as a whole and a distance between each category data in the first source domain data and the first target domain data.

[0143] The overall optimization module 2 is configured to determine a data overall feature distribution adaptation optimization target according to the edge probability distribution difference, the conditional probability distribution difference and the dynamic balance factor.

[0144] The local optimization module 3 is configured to calculate an intra-class distance of same category data in the second source domain data and an inter-class distance of different category data in the second source domain data according to the first source domain data respectively, and determine a data local geometric feature reservation optimization target according to the intra-class distance and the inter-class distance.

[0145] The total optimization module 4 is configured to construct a total optimization target according to the data overall feature distribution adaptation optimization target and the data local geometric feature reservation optimization target, solve a mapping matrix according to the total optimization target, and realize positioning through the mapping matrix.

[0146] Reference will now be made to the following description Figure 6 which shows a structural schematic diagram of a computer device 600 of an electronic device (for example Figure 1 a server or a terminal device) suitable for being used to implement the embodiments of the present application. Figure 6 The electronic device shown is merely an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.

[0147] As shown in Figure 6 , the computer device 600 includes a central processing unit (CPU) 601 and a graphics processor (GPU) 602, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 603 or programs loaded from a storage portion 609 to a random access memory (RAM) 604. In the RAM 604, various programs and data required for the operation of the device 600 are also stored. The CPU 601, the GPU 602, the ROM 603 and the RAM 604 are connected to each other through a bus 605. An input / output (I / O) interface 606 is also connected to the bus 605.

[0148] The following components are connected to the I / O interface 606: an input part 607 including a keyboard, a mouse, etc.; an output part 608 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage part 609 including a hard disk, etc.; and a communication part 610 including a network interface card such as a LAN card, a modem, etc. The communication part 610 performs communication processing via a network such as the Internet. A drive 611 can also be connected to the I / O interface 606 as necessary. A removable media 612 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 611 as necessary, so that a computer program read out therefrom is installed in the storage part 609 as necessary.

[0149] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication part 610, and / or installed from the removable media 612. When the computer program is executed by the central processing unit (CPU) 601 and the graphics processor (GPU) 602, the above-described functions defined in the methods of the present application are performed.

[0150] Note that the computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a computer-readable medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present context, a computer-readable medium can be any tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present context, a computer-readable signal medium can include a computer-readable program code in a baseband or propagated as carrier waves in a propagated data signal associating with a carrier wave. Such a propagated signal can take a wide variety of forms including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium that can be used to carry or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The program contained in the computer-readable medium can be transmitted in any suitable format including, but not limited to, wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.

[0151] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0152] The flow and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of apparatuses, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flow and block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or combinations of hardware and software.

[0153] The modules involved in the embodiments of the present application can be implemented in the form of software or in the form of hardware. The described modules can also be arranged in a processor.

[0154] As another aspect, the present application also provides a computer readable medium, which can be included in the electronic device described in the above embodiments, or can exist independently without being assembled into the electronic device. The computer readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: acquire first source domain data and first target domain data, calculate the edge probability distribution difference between the second source domain data and the second target domain data according to the input data matrix composed of the first source domain data and the first target domain data, calculate the conditional probability distribution difference between the second source domain data and the second target domain data according to the first source domain data and the first target domain data of each category, and calculate the dynamic balance factor according to the distance between the first source domain data and the first target domain data as a whole and the distance between each category data in the first source domain data and the first target domain data; determine the data overall feature distribution adaptation optimization target according to the edge probability distribution difference, the conditional probability distribution difference and the dynamic balance factor; calculate the intra-class distance of the same category data in the second source domain data and the inter-class distance of different category data in the second source domain data according to the first source domain data, respectively, and determine the data local geometric feature reservation optimization target according to the intra-class distance and the inter-class distance; construct the total optimization target according to the data overall feature distribution adaptation optimization target and the data local geometric feature reservation optimization target, and solve the mapping matrix according to the total optimization target, so as to realize positioning through the mapping matrix.

[0155] The above description is only the preferred embodiment of the present application and the explanation of the technical principles. It should be understood by those skilled in the art that the scope of the protection of the present application is not limited to the technical solutions formed by the specific combinations of the above technical features. It should also cover other technical solutions formed by the combinations of the above technical features or their equivalent features without departing from the concept of the present application. For example, the technical solutions formed by the mutual replacement of the above features and the technical features with similar functions disclosed (but not limited to) in the present application.

Claims

1. An indoor positioning method based on feature transfer in a dynamic environment, characterized in that, Includes the following steps: S1, acquire first source domain data and first target domain data; calculate the marginal probability distribution difference between the first source domain data and the first target domain data based on the input data matrix composed of the first source domain data and the first target domain data; calculate the conditional probability distribution difference between the first source domain data and the first target domain data based on the first source domain data and the first target domain data of each category; calculate the dynamic balance factor based on the overall distance between the first source domain data and the first target domain data and the distance between each category of data in the first source domain data and the first target domain data, specifically including: ; in, Indicates the category of the label. , and Let A-distance represent the distance between the entire first source domain data and the first target domain data, and between the distance between each type of data in the first source domain data and the first target domain data, respectively. The formula for calculating A-distance is as follows: ; in, Indicates the first source domain data. This represents the data of the first target domain. This represents the binary classifier trained using the first source domain data and the first target domain data. Classification loss; S2, based on the differences in marginal probability distribution, conditional probability distribution, and dynamic balance factor, determine the overall data feature distribution adaptation optimization objective, specifically including: By combining the marginal probability distribution difference, conditional probability distribution difference, and dynamic balance factor, and adding data variance as a constraint to ensure that the features of the two-domain data remain unchanged before and after mapping, the overall data feature distribution adaptation optimization objective is obtained as follows: ; in, and These represent the number of data points in the first source domain and the number of data points in the first target domain, respectively. This indicates finding the trace of a matrix. Indicates data from the first source domain and the first target domain data The input data matrix consists of M, which is the mapping matrix. For MMD matrix, The weight matrix, It is a central matrix and , It is the identity matrix. For regularization terms, where For regularization parameters, It is the Frobenius norm; S3, calculate the intra-class distance of data of the same class in the first source domain data and the inter-class distance of data of different classes in the first source domain data based on the first source domain data, and determine the local geometric feature preservation optimization objective based on the intra-class distance and the inter-class distance. The local geometric feature preservation optimization objective is: ; S4, constructing a total optimization objective based on the overall feature distribution of the data and the optimization objective that preserves the local geometric characteristics of the data, then solving for the total optimization objective to obtain a mapping matrix, and using the mapping matrix to achieve localization, specifically including: The overall optimization objective is: ; in, For regularization parameters, As a dynamic equilibrium factor, These are weight parameters; After transformation, it is equivalent to solving the following equation: ; The mapping matrix M can be obtained. The mapping matrix M is then multiplied with the first source domain data to obtain the second source domain data and the second target domain data. By combining the second source domain data with the KNN algorithm, localization can be achieved on the second target domain data.

2. The indoor positioning method in a dynamic environment based on feature transfer according to claim 1, characterized in that, Step S1, which calculates the marginal probability distribution difference between the first source domain data and the first target domain data based on the input data matrix composed of the first source domain data and the first target domain data, specifically includes: The marginal probability distribution difference is calculated based on MMD, using the following formula: ; in, Represents the regenerated Hilbert space. Describes the transpose of the mapping matrix. Represents the first source domain The i-th data in Indicates the first target domain data The j-th data in the dataset is constructed as follows: 。 3. The indoor positioning method in a dynamic environment based on feature transfer according to claim 2, characterized in that, Step S1, which calculates the conditional probability distribution difference between the first source domain data and the first target domain data for each category, specifically includes: A classifier is trained using the first source domain data to obtain a trained classifier. The first target domain data is then input into the trained classifier to obtain the category corresponding to the first target domain data. We use a sufficient statistic of the class-conditional probability distribution to approximate the conditional probability distribution, thereby calculating the conditional probability distribution between the first source domain data and the first target domain data, as shown in the following formula: ; in, This indicates that the category of the first source domain data is c. The category of the first target domain data is c; The formula for calculating the difference in conditional probability distributions based on MMD is as follows: ; This indicates that the category in the first source domain data is The sample, This indicates that the category in the first target domain data is The sample, and These represent the categories in the first source domain data and the first target domain data, respectively. The number of samples is constructed as follows: ; in, and These represent the categories in the first source domain data and the first target domain data, respectively. The prior class probability.

4. The indoor positioning method in a dynamic environment based on feature transfer according to claim 3, characterized in that, Step S3 specifically includes: The intra-class distance between data of the same class in the second source domain data is calculated using the intra-class distance value, and the formula is as follows: ; in, Indicates the category of the label. It is the first source domain data of category The number of samples, and we have: ; in, Let be a matrix, and its th... row and number The element in the column is 1, and all other elements are 0; The inter-class distance is calculated using the inter-class distance value for different classes in the second source domain data. The formula is as follows: ; in, These are the categories in the first source domain data. and The number of samples, and we have: 。 5. An indoor positioning device for dynamic environments based on feature transfer, characterized in that, The indoor positioning method based on feature transfer in dynamic environments, as described in any one of claims 1-4, includes: The difference module is configured to acquire first source domain data and first target domain data, calculate the marginal probability distribution difference between the first source domain data and the first target domain data based on the input data matrix composed of the first source domain data and the first target domain data, calculate the conditional probability distribution difference between the first source domain data and the first target domain data based on the first source domain data and the first target domain data of each category, and calculate the dynamic balance factor based on the overall distance between the first source domain data and the first target domain data and the distance between each category of data in the first source domain data and the first target domain data. The overall optimization module is configured to determine the overall feature distribution adaptation optimization target of the data based on the difference in marginal probability distribution, the difference in conditional probability distribution, and the dynamic balance factor. The local optimization module is configured to calculate the intra-class distance of data of the same class in the first source domain data and the inter-class distance of data of different classes in the first source domain data based on the first source domain data, and determine the local geometric characteristics preservation optimization target based on the intra-class distance and the inter-class distance; The overall optimization module is configured to construct an overall optimization objective based on the overall feature distribution of the data and the optimization objective that preserves the local geometric characteristics of the data, solve for the mapping matrix based on the overall optimization objective, and achieve localization through the mapping matrix.

6. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Indoor positioning method based on global and local joint constraint transfer learning

    CN109348410A