Multi-scale geomagnetic positioning method, device, equipment and computer-readable storage medium

By adopting a multi-scale method based on attention mechanism in geomagnetic positioning, using Bi-LSTM to extract geomagnetic features and calculate attention weights, the problems of high complexity of geomagnetic sequence calculation and unsatisfactory matching effects in the prior art are solved, and geomagnetic positioning with high accuracy and real-time performance are achieved.

CN118980371BActive Publication Date: 2025-03-14HUNAN UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411449985.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-03-14
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

The prior art has high computational complexity when processing geomagnetic sequences, which is difficult to apply to real-time applications. The dynamic time regularization algorithm (DTW) is mainly used for one-dimensional data, and it is impossible to effectively process high-dimensional geomagnetic data, resulting in unsatisfactory matching effect.

Method used

A multi-scale geomagnetic positioning method based on attention mechanism is used to extract geomagnetic features through a bidirectional long and short-term memory network (Bi-LSTM), calculate attention weights, and generate the final geomagnetic sequence representation through the weighted fusion feature, and finally map it to the position estimation result through the fully connected network.

Benefits of technology

It greatly improves the accuracy of geomagnetic positioning, reduces the computational complexity, and can effectively process high-dimensional geomagnetic data, which is suitable for real-time applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118980371B_ABST
    Figure CN118980371B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a multi-scale geomagnetic positioning method, apparatus, device and computer-readable storage medium. The method includes obtaining geomagnetic data information; inputting the geomagnetic data information into a trained multi-scale geomagnetic positioning model to obtain location information corresponding to the geomagnetic data information; wherein the multi-scale geomagnetic positioning model can be trained in the following manner: obtaining geomagnetic sequence data; dividing the geomagnetic sequence data into multiple geomagnetic sub-sequences; processing the divided geomagnetic sub-sequences to obtain a geomagnetic feature sequence; calculating attention weights based on the geomagnetic feature sequence; fusing all geomagnetic feature sequences and their corresponding attention weights to obtain fused features; and completing the training of the multi-scale geomagnetic positioning model based on the fused features. In this way, the accuracy of positioning can be greatly improved, and the positioning problem of geomagnetic sequences of different spatial scales can be effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of geomagnetic positioning, and in particular to a multi-scale geomagnetic positioning method, apparatus, device, and computer-readable storage medium. Background Art

[0002] Dynamic Time Warping (DTW) is a method for comparing the similarity between two time series. In the matching and positioning algorithm of geomagnetic sequences with inconsistent spatial scales, the DTW algorithm can be used to calculate the similarity between the two sequences through compression or stretching comparison, and find the magnetic sequence most similar to the target sequence from the geomagnetic fingerprint database to achieve positioning.

[0003] However, when the sequence length is large, the computational complexity of the DTW algorithm is high, resulting in a long running time, which is not suitable for application scenarios with high real-time requirements. Generally, when collecting geomagnetic data, the geomagnetic vector data of the x, y, and z axes are collected at the same time, but the DTW algorithm is mainly used for matching one-dimensional time series data, and the matching effect for high-dimensional data is poor. Therefore, DTW is mainly used for synthetic vector geomagnetic sequence matching, and cannot be applied to the geomagnetic data information of the x, y, and z axes at the same time. In addition, the DTW algorithm may result in poor local matching in some cases. Even if the overall matching effect is good, the matching on some fragments is still not ideal. The above problems limit the application of the DTW algorithm in geomagnetic sequence matching and positioning systems at different spatial scales.

[0004] Therefore, how to construct a method to solve the inconsistency in the spatial scale of the collected geomagnetic sequences caused by differences in the sampling frequency and speed of the collection equipment is an urgent problem that needs to be solved. Summary of the invention

