Point of interest analysis method and device
By compressing and encoding the travel trajectory data in the number of times and using the word2vec model for training, the problem of excessive data volume and excessive time complexity in the existing point of interest analysis methods is solved, and efficient point of interest analysis is achieved.
Patent Information
- Application Number
- CN202110439930.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-23
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2041-04-23
AI Technical Summary
The existing point-of-interest analysis methods have problems such as excessive data volume and excessive time complexity, making it difficult to effectively process a large number of user travel trajectory data.
By compressing the number of times the travel trajectory record data, compressing the repetitive part using the shrink function, then encode the compressed data, generate a numerical sequence, and input it into the pre-established word2vec neural network model for training, determine the weight matrix, and finally perform point-of-interest analysis based on the weight matrix.
Through data compression and encoding processing, the data volume is effectively reduced, the time complexity is reduced, and the problems of excessive data volume and excessive time complexity in the existing point-of-interest analysis methods are solved.
Smart Images

Figure CN113033560B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a point of interest analysis method and device. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] User behavior is related. By obtaining the correlation between the locations that users have visited over a period of time, we can get the possible locations that users will visit and have visited. This is a very popular research topic, Point of Interest (POI) analysis.
[0004] In the prior art, the number of times the event group of interest occurs in the full amount of data is usually counted. For example, if 100 out of 1,000 users have been to a hospital and a pharmacy within a period of time, then the frequency of (hospital, pharmacy) is 100. If the frequency of (hospital, dessert shop) is 20 at this time, it can be concluded that the pharmacy is more related to the hospital than the dessert shop. When considering the temporal nature of things, the entire behavior chain in time needs to be retained. However, this method has the problem of too much data and too high time complexity.
[0005] To address the above problems, no effective solution has been proposed yet. Summary of the invention
[0006] An embodiment of the present invention provides a method for analyzing points of interest, which is used to solve the problems of excessive data volume and high time complexity in existing methods for analyzing points of interest. The method includes:
[0007] Obtain travel trajectory record data;
[0008] Performing frequency compression processing on the travel trajectory record data;
[0009] Encode the travel trajectory record data after the frequency compression process to obtain a corresponding digital sequence;
[0010] Inputting the digital sequence into a pre-established word2vec neural network model for training, and determining a weight matrix of the trained word2vec neural network model;
[0011] According to the weight matrix, interest point analysis is performed.
[0012] Furthermore, the travel trajectory record data includes: location latitude and longitude information.
[0013] Furthermore, the travel trajectory record data is subjected to frequency compression processing, including:
[0014] The shrink function is used to perform frequency compression processing on the repeated parts in the travel trajectory record data.
[0015] Furthermore, the shrink function is: a logarithmic function rounded down.
[0016] Furthermore, the interest point analysis method further includes:
[0017] Performing window processing on the digital sequence according to a preset window length;
[0018] Inputting the digital sequence into a pre-established word2vec neural network model for training includes: inputting the digital sequence for window processing into a pre-established word2vec neural network model for training.
[0019] Furthermore, the word2vec neural network model includes: a CBOW model or a LSTM model.
[0020] Further, according to the weight matrix, an interest point analysis is performed, including:
[0021] Determine the vector corresponding to each location according to the weight matrix;
[0022] Determine vector angle data according to the vector;
[0023] According to the vector angle data, interest point analysis is performed.
[0024] An embodiment of the present invention provides a point of interest analysis device to solve the problems of excessive data volume and high time complexity in existing point of interest analysis methods. The device includes:
[0025] A data acquisition module, used to obtain travel trajectory record data;
[0026] A data compression module, used for performing a number compression process on the travel trajectory record data;
[0027] A data encoding module is used to encode the travel trajectory record data after the number compression process to obtain a corresponding digital sequence;
[0028] A model training module, used for inputting the digital sequence into a pre-established word2vec neural network model for training, and determining a weight matrix of the trained word2vec neural network model;
[0029] The interest point analysis module is used to perform interest point analysis according to the weight matrix.
[0030] Furthermore, the travel trajectory record data includes: location latitude and longitude information.
[0031] Furthermore, the data compression module is further used for:
[0032] The shrink function is used to perform frequency compression processing on the repeated parts in the travel trajectory record data.
[0033] Furthermore, the shrink function is: a logarithmic function rounded down.
[0034] Furthermore, the point of interest analysis device further includes:
[0035] A window processing module, used for performing window processing on the digital sequence according to a preset window length;
[0036] The model training module is further used to: input the digital sequence to be processed by windowing into a pre-established word2vec neural network model for training.
[0037] Furthermore, the word2vec neural network model includes: a CBOW model or a LSTM model.
[0038] Furthermore, the interest point analysis module is further used for:
[0039] Determine the vector corresponding to each location according to the weight matrix;
[0040] Determine vector angle data according to the vector;
[0041] According to the vector angle data, interest point analysis is performed.
[0042] A computer device is also provided in an embodiment of the present invention. The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned point of interest analysis method is implemented.
[0043] A computer-readable storage medium is also provided in an embodiment of the present invention, wherein the computer-readable storage medium stores a computer program for executing the above-mentioned point of interest analysis method.
[0044] The embodiment of the present invention obtains travel trajectory record data; performs frequency compression processing on the travel trajectory record data; encodes the travel trajectory record data after frequency compression processing to obtain a corresponding digital sequence; inputs the digital sequence into a pre-established word2vec neural network model for training, and determines the weight matrix of the trained word2vec neural network model; and performs interest point analysis based on the weight matrix. The embodiment of the present invention achieves smoothing of repeated locations by performing frequency compression processing on the travel trajectory record data, and then performs encoding and model training based on the processed data, thereby effectively reducing the amount of data and solving the problems of excessive data volume and high time complexity in existing interest point analysis methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0046] Figure 1 A flow chart of a method for analyzing points of interest provided in an embodiment of the present invention;
[0047] Figure 2-3 This is a schematic diagram of the interest point analysis process in a specific embodiment of the present invention;
[0048] Figure 4 A schematic diagram of a point of interest analysis device provided in an embodiment of the present invention;
[0049] Figure 5 A schematic diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0051] First, the techniques involved in the embodiments of the present invention are explained:
[0052] Embedding: Embedding means using a low-dimensional dense vector to "represent" an object. The object here can be a word, a product, or a movie. The vector after embedding contains certain features of the object, and the similarity (cosine) of the embedding vectors of different objects can reflect the similarity between objects.
[0053] word2vec: word2vec is short for word to vector. It is a model for generating embedding expressions for "words". It was proposed by Google in 2013. The model structure of word2vec is a two-layer neural network. The input layer is the dictionary number of the word. After a fully connected hidden layer, it is connected to a fully connected output layer. The starting point of word2vec is to use a dense vector to represent the semantics of a word. The closer the word vectors are, the higher the similarity. For example, the vector similarity of "man" and "woman" will be higher than that of "man" and "lipstick". There are two training methods for word2vec, skip-gram and CBOW. This article uses the latter. CBOW predicts the probability of the central word based on the words around the central word. In the process of training word2vec, you need to prepare a corpus consisting of a group of sentences. Suppose one of the sentences of length T is w1, w2, w3,..., w T , assume that each word is most closely related to its adjacent words, that is, each word is determined by its adjacent words (skip-gram), or each word determines its adjacent words (CBOW)
[0054] LSTM: Long Short-Term Memory (LSTM) is a time-recurrent neural network designed to solve the long-term dependency problem of general RNN (recurrent neural network). All RNNs have a chain form of repeated neural network modules. In the standard RNN, this repeated structural module has only a very simple structure, such as a tanh layer.
[0055] Apriori: Apriori algorithm is the first association rule mining algorithm and the most classic algorithm. It uses an iterative method of layer-by-layer search to find the relationship between item sets in the database to form rules. The process consists of connection (matrix-like operation) and pruning (removing unnecessary intermediate results). The concept of item set in this algorithm is a set of items. A set containing K items is a k-item set. The frequency of an item set is the number of transactions containing the item set, which is called the frequency of the item set. If an item set meets the minimum support, it is called a frequent item set.
[0056] As mentioned above, user behavior is correlated. By using the sequence of places that users have visited over a period of time, we can obtain the correlation between places and the possible places that users at a place will go to and have visited. The current idea for dealing with this problem is to count the number of times the event group of interest occurs in the full data. For example, if 100 out of 1,000 users have been to a hospital and a pharmacy over a period of time, then the frequency of (hospital, pharmacy) is 100. If the frequency of (hospital, dessert shop) is 20 at this time, we can conclude that pharmacies are more related to hospitals than dessert shops. Furthermore, when considering the temporal nature of things, it is necessary to retain the entire temporal behavior chain, but the amount of data is often too large, resulting in excessive time complexity.
[0057] The simple association algorithm calculates the association of products based on whether to purchase the products. The classic Apriori algorithm uses an iterative method of layer-by-layer search to find the relationship between item sets in the database. Its disadvantage is that it does not consider the order of locations, such as abbaacaaaacaaac is regarded as abc, but it is obvious that locations a and c have a strong order relationship. The existing model based on the Aprior algorithm that considers time series has too high time complexity and is difficult to process large amounts of data. The disadvantage of the CBOW method mentioned above in dealing with this problem is that when a user goes to the same location multiple times, such as AAAAABC, when training location B, there will be too many locations A in the input of the CBOW model, and the input diversity is low, causing the model to be too biased towards repeated locations. If duplicates are removed directly, the impact of high-frequency locations may be ignored.
[0058] In order to solve the problems of excessive data volume and high time complexity in existing interest point analysis methods, an interest point analysis method is provided in an embodiment of the present invention. Figure 1 A flowchart of a method for analyzing points of interest is provided in an embodiment of the present invention. Figure 1 As shown, the following steps are included:
[0059] Step 101: Obtain travel trajectory record data;
[0060] Step 102: compress the travel trajectory record data by times;
[0061] Step 103, encoding the travel trajectory record data after the frequency compression process to obtain a corresponding digital sequence;
[0062] Step 104: input the digital sequence into a pre-established word2vec neural network model for training, and determine a weight matrix of the trained word2vec neural network model;
[0063] Step 105: Perform interest point analysis according to the weight matrix.
[0064] Depend on Figure 1 As shown, the embodiment of the present invention obtains travel trajectory record data; performs frequency compression processing on the travel trajectory record data; encodes the travel trajectory record data after frequency compression processing to obtain a corresponding digital sequence; inputs the digital sequence into a pre-established word2vec neural network model for training, and determines the weight matrix of the trained word2vec neural network model; and performs interest point analysis based on the weight matrix. The embodiment of the present invention achieves smoothing of repeated locations by performing frequency compression processing on the travel trajectory record data, and then performs encoding and model training based on the processed data, thereby effectively reducing the amount of data and solving the problems of excessive data volume and high time complexity in existing interest point analysis methods.
[0065] In the embodiment, travel trajectory record data is obtained.
[0066] In this embodiment, the travel trajectory record data includes: location longitude and latitude information.
[0067] In specific implementation, the location is expressed in longitude and latitude to obtain the location longitude and latitude information. Since the location displayed by the user in longitude and latitude may have a certain error, the longitude and latitude are retained to three decimal places and a range of one hundred meters.
[0068] In the embodiment, the travel trajectory record data is subjected to frequency compression processing.
[0069] In this embodiment, the travel trajectory record data is compressed, including:
[0070] The shrink function is used to perform frequency compression processing on the repeated parts in the travel trajectory record data.
[0071] In this embodiment, the shrink function is: a logarithmic function rounded down.
[0072] In the specific implementation, the shrink function is used to perform frequency compression processing on the repeated parts in the travel trajectory record data, wherein the shrink function is a logarithmic function rounded down, wherein log is rounded down, that is, Using log can reduce skewness, and the travel trajectory record data will show a right-skewed distribution, and the data is collected continuously in the same place. The shrink function is used to compress the time series location to obtain more efficient results.
[0073] It should be noted that there may be multiple consecutive office buildings in the data. We want to obtain information that people who have been to an office building may go to the office building again, so we need to retain certain repeated locations. Therefore, the embodiment of the present invention adds a shrink method to compress repeated words, which smoothes the influence of location A on location B relative to location C during model training.
[0074] In the embodiment, the travel trajectory record data after the frequency compression processing is encoded to obtain a corresponding digital sequence.
[0075] In a specific implementation, the travel trajectory record data after the frequency compression processing is encoded according to the order of appearance in the full amount of data, so that each travel trajectory record data is converted into a corresponding number.
[0076] In an embodiment, the digital sequence is input into a pre-established word2vec neural network model for training, and a weight matrix of the trained word2vec neural network model is determined.
[0077] In this embodiment, the interest point analysis method further includes:
[0078] Performing window processing on the digital sequence according to a preset window length;
[0079] Inputting the digital sequence into a pre-established word2vec neural network model for training includes: inputting the digital sequence for window processing into a pre-established word2vec neural network model for training.
[0080] In specific implementation, the digital sequence is subjected to window processing according to a preset window length, the digital sequence subjected to window processing includes an input word and a target word, a pre-established word2vec neural network model is input for training, the target word is added to negative sampling, and random negative sampling is performed according to word frequency. After the word2vec neural network model training is completed, the weight matrix of the model can be obtained.
[0081] In this embodiment, the word2vec neural network model includes: a CBOW model or an LSTM model.
[0082] In specific implementation, the CBOW model is used to determine the correlation between locations, and the locations obtained are the places that users may go to before and after visiting a location. The LSTM model is used to deduce the places that users may go to in the future.
[0083] It should be noted that the CBOW model is a method of predicting the central word using the context or surrounding words. The input is the word vector (one-hot encoding of the word) corresponding to the context of a certain feature word; the output is the word vector (one-hot encoding of the word) of this specific word. For example, in a paragraph, we can set the context size to 4. The specific word is "Learning", which is the output word vector we need (one-hot encoding of the word Learning). There are 8 words corresponding to the context, 4 before and after, and these 8 words are the input of our model (one-hot encoding of 8 words). Since CBOW uses the bag of words model, these 8 words are equal, that is, regardless of the distance between them and the word we are concerned about, as long as they are within our context. In this way, in our CBOW example, our input is 8 word vectors (one-hot encoding of 8 words), and the output is the softmax probability of all words (the training goal is to maximize the softmax probability corresponding to the central word of the training sample); the corresponding CBOW neural network model has 8 neurons in the input layer and vocabulary size neurons in the output layer. We can specify the number of neurons in the hidden layer. Through the DNN back propagation algorithm, we can find the parameters of the DNN model and get the word vectors corresponding to all words. In this way, when we have a new requirement to find the most likely output center word corresponding to a certain 8 words, we can use the DNN forward propagation algorithm once and find the neuron corresponding to the word with the highest probability through the softmax activation function.
[0084] It should be noted that the LSTM (Long Short-Term Memory) algorithm is a kind of deep learning method. Before introducing the LSTM algorithm, it is necessary to introduce some basic background of deep learning. At present, the biggest hot spot in the field of machine learning is undoubtedly deep learning. From Google Brain's cat face recognition, to the victory of deep convolutional neural network in the ImageNet competition, to Alphago's victory over Lee Sedol, deep learning has been increasingly popular among the media, scholars and related researchers. The reason behind this is nothing more than that the effect of deep learning methods has indeed surpassed traditional machine learning methods by a lot. Since Geoffrey E. Hinton's team won the ImageNet competition (one of the largest and most influential competitions in image recognition) in 2012 using deep learning methods, research on deep learning has been booming; before 2012, the accuracy of the results of the competition had been in a state of slow improvement, and this year there was a sudden qualitative leap, and since then deep learning methods have become the only choice in the ImageNet competition. At the same time, the impact of deep learning is not limited to image recognition competitions, but has also profoundly affected academia and industry. There is an increasing number of studies on deep learning in top academic conferences, such as CVPR, ICML, etc. The industrial level has also made great contributions to deep learning, contributing more and more computing support or frameworks, such as Nivdia's cuda, cuDnn, Google's tensorflow, Facebook's torch, and Microsoft's DMTK, etc.
[0085] The development of deep learning technology is the result of the efforts of many researchers. Currently, the most famous researchers in this field are Yoshua Bengio, Geoffrey E. Hinton, Yann LeCun and Andrew Ng. Yoshua Bengio and others recently published the book "Deep Learning", which systematically discusses the historical development of deep learning and the main technologies in this field. The book's summary of the historical development trend of deep learning is very insightful. The book summarizes several key points of the historical development trend of deep learning:
[0086] The LSTM algorithm is short for Long short-term memory. It was first proposed by Sepp Hochreiter and Jürgen Schmidhuber in 1997. It is a specific form of RNN (Recurrent neural network), which is a general term for a series of neural networks that can process sequence data. Here we should pay attention to the difference between recurrent neural networks and recursive neural networks. Generally, RNN has the following three characteristics: a) recurrent neural networks can generate an output at each time node, and the connection between hidden units is cyclic; b) recurrent neural networks can generate an output at each time node, and the output at this time node is only cyclically connected to the hidden unit of the next time node; c) recurrent neural networks contain hidden units with cyclic connections, and can process sequence data and output a single prediction. RNN also has many variations, such as bidirectional RNN. However, RNN encounters great difficulties in dealing with long-term dependencies (nodes that are far away in time series), because calculating the connection between distant nodes involves multiple multiplications of the Jacobian matrix, which will lead to the problem of gradient disappearance (often occurs) or gradient expansion (rarely occurs). This phenomenon has been observed and independently studied by many scholars. In order to solve this problem, researchers have proposed many solutions, such as ESN (Echo State Network), adding leaky units, etc. Among them, the most successful and widely used is the gated RNN, and LSTM is the most famous one of the gated RNNs. The leaky unit allows the RNN to accumulate long-term connections between distant nodes by designing the weight coefficients between the connections; while the gated RNN generalizes this idea, allowing the coefficient to be changed at different times, and allowing the network to forget the currently accumulated information.
[0087] In the embodiment, interest point analysis is performed according to the weight matrix.
[0088] In this embodiment, the interest point analysis is performed according to the weight matrix, including:
[0089] Determine the vector corresponding to each location according to the weight matrix;
[0090] Determine vector angle data according to the vector;
[0091] According to the vector angle data, interest point analysis is performed.
[0092] In specific implementation, according to the characteristics of the CBOW model, the vector corresponding to each location is determined according to the weight matrix. For example, if the target word is 50, the vector corresponding to the 50th dimension of the weight matrix is taken. Furthermore, the vector angle data between the vectors of different locations can determine the associated locations of a location, thereby realizing the analysis of points of interest. For the LSTM model, a user is first converted into a corresponding digital sequence, and the location is converted into a vector by initializing the weight matrix. Each node of the input function takes the output of the previous node and the input of this node as input.
[0093] It should be noted that if the CBOW model and LSTM model are used directly, repeated locations will lead to poor training results. For example, a user only goes to the workplace on weekdays and goes to the hospital and pharmacy on weekends. However, after the model is trained with the sequence {company, company, company, company, company, hospital, pharmacy}, the model will think that the correlation between the company and the hospital is much greater than that between the pharmacy and the hospital. Therefore, we need to use the shrink function to smooth the impact of repeated locations. For locations that appear more than once, the number of times the location is changed can be reduced during preprocessing with the compression function.
[0094] A specific example is given below to illustrate the specific application of the method for analyzing points of interest in the embodiment of the present invention. In this specific example, we are based on the travel trajectory record data of citizens in a city, about 1.3 million people for one month, and a total of 48,000 locations. The location is represented by longitude and latitude. Since the location displayed by the user in longitude and latitude will have a certain error, we retain the three decimal points of longitude and latitude here, which is a range of 100 meters. First, the number of locations is compressed, and the shrink function is used to round down to log n, such as Figure 2 After that, the compressed data is encoded and converted into numbers, and the result is [40267, 23104, 22248, 23104, 22248, 23104, 22248]. Each location corresponds to a different and unique number. The window is taken according to the window size, and the target word is added with negative sampling as the input and target of the CBOW model, as shown in Figure 3 As shown. After the model has trained the data, a weight matrix is obtained. Each location can be converted into a vector through the weight matrix. At this time, we can determine the associated locations of a location by the size of the vector angle. For the LSTM model, first convert the location of a user into an id into a vector V through the initialization weight matrix, and input the function. Each node takes the output of the previous node and the input of this node as input. Through the trained LSTM model, it is possible to input a sequence and output an id. Therefore, the results can be displayed through map software.
[0095] Based on the same inventive concept, an interest point analysis device is also provided in the embodiment of the present invention, as described in the following embodiment. Since the principle of solving the problem by the device is similar to that of the interest point analysis method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0096] Figure 4 A schematic diagram of a point of interest analysis device is provided in an embodiment of the present invention. Figure 5 As shown, the interest point analysis device provided in the embodiment of the present invention may include:
[0097] The data acquisition module 401 is used to obtain travel trajectory record data;
[0098] A data compression module 402 is used to perform a number compression process on the travel trajectory record data;
[0099] The data encoding module 403 is used to encode the travel trajectory record data after the frequency compression process to obtain a corresponding digital sequence;
[0100] A model training module 404 is used to input the digital sequence into a pre-established word2vec neural network model for training, and determine a weight matrix of the trained word2vec neural network model;
[0101] The interest point analysis module 405 is used to perform interest point analysis according to the weight matrix.
[0102] In one embodiment, the travel trajectory record data includes: location longitude and latitude information.
[0103] In one embodiment, the data compression module 402 is further configured to:
[0104] The shrink function is used to perform frequency compression processing on the repeated parts in the travel trajectory record data.
[0105] In one embodiment, the shrink function is: a logarithmic function rounded down.
[0106] In one embodiment, the point of interest analysis device further includes:
[0107] A window processing module, used for performing window processing on the digital sequence according to a preset window length;
[0108] The model training module 404 is further used to input the digital sequence to be windowed into a pre-established word2vec neural network model for training.
[0109] In one embodiment, the word2vec neural network model includes: a CBOW model or an LSTM model.
[0110] In one embodiment, the interest point analysis module 405 is further used to:
[0111] Determine the vector corresponding to each location according to the weight matrix;
[0112] Determine vector angle data according to the vector;
[0113] According to the vector angle data, interest point analysis is performed.
[0114] In summary, the embodiment of the present invention obtains travel trajectory record data; performs frequency compression processing on the travel trajectory record data; encodes the travel trajectory record data after frequency compression processing to obtain a corresponding digital sequence; inputs the digital sequence into a pre-established word2vec neural network model for training, and determines the weight matrix of the trained word2vec neural network model; and performs interest point analysis based on the weight matrix. The embodiment of the present invention achieves smoothing of repeated locations by performing frequency compression processing on the travel trajectory record data, and then performs encoding and model training based on the processed data, thereby effectively reducing the amount of data and solving the problems of excessive data volume and high time complexity in existing interest point analysis methods.
[0115] Based on the same inventive concept, an embodiment of the present invention further provides an electronic device embodiment for implementing all or part of the above-mentioned interest point analysis method. The electronic device specifically includes the following contents:
[0116] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between related devices; the electronic device can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the electronic device can be implemented with reference to the embodiment for realizing the above-mentioned method for analyzing points of interest and the embodiment for realizing the above-mentioned device for analyzing points of interest, and the contents thereof are incorporated herein, and the repeated parts are not repeated.
[0117] Figure 5 FIG. 1 is a schematic diagram of a system structure of an electronic device provided in an embodiment of the present invention. Figure 5 As shown, the electronic device 50 may include a processor 501 and a memory 502; the memory 502 is coupled to the processor 501. It is worth noting that the Figure 5 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0118] In one embodiment, the functions implemented by the method for analyzing points of interest may be integrated into the processor 501. The processor 501 may be configured to perform the following control: obtaining travel trajectory record data; performing frequency compression processing on the travel trajectory record data; encoding the travel trajectory record data after frequency compression processing to obtain a corresponding digital sequence; inputting the digital sequence into a pre-established word2vec neural network model for training, and determining a weight matrix of the trained word2vec neural network model; and performing point of interest analysis according to the weight matrix.
[0119] As can be seen from the above, the electronic device provided in the embodiment of the present invention obtains travel trajectory record data; performs frequency compression processing on the travel trajectory record data; encodes the travel trajectory record data after the frequency compression processing to obtain a corresponding digital sequence; inputs the digital sequence into a pre-established word2vec neural network model for training, and determines the weight matrix of the trained word2vec neural network model; and performs interest point analysis based on the weight matrix.
[0120] The electronic device provided in the embodiment of the present invention can solve the problems of excessive data volume and high time complexity in the existing point of interest analysis method.
[0121] In another embodiment, the interest point analysis device may be configured separately from the processor 501. For example, the interest point analysis device may be configured as a chip connected to the processor 501, and the functions of the interest point analysis method may be implemented under the control of the processor.
[0122] like Figure 5 As shown, the electronic device 50 may also include: a communication module 506, an input unit 504, an audio processing unit 505, a display 506, and a power supply 503. It is worth noting that the electronic device 50 does not necessarily have to include Figure 5 In addition, the electronic device 50 may also include Figure 5 For components not shown, reference may be made to the prior art.
[0123] like Figure 5 As shown, the processor 501 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The processor 501 receives inputs and controls the operations of various components of the electronic device 50 .
[0124] The memory 502 may be, for example, a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices, or one or more thereof. The memory may store the above-mentioned information related to the failure, and may also store a program for executing the related information. The processor 501 may execute the program stored in the memory 502 to implement information storage or processing, etc.
[0125] The input unit 504 provides input to the processor 501. The input unit 504 is, for example, a key or a touch input device. The power supply 503 is used to provide power to the electronic device 50. The display 506 is used to display display objects such as images and text. The display may be, for example, an LCD display, but is not limited thereto.
[0126] The memory 502 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 502 may also be some other type of device. The memory 502 includes a buffer memory 5021 (sometimes referred to as a buffer). The memory 502 may include an application / function storage unit 5022, which is used to store application programs and function programs or processes for executing the operation of the electronic device 50 through the processor 501.
[0127] The memory 502 may also include a data storage unit 5023 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 5024 of the memory 502 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0128] The communication module 503 is a transmitter / receiver that sends and receives signals via the antenna 508. The communication module (transmitter / receiver) 503 is coupled to the processor 501 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0129] Based on different communication technologies, multiple communication modules 503 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module (transmitter / receiver) 503 is also coupled to a speaker 509 and a microphone 510 via an audio processing unit 505 to provide an audio output via the speaker 509 and receive an audio input from the microphone 510, thereby realizing a common telecommunication function. The audio processing unit 505 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processing unit 505 is also coupled to the processor 501, so that recording can be performed on the local machine through the microphone 510, and the sound stored on the local machine can be played through the speaker 509.
[0130] In an embodiment of the present invention, there is also provided a computer-readable storage medium for implementing all the steps of the interest point analysis method in the above embodiment. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, all the steps of the interest point analysis method in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented: obtaining travel trajectory record data; performing frequency compression processing on the travel trajectory record data; encoding the travel trajectory record data after the frequency compression processing to obtain a corresponding digital sequence; inputting the digital sequence into a pre-established word2vec neural network model for training, and determining the weight matrix of the trained word2vec neural network model; and performing interest point analysis according to the weight matrix.
[0131] As can be seen from the above, the computer-readable storage medium provided in the embodiments of the present invention obtains travel trajectory record data; performs frequency compression processing on the travel trajectory record data; encodes the travel trajectory record data after the frequency compression processing to obtain a corresponding digital sequence; inputs the digital sequence into a pre-established word2vec neural network model for training, and determines the weight matrix of the trained word2vec neural network model; and performs interest point analysis based on the weight matrix.
[0132] The computer-readable storage medium provided in the embodiments of the present invention can solve the problems of excessive data volume and high time complexity in existing interest point analysis methods.
[0133] Although the present invention provides method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, in a parallel processor or multi-threaded processing environment).
[0134] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, devices (systems) or computer program products. Therefore, the embodiments of this specification may take the form of complete hardware embodiments, complete software embodiments or embodiments combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0135] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can 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 generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0136] These computer program instructions may also 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 comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0137] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0138] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a process, method, article or device. The orientation or position relationship indicated by the terms "upper", "lower", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. Unless otherwise expressly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between the two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other in the absence of conflict. The present invention is not limited to any single aspect, nor to any single embodiment, nor to any combination and / or permutation of these aspects and / or embodiments. Each aspect and / or embodiment of the present invention may be used alone or in combination with one or more other aspects and / or other embodiments.
[0139] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
Claims
1. A method for analyzing points of interest, characterized in that: include: Obtain travel trajectory record data; Performing frequency compression processing on the travel trajectory record data; Encode the travel trajectory record data after the frequency compression process to obtain a corresponding digital sequence; Inputting the digital sequence into a pre-established word2vec neural network model for training, and determining a weight matrix of the trained word2vec neural network model; Performing interest point analysis according to the weight matrix; The word2vec neural network model is a CBOW model. The CBOW model is used to determine the correlation between locations and obtain the possible locations that a user may visit before and after visiting a location. According to the weight matrix, an interest point analysis is performed, including: According to the characteristics of the CBOW model, the vector corresponding to each location is determined according to the weight matrix; Determine vector angle data according to the vector; Through the vector angle data between vectors of different locations, the associated locations of a location are determined to perform point of interest analysis; The travel trajectory record data is subjected to frequency compression processing, including: A shrink function is used to perform frequency compression processing on repeated parts in the travel trajectory record data; the shrink function is: a logarithmic function rounded down; The shrink function is used to perform frequency compression processing on the repeated parts in the travel trajectory record data, wherein the shrink function is a logarithmic function rounded down; log is used to reduce the skewness, and the shrink function is used to compress the time series location.
2. The method for analyzing points of interest as claimed in claim 1, characterized in that: Travel trajectory record data includes: location latitude and longitude information.
3. The method for analyzing points of interest as claimed in claim 1, characterized in that: The shrink function is: a logarithmic function rounded down.
4. The method for analyzing points of interest as claimed in claim 1, characterized in that: Also includes: Performing window processing on the digital sequence according to a preset window length; Inputting the digital sequence into a pre-established word2vec neural network model for training includes: inputting the digital sequence for window processing into a pre-established word2vec neural network model for training.
5. The method for analyzing points of interest as claimed in claim 1, characterized in that: The word2vec neural network model also includes: an LSTM model.
6. A point of interest analysis device, characterized in that: include: A data acquisition module, used to obtain travel trajectory record data; A data compression module, used for performing a number compression process on the travel trajectory record data; A data encoding module is used to encode the travel trajectory record data after the number compression process to obtain a corresponding digital sequence; A model training module, used for inputting the digital sequence into a pre-established word2vec neural network model for training, and determining a weight matrix of the trained word2vec neural network model; An interest point analysis module, used for performing interest point analysis according to the weight matrix; The word2vec neural network model is a CBOW model. The CBOW model is used to determine the correlation between locations and obtain the possible locations that a user may visit before and after visiting a location. The interest point analysis module is further used for: According to the characteristics of the CBOW model, the vector corresponding to each location is determined according to the weight matrix; Determine vector angle data according to the vector; Through the vector angle data between vectors of different locations, the associated locations of a location are determined to perform point of interest analysis; The data compression module is further used for: A shrink function is used to perform frequency compression processing on repeated parts in the travel trajectory record data; the shrink function is: a logarithmic function rounded down; The shrink function is used to perform frequency compression processing on the repeated parts in the travel trajectory record data, wherein the shrink function is a logarithmic function rounded down; log is used to reduce the skewness, and the shrink function is used to compress the time series location.
7. The point of interest analysis device according to claim 6, characterized in that: Travel trajectory record data includes: location latitude and longitude information.
8. The point of interest analysis device according to claim 6, characterized in that: The shrink function is: a logarithmic function rounded down.
9. The point of interest analysis device according to claim 6, characterized in that: Also includes: A window processing module, used for performing window processing on the digital sequence according to a preset window length; The model training module is further used to: input the digital sequence to be processed by windowing into a pre-established word2vec neural network model for training.
10. The point of interest analysis device according to claim 6, characterized in that: The word2vec neural network model also includes: an LSTM model.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for analyzing points of interest according to any one of claims 1 to 5 is implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the interest point analysis method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Interest point recommendation method and system based on graph embedding and user long-term and short-term interest fusion
CN112380426A