Scenic spot ticket recommendation method based on big data

By constructing a binary matrix to calculate the Jaccard similarity and distance, tourists are clustered and core tourists are identified. This solves the problem that the traditional collaborative filtering algorithm is difficult to update the recommendation strategy after the database is updated, and achieves accurate scenic spot ticket recommendations.

CN120256697BActive Publication Date: 2025-09-05SHENZHEN KENAN TECH DEV CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510735296.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-09-05
Estimated Expiration
2045-06-04

AI Technical Summary

Technical Problem

Traditional collaborative filtering algorithms cannot update recommendation strategies in real time after the database is updated, resulting in inaccurate recommendations for scenic spot tickets.

Method used

By constructing a binary matrix to calculate the Jaccard similarity and distance, tourists are clustered, the core tourists and the most popular tourist centers are identified, and the popularity of scenic spots within the cluster is used to recommend tickets for new tourists.

Benefits of technology

It enables accurate recommendations for scenic spot tickets based on a real-time updated database, improving the accuracy and real-time nature of the recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256697B_ABST
    Figure CN120256697B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing, and more specifically to a method for recommending scenic spot tickets based on big data. The method comprises: obtaining the total number of all scenic spot ticket types in a database, constructing a binary matrix based on each tourist's historical scenic spot visit records; calculating the Jaccard similarity between tourists based on the binary matrix, and recording the inverse of the Jaccard similarity between any two tourists as the Jaccard distance between the two tourists; clustering all tourists based on the Jaccard distance, calculating the core tourist degree of the tourists after clustering, and determining the most popular tourist center for each cluster; calculating the popularity of each scenic spot within the cluster containing the most popular tourist center; and when a new tourist appears, finding the cluster to which the new tourist belongs, and recommending scenic spot tickets for the new tourist based on the popularity of all scenic spots in the cluster to which the new tourist belongs. By identifying representative tourists and evaluating the popularity of scenic spots, the present invention provides a more accurate basis for tourist recommendations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and more specifically, to a method for recommending scenic spot tickets based on big data. Background Art

[0002] With rising consumption levels, consumers are no longer satisfied with simple sightseeing tours, but are increasingly focused on in-depth experiences. Tourists are looking for more personalized and convenient services, such as customized itineraries and personalized experience programs.

[0003] The core principle of collaborative filtering algorithms is to analyze user group behavior data to identify similarities between users or items, thereby predicting and recommending items that the target user may be interested in. Jaccard similarity is an optional method for calculating user or item similarity in collaborative filtering, and is particularly suitable for binary implicit feedback data.

[0004] However, when the database is updated (such as when new tourists are added), the traditional collaborative filtering algorithm does not take into account the dynamic changes in tourist groups and the characteristics of different tourist groups, resulting in the inability to make targeted recommendations for the real-time updated database. Summary of the Invention

[0005] In order to solve the technical problem in the above-mentioned prior art that the recommendation strategy is difficult to accurately update after the database is updated, the present invention provides the following technical solution.

[0006] The scenic spot ticket recommendation method based on big data includes:

[0007] Obtain the total number of types of tickets for all scenic spots in the database, and construct a binary matrix based on each tourist's historical scenic spot visit records;

[0008] The Jaccard similarity between tourists is calculated based on the binary matrix, and the inverse of the Jaccard similarity between any two tourists is recorded as the Jaccard distance between the two tourists;

[0009] Clustering all tourists according to the Jaccard distance, calculating the core tourist degree of tourists and determining the most popular tourist center of each cluster after clustering; the core tourist degree is used to characterize the representativeness of tourists in the local area; calculating the popularity of each scenic spot in the cluster where the most popular tourist center is located;

[0010] When a new tourist appears, we find the cluster to which the new tourist belongs and recommend scenic spot tickets for the new tourist based on the popularity of all scenic spots in the cluster to which the new tourist belongs.

[0011] The present invention first constructs a binary matrix by analyzing tourists' historical travel records and calculates Jaccard similarity and distance. Further, clustering based on Jaccard distance (such as hierarchical clustering and DBSCAN) can group tourists with similar behaviors into the same cluster, forming a group of tourists with common preferences, providing a basis for subsequent recommendations; then, by calculating the core tourist degree of each tourist, the most representative tourist in each cluster can be identified, and typical users in the cluster can be located based on the core tourist degree, reflecting the common preferences of the group; finally, by calculating the Jaccard distance between new tourists and each cluster, they are assigned to the most similar group, and using the popularity list of scenic spots in the cluster to which they belong, tickets for scenic spots preferred by the group are preferentially pushed.

