Next destination recommendation method, system and medium based on co-occurrence pattern mining
By constructing heterogeneous graph neural networks and using co-occurrence mode mining technology, the problems of time-sensitive recommendation and insufficient model learning ability in the existing technology are solved, and more accurate and dynamic next destination recommendations are achieved.
Patent Information
- Application Number
- CN202411630517.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-15
AI Technical Summary
The existing next destination recommendation method cannot effectively capture time-sensitive recommendation information, resulting in unsatisfactory recommendation results and limited model learning ability, which makes it easy to have underfitting problems.
Using a method based on co-occurrence mode mining, the destination information and time information in the user's trajectory data are extracted through the convolutional neural network, a heterogeneous graph neural network is constructed, and the user's travel preferences are mined, and the nodes are captured through the graph-level attention mechanism. The importance of between.
It realizes the mining of rich feature information and connection relationships in human travel trajectory, captures time-varying urban hotspots, provides potential destinations for cold-start users, improves recommendation accuracy, and avoids the problem of underfitting.
Smart Images

Figure CN119149832B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of destination recommendation, and in particular to a next destination recommendation method, system and medium based on co-occurrence pattern mining. Background Art
[0002] Next destination recommendation is a powerful tool for people's daily travel. Its main destination recommendation goal is to provide users with a list of locations that are most likely to be visited, which can improve the quality of life of citizens and promote the development of urban economy, and is conducive to the development of various location-based services and ride-hailing services.
[0003] Existing recommendation methods are mainly divided into two categories, one is location-based recommendation, and the other is recommendation based on heterogeneous graph neural network methods. Location-based recommendation methods explore the differences in the impact of past locations on historical trajectories. For example, the trajectory is compressed into a sequence of visits to areas of interest based on different functional areas, or each point is projected onto a map divided into multi-scale grids. The recommendation method based on heterogeneous graph neural networks explores the relationship between heterogeneous user-item interactions. For example, HetGNN can simultaneously capture the structural and feature heterogeneity of user trajectories, and HANs considers the importance of nodes and meta-paths at the same time.
[0004] However, none of the existing solutions analyze time-sensitive recommendations, but only focus on sequence-sensitive social or product recommendations. The recommendation results are often unsatisfactory and cannot capture dynamic changes for destination recommendations. In addition, the existing methods encounter the major challenge of under-coupling. Except for places with strong regularity such as residential areas and workplaces, the regularity of people's travel in many places is very weak, and the learning ability of the model is limited, so it is easy to have under-fitting problems. Therefore, it is necessary to develop a next destination recommendation method to solve the above problems. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a next destination recommendation method, system and medium based on co-occurrence pattern mining, constructs rich feature information and connection relationships in human travel trajectories, and constructs a heterogeneous graph neural network to mine human travel preferences.
[0006] In a first aspect, a first object of the present invention is to provide a next destination recommendation method based on co-occurrence pattern mining, comprising the following steps:
[0007] S1. Obtain the user's trajectory data set and preprocess the trajectory data set;
[0008] S2. Extracting user destination information and time information from the trajectory data set through a convolutional neural network to form a heterogeneous graph neural network; the nodes in the heterogeneous graph neural network represent users and destinations;
[0009] S3. Define several meta-paths and extract path features of each meta-path in the heterogeneous graph neural network respectively;
[0010] S4. In the heterogeneous graph neural network, the target node and the source node are obtained, and the first importance between each source node and the target node is calculated according to the target node, the source node and the path characteristics;
[0011] S5. Update the nodes of the meta-path according to the first importance to obtain the updated embedding vector of each node in the meta-path;
[0012] S6. Obtain the likelihood scores of all destinations based on the updated embedding vectors, and obtain recommended destinations based on the likelihood scores.
[0013] Furthermore, in S3, the definition of several meta-paths and the extraction of path features of each meta-path include the following three types:
[0014] Calculate the distance between each destination in the heterogeneous graph neural network and define the distance as the first feature;
[0015] According to the order of users’ visited destinations in the heterogeneous graph neural network, the cosine similarity of preferences between users is calculated and the cosine similarity is defined as the second feature.
[0016] Determine whether the user is a cold start user. If not, obtain the user's access characteristics based on the user's historical visit destinations. If it is a cold start user, infer the user's access characteristics based on the kernel density estimation method. Define the access characteristics as the third feature.
[0017] Further, the trajectory data set is subjected to a convolutional neural network to extract the user destination information and time information, including:
[0018] Constructing a convolutional neural network, wherein the convolutional neural network sequentially includes a first convolutional layer, a pooling layer, a second convolutional layer, and a fully connected layer; the convolutional neural network outputs initial destination information and initial time information;
[0019] The initial destination information and the initial time information are input into an encoder to obtain user destination information and time information; the encoder includes a graph attention layer and a long short-term memory layer.
[0020] Further, the method of calculating the cosine similarity of preferences between users according to the order of destinations visited by users in the heterogeneous graph neural network includes:
[0021] S321, performing node embedding on each visit destination of each user in turn to obtain trajectory embedding;
[0022] S322, using a gated recurrent unit to process the trajectory embedding of each user respectively to obtain a trajectory vector of each user;
[0023] S323: Calculate the cosine similarity of the trajectory vectors between any two users among all users.
[0024] Further, obtaining the user's access characteristics according to the user's historical access destinations includes:
[0025] S3311, preset an access location, and obtain historical access data of different users before the access location, wherein the historical access data includes a number of historical access destinations, a historical access time of each historical access destination, and a historical leaving time;
[0026] S3312, using the gate cycle unit to process the historical access data of different users respectively, to obtain the first access time and the leaving time of the different users at the access location;
[0027] S3313. Integrate the access location, first access time and departure time to obtain the third feature.
[0028] Further, the inferring the user's access characteristics according to the kernel density estimation method includes:
[0029] S3321. Given a set of destinations, construct a probability density formula using a kernel density estimation method, wherein the probability density formula is used to calculate a probability density value of each destination in the set of destinations to obtain a first probability density distribution;
[0030] S3322, preset a number of visited destinations and the second visit time corresponding to each visited destination in time sequence, calculate and obtain a second probability density distribution of the visited destinations, input the second probability density distribution into the gate recurrent unit for processing to obtain a third probability density distribution of each destination in the destination set at the next visit;
[0031] S3323. Select the third probability density value that is in the first z in the third probability density distribution, and record the visit destination corresponding to the third probability density value as the third feature, where z is a natural number that is not 0.
[0032] Further, the S4 includes:
[0033] S41, calculating the node relationship between each cold start user according to the ranking of the access destination;
[0034] S42, obtaining a source node and a target node, calculating the second importance between each meta-path according to the source node and the target node, obtaining a weight coefficient of each meta-path according to the second importance, path characteristics and node relationship, and obtaining a vector representation of the source node in each meta-path according to the weight coefficient;
[0035] S43. According to the vector representation of the source nodes in each meta-path and the node relationship, the first importance between each source node and the target node is calculated using the graph-level attention mechanism.
[0036] Further, the S5 includes:
[0037] S51, based on the heterogeneous graph neural network, respectively calculating the relative time difference between each user's two consecutive destinations;
[0038] S52, calculating the time perception weights of different consecutive destinations of different users according to the relative time difference;
[0039] S53: Calculate the updated embedding vector of each node in the meta-path according to the time-aware weight and the first importance.
[0040] In a second aspect, a second object of the present invention is to provide a next destination recommendation system based on co-occurrence pattern mining, comprising:
[0041] Processing unit: obtaining a user's trajectory data set and preprocessing the trajectory data set; extracting the user's destination information and time information from the trajectory data set through a convolutional neural network to form a heterogeneous graph neural network; the nodes in the heterogeneous graph neural network represent the user and the destination;
[0042] Prediction unit: connected to the data processing unit, used to define several meta-paths, respectively extract the path features of each meta-path in the heterogeneous graph neural network; in the heterogeneous graph neural network, obtain the target node and the source node, calculate the first importance between each source node and the target node according to the target node, the source node and the path features; update the nodes of the meta-path according to the first importance, and obtain the updated embedding vector of each node in the meta-path;
[0043] Output module: connected to the prediction unit, used to obtain the likelihood scores of all destinations based on the updated embedding vectors, and obtain recommended destinations based on the likelihood scores.
[0044] In a third aspect, a third object of the present invention is to provide a computer-readable storage medium storing a computer program, wherein the computer program implements the method described in the first aspect when executed by a processor.
[0045] The embodiments of the present invention have the following technical effects:
[0046] This application preprocesses the sample data to ensure that the data is effectively used by the model, and proposes a deep learning network for feature extraction, capturing global and temporal information through encoder processing;
[0047] This application discovers complex co-occurrence patterns by acquiring rich feature information in human travel trajectories, such as path information and node relationships, and constructs a heterogeneous graph neural network;
[0048] This application captures time-varying urban hotspots based on the user's travel trajectory and provides potential destinations for cold-start users, further avoiding the problem of underfitting;
[0049] This application comprehensively considers the information of neighbor nodes at the node level, improving the performance of heterogeneous graph neural networks in processing data; it captures the importance between nodes through a graph-level attention mechanism, focuses on important parts of the graph to capture the dynamic changes of user preferences, and then obtains dynamic node representations to obtain recommended destinations, thereby improving the overall accuracy of the method. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1 This is a flowchart of a next destination recommendation method based on co-occurrence pattern mining provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0053] Example 1
[0054] Co-occurrence patterns provide strong support for recommendation systems by capturing the correlation and similarity between users and locations. Figure 1 is a flowchart of a next destination recommendation method and system based on co-occurrence pattern mining provided by an embodiment of the present invention. Figure 1 , including:
[0055] S1. Obtain the user's trajectory data set and preprocess the trajectory data set;
[0056] Collect existing user trajectory information, such as car driving records, to obtain a large number of trajectory data sets as samples, preprocess them, and obtain the information needed for destination prediction in this application: users and destinations; preprocessing can improve data quality and reduce noise and redundancy.
[0057] Such as eliminating abnormal data, smoothing trajectory information, data sampling, data dimension reduction, selectively retaining or filtering out specific points, etc.; all of these are prior arts and will not be described in detail in this application.
[0058] S2. Extracting user destination information and time information from the trajectory data set through a convolutional neural network to form a heterogeneous graph neural network; the nodes in the heterogeneous graph neural network represent users and destinations.
[0059] To make predictions, a lot of analysis of different route information of different users is required to build a reliable model.
[0060] The two-dimensional coordinate method can be used to mark the user's trajectory location; the encoding representation of the user or destination can be used to convert the category information into a vector form to better retain the category information.
[0061] In addition to user and destination information, another important parameter about the trajectory is time, which cannot be obtained directly from graph data. Therefore, a deep learning algorithm is used directly to calculate all features including arrival time, stay time, and departure time.
[0062] The trajectory dataset is input into the convolutional neural network. It first passes through a first convolutional layer to obtain destination information, user information, etc. from the image, and obtains the correlation between adjacent pixels in the image. It then passes through a pooling layer to reduce the amount of computation in the subsequent layers. It then passes through a second convolutional layer to further extract time information between adjacent pixels. Finally, it passes through a fully connected layer to integrate the destination information and time information to obtain the final total information.
[0063] Because the environment of the image changes over time, time information is hidden in the environment information. Therefore, time calculation is involved between images. The user, destination information and time information are directly obtained through the deep learning algorithm. The entire deep learning process can be expressed by the following formula:
[0064] ,
[0065] Where y represents the input image, t represents the time, contains information about the environment in the input image. The image changes over time, so the above formula needs to be calculated in each time step.
[0066] The connection layer can expand the vector to a higher dimension so that all information can be integrated to obtain a preliminary information graph, which is then input into the encoder to further process the valuable information obtained.
[0067] The encoder includes a graph attention layer and a long short-term memory layer. The graph attention layer is used to obtain attention information and uses a shared linear transformation parameterized by a weight matrix. Finally, the correlation between vectors is calculated and expressed as follows:
[0068] ,
[0069] in, and are different eigenvectors, Reflects and The correlation between them, W is the weight matrix, Represents an encoder function.
[0070] In order to obtain a more stable value, the Softmax function can be used for activation to obtain a single-head attention mechanism, and multiple single heads can be combined to obtain a multi-head attention mechanism to obtain the attention weight. The obtained attention weight is input into the long short-term memory layer, and the destination, time and other information before the application is predicted are output, and the heterogeneous graph neural network is constructed using this information.
[0071] S3. Define several meta-paths and extract the path features of each meta-path in the heterogeneous graph neural network.
[0072] Based on the above information, the nodes are defined as users or destinations. After the heterogeneous graph neural network is constructed, the meta-path of the network is: destination-destination, user-user, user-destination, where “-” indicates an edge connection relationship.
[0073] Specifically, the path characteristics include the following three aspects:
[0074] (1) When the meta-path is destination-destination
[0075] Calculate the distance between each destination in the heterogeneous graph neural network and define the distance as the first feature;
[0076] (2) When the meta-path is user-user
[0077] According to the order of users' visited destinations in the heterogeneous graph neural network, the cosine similarity of preferences between users is calculated, and the cosine similarity is defined as the second feature.
[0078] Specifically, it includes the following:
[0079] S321, performing node embedding on each visit destination of each user in turn to obtain trajectory embedding;
[0080] Extract each visited destination through the random walk model 2-hop nodes to build a self-network , the edge characteristics of the ego network can be determined by the residence time For each visited destination, a graph convolutional network is used as an encoder to embed nodes, and the embedding is achieved through the following formula:
[0081]
[0082] in, represents the degree matrix, represents the adjacency matrix with self-loops, I represents the identity matrix, A represents the adjacency matrix, Indicates the Lth visited destination Features, represents the learnable parameter matrix of the hidden layer, is the activation function, i represents the i-th visited destination. This formula can be used to embed the positions of all nodes and obtain a complete trajectory embedding .
[0083] S322, using the gated recurrent unit to process the trajectory embedding of each user respectively, to obtain the trajectory vector of each user The gated recurrent unit, i.e., the gating mechanism, is introduced to control the flow of information, thereby improving the performance of the model; in addition, the gated recurrent unit in the present application is used as a decoder.
[0084] S323, calculate the cosine similarity of the trajectory vectors between all users. and For users The trajectory vector and user The trajectory vector of any two users is calculated using the following formula:
[0085] ,
[0086] The cosine similarity is recorded as the second feature.
[0087] In summary, a user similarity representation module is constructed to convert the user's sequential trajectory into continuous embedding and calculate the similarity between user preferences.
[0088] (3) When the meta-path is user-destination
[0089] Determine whether the user is a cold start user. If not, obtain the user's access characteristics based on the user's historical visit destinations. If the user is a cold start user, infer the user's access characteristics based on the kernel density estimation method. Define the access characteristics as the third feature.
[0090] Cold start users refer to users who have no historical behavior data. They lack sufficient data support, making it difficult for the recommendation system to provide accurate recommendations for them. Different treatments are performed based on whether the user is a cold start user:
[0091] 1. Non-cold start users
[0092] S3311: Given an access location, obtain a number of historical access data of different users before the access location, wherein the historical access data includes a number of historical access destinations and a historical access time and a historical leaving time of each historical access destination;
[0093] Given an access location, such as , Represents all the historical visited locations of a certain user, and the three historical visited destinations of the user before the visited location are recorded as , duration . Divide the day into time periods, the time can be coded as For each visited location, the historical visit time and historical leave time of a user at each historical visited destination can be recorded as:
[0094] ,
[0095] Wherein, x represents the xth historical visited destination.
[0096] S3312, using the gate cycle unit to process the historical access data of different users respectively, to obtain the first access time and the leaving time of the different users at the access location;
[0097] Based on GRU, the visit time and leave time of each user are predicted. Denote as the predicted first access time, Denote it as the predicted departure time.
[0098] S3313. Integrate the access location, access time and departure time to obtain access characteristics.
[0099] The three features are integrated using the embedding layer as the user's access feature, which is the third feature.
[0100] 2. Cold start users
[0101] S3321. Given a set of destinations, construct a probability density formula using a kernel density estimation method, wherein the probability density formula is used to calculate a probability density value of each destination in the set of destinations to obtain a first probability density distribution;
[0102] A global perception preference module is constructed, and the agglomeration effect of urban areas is modeled using kernel density estimation.
[0103] Any given set of destinations , k represents the kth destination, |L| represents the number of all destinations of all users, and the kernel density estimation method is used to calculate the probability density value of the global preference for each destination in the region to obtain the first probability density distribution, which is expressed as follows:
[0104] ,
[0105] in, Indicates location The probability density value around, that is, at position The probability density value of each destination within the preset range; Indicates bandwidth is Gaussian kernel function.
[0106] S3322, preset a number of visited destinations and the second visit time corresponding to each visited destination in time sequence, calculate and obtain a second probability density distribution of the visited destinations, input the second probability density distribution into the gate recurrent unit for processing to obtain a third probability density distribution of each destination in the destination set at the next visit;
[0107] Given the second access time And a series of visit destinations corresponding to the time series , calculate the global probability density distribution, that is, the second probability density, use it as the GRU input, and calculate The global probability density distribution at the moment, that is, the third probability density distribution, is used as historical reference data for prediction User access status at all times;
[0108] S3323. Select the third probability density value that is in the first z in the third probability density distribution, and record the access destination corresponding to the third probability density value as the third feature, where z is a natural number not equal to 0, that is, the third feature is used as the location preference of the cold start user.
[0109] Therefore, a global perception preference module is constructed, which integrates the information of all users, captures time-varying urban hotspots according to the user's travel trajectory, and provides potential destinations for cold start users, solving the problem of user cold start. In summary, rich features and connection relationships are set.
[0110] S4. In the heterogeneous graph neural network, the target node and the source node are obtained, and the first importance between each source node and the target node is calculated according to the target node, the source node and the path characteristics.
[0111] Given any node as the source node, the nodes other than the source node are the target nodes. The first important parameter here is the attention weight, which specifically includes the following steps:
[0112] S41, calculating the node relationship between each cold start user according to the ranking of the access destination;
[0113] Based on the location preference of the cold start user calculated in S523, the node relationship between the cold start user nodes is calculated. , expressed as:
[0114] ,
[0115] in, represents the cth candidate node of the access destination, C represents the total number of candidate nodes, Indicates the target node At the source node The ranking of visited destinations in the third feature of the network; this step adds the representation of the relationship between users among cold start users.
[0116] S42, obtaining a source node and a target node, calculating the second importance between each meta-path according to the source node and the target node, obtaining a weight coefficient of each meta-path according to the second importance, path characteristics and node relationship, and obtaining a vector representation of the source node in each meta-path according to the weight coefficient;
[0117] Use node-level attention layer to calculate the weights of isomorphic neighbors. First, calculate the target node For source node Importance :
[0118] ,
[0119] in, and Represent the representation vectors of the source node and the target node respectively, m represents the mth source node, n represents the nth target node, and att represents the attention function; it can be further expressed as:
[0120] ,
[0121] in, and are linear mappings for source node representation and target node representation, respectively, are learnable parameters of the node-level attention layer, and g() represents a simple nonlinear function such as MLP; For the path features and node relationships calculated previously, all the data are directly integrated to obtain Vector; d represents the data feature dimension; represents the number of attention heads, the total number is e, represents the connection operation, which is used to connect the e attention heads together to obtain the second importance between each meta-path .
[0122] Then use the Softmax function to normalize the second importance and get the weight coefficient , as shown below:
[0123] ,
[0124] in, Represents the activation function, source node The vector representation of the source node in each meta-path can be obtained by aggregating the embedded features of its neighbor nodes and the corresponding weight coefficients; the vector representation of the source node in the meta-path P for:
[0125] ,
[0126] in, represents all neighbor nodes of the source node under the meta-path P, is the embedding feature of the neighboring nodes.
[0127] In summary, the node-level attention layer calculation is mainly used to learn and aggregate the information of neighbor nodes at the node level, while giving these neighbor nodes different importance weights, realizing weighted aggregation of neighbor nodes, thereby improving the performance and flexibility of heterogeneous graph neural networks in processing graph structured data.
[0128] S43. According to the vector representation of the source nodes in each meta-path and the node relationship, the first importance between each source node and the target node is calculated using the graph-level attention mechanism.
[0129] Use graph-level attention mechanism to calculate the similarity between different types of source and target nodes, and quantify the first importance of specific features of different neighbors , which can be expressed as:
[0130] ,
[0131] in, are the learnable parameters of the graph attention layer; and Represent the vector representation of the source node and the target node respectively, through the vector representation in S41 Calculated by formula.
[0132] The graph-level attention mechanism can learn the structure and features of the entire graph and capture the relationship and importance between nodes; the graph-level attention mechanism can also automatically focus on important parts of the graph, thereby improving the performance and accuracy of the model.
[0133] In summary, a dynamic heterogeneous message aggregation module is constructed to capture the dynamic changes of user preferences.
[0134] S5. Update the nodes of the meta-path according to the first importance between different source nodes and target nodes to obtain the updated embedding vector of each node in the meta-path.
[0135] Build a temporal encoder to update the node embedding vector. It includes the following sub-steps:
[0136] S51. Based on heterogeneous graph neural network, the relative time difference between each user's consecutive destinations is calculated. , the formula is:
[0137] ,
[0138] in, Indicates purpose, Indicates arrival The time at the destination, Indicates arrival -1 destination, || || means finding the norm; the continuous destination here refers to any two destinations connected by an edge as continuous destinations.
[0139] S52: Calculate the time perception weights of different users' different consecutive destinations based on the relative time difference , the formula is:
[0140] ,
[0141] in, Indicates the total number of all consecutive destinations, Represents the vector representation of the source node. The perception weight refers to the weight of the edge between two connected nodes.
[0142] S53, calculating the updated embedding vector of each node in the meta-path according to the time-aware weight and the first importance , the formula is as follows:
[0143]
[0144] in, represents the meta-path embedding vector, i.e., the first importance, represents the updated graph-level meta-path embedding vector, Represents a tensor product operation.
[0145] S6. Obtain the likelihood scores of all destinations based on the updated embedding vectors, and obtain recommended destinations based on the likelihood scores.
[0146] Based on the output of S53, the meta-path embedding vectors of all target nodes corresponding to the source node are cascaded, and the possibility scores of all location options are output through the location decoder. The location decoder consists of a multi-layer perceptron, which selects the first few most likely results and recommends destinations to users.
[0147] Based on the above technical solution, this application constructs rich feature information and connection relationships in human travel trajectories through heterogeneous graph neural networks to explore human travel preferences.
[0148] Example 2
[0149] Based on the content of Example 1, the present application provides a next destination recommendation system based on co-occurrence pattern mining, including:
[0150] Processing unit: obtaining a user's trajectory data set and preprocessing the trajectory data set; extracting the user's destination information and time information from the trajectory data set through a convolutional neural network to form a heterogeneous graph neural network; the nodes in the heterogeneous graph neural network represent the user and the destination;
[0151] Prediction unit: connected to the data processing unit, used to define several meta-paths, respectively extract the path features of each meta-path in the heterogeneous graph neural network; in the heterogeneous graph neural network, obtain the target node and the source node, calculate the first importance between each source node and the target node according to the target node, the source node and the path features; update the nodes of the meta-path according to the first importance, and obtain the updated embedding vector of each node in the meta-path;
[0152] Output module: connected to the prediction unit, used to obtain the likelihood scores of all destinations based on the updated embedding vectors, and obtain recommended destinations based on the likelihood scores.
[0153] For other details, please refer to Example 1 and will not be described in detail here.
[0154] Example 3
[0155] The present application provides a computer-readable storage medium storing a computer program, wherein the computer program implements the method described in Embodiment 1 when executed by a processor.
[0156] It should be noted that the terms used in the present invention are only for describing specific embodiments, rather than limiting the scope of the present application. As shown in the present specification, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of more restrictions, the elements defined by the sentence "include one..." do not exclude the presence of other identical elements in the process, method or device including the elements.
[0157] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are 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 on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. 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 an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0158] Finally, it should be noted that 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. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.
Claims
1. A next destination recommendation method based on co-occurrence pattern mining, characterized in that: The following steps are involved: S1. Obtain the user's trajectory data set and preprocess the trajectory data set; S2, extracting user destination information and time information from the trajectory data set through a convolutional neural network to form a heterogeneous graph neural network; The nodes in the heterogeneous graph neural network represent users and destinations; S3. Define several meta-paths and extract path features of each meta-path in the heterogeneous graph neural network respectively; S4. In the heterogeneous graph neural network, the target node and the source node are obtained, and the first importance between each source node and the target node is calculated according to the target node, the source node and the path characteristics; S5. Update the nodes of the meta-path according to the first importance to obtain the updated embedding vector of each node in the meta-path; S6. Obtain the likelihood scores of all destinations according to the updated embedding vectors, and obtain the recommended destinations according to the likelihood scores. Among them, in S3, the definition of several meta-paths and the extraction of path features of each meta-path include the following three types: Calculate the distance between each destination in the heterogeneous graph neural network and define the distance as the first feature; According to the order of users’ visited destinations in the heterogeneous graph neural network, the cosine similarity of preferences between users is calculated and the cosine similarity is defined as the second feature. Determine whether the user is a cold start user. If not, obtain the user's access characteristics based on the user's historical visit destinations. If the user is a cold start user, infer the user's access characteristics based on the kernel density estimation method. Define the access characteristics as the third feature. The S4 includes: S41, calculating the node relationship between each cold start user according to the ranking of the access destination; S42, obtaining a source node and a target node, calculating the second importance between each meta-path according to the source node and the target node, obtaining a weight coefficient of each meta-path according to the second importance, path characteristics and node relationship, and obtaining a vector representation of the source node in each meta-path according to the weight coefficient; S43, according to the vector representation of the source node and the node relationship in each meta-path, the first importance between each source node and the target node is calculated using the graph-level attention mechanism; The S5 includes: S51, based on the heterogeneous graph neural network, respectively calculating the relative time difference between each user's two consecutive destinations; S52, calculating the time perception weights of different consecutive destinations of different users according to the relative time difference; S53: Calculate the updated embedding vector of each node in the meta-path according to the time-aware weight and the first importance.
2. The method for recommending the next destination based on co-occurrence pattern mining according to claim 1, characterized in that: The trajectory dataset is subjected to a convolutional neural network to extract the user destination information and time information, including: Constructing a convolutional neural network, wherein the convolutional neural network sequentially includes a first convolutional layer, a pooling layer, a second convolutional layer, and a fully connected layer; the convolutional neural network outputs initial destination information and initial time information; The initial destination information and the initial time information are input into an encoder to obtain user destination information and time information; the encoder includes a graph attention layer and a long short-term memory layer.
3. The method for recommending the next destination based on co-occurrence pattern mining according to claim 1, characterized in that: The method of calculating the cosine similarity of preferences between users according to the order of destinations visited by users in the heterogeneous graph neural network includes: S321, performing node embedding on each visit destination of each user in turn to obtain trajectory embedding; S322, using a gated recurrent unit to process the trajectory embedding of each user respectively to obtain a trajectory vector of each user; S323: Calculate the cosine similarity of the trajectory vectors between any two users among all users.
4. The method for recommending the next destination based on co-occurrence pattern mining according to claim 1, characterized in that: The obtaining of the user's access characteristics according to the user's historical access destinations includes: S3311, preset an access location, and obtain historical access data of different users before the access location, wherein the historical access data includes a number of historical access destinations, a historical access time of each historical access destination, and a historical leaving time; S3312, using the gate cycle unit to process the historical access data of different users respectively, to obtain the first access time and the leaving time of the different users at the access location; S3313. Integrate the access location, first access time and departure time to obtain the third feature.
5. The method for recommending the next destination based on co-occurrence pattern mining according to claim 1, characterized in that: The inferring the user's access characteristics according to the kernel density estimation method includes: S3321. Given a set of destinations, construct a probability density formula using a kernel density estimation method, wherein the probability density formula is used to calculate a probability density value of each destination in the set of destinations to obtain a first probability density distribution; S3322, preset a number of visited destinations and the second visit time corresponding to each visited destination in time sequence, calculate and obtain a second probability density distribution of the visited destinations, input the second probability density distribution into the gate recurrent unit for processing to obtain a third probability density distribution of each destination in the destination set at the next visit; S3323. Select the third probability density value that is in the first z in the third probability density distribution, and record the visit destination corresponding to the third probability density value as the third feature, where z is a natural number that is not 0.
6. A next destination recommendation system based on co-occurrence pattern mining, used to implement the next destination recommendation method based on co-occurrence pattern mining as described in any one of claims 1 to 5, characterized in that: include: Processing unit: obtaining a user's trajectory data set and preprocessing the trajectory data set; extracting the user's destination information and time information from the trajectory data set through a convolutional neural network to form a heterogeneous graph neural network; The nodes in the heterogeneous graph neural network represent users and destinations; Prediction unit: connected to the data processing unit, used to define several meta-paths and extract path features of each meta-path in the heterogeneous graph neural network; In the heterogeneous graph neural network, the target node and the source node are obtained, and the first importance between each source node and the target node is calculated according to the target node, the source node and the path characteristics; the nodes of the meta-path are updated according to the first importance, and the updated embedding vectors of each node in the meta-path are obtained; Output module: connected to the prediction unit, used to obtain the likelihood scores of all destinations based on the updated embedding vectors, and obtain recommended destinations based on the likelihood scores.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Heterogeneous graph neural network-based recommendation method
CN112990972A
Destination recommendation method and system based on multi-source heterogeneous information network
CN114398462A