Fingerprint positioning method based on neural network and related device
Through the neural network-based fingerprint positioning method, combined with the LSTM model and the Sky Eagle optimization algorithm, the problem of low indoor positioning accuracy is solved, and more efficient and accurate indoor positioning is achieved.
Patent Information
- Application Number
- CN202411871488.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-01
AI Technical Summary
The existing indoor positioning technology is indoors due to the impact of satellite signal obstruction and multipath effect, and the positioning accuracy is low and cannot meet the indoor positioning needs.
A fingerprint positioning method based on neural network is adopted to acquire signal data from different locations in the target area, a fingerprint database is constructed, and the LSTM machine learning model is used for training. Then, the weight parameters and bias parameters of the initial model are input to the Tianying Optimization Algorithm for optimization to obtain the optimal weight parameters and bias parameters, which are used to build a positioning model and realize the positioning of real-time signal data.
The accuracy and efficiency of indoor positioning are improved, and the neural network can process signal data more accurately, overcoming the problems of insufficient fingerprint library samples and underutilizing signal characteristics in traditional technology.
Smart Images

Figure CN119743827A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communication technology, and in particular to a fingerprint positioning method based on a neural network and a related device thereof. Background Art
[0002] At present, the market demand for indoor positioning is increasing day by day. However, satellite signals are blocked by walls and multipath effects indoors, and the positioning performance drops sharply or even fails, which cannot meet the needs of indoor positioning.
[0003] In related technologies, relevant WIFI, geomagnetic and other signal data and location coordinates can generally be collected in advance to establish a fingerprint library. In actual use, by collecting signal data in real time, a matching algorithm is used to find the closest feature in the fingerprint library, thereby outputting the corresponding position to achieve matching positioning.
[0004] However, the current fingerprint matching through fingerprint database still has problems such as insufficient fingerprint library samples and underutilized signal features, resulting in poor positioning accuracy. Summary of the invention
[0005] In order to solve or partially solve the problems existing in the related technology, the present application provides a fingerprint positioning method based on a neural network and a related device, which can process the signal data of the target through the neural network to improve the accuracy and efficiency of positioning, and optimize the neural network through the Sky Eagle optimization algorithm to output positioning information more accurately.
[0006] The first aspect of the present application provides a fingerprint positioning method based on a neural network, including obtaining initial signal data of signal sources at different positions in a target area, and building a fingerprint database based on the signal data of the sampling points; building an LSTM machine learning model, and training the LSTM machine learning model through the fingerprint database to obtain an initial model; inputting the weight parameters and bias parameters of the initial model into the Eagle optimization algorithm as Eagle individuals, and performing optimization according to the Eagle optimization algorithm to obtain optimal weight parameters and optimal bias parameters; optimizing the initial model according to the optimal weight parameters and the optimal bias parameters to obtain a positioning model; obtaining real-time signal data of the signal source, and inputting the real-time signal data into the positioning model to obtain real-time position information of the signal source.
[0007] In combination with the first aspect, in a possible implementation of the first aspect, the weight parameters and bias parameters of the initial model are input as Eagle individuals into the Eagle optimization algorithm, and optimization is performed according to the Eagle optimization algorithm to obtain the best weight parameters and the best bias parameters, including: inputting the weight parameters and bias parameters of each convolutional layer of the initial model as Eagle individuals into the Eagle optimization algorithm, initializing the position of each Eagle individual in the Eagle population; calculating the fitness function value of each Eagle individual according to the fitness function, and taking the Eagle individual corresponding to the optimal fitness function value as the best Eagle individual; selecting the best individual according to the current iteration of the Eagle optimization algorithm. The number of generations is to perform exploration steps or development steps on each of the Sky Eagle individuals, and update the position of each of the Sky Eagle individuals and the position of the best Sky Eagle individual; determine whether the current number of iterations of the Sky Eagle optimization algorithm is equal to the maximum number of iterations. If the current number of iterations is less than the maximum number of iterations, return to the step of calculating the fitness function value of each Sky Eagle individual according to the preset fitness function, and take the Sky Eagle individual corresponding to the optimal fitness function value as the best Sky Eagle individual; if the current number of iterations is equal to the maximum number of iterations, obtain the optimal weight parameter and the optimal bias parameter according to the best Sky Eagle individual of the current number of iterations.
[0008] In combination with the first aspect, in a possible implementation method of the first aspect, according to the current number of iterations of the Sky Eagle optimization algorithm, an exploration step or a development step is performed on each Sky Eagle individual, including: when the current number of iterations is less than two-thirds of the maximum number of iterations, an exploration step is performed on each Sky Eagle individual; when the current number of iterations is greater than or equal to two-thirds of the maximum number of iterations, a development step is performed on each Sky Eagle individual.
[0009] In combination with the first aspect, in a possible implementation method of the first aspect, according to the current number of iterations of the Sky Eagle optimization algorithm, an exploration step or a development step is performed on each Sky Eagle individual, and the position of each Sky Eagle individual is updated. The exploration step includes a global exploration stage and a local exploration stage, including: when the current number of iterations is less than two-thirds of the maximum number of iterations, a first random number is generated, and the value of the first random number is 0 to 1; when the first random number is less than 0.5, the global exploration stage is performed on each Sky Eagle individual in the Sky Eagle population, and when the first random number is greater than or equal to 0.5, the local exploration stage is performed on each Sky Eagle individual in the Sky Eagle population; after each Sky Eagle individual completes the exploration step, the position of each Sky Eagle individual is updated.
[0010] In combination with the first aspect, in a possible implementation of the first aspect, according to the current number of iterations of the Eagle optimization algorithm, an exploration step or a development step is performed on each Eagle individual, and the position of each Eagle individual is updated, and the development step includes a global development stage and a local development stage, including: when the current number of iterations is greater than or equal to two-thirds of the maximum number of iterations, a second random number is generated, and the value of the second random number is 0 to 1; when the second random number is less than 0.5, the global development stage is performed on each Eagle individual in the Eagle population, and when the second random number is greater than or equal to 0.5, the local development stage is performed on each Eagle individual in the Eagle population; in the local development stage, the position update formula of each Eagle individual is:
[0011] X(t+1)=QF×X best (t)-(G 1 ×X(t)×rand 2 )-G 2 ×Levy(D)+rand 2 ×G 1
[0012]
[0013] G 2 =2*rand 2 -1
[0014] Where X(t+1) is the position of the eagle individual in the t+1 iteration, X(t) is the position of the eagle individual in the t iteration, QF(t) is the quality function value at the t iteration, X best (t) is the position of the best eagle individual in the tth iteration, rand 2 is the second random number, G 1 is the first control factor, G 2 is the second control factor, T is the maximum number of iterations, and Levy (D) is the Levy flight distribution function; after each of the Sky Eagle individuals completes the development step, the position of each of the Sky Eagle individuals is updated.
[0015] In combination with the first aspect, in a possible implementation manner of the first aspect, the fitness function is:
[0016]
[0017] Wherein, FitnessX(t) is the fitness function value of the eagle individual in the tth iteration, α and β are constant factors, N is the total number of the signal sources, (x, y) is the predicted coordinates of the signal source after being processed by the initial model, (xi ,y i ) is the real coordinate of the signal source, CSI score(i) is the CSI signal parameter.
[0018] In combination with the first aspect, in a possible implementation of the first aspect, the initializing the position of each of the Sky Eagle individuals in the Sky Eagle population includes: initializing the position of each of the Sky Eagle individuals in the Sky Eagle population according to a Tent chaos strategy algorithm.
[0019] The second aspect of the present application provides a fingerprint positioning device based on a neural network, including an acquisition module, which acquires initial signal data of signal sources at different positions in a target area, and constructs a fingerprint database based on the signal data of the sampling points; a construction module, which constructs an LSTM machine learning model, and trains the LSTM machine learning model through the fingerprint database to obtain an initial model; a processing module, which inputs the weight parameters and bias parameters of the initial model as Eagle individuals into the Eagle optimization algorithm, and performs optimization according to the Eagle optimization algorithm to obtain optimal weight parameters and optimal bias parameters; an optimization module, which optimizes the initial model according to the optimal weight parameters and the optimal bias parameters to obtain a positioning model; a positioning module, which acquires real-time signal data of the signal source, and inputs the real-time signal data into the positioning model to obtain real-time position information of the signal source.
[0020] In combination with the second aspect, in a possible implementation method of the second aspect, the processing module is also used to input the weight parameters and bias parameters of the initial model as Eagle individuals into the Eagle optimization algorithm to initialize the position of each Eagle individual in the Eagle population; calculate the fitness function value of each Eagle individual according to the fitness function, and take the Eagle individual corresponding to the optimal fitness function value as the best Eagle individual; according to the current number of iterations of the Eagle optimization algorithm, perform an exploration step or a development step on each Eagle individual, and update the position of each Eagle individual and the position of the best Eagle individual; determine whether the current number of iterations of the Eagle optimization algorithm is equal to the maximum number of iterations. If the current number of iterations is less than the maximum number of iterations, return to the step of calculating the fitness function value of each Eagle individual according to the preset fitness function, and take the Eagle individual corresponding to the optimal fitness function value as the best Eagle individual; if the current number of iterations is equal to the maximum number of iterations, obtain the optimal weight parameters and the optimal bias parameters according to the best Eagle individual of the current number of iterations.
[0021] In combination with the second aspect, in a possible implementation of the second aspect, the processing module is also used to perform an exploration step on each of the Sky Eagle individuals when the current number of iterations is less than two-thirds of the maximum number of iterations; and to perform a development step on each of the Sky Eagle individuals when the current number of iterations is greater than or equal to two-thirds of the maximum number of iterations.
[0022] In combination with the second aspect, in a possible implementation method of the second aspect, the processing module is also used to generate a first random number when the current number of iterations is less than two-thirds of the maximum number of iterations, and the value of the first random number is 0 to 1; when the first random number is less than 0.5, the global exploration phase is performed on each of the Sky Eagle individuals in the Sky Eagle population; when the first random number is greater than or equal to 0.5, the local exploration phase is performed on each of the Sky Eagle individuals in the Sky Eagle population; after each of the Sky Eagle individuals completes the exploration step, the position of each of the Sky Eagle individuals is updated.
[0023] In combination with the second aspect, in a possible implementation of the second aspect, the processing module is also used to generate a second random number when the current number of iterations is greater than or equal to two-thirds of the maximum number of iterations, and the value of the second random number is 0 to 1; when the second random number is less than 0.5, the global development stage is performed on each of the eagle individuals in the eagle population; when the second random number is greater than or equal to 0.5, the local development stage is performed on each of the eagle individuals in the eagle population; in the local development stage, the position update formula of each of the eagle individuals is:
[0024] X(t+1)=QF×X best (t)-(G 1 ×X(t)×rand 2 )-G 2 ×Levy(D)+rand 2 ×G 1
[0025]
[0026] G 2 =2*rand 2 -1
[0027] Where X(t+1) is the position of the eagle individual in the t+1 iteration, X(t) is the position of the eagle individual in the t iteration, QF(t) is the quality function value at the t iteration, X best (t) is the position of the best eagle individual in the tth iteration, rand 2 is the second random number, G 1 is the first control factor, G2 is the second control factor, T is the maximum number of iterations, and Levy (D) is the Levy flight distribution function; after each of the Sky Eagle individuals completes the development step, the position of each of the Sky Eagle individuals is updated.
[0028] In combination with the second aspect, in a possible implementation of the second aspect, the processing module is also used to initialize the position of each of the eagle individuals in the eagle population according to a Tent chaos strategy algorithm.
[0029] A third aspect of the present application provides an electronic device, including:
[0030] Processor; and
[0031] The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.
[0032] A fourth aspect of the present application provides a computer-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as described above.
[0033] The technical solution provided by this application may have the following beneficial effects:
[0034] The neural network-based fingerprint positioning method and related devices of the present application include obtaining initial signal data of signal sources at different positions in the target area, and building a fingerprint database based on the signal data of the sampling points; building an LSTM machine learning model, training the LSTM machine learning model through the fingerprint database to obtain an initial model; inputting the weight parameters and bias parameters of the initial model into the Tianying optimization algorithm as Tianying individuals, and performing optimization according to the Tianying optimization algorithm to obtain the optimal weight parameters and the optimal bias parameters; optimizing the initial model according to the optimal weight parameters and the optimal bias parameters to obtain a positioning model; obtaining real-time signal data of the signal source, inputting the real-time signal data into the positioning model, and obtaining real-time position information of the signal source, which can process the signal data of the target through the neural network to improve the accuracy and efficiency of positioning, and optimizing the neural network through the Tianying optimization algorithm to output positioning information more accurately.
[0035] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail the exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.
[0037] Figure 1 It is a schematic diagram of the flow of a fingerprint positioning method based on a neural network shown in an embodiment of the present application;
[0038] Figure 2 is a schematic diagram of the structure of a fingerprint positioning device based on a neural network shown in an embodiment of the present application;
[0039] Figure 3 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0041] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "an" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0042] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0043] Among related technologies, traditional fingerprint positioning technology relies on artificially designed features and matching algorithms, and has problems such as low positioning accuracy and poor adaptability to complex environments. With the rapid development of deep learning technology, LSTM networks have achieved remarkable results in image processing, speech recognition and other fields, and have also provided new ideas for fingerprint positioning technology. However, directly applying LSTM networks to fingerprint positioning still faces many challenges, such as complex network structure design and the training process is prone to falling into local optimality.
[0044] Due to the widespread deployment of 5G networks, 5G fingerprint positioning technology based on CSI has become one of the methods for indoor positioning. Among them, the construction of the CSI fingerprint database is crucial to improving positioning performance. However, there are still problems such as insufficient samples in the fingerprint library and underutilization of signal features, resulting in the need to improve positioning accuracy. Therefore, by optimizing the LSTM network structure using the improved Sky Eagle algorithm, the accuracy of indoor positioning results can be further improved.
[0045] In response to the above problems, an embodiment of the present application provides a fingerprint positioning method based on a neural network, which can process the signal data of the target through the neural network to improve the accuracy and efficiency of positioning, and optimize the neural network through the Sky Eagle optimization algorithm to output positioning information more accurately.
[0046] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0047] Figure 1 It is a flow chart of a fingerprint positioning method based on a neural network shown in an embodiment of the present application.
[0048] See also Figure 1 , a fingerprint positioning method based on neural network, comprising:
[0049] S110: Acquire initial signal data of signal sources at different positions in the target area, and construct a fingerprint database based on the signal data of the sampling points.
[0050] Specifically, the initial signal data of signal sources at different locations in the target area can be obtained. The signal data can be various signal information and location information including WIFI, Bluetooth, cellular base stations, geomagnetism, air pressure, and light. It can be CSI data. CSI data is the signal propagation characteristics between the transmitter and the receiver, and includes information such as signal transmission, signal scattering, environmental attenuation, and distance attenuation. CSI data usually includes amplitude and phase information of each subcarrier. CSI data will be affected by multipath effects and signal attenuation caused by non-line-of-sight (shielding). Therefore, CSI data can be pre-processed by SG filtering (Savitzky-Golay filtering) to improve the accuracy and robustness of positioning. The SG filter smoothes the data by performing polynomial regression in a local window, thereby removing noise while retaining the shape and characteristics of the signal. The phase and amplitude of the 5G subcarrier after SG filtering can retain its own signal characteristics while eliminating redundant data.
[0051] S120: Build an LSTM machine learning model, train the LSTM machine learning model through the fingerprint database, and obtain an initial model.
[0052] Specifically, an LSTM machine learning model can be constructed. The LSTM machine learning model can include an input layer, a hidden layer, and an output layer. The input layer is responsible for receiving data, the hidden layer performs feature extraction and pattern recognition, and the output layer outputs results according to the prediction task of the model. The weight parameters and bias parameters of the LSTM machine learning model can be initialized. Random initialization or initialization methods based on specific distributions are usually used to ensure that the network has good exploration capabilities in the early stages of training. Different weight and bias initialization methods will make the model have different convergence speeds. Sequence pooling layers are inserted between LSTM layers in a timely manner to reduce the spatial size of features, thereby reducing the number of network parameters, reducing computational complexity, and helping to prevent overfitting. Sequence pooling can use maximum pooling or average pooling. In this application, maximum pooling is used to retain important information in the features while suppressing noise. The output of the LSTM layer is feature fused, which can merge hidden states of different time steps by connection or weighting to form a global feature representation. The fused features are input into one or more fully connected layers, which map the extracted features to the final positioning results.
[0053] S130: Input the weight parameters and bias parameters of the initial model as the Eagle individuals into the Eagle optimization algorithm, and perform optimization according to the Eagle optimization algorithm to obtain the optimal weight parameters and the optimal bias parameters.
[0054] Specifically, each level in the initial model can have multiple weight parameters and bias parameters, and the multiple weight parameters and bias parameters can be input into the Tianying optimization algorithm as Tianying individuals, and the optimization is performed according to the Tianying optimization algorithm to obtain the optimal weight parameters and the optimal bias parameters.
[0055] In one possible implementation, the weight parameters and bias parameters of the initial model are input as Eagle individuals into the Eagle optimization algorithm to initialize the position of each Eagle individual in the Eagle population; the fitness function value of each Eagle individual is calculated according to the fitness function, and the Eagle individual corresponding to the optimal fitness function value is taken as the best Eagle individual; according to the current number of iterations of the Eagle optimization algorithm, an exploration step or a development step is performed on each Eagle individual, and the position of each Eagle individual and the position of the best Eagle individual are updated; it is determined whether the current number of iterations of the Eagle optimization algorithm is equal to the maximum number of iterations. If the current number of iterations is less than the maximum number of iterations, it is returned to the step of calculating the fitness function value of each Eagle individual according to the preset fitness function, and taking the Eagle individual corresponding to the optimal fitness function value as the best Eagle individual; if the current number of iterations is equal to the maximum number of iterations, the optimal weight parameters and the optimal bias parameters are obtained according to the best Eagle individual of the current number of iterations.
[0056] Specifically, after a plurality of weight parameters and bias parameters are input as eagle individuals into the eagle optimization algorithm, a eagle population can be obtained, and the eagle population can be initialized to improve randomness.
[0057] In a possible implementation, when the current number of iterations is less than two-thirds of the maximum number of iterations, the exploration step is performed on each individual eagle; when the current number of iterations is greater than or equal to two-thirds of the maximum number of iterations, the development step is performed on each individual eagle, and according to the ratio of the current number of iterations to the maximum number of iterations, a high search efficiency can be maintained at different stages of the algorithm. At the same time, the specific implementation methods of global exploration and local development are selected through a random algorithm, which increases the uncertainty of the algorithm and helps to jump out of the local optimal solution.
[0058] In one possible implementation, when the current number of iterations is less than two-thirds of the maximum number of iterations, a first random number is generated, and the value of the first random number is between 0 and 1; when the first random number is less than 0.5, a global exploration phase is performed on each individual eagle in the eagle population, and when the first random number is greater than or equal to 0.5, a local exploration phase is performed on each individual eagle in the eagle population; after each individual eagle completes the exploration step, the position of each individual eagle is updated.
[0059] Specifically, in the global exploration phase, the eagle individuals soar in the sky to identify prey areas and select the best hunting area. The position update formula of each eagle individual is:
[0060]
[0061] Among them, X(t+1) is the position of the eagle individual in the t+1 iteration, X(t) is the position of the eagle individual in the t iteration, and X best (t) is the position of the best Skyhawk individual in the tth iteration, T is the maximum number of iterations, N is the total number of signal sources, X M (t) is the mean of the individual positions of each eagle in t iterations, rand 1 is the first random number, Dim is the dimension constant.
[0062] Specifically, in the local exploration phase, after discovering the prey area, the eagle individual hovers over the target prey, ready to attack. The position update formula of each eagle individual is:
[0063] X(t+1)=X best (t)×Levy(D)+X R (t)(yx)×rand 1
[0064]
[0065] y=r×cos(θ)
[0066] x=r×sin(θ)
[0067] r=r 1 +U×D 1
[0068] θ=-ω×D 1 +θ 1
[0069] Where D is the dimensional space, Levy(D) is the Levy flight distribution function, s and β are fixed constants between 0.01 and 1.5, u and v are random numbers between 0 and 1, and X R (t) is the position information of a random eagle individual in the eagle population at the tth iteration, y and x are the values of the spiral shape when the eagle individual searches; r 1 is a fixed number of search cycles between 1 and 20; U is a fixed optimization parameter of 0.00475; D 1 is an integer value between 1 and the dimension space D; ω is a fixed optimization parameter of 0.005.
[0070] In a possible implementation, when the current number of iterations is greater than or equal to two-thirds of the maximum number of iterations, a second random number is generated, and the value of the second random number is 0 to 1;
[0071] When the second random number is less than 0.5, a global development phase is performed on each individual eagle in the eagle population; when the second random number is greater than or equal to 0.5, a local development phase is performed on each individual eagle in the eagle population;
[0072] In the local development stage, the eagle approaches the prey and uses a random strategy to capture the prey. The position update formula of each eagle individual is:
[0073] X(t+1)=QF×X best (t)-(G 1 ×X(t)×rand 2 )-G 2 ×Levy(D)+rand 2 ×G 1
[0074]
[0075] G 2 =2*rand 2 -1
[0076] Where X(t+1) is the position of the eagle individual in the t+1 iteration, X(t) is the position of the eagle individual in the t iteration, QF(t) is the quality function value at the t iteration, and X best (t) is the position of the best eagle individual in the tth iteration, rand 2 is the second random number, G 1 is the first control factor, G 2 is the second control factor, T is the maximum number of iterations, and Levy (D) is the Levy flight distribution function; after each eagle individual completes the development step, the position of each eagle individual is updated.
[0077] Specifically, G. 1 It is usually used to control the flight slope during the search process. It gradually decreases with the increase of the number of iterations, so that the search process can gradually transition from global exploration to fine local search. 2 Used by eagle individuals to track prey during the search process, G 2 It can be a random number to increase the randomness and diversity of the search. 1 The trend of the change is that it decreases linearly with the increase of the number of iterations, and the range of change is from 2 to 0, and the change amount is a fixed value. 1 It gradually increases during the entire iterative process, and the rate changes from slow to fast, which can better balance the global exploration and local development of the Tianying algorithm, thereby improving the optimization performance of the Tianying algorithm, and preventing the Tianying optimization algorithm from converging to the local optimal point too early in the entire optimization iteration process, making the weights of the early iterations different from the weights of the later iterations, and better ensuring the effect of the Tianying optimization algorithm.
[0078] Specifically, in the global development stage, the Skyhawk determines the prey area and descends vertically to make a preliminary attack to detect the prey's reaction. The position update formula of each Skyhawk individual is:
[0079] X(t+1)=(X best (t)-X M (t))×α-rand 2 +((UB-LB)×rand 2 +LB)×δ
[0080] Among them, X(t+1) is the position of the eagle individual in the t+1 iteration, X(t) is the position of the eagle individual in the t iteration, and rand 2 is the second random number, X best (t) is the position of the best eagle individual in the tth iteration, α and δ can be 0.1; B and LB are the upper and lower bounds of the eagle population respectively.
[0081] In a possible implementation, the fitness function is:
[0082]
[0083] Among them, FitnessX(t) is the fitness function value of the eagle individual in the tth iteration, α and β are constant factors, N is the total number of signal sources, (x, y) is the predicted coordinates of the signal source after the initial model processing, (x i ,y i ) is the real coordinate of the signal source, α and β can be selected and adjusted according to the actual situation, for example, α=0.7, β=0.3, CSI score(i) is the CSI signal parameter, CSI score(i) It represents the help of 5G signal CSI information for positioning, and its calculation process can be expressed as:
[0084]
[0085] CBW max Indicates the maximum value of the channel coherence bandwidth, CBW ( i ) represents the channel coherence bandwidth of the i-th prediction position.
[0086] In a possible implementation, the position of each individual eagle in the eagle population is initialized according to the Tent chaos strategy algorithm.
[0087] Specifically, the Tent mapping can be used to generate a chaotic sequence and initialize the eagle population so that the initial solution is distributed as evenly as possible in the solution space. This process can be achieved by iterating the Tent mapping formula to generate a series of chaotic values combined with the chaotic sequence, and further generate the individual initial position sequence in the search area. This process involves mapping the chaotic sequence to the specific search space of the optimization problem. For example, UB and LB are the upper and lower bounds of the eagle population, respectively, and the individual position can be calculated as follows:
[0088] pop=lb+z·(ub-lb)
[0089] Among them, z is the sequence generated by the Tent chaotic map, pop is the initialized population, and the Tent map provides additional dynamic changes for the model through its nonlinear and chaotic characteristics, so that the model can jump out of the local optimal solution during the learning process and explore a wider parameter space. In addition, the Tent chaotic strategy can also dynamically adjust the parameters of the chaotic map according to the training state of the model to adapt to different learning stages, thereby ensuring the stable convergence of the model while improving the generalization ability of the model, thereby increasing the exploration ability of the model.
[0090] In a possible implementation, the population of the eagle can be evolved by using a differential algorithm to eliminate inferior individuals. The differential algorithm can be used to perform genetic mutation on the eagle individuals. The formula for generating the mutant individual vector is as follows:
[0091]
[0092] V t is the position of the eagle individual after mutation, t is the current iteration number, X b is the position of the current Eagle individual, F is the scaling factor, F can be 0.5; then the Eagle individual can be cross-operated, and the cross-operation is used to cross the unmutated Eagle individual in the population with the mutated individual vector to generate a new individual vector for the target individual X i With the variant individual V i Perform a crossover operation and generate new crossover individuals through the following formula:
[0093]
[0094] rand 3 is a random number between 0 and 1, CR is the crossover probability belonging to [0,1], CR can be 0.3, and the selection operation is used to select excellent individual vectors in the differential algorithm, thereby ensuring the quality of individuals in the eagle population and better avoiding falling into the local optimum. i And the new individual U generated after crossover i , the greedy algorithm is used through the following formula, and the value with the smaller fitness function value is used as the individual of the next generation population:
[0095]
[0096] Among them, Y i (t+1) is the eagle individual of iteration t+1 times, f(Y i (t)) is the fitness function value of the eagle individual at the tth iteration, f(U i (t)) is the fitness function value of the generated new individual at the time of iteration t, which can generate a new solution vector, i.e., a new Eagle individual, through mutation operation, the advantages of different solution vectors are integrated through crossover operation, and excellent individuals are retained through selection operation, thereby realizing the continuous expansion of the algorithm search space and the continuous improvement of population quality. As an effective evolutionary algorithm, the differential algorithm introduces new search directions and diversity to the algorithm through mutation, crossover and selection processes. The present invention deeply integrates the differential perturbation mechanism with the Eagle algorithm, generates a new solution vector through mutation operation, integrates the advantages of different solution vectors through crossover operation, and retains excellent individuals through selection operation, thereby realizing the continuous expansion of the algorithm search space and the continuous improvement of population quality.
[0097] S140: Optimize the initial model according to the optimal weight parameter and the optimal bias parameter to obtain a positioning model.
[0098] Specifically, after obtaining the best weight parameters and the best bias parameters, the initial model can be optimized to obtain a positioning model. The weight parameters and the bias parameters are optimized by the Sky Eagle optimization algorithm, and the obtained positioning model has higher positioning accuracy.
[0099] S150: Acquire real-time signal data of the signal source, input the real-time signal data into the positioning model, and obtain real-time position information of the signal source.
[0100] Specifically, after obtaining the positioning model, the real-time signal data of the signal can be re-acquired in real time and input into the positioning model. Through calculation by the positioning model, the accurate real-time position information of the signal source can be obtained to locate the position of the pedestrian indoors.
[0101] The neural network-based fingerprint positioning method of the present application includes obtaining initial signal data of signal sources at different positions in a target area, and building a fingerprint database based on the signal data of sampling points; building an LSTM machine learning model, and training the LSTM machine learning model through the fingerprint database to obtain an initial model; inputting the weight parameters and bias parameters of the initial model into the Tianying optimization algorithm as Tianying individuals, and performing optimization according to the Tianying optimization algorithm to obtain optimal weight parameters and optimal bias parameters; optimizing the initial model according to the optimal weight parameters and optimal bias parameters to obtain a positioning model; obtaining real-time signal data of the signal source, and inputting the real-time signal data into the positioning model to obtain real-time position information of the signal source, which can process the signal data of the target through the neural network to improve the accuracy and efficiency of positioning, and optimizing the neural network through the Tianying optimization algorithm to output positioning information more accurately.
[0102] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a fingerprint positioning device based on a neural network, an electronic device and corresponding embodiments.
[0103] Figure 2 It is a schematic diagram of the structure of a fingerprint positioning device 200 based on a neural network shown in an embodiment of the present application.
[0104] See also Figure 2 , a fingerprint positioning device 200 based on a neural network, comprising:
[0105] The acquisition module 210 acquires initial signal data of signal sources at different positions in the target area, and constructs a fingerprint database based on the signal data of the sampling points.
[0106] Construction module 220 builds an LSTM machine learning model, trains the LSTM machine learning model through the fingerprint database, and obtains an initial model.
[0107] The processing module 230 inputs the weight parameters and bias parameters of each convolutional layer of the initial model into the Tianying optimization algorithm as Tianying individuals, and performs optimization according to the Tianying optimization algorithm to obtain the optimal weight parameters and the optimal bias parameters.
[0108] In a possible implementation, the processing module 230 is also used to input the weight parameters and bias parameters of the initial model as Eagle individuals into the Eagle optimization algorithm to initialize the position of each Eagle individual in the Eagle population; calculate the fitness function value of each Eagle individual according to the fitness function, and take the Eagle individual corresponding to the optimal fitness function value as the best Eagle individual; according to the current number of iterations of the Eagle optimization algorithm, perform an exploration step or a development step on each Eagle individual, and update the position of each Eagle individual and the position of the best Eagle individual; determine whether the current number of iterations of the Eagle optimization algorithm is equal to the maximum number of iterations. If the current number of iterations is less than the maximum number of iterations, return to the step of calculating the fitness function value of each Eagle individual according to the preset fitness function, and take the Eagle individual corresponding to the optimal fitness function value as the best Eagle individual; if the current number of iterations is equal to the maximum number of iterations, obtain the optimal weight parameters and the optimal bias parameters based on the best Eagle individual of the current number of iterations.
[0109] In one possible implementation, the processing module 230 is also used to execute an exploration step for each Sky Eagle individual when the current number of iterations is less than two-thirds of the maximum number of iterations; and to execute a development step for each Sky Eagle individual when the current number of iterations is greater than or equal to two-thirds of the maximum number of iterations.
[0110] In a possible implementation, the processing module 230 is also used to generate a first random number when the current number of iterations is less than two-thirds of the maximum number of iterations, and the value of the first random number is between 0 and 1; when the first random number is less than 0.5, a global exploration phase is performed on each eagle individual in the eagle population; when the first random number is greater than or equal to 0.5, a local exploration phase is performed on each eagle individual in the eagle population; after each eagle individual completes the exploration step, the position of each eagle individual is updated.
[0111] In a possible implementation, the processing module 230 is further configured to generate a second random number when the current number of iterations is greater than or equal to two-thirds of the maximum number of iterations, and the value of the second random number is 0 to 1; when the second random number is less than 0.5, a global development phase is performed for each individual eagle in the eagle population; when the second random number is greater than or equal to 0.5, a local development phase is performed for each individual eagle in the eagle population; in the local development phase, the position update formula of each individual eagle is:
[0112] X(t+1)=QF×X best (t)-(G 1 ×X(t)×rand 2 )-G 2 ×Levy(D)+rand 2 ×G 1
[0113]
[0114] G 2 =2*rand 2 -1
[0115] Where X(t+1) is the position of the eagle individual in the t+1 iteration, X(t) is the position of the eagle individual in the t iteration, QF(t) is the quality function value at the t iteration, and X best (t) is the position of the best eagle individual in the tth iteration, rand 2 is the second random number, G 1 is the first control factor, G 2 is the second control factor, T is the maximum number of iterations, and Levy (D) is the Levy flight distribution function; after each eagle individual completes the development step, the position of each eagle individual is updated.
[0116] In a possible implementation, the processing module 230 is further configured to initialize the position of each individual eagle in the eagle population according to the Tent chaos strategy algorithm.
[0117] The optimization module 240 optimizes the initial model according to the optimal weight parameters and the optimal bias parameters to obtain a positioning model.
[0118] The positioning module 250 obtains real-time signal data of the signal source, inputs the real-time signal data into the positioning model, and obtains the real-time position information of the signal source.
[0119] The neural network-based fingerprint positioning device of the present application includes obtaining initial signal data of signal sources at different positions in a target area, and building a fingerprint database based on the signal data of sampling points; building an LSTM machine learning model, training the LSTM machine learning model through the fingerprint database to obtain an initial model; inputting the weight parameters and bias parameters of the initial model into the Tianying optimization algorithm as Tianying individuals, and performing optimization according to the Tianying optimization algorithm to obtain the optimal weight parameters and the optimal bias parameters; optimizing the initial model according to the optimal weight parameters and the optimal bias parameters to obtain a positioning model; obtaining real-time signal data of the signal source, inputting the real-time signal data into the positioning model, and obtaining real-time position information of the signal source, which can process the signal data of the target through the neural network to improve the accuracy and efficiency of positioning, and optimizing the neural network through the Tianying optimization algorithm to output positioning information more accurately.
[0120] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.
[0121] Figure 3 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application.
[0122] See also Figure 3 , the electronic device 300 includes a memory 310 and a processor 320.
[0123] The processor 320 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0124] The memory 310 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 320 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 310 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 310 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. Computer-readable storage media do not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0125] The memory 310 stores executable codes, and when the executable codes are processed by the processor 320 , the processor 320 can execute part or all of the methods described above.
[0126] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.
[0127] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.
[0128] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A fingerprint positioning method based on neural network, characterized in that: include: Acquire initial signal data of signal sources at different locations in the target area, and construct a fingerprint database based on the signal data of the sampling points; Constructing an LSTM machine learning model, and training the LSTM machine learning model through the fingerprint database to obtain an initial model; Inputting the weight parameters and bias parameters of the initial model into the Eagle optimization algorithm as Eagle individuals, and performing optimization according to the Eagle optimization algorithm to obtain the optimal weight parameters and the optimal bias parameters; Optimizing the initial model according to the optimal weight parameter and the optimal bias parameter to obtain a positioning model; The real-time signal data of the signal source is acquired, and the real-time signal data is input into the positioning model to obtain the real-time position information of the signal source.
2. The method according to claim 1, characterized in that The step of inputting the weight parameters and bias parameters of the initial model as the Eagle individuals into the Eagle optimization algorithm, and performing optimization according to the Eagle optimization algorithm to obtain the optimal weight parameters and the optimal bias parameters includes: Input the weight parameters and bias parameters of the initial model into the Eagle optimization algorithm as Eagle individuals, and initialize the position of each Eagle individual in the Eagle population; Calculating the fitness function value of each of the eagle individuals according to the fitness function, and taking the eagle individual corresponding to the optimal fitness function value as the best eagle individual; According to the current iteration number of the Sky Eagle optimization algorithm, performing an exploration step or an development step on each of the Sky Eagle individuals, and updating the position of each of the Sky Eagle individuals and the position of the best Sky Eagle individual; Determine whether the current number of iterations of the Sky Eagle optimization algorithm is equal to the maximum number of iterations. If the current number of iterations is less than the maximum number of iterations, return to the step of calculating the fitness function value of each Sky Eagle individual according to a preset fitness function, and take the Sky Eagle individual corresponding to the optimal fitness function value as the best Sky Eagle individual; If the current number of iterations is equal to the maximum number of iterations, the optimal weight parameter and the optimal bias parameter are obtained according to the best Sky Eagle individual of the current number of iterations.
3. The method according to claim 2, characterized in that The step of performing an exploration step or a development step on each individual Sky Eagle according to the current iteration number of the Sky Eagle optimization algorithm includes: When the current number of iterations is less than two-thirds of the maximum number of iterations, performing an exploration step on each of the Sky Eagle individuals; When the current number of iterations is greater than or equal to two-thirds of the maximum number of iterations, the development step is performed on each of the Sky Eagle individuals.
4. The method according to claim 3, characterized in that According to the current iteration number of the Sky Eagle optimization algorithm, an exploration step or a development step is performed on each Sky Eagle individual, and the position of each Sky Eagle individual is updated. The exploration step includes a global exploration stage and a local exploration stage, including: When the current number of iterations is less than two-thirds of the maximum number of iterations, a first random number is generated, where the value of the first random number is between 0 and 1; When the first random number is less than 0.5, the global exploration phase is performed on each of the eagle individuals in the eagle population; when the first random number is greater than or equal to 0.5, the local exploration phase is performed on each of the eagle individuals in the eagle population; After each of the Sky Eagle individuals completes the exploration step, the position of each of the Sky Eagle individuals is updated.
5. The method according to claim 3, characterized in that: According to the current iteration number of the Sky Eagle optimization algorithm, an exploration step or a development step is performed on each Sky Eagle individual, and the position of each Sky Eagle individual is updated. The development step includes a global development stage and a local development stage, including: When the current number of iterations is greater than or equal to two thirds of the maximum number of iterations, a second random number is generated, where the value of the second random number is between 0 and 1; When the second random number is less than 0.5, the global development phase is performed on each of the eagle individuals in the eagle population; when the second random number is greater than or equal to 0.5, the local development phase is performed on each of the eagle individuals in the eagle population; In the local development stage, the position update formula of each Sky Eagle individual is: X(t+1)=QF×X best (t)-(G1×X(t)×rand2)-G2×Levy(D)+rand2×G1 G2=2*rand2-1 Where X(t+1) is the position of the eagle individual in the t+1 iteration, X(t) is the position of the eagle individual in the t iteration, QF(t) is the quality function value at the t iteration, X best (t) is the position of the best eagle individual in the tth iteration, rand2 is the second random number, G1 is the first control factor, G2 is the second control factor, T is the maximum number of iterations, and Levy (D) is the Levy flight distribution function; After each of the Sky Eagle individuals completes the development step, the position of each of the Sky Eagle individuals is updated.
6. The method according to claim 5, characterized in that The fitness function is: Wherein, FitnessX(t) is the fitness function value of the eagle individual in the tth iteration, α and β are constant factors, N is the total number of the signal sources, (x, y) is the predicted coordinates of the signal source after being processed by the initial model, (x i ,y i ) is the real coordinate of the signal source, CSI score(i) is the CSI signal parameter.
7. The method according to claim 5, characterized in that The initializing the position of each individual eagle in the eagle population includes: The position of each individual eagle in the eagle population is initialized according to the Tent chaos strategy algorithm.
8. A fingerprint positioning device based on neural network, characterized in that: include: An acquisition module, which acquires initial signal data of signal sources at different positions in the target area, and constructs a fingerprint database based on the signal data of the sampling points; A construction module is used to construct an LSTM machine learning model, and the LSTM machine learning model is trained through the fingerprint database to obtain an initial model; A processing module, inputting the weight parameters and bias parameters of the initial model into the Eagle optimization algorithm as Eagle individuals, and performing optimization according to the Eagle optimization algorithm to obtain the optimal weight parameters and the optimal bias parameters; An optimization module optimizes the initial model according to the optimal weight parameter and the optimal bias parameter to obtain a positioning model; The positioning module obtains the real-time signal data of the signal source, inputs the real-time signal data into the positioning model, and obtains the real-time position information of the signal source.
9. An electronic device, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: An executable code is stored thereon, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as claimed in any one of claims 1 to 7.