[0005] According to an embodiment of the present application, a multi-scale geomagnetic positioning solution is provided. Based on the strategy of the attention mechanism, the importance weights of features of different scales are adaptively learned, and the final geomagnetic sequence representation is generated by weighted fusion of the features. Finally, a fully connected network is used to map the above features into position estimation results, which greatly improves the accuracy of position prediction.

[0006] In a first aspect of the present application, a multi-scale geomagnetic positioning method is provided. The method comprises:

[0007] Get geomagnetic data information;

[0008] Inputting the geomagnetic data information into a trained multi-scale geomagnetic positioning model to obtain position information corresponding to the geomagnetic data information;

[0009] The multi-scale geomagnetic positioning model can be trained in the following way:

[0010] Obtain geomagnetic sequence data;

[0011] dividing the geomagnetic sequence data into a plurality of geomagnetic subsequences;

[0012] The segmented geomagnetic subsequences are input into a bidirectional long short-term memory network to obtain a geomagnetic feature sequence;

[0013] Based on the geomagnetic feature sequence, calculating the corresponding attention weight;

[0014] Fuse all geomagnetic feature sequences and their corresponding attention weights to obtain fused features;

[0015] The fused features are input into a fully connected layer to obtain a position corresponding to the geomagnetic sequence data, thereby completing the training of the multi-scale geomagnetic positioning model.

[0016] Furthermore, before dividing the geomagnetic sequence data into a plurality of geomagnetic subsequences, the method further comprises:

[0017] Performing duplicate data processing and abnormal data detection and correction on the geomagnetic sequence data to obtain first processed data;

[0018] Synchronously processing the geomagnetic data and the position information of the same track in the first processed data by linear interpolation to obtain second processed data;

[0019] The second processed data is randomly intercepted to obtain geomagnetic data for training and testing the multi-scale geomagnetic positioning model.

[0020] Furthermore, the performing of repeated data processing and abnormal data detection and correction on the geomagnetic sequence data to obtain first processed data includes:

[0021] Performing repeated data processing on the geomagnetic sequence data by means of a moving window;

[0022] By adopting the box plot method, abnormal data detection and correction are performed on the geomagnetic sequence data.

[0023] Furthermore, the segmented geomagnetic subsequences are input into a bidirectional long short-term memory network to obtain a geomagnetic feature sequence including:

[0024] The segmented geomagnetic subsequence is input into the bidirectional long short-term memory network, and the output feature vectors are concatenated in chronological order to obtain the geomagnetic feature sequence:

[0025] ;

[0026] in, It represents the features extracted by the bidirectional long short-term memory network from the lth sequence intercepted by a window of size k;

[0027] Represents the concatenation of all features extracted from all subsequences intercepted by a window of size k.

[0028] Furthermore, the calculating the corresponding attention weight based on the geomagnetic feature sequence includes:

[0029] ;

[0030] Among them, e, q, and r represent learnable parameters;

[0031] PreLU represents the activation function used to add nonlinearity.

[0032] Furthermore, it also includes:

[0033] During model training, the loss value is set as follows:

[0034] ;

[0035] in, , Represents the predicted value of the coordinate axis position;

[0036] , Represents the true value of the axis position.

[0037] Furthermore, it also includes:

[0038] The Adam optimizer is used to optimize the multi-scale geomagnetic positioning model.

[0039] In a second aspect of the present application, a multi-scale geomagnetic positioning device is provided. The device comprises:

[0040] An acquisition module, used for acquiring geomagnetic data information;

[0041] A positioning module, used for inputting the geomagnetic data information into a trained multi-scale geomagnetic positioning model to obtain position information corresponding to the geomagnetic data information;

[0042] The multi-scale geomagnetic positioning model can be trained in the following way:

[0043] Obtain geomagnetic sequence data;

[0044] dividing the geomagnetic sequence data into a plurality of geomagnetic subsequences;

[0045] The segmented geomagnetic subsequences are input into a bidirectional long short-term memory network to obtain a geomagnetic feature sequence;

