Method and device for processing geographic location information

By obtaining the longitude and latitude of geographical location information, determining its distance feature matrix and hidden vector, and combining pre-trained neural network model to generate embedded vectors, the problems of large memory and maintenance difficulties in the existing technology are solved, and more efficient memory usage and wider application scenarios are achieved.

CN118410116BActive Publication Date: 2025-04-08DITU (BEIJING) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310280362.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-21
Publication Date
2025-04-08
Estimated Expiration
2043-03-21

AI Technical Summary

Technical Problem

The existing technology has high memory overhead when processing geographical location information, and is difficult to maintain, and cannot support the application of large-scale geographical information systems and services.

Method used

By obtaining the longitude and latitude of the target position information, determining its corresponding distance feature matrix and hidden vector, the pre-trained neural network model combines the hidden vector, the distance feature matrix and attribute information to generate an embedded vector.

Benefits of technology

It reduces the memory overhead of geolocation information processing, simplifies the maintenance process, and improves the application scenarios of geographic information encoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118410116B_ABST
    Figure CN118410116B_ABST
Patent Text Reader

Abstract

Disclosed is a method and device for processing geographic location information. By acquiring target location information, the location information includes longitude, latitude and attribute information, determining a distance feature matrix corresponding to the target location information according to the longitude and latitude, determining a latent vector corresponding to the target location information according to the longitude and latitude through a pre-acquired change matrix, and acquiring an embedding vector corresponding to the target location information according to the latent vector, the distance feature matrix and the attribute information through a pre-trained neural network model. In this way, the memory for processing geographic location information can be reduced, maintenance is facilitated, and the application scenarios of geographic information coding are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of geographic information technology, and in particular to a method and device for processing geographic location information. Background Art

[0002] Geographic information coding technology is an important part of the geographic information system, which is to express and record classified information in a symbol system that is easy for computers and humans to recognize according to the determined geographic information classification. The existing technology generally uses the bag-of-words method in natural language processing to assign a randomly initialized latent vector to each unique geographic location point, or uses the Mercator projection method to project adjacent geographic location points into a discrete sequence, and then embed each sequence number into the latent vector.

[0003] However, existing technologies have high memory overhead, are difficult to maintain, and cannot support the application of geographic information systems and services on large-scale data. Summary of the invention

[0004] In view of this, an object of an embodiment of the present invention is to provide a method and device for processing geographic location information, which can reduce the memory used for geographic location information processing, facilitate maintenance, and improve the application scenarios of geographic information coding.

[0005] In a first aspect, an embodiment of the present invention provides a method for processing geographic location information, the method comprising:

[0006] Acquire target location information, the location information including longitude, latitude and attribute information;

[0007] Determine a distance feature matrix corresponding to the target location information according to the longitude and latitude;

[0008] Determine the latent vector corresponding to the target location information according to the longitude and latitude through the pre-acquired change matrix; and

[0009] The embedded vector corresponding to the target position information is obtained according to the latent vector, the distance feature matrix and the attribute information through a pre-trained neural network model.

[0010] In some embodiments, determining the distance feature matrix corresponding to the target location information according to the longitude and latitude includes:

[0011] Determine the geographic location code corresponding to the target location information according to the longitude and latitude; and

[0012] A distance feature matrix corresponding to the target location information is obtained according to the geographic location code.

[0013] In some embodiments, determining the geographic location code corresponding to the target location information according to the longitude and latitude includes:

[0014] converting the longitude and latitude into a first coordinate according to a predetermined accuracy;

[0015] Respectively obtain a first vector corresponding to the abscissa and a second vector corresponding to the ordinate of the first coordinate;

[0016] Obtaining a third vector according to the first vector and the second vector; and

[0017] A convolution operation is performed on the third vector to obtain the geographic location code.

[0018] In some embodiments, the first coordinate is calculated by the following formula:

[0019]

[0020] Among them, x 1 is the horizontal coordinate of the first coordinate, y 1 is the ordinate of the first coordinate, lng is the longitude, lat is the latitude, L is the predetermined accuracy, and L is a positive integer.

[0021] In some embodiments, respectively acquiring a first vector corresponding to the horizontal coordinate and a second vector corresponding to the vertical coordinate of the first coordinate comprises:

[0022] converting the abscissa of the first coordinate into a binary number having a length of the predetermined precision to obtain the first vector; and

[0023] The ordinate of the first coordinate is converted into a binary number having a length of the predetermined precision to obtain the second vector.

[0024] In some embodiments, the third vector is a quaternary number, and the third vector is calculated by the following formula:

[0025] q i =2×m i +n i

[0026] Among them, q i is the i-th element of the third vector, m i is the i-th element of the first vector, n i is the i-th element of the second vector, i=1, 2,…, L.

[0027] In some embodiments, the geographic location code is obtained by calculating the following formula:

[0028]

[0029] Among them, z i The i-th element of the geographic location code, q i+j is the i+jth element of the third vector, and k is the length of the convolution kernel.

[0030] In some embodiments, the latent vector is calculated by the following formula:

[0031]

[0032] Among them, p is the hidden vector, k is the length of the convolution kernel, is the zth i Row vector, z i The i-th element encoding the geographic location.

[0033] In some embodiments, obtaining the distance feature matrix corresponding to the target location information according to the geographic location code includes:

[0034] Acquire a second coordinate according to the last digit of the geographic location code; and

[0035] The distance feature vector is acquired according to a predetermined truncation parameter and the second coordinate.

[0036] In some embodiments, the second coordinate is calculated by the following formula:

[0037]

[0038] Among them, u is the horizontal coordinate of the second coordinate, v is the vertical coordinate of the second coordinate, z L-k+1 is the last bit of the geographic location code, k is the length of the convolution kernel, and L is the predetermined accuracy.

[0039] In some embodiments, the distance feature vector is calculated by the following formula:

[0040]

[0041] Among them, E ij is the element in the i-th row and j-th column of the distance feature vector, i=1, 2, ..., 2 k , j = 1, 2, ..., 2 k , u is the horizontal coordinate of the second coordinate, v is the vertical coordinate of the second coordinate, ∈ is the truncation parameter, and σ is a pre-set hyperparameter.

[0042] In some embodiments, obtaining the embedding vector corresponding to the target position information according to the latent vector, the distance feature matrix and the attribute information through the pre-trained neural network model includes:

[0043] Converting the distance feature matrix into a fourth vector;

[0044] concatenating the fourth vector and the latent vector to obtain a fifth vector; and

[0045] The embedded vector is outputted according to the attribute information and the fifth vector by the pre-trained neural network model.

