Hypergraph construction method and device, and access site prediction method and device based on hypergraph
Patent Information
- Application Number
- CN202310495849.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2043-04-27
Smart Images

Figure CN116484121B_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of artificial intelligence technology, specifically to a method and apparatus for constructing a hypergraph, and a method and apparatus for predicting access sites based on a hypergraph. Background Technology
[0002] In the field of artificial intelligence, user visit prediction is a typical task that predicts future behavior based on historical user behavior. User visit prediction can be applied to various businesses; for example, travel applications can use user visit prediction to forecast locations users might visit in the future, and then recommend information related to those locations.
[0003] Currently, user visit prediction is primarily performed using machine learning models, with sequence models such as RNNs being the mainstream approach. These models are trained using historical user visit data, enabling them to effectively model users' long-term historical preferences and short-term interests. Summary of the Invention
[0004] In view of the above, embodiments of this specification provide a hypergraph construction method and apparatus, and a hypergraph-based access site prediction method and apparatus. The technical solutions provided in these embodiments identify the correlations between various access trajectories based on the constructed access trajectories, and then construct a hypergraph based on these correlations. This ensures that the hypergraph includes not only user information and site information, but also the correlations between various access trajectories. Furthermore, when the hypergraph is used for access site prediction, prediction accuracy can be improved by performing predictions based on the correlations within the hypergraph.
[0005] According to one aspect of the embodiments of this specification, a method for constructing a hypergraph is provided, comprising: collecting site access data of users, wherein the site access data includes user information and visited site information; constructing access time trajectories for each user in a time dimension based on the site access data, wherein each access time trajectory consists of multiple site access behaviors ordered by time, and each site access behavior includes user information and site information; determining the correlation between the constructed access time trajectories based on users and / or sites; and constructing a hypergraph based on the correlation and access trajectory nodes used to characterize the access trajectory, such that when the hypergraph is combined with an access site prediction model for access site prediction, the access site prediction model makes predictions based on the correlation in the hypergraph, wherein the access trajectory includes the access time trajectory.
[0006] According to another aspect of the embodiments of this specification, a method for constructing a hypergraph is also provided, comprising: collecting user site access data, wherein the site access data includes user information and visited site information; constructing access spatial trajectories for each user in a spatial dimension based on the site access data, wherein each access spatial trajectory consists of multiple site access behaviors aggregated in space, each site access behavior including user information and site information; determining the correlation between the constructed access spatial trajectories based on users and / or sites; and constructing a hypergraph based on the correlation and access trajectory nodes used to characterize the access spatial trajectories, such that when the hypergraph is combined with an access site prediction model for use in access site prediction, the access site prediction model makes predictions based on the correlation in the hypergraph.
[0007] According to another aspect of the embodiments of this specification, a hypergraph-based access site prediction method is also provided, comprising: determining the last access trajectory of a user to be predicted from a constructed hypergraph, wherein the hypergraph is obtained by any of the methods in the embodiments of this specification; obtaining a hypergraph substructure centered on a target access trajectory node used to characterize the last access trajectory from the hypergraph; and inputting the hypergraph substructure into an access site prediction model, such that the access site prediction model outputs a predicted site.
[0008] According to another aspect of the embodiments of this specification, an apparatus for constructing a hypergraph is also provided, comprising: a data acquisition unit for acquiring user site access data, wherein the site access data includes user information and visited site information; a trajectory construction unit for constructing access time trajectories for each user in a time dimension based on the site access data, wherein each access time trajectory consists of multiple site access behaviors ordered by time, and each site access behavior includes user information and site information; a correlation determination unit for determining the correlation between the constructed access time trajectories based on users and / or sites; and a hypergraph construction unit for constructing a hypergraph based on the correlation and access trajectory nodes used to characterize the access trajectory, such that when the hypergraph is combined with an access site prediction model for use in access site prediction, the access site prediction model makes predictions based on the correlation in the hypergraph, wherein the access trajectory includes the access time trajectory.
[0009] According to another aspect of the embodiments of this specification, an apparatus for constructing a hypergraph is also provided, comprising: a data acquisition unit for acquiring user site access data, wherein the site access data includes user information and visited site information; a trajectory construction unit for constructing access spatial trajectories for each user in a spatial dimension based on the site access data, wherein each access spatial trajectory consists of multiple site access behaviors aggregated in space, and each site access behavior includes user information and site information; a correlation determination unit for determining the correlation between the constructed access spatial trajectories based on users and / or sites; and a hypergraph construction unit for constructing a hypergraph based on the correlation and access trajectory nodes used to characterize the access spatial trajectories, such that when the hypergraph is combined with an access site prediction model for use in access site prediction, the access site prediction model makes predictions based on the correlation in the hypergraph.
[0010] According to another aspect of the embodiments of this specification, a hypergraph-based access site prediction apparatus is also provided, comprising: a trajectory determination unit for determining the last access trajectory of a user to be predicted from a constructed hypergraph, wherein the hypergraph is obtained by any of the methods in the embodiments of this specification; a hypergraph substructure acquisition unit for acquiring a hypergraph substructure centered on a target access trajectory node used to characterize the last access trajectory from the hypergraph; and a site prediction unit for inputting the hypergraph substructure into an access site prediction model so that the access site prediction model outputs a predicted site.
[0011] According to another aspect of the embodiments of this specification, an electronic device is also provided, comprising: at least one processor, a memory coupled to the at least one processor, and a computer program stored on the memory, wherein the at least one processor executes the computer program to implement the hypergraph construction method or the hypergraph-based access site prediction method as described above.
[0012] According to another aspect of the embodiments of this specification, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the hypergraph construction method or the hypergraph-based access site prediction method as described above.
[0013] According to another aspect of the embodiments of this specification, a computer program product is also provided, including a computer program that, when executed by a processor, implements the hypergraph construction method or the hypergraph-based access site prediction method as described above. Attached Figure Description
[0014] A further understanding of the nature and advantages of the embodiments described in this specification can be achieved by referring to the following accompanying drawings. In the drawings, similar components or features may have the same reference numerals.
[0015] Figure 1 A flowchart illustrating an example of a hypergraph construction method according to an embodiment of this specification is shown.
[0016] Figure 2 A schematic diagram illustrating an example of constructing an access trail according to an embodiment of this specification is shown.
[0017] Figure 3 A schematic diagram illustrating an example of obtaining an access time trajectory by segmentation according to an embodiment of this specification is shown.
[0018] Figure 4 A schematic diagram illustrating an example of determining the correlation between various access time trajectories according to embodiments of this specification is shown.
[0019] Figure 5 A schematic diagram illustrating an example of a hypergraph constructed according to an embodiment of this specification is shown.
[0020] Figure 6 A flowchart illustrating another example of a hypergraph construction method according to another embodiment of this specification is shown.
[0021] Figure 7 A schematic diagram illustrating an example of obtaining an access space trajectory by segmentation according to an embodiment of this specification is shown.
[0022] Figure 8 A flowchart illustrating an example of a hypergraph construction method according to another embodiment of this specification is shown.
[0023] Figure 9 A flowchart illustrating an example of a hypergraph-based access site prediction method according to an embodiment of this specification is shown.
[0024] Figure 10 A schematic diagram is shown as an example of how an access site prediction model processes a hypergraph substructure according to an embodiment of this specification.
[0025] Figure 11 A flowchart illustrating an example of how an access site prediction model processes a hypergraph substructure according to an embodiment of this specification is shown.
[0026] Figure 12 A schematic diagram of an example of a hypergraph Transformer convolutional layer in a collaborative fusion layer according to an embodiment of this specification is shown.
[0027] Figure 13 A block diagram illustrating an example of a hypergraph construction apparatus according to an embodiment of this specification is shown.
[0028] Figure 14A block diagram of another example of a hypergraph construction apparatus according to an embodiment of this specification is shown.
[0029] Figure 15 A block diagram of an example of a hypergraph-based access site prediction apparatus according to an embodiment of this specification is shown.
[0030] Figure 16-17 A block diagram of an electronic device for implementing a hypergraph construction method according to an embodiment of this specification is shown.
[0031] Figure 18 A block diagram of an electronic device for implementing a hypergraph-based access site prediction method, according to an embodiment of this specification, is shown. Detailed Implementation
[0032] The subject matter described herein will be discussed below with reference to exemplary embodiments. It should be understood that these embodiments are discussed merely to enable those skilled in the art to better understand and implement the subject matter described herein, and are not intended to limit the scope, applicability, or examples set forth in the claims. The function and arrangement of the elements discussed may be changed without departing from the scope of the embodiments described herein. Various processes or components may be omitted, substituted, or added as needed in the various examples. Furthermore, features described in some examples may be combined in other examples.
[0033] As used herein, the term "comprising" and its variations are open terms meaning "including but not limited to". The term "based on" means "at least partially based on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one other embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other definitions, whether explicit or implicit, may be included below. Unless explicitly indicated by the context, the definition of a term shall remain consistent throughout the specification.
[0034] In this specification, the term "access site prediction model" refers to a machine learning model applied in business scenarios to provide access site prediction services. Based on the predicted access sites, the model provides corresponding services step-by-step, such as content recommendation and navigation planning. Examples of machine learning models may include, but are not limited to: linear regression models, logistic regression models, neural network models, decision tree models, support vector machines, and Transformers. Examples of neural network models may include, but are not limited to, deep neural network (DNN) models, convolutional neural network (CNN) models, and backpropagation (BP) neural networks.
[0035] With the development of artificial intelligence technology, machine learning technology is widely used as an access point prediction model in various business application scenarios to provide various business services, such as content recommendation and navigation planning. For example, access point prediction models have wide applications in recommendation systems and navigation. To achieve better model performance, more training data is needed to train the access point prediction model. In application areas such as healthcare and finance, different enterprises or institutions have different data samples. Once these data are jointly trained, the accuracy of the access point prediction model will be greatly improved, thereby bringing huge economic benefits to enterprises.
[0036] In the field of artificial intelligence, user visit prediction is a typical task that predicts future behavior based on historical user behavior. User visit prediction can be applied to various businesses; for example, travel applications can use user visit prediction to forecast locations users might visit in the future, and then recommend information related to those locations.
[0037] Currently, user visit prediction is primarily performed using machine learning models, with sequence models such as RNNs being the mainstream approach. These models are trained using historical user visit data, enabling them to effectively model users' long-term historical preferences and short-term interests.
[0038] However, when using the current model for prediction, it only represents users, visited locations, and historical trajectories as vector objects, and the representations of different users are independent of each other. This ignores the potential correlation between users and locations, resulting in low prediction accuracy.
[0039] In view of the above, embodiments of this specification provide a hypergraph construction method and apparatus, and a hypergraph-based access site prediction method and apparatus. In the hypergraph construction method, user access site data is collected, including user information and visited site information; access time trajectories for each user are constructed in the time dimension based on the access site data, wherein each access time trajectory consists of multiple temporally consecutive access site behaviors, and each access site behavior includes user information and site information; the correlation between the constructed access time trajectories is determined based on the user and / or site; and a hypergraph is constructed based on the correlation and access trajectory nodes used to characterize the access trajectories, so that when the hypergraph is combined with an access site prediction model for access site prediction, the access site prediction model makes predictions based on the correlations in the hypergraph, wherein the access trajectory includes the access time trajectory. Through the technical solutions provided by the embodiments of this specification, the correlations between the constructed access trajectories are identified, and then a hypergraph is constructed based on these correlations, so that the hypergraph includes not only user information and site information, but also the correlations between access trajectories. Furthermore, when hypergraphs are used for site visit prediction, predictions based on the correlations within the hypergraph can improve prediction accuracy.
[0040] The following description, in conjunction with the accompanying drawings, details a hypergraph construction method and apparatus, and a hypergraph-based access site prediction method and apparatus, based on embodiments of this specification.
[0041] The hypergraph constructed in the embodiments of this specification can be applied to the application scenario of visit site prediction. In the application scenario of visit site prediction, the constructed hypergraph can be combined with a trained visit site prediction model. The visit site prediction model is used to predict visit sites. The hypergraph or a part of the substructure obtained from the hypergraph can be used as the input of the visit site prediction model. The visit site prediction model processes the input graph data and outputs the predicted visit sites.
[0042] The constructed hypergraph and the visit location prediction model can be applied to navigation services, tourism, and content recommendation. For example, in navigation services, the system can predict a user's next visit location and display relevant information, such as navigation information, on a map. In tourism, based on the predicted next visit location, it can push relevant tourism information to the user. In content recommendation, the recommended content can include lifestyle information, food recommendations, etc. Thus, based on the predicted visit location, it can push content related to that visit location to the user.
[0043] Figure 1 A flowchart of an example 100 of a hypergraph construction method according to an embodiment of this specification is shown.
[0044] like Figure 1 As shown, at 110, user location access data can be collected.
[0045] In the embodiments of this specification, the collected site access data is historical data, and each site access data is used to represent information about the various sites visited by the user. Site access data may include user information and visited site information. User information may include user name, identifier, etc. Site information is used to characterize each location point and may include a site identifier, which can be represented by a POI (point of interest). In one example, site information may also include site attributes, which may include latitude and longitude, type, and the business district to which it belongs. For example, site attributes may include hotels, supermarkets, restaurants, stadiums, and office spaces. Site attributes can correspond one-to-one with site identifiers. In one example, site access data may also include time information and the latitude and longitude information corresponding to each site. Time information can be used to indicate the time when the user visited each site.
[0046] In 120, access time trajectories for each user can be constructed in the time dimension based on location access data.
[0047] In the embodiments of this specification, each access time trajectory is a site access trajectory for a single user, and multiple access time trajectories can be constructed for each user. Each access time trajectory can consist of multiple site access behaviors ordered by time. Each site access behavior can include user information, site information, and time information, used to represent the behavior of the user, represented by the user information, accessing the site, represented by the site information.
[0048] In each access time trajectory, the access behaviors at each site can be arranged in chronological order. The access behaviors of two adjacent sites occur sequentially, indicating that after a user visits one site, they immediately visit the other site.
[0049] Figure 2 A schematic diagram illustrating an example of constructing an access trail according to an embodiment of this specification is shown. Figure 2 As shown, the access time trajectories of two users (A and B) are listed, where l1, l2, l3, l4, l5, l6, l7, l8, l9, and l 10 These represent the locations. User A's access timeline (dark line) is: first accessing l1, then l2, l3, l5, and l6, and finally l7. User B's access timeline (light line) is: first accessing l... 10 Then visit l9, l8, l5, l4 and l6, and finally visit l7.
[0050] In one approach, site access data can be filtered by user to create site access datasets for each user. For each user's site access dataset, the data can be arranged chronologically, representing the temporal order of the site access actions corresponding to each data point.
[0051] In one example, for each user's site access dataset, the site access data in the dataset are arranged in chronological order. The resulting site access behavior sequence can include several site access behaviors. This site access behavior sequence can be divided into multiple subsequences, each of which is a constructed access time trajectory.
[0052] For the segmentation of site visit behavior sequences, segmentation can be performed according to the sequence order. The site visit behaviors included in each access time trajectory obtained through segmentation are also arranged in chronological order.
[0053] In one segmentation method, it can be ensured that the number of access time trajectories constructed for each user meets a specified quantity condition, such as not less than a specified quantity threshold. For example, it can be preset that the number of access time trajectories constructed for each user is not less than 10, then for each user, the corresponding site access behavior sequence needs to be segmented into at least 10 sub-sequences.
[0054] In another segmentation method, it can be ensured that the number of site visits included in each constructed access time trajectory meets a first quantity threshold condition. The first quantity threshold condition can be set to a maximum and / or a minimum value. When the first quantity threshold condition is met, it can be less than the maximum value, greater than the minimum value, or greater than the minimum value and less than the maximum value. For example, if the maximum value is 10 and the minimum value is 2, then the number of site visits included in each access time trajectory is required to be greater than 2 and less than 10.
[0055] In another segmentation method, the site visit behavior sequence can be segmented according to a specified quantile. For example, if the quantile is 20, the site visit behavior sequence can be divided into 20 equal parts, each part representing a visit time trajectory. In this segmentation method, the same segmentation method, i.e., the same quantile, can be used for all users.
[0056] In another segmentation method, the site access behavior sequence can be segmented based on the time interval between two adjacent site access behaviors of the same user in the time dimension, so as to construct the access time trajectory for each user in the time dimension. In the site access behavior sequence, the time interval between adjacent site access behaviors represents the time interval between the occurrence of the two site access behaviors.
[0057] When the time interval is short, the correlation between two adjacent site visits can be considered high; when the time interval is long, the correlation between two adjacent site visits can be considered low. Therefore, by using the time interval between two adjacent site visits in the time dimension, highly correlated site visits can be grouped together to form a visit time trajectory.
[0058] Figure 3 A schematic diagram illustrating an example of obtaining an access time trajectory by segmentation according to an embodiment of this specification is shown. Figure 3 The access time trajectory shown is in Figure 2 It is derived from this. For example... Figure 3 As shown, user A's access time trajectory (represented by the dark line) is as follows: first accessing l1, then l2, l3, l5, and l6, and finally l7. Therefore, the access time trajectory represented by the site access behavior is: and Among them, site access behavior The corresponding accessed site is l1, and the site access behavior is... The corresponding accessed site is l2, and the site access behavior is... The corresponding accessed site is l3, and the site access behavior is... The corresponding accessed site is l5, and the site access behavior is... The corresponding accessed site is l6, and the site access behavior is... The corresponding accessed site is l7. If the time interval threshold is 3 hours, because of the site access behavior... and If the time interval between them is greater than 3 hours, then it can be divided into two access time trajectories. and in, as well as Constructing the first access time trajectory and Constructing a second access time trajectory
[0059] Correspondingly, user B's site access behavior The corresponding accessed site is l 10 Site access behavior The corresponding accessed site is l9, and the site access behavior is... The corresponding accessed site is l8, and the site access behavior is... The corresponding accessed site is l5, and the site access behavior is... The corresponding accessed site is l4, and the site access behavior is... The corresponding access location is l6. For user B, the access time trajectory can be divided into two parts based on a time interval threshold of 3 hours. and Among them, site access behavior as well as Constructing the first access time trajectory Site access behavior and Constructing a second access time trajectory
[0060] In one example, the time interval used as the dividing factor can be customized. For instance, if the time interval is 3 hours, then the visit behaviors of two adjacent sites with a time interval of less than 3 hours will be classified into the same visit time trajectory. The visit behaviors of two adjacent sites with a time interval of not less than 3 hours will be classified into two different visit time trajectories.
[0061] In another example, the time interval can also be determined based on a first quantity threshold condition. Time intervals that satisfy the first quantity threshold condition can be statistically analyzed based on historical data, and these time intervals can then be used as the time intervals for subsequently segmenting the site access behavior sequence. Thus, by constructing access time trajectories for each user in the time dimension based on the time intervals between two temporally adjacent site access behaviors of the same user, the number of site access behaviors included in each constructed access time trajectory can satisfy the first quantity threshold.
[0062] In 130, the correlation between the constructed individual access time trajectories can be determined based on users and / or locations.
[0063] In one example, the correlation between the constructed access time trajectories can be determined based on the user. In this example, the access time trajectories for the same user are correlated. Figure 2 and Figure 3 For example, user A's access time trajectory and There is a correlation between them.
[0064] In this example, the two access time trajectories that are related are because they are for the same user, so the correlation can be identified as intra-user collaborative correlation, which is used to represent the correlation between two access trajectories for the same user.
[0065] In a user-based example, based on determining the correlation based on users, we can first determine the trajectory similarity between each access time trajectory, and then determine the correlation between each access time trajectory based on the trajectory similarity.
[0066] In this example, the trajectory similarity between the constructed access time trajectories can be determined based on the user and the time window difference between each access time trajectory. The time window for each access time trajectory can be determined based on the time corresponding to the first access behavior and the time corresponding to the last access behavior in that access time trajectory.
[0067] In one method of determining the time window, the time interval between the time corresponding to the first site visit and the time corresponding to the last site visit can be used as the time window for the access time trajectory. In another method of determining the time window, the average time between the time corresponding to the first site visit and the time corresponding to the last site visit can be calculated, and this average time can be used as the time window for the access time trajectory.
[0068] In another method of determining the time window, for each access time trajectory, the average value of the time corresponding to the access behavior of each site included in the access time trajectory can be calculated, and the average value can be used as the time window of the access time trajectory.
[0069] After obtaining the time windows for each access time trajectory, for any two access time trajectories, the time window difference between them can be calculated based on their respective time windows. Assuming the two access time trajectories pertain to the same user, if the time window difference is less than a specified threshold, the trajectories are considered to have high similarity; if the time window difference is not less than the specified threshold, the trajectories are considered to have low similarity. Two access time trajectories with high similarity can be considered correlated, while two access time trajectories with low similarity can be considered uncorrelated.
[0070] For example, if the specified time window difference threshold is 1 year, and the time windows for two access time trajectories of user A are in 2022 and 2019, and the time window difference between the two access time trajectories is greater than 1 year, it can be determined that the trajectory similarity between the two access time trajectories is low, and thus it can be determined that the two access time trajectories are not related.
[0071] In another user-based example, the trajectory similarity between the constructed access time trajectories can be determined based on the user and the location overlap between the various access time trajectories.
[0072] Site overlap is used to represent the number of identical sites included in different access time trajectories. The more identical sites included, the higher the site overlap; the fewer identical sites included, the lower the site overlap.
[0073] For any two access time trajectories of the same user, the higher the overlap of the locations, the higher the similarity of the two access time trajectories; the lower the overlap of the locations, the lower the similarity of the two access time trajectories.
[0074] In this example, access time trajectories with high trajectory similarity can be identified as related. Alternatively, location overlap can be disregarded; as long as the access time trajectories for the same user are related, a correlation can be determined.
[0075] In one example, the correlation between the constructed access time trajectories can be determined based on the location. In this example, if the same location exists in two access time trajectories, then a correlation can be determined between the two access time trajectories.
[0076] In this example, the two access time trajectories are associated because they contain the same location, indicating that the users corresponding to the two access time trajectories have visited the same location. Thus, the association can be identified as a user-to-user collaborative association, which is used to represent the association between two access trajectories that include the same location.
[0077] In a site-based example, based on determining the correlation based on the site, the trajectory similarity between each access time trajectory can be determined first, and then the correlation between each access time trajectory can be determined based on the trajectory similarity.
[0078] In this example, the trajectory similarity between the constructed access time trajectories can be determined based on the loci and the time window difference between each access time trajectory. The time window for each access time trajectory can be determined based on the time corresponding to the first locus access behavior and the time corresponding to the last locus access behavior in the access time trajectory, or it can be determined based on the time corresponding to the access behaviors of each locus included in the access time trajectory.
[0079] Based on two access time trajectories containing the same location, if the time window difference is less than a specified time window difference threshold, the trajectory similarity between the two access time trajectories can be determined to be high; if the time window difference is not less than the specified time window difference threshold, the trajectory similarity between the two access time trajectories can be determined to be low. Two access time trajectories with high trajectory similarity can be determined to be correlated, while two access time trajectories with low trajectory similarity can be determined to be uncorrelated.
[0080] In another user-based example, the trajectory similarity between the constructed access time trajectories can be determined based on the location and the degree of location overlap between the various access time trajectories.
[0081] For two different access time trajectories, the more common the locations of the same loci, the higher the locus overlap; conversely, the fewer common locations, the lower the locus overlap. In this example, higher locus overlap indicates higher trajectory similarity between the two access time trajectories, while lower locus overlap indicates lower trajectory similarity. Therefore, access time trajectories with high similarity can be identified as correlated, while two access time trajectories with low similarity are not correlated.
[0082] In one example, the correlations between the constructed access time trajectories can be determined based on users and locations. These correlations can include intra-user collaborative correlations and inter-user collaborative correlations.
[0083] Based on users and locations, in one example, the trajectory similarity between the constructed access time trajectories can be determined based on users, locations, and the time window difference between each access time trajectory; and the correlation between the access time trajectories can be determined based on the determined trajectory similarity.
[0084] In another example, the trajectory similarity between the constructed access time trajectories can be determined based on the overlap between users and locations, as well as between locations in the access time trajectories; and the correlation between the access time trajectories can be determined based on the determined trajectory similarity.
[0085] In another example, the trajectory similarity between the constructed access time trajectories can be determined based on the time window difference and site overlap between users and sites, as well as between the access time trajectories; and the correlation between the access time trajectories can be determined based on the determined trajectory similarity.
[0086] Figure 4 A schematic diagram illustrating an example of determining the correlation between various access time trajectories according to embodiments of this specification is shown. Figure 4 As shown, multiple site visits contained within the same circle constitute an access time trajectory. Each circle represents an access time trajectory, meaning each circle corresponds to an edge in the hypergraph, and each site visit constitutes a regular node in the hypergraph. A hyperedge can consist of multiple nodes. The intersection of two circles indicates that there is intra-user collaborative association between the two access time trajectories represented by the two circles. as well as Constructing access time trajectory with by and Constructing access time trajectory Because they are related to the same user A, they have intra-user collaborative relationships. and Constructing access time trajectory with by and Constructing access time trajectory They exhibit inter-user co-association because they share the same locus l6 and are targeted at different users.
[0087] Back Figure 1 In 140, a hypergraph can be constructed based on correlations and access trajectory nodes used to characterize access trajectories, so that the hypergraph can be combined with a site prediction model for use in site prediction when the site prediction model makes predictions based on the correlations in the hypergraph.
[0088] In the embodiments of this specification, each access trajectory node corresponds one-to-one with an access trajectory, and each access trajectory node is used to represent the corresponding access trajectory. An access trajectory may include an access time trajectory; when an access trajectory only includes an access time trajectory, the access trajectory nodes used to construct the hypergraph are used to represent the access time trajectory.
[0089] Furthermore, the access trajectory may also include an access spatial trajectory, in which case the access trajectory nodes are used to represent either the access time trajectory or the access spatial trajectory. Alternatively, the access trajectory may only include an access spatial trajectory, in which case the access trajectory nodes are used to represent the access spatial trajectory. These embodiments are described in detail below.
[0090] When the access trajectory only includes access time trajectories, each access time trajectory can be represented by access trajectory nodes. For each access trajectory node, two related access trajectory nodes can be connected to form a connection graph representing the relationships between access trajectory nodes. Furthermore, each access trajectory node is associated with the access behaviors of each site included in the represented access time trajectory; this association, together with the connection graph, constitutes a hypergraph.
[0091] Figure 5 A schematic diagram illustrating an example of a hypergraph constructed according to embodiments of this specification is shown. Figure 5 As shown, the constructed hypergraph can include two parts: the first part represents the access time trajectory based on site access behavior, and the second part represents the access trajectory nodes. The second part can be considered as a higher-level structure than the first part.
[0092] The hypergraph constructed through the embodiments of this specification not only represents the access time trajectory for each user, but also reflects the correlation between access time trajectories. Access time trajectories and correlations are latent information in site access data, which is beneficial for more accurate site access prediction.
[0093] In one example, when the identified associations include intra-user collaborative associations and inter-user collaborative associations, a hypergraph can be constructed based on intra-user collaborative associations, inter-user collaborative associations, and access trajectory nodes. In the constructed hypergraph, intra-user collaborative associations and inter-user collaborative associations are represented as two different association relationships.
[0094] by Figure 5 For example, in the connection diagram of each access trajectory node, solid lines represent intra-user collaborative relationships, and dashed lines represent inter-user collaborative relationships.
[0095] In one example, after determining the correlation between access time trajectories, the time difference between two correlated access time trajectories can be determined.
[0096] The time difference can be the time window difference between the time windows corresponding to two access time trajectories, or it can be the time difference between access behaviors at specific sites within two access time trajectories. In one example, the access behaviors at specific sites within each access time trajectory can be access behaviors at sites in a specified order within that access time trajectory; for example, the access behaviors at specific sites can include the first access behavior at a site, the last access behavior at a site, etc. Figure 5 For example, the time difference between two access time trajectories can be represented by Δt.
[0097] After determining the time difference between two related access time trajectories, a hypergraph can be constructed based on the correlation and the determined time difference. In the constructed hypergraph, information about the time difference between the two related access time trajectories is presented. For example... Figure 5 As shown.
[0098] In one example, after determining the correlation between access time trajectories, the spatial distance difference between two correlated access time trajectories can be determined.
[0099] For each access time trajectory, the locations of each point included in that trajectory can be determined, and these locations can be represented by latitude and longitude. Then, the overall location of the access time trajectory can be determined based on the locations of the individual points. In one approach, the locations of the individual points can be averaged; for example, the latitude and longitude of the individual points can be averaged to obtain the average value, which can represent the overall location of the access time trajectory.
[0100] After obtaining the locations corresponding to each access time trajectory, the spatial distance difference can be determined based on the locations of two related access time trajectories. One method is to calculate the difference between the locations of two related access time trajectories; the difference is taken as the spatial distance difference between the two access time trajectories. A larger difference indicates a greater spatial distance difference. Figure 5 For example, the spatial distance difference between two access time trajectories can be represented by Δd.
[0101] After determining the spatial distance difference between two related access time trajectories, a hypergraph can be constructed based on the correlation and the determined spatial distance difference. In the constructed hypergraph, information about the spatial distance difference between the two related access time trajectories is provided. For example... Figure 5 As shown.
[0102] In one example, after determining the correlation between access time trajectories, for two correlated access time trajectories, the temporal and spatial distance differences between them can be determined. Then, a hypergraph can be constructed based on the correlation and the determined temporal and spatial distance differences. In the constructed hypergraph, information about the temporal and spatial distance differences between the two correlated access time trajectories is present. Figure 5 As shown.
[0103] In the examples above, the access time trajectories in the hypergraph not only reflect intra-user and inter-user collaborative relationships, but also the temporal and spatial differences between two related access time trajectories. These relationships can further improve the accuracy of site prediction when the hypergraph is applied to access site prediction.
[0104] In the embodiments of this specification, after the hypergraph is constructed, it can be applied to visitation site prediction scenarios. Specifically, the hypergraph can be used in conjunction with a visitation site prediction model. The relationships between visitation trajectories in the hypergraph (including correlation, temporal differences, and spatial distance differences) can be used as input to the visitation site prediction model. Therefore, the visitation site prediction model can predict visitation sites not only by relying on individual user and site representations, but also by combining the relationship representations between visitation trajectories. This improves the accuracy of visitation site prediction.
[0105] Figure 6 A flowchart of another example 600 of a hypergraph construction method according to another embodiment of this specification is shown.
[0106] like Figure 6 As shown, at 610, user site access data can be collected. This site access data includes user information and information about the sites visited.
[0107] In 620, access time trajectories for each user are constructed over time based on location access data. Each access time trajectory consists of multiple location access behaviors ordered by time, and each location access behavior includes user information and location information.
[0108] Operation of 610 and 620 Figure 1 The operations of 110 and 120 in the illustrated embodiment are the same, and the operation instructions for 110 and 120 can be referred to.
[0109] In 630, access spatial trajectories for each user can be constructed in the spatial dimension based on location access data.
[0110] In this embodiment, each access spatial trajectory is a location access trajectory for a single user, and each user can have multiple access spatial trajectories constructed. Each access spatial trajectory can be composed of multiple location access behaviors aggregated spatially.
[0111] Within each access space trajectory, the access behaviors at each site can be arranged in chronological order. The access behaviors of two adjacent sites are executed sequentially, indicating that after a user visits one site, they immediately visit the other.
[0112] For each user's site access dataset, a site access behavior sequence can be constructed, representing the order in which the user visits various sites. Since the sites visited by a user are spatially different, the site access behavior sequence can be segmented according to the spatial relationships between the sites to obtain multiple access spatial trajectories for the same user. Spatial relationships can include the spatial distances between the sites.
[0113] In one example, it can be ensured that the number of site access behaviors included in each constructed access space trajectory meets a second quantity threshold condition. The second quantity threshold condition can be set to a maximum and / or a minimum value. When the second quantity threshold condition is met, it can be less than the maximum value, greater than the minimum value, or greater than the minimum value and less than the maximum value.
[0114] In another example, an access spatial trajectory for each user can be constructed in the spatial dimension based on site access data and the spatial distances between various access sites of the same user. In the site access behavior sequence, the spatial distance between adjacent site access behaviors represents the distance between the sites corresponding to those two site access behaviors.
[0115] When the spatial distance is short, the correlation between the visit behaviors of two adjacent sites can be considered high; when the spatial distance is long, the correlation between the visit behaviors of two adjacent sites can be considered low. Therefore, by measuring the spatial distance between the visit behaviors of two adjacent sites in the spatial dimension, the visit behaviors of sites with a high degree of correlation can be grouped together to form a visit spatial trajectory.
[0116] In one example, the spatial distance used as the dividing factor can be customized. For instance, if the spatial distance is 10km, then the visit behaviors of two adjacent sites with a spatial distance of less than 10km will be classified into the same visit spatial trajectory. The visit behaviors of two adjacent sites with a spatial distance of not less than 10km will belong to two different visit spatial trajectories.
[0117] In another example, spatial distance can also be determined based on a second quantity threshold condition. Spatial distances that satisfy the second quantity threshold condition can be statistically analyzed based on historical data, and then these spatial distances can be used as the spatial distances for subsequently segmenting site access behavior sequences. Thus, by constructing access spatial trajectories for each user in the spatial dimension based on the spatial distance between two spatially adjacent site access behaviors of the same user, the number of site access behaviors included in each constructed access spatial trajectory can satisfy the second quantity threshold.
[0118] Figure 7 A schematic diagram illustrating an example of obtaining an access space trajectory by segmentation according to an embodiment of this specification is shown. Figure 7 The access space trajectory shown is in Figure 2 It is derived from this. For example... Figure 7 As shown, for user A's access trajectory, if the spatial distance threshold is 10km, because of the location access behavior... The corresponding site l3 and If the spatial distance between corresponding loci l5 is greater than 10km, then it can be divided into two access spatial trajectories. and in, as well as Constitutes the first access space trajectory and Constitutes a second access space trajectory
[0119] Accordingly, for user B, due to site access behavior The corresponding site l8 and If the spatial distance between corresponding loci l5 is greater than 10km, then it can be divided into two access spatial trajectories. and Among them, site access behavior as well as Constructing the first access time trajectory Site access behavior and Constructing a second access time trajectory
[0120] It should be noted that the execution order of 620 and 630 is not limited. Figure 6 The example shown is merely one embodiment.
[0121] In 640, the correlation between the constructed individual access trajectories can be determined based on the user and / or location.
[0122] In this embodiment, the access trajectory includes the access time trajectory and the access space trajectory. The correlation here can include the correlation between the various access time trajectories, the correlation between the various access space trajectories, and the correlation between the access time trajectory and the access space trajectory.
[0123] In one example, the correlation between access spatial trajectories can include intra-user collaborative correlation for representing two access trajectories for the same user and inter-user collaborative correlation for representing two access trajectories that include the same location.
[0124] In one example, the trajectory similarity between the constructed access trajectories is determined based on the user and / or location, as well as the time window difference and / or location overlap between the various access trajectories; and the correlation between the various access trajectories is determined based on the determined trajectory similarity.
[0125] Regarding the correlation between access paths, you can refer to... Figure 1The illustrated embodiment explains the correlation between access time trajectories. Because the difference between access spatial trajectories and access time trajectories lies in the different segmentation methods used, but their composition and source can be the same, the operation for determining the correlation and the corresponding implementation method can also be the same.
[0126] In 650, a hypergraph can be constructed based on correlations and access trajectory nodes used to characterize access trajectories, so that when the hypergraph is combined with an access site prediction model for access site prediction, the access site prediction model makes predictions based on the correlations in the hypergraph.
[0127] This embodiment constructs access trajectories in both spatial and temporal dimensions, enabling the exploration of site access data from different perspectives. This allows for the discovery of various correlations from different viewpoints, which can then be leveraged to improve the accuracy of site access prediction when combined with a hypergraph and site access prediction model.
[0128] Figure 8 A flowchart of an example 800 of a hypergraph construction method according to another embodiment of this specification is shown.
[0129] like Figure 8 As shown, in 810, user site access data can be collected. This site access data can include user information and information about the sites visited.
[0130] In 820, access spatial trajectories for each user are constructed in the spatial dimension based on location access data. Each access spatial trajectory consists of multiple location access behaviors aggregated in space, and each location access behavior includes user information and location information.
[0131] In 830, the correlation between the constructed individual access spatial trajectories is determined based on the user and / or location.
[0132] In 840, a hypergraph is constructed based on correlations and access trajectory nodes used to characterize access spatial trajectories, so that when the hypergraph is combined with the access site prediction model for access site prediction, the access site prediction model makes predictions based on the correlations in the hypergraph.
[0133] In this embodiment, only access space trajectories are constructed, and the determined correlations are only the correlations between individual access space trajectories. This embodiment can refer to the relevant descriptions in the above embodiments; for example, the operation of 810 can be referred to... Figure 1 The operation instructions for 110 shown can be found in the instructions on the correlation between access spatial trajectories.
[0134] In one example, the determined associations may include: intra-user collaborative associations representing two access space trajectories for the same user and / or inter-user collaborative associations representing two access space trajectories that include the same location.
[0135] In one example, for two related access spatial trajectories, the temporal difference and / or spatial distance difference between the two access spatial trajectories can be determined. Then, a hypergraph can be constructed based on the determined correlation, the determined temporal difference and / or spatial distance difference, and the access trajectory nodes used to characterize the access spatial trajectories.
[0136] In one example, based on site access data and the spatial distance between various access sites of the same user, an access spatial trajectory for each user is constructed in the spatial dimension, such that the number of site access behaviors included in each constructed access spatial trajectory satisfies a second quantity threshold condition.
[0137] In one example, determining the correlation between the constructed access spatial trajectories based on users and / or locations includes: determining the trajectory similarity between the constructed access trajectories based on users and / or locations and the time window difference and / or location overlap between the access trajectories; and determining the correlation between the access trajectories based on the determined trajectory similarity.
[0138] Figure 9 A flowchart of an example 900 of a hypergraph-based access site prediction method according to an embodiment of this specification is shown.
[0139] like Figure 9 As shown in Figure 910, the last access trajectory of the user to be predicted can be determined from the constructed hypergraph.
[0140] In this embodiment, the constructed hypergraph can be obtained using any of the methods described in the embodiments for constructing a hypergraph. In the hypergraph, each user's access trajectory can include an access time trajectory and / or an access space trajectory. Each access trajectory can correspond to user information and time information, thereby determining the last access trajectory of the user to be predicted. This last access trajectory is the access trajectory formed by the access point of the user to be predicted most recently at the current time.
[0141] In 920, the hypergraph substructure centered on the target access trajectory node can be obtained from the hypergraph.
[0142] In this embodiment, the target access trajectory node can be used to represent the determined last access trajectory, thereby representing the last access trajectory in the hypergraph using the target access trajectory node. The obtained hypergraph substructure is a partial structure of the entire hypergraph. The hypergraph substructure includes the target access trajectory node and other access trajectory nodes, and each other access trajectory node is connected to the target access trajectory node. The connection methods include direct connection and spaced connection. Figure 5 For example, regarding the representation of access time trajectory Access trajectory nodes are used to represent access time trajectories. The access trajectory node is directly connected to it and is used to represent the access time trajectory. The access trajectory node is connected to it at intervals.
[0143] In one example, in a hypergraph, when there are several access trajectory nodes connected to the target access trajectory node, some of these access trajectory nodes can be selected to form a hypergraph substructure with the target access trajectory node. This selection can be random. That is, other access trajectory nodes connected to the target access trajectory node are randomly determined from the hypergraph, and the hypergraph substructure is obtained from the hypergraph based on the target access trajectory node and the determined other access trajectory nodes.
[0144] In one random selection method, each selection can randomly choose from all access trajectory nodes connected to the target access trajectory node. In another random selection method, when the target access trajectory node is used multiple times to construct hypergraph substructures, before each selection, access trajectory nodes connected to the target access trajectory node that have already been selected to construct hypergraph substructures can be excluded, and then random selection can be made from other access trajectory nodes connected to the target access trajectory node that have not been excluded. By randomly selecting access trajectory nodes used to form hypergraph substructures, different access trajectory nodes can be selected to form different hypergraph substructures for the same target access trajectory node, thereby improving the robustness of access site prediction.
[0145] In one example, the number of access trajectory nodes used to form the hypergraph substructure can be specified. This allows a specified number of other access trajectory nodes connected to the target access trajectory node to be randomly determined from the hypergraph. For example, if the number of access trajectory nodes forming the hypergraph substructure is specified as 50, then 49 other access trajectory nodes connected to the target access trajectory node need to be randomly determined from the hypergraph.
[0146] In one example, when all other access trajectory nodes in the hypergraph substructure are directly connected to the target access trajectory node, all access trajectory nodes directly connected to the target access trajectory node can be identified in the hypergraph, and then a specified number of access trajectory nodes for forming the hypergraph substructure can be randomly selected from all directly connected access trajectory nodes.
[0147] In another example, when the connection methods between other access trajectory nodes in the hypergraph substructure and the target access trajectory node include direct connection and interval connection, all access trajectory nodes that are directly connected and interval connected to the target access trajectory node can be identified in the hypergraph. Then, a specified number of access trajectory nodes for forming the hypergraph substructure can be randomly selected from all the access trajectory nodes that are directly connected and interval connected.
[0148] For interval connections, they can be categorized in several ways based on the number of access trajectory nodes in the interval. For example, the number of access trajectory nodes in an interval is 1. This could represent an access time trajectory. Access trajectory nodes and those used to characterize access time trajectories The access trajectory nodes are connected at intervals, and the number of interval access trajectory nodes is 1.
[0149] A threshold for the number of access trajectory nodes at intervals can be set. Interval connections with fewer than this threshold are identified as valid interval connections for the target access trajectory node. Therefore, all access trajectory nodes directly connected to the target access trajectory node and those with valid interval connections can be identified in the hypergraph.
[0150] For example, if the quantity threshold is 2, then an interval connection with a minimum number of access trajectory nodes is a valid interval connection; that is, an interval connection that is one access trajectory node away from the target access trajectory node is a valid interval connection. For example, representing access time trajectories... Access trajectory nodes and those used to characterize access time trajectories The access trajectory nodes are valid interval connections.
[0151] In 930, the hypergraph substructure can be input into the access site prediction model so that the access site prediction model outputs the predicted site.
[0152] In this embodiment, the access site prediction model can be trained using a hypergraph as training samples. Furthermore, the hypergraph can be dynamically updated over time; the hypergraph used as training samples to train the access site prediction can be a slice of the hypergraph at a specific moment. The hypergraph can also be dynamically updated subsequently, and the hypergraph model can be trained based on this and applied to the site prediction service.
[0153] Figure 10A schematic diagram illustrates an example of how an access site prediction model, according to an embodiment of this specification, processes a hypergraph substructure. For example... Figure 10 As shown, the access site prediction model may include a vector representation layer, a collaborative fusion layer, and a fully connected layer.
[0154] Figure 11 A flowchart of an example 1100 of processing a hypergraph substructure using an access site prediction model according to an embodiment of this specification is shown.
[0155] like Figure 11 As shown in Figure 931, the hypergraph substructure can be input into the access site prediction model.
[0156] In 933, in the visit site prediction model, the vector representation layer can perform vector representation on the input hypergraph substructure to obtain the node vector representation of each visit trajectory node in the hypergraph substructure.
[0157] In this example, the vector representation layer can represent the site access behavior and access trajectory of the user to be predicted and other users respectively using vector representation.
[0158] In one example, the vector representation layer may include an ID representation layer, an aggregation layer, and a Hypergraph Transformer (HT) convolutional layer. The output of the ID representation layer is connected to the input of the aggregation layer, and the output of the aggregation layer is connected to the input of the Hypergraph Transformer convolutional layer.
[0159] First, the ID representation layer can perform vector representation of the element information included in each site access behavior in the input hypergraph substructure to obtain the corresponding element information vector. For example, when the element information included in the site access behavior is user information, site information, and time information, the element information vectors corresponding to user information and site information can be obtained. When the element information included in the site access behavior is user information, site information, and site type, the element information vectors corresponding to user information, site information, and site type can be obtained.
[0160] Then, the ID representation layer inputs the element information vector to the aggregation layer. The aggregation layer aggregates the element information vectors corresponding to the element information included in each site access behavior to obtain the site access behavior vector corresponding to each site access behavior.
[0161] The vector representation layer can include multiple hypergraph Transformer convolutional layers, each corresponding to a single access trajectory. That is, each hypergraph Transformer convolutional layer generates the access trajectory vector for its corresponding access trajectory. Parameters can be shared among the various hypergraph Transformer convolutional layers in the vector representation layer.
[0162] Next, after generating the site access behavior vectors, the aggregation layer can input the site access behavior vectors corresponding to the site access behaviors that constitute the same access trajectory to the corresponding hypergraph Transformer convolutional layer. The hypergraph Transformer convolutional layer performs vector fusion processing on the input site access behavior vectors to obtain the node vector representation of the access trajectory nodes used to represent the access trajectory.
[0163] In 935, the node vector representation and the association between the target access trajectory node and other access trajectory nodes in the hypergraph substructure can be input to the collaborative fusion layer, and the collaborative fusion layer outputs the target node vector representation corresponding to the target access trajectory node.
[0164] The collaborative fusion layer can be composed of multiple hypergraph Transformer convolutional layers. The relationships input to the collaborative fusion layer can include: collaborative relationship type (including intra-user collaborative relationship and inter-user collaborative relationship), temporal differences, and spatial distance differences.
[0165] In the collaborative fusion layer, the node vector representation of the target access trajectory node can be fused with the node vector representations of other access trajectory nodes to output a new node vector representation corresponding to the target access trajectory node as the target node vector representation. The output target node vector representation not only fuses the node vector representation used to represent the target access trajectory node itself, but also fuses the vector features of the association relationships related to the target access trajectory node.
[0166] Figure 12 A schematic diagram illustrating an example of a hypergraph Transformer convolutional layer in a collaborative fusion layer according to an embodiment of this specification is shown. Figure 12 As shown, in the collaborative fusion layer, the target node vector representation corresponding to the target access trajectory node and the vector representations corresponding to other access trajectory nodes connected to the target access trajectory node are input into the linear layer. The vector representations corresponding to other access trajectory nodes in the input linear layer may include: node vector representations used to represent the other access trajectory nodes themselves. Figure 12The vector representations are denoted by ○, representing time differences and spatial distance differences. In one example, the vector representations of other access trajectory nodes in the input linear layer may also include vector representations of the correlation between each other access trajectory node and the target access trajectory node.
[0167] The linear layer can linearly transform vector representations and then output them as Query, Key, and Value, respectively. Figure 12 The vectors Q, K, and V correspond to respectively. Then, the data passes through an attention mechanism layer. One approach is to use the transpose of the Q and K vectors to obtain the weight of each piece of information. The attention mechanism then calculates the attention weights (association weights) for other access trajectory nodes and the target access trajectory. In one example, multiple attention mechanisms can be used, also known as a multi-head mechanism. Different heads focus on different parts of the vector representation, learning different attention weights, allowing the model to perform more effective multi-angle fusion of vector representations. Finally, a weighted fusion layer is used to weight and fuse the vector representations of other access trajectory nodes, resulting in the fused target trajectory node vector representation.
[0168] In 937, the fully connected layer can represent the output predicted site based on the input target node vector.
[0169] In one example, the input to the fully connected layer may include only the target node vector representation, or it may include the target node vector representation and the node vector representation used to represent the target access trajectory node itself.
[0170] In another example, when the hypergraph includes access time trajectory and access space trajectory, the access trajectory nodes corresponding to the access time trajectory and access space trajectory can respectively perform vector representation operations. The vector representation operations for the access time trajectory and access space trajectory can both perform operations 931 to 935, and can both output the target node vector representation corresponding to the target access trajectory node.
[0171] In this example, the input to the fully connected layer may include the target node vector representation output for the access time trajectory and the target node vector representation output for the access space trajectory, or it may include the target node vector representation output for the access time trajectory, the target node vector representation output for the access space trajectory, the node vector representation used to represent the target access trajectory node itself in the access time trajectory, and the node vector representation used to represent the target access trajectory node itself in the access space trajectory.
[0172] The fully connected layer sorts and predicts the input vector representations and outputs the predicted positions.
[0173] In this embodiment, the hypergraph includes not only user and site features, but also access trajectories formed by user site access behaviors and the correlations between these trajectories, including intra-user collaborative correlations, inter-user collaborative correlations, temporal differences, and spatial distance differences. The access site prediction model can vectorize these correlations, thereby improving the accuracy of access site prediction.
[0174] Figure 13 A block diagram of an example of a hypergraph construction apparatus 1300 according to an embodiment of this specification is shown. Figure 13 As shown, the hypergraph construction device 1300 includes: a data acquisition unit 1310, a trajectory construction unit 1320, a correlation determination unit 1330, and a hypergraph construction unit 1340.
[0175] The data acquisition unit 1310 can be configured to collect user site access data, wherein the site access data includes user information and visited site information.
[0176] The trajectory construction unit 1320 can be configured to construct access time trajectories for each user in the time dimension based on site access data. Each access time trajectory consists of multiple site access behaviors ordered by time, and each site access behavior includes user information and site information.
[0177] The correlation determination unit 1330 can be configured to determine the correlation between the constructed access time trajectories based on users and / or locations.
[0178] The hypergraph construction unit 1340 can be configured to construct a hypergraph based on correlations and access trajectory nodes used to characterize access trajectories, so that when the hypergraph is combined with an access site prediction model for access site prediction, the access site prediction model makes predictions based on the correlations in the hypergraph, wherein the access trajectory includes access time trajectories.
[0179] In one example, the trajectory construction unit 1320 can also be configured to construct, in a spatial dimension, access spatial trajectories for each user based on site access data, wherein each access spatial trajectory consists of multiple site access behaviors aggregated in space. The correlation determination unit 1330 can also be configured to determine the correlation between the constructed access trajectories based on users and / or sites, wherein the access trajectories also include access spatial trajectories.
[0180] In one example, the hypergraph construction apparatus 1300 may further include a difference determination unit, which may be configured to determine, for two related access trajectories, a temporal difference and / or a spatial distance difference between them. The hypergraph construction unit 1340 may also be configured to construct a hypergraph based on the relatedness, the determined temporal difference and / or spatial distance difference, and access trajectory nodes used to characterize the access trajectories.
[0181] In one example, the trajectory construction unit 1320 can also be configured to: construct an access time trajectory for each user in the time dimension based on the site access data and the time interval between two adjacent site access behaviors of the same user in the time dimension, so that the number of site access behaviors included in each constructed access time trajectory satisfies a first quantity threshold condition.
[0182] In one example, the trajectory construction unit 1320 can also be configured to: construct an access spatial trajectory for each user in the spatial dimension based on the site access data and the spatial distance between each access site of the same user, so that the number of site access behaviors included in each constructed access spatial trajectory satisfies a second quantity threshold condition.
[0183] In one example, the correlation determination unit 1330 may also be configured to: determine the trajectory similarity between the constructed access time trajectories based on the user and / or the location and the time window difference and / or the location overlap between the various access time trajectories; and determine the correlation between the various access time trajectories based on the determined trajectory similarity.
[0184] In one example, the correlation determination unit 1330 may also be configured to: determine the trajectory similarity between the constructed access trajectories based on the user and / or the location and the time window difference and / or the location overlap between the access trajectories; and determine the correlation between the access trajectories based on the determined trajectory similarity.
[0185] Figure 14 A block diagram of another example of a hypergraph construction apparatus 1400 according to an embodiment of this specification is shown. Figure 14 As shown, the hypergraph construction device 1400 includes: a data acquisition unit 1410, a trajectory construction unit 1420, a correlation determination unit 1430, and a hypergraph construction unit 1440.
[0186] The data acquisition unit 1410 can be configured to collect user site access data, wherein the site access data includes user information and visited site information.
[0187] The trajectory construction unit 1420 can be configured to construct an access spatial trajectory for each user in a spatial dimension based on the site access data. Each access spatial trajectory consists of multiple site access behaviors aggregated in space, and each site access behavior includes user information and site information.
[0188] The correlation determination unit 1430 can be configured to determine the correlation between the constructed individual access space trajectories based on users and / or locations.
[0189] The hypergraph building unit 1440 can be configured to build a hypergraph based on correlations and access trajectory nodes used to characterize access spatial trajectories, so that when the hypergraph is combined with an access site prediction model for access site prediction, the access site prediction model makes predictions based on the correlations in the hypergraph.
[0190] Figure 15 A block diagram of an example of a hypergraph-based access site prediction device 1500 according to an embodiment of this specification is shown. Figure 15 As shown, the access site prediction device 1500 includes: a trajectory determination unit 1510, a hypergraph substructure acquisition unit 1520, and a site prediction unit 1530.
[0191] The trajectory determination unit 1510 can be configured to determine the last access trajectory of the user to be predicted from a constructed hypergraph, wherein the hypergraph can be obtained by any of the methods in the embodiments of this specification.
[0192] The hypergraph substructure acquisition unit 1520 can be configured to acquire from the hypergraph a hypergraph substructure centered on the target access trajectory node used to characterize the last access trajectory.
[0193] The site prediction unit 1530 can be configured to input the hypergraph substructure into the access site prediction model so that the access site prediction model outputs the predicted site.
[0194] In one example, the hypergraph substructure acquisition unit 1520 may also be configured to: randomly determine other access trajectory nodes connected to the target access trajectory node used to characterize the last access trajectory from the hypergraph; and acquire the hypergraph substructure from the hypergraph based on the target access trajectory node and the determined other access trajectory nodes.
[0195] In one example, the access site prediction model includes a vector representation layer, a collaborative fusion layer, and a fully connected layer. The site prediction unit 1530 can also be configured to: input a hypergraph substructure into the access site prediction model; in the access site prediction model, the vector representation layer performs vector representation on the input hypergraph substructure to obtain the node vector representation of each access trajectory node in the hypergraph substructure; input the node vector representation and the association relationship between the target access trajectory node and other access trajectory nodes in the hypergraph substructure to the collaborative fusion layer, which outputs the target node vector representation corresponding to the target access trajectory node; and the fully connected layer outputs the predicted site based on the input target node vector representation.
[0196] Reference above Figures 1 to 15 This specification describes embodiments of a hypergraph construction method and apparatus, and a hypergraph-based access site prediction method and apparatus.
[0197] The hypergraph construction apparatus and the hypergraph-based access site prediction apparatus described in this specification can be implemented in hardware, software, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of its host device reading the corresponding computer program instructions from the memory into memory and executing them. In the embodiments of this specification, the hypergraph construction apparatus and the hypergraph-based access site prediction apparatus can, for example, be implemented using electronic devices.
[0198] Figure 16 A block diagram of an electronic device 1600 for implementing a hypergraph construction method according to an embodiment of this specification is shown.
[0199] like Figure 16 As shown, the electronic device 1600 may include at least one processor 1610, a memory (e.g., non-volatile memory) 1620, a RAM 1630, and a communication interface 1640, and the at least one processor 1610, memory 1620, RAM 1630, and communication interface 1640 are connected together via a bus 1650. The at least one processor 1610 executes at least one computer-readable instruction (i.e., the elements implemented in software described above) stored or encoded in the memory.
[0200] In one embodiment, computer-executable instructions are stored in memory that, when executed, cause at least one processor 1610 to: acquire site access data of users; construct access time trajectories for each user in a time dimension based on the site access data; determine the correlations between the constructed access time trajectories based on users and / or sites; and construct a hypergraph based on the correlations and access trajectory nodes used to characterize the access trajectories, such that when the hypergraph is combined with an access site prediction model for use in access site prediction, the access site prediction model makes predictions based on the correlations in the hypergraph.
[0201] Figure 17 A block diagram of an electronic device 1700 for implementing a hypergraph construction method according to an embodiment of this specification is shown.
[0202] like Figure 17 As shown, the electronic device 1700 may include at least one processor 1710, a memory (e.g., non-volatile memory) 1720, a main memory 1730, and a communication interface 1740, and the at least one processor 1710, memory 1720, main memory 1730, and communication interface 1740 are connected together via a bus 1750. At least one processor 1710 executes at least one computer-readable instruction (i.e., the elements implemented in software described above) stored or encoded in the memory.
[0203] In one embodiment, computer-executable instructions are stored in memory that, when executed, cause at least one processor 1710 to: acquire site access data of users; construct access spatial trajectories for each user in a spatial dimension based on the site access data; determine the correlations between the constructed access spatial trajectories based on users and / or sites; and construct a hypergraph based on the correlations and access trajectory nodes used to characterize the access spatial trajectories, such that when the hypergraph is combined with an access site prediction model for use in access site prediction, the access site prediction model makes predictions based on the correlations in the hypergraph.
[0204] Figure 18 A block diagram of an electronic device 1800 for implementing a hypergraph-based access site prediction method, according to an embodiment of this specification, is shown.
[0205] like Figure 18 As shown, electronic device 1800 may include at least one processor 1810, memory (e.g., non-volatile memory) 1820, RAM 1830, and communication interface 1840, and the at least one processor 1810, memory 1820, RAM 1830, and communication interface 1840 are connected together via bus 1850. At least one processor 1810 executes at least one computer-readable instruction (i.e., the elements implemented in software above) stored or encoded in memory.
[0206] In one embodiment, computer-executable instructions are stored in memory that, when executed, cause at least one processor 1810 to: determine the last access trajectory of the user to be predicted from the constructed hypergraph; obtain a hypergraph substructure centered on a target access trajectory node used to characterize the last access trajectory from the hypergraph; and input the hypergraph substructure into an access site prediction model such that the access site prediction model outputs a predicted site.
[0207] It should be understood that the computer-executable instructions stored in memory, when executed, cause at least one processor 1610, 1710, and 1810 to perform the above-described combinations in the various embodiments of this specification. Figure 1-15 The description includes various operations and functions.
[0208] According to one embodiment, a program product, such as a machine-readable medium, is provided. The machine-readable medium may have instructions (i.e., the elements implemented in software as described above), which, when executed by a machine, cause the machine to perform the above-described combinations of the various embodiments of this specification. Figure 1-15 The description includes various operations and functions.
[0209] Specifically, a system or apparatus equipped with a readable storage medium may be provided, on which software program code implementing the functions of any of the embodiments described above is stored, and the computer or processor of the system or apparatus can read and execute the instructions stored in the readable storage medium.
[0210] In this case, the program code itself, which can be read from a readable medium, can perform the functions of any of the above embodiments. Therefore, the machine-readable code and the readable storage medium storing the machine-readable code constitute a part of the present invention.
[0211] The computer program code required for the operation of each part of this manual can be written in any one or more programming languages, including object-oriented programming languages such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB, .NET, and Python; conventional procedural programming languages such as C, Visual Basic 2003, Perl, COBOL 2002, PHP, and ABAP; dynamic programming languages such as Python, Ruby, and Groovy; or other programming languages. This program code can run on the user's computer, or as a standalone software package on the user's computer, or partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer can be connected to the user's computer via any network, such as a local area network (LAN) or wide area network (WAN), or connected to an external computer (e.g., via the Internet), or in a cloud computing environment, or used as a service, such as Software as a Service (SaaS).
[0212] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer or the cloud via a communication network.
[0213] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0214] Not all steps and units in the above process and system structure diagrams are mandatory; some steps or units can be omitted as needed. The execution order of each step is not fixed and can be determined as required. The device structure described in the above embodiments can be a physical structure or a logical structure. That is, some units may be implemented by the same physical entity, or some units may be implemented by multiple physical entities, or they may be jointly implemented by certain components in multiple independent devices.
[0215] The term "exemplary" as used throughout this specification means "serving as an example, instance, or illustration" and does not imply that it is "preferred" or "advantageous" over other embodiments. Detailed descriptions are included for the purpose of providing an understanding of the described techniques. However, these techniques may be practiced without these detailed descriptions. In some instances, well-known structures and apparatuses are shown in block diagram form to avoid obscuring the concepts of the described embodiments.
[0216] The optional embodiments of the present specification have been described in detail above with reference to the accompanying drawings. However, the embodiments of the present specification are not limited to the specific details in the above embodiments. Within the scope of the technical concept of the embodiments of the present specification, various simple modifications can be made to the technical solutions of the embodiments of the present specification, and these simple modifications all fall within the protection scope of the embodiments of the present specification.
[0217] The foregoing description of this specification is provided to enable any person skilled in the art to implement or use the content of this specification. Various modifications to the content of this specification will be apparent to those skilled in the art, and the general principles defined herein can be applied to other variations without departing from the scope of protection of this specification. Therefore, this specification is not limited to the examples and designs described herein, but is consistent with the widest scope of the principles and novel features disclosed herein.
Claims
1. A method for constructing a hypergraph, comprising: Collect user site access data, wherein the site access data includes user information and visited site information; Based on the site access data, access time trajectories for each user are constructed in the time dimension. Each access time trajectory consists of multiple site access behaviors ordered by time, and each site access behavior includes user information and site information. The correlation between the constructed access time trajectories is determined based on users and / or locations; and A hypergraph is constructed based on the aforementioned correlations and access trajectory nodes used to characterize the access trajectory, so that when the hypergraph is combined with an access site prediction model for access site prediction, the access site prediction model makes predictions based on the correlations in the hypergraph. The hypergraph comprises two parts: a first part represents the access time trajectory with site access behavior as the object, and a second part is a connection graph used to represent the correlations between access trajectory nodes. The second part is the upper structure of the first part, and the access trajectory includes the access time trajectory.
2. The method of claim 1, further comprising: Based on the site access data, an access spatial trajectory for each user is constructed in the spatial dimension, wherein each access spatial trajectory consists of multiple site access behaviors aggregated in space; and Determining the correlations between the constructed access time trajectories based on users and / or locations includes: The correlation between the constructed access trajectories is determined based on users and / or locations, wherein the access trajectories also include access space trajectories.
3. The method as described in claim 1 or 2, wherein, The correlation includes: intra-user collaborative correlation for representing two access trajectories for the same user and / or inter-user collaborative correlation for representing two access trajectories that include the same location.
4. The method of claim 3, further comprising: For two access trajectories with the aforementioned correlation, determine the temporal difference and / or spatial distance difference between the two access trajectories; as well as Constructing a hypergraph based on the aforementioned correlation and the access trajectory nodes used to characterize the access trajectory includes: A hypergraph is constructed based on the aforementioned correlation, the determined time differences and / or spatial distance differences, and the access trajectory nodes used to characterize the access trajectory.
5. The method of claim 1, wherein, Based on the aforementioned site access data, constructing access time trajectories for each user over time includes: Based on the site access data and the time interval between two adjacent site access behaviors of the same user in the time dimension, an access time trajectory for each user is constructed in the time dimension, such that the number of site access behaviors included in each constructed access time trajectory meets the first quantity threshold condition.
6. The method of claim 2, wherein, Based on the aforementioned site access data, constructing an access spatial trajectory for each user in the spatial dimension includes: Based on the site access data and the spatial distance between the various access sites of the same user, an access spatial trajectory for each user is constructed in the spatial dimension, such that the number of site access behaviors included in each constructed access spatial trajectory satisfies the second quantity threshold condition.
7. The method of claim 1, wherein, Determining the correlations between the constructed access time trajectories based on users and / or locations includes: Based on users and / or locations, as well as the time window difference and / or location overlap between various access time trajectories, determine the trajectory similarity between the constructed access time trajectories; and The correlation between the various access time trajectories is determined based on the determined trajectory similarity.
8. The method of claim 2, wherein, Determining the correlations between the constructed access trajectories based on users and / or locations includes: Based on users and / or locations, as well as the time window difference and / or location overlap between each access trajectory, determine the trajectory similarity between the constructed access trajectories; and The correlation between the various access trajectories is determined based on the determined trajectory similarity.
9. The method of claim 1, wherein, The site access data also includes site type.
10. A method for constructing a hypergraph, comprising: Collect user site access data, wherein the site access data includes user information and visited site information; Based on the site access data, an access spatial trajectory for each user is constructed in the spatial dimension. Each access spatial trajectory consists of multiple site access behaviors aggregated in space, and each site access behavior includes user information and site information. The correlation between the constructed access spatial trajectories is determined based on users and / or locations; and A hypergraph is constructed based on the aforementioned correlations and access trajectory nodes used to characterize the access spatial trajectory, so that when the hypergraph is combined with the access site prediction model for access site prediction, the access site prediction model makes predictions based on the correlations in the hypergraph. The hypergraph includes two parts: the first part represents the access time trajectory with site access behavior as the object, and the second part is a connection graph used to represent the correlations between access trajectory nodes. The second part is the upper structure of the first part.
11. A hypergraph-based method for predicting visitation sites, comprising: The last access trajectory of the user to be predicted is determined from the constructed hypergraph, wherein the hypergraph is obtained by any one of claims 1-10; Obtain from the hypergraph a hypergraph substructure centered on the target access trajectory node used to characterize the last access trajectory; and The hypergraph substructure is input into the access site prediction model so that the access site prediction model outputs predicted sites.
12. The access site prediction method as described in claim 11, wherein, Obtaining a hypergraph substructure centered on the target access trajectory node used to characterize the last access trajectory from the hypergraph includes: Other access trajectory nodes connected to the target access trajectory node used to characterize the last access trajectory are randomly determined from the hypergraph; and Based on the target access trajectory node and other determined access trajectory nodes, obtain the hypergraph substructure from the hypergraph.
13. The access site prediction method as described in claim 12, wherein, The other access trajectory nodes are directly connected to the target access trajectory node; or... The connection methods between the other access trajectory nodes and the target access trajectory node include direct connection and interval connection.
14. The access site prediction method as described in claim 11, wherein, The access site prediction model includes a vector representation layer, a collaborative fusion layer, and a fully connected layer. The hypergraph substructure is input into the access site prediction model so that the access site prediction model outputs predicted sites including: Input the hypergraph substructure into the access site prediction model; In the access site prediction model, the vector representation layer performs vector representation on the input hypergraph substructure to obtain the node vector representation of each access trajectory node in the hypergraph substructure. The node vector representation and the association relationship between the target access trajectory node and other access trajectory nodes in the hypergraph substructure are input to the collaborative fusion layer, and the collaborative fusion layer outputs the target node vector representation corresponding to the target access trajectory node; and The fully connected layer represents the output predicted position based on the input target node vector.
15. An apparatus for constructing a hypergraph, comprising: The data acquisition unit collects user site access data, wherein the site access data includes user information and visited site information; The trajectory construction unit constructs an access time trajectory for each user in the time dimension based on the site access data. Each access time trajectory consists of multiple site access behaviors ordered by time, and each site access behavior includes user information and site information. The correlation determination unit determines the correlation between the constructed access time trajectories based on users and / or locations; and The hypergraph construction unit constructs a hypergraph based on the correlation and access trajectory nodes used to characterize the access trajectory, so that when the hypergraph is combined with the access site prediction model for access site prediction, the access site prediction model makes predictions based on the correlation in the hypergraph. The hypergraph includes two parts: the first part represents the access time trajectory with site access behavior as the object, and the second part is a connection graph used to represent the correlation between access trajectory nodes. The second part is the upper structure of the first part, and the access trajectory includes the access time trajectory.
16. The apparatus of claim 15, wherein, The trajectory construction unit is further configured to: construct, in a spatial dimension, an access spatial trajectory for each user based on the site access data, wherein each access spatial trajectory consists of multiple site access behaviors aggregated in space; and The correlation determination unit is further configured to determine the correlation between the constructed access trajectories based on users and / or locations, wherein the access trajectories also include access space trajectories.
17. An apparatus for constructing a hypergraph, comprising: The data acquisition unit collects user site access data, wherein the site access data includes user information and visited site information; The trajectory construction unit constructs an access spatial trajectory for each user in the spatial dimension based on the site access data. Each access spatial trajectory consists of multiple site access behaviors aggregated in space, and each site access behavior includes user information and site information. The correlation determination unit determines the correlation between the constructed access spatial trajectories based on users and / or locations; and The hypergraph construction unit constructs a hypergraph based on the correlation and the access trajectory nodes used to characterize the access space trajectory, so that when the hypergraph is combined with the access site prediction model for access site prediction, the access site prediction model makes predictions based on the correlation in the hypergraph. The hypergraph includes two parts: the first part represents the access time trajectory with site access behavior as the object, and the second part is a connection graph used to represent the correlation between access trajectory nodes. The second part is the upper structure of the first part.
18. A hypergraph-based access site prediction device, comprising: A trajectory determination unit determines the last access trajectory of the user to be predicted from the constructed hypergraph, wherein the hypergraph is obtained by any one of claims 1-10; The hypergraph substructure acquisition unit acquires from the hypergraph a hypergraph substructure centered on the target access trajectory node used to characterize the last access trajectory; and The site prediction unit inputs the hypergraph substructure into the access site prediction model so that the access site prediction model outputs predicted sites.
19. An electronic device comprising: At least one processor, a memory coupled to the at least one processor, and a computer program stored on the memory, wherein the at least one processor executes the computer program to implement the method as described in any one of claims 1-14.
20. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as described in any one of claims 1-14.
21. A computer program product comprising a computer program that, when executed by a processor, implements the method as described in any one of claims 1-14.
Citation Information
Patent Citations
User track similarity judgment method and related device
CN110610182A
Infection probability calculation method and device of infectious diseases, storage medium and electronic equipment
CN113744887A
Method and device for predicting motion trail, equipment and storage medium
CN114722232A