[0046] Based on the geomagnetic feature sequence, calculating the corresponding attention weight;

[0047] Fuse all geomagnetic feature sequences and their corresponding attention weights to obtain fused features;

[0048] The fused features are input into a fully connected layer to obtain a position corresponding to the geomagnetic sequence data, thereby completing the training of the multi-scale geomagnetic positioning model.

[0049] In a third aspect of the present application, an electronic device is provided, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, the method described above is implemented.

[0050] In a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method according to the first aspect of the present application is implemented.

[0051] The multi-scale geomagnetic positioning method provided in the embodiment of the present application obtains geomagnetic data information; inputs the geomagnetic data information into a trained multi-scale geomagnetic positioning model to obtain position information corresponding to the geomagnetic data information; wherein the multi-scale geomagnetic positioning model can be trained in the following manner: obtains geomagnetic sequence data; divides the geomagnetic sequence data into multiple geomagnetic sub-sequences; inputs the divided geomagnetic sub-sequences into a bidirectional long short-term memory network to obtain a geomagnetic feature sequence; based on the geomagnetic feature sequence, calculates the corresponding attention weight; fuses all geomagnetic feature sequences and the corresponding attention weights to obtain a fused feature; inputs the fused feature into a fully connected layer to obtain a position corresponding to the geomagnetic sequence data, thereby completing the training of the multi-scale geomagnetic positioning model and greatly improving the accuracy of geomagnetic positioning.

[0052] It should be understood that the contents described in the Summary of the Invention are not intended to limit the key or important features of the embodiments of the present application, nor are they intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0054] Figure 1 is a flow chart of a multi-scale geomagnetic positioning method according to an embodiment of the present application;

[0055] Figure 2 A schematic diagram of simulating geomagnetic data of different spatial scales using an interpolation method according to an embodiment of the present application;

[0056] Figure 3 A multi-scale geomagnetic positioning framework diagram according to an embodiment of the present application;

[0057] Figure 4 is a block diagram of a multi-scale geomagnetic positioning device according to an embodiment of the present application;

[0058] Figure 5 It is a schematic diagram of the structure of a terminal device or a server suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0060] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0061] Figure 1 A flow chart of a multi-scale geomagnetic positioning method according to an embodiment of the present disclosure is shown. The method comprises:

[0062] S110, obtaining geomagnetic data information.

[0063] In this embodiment, the execution entity (such as a server) of the multi-scale geomagnetic positioning method can obtain geomagnetic data information through a wired or wireless connection.

[0064] Furthermore, the above-mentioned execution subject can obtain geomagnetic data information sent by electronic devices (such as mobile phones, PADs, laptop computers and other terminal devices) that are connected to the communication, or it can be geomagnetic data information pre-stored locally.

[0065] Wherein, the geomagnetic data information includes geomagnetic sequence information.

[0066] S120, inputting the geomagnetic data information into a trained multi-scale geomagnetic positioning model to obtain position information corresponding to the geomagnetic data information.

[0067] The multi-scale geomagnetic positioning model can be trained in the following way:

[0068] Obtain geomagnetic sequence data;

[0069] dividing the geomagnetic sequence data into a plurality of geomagnetic subsequences;

[0070] The segmented geomagnetic subsequences are input into a bidirectional long short-term memory network to obtain a geomagnetic feature sequence;

[0071] Based on the geomagnetic feature sequence, calculating the corresponding attention weight;

[0072] Fuse all geomagnetic feature sequences and their corresponding attention weights to obtain fused features;

[0073] The fused features are input into a fully connected layer to obtain a position corresponding to the geomagnetic sequence data, thereby completing the training of the multi-scale geomagnetic positioning model.

[0074] In some embodiments, the construction and training of the neural network depends largely on the quality of the data set. The quality of the data set can directly affect the performance of the model. In order to better train a geomagnetic sequence matching and positioning network suitable for different spatial scales, the following steps can be performed in the present disclosure to pre-process the geomagnetic sequence data to construct a data set for training and testing the network.