[0046] In some embodiments, converting the distance feature matrix into a fourth vector is specifically:

[0047] The distance feature matrix is ​​expanded to obtain the fourth vector.

[0048] In some embodiments, the pre-acquired change matrix and the pre-trained neural network model are acquired by the following steps:

[0049] Acquire a sample set, the sample set comprising a plurality of training samples, the training samples comprising longitude, latitude, attribute information and labels;

[0050] Determine a distance feature matrix corresponding to the training sample according to the longitude and latitude;

[0051] Determine the latent vector corresponding to the training sample according to the longitude and latitude through an initial change matrix;

[0052] Obtaining a prediction result according to the latent vector, the distance feature matrix and the attribute information through an initial neural network model; and

[0053] The initial change matrix and the initial neural network model are updated according to the prediction result and the sample label to obtain the pre-acquired change matrix and the pre-trained neural network model.

[0054] In some embodiments, the method further comprises:

[0055] The location service information corresponding to the target location information is generated according to the embedded vector.

[0056] In a second aspect, an embodiment of the present invention provides a device for processing geographic location information, the device comprising:

[0057] A location information acquisition unit, used to acquire target location information, wherein the location information includes longitude, latitude and attribute information;

[0058] A distance feature matrix acquisition unit, used to determine the distance feature matrix corresponding to the target location information according to the longitude and latitude;

[0059] a latent vector acquisition unit, configured to determine a latent vector corresponding to the target position information according to the longitude and latitude using a pre-acquired change matrix; and

[0060] An embedding vector acquisition unit is used to acquire the embedding vector corresponding to the target position information according to the latent vector, the distance feature matrix and the attribute information through a pre-trained neural network model.

[0061] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method described in the first aspect.

[0062] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer program instructions, wherein the computer program instructions implement the method described in the first aspect when executed by a processor.

[0063] The technical solution of the embodiment of the present invention obtains the target location information, which includes longitude, latitude and attribute information, determines the distance feature matrix corresponding to the target location information according to the longitude and latitude, determines the latent vector corresponding to the target location information according to the longitude and latitude through the pre-acquired change matrix, and obtains the embedding vector corresponding to the target location information according to the latent vector, the distance feature matrix and the attribute information through the pre-trained neural network model. In this way, the memory of geographic location information processing can be reduced, maintenance is easy, and the application scenarios of geographic information coding are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0065] Figure 1 is a flow chart of obtaining predetermined parameters according to an embodiment of the present invention;

[0066] Figure 2 is a flow chart of determining a distance feature matrix of a training sample according to an embodiment of the present invention;

[0067] Figure 3 is a flow chart of determining geographic location codes corresponding to training samples according to an embodiment of the present invention;

[0068] Figure 4 is a schematic diagram of a grid according to an embodiment of the present invention;

[0069] Figure 5 is a flow chart of obtaining a distance feature matrix of a training sample according to an embodiment of the present invention;

[0070] Figure 6is a schematic diagram of a distance feature vector according to an embodiment of the present invention;

[0071] Figure 7 is a flow chart of obtaining prediction results of training samples according to an embodiment of the present invention;

[0072] Figure 8 is a flow chart of a method for processing geographic location information according to an embodiment of the present invention;

[0073] Fig. 9 is a schematic diagram of a device for processing geographic location information according to an embodiment of the present invention;

[0074] Fig.10 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0075] The present invention is described below based on embodiments, but the present invention is not limited to these embodiments. In the detailed description of the present invention below, some specific details are described in detail. It is possible for a person skilled in the art to fully understand the present invention without the description of these details. In order to avoid confusing the essence of the present invention, known methods, processes, flows, components and circuits are not described in detail.

[0076] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.

[0077] Unless the context clearly requires otherwise, words such as “include”, “including” and the like in the specification should be interpreted as including rather than being exclusive or exhaustive; that is, as meaning “including but not limited to”.

[0078] In the description of the present invention, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, "plurality" means two or more.

[0079] Figure 1 is a flowchart of obtaining predetermined parameters according to an embodiment of the present invention. Figure 1 In the illustrated embodiment, obtaining the predetermined parameters is obtaining a pre-acquired change matrix and a pre-trained neural network model, which specifically includes the following steps:

[0080] Step S110: Obtain a sample set.

[0081] In this embodiment, the sample set includes a plurality of training samples, and the training samples include longitude, latitude, attribute information and labels.

[0082] The geographic location information that needs to be encoded is collected from the database, including longitude, latitude, attribute information and labels. Among them, longitude and latitude are a spherical coordinate system that uses a three-dimensional sphere to define the space on the earth. It can mark any location on the earth and can be expressed as (lng, lat) where longitude is lng and latitude is lat. Attribute information is the information contained in the geographic location point, such as the distance from the road, whether it is a landmark building, the vehicle stop line, etc. The label is a description of the geographic location point, such as a supermarket, a square, a road, a residence, etc.

[0083] Furthermore, attribute information and labels can be converted into corresponding vectors for representation. The conversion can be achieved through various existing methods of converting text into vectors, such as One-hot encoding, bag-of-words model, TF-IDF (term frequency–inverse document frequency), Word2Vec (a related model for generating word vectors), BERT (Bidirectional Encoder Representations from Transformers), etc. One-hot encoding represents each word as a vector, the dimension of which is the size of the vocabulary. Each word corresponds to an element in the vector, the value of which is 1, and the values ​​of the remaining elements are 0. The bag-of-words model represents each word in the text as a vector, the dimension of which is the size of the vocabulary, each word corresponds to an element in the vector, the value of which is the number of times the word appears in the text. This method can represent the frequency of word occurrence. TF-IDF represents each word in the text as a vector whose dimension is the size of the vocabulary. Each word corresponds to an element in the vector, and the value of the element is the number of times the word appears in the text multiplied by the inverse document frequency of the word. This method can represent the importance of the word. Word2Vec represents each word as a vector with a lower dimension, which can represent the relationship between words. BERT represents text as a vector with a lower dimension, which can represent the semantic information of the text and can be used for various natural language processing tasks.

[0084] It should be noted that the following descriptions of attribute information and labels all refer to the corresponding vector representations.

[0085] Step S120: Determine a distance feature matrix corresponding to the training sample according to the longitude and latitude.

[0086] In this embodiment, the latitude and longitude projection method based on convolution (convolution with kernel size k) is used to project the latitude and longitude to different precisions 2 k ×2 k At the same time, in order to avoid information loss caused by projection, the present invention proposes a distance modeling method based on nonlinear kernel smoothing to obtain a distance feature matrix to achieve high-precision expression of geographic location.