[0012] In general, the present invention is conducive to balancing accuracy and coverage by utilizing individual similarity (Jaccard distance) clustering and group preference (intra-cluster popularity) recommendations. As new tourists join and data accumulates, the clustering results and scenic spot popularity can be dynamically adjusted to adapt to changes in preferences, thereby achieving accurate and efficient scenic spot ticket recommendations.

[0013] In one embodiment, constructing a binary matrix based on each tourist's historical scenic spot visit records further includes:

[0014] The entire travel record of each tourist constitutes a tourist point.

[0015] In one embodiment, the clustering uses a DBSCAN algorithm or a K-Means algorithm.

[0016] In one embodiment, the process of obtaining the core visitor degree of the visitor includes:

[0017] For any tourist in any cluster, mark it as the target tourist, calculate the mean and standard deviation of the Jaccard distance between the target tourist and all other tourists, then find all neighboring tourists whose Jaccard distance to the target tourist is less than the set value, and count the number of neighboring tourists;

[0018] The calculation is performed based on the standard deviation and the number of neighborhood tourists in combination with the Gaussian density formula, and the calculation result is used as the core tourist degree of the target tourist.

[0019] Through density-weighted distance calculation, the "coreness" of tourists is quantified as a continuous value, which not only takes into account the number of neighbors, but also optimizes the influence weight of distance through standard deviation and Gaussian function, thereby extracting intra-cluster structure information from the data distribution and providing more refined tourist stratification capabilities for subsequent analysis.

[0020] In one embodiment, determining the most popular visitor center for each cluster includes:

[0021] A core tourist degree threshold is set, and tourists whose core tourist degree is greater than the core tourist degree threshold are regarded as preliminary tourist centers.

[0022] Core visitor degree measures the representativeness and density of visitors within a cluster using metrics such as Jaccard distance. Setting a threshold allows for the selection of highly representative and stable visitors as preliminary visitor centers, ensuring that their behavioral characteristics (such as itineraries and spending habits) represent the mainstream patterns of their cluster.

[0023] In one embodiment, determining the most popular visitor center for each cluster further comprises:

[0024] Obtain the Jaccard distance between the preliminary visitor centers. If the Jaccard distance between any two preliminary visitor centers is greater than the mean of the sum of the standard deviations of the Jaccard distances between these two preliminary visitor centers and all other visitors in their cluster, delete the preliminary visitor center with the smallest core visitor degree.

[0025] Traverse all preliminary visitor centers until there are no more preliminary visitor centers to be deleted, and finally obtain the most popular visitor center for each cluster.

[0026] The standard deviation of the Jaccard distance between the initial visitor center and other visitors in the cluster is calculated to measure the dispersion of the data within the cluster. If the distance between two initial visitor centers exceeds this threshold, it indicates that their difference exceeds the normal fluctuation range within the cluster and may not be suitable for coexistence. By iteratively removing redundant centers, each cluster ultimately retains only one "most popular visitor center", avoiding multi-center conflicts (such as the recommendation system failing to focus on the target group).

[0027] In one embodiment, when a new visitor appears, finding the cluster to which the new visitor belongs includes:

[0028] For new tourists, the Jaccard distance between them and all the identified most popular tourist centers is calculated, and the new tourists are assigned to the cluster with the smallest Jaccard distance corresponding to the most popular tourist center.

[0029] Directly using the existing "most popular tourist centers" as cluster representatives, only the Jaccard distance between new tourists and a small number of center points needs to be calculated, avoiding the re-clustering of all tourists and greatly improving efficiency; when new tourists continue to flow in, this method can gradually expand the clustering results without the need to reconstruct the global model, which is suitable for large-scale data processing.

[0030] In one embodiment, the method of recommending scenic spot tickets to the new tourist based on the popularity of all scenic spots in the cluster to which the new tourist belongs includes:

[0031] From the cluster where the new tourist is located, obtain the popularity of all scenic spots, sort the scenic spots from high to low according to their popularity, and form a scenic spot sequence; traverse each scenic spot in the scenic spot sequence, if the new tourist has visited the scenic spot, continue to traverse the next scenic spot, if the new tourist has not visited the scenic spot, stop traversing; recommend the first unvisited scenic spot ticket to the new tourist.

[0032] By categorizing new visitors into specific clusters (groups), the behavior and preferences of other visitors within that cluster can be used to infer potential interests. Visitors within a cluster share similar characteristics or behavioral patterns, so the popularity of attractions within that cluster can reflect the new visitor's likely preferences. Sorting by popularity and checking each attraction individually to see if the new visitor has already visited it allows for quick identification of the attractions that best match their potential interests and are yet to be experienced. This avoids blind recommendations and ensures that the results are more tailored to the new visitor's actual needs.

[0033] The beneficial effects of the present invention are:

[0034] The present invention introduces the concepts of core tourist degree and the most popular tourist center on the basis of the traditional collaborative filtering algorithm, and combines methods such as density function to carry out more detailed classification and evaluation of tourists, so as to make targeted scenic spot ticket recommendations more accurately based on the real-time updated database. This solves the problem in the existing technology that the recommendation strategy is difficult to accurately update after the database is updated, and improves the accuracy and real-time performance of scenic spot ticket recommendations. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 This is a method flow chart of steps S1 to S4 in the scenic spot ticket recommendation method based on big data in an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, but not all of the embodiments.

[0037] Reference Figure 1 The scenic spot ticket recommendation method based on big data includes steps S1 to S4, which are as follows:

[0038] S1: Obtain the total number of types of tickets for all scenic spots in the database, and construct a binary matrix based on the historical scenic spot visit records of each tourist.

[0039] In one embodiment, the total number of all scenic spots counted in the database is obtained, and each scenic spot corresponds to a ticket type. For example, if the database contains four scenic spots, namely A (e.g., the Forbidden City), B (e.g., the Great Wall), C (e.g., the Summer Palace), and D (e.g., the Temple of Heaven), the number of corresponding ticket types obtained is 4.

[0040] Then, the number of all independent tourists counted is obtained. For example, if the travel records of 1,000 tourists are counted, the corresponding number of independent tourists is 1,000.

[0041] Then, based on the total number of scenic spots and the number of independent tourists obtained above, and by traversing the travel records of each tourist, a binary matrix is ​​constructed, in which rows represent independent tourists (a total of 1000 rows), columns represent each scenic spot (a total of 4 columns), and the value rule is: 1 indicates that the tourist has visited the scenic spot, and 0 indicates that the tourist has not visited the scenic spot.

[0042] It should be noted that, in order to facilitate subsequent analysis, all the tour records of each tourist constitute a tourist point.

[0043] S2: Calculate the Jaccard similarity between tourists based on the binary matrix, and record the inverse of the Jaccard similarity between any two tourists as the Jaccard distance between the two tourists.

[0044] In one embodiment, Jaccard similarity is used to measure the similarity between the behavior patterns of two tourists. For any two tourists, the Jaccard similarity is calculated as the ratio of the number of attractions the two tourists have visited in common to the total number of attractions (union) that the two tourists have visited at least once.

[0045] For example, for tourists 1 and 3, the attractions they visited together are A and C (the number of common attractions is 2), and the attractions they visited at least are A, B, C and D (the number of joint attractions is 3), then the Jaccard similarity is two-thirds and the Jaccard distance is two-thirds.

[0046] By calculating the Jaccard distance, we can quantify the behavioral differences between tourists. If the Jaccard distance between two tourists is small, it means that their behavior patterns are similar and they may have a common interest in similar tourist attractions and activities. They can be grouped together for targeted scenic spot ticket recommendations.

[0047] The above-mentioned calculation method of Jaccard similarity is prior art and will not be described in detail here.

[0048] S3: Cluster all tourists according to the Jaccard distance, calculate the core tourist degree of tourists after clustering and determine the most popular tourist center of each cluster; the core tourist degree is used to characterize the representativeness of tourists in the local area; calculate the popularity of each scenic spot in the cluster where the most popular tourist center is located.

[0049] In one embodiment, an existing clustering algorithm (such as DBSCAN, K-Means, etc.) is used to cluster all tourists according to Jaccard distance to obtain multiple clusters.