[0075] When collecting geomagnetic sequence data, the need to wait for instrument initialization or other operations will result in continuous duplicate data near the initial point. Similarly, duplicate values ​​may appear near the end of the collection. In addition, abnormal geomagnetic data may be encountered during the collection process, such as abnormal values ​​caused by sensor failure or environmental interference. For the tree-climbing problem, effective data processing and preprocessing steps are required to ensure the data quality and reliability of subsequent analysis and model training:

[0076] Among them, duplicate data processing includes: for duplicate data generated at the initial point and the end point, a sliding window method can be used to remove duplicates, and the duplicate data points can be identified and merged by setting an appropriate window size;

[0077] Abnormal data detection and correction include: Box Plot method can be used to identify outliers in the data set. When processing the collected geomagnetic data, outliers can be determined by calculating the IQR of multiples of the interquartile range (determined according to different geomagnetic acquisition scenarios). Specifically, outliers are defined as data points that fall outside Q1 - 1.5 * IQR and Q3 + 1.5 * IQR. Once outliers are detected using the box plot method, they are removed from the data set.

[0078] The first processed data is obtained by performing repeated data processing and abnormal data detection and correction on the geomagnetic sequence data.

[0079] In the case of limited data, data augmentation techniques can be used to simulate the differences in acquisition equipment at different sampling frequencies and speeds.

[0080] Specifically, the geomagnetic data and position information of the same trajectory can be processed synchronously by linear interpolation to simulate the data acquired under different sampling frequencies and speed conditions. Figure 2 As shown. Figure 2 It can be seen that the geomagnetic features of the sequence processed by the linear interpolation method have similar shapes but different lengths. In the case of rapid changes, the rapid change trend of the geomagnetic sequence can be shown, while in the case of slow changes, the characteristics of relatively slow changes are shown, which is consistent with the actual data collection results. That is, the geomagnetic data and position information of the same trajectory in the first processed data are synchronously processed by the linear interpolation method to obtain the second processed data.

[0081] Furthermore, the second processed data is randomly intercepted to obtain geomagnetic data for training and testing the multi-scale geomagnetic positioning model.

[0082] Specifically, the second processed data is randomly intercepted to simulate the geomagnetic data uploaded by the geomagnetic acquisition device after traveling for a period of time and requesting matching positioning. That is, a sequence segment of any length is intercepted from any position in the original data to simulate the geomagnetic data generated by the vehicle during operation and simulate its upload request for position matching. The intercepted sequence segment will be used as training and test data.

[0083] Preferably, 80% of the intercepted data can be used as training data and 20% as test data. The last position information of the corresponding sequence is added as a label to the geomagnetic data of each training sequence. The training data and test data are saved in .npy format for model training and evaluation. It is used to improve the efficiency of data loading, maintain data consistency, reduce memory usage, and the format supports multi-dimensional data. The geomagnetic data of the x, y, and z axes can be saved simultaneously, so as to better meet the needs of neural network training.

[0084] It should be noted that the geomagnetic data information obtained in step S110 can also be preprocessed in the above manner to obtain more accurate input data.

[0085] In some embodiments, Figure 3 As shown in the figure, a strategy based on the attention mechanism can be used to adaptively learn the importance weight of each scale feature; the final geomagnetic sequence feature representation is obtained by weighted fusion of the features; and the final result is estimated by mapping the features to positions through a fully connected network.

[0086] Specifically, the geomagnetic sequence data processed as above is divided into multiple geomagnetic sequences.

[0087] In the present disclosure, the geomagnetic sequence can be expressed as:

[0088] ;

[0089] in, , , Represents the geomagnetic data on the x, y, and z axes respectively;

[0090] N represents the sequence length;

[0091] Furthermore, different scales can be expressed as:

[0092] ;