[0087] The process of determining the distance feature matrix corresponding to the training sample is as follows: Figure 2 As shown, the following steps are included:

[0088] Step S121: Determine the geographic location code corresponding to the training sample according to the longitude and latitude.

[0089] In this embodiment, the latitude and longitude projection method based on convolution is used to project the longitude and latitude to different precisions. k ×2 k The geographic location code is obtained in the grid to achieve multi-scale expression of the geographic location.

[0090] Further, Figure 3 is a flow chart of determining the geographic location code corresponding to the training sample according to an embodiment of the present invention. Figure 3 In the illustrated embodiment, determining the geographic location code corresponding to the training sample according to the longitude and latitude includes the following steps:

[0091] Step S1211: Convert the longitude and latitude into a first coordinate according to a predetermined accuracy.

[0092] Among them, the first coordinate (x 1 ,y 1 ) is calculated by the following formula:

[0093]

[0094] Among them, x 1 is the horizontal coordinate of the first coordinate, y 1 is the ordinate of the first coordinate, lng is the longitude, lat is the latitude, L is the predetermined accuracy, and L is a positive integer.

[0095] Furthermore, in order to improve the calculation efficiency, in the embodiment of the present invention, if the x in the calculated first coordinate is 1 or 1 If it is not an integer, the calculated result is rounded to get the integer x 1 or 1Among them, rounding can be achieved by various existing methods, such as rounding up, rounding down, rounding off, etc. This embodiment of the method takes rounding down as an example for explanation.

[0096] For example, assuming that the latitude and longitude of the training sample are [-46.69404, -23.60561], that is, the precision lng = -46.69404, the latitude lat = -23.60561. And the predetermined precision L = 3, then the above formula can be used to calculate x 1 =2,y 1 =4, that is, the first coordinate is (2, 4).

[0097] Step S1212, respectively obtain a first vector corresponding to the horizontal coordinate and a second vector corresponding to the vertical coordinate of the first coordinate.

[0098] In this embodiment, the elements in the first vector and the second vector are binary numbers. 1 is converted into a binary number of length L of the predetermined precision to obtain the first vector [m 1 , m 2 , ..., m L ], the ordinate y of the first coordinate 1 Converted into a binary number of length L of the predetermined precision to obtain the second vector [n 1 , n 2 ,……,n L ].

[0099] For example, assuming that the first coordinate is (2, 4) as mentioned above, and the predetermined accuracy L=3, the first vector is [0, 1, 0], and the second vector is [1, 0, 0].

[0100] Step S1213: Obtain a third vector according to the first vector and the second vector.

[0101] The third vector [q 1 ,q 2 , ..., q L ] is a quaternary number, the third direction is DA2306130

[0102] The amount is calculated using the following formula:

[0103] q i =2×m i +n i

[0104] Among them, q i is the i-th element of the third vector, m i is the i-th element of the first vector, n iis the i-th element of the second vector, i=1, 2,…, L.

[0105] For example, assuming the first vector is [0, 1, 0] and the second vector is [1, 0, 0], then the third vector is [1, 2, 0].

[0106] Furthermore, the embodiment of the present invention uses a quaternary number with a length of L to represent the location information, and the longitude and latitude are represented in 2 L *2 L The larger L is, the higher the accuracy is. i , whose value is one of 0, 1, 2, and 3. Therefore, for q i , q i-1 The grid is divided into four grids of 2*2, and the numbers of these four grids are marked as 0, 1, 2, and 3 respectively. Put them on the same grid as q i When i=1, the original grid is divided into four.

[0107] Specifically, Figure 4 Schematic diagram of a grid according to an embodiment of the present invention. Figure 4 In the embodiment shown, it is assumed that the third vector is [1, 2, 0], that is, q1=1, q2=2, q3=0. 1 , divide the original grid into 2*2 and put it in the grid numbered 1, that is, Figure 4 F1 in. For q 2 , q 1 The grid (i.e. F1) is divided into 2*2 and placed in the grid numbered 2, i.e. Figure 4 F2 in. For q 3 , q 2 The grid (i.e. F2) is divided into 2*2 and placed in the grid numbered 0, i.e. Figure 4 F3 in .

[0108] Step S1214: perform a convolution operation on the third vector to obtain the geographic location code.

[0109] In this embodiment, given a convolution kernel with a window size of k and a predetermined moving step length, a convolution operation is performed on the third vector to obtain the geographic location code.

[0110] In the quaternary number [q 1 ,q 2 , ..., q L ] performs convolution operation, and then obtains the geographic location code [z 1 , z 2 , ..., z L-k+1 ].

[0111] The geographic location code is obtained by calculation using the following formula:

[0112]

[0113] Among them, z i The i-th element of the geographic location code, q i+j is the i+jth element of the third vector, k is the length of the convolution kernel, where i=1, 2,…, L-k+1.

[0114] Assume that the third vector is [1, 2, 0], the size of the convolution kernel is k = 2, and the moving step is 1. Then the third vector is divided into (1, 2) and (2, 0) and calculated twice to obtain z 1 and z 2 .

[0115] Among them, when calculating (1, 2), according to q i Reverse the order to get q 1 =2,q 2 =1, so z 1 =4 0 *q 1 +4 1 *q 2 =1*2+4*1=6.

[0116] When calculating (2, 0), according to q i Reverse the order to get q 1 =0,q 2 =2, so z 1 =4 0 *q 1 +4 1 *q 2 =1*0+4*2=8.

[0117] Therefore, by calculating through the above formula, the third vector is [1, 2, 0] and the corresponding geographic location code is [6, 8].

[0118] Step S122: Obtain a distance feature matrix corresponding to the training sample according to the geographic location code.

[0119] In this embodiment, in order to avoid information loss caused by projection, the present invention proposes a distance modeling method based on nonlinear kernel smoothing to obtain a distance feature matrix to achieve high-precision expression of geographic location.

[0120] in, Figure 5 FIG. 1 is a flow chart of obtaining a distance feature matrix of a training sample according to an embodiment of the present invention. Figure 5In the illustrated embodiment, obtaining the distance feature matrix corresponding to the training sample according to the geographic location code includes the following steps:

[0121] Step S1221, obtaining a second coordinate according to the last digit of the geographic location code.

[0122] In this embodiment, the geographic location is encoded as [z 1 , z 2 , ..., z L-k+1 ], where k is the length of the convolution kernel and L is the predetermined precision. That is, the geographic location code has a total of L-k+1 bits, of which the last bit z L-k+1 is [0, 4 k -1] range.