[0050] For any tourist in any cluster, mark it as the target tourist, calculate the mean and standard deviation of the Jaccard distance between the target tourist and all other tourists, then find all the neighboring tourists whose Jaccard distance to the target tourist is less than the set value, and count the number of neighboring tourists.

[0051] The above setting value is set to , is the standard deviation of the Jaccard distance between the target tourist and all other tourists in the cluster. In other embodiments, the set value can be dynamically adjusted according to actual data conditions.

[0052] Furthermore, the core tourist degree of the target tourist is calculated according to the Gaussian density formula, which satisfies the following relationship:

[0053]

[0054] Where, Core tourist degree for target tourists, is the total number of tourists in the neighborhood of the target tourist, is the standard deviation of the Jaccard distance between the target tourist and all other tourists in the cluster, For target tourists and their The Jaccard distance between tourists in a neighborhood.

[0055] In the formula, the value of the Gaussian density function decreases with the increase of the Jaccard distance, that is, tourists with higher similarity contribute more to the core tourist degree; the larger the standard deviation, the more dispersed the value of the Gaussian density function; the smaller the standard deviation, the more concentrated the value of the Gaussian density function. The higher the value, the more similar the target tourist is to the neighborhood as a whole and is at the center of the group. The more the scenic spot where the target tourist is located should be recommended; The lower the value, the more likely it is to be a marginal or unique tourist.

[0056] The core tourist degree of all tourists can be calculated in the same way as the core tourist degree of the target tourists mentioned above.

[0057] It is important to consider that tourists with a higher core tourist degree are more likely to represent the typical travel behavior of the cluster they are in. Therefore, by screening the preliminary tourist centers, we can ensure that these tourists are given priority in the subsequent optimization steps, thereby improving the quality of the final results.

[0058] In one embodiment, a core visitor degree threshold is set, and visitors whose core visitor degree is greater than the core visitor degree threshold are used as preliminary visitor centers.

[0059] For example, the core tourist degree threshold is the average number of neighborhood tourists of all tourists divided by an experience value (eg, 5).

[0060] By setting the core visitor degree threshold above, we can ensure that the preliminary visitor centers selected are representative. This threshold can be adjusted according to the characteristics of the actual dataset to adapt to different application scenarios.

[0061] In another embodiment, it is also considered that the initially selected tourist centers may be mistakenly identified as independent centers due to overlapping neighborhoods. For example, two tourists with high core tourist degrees may be initially labeled as different centers due to similar neighborhood tourist distributions, but actually represent the same type of tourist group.

[0062] Therefore, the Jaccard distance between the preliminary visitor centers is obtained. If the Jaccard distance between any two preliminary visitor centers is greater than the mean of the sum of the standard deviations of the Jaccard distances between these two preliminary visitor centers and all other tourists in their clusters, the preliminary visitor center with the smallest core tourist degree is deleted.

[0063] Traverse all preliminary visitor centers until there are no more preliminary visitor centers to be deleted, and finally obtain the most popular visitor center for each cluster.

[0064] Furthermore, to better understand the preferences of tourists within each cluster and provide more accurate scenic spot recommendations, we calculate the popularity of each scenic spot within the cluster where the most popular tourist centers are located. This allows us to provide scenic spot recommendations that better suit tourists' preferences. For example, if a tourist belongs to a certain cluster, they may be more interested in popular scenic spots within that cluster.

[0065] Specifically, for each most popular tourist center, the frequency of scenic spots visited by tourists in its neighborhood is counted, and the number of visits of each scenic spot in each cluster is recorded.

[0066] Calculate the popularity of each scenic spot in the cluster where the most popular tourist center is located, that is, satisfy the relationship:

[0067]

[0068] For the The scenic spot is in The popularity of the cluster where the most popular visitor center is located, The value can be 1, 2, 3, or 4. For the The scenic spot is The number of visits to the cluster where the most popular tourist center is located, For the The mode of tourists included in the cluster of the most popular tourist center, For the The number of times a scenic spot has been visited in the cluster of all the most popular tourist centers, Represents a logarithmic function.

[0069] Then, we can get the popularity of all scenic spots in the cluster where the most popular tourist center is located.

[0070] To sum up, we finally get the most popular tourist center of each cluster obtained by clustering all tourists based on Jaccard distance, as well as the popularity of each scenic spot in all clusters.