[0093] The geomagnetic sequence is divided into geomagnetic subsequences of different sizes according to the preset window scale. The number of subsequences is:

[0094] ;

[0095] Among them, l represents the number of subsequences after segmentation;

[0096] K is the size of the segmentation window.

[0097] Bidirectional long short-term memory network (Bi-LSTM) can provide input to two LSTM networks in opposite directions at each time t, that is, one network propagates forward along the time sequence, while the other network propagates backward along the time reverse sequence. The output at each moment is jointly determined by two unidirectional LSTM networks, which can better capture contextual information and realize context-based judgment.

[0098] Therefore, in the application scenario of geomagnetic sequence position prediction, the bidirectional LSTM network can be applied to the construction of the model. Inputting the segmented geomagnetic subsequence into the bidirectional long short-term memory network (Bi-LSTM) can make full use of the historical and future information of the sequence data to more effectively extract the features of the geomagnetic data. Each segmented subsequence is subjected to feature extraction through the Bi-LSTM network, and the feature vectors output by multiple Bi-LSTM networks are connected in series in chronological order to form a complete geomagnetic feature sequence. That is, the segmented geomagnetic subsequence is input into the bidirectional long short-term memory network to obtain the geomagnetic feature sequence. It can be expressed as:

[0099] ;

[0100] in, It represents the features extracted from the lth sequence intercepted by a window of size k after passing through the Bi-LSTM network;

[0101] Represents the concatenation of all features extracted from all subsequences intercepted by a window of size k.

[0102] Furthermore, based on the geomagnetic feature sequence, a corresponding attention weight is calculated.

[0103] Specifically, in order to effectively fuse geomagnetic features of different scales, an adaptive attention generation module can be designed in the present disclosure. The module consists of multiple linear layers and nonlinear mapping functions, and finally uses the softmax function to normalize the generated attention weights. The normalized attention weights ensure that the geomagnetic features of all scales are between 0 and 1, and the sum is 1. For a given geomagnetic feature sequence with a scale size of k , the corresponding attention weight is calculated as:

[0104] ;

[0105] Among them, e, q, and r represent learnable parameters;

[0106] PreLU represents the activation function used to add nonlinearity.

[0107] The attention weight vector of all scales can be expressed as:

[0108] ;

[0109] Furthermore, the scale-dependent attention values ​​are normalized:

[0110] ;

[0111] The sum of all attention values ​​after normalization is 1:

[0112] ;

[0113] Furthermore, the weights obtained by the attention mechanism are fused with the features of each scale to obtain a new fused feature. The new fused feature is input into the fully connected layer, and the last dimension is mapped to the position through the fully connected network. That is, the fused feature is input into the fully connected layer to obtain the position corresponding to the geomagnetic sequence data.

[0114] Furthermore, it also includes:

[0115] During the model training process, the loss value can be set to:

[0116] ;

[0117] in, , Represents the predicted value of the coordinate axis position;

[0118] , Represents the true value of the axis position.

[0119] The goal of the training process is to minimize the loss function, and by continuously adjusting the model parameters to reduce the loss value, the model's prediction results are close to the true label. During the network training process, the model optimizer can use the Adam optimizer, which combines the characteristics of momentum optimization and adaptive learning rate. It can adaptively adjust the learning rate during the training process, thereby accelerating the convergence speed and improving the performance of the model.

[0120] In some embodiments, the geomagnetic data information obtained in step S110 is input into the multi-scale geomagnetic positioning model trained in the above manner to obtain position information corresponding to the geomagnetic data information.

[0121] According to the embodiments of the present disclosure, the following technical effects are achieved:

[0122] Neural networks are used to fully explore the potential patterns and features between geomagnetic data and positions. By constructing a position prediction model based on a multi-scale Bi-LSTM network and attention mechanism, new technical support is provided for geomagnetic navigation and positioning. Compared with the traditional dynamic time warping algorithm, the use of multiple proposed networks for position prediction can avoid complex calculation processes and improve overall efficiency.