[0123] The second coordinate (u, v) is calculated by the following formula:

[0124]

[0125] Among them, u is the horizontal coordinate of the second coordinate, v is the vertical coordinate of the second coordinate, z L-k+1 is the last bit of the geographic location code, k is the length of the convolution kernel, and L is the predetermined accuracy.

[0126] Among them, z L-k+1 mod 2 k Indicates z L-k+1 Divide by 2 k The remainder of .

[0127] Step S1222: Acquire the distance feature vector according to a predetermined truncation parameter and the second coordinate.

[0128] Among them, the truncation parameter ∈ is a preset value,

[0129] The distance feature vector is calculated by the following formula:

[0130]

[0131] Among them, E ij is the element in the i-th row and j-th column of the distance feature vector, i=1, 2, ..., 2 k , j = 1, 2, ..., 2 k , u is the horizontal coordinate of the second coordinate, v is the vertical coordinate of the second coordinate, ∈ is the truncation parameter, and σ is a pre-set hyperparameter.

[0132] Among them, Figure 4 The geographic location code shown is used as an example to illustrate. Figure 6 Schematic diagram of the corresponding distance feature vector.

[0133] Step S130: Determine the latent vector corresponding to the training sample according to the longitude and latitude through an initial change matrix.

[0134] In this embodiment, the random initialization 2 k ×d initial change matrix M, the calculation formula of the d-length learnable latent vector corresponding to the longitude and latitude [lng, lat] is as follows:

[0135]

[0136] Among them, p is the hidden vector, k is the length of the convolution kernel, is the zth i Row vector, z i The i-th element encoding the geographic location.

[0137] Assuming that the geographic location is encoded as [6, 8], k = 2, then the latent vector p is the sum of the 6th and 8th rows of the initial change matrix M divided by 2.

[0138] Step S140, obtaining a prediction result according to the latent vector, the distance feature matrix and the attribute information through the initial neural network model.

[0139] In this embodiment, an initial neural network model is obtained, latent vectors, distance feature matrices and attribute information are input into the initial neural network model, and the neural network model outputs corresponding prediction results.

[0140] Specifically, the process of obtaining the prediction results of the training samples is as follows: Figure 7 As shown, the following steps are included:

[0141] Step S141, converting the distance feature matrix into a fourth vector.

[0142] In this embodiment, the distance feature matrix is ​​expanded to obtain the fourth vector.

[0143] Step S142: Concatenate the fourth vector and the latent vector to obtain a fifth vector.

[0144] The calculation formula of the fifth vector is as follows:

[0145] h = concat(p, flatten(E))

[0146] Among them, h is the fifth vector, concat represents concatenation calculation, p is the latent vector, and flatten(E) is the fourth vector obtained by expanding the distance feature matrix E.

[0147] Step S143: output the embedding vector according to the attribute information and the fifth vector through the initial neural network model.

[0148] The calculation formula of the embedding vector is as follows:

[0149] o=sigmoid(A*h+B*g+b)

[0150] Among them, o is the embedding vector, A, B, b are the parameters of the initial neural network model, h is the fifth vector, and g is the attribute information.

[0151] Step S150: updating the initial change matrix and the initial neural network model according to the prediction result and the sample label to obtain the pre-acquired change matrix and the pre-trained neural network model.

[0152] In this embodiment, the minimum objective function min||y-Co|| 2 , optimization parameters θ = (M, A, B, C, b).

[0153] Thus, by executing the above steps for all training samples and continuously iteratively updating the parameter θ, the pre-acquired change matrix M and the pre-trained neural network model containing the parameters A, B, C, and b can be obtained. Then, the embedding vector is obtained according to the pre-acquired change matrix and the pre-trained neural network model.

[0154] It should be noted that the embodiments of the present invention do not limit the implementation method of the neural network model, which can be implemented through various existing methods, such as RNN (Recurrent Neural Network) or CNN (Convolutional Neural Networks).

[0155] Figure 8 is a flow chart of a method for processing geographic location information according to an embodiment of the present invention. Figure 8 In the illustrated embodiment, the method for processing geographic location information includes the following steps:

[0156] Step S210: Acquire target location information, where the location information includes longitude, latitude and attribute information.

[0157] In this embodiment, the target location information is the data to be processed, including longitude, latitude and attribute information. Among them, longitude and latitude are a spherical coordinate system that uses a three-dimensional sphere to define the space on the earth, which can mark any position on the earth and can be expressed as (lng, lat) where longitude is lng and latitude is lat. Attribute information is information contained in the geographical location point, such as the distance from the road, whether it is a landmark building, and the vehicle stop row.

[0158] It should be noted that the following descriptions of attribute information and labels all refer to the corresponding vector representations.

[0159] Step S220: Determine a distance feature matrix corresponding to the target location information according to the longitude and latitude.

[0160] In this embodiment, the latitude and longitude projection method based on convolution (convolution with kernel size k) is used to project the latitude and longitude to different precisions 2 k ×2 k At the same time, in order to avoid information loss caused by projection, the present invention proposes a distance modeling method based on nonlinear kernel smoothing to obtain a distance feature matrix to achieve high-precision expression of geographic location.

[0161] The process of determining the distance feature matrix corresponding to the training sample includes the following steps:

[0162] Step S221: Determine the geographic location code corresponding to the target location information according to the longitude and latitude.

[0163] In this embodiment, the latitude and longitude projection method based on convolution is used to project the longitude and latitude to different precisions. k ×2 k The geographic location code is obtained in the grid to achieve multi-scale expression of the geographic location.

[0164] Wherein, determining the geographic location code corresponding to the target location information according to the longitude and latitude includes the following steps:

[0165] Step S2211: Convert the longitude and latitude into a first coordinate according to a predetermined accuracy.

[0166] Among them, the first coordinate (x 1 ,y 1 ) is calculated by the following formula:

[0167]

[0168] Among them, x1 is the horizontal coordinate of the first coordinate, y 1 is the ordinate of the first coordinate, lng is the longitude, lat is the latitude, L is the predetermined accuracy, and L is a positive integer.

[0169] Furthermore, in order to improve the calculation efficiency, in the embodiment of the present invention, if the x in the calculated first coordinate is 1 or 1 If it is not an integer, the calculated result is rounded to get the integer x 1 or 1 Among them, rounding can be achieved by various existing methods, such as rounding up, rounding down, rounding off, etc. This embodiment of the method takes rounding down as an example for explanation.