[0071] S4: When a new tourist appears, find the cluster to which the new tourist belongs, and recommend scenic spot tickets for the new tourist based on the popularity of all scenic spots in the cluster to which the new tourist belongs.

[0072] In another embodiment, the addition of new tourists is also taken into consideration. That is, for new tourists, the Jaccard distance between them and all the determined most popular tourist centers is calculated, and the new tourists are assigned to the cluster where the corresponding most popular tourist center with the smallest Jaccard distance is located.

[0073] At the same time, every time there are 100 new or updated tourists, the location of the most popular tourist center is recalculated to achieve real-time iterative updates.

[0074] From the cluster where the new tourist is located, obtain the popularity of all scenic spots, sort the scenic spots from high to low according to their popularity, form a scenic spot sequence, traverse each scenic spot in the scenic spot sequence, if the new tourist has visited the scenic spot, continue to traverse the next scenic spot, if the new tourist has not visited the scenic spot, stop traversing; recommend the first unvisited scenic spot ticket to the new tourist.

[0075] Through the above steps, it can be ensured that the scenic spots recommended to new tourists are the most popular and unvisited scenic spots in their cluster, thus achieving accurate recommendations.

[0076] It should be noted that those skilled in the art may make various modifications and improvements without departing from the scope of the present invention, and these modifications and improvements fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be based on the appended claims.

Claims

1. A scenic spot ticket recommendation method based on big data, characterized in that: include: Obtain the total number of types of tickets for all scenic spots in the database, and construct a binary matrix based on each tourist's historical scenic spot visit records; For any two tourists, the ratio of the number of attractions they have visited together to the union of the attractions they have visited at least once is calculated as the Jaccard similarity between the two tourists, and the reciprocal of the Jaccard similarity between any two tourists is recorded as the Jaccard distance between the two tourists; All tourists are clustered according to the Jaccard distance. After clustering, the core tourist degree of the tourists is calculated. Tourists with a core tourist degree greater than the core tourist degree threshold are taken as preliminary tourist centers. The Jaccard distance between the preliminary tourist centers is obtained. If the Jaccard distance between any two preliminary tourist centers is greater than the mean of the sum of the standard deviations of the Jaccard distances between these two preliminary tourist centers and all other tourists in the cluster, the preliminary tourist center with the smallest core tourist degree is deleted. All preliminary tourist centers are traversed until there are no more preliminary tourist centers to be deleted, and finally the most popular tourist center of each cluster is obtained. The core tourist degree satisfies the relationship formula: Where, Core tourist degree for target tourists, is the total number of tourists in the neighborhood of the target tourist, is the standard deviation of the Jaccard distance between the target tourist and all other tourists in the cluster, For target tourists and their The Jaccard distance between neighboring tourists is calculated; the popularity of each scenic spot in the cluster where the most popular tourist center is located is calculated, that is, the relationship is satisfied: ; For the The scenic spot is The popularity of the cluster where the most popular visitor center is located, The value can be 1, 2, 3, or 4. For the The scenic spot is The number of visits to the cluster containing the most popular visitor center, For the The mode of tourists included in the cluster of the most popular tourist center, For the The number of times a scenic spot has been visited in the cluster of all the most popular tourist centers, represents the logarithmic function; When a new tourist appears, calculate its Jaccard distance with all the determined most popular tourist centers, and assign the new tourist to the cluster with the smallest Jaccard distance corresponding to the most popular tourist center. From the cluster where the new tourist is located, obtain the popularity of all scenic spots, sort the scenic spots from high to low according to their popularity, form a scenic spot sequence, traverse each scenic spot in the scenic spot sequence, if the new tourist has visited the scenic spot, continue to traverse the next scenic spot, if the new tourist has not visited the scenic spot, stop traversing; recommend the first unvisited scenic spot ticket to the new tourist.

2. The scenic spot ticket recommendation method based on big data according to claim 1 is characterized in that: The constructing of a binary matrix based on each tourist's historical scenic spot visit records also includes: The entire travel record of each tourist constitutes a tourist point.

3. The scenic spot ticket recommendation method based on big data according to claim 2 is characterized in that: The clustering uses the DBSCAN algorithm or the K-Means algorithm.

Citation Information

Patent Citations

  • Method for recommending scenery spots probably browsed by tourists

    CN103559252A

  • Product recommendation method and device, equipment and medium

    CN114581179A