[0123] In addition, the vector data of the x, y, and z axes are used as features for training, which increases the utilization of effective information compared to traditional one-dimensional scalar geomagnetic data. This method has shown high maturity and accuracy in the field of geomagnetic sequence position prediction. At the same time, as the size of the training data set increases, the position prediction effect of the model will also be improved.

[0124] In summary, the method disclosed in the present invention greatly improves the accuracy of positioning (navigation) and effectively solves the positioning problem of geomagnetic sequences of different spatial scales.

[0125] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0126] The above is an introduction to the method embodiment. The following is a further explanation of the scheme described in this application through an apparatus embodiment.

[0127] Figure 4 A block diagram 400 of a multi-scale geomagnetic positioning device according to an embodiment of the present application is shown. Figure 4 Shown include:

[0128] An acquisition module 410 is used to acquire geomagnetic data information;

[0129] A positioning module 420, configured to input the geomagnetic data information into a trained multi-scale geomagnetic positioning model to obtain position information corresponding to the geomagnetic data information;

[0130] The multi-scale geomagnetic positioning model can be trained in the following way:

[0131] Obtain geomagnetic sequence data;

[0132] dividing the geomagnetic sequence data into a plurality of geomagnetic subsequences;

[0133] The segmented geomagnetic subsequences are input into a bidirectional long short-term memory network to obtain a geomagnetic feature sequence;

[0134] Based on the geomagnetic feature sequence, calculating the corresponding attention weight;

[0135] Fuse all geomagnetic feature sequences and their corresponding attention weights to obtain fused features;

[0136] The fused features are input into a fully connected layer to obtain a position corresponding to the geomagnetic sequence data, thereby completing the training of the multi-scale geomagnetic positioning model.

[0137] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0138] Figure 5 A schematic diagram of the structure of a terminal device or server suitable for implementing an embodiment of the present application is shown.

[0139] like Figure 5 As shown, the terminal device or server includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 into the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the terminal device or server are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0140] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0141] In particular, according to an embodiment of the present application, the above method flow steps can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a machine-readable medium, and the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present application are executed.

[0142] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0143] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of the code, and the aforementioned module, program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0144] The units or modules involved in the embodiments described in the present application may be implemented by software or hardware. The units or modules described may also be arranged in a processor. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves.

[0145] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the method described in the present application.

[0146] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of application involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the aforementioned application concept. For example, the above features are replaced with (but not limited to) technical features with similar functions applied in the present application.

Claims

1. A multi-scale geomagnetic positioning method, characterized in that: include: Get geomagnetic data information; Inputting the geomagnetic data information into a trained multi-scale geomagnetic positioning model to obtain position information corresponding to the geomagnetic data information; The multi-scale geomagnetic positioning model can be trained in the following way: Acquire three-dimensional geomagnetic sequence data; dividing the three-dimensional geomagnetic sequence data into a plurality of geomagnetic subsequences; The segmented geomagnetic subsequences are input into a bidirectional long short-term memory network to obtain a geomagnetic feature sequence; The segmented geomagnetic subsequences are input into a bidirectional long short-term memory network to obtain a geomagnetic feature sequence, which includes: The segmented geomagnetic subsequences are input into the bidirectional long short-term memory network, and the output feature vectors are concatenated in chronological order to obtain the geomagnetic feature sequence: ; in, It represents the features extracted by the bidirectional long short-term memory network from the lth sequence intercepted by a window of size k; Represents the connection of all features extracted from all subsequences intercepted by a window of size k; Among them, the three-dimensional geomagnetic sequence is expressed as: ; in, , , Represents the geomagnetic data on the x, y, and z axes respectively; N represents the sequence length; The different scales are represented as: ; The geomagnetic sequence is divided into geomagnetic subsequences of different sizes according to the preset window scale. The number of subsequences is: ; Among them, l represents the number of subsequences after segmentation; K is the size of the segmentation window; Based on the geomagnetic feature sequence, calculating the corresponding attention weight; The step of calculating the corresponding attention weight based on the geomagnetic feature sequence includes: ; Among them, e, q, and r represent learnable parameters; PreLU represents an activation function used to increase nonlinearity; Fuse all geomagnetic feature sequences and their corresponding attention weights to obtain fused features; The fused features are input into a fully connected layer to obtain a position corresponding to the three-dimensional geomagnetic sequence data, thereby completing the training of the multi-scale geomagnetic positioning model.

2. The method according to claim 1, characterized in that Before dividing the three-dimensional geomagnetic sequence data into a plurality of geomagnetic subsequences, the method includes: Performing duplicate data processing and abnormal data detection and correction on the three-dimensional geomagnetic sequence data to obtain first processed data; Synchronously processing the geomagnetic data and the position information of the same track in the first processed data by linear interpolation to obtain second processed data; The second processed data is randomly intercepted to obtain geomagnetic data for training and testing the multi-scale geomagnetic positioning model.

3. The method according to claim 2, characterized in that The performing repeated data processing and abnormal data detection and correction on the three-dimensional geomagnetic sequence data to obtain first processed data includes: Performing repeated data processing on the three-dimensional geomagnetic sequence data by means of a moving window; By adopting the box plot method, abnormal data detection and correction are performed on the three-dimensional geomagnetic sequence data.

4. The method according to claim 3, characterized in that Also includes: During model training, the loss value is set as follows: ; in, , Represents the predicted value of the coordinate axis position; , The true value representing the axis position.

5. The method according to claim 4, characterized in that Also includes: The Adam optimizer is used to optimize the multi-scale geomagnetic positioning model.

6. A multi-scale geomagnetic positioning device, characterized in that: include: An acquisition module, used for acquiring geomagnetic data information; A positioning module, used for inputting the geomagnetic data information into a trained multi-scale geomagnetic positioning model to obtain position information corresponding to the geomagnetic data information; The multi-scale geomagnetic positioning model can be trained in the following way: Acquire three-dimensional geomagnetic sequence data; dividing the three-dimensional geomagnetic sequence data into a plurality of geomagnetic subsequences; The segmented geomagnetic subsequences are input into a bidirectional long short-term memory network to obtain a geomagnetic feature sequence; The segmented geomagnetic subsequences are input into a bidirectional long short-term memory network to obtain a geomagnetic feature sequence, which includes: The segmented geomagnetic subsequence is input into the bidirectional long short-term memory network, and the output feature vectors are concatenated in chronological order to obtain the geomagnetic feature sequence: ; in, It represents the features extracted by the bidirectional long short-term memory network from the lth sequence intercepted by a window of size k; Represents the connection of all features extracted from all subsequences intercepted by a window of size k; Among them, the three-dimensional geomagnetic sequence is expressed as: ; in, , , Represents the geomagnetic data on the x, y, and z axes respectively; N represents the sequence length; The different scales are represented as: ; The geomagnetic sequence is divided into geomagnetic subsequences of different sizes according to the preset window scale. The number of subsequences is: ; Among them, l represents the number of subsequences after segmentation; K is the size of the segmentation window; Based on the geomagnetic feature sequence, calculating the corresponding attention weight; The step of calculating the corresponding attention weight based on the geomagnetic feature sequence includes: ; Among them, e, q, and r represent learnable parameters; PreLU represents an activation function used to increase nonlinearity; Fuse all geomagnetic feature sequences and their corresponding attention weights to obtain fused features; The fused features are input into a fully connected layer to obtain a position corresponding to the three-dimensional geomagnetic sequence data, thereby completing the training of the multi-scale geomagnetic positioning model.

7. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Indoor position identification method and system based on deep learning, and electronic equipment

    CN116412815A