[0170] For example, assuming that the longitude and latitude of the target location information are [-46.69404, -23.60561], that is, the precision lng = -46.69404, the latitude lat = -23.60561. And the predetermined precision L = 3, then the above formula can be used to calculate x 1 =2,y 1 =4, that is, the first coordinate is (2, 4).

[0171] Step S1212, respectively obtain a first vector corresponding to the horizontal coordinate and a second vector corresponding to the vertical coordinate of the first coordinate.

[0172] In this embodiment, the elements in the first vector and the second vector are binary numbers. 1 is converted into a binary number of length L of the predetermined precision to obtain the first vector [m 1 , m 2 , ..., m L ], the ordinate y of the first coordinate 1 Converted into a binary number of length L of the predetermined precision to obtain the second vector [n 1 , n 2 ,……,n L ].

[0173] For example, assuming that the first coordinate is (2, 4) as mentioned above, and the predetermined accuracy L=3, the first vector is [0, 1, 0], and the second vector is [1, 0, 0].

[0174] Step S1213: Obtain a third vector according to the first vector and the second vector.

[0175] The third vector [q 1 ,q 2 , ..., q L] are quaternary numbers, and the third vector is obtained by calculating the following formula:

[0176] q i =2×m i +n i

[0177] Among them, q i is the i-th element of the third vector, m i is the i-th element of the first vector, n i is the i-th element of the second vector, i=1, 2,…, L.

[0178] For example, assuming the first vector is [0, 1, 0] and the second vector is [1, 0, 0], then the third vector is [1, 2, 0].

[0179] Furthermore, the embodiment of the present invention uses a quaternary number with a length of L to represent the location information, and the longitude and latitude are represented in 2 L *2 L The larger L is, the higher the accuracy is. i , whose value is one of 0, 1, 2, and 3. Therefore, for q i , q i-1 The grid is divided into four grids of 2*2, and the numbers of these four grids are marked as 0, 1, 2, and 3 respectively. Put them on the same grid as q i When i=1, the original grid is divided into four.

[0180] Specifically, assuming that the third vector is [1, 2, 0], the corresponding grid representation can be as follows: Figure 4 shown.

[0181] Step S2214: perform a convolution operation on the third vector to obtain the geographic location code.

[0182] In this embodiment, given a convolution kernel with a window size of k and a predetermined moving step length, a convolution operation is performed on the third vector to obtain the geographic location code.

[0183] In the quaternary number [q 1 ,q 2 , ..., q L ] performs convolution operation, and then obtains the geographic location code [z 1 , z 2 , ..., z L-k+1 ].

[0184] The geographic location code is obtained by calculation using the following formula:

[0185]

[0186] Among them, z i The i-th element of the geographic location code, q i+j is the i+jth element of the third vector, k is the length of the convolution kernel, where i=1, 2,…, L-k+1.

[0187] Assume that the third vector is [1, 2, 0], the size of the convolution kernel is k = 2, and the moving step is 1. Then the third vector is divided into (1, 2) and (2, 0) and calculated twice to obtain z 1 and z 2 .

[0188] Among them, when calculating (1, 2), according to q i Reverse the order to get q 1 =2,q 2 =1, so z 1 =4 0 *q 1 +4 1 *q 2 =1*2+4*1=6.

[0189] When calculating (2, 0), according to q i Reverse the order to get q 1 =0,q 2 =2, so z 1 =4 0 *q 1 +4 1 *q 2 =1*0+4*2=8.

[0190] Therefore, by calculating through the above formula, the third vector is [1, 2, 0] and the corresponding geographic location code is [6, 8].

[0191] Step S222: Obtain a distance feature matrix corresponding to the target location information according to the geographic location code.

[0192] In this embodiment, in order to avoid information loss caused by projection, the present invention proposes a distance modeling method based on nonlinear kernel smoothing to obtain a distance feature matrix to achieve high-precision expression of geographic location.

[0193] Wherein, obtaining the distance feature matrix corresponding to the target location information according to the geographic location code comprises the following steps:

[0194] Step S2221, obtaining a second coordinate according to the last digit of the geographic location code.

[0195] In this embodiment, the geographic location is encoded as [z1 , z 2 , ..., z L-k+1 ], where k is the length of the convolution kernel and L is the predetermined precision. That is, the geographic location code has a total of L-k+1 bits, of which the last bit z L-k+1 is [0, 4 k -1] range.

[0196] The second coordinate (u, v) is calculated by the following formula: DA2306130

[0197]

[0198] Among them, u is the horizontal coordinate of the second coordinate, v is the vertical coordinate of the second coordinate, z L-k+1 is the last bit of the geographic location code, k is the length of the convolution kernel, and L is the predetermined accuracy.

[0199] Among them, z L-k+1 mod 2 k Indicates z L-k+1 Divide by 2 k The remainder of .

[0200] Step S2222: Acquire the distance feature vector according to a predetermined truncation parameter and the second coordinate.

[0201] Among them, the truncation parameter ∈ is a preset value,

[0202] The distance feature vector is calculated by the following formula:

[0203]

[0204] Among them, E ij is the element in the i-th row and j-th column of the distance feature vector, i=1, 2, ..., 2 k , j = 1, 2, ..., 2 k , u is the horizontal coordinate of the second coordinate, v is the vertical coordinate of the second coordinate, ∈ is the truncation parameter, and σ is a pre-set hyperparameter.

[0205] Among them, Figure 4 The geographic location code shown is used as an example to illustrate. Figure 6 Schematic diagram of the corresponding distance feature vector.

[0206] Step S230: Determine a latent vector corresponding to the target position information according to the longitude and latitude using a pre-acquired change matrix.

[0207] In this embodiment, the random initialization 2 k×d initial change matrix M, the calculation formula of the d-length learnable latent vector corresponding to the longitude and latitude [lng, lat] is as follows:

[0208]

[0209] Among them, p is the hidden vector, k is the length of the convolution kernel, is the zth i Row vector, z i The i-th element encoding the geographic location.

[0210] Assuming that the geographic location is encoded as [6, 8], k = 2, then the latent vector p is the sum of the 6th and 8th rows of the initial change matrix M divided by 2.

[0211] Step S240: Obtain an embedding vector corresponding to the target position information according to the latent vector, the distance feature matrix and the attribute information through a pre-trained neural network model.

[0212] In this embodiment, a pre-trained neural network model is obtained, latent vectors, distance feature matrices and attribute information are input into the pre-trained neural network model, and the pre-trained neural network model outputs a corresponding embedding vector.

[0213] Specifically, obtaining the embedding vector corresponding to the target position information according to the latent vector, the distance feature matrix and the attribute information through the pre-trained neural network model includes the following steps:

[0214] Step S241, converting the distance feature matrix into a fourth vector.

[0215] In this embodiment, the distance feature matrix is ​​expanded to obtain the fourth vector.

[0216] Step S242: Concatenate the fourth vector and the latent vector to obtain a fifth vector.

[0217] The calculation formula of the fifth vector is as follows:

[0218] h = concat(p, flatten(E))

[0219] Among them, h is the fifth vector, concat represents concatenation calculation, p is the latent vector, and flatten(E) is the fourth vector obtained by expanding the distance feature matrix E.

[0220] Step S243: output the embedding vector according to the attribute information and the fifth vector through the pre-trained neural network model.

[0221] The calculation formula of the embedding vector is as follows:

[0222] o=sigmoid(A*h+B*g+b)

[0223] Among them, o is the embedding vector, A, B, b are the parameters of the initial neural network model, h is the fifth vector, and g is the attribute information.

[0224] The existing technology generally uses the word band method in natural language processing, and each unique geographic location point will be assigned a randomly initialized latent vector; or, using the Mercator projection method, adjacent geographic location points will be projected into a discrete sequence, and then each sequence number will be embedded into the latent vector.

[0225] The existing technology has high memory overhead and is difficult to maintain, and cannot support the application of geographic information systems and services on large-scale data. Specifically, tens of billions of geographic location points (i.e., longitude and latitude) cannot be learned and stored under the machine learning framework of limited resources. In the vast majority of geographic information systems and services, location points have long-tail distribution characteristics, among which low-frequency location points are difficult to learn. At the same time, the discretized Mercator projection method loses the expressive power of position coding, which is an inevitable problem when projecting continuous space to discrete space. The present invention proposes a low-cost, highly generalized, multi-scale geographic information coding technology for Euclidean compact space. In order to solve the problem of high storage overhead of existing methods, the present invention proposes a longitude and latitude projection method based on convolution (convolution with kernel size k), which projects the longitude and latitude to different accuracies 2 k ×2 k In the grid, the multi-scale expression of geographic location is realized; in order to avoid information loss caused by projection, the present invention proposes a distance modeling method based on nonlinear kernel smoothing to achieve high-precision expression of geographic location; in order to integrate rich geographic information, the present invention then proposes a deep neural network pre-training algorithm based on heterogeneous graphs. Therefore, through the multi-scale geographic information coding technology for Euclidean compact space, the needs of large-scale geographic information systems and services for low-cost, high-generalization, multi-scale geographic information representation (i.e., computable latent vectors) are met. It can represent the information of tens of billions of geographic location points (i.e., longitude and latitude, landmark information, road condition information, etc.) with a memory capacity of hundreds of megabytes.

[0226] The embodiment of the present invention obtains target location information, which includes longitude, latitude and attribute information, determines the distance feature matrix corresponding to the target location information according to the longitude and latitude, determines the latent vector corresponding to the target location information according to the longitude and latitude through the pre-acquired change matrix, and obtains the embedding vector corresponding to the target location information according to the latent vector, the distance feature matrix and the attribute information through the pre-trained neural network model. In this way, the memory of geographic location information processing can be reduced, maintenance is easy, and the application scenarios of geographic information coding are improved.

[0227] Thus, an embedding vector containing attribute information, longitude, and latitude can be obtained, and the next step can be carried out according to the embedding vector.

[0228] In some embodiments, the method for processing geographic location information in the embodiment of the present invention further includes the following steps:

[0229] Step S250: Generate location service information corresponding to the target location information according to the embedded vector.

[0230] In this embodiment, the location service information includes recommendations of points of interest, predictions of travel departure points and destinations, etc.

[0231] It should be noted that the embodiment of the present invention does not limit the application scenario and specific implementation method of the embedded vector, and it can be applied to various existing scenarios based on geographic location. At the same time, in different scenarios, the specific implementation method of using the embedded vector can be implemented based on various existing methods.

[0232] The embodiment of the present invention obtains target location information, which includes longitude, latitude and attribute information, determines the distance feature matrix corresponding to the target location information according to the longitude and latitude, determines the latent vector corresponding to the target location information according to the longitude and latitude through the pre-acquired change matrix, and obtains the embedding vector corresponding to the target location information according to the latent vector, the distance feature matrix and the attribute information through the pre-trained neural network model. In this way, the memory of geographic location information processing can be reduced, maintenance is easy, and the application scenarios of geographic information coding are improved.

[0233] Fig. 9 Schematic diagram of a device for processing geographic location information according to an embodiment of the present invention. Fig. 9In the illustrated embodiment, the processing device for geographic location information includes a location information acquisition unit 91, a distance feature matrix acquisition unit 92, a latent vector acquisition unit 93, and an embedding vector acquisition unit 94. The location information acquisition unit 91 is used to acquire target location information, and the location information includes longitude, latitude, and attribute information. The distance feature matrix acquisition unit 92 is used to determine the distance feature matrix corresponding to the target location information according to the longitude and latitude. The latent vector acquisition unit 93 is used to determine the latent vector corresponding to the target location information according to the longitude and latitude through a pre-acquired change matrix. The embedding vector acquisition unit 94 is used to acquire the embedding vector corresponding to the target location information according to the latent vector, the distance feature matrix, and the attribute information through a pre-trained neural network model.

[0234] In some embodiments, the distance feature matrix acquisition unit includes:

[0235] a geographic location code determining subunit, configured to determine the geographic location code corresponding to the target location information according to the longitude and latitude; and

[0236] The distance feature matrix determination subunit is used to obtain the distance feature matrix corresponding to the target location information according to the geographic location code.

[0237] In some embodiments, the geographic location code determination subunit includes:

[0238] A first coordinate acquisition module, used for converting the longitude and latitude into a first coordinate according to a predetermined accuracy;

[0239] A vector conversion module, used to respectively obtain a first vector corresponding to the horizontal coordinate and a second vector corresponding to the vertical coordinate of the first coordinate;

[0240] A third vector acquisition module, configured to acquire a third vector according to the first vector and the second vector; and

[0241] A code acquisition module is used to perform a convolution operation on the third vector to obtain the geographic location code.

[0242] In some embodiments, the first coordinate is calculated by the following formula:

[0243]

[0244] Among them, x 1 is the horizontal coordinate of the first coordinate, y 1 is the ordinate of the first coordinate, lng is the longitude, lat is the latitude, L is the predetermined accuracy, and L is a positive integer.

[0245] In some embodiments, the vector conversion module includes:

[0246] A first conversion submodule, configured to convert the abscissa of the first coordinate into a binary number having a length equal to the predetermined precision to obtain the first vector; and

[0247] The second conversion submodule is configured to convert the ordinate of the first coordinate into a binary number with a length equal to the predetermined precision to obtain the second vector.

[0248] In some embodiments, the third vector is a quaternary number, and the third vector is calculated by the following formula:

[0249] q i =2×m i +n i

[0250] Among them, q i is the i-th element of the third vector, m i is the i-th element of the first vector, n i is the i-th element of the second vector, i=1, 2,…, L.

[0251] In some embodiments, the geographic location code is obtained by calculating the following formula:

[0252]

[0253] Among them, z i The i-th element of the geographic location code, q i+j is the i+jth element of the third vector, and k is the length of the convolution kernel.

[0254] In some embodiments, the latent vector is calculated by the following formula:

[0255]

[0256] Among them, p is the hidden vector, k is the length of the convolution kernel, is the zth i Row vector, z i The i-th element encoding the geographic location.

[0257] In some embodiments, the distance feature matrix determination subunit includes:

[0258] A second coordinate acquisition module, configured to acquire a second coordinate according to the last digit of the geographic location code; and

[0259] A distance feature vector acquisition module is used to acquire the distance feature vector according to a predetermined truncation parameter and the second coordinate.

[0260] In some embodiments, the second coordinate is calculated by the following formula:

[0261]

[0262] Among them, u is the horizontal coordinate of the second coordinate, v is the vertical coordinate of the second coordinate, z L-k+1 is the last bit of the geographic location code, k is the length of the convolution kernel, and L is the predetermined accuracy.

[0263] In some embodiments, the distance feature vector is calculated by the following formula:

[0264]

[0265] Among them, E ij is the element in the i-th row and j-th column of the distance feature vector, i=1, 2, ..., 2 k , j = 1, 2, ..., 2 k , u is the horizontal coordinate of the second coordinate, v is the vertical coordinate of the second coordinate, ∈ is the truncation parameter, and σ is a pre-set hyperparameter.

[0266] In some embodiments, the embedding vector acquisition unit includes:

[0267] A fourth vector acquisition subunit, used for converting the distance feature matrix into a fourth vector;

[0268] a fifth vector acquisition subunit, configured to concatenate the fourth vector and the latent vector to acquire a fifth vector; and

[0269] An embedding vector acquisition subunit is used to output the embedding vector according to the attribute information and the fifth vector through the pre-trained neural network model.

[0270] In some embodiments, the fourth vector acquisition subunit is specifically used for:

[0271] The distance feature matrix is ​​expanded to obtain the fourth vector.

[0272] In some embodiments, the apparatus further comprises a training unit;

[0273] Wherein, the training unit comprises:

[0274] A first training subunit is used to obtain a sample set, where the sample set includes a plurality of training samples, and the training samples include longitude, latitude, attribute information and labels;

[0275] A second training subunit is used to determine a distance feature matrix corresponding to the training sample according to the longitude and latitude;

[0276] A third training subunit is used to determine the latent vector corresponding to the training sample according to the longitude and latitude through an initial change matrix;

[0277] a fourth training subunit, configured to obtain a prediction result according to the latent vector, the distance feature matrix and the attribute information through an initial neural network model; and

[0278] The fifth training subunit is used to update the initial change matrix and the initial neural network model according to the prediction result and the sample label to obtain the pre-acquired change matrix and the pre-trained neural network model.

[0279] In some embodiments, the apparatus further comprises:

[0280] A service information acquisition unit is used to generate location service information corresponding to the target location information according to the embedded vector.

[0281] The embodiment of the present invention obtains target location information, which includes longitude, latitude and attribute information, determines the distance feature matrix corresponding to the target location information according to the longitude and latitude, determines the latent vector corresponding to the target location information according to the longitude and latitude through the pre-acquired change matrix, and obtains the embedding vector corresponding to the target location information according to the latent vector, the distance feature matrix and the attribute information through the pre-trained neural network model. In this way, the memory of geographic location information processing can be reduced, maintenance is easy, and the application scenarios of geographic information coding are improved.

[0282] Fig.10 is a schematic diagram of an electronic device according to an embodiment of the present invention. Fig.10 The electronic device shown is a general data processing device, which includes a general computer hardware structure, which at least includes a processor 101 and a memory 102. The processor 101 and the memory 102 are connected via a bus 103. The memory 102 is suitable for storing instructions or programs executable by the processor 101. The processor 101 can be an independent microprocessor or a collection of one or more microprocessors. Thus, the processor 101 executes the instructions stored in the memory 102, thereby executing the method flow of the embodiment of the present invention as described above to realize the processing of data and the control of other devices. The bus 103 connects the above-mentioned multiple components together, and at the same time connects the above-mentioned components to the display controller 104 and the display device and the input / output (I / O) device 105. The input / output (I / O) device 105 can be a mouse, a keyboard, a modem, a network interface, a touch input device, a somatosensory input device, a printer, and other devices known in the art. Typically, the input / output device 105 is connected to the system through an input / output (I / O) controller 106.

[0283] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, devices (equipment) or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0284] The present invention is described with reference to flowcharts of methods, apparatuses (devices) and computer program products according to embodiments of the present application. It should be understood that each process in the flowchart can be implemented by computer program instructions.

[0285] These computer program instructions may be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device that implements the process Figure 1 A function specified in a process or multiple processes.

[0286] These computer program instructions may also be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce the instructions for implementing the process Figure 1 A device that specifies functions in a process or multiple processes.

[0287] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for processing geographic location information, characterized in that: The method comprises: Acquire target location information, the location information including longitude, latitude and attribute information; Determine a distance feature matrix corresponding to the target location information according to the longitude and latitude, wherein the value of the element in the i-th row and j-th column of the distance feature matrix is ​​0, or the value of the element in the i-th row and j-th column of the distance feature matrix is ​​determined according to the second coordinate and the values ​​of i and j, and the second coordinate is obtained according to the last bit of the geographic location code; Determine the latent vector corresponding to the target location information according to the longitude and latitude through the pre-acquired change matrix; and Obtaining an embedding vector corresponding to the target position information according to the latent vector, the distance feature matrix and the attribute information through a pre-trained neural network model; Wherein, the distance feature matrix corresponding to the target location information is determined according to the longitude and latitude, including: A convolution-based latitude and longitude projection method is used to determine the geographic location code corresponding to the target location information according to the longitude and latitude; and Acquire a distance feature matrix corresponding to the target location information according to the geographic location code; The pre-acquired change matrix and pre-trained neural network model are obtained by the following steps: Acquire a sample set, the sample set comprising a plurality of training samples, the training samples comprising longitude, latitude, attribute information and labels; Determine a distance feature matrix corresponding to the training sample according to the longitude and latitude; Determine the latent vector corresponding to the training sample according to the longitude and latitude through an initial change matrix; Obtaining a prediction result according to the latent vector, the distance feature matrix and the attribute information through an initial neural network model; and Update the initial change matrix and the initial neural network model according to the prediction result and the label to obtain the pre-acquired change matrix and the pre-trained neural network model; The latent vector is calculated by the following formula: Among them, p is the hidden vector, k is the length of the convolution kernel, is the zth i Row vector, z i The i-th element encoding the geographic location.

2. The method according to claim 1, characterized in that Determining the geographic location code corresponding to the target location information according to the longitude and latitude includes: converting the longitude and latitude into a first coordinate according to a predetermined accuracy; Respectively obtain a first vector corresponding to the abscissa and a second vector corresponding to the ordinate of the first coordinate; Obtain a third vector according to the first vector and the second vector; and A convolution operation is performed on the third vector to obtain the geographic location code.

3. The method according to claim 2, characterized in that The first coordinate is calculated by the following formula: Among them, x1 is the horizontal coordinate of the first coordinate, y1 is the vertical coordinate of the first coordinate, lng is the longitude, lat is the latitude, L is the predetermined accuracy, and L is a positive integer.

4. The method according to claim 2, characterized in that: The step of respectively acquiring the first vector corresponding to the horizontal coordinate and the second vector corresponding to the vertical coordinate of the first coordinate comprises: converting the abscissa of the first coordinate into a binary number having a length of the predetermined precision to obtain the first vector; and The ordinate of the first coordinate is converted into a binary number having a length of the predetermined precision to obtain the second vector.

5. The method according to claim 2, characterized in that: The third vector is a quaternary number, and the third vector is calculated by the following formula: q i =2×m i +n i Among them, q i is the i-th element of the third vector, m i is the i-th element of the first vector, n i is the i-th element of the second vector, i=1, 2,…, L.

6. The method according to claim 2, characterized in that The geographic location code is obtained by calculation using the following formula: Among them, z i The i-th element of the geographic location code, q i+j is the i+jth element of the third vector, and k is the length of the convolution kernel.

7. The method according to claim 1, characterized in that The step of obtaining the distance feature matrix corresponding to the target location information according to the geographic location code comprises: Acquire a second coordinate according to the last digit of the geographic location code; and The distance feature matrix is ​​acquired according to a predetermined truncation parameter and the second coordinate.

8. The method according to claim 7, characterized in that The second coordinate is calculated by the following formula: Among them, u is the horizontal coordinate of the second coordinate, v is the vertical coordinate of the second coordinate, z L-k+1 is the last bit of the geographic location code, k is the length of the convolution kernel, and L is the predetermined accuracy.

9. The method according to claim 7, characterized in that: The distance feature matrix is ​​calculated by the following formula: Among them, E ij is the element in the i-th row and j-th column of the distance feature matrix, i=1, 2, ..., 2 k , j = 1, 2, ..., 2 k , u is the horizontal coordinate of the second coordinate, v is the vertical coordinate of the second coordinate, ∈ is the truncation parameter, and σ is a pre-set hyperparameter.

10. The method according to claim 1, characterized in that The method of obtaining the embedding vector corresponding to the target position information according to the latent vector, the distance feature matrix and the attribute information through the pre-trained neural network model includes: Converting the distance feature matrix into a fourth vector; concatenating the fourth vector and the latent vector to obtain a fifth vector; and The embedded vector is outputted according to the attribute information and the fifth vector by the pre-trained neural network model.

11. The method according to claim 10, characterized in that The step of converting the distance feature matrix into a fourth vector is specifically as follows: The distance feature matrix is ​​expanded to obtain the fourth vector.

12. The method according to claim 1, characterized in that The method further comprises: The location service information corresponding to the target location information is generated according to the embedded vector.

13. A device for processing geographic location information, characterized in that: The device comprises: A location information acquisition unit, used to acquire target location information, wherein the location information includes longitude, latitude and attribute information; a distance feature matrix acquisition unit, configured to determine a distance feature matrix corresponding to the target location information according to the longitude and latitude, wherein the value of the element in the i-th row and j-th column of the distance feature matrix is ​​0, or the value of the element in the i-th row and j-th column of the distance feature matrix is ​​determined according to the second coordinate and the values ​​of i and j, and the second coordinate is acquired according to the last bit of the geographic location code; a latent vector acquisition unit, configured to determine a latent vector corresponding to the target position information according to the longitude and latitude using a pre-acquired change matrix; and An embedding vector acquisition unit, used to acquire the embedding vector corresponding to the target position information according to the latent vector, the distance feature matrix and the attribute information through a pre-trained neural network model; Wherein, the distance feature matrix acquisition unit includes: a geographic location code determination subunit, configured to determine the geographic location code corresponding to the target location information according to the longitude and latitude based on a convolution-based latitude and longitude projection method; and A distance feature matrix determination subunit, configured to obtain a distance feature matrix corresponding to the target location information according to the geographic location code; The pre-acquired change matrix and pre-trained neural network model are obtained by the following steps: Acquire a sample set, the sample set comprising a plurality of training samples, the training samples comprising longitude, latitude, attribute information and labels; Determine a distance feature matrix corresponding to the training sample according to the longitude and latitude; Determine the latent vector corresponding to the training sample according to the longitude and latitude through an initial change matrix; Obtaining a prediction result according to the latent vector, the distance feature matrix and the attribute information through an initial neural network model; and Update the initial change matrix and the initial neural network model according to the prediction result and the label to obtain the pre-acquired change matrix and the pre-trained neural network model; The latent vector is calculated by the following formula: Among them, p is the hidden vector, k is the length of the convolution kernel, is the zth i Row vector, z i The i-th element encoding the geographic location.

14. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1 to 12.

15. A computer-readable storage medium storing computer program instructions, characterized in that: The computer program instructions implement the method according to any one of claims 1 to 12 when executed by a processor.

Citation Information

Patent Citations

  • Hyperspherical collaborative metric recommendation device and method based on pre-trained semantic model

    CN111651558A

  • Method for extracting spatial relationship of geographic position points and method and device for training extraction model

    CN111737383A