A tourist privacy protection and recommendation utility balance method and system based on a generative adversarial network

By acquiring tourist behavior sequences and calculating the risk value of trajectory segments, allocating a dynamic privacy budget, and training a generator using a dual discriminator, the conflict between privacy protection and recommendation utility in existing technologies is resolved, achieving a balance between recommendation ranking accuracy and tourist behavior pattern integrity under differential privacy protection.

CN122490582APending Publication Date: 2026-07-31NANJING MOCHOU INTELLIGENT INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING MOCHOU INTELLIGENT INFORMATION TECH CO LTD
Filing Date
2026-05-11
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing trajectory privacy protection technologies based on generative adversarial networks lack a refined representation of behavioral heterogeneity (visit time, stay duration, attraction sensitivity level, geographical location, and opening hours) when dealing with tourist behavior. This leads to a sharp conflict between privacy protection and recommendation utility, and also lacks the ability to dynamically adapt to risks in trajectory segments and constraints on the quality of recommendation ranking of generated sequences.

Method used

By acquiring visitor access sequences, visit times, stay durations, and attraction categories, and combining these with an attraction attribute database, visitor behavior sequences are generated. The risk value of trajectory segments is calculated, and a dynamic privacy budget is allocated. Adversarial training using a dual discriminator is employed to generate proxy visitor sequences, and the generator parameters are updated to achieve a balance between privacy and recommendation utility.

Benefits of technology

It achieves differentiated protection for high-risk leakage links under differential privacy protection, avoids uniform noise addition that would damage recommendation effectiveness, preserves user preferences and access patterns, and improves recommendation accuracy and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122490582A_ABST
    Figure CN122490582A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for balancing tourist privacy protection and recommendation utility based on generative adversarial networks (GANs), relating to the technical field of privacy protection and tourism recommendation systems. The method includes: acquiring tourist behavior sequences and the historical frequency of adjacent visit points; calculating the risk value of trajectory segments and allocating a dynamic privacy budget based on sensitivity level, visit time, and historical frequency; during the training phase, inputting the behavior sequence and privacy budget into a generator to obtain a proxy sequence, which is then processed by a privacy discriminator and a recommendation utility discriminator to obtain the identity re-identification probability and recommendation ranking deviation, respectively; updating the generator parameters by combining category preference loss and adjacent order loss until both indicators are below a preset threshold; and in the recommendation phase, using the trained generator to generate the current proxy sequence and combining it with a scenic spot knowledge graph to generate a recommendation list. This invention achieves an adaptive balance between tourist privacy protection and recommendation utility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of privacy protection and tourism recommendation system technology, and in particular to a method and system for balancing tourist privacy protection and recommendation utility based on generative adversarial networks. Background Technology

[0002] With the widespread adoption of mobile internet, the Internet of Things (IoT), and smart terminals, smart tourism has become an important component of the modern service industry. Location-based personalized attraction recommendation systems can effectively improve the visitor experience and the utilization efficiency of tourism resources by analyzing tourists' historical trajectories, real-time locations, and behavioral habits. However, while providing service utility, such systems inevitably need to collect and process highly sensitive data containing user identity, spatiotemporal information, and behavioral preferences. In recent years, privacy attack techniques targeting trajectory data, such as trajectory association attacks, re-identification attacks, and differential attacks, have become increasingly sophisticated, making simple anonymization or generalization insufficient to defend against powerful adversaries with background knowledge. Differential privacy, as a rigorous mathematical privacy protection framework, provides quantifiable privacy guarantees by adding calibration noise to data or algorithm outputs, and has become a core technology for solving privacy and security issues in this field. However, traditional differential privacy methods, such as the Laplace mechanism or the exponential mechanism, usually allocate a uniform privacy budget to the entire trajectory or the entire dataset, ignoring the significant differences in sensitivity, spatiotemporal specificity and access importance of different segments in the trajectory. This leads to a sharp contradiction between privacy protection and data utility: excessive noise added to protect highly sensitive segments can seriously distort tourist behavior patterns, thereby undermining the accuracy and diversity of recommendation results.

[0003] CN112235787A discloses a location privacy protection method based on generative adversarial networks (GANs). This method employs a location fuzzing mechanism to perturb the user's real location when the user requests location-based services, and introduces a GAN and a Stackelberg game model to shorten the generation time of the protection mechanism and reduce utility costs. However, this method mainly targets the instantaneous fuzzing of a single location query, lacking modeling of the spatiotemporal coherence in continuous trajectory sequences and the transfer patterns between multiple attractions. Furthermore, it fails to consider the differences in sensitivity levels among different attractions (e.g., the privacy leakage risks of military restricted areas, government offices, and ordinary parks are drastically different), thus failing to maintain the integrity of tourist behavior in sequential recommendation scenarios.

[0004] CN115033915B proposes a differential privacy publishing method for sensitive label trajectory data based on generative adversarial networks. This method identifies sensitive stopping points that reveal sensitive attributes, constructs a directed weighted graph, and introduces a WGAN-GP model to dynamically allocate a privacy budget for noise addition. Although this method pays attention to sensitive labels in the trajectory, its sensitivity assessment mainly relies on the inherent attributes of the stopping points and fails to deeply integrate dynamic temporal constraints such as visitor access time, stay duration, and attraction opening time windows. This results in blind spots in the privacy protection of "abnormal access behavior" (such as visiting highly sensitive locations outside of opening hours). At the same time, the process of restoring the trajectory after adding noise to the graph model may destroy the statistical characteristics of the sequential dependencies between adjacent access points, affecting the effectiveness of subsequent recommendation tasks.

[0005] CN119203212A discloses a differential privacy protection method based on gradient compression generative adversarial networks. This method adds Gaussian noise based on global sensitivity during the discriminator gradient update stage and uses gradient compression and gradient tracing techniques to reduce the amount of noise added and improve the accuracy of synthesized data. However, the privacy budget allocation strategy of this method is still globally static or based on a preset adjustment of training iterations, which cannot accurately respond to the real-time risks of dynamic fluctuations in different trajectory segments in the tourist behavior sequence due to changes in temporal context (such as continuous visits to sensitive areas) and access frequency (such as rare combination paths). More importantly, the above-mentioned existing technologies all limit the optimization objective of the discriminator to distinguishing between real data and generated data, and do not start from the downstream application utility of the recommendation system to establish a quantitative evaluation and constraint mechanism for the quality of the generated sequence recommendation ranking. Summary of the Invention

[0006] The purpose of this section is to outline some aspects of the embodiments of the present invention and to briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section, as well as in the abstract and title of the present application, to avoid obscuring the purpose of this section, the abstract and title of the invention. Such simplifications or omissions shall not be used to limit the scope of the present invention.

[0007] In view of the problems of existing trajectory privacy protection technology based on generative adversarial networks, such as insufficient representation of heterogeneity of tourist behavior (visit time, stay duration, sensitivity level, geographical location, opening hours, etc.), lack of dynamic risk adaptation ability in privacy budget allocation, and lack of direct discriminative constraints on the recommendation utility of generated sequences, this invention is proposed.

[0008] Therefore, the problem to be solved by this invention is how to achieve an effective balance between the accuracy of recommendation ranking and the integrity of tourist behavior patterns by fusing multimodal spatiotemporal behavioral features and dynamic risk quantification at the trajectory segment level, while strictly satisfying differential privacy protection.

[0009] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, embodiments of the present invention provide a method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks, comprising, The system obtains visitor access sequences, visit times, stay durations, and attraction categories, and calls the attraction attribute library to obtain the sensitivity level, geographical location, and opening hours of each access point, generating visitor behavior sequences; it also calculates the historical frequency of adjacent access point combinations in the visitor behavior sequences based on historical visitor trajectory sets. The risk value of a trajectory segment is calculated based on the sensitivity level, access time, and historical frequency of occurrence, and a dynamic privacy budget is allocated based on the risk value of the trajectory segment. During the training phase, the tourist behavior sequence and dynamic privacy budget are input into the generator network to generate the proxy tourist sequence. The proxy tourist sequence is then input into the privacy discriminator and the recommendation utility discriminator to obtain the identity re-identification probability and recommendation ranking bias. The generator parameters are updated based on the identity re-identification probability, recommendation ranking deviation, category preference loss, and adjacent order loss until the identity re-identification probability is lower than the preset re-identification threshold and the recommendation ranking deviation is lower than the preset deviation threshold, thus obtaining the trained generator. During the recommendation phase, the current tourist behavior sequence and dynamic privacy budget are input into the trained generator to obtain the current agent tourist sequence. Based on the current agent tourist sequence, candidate attractions are selected from the attraction knowledge graph to generate a tourist recommendation list.

[0010] Secondly, embodiments of the present invention provide a system for balancing visitor privacy protection and recommendation utility based on generative adversarial networks, comprising: The behavior sequence construction and statistics module is used to obtain tourist visit sequences, visit times, stay durations, and attraction categories, and to call the attraction attribute library to obtain the sensitivity level, geographical location, and opening hours of each visit point to generate tourist behavior sequences; it also counts the historical frequency of adjacent visit point combinations in tourist behavior sequences based on historical tourist trajectory sets. The dynamic privacy budget allocation module is used to calculate the risk value of a trajectory segment based on the sensitivity level, access time, and historical frequency of occurrence, and to allocate a dynamic privacy budget based on the risk value of the trajectory segment. The dual-discriminator adversarial generation module is used to input tourist behavior sequences and dynamic privacy budgets into the generator network during the training phase to generate proxy tourist sequences. The proxy tourist sequences are then input into the privacy discriminator and the recommendation utility discriminator, respectively, to obtain the identity re-identification probability and recommendation ranking bias. The generator parameter update module is used to update the generator parameters based on the identity re-identification probability, recommendation ranking deviation, category preference loss and adjacent order loss until the identity re-identification probability is lower than the preset re-identification threshold and the recommendation ranking deviation is lower than the preset deviation threshold, thus obtaining the trained generator. The personalized recommendation output module is used to input the current tourist behavior sequence and dynamic privacy budget into the trained generator during the recommendation stage to obtain the current agent tourist sequence, and select candidate attractions from the attraction knowledge graph based on the current agent tourist sequence to generate a tourist recommendation list.

[0011] Thirdly, embodiments of the present invention provide a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement any step of the above-described method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks.

[0012] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the above-described method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks.

[0013] Compared with existing technologies, the beneficial effects of this invention are as follows: By calculating and allocating dynamic privacy budgets based on the risk values ​​of trajectory segments, differentiated protection is achieved for high-leakage-risk links, avoiding uniform noise addition that could damage recommendation utility; by leveraging dual discriminators for privacy and utility to counteract training and constraints of category preference and adjacent order loss, the generator retains user preferences and access patterns while concealing its identity, achieving a balance between privacy and recommendation; by utilizing proxy sequences to infer candidate attractions in the knowledge graph and introducing privacy penalty terms and opening time matching, recommendation accuracy is improved while ensuring security and timeliness. Attached Figure Description

[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 A flowchart of a method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks; Figure 2 This is a structural diagram of a method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks. Detailed Implementation

[0015] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0016] Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without inventive effort should fall within the scope of protection of this invention.

[0017] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0018] As mentioned in the background section, existing trajectory privacy protection technologies based on generative adversarial networks (GANs) suffer from the following shortcomings: First, they lack refined characterization and fusion of the heterogeneity of individual tourist behavior in continuous spatiotemporal trajectories (including visit time, stay duration, attraction sensitivity level, geographical location, and opening time constraints), making it difficult to accurately quantify the risks of different trajectory segments. Second, the allocation of privacy budgets is mostly globally uniform, statically allocated based on sensitive labels, or preset adjustments based on training iterations, failing to adaptively differentiate allocation based on the dynamic risk values ​​of trajectory segments, leading to a sharp conflict between high privacy protection requirements and high recommendation utility requirements. Third, the optimization objectives of GANs in privacy protection scenarios are relatively singular (only pursuing that the generated data distribution is close to that of real data or satisfies differential privacy), lacking direct constraints and backpropagation adjustment on the ranking deviation of generated sequences in recommendation tasks. This results in the final published proxy tourist sequence, while protecting privacy, losing recommendation value due to the loss of key preference order information. To address these problems, this invention provides a method for balancing tourist privacy protection and recommendation utility based on generative adversarial networks.

[0019] Reference Figures 1-2 , Figure 1 This is a flowchart illustrating a method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks, according to an embodiment of the present invention. Figure 1 As shown, a method for balancing visitor privacy and recommendation utility based on generative adversarial networks includes: S1: Obtain tourist visit sequence, visit time, stay duration and attraction category, and call the attraction attribute library to obtain the sensitivity level, geographical location and opening time of each visit point to generate tourist behavior sequence; calculate the historical frequency of adjacent visit point combinations in the tourist behavior sequence based on the historical tourist trajectory set.

[0020] S1.1: Obtain the current visitor's visit sequence, visit time, stay duration, and attraction category from the visitor's mobile device or scenic area management system.

[0021] Specifically, the visitor access sequence includes several attraction identifiers that visitors visit in chronological order within a preset time window. Each attraction identifier is represented by a unique identifier in the scenic area's unified coding system, and the attraction identifiers are arranged in an ordered sequence according to the order of visit.

[0022] Furthermore, the visit time records the starting time of tourists arriving at each attraction, stored using a timestamp in the format of year, month, day, hour, minute, and second, with time precision down to the minute level; the stay duration records the actual number of minutes tourists stay at each attraction, obtained by calculating the time difference between the start time of the visit and the departure time. When a tourist does not explicitly leave a certain attraction, the visit time of the next attraction is used as the departure time of the current attraction for calculation.

[0023] Furthermore, the attraction category represents the functional attribute classification label of the attraction. Each attraction belongs to one or more categories in a predefined attraction classification system. Attraction categories include, but are not limited to, at least one of the following: natural landscape, historical and cultural, entertainment facilities, catering services, accommodation facilities, shopping areas, and transportation hubs. When an attraction has multiple functional attributes, the main function is selected as the attraction category.

[0024] It should be noted that the preset time window is set according to the typical cycle of the tourism itinerary, preferably 24 hours, 72 hours or 7 days, to define the effective trajectory range of a single tourism activity; when the time interval between two consecutive visits by tourists exceeds 50% of the preset time window length, it is determined to be a different tourism itinerary, and an independent tourist visit sequence is constructed for each tourism itinerary.

[0025] Preferably, the acquired tourist visit sequence is initially screened to remove visit points whose stay duration is less than a preset minimum stay threshold, which is preferably set to three minutes. Visit points with too short a stay duration may be transit points rather than actual tourist destinations, and removing such visit points improves the effectiveness and accuracy of the trajectory data.

[0026] S1.2: Based on the identifiers of each attraction in the visitor access sequence, call the pre-built attraction attribute library to obtain the sensitivity level, geographical location and opening time of each access point.

[0027] Specifically, the scenic spot attribute database stores the static attribute information of all scenic spots within the scenic area. It is organized using a database table structure, with the scenic spot identifier as the primary key index and the attribute information stored as field values. During the call process, a query operation is performed in the scenic spot attribute database through the scenic spot identifier, and the corresponding attribute record is quickly located and returned based on the primary key index.

[0028] Furthermore, the sensitivity level quantifies the degree of privacy leakage risk of scenic spots. A five-level classification system is used to label scenic spots. The five levels are from low to high as Level 1, Level 2, Level 3, Level 4 and Level 5. The higher the value, the higher the privacy sensitivity of the scenic spot. The classification of sensitivity level is determined by a comprehensive evaluation of three dimensions: visitor density, venue privacy and information sensitivity.

[0029] Furthermore, the specific criteria for classifying sensitivity levels: The first level is low-sensitivity attractions, which correspond to public open spaces with a visitor density of more than 500 people per hour, including main squares, main roads of parks, visitor service centers, public rest areas and other densely populated areas. The risk of privacy leakage of visitor information at these attractions is the lowest. The second level is for less sensitive attractions, which correspond to regular tourist attractions with a visitor density between 200 and 500 people per hour. These include general viewing platforms, permanent exhibition halls, monument squares, and other regular tourist areas. These attractions have a certain degree of widespread accessibility. The third level is medium-sensitivity attractions, which correspond to specific interest attractions with a visitor density between 50 and 200 people per hour. These include special exhibition areas of museums, theme parks, and special experience halls that require specific interests or professional backgrounds. Visits to these attractions reflect tourists' interests and preferences. Level 4 is for more sensitive attractions, which correspond to niche attractions or semi-private places with a visitor density of 10 to 50 people per hour. These include areas with fewer visitors, such as meditation areas, VIP lounges, private dining rooms, and private guided tours. Visits to these attractions are highly identifiable by personal characteristics. Level 5 is highly sensitive tourist attractions, which correspond to privacy-sensitive places with a visitor density of less than ten people per hour. These include medical service points, psychological counseling rooms, private customized route attractions, and special needs service areas, etc., where access information to such attractions is highly private. If the visitor information of such attractions is leaked, it may directly expose the health conditions and special needs of tourists.

[0030] It should be noted that the geographical location is represented by a latitude and longitude coordinate system, which includes two components: latitude and longitude. The geographical location of each scenic spot records the coordinate information of its center point or main entrance. The coordinate values ​​are retained to six decimal places, corresponding to a ground positioning accuracy of approximately 0.1 meters. The geographical location information is used to calculate the spatial distance between scenic spots and analyze the spatial distribution characteristics of the trajectory.

[0031] Preferably, the opening hours record the accessible time period of the attraction, including the time period consisting of the start and end opening times; for attractions that are open 24 / 7, the opening hours are set from 00:00 to 23:59; for attractions that are open seasonally or on specific dates, the opening hours include a combination of the valid date range and the specific opening time each day, and support setting different opening hour rules by week, month, or quarter.

[0032] In an optional embodiment, the attraction attribute database is set up with an automatic update mechanism, which synchronizes the latest attraction attribute changes from the central database of the scenic area management system every 24 hours. The synchronized content includes adjustments to opening hours due to temporary park closure for maintenance, temporary changes in sensitivity levels due to large-scale events or a surge in visitor flow, and minor adjustments to geographical locations due to facility renovations. After the attraction attribute database is updated, an attribute rematch operation is triggered for the visitor access sequence being processed to obtain the latest attraction attribute information.

[0033] S1.3: Construct a structured sequence of tourist behaviors.

[0034] Specifically, the tourist visit sequence is associated with each attraction identifier, its corresponding visit time, stay duration, attraction category, and sensitivity level, geographical location, and opening time obtained from the attraction attribute database, generating a tourist behavior sequence with multi-dimensional attributes. The tourist behavior sequence is represented by an ordered list data structure, where each element in the list corresponds to an attraction visited by the tourist. Each element contains seven attribute information, namely attraction identifier, visit time, stay duration, attraction category, sensitivity level, geographical location, and opening time. The seven attribute information are arranged in a fixed order to form attribute tuples, and the attribute tuples of all elements are arranged in the list in order of visit time.

[0035] Furthermore, the visit time of each visit point in the tourist behavior sequence is classified and coded according to time period, dividing the 24 hours of a day into four time periods: early morning (00:00-06:00), daytime (06:00-12:00), afternoon (12:00-18:00), and nighttime (18:00-24:00). Based on the time range to which the visit time of each visit point belongs, a time period label is attached to the visit point, with the time period labels using numbers one to four to identify the four time periods respectively. The time period labels are used to calculate the influence weight of the visit time period on the trajectory risk value.

[0036] Furthermore, the spatial distance between adjacent visit points in the tourist behavior sequence is calculated. Spatial distance represents the straight-line distance between two consecutively visited attractions in terms of geographical location. For the first to the penultimate visit point in the tourist behavior sequence, the spatial distance between each visit point and its next visit point is calculated. The spatial distance is calculated based on the latitude and longitude coordinates of the two attractions and is calculated using the spherical distance calculation formula. The spherical distance calculation formula takes into account the curvature of the Earth and considers the Earth as a sphere with a radius of 6,371 kilometers. The length of the great circle arc on the sphere is calculated using the latitude and longitude coordinates of two points as the spatial distance.

[0037] It should be noted that the specific calculation process of the spherical distance calculation formula is as follows: calculate the square of half the sine of the difference in latitude between the two attractions, then calculate the product of the square of half the sine of the difference in longitude between the two attractions and the product of the cosine of the latitude of the two attractions, add the above two items together and take the square root, finally substitute the result into the arcsine function and multiply by twice the Earth's radius to obtain the spatial distance between the two attractions; the spatial distance is used to determine the spatial continuity of the trajectory and identify abnormal skipping visit behavior.

[0038] Preferably, when there is an access point in the tourist behavior sequence whose access time is earlier than the start time of the corresponding attraction's opening time or later than the end time of the opening time, the access point is marked as having a time anomaly. The time anomaly mark may indicate timestamp errors during the data collection process or that tourists access the attraction during non-open hours through special means. For access points marked with time anomalies, a lower data credibility weight is assigned in subsequent risk assessment and privacy protection processing, or they are removed as suspicious data during the data quality control stage.

[0039] In an optional embodiment, a dwell time deviation index is calculated for each visit point in the tourist behavior sequence. The dwell time deviation index is defined as the ratio of the actual dwell time at the visit point to the historical average dwell time of the attraction. The historical average dwell time is obtained from the attraction attribute database or historical statistics. When the dwell time deviation index is greater than 2 or less than 0.5, the visit point is marked as an abnormal dwell point. Abnormal dwell points may indicate special behavioral patterns of tourists at the attraction, such as far-from-normal in-depth tours or hurried passing through. An additional sensitivity level adjustment coefficient is given to abnormal dwell points in subsequent privacy protection processing.

[0040] S1.4: Based on the time interval and spatial distance between adjacent visit points in the tourist behavior sequence, divide the tourist behavior sequence into several trajectory segments, and calculate the aggregation attribute for each trajectory segment.

[0041] Specifically, time interval thresholds and spatial distance thresholds are set as criteria for trajectory segmentation. The time interval threshold represents the maximum allowed visit interval duration, and the spatial distance threshold represents the maximum allowed distance between attractions. For adjacent visit points in a tourist behavior sequence, the visit time of the next visit point is calculated by subtracting the visit time of the previous visit point from the visit time of the previous visit point and then subtracting the dwell time of the previous visit point to obtain the actual time interval between the two visits. When the actual time interval exceeds the time interval threshold, or the spatial distance between the two visit points exceeds the spatial distance threshold, it is determined that the trajectory is discontinuous at that position, and trajectory segmentation is performed between the previous visit point and the next visit point.

[0042] Furthermore, the time interval threshold is preferably set to 120 minutes, corresponding to the typical duration of tourists' activities such as dining and resting within the scenic area; the spatial distance threshold is preferably set to 5 kilometers, corresponding to the maximum span between different tourist areas within the scenic area; by combining the time interval threshold and the spatial distance threshold, the complete tour process of tourists is divided into multiple trajectory segments that maintain continuity in time and space.

[0043] Furthermore, the set of trajectory segments formed after segmentation contains several trajectory segments, each containing several consecutive access points. The access points within a trajectory segment are sequential in time and the time interval does not exceed a time interval threshold. The spatial distance between adjacent access points does not exceed a spatial distance threshold. A single trajectory segment represents a tourist's continuous tour activity, and the segmentation points between segments represent the interruption of the tourist's activities or a significant change in location.

[0044] It should be noted that a segment sensitivity index is calculated for each trajectory segment. The segment sensitivity index reflects the overall privacy risk level of that trajectory segment. The calculation method for the segment sensitivity index is as follows: multiply the sensitivity level of all access points within the trajectory segment by their corresponding dwell time, sum all the products, and then divide by the total dwell time of all access points within the trajectory segment. The dwell time-weighted average sensitivity level is then obtained as the segment sensitivity index. The higher the segment sensitivity index value, the more highly sensitive attractions the trajectory segment contains or the longer tourists stay at highly sensitive attractions, resulting in a higher risk of privacy leakage.

[0045] Preferably, for a trajectory segment containing only a single access point, the segment sensitivity index is directly equal to the sensitivity level value of that access point; when the dwell time of all access points in the trajectory segment is zero, the segment sensitivity index is calculated using a simple arithmetic average method, which is to sum the sensitivity levels of all access points in the segment and divide by the number of access points.

[0046] In an optional embodiment, a spatial dispersion index is calculated for each trajectory segment. The spatial dispersion index quantifies the degree of geographical dispersion of visitor points within a trajectory segment. The spatial dispersion index is calculated as follows: the average latitude and longitude of the geographical locations of all visitor points within the trajectory segment are calculated as the spatial center of the segment; then, the squared difference in latitude and longitude between the geographical location of each visitor point and the spatial center are calculated; the sum of the squared differences of all visitor points is divided by the number of visitor points; finally, the square root of the result is taken to obtain the spatial dispersion index. The spatial dispersion index is used to identify the activity range of tourists. A trajectory segment with high dispersion indicates that tourists are moving within a large geographical area, which may increase the uniqueness of the trajectory and the risk of identity duplication.

[0047] S1.5: Retrieve the historical tourist trajectory set from the scenic area's data warehouse, and extract all adjacent visit point combinations as the benchmark dataset for frequency statistics. The historical tourist trajectory set contains the tourist behavior sequences of all tourists within the preset historical period.

[0048] Specifically, the preset historical period is determined based on the seasonal variation characteristics of the scenic area's visitor flow and the data storage capacity, and is preferably set to ninety days to cover at least one complete tourist season cycle; the historical tourist trajectory set is read in batches from the scenic area's historical data warehouse, containing the individual tourist behavior sequences of all tourists who have visited the scenic area within the preset historical period, and the data structure of each tourist behavior sequence is consistent with the current tourist behavior sequence generated in the aforementioned steps.

[0049] Furthermore, an adjacent visit point combination is defined as an ordered pair of attractions that are visited consecutively in time in a tourist behavior sequence. An ordered pair of attractions includes two members: a preceding attraction and a following attraction. The preceding attraction is the one visited earlier in time, and the following attraction is the one visited immediately after it. Since the visit order has directional and temporal characteristics, the adjacent visit point combination formed by attraction A and attraction B in sequence is considered to be a different combination type from the adjacent visit point combination formed by attraction B and attraction A in sequence.

[0050] Furthermore, iterate through each historical tourist behavior sequence in the historical tourist trajectory set. For each visit point in each historical tourist behavior sequence, extract the adjacent visit point combination formed by that visit point and its next visit point. Summarize the adjacent visit point combinations extracted from all historical tourist behavior sequences of all historical tourists to form a global adjacent visit point combination set. The global adjacent visit point combination set contains the adjacent attraction visit patterns that all historical tourists actually experienced during the historical period.

[0051] It should be noted that when extracting adjacent access point combinations, only adjacent access points within the same trajectory segment are considered; for access points that cross the boundary of a trajectory segment, due to the temporal or spatial discontinuity between trajectory segments, these access points do not constitute adjacent access point combinations.

[0052] Preferably, the total number of adjacent access point combinations contained in the global adjacent access point combination set is recorded as the global total number of combinations; the global total number of combinations is equal to the sum of the number of adjacent access point combinations in all trajectory segments of all historical tourists, representing the total sample size of adjacent access behaviors in historical data; the global total number of combinations is used as the denominator base for subsequent frequency calculations.

[0053] In an optional embodiment, the global set of adjacent access point combinations is denoised to remove rare adjacent access point combinations that appear less than a preset minimum support threshold. The preset minimum support threshold is preferably set to one-thousandth of the total number of historical visitors, that is, only the attraction combinations that have appeared in at least one-thousandth of the visitor trajectories are retained. The denoising process reduces the interference of noise data and accidental access patterns on frequency statistics, thereby improving the stability and reliability of the statistical results.

[0054] S1.6: Calculate the historical frequency of adjacent visit point combinations in the current tourist behavior sequence.

[0055] Specifically, for each adjacent visit point combination in the tourist behavior sequence, its historical occurrence count is counted in the global adjacent visit point combination set, and the normalized historical occurrence frequency is calculated; each trajectory segment in the tourist behavior sequence is traversed, and for adjacent visit points within each trajectory segment, the attraction identifier pairs of the current adjacent visit point combination are extracted; for each current adjacent visit point combination, a matching count is performed in the global adjacent visit point combination set, and the number of historical combinations that are completely identical to the preceding and following attraction identifiers of the current adjacent visit point combination is counted and recorded as the historical occurrence count of that adjacent visit point combination.

[0056] Furthermore, the historical occurrence frequency is defined as the relative frequency of a specific combination of adjacent visit points in historical trajectory data. The calculation method is as follows: divide the historical occurrence count of the adjacent visit point combination by the total number of global combinations, and the quotient is the historical occurrence frequency of the adjacent visit point combination. The value range of the historical occurrence frequency is a real number greater than zero and less than or equal to one. The larger the value, the more common the attraction combination is in the historical tourist trajectory, and the smaller the value, the rarer it is.

[0057] Furthermore, the historical frequency of all adjacent visit point combinations in the tourist behavior sequence is organized into a frequency sequence according to the visit order, where the length of the frequency sequence is equal to the total number of adjacent visit point combinations in the tourist behavior sequence; the frequency sequence maintains a correspondence with the tourist behavior sequence, and the specific attraction combination corresponding to each frequency value can be traced through the index position.

[0058] Preferably, when a combination of adjacent visit points exists in a tourist behavior sequence that has never appeared in the historical tourist trajectory set, the historical occurrence count of this combination in the global set of adjacent visit point combinations is zero, and the corresponding calculated historical occurrence frequency is zero. Adjacent visit point combinations with a historical occurrence frequency of zero indicate that this visit pattern is a rare or unique visit path in historical data, possessing high trajectory uniqueness characteristics, which may lead to a high risk of identity re-identification. Laplace smoothing technology is used to numerically correct the historical occurrence frequency, avoiding the impact of the zero-frequency problem on subsequent probability calculations. The correction method of Laplace smoothing technology is as follows: a smoothing parameter is added to the historical occurrence count of each adjacent visit point combination, and the product of the smoothing parameter and the number of all possible adjacent visit point combination types is added to the total number of global combinations. The smoothing parameter is preferably set to one, and the number of all possible adjacent visit point combination types is equal to the square of the total number of attractions. After Laplace smoothing correction, all adjacent visit point combinations obtain a non-zero historical occurrence frequency, making the frequency statistics results more robust and stable.

[0059] S1.7: Based on historical occurrence frequency, calculate the conditional transition frequency and association strength of adjacent visit point combinations to quantify the sequential dependence and association characteristics of attraction visits.

[0060] Specifically, the conditional transition frequency represents the conditional probability of visiting a subsequent attraction given that a preceding attraction has already been visited. The conditional transition frequency is calculated as follows: count the total number of times the preceding attraction of the adjacent attraction combination appears as a non-final attraction in the historical tourist trajectory set, and record this as the total number of preceding attraction occurrences; divide the historical occurrences of the adjacent attraction combination by the total number of preceding attraction occurrences, and the quotient obtained is the conditional transition frequency of the adjacent attraction combination. The conditional transition frequency reflects the strength of the visit transition pattern from the preceding attraction to the subsequent attraction; the higher the value, the stronger the correlation between the visit order of the two attractions.

[0061] Furthermore, the correlation strength is quantified using the point mutual information metric to measure the degree of correlation between two attractions in an adjacent visitor point combination. The calculation process of the point mutual information metric is as follows: First, calculate the edge occurrence frequency of each of the preceding and subsequent attractions in all historical trajectories. The edge occurrence frequency of the preceding attraction is the total number of times that attraction appears in the historical trajectory set divided by the total number of times all attractions appear. The edge occurrence frequency of the subsequent attraction is calculated in the same way. Then, calculate the product of the edge occurrence frequencies of the preceding and subsequent attractions as the expected frequency of the attraction combination under the independence assumption. Finally, calculate the actual historical occurrence frequency of the adjacent visitor point combination divided by the expected frequency, and take the logarithm of the quotient to the base 2. The resulting logarithm is the correlation strength of the adjacent visitor point combination.

[0062] Furthermore, the correlation strength can be positive or negative. A positive correlation strength indicates that the actual co-occurrence frequency of the two attractions is higher than the expected frequency under the independence assumption, suggesting a positive correlation between the two attractions, and tourists are more likely to visit the subsequent attractions after visiting the preceding ones. A negative correlation strength indicates that the actual co-occurrence frequency of the two attractions is lower than the expected frequency under the independence assumption, suggesting a negative correlation between the two attractions, and tourists are less likely to visit the subsequent attractions after visiting the preceding ones. The larger the absolute value of the correlation strength, the stronger the correlation or repulsion.

[0063] It should be noted that the historical occurrence frequency, conditional transition frequency, and association strength of each adjacent visit point combination in the tourist behavior sequence are linked and recorded to form an extended frequency attribute set. The extended frequency attribute set maintains three values ​​for each adjacent visit point combination, corresponding to three different frequency or association measures from different perspectives. The extended frequency attribute set is used in subsequent steps to evaluate the sequence uniqueness and privacy risks of trajectory segments from multiple dimensions.

[0064] Preferably, conditional transition frequency and association strength play different roles in privacy risk assessment: adjacent access point combinations with high conditional transition frequency represent common access paths with low trajectory uniqueness; adjacent access point combinations with low historical occurrence frequency but high association strength represent rare but logically related access combinations, which may contain tourist-specific interest and preference information and have a higher risk of privacy leakage; by comprehensively considering the three frequency indicators, the privacy risk of the trajectory can be accurately assessed in multiple dimensions.

[0065] In an optional embodiment, a scenic spot transfer probability matrix is ​​constructed, which is a two-dimensional matrix structure. The rows of the matrix correspond to the cases where all scenic spots are preceding scenic spots, and the columns of the matrix correspond to the cases where all scenic spots are following scenic spots. The value of each element in the matrix is ​​the conditional transfer frequency of the corresponding scenic spot combination. The sum of the values ​​of each row of the scenic spot transfer probability matrix is ​​equal to one, forming a complete probability distribution. The scenic spot transfer probability matrix is ​​used to visualize the global transfer pattern of scenic spot visits, assist in identifying popular and unpopular access paths, and provide data support for scenic area management and route planning.

[0066] S1.8: Integrate tourist behavior sequences, trajectory segmentation results, historical occurrence frequency, conditional transition frequency, and correlation strength to generate a complete tourist behavior sequence data structure containing multidimensional attributes and statistical features.

[0067] Specifically, the complete tourist behavior sequence is represented by a hierarchical data structure. The top layer is the trajectory segment sequence, which contains several trajectory segments arranged in chronological order. Each trajectory segment contains two types of information: the first is a list of visit point information, and the second is the segment aggregation attribute. The visit point information list records attribute tuples of all visit points within the trajectory segment. Each attribute tuple contains eight attributes: attraction identifier, visit time, stay duration, attraction category, sensitivity level, geographical location, opening time, and time period label. The segment aggregation attribute includes two indicators: segment sensitivity and spatial dispersion.

[0068] Furthermore, each trajectory segment also contains a frequency attribute list, which records the frequency statistics of all adjacent access point combinations within the trajectory segment. Each frequency statistic contains three values: historical occurrence frequency, conditional transition frequency, and association strength. The number of elements in the frequency attribute list is equal to the number of access points within the trajectory segment minus one, and each element corresponds to an adjacent access point combination.

[0069] Furthermore, global statistical features are added to the complete tourist behavior sequence. These global statistical features include five indicators: total trajectory length, number of trajectory segments, average segment sensitivity, average historical occurrence frequency, and minimum historical occurrence frequency. The total trajectory length is the total number of visit points in the tourist behavior sequence; the number of trajectory segments is the number of trajectory segments formed after division; the average segment sensitivity is the arithmetic mean of the segment sensitivity of all trajectory segments; the average historical occurrence frequency is the arithmetic mean of the historical occurrence frequencies of all adjacent visit point combinations; and the minimum historical occurrence frequency is the minimum of the historical occurrence frequencies of all adjacent visit point combinations. These global statistical features are used in subsequent steps to quickly evaluate the overall characteristics of the trajectory, avoiding the computational overhead of traversing all visit points.

[0070] It should be noted that the complete tourist behavior sequence is serialized and stored in a structured data format, preferably JSON or XML, which supports cross-system data transmission and persistent storage. The serialized data includes two metadata items: a version number and a generation timestamp. The version number identifies the version information of the data structure, and the generation timestamp records the time when the complete tourist behavior sequence was generated. The version number and generation timestamp are used for data traceability, audit tracking, and debugging analysis.

[0071] Preferably, the complete tourist behavior sequence is used as standard input data for subsequent privacy protection processing and is directly passed to step two for calculating the risk value of trajectory segments and allocating dynamic privacy budgets. The historical frequency of occurrence in the complete tourist behavior sequence reflects the prevalence of trajectory access patterns. The combination of adjacent access points with low historical frequency increases the uniqueness of the trajectory, leading to an increase in the risk value of trajectory segments, triggering stronger privacy protection measures, and injecting greater intensity of privacy noise during the training phase of the generative adversarial network.

[0072] In an optional embodiment, data quality verification is performed on the complete tourist behavior sequence to check for missing values, outliers, or logical inconsistencies in the data. The data quality verification checks include: a monotonically increasing check for visit time to ensure that the visit time of all points increases sequentially; a non-negativity check for dwell time to ensure that all dwell time values ​​are greater than or equal to zero; a validity check for attraction identifiers to ensure that all attraction identifiers have corresponding records in the attraction attribute database; and a check for the range of historical occurrence frequencies to ensure that all frequency values ​​are within the valid range of zero to one. When a data quality problem is detected, a data quality report is generated, listing the location and type of the abnormal fields in detail. In subsequent processing, the weight of abnormal data is reduced or a manual review process is triggered to ensure the quality of input data for the privacy protection system.

[0073] S2: Calculate the risk value of the trajectory segment based on the sensitivity level, access time, and historical frequency of occurrence, and allocate a dynamic privacy budget based on the risk value of the trajectory segment.

[0074] S2.1: Extract the basic risk factors for each trajectory segment from the complete tourist behavior sequence, where the basic risk factors include segment sensitivity, time period distribution characteristics, and visit frequency characteristics.

[0075] Specifically, it iterates through all trajectory segments in the complete tourist behavior sequence. For each trajectory segment, it reads the segment sensitivity value. The segment sensitivity represents the weighted average of the dwell time at the sensitivity level of the access points within the trajectory segment, directly reflecting the privacy sensitivity of the trajectory segment. The higher the value, the more highly sensitive attractions the segment contains or the longer the dwell time at highly sensitive attractions.

[0076] Furthermore, the time-period distribution of access points within each trajectory segment is statistically analyzed, based on the time-period label attached to each access point. The number of access points belonging to the early morning, daytime, afternoon, and nighttime periods within the trajectory segment is calculated. The number of access points in each of the four periods is divided by the total number of access points within the trajectory segment to obtain the access percentage for each of the four periods, and the sum of the access percentages for the four periods equals one. The time-period distribution reflects the activity patterns of tourists at different times, with nighttime and early morning visits typically exhibiting higher privacy sensitivity.

[0077] Furthermore, the historical frequency of all adjacent access point combinations within each trajectory segment is extracted; for a trajectory segment containing several access points, the number of adjacent access point combinations within the segment is equal to the number of access points minus one; the historical frequency of all adjacent access point combinations within the trajectory segment is extracted into a frequency list, where each element in the frequency list corresponds to a historical frequency value of an adjacent access point combination.

[0078] It should be noted that the basic risk factors characterize the privacy leakage risk of trajectory segments from three different dimensions: segment sensitivity reflects the concentration of sensitive information from the perspective of attraction attributes, time period distribution reflects the abnormality of access behavior from the perspective of time, and historical frequency reflects the rarity of access patterns from the perspective of statistics. The three risk factors are independent and complementary to each other, and comprehensive consideration of the three can comprehensively assess the privacy risk level of trajectory segments.

[0079] Preferably, for a trajectory segment containing only a single access point, the access percentage of the time period to which that access point belongs is 1, and the access percentage of the other three time periods is zero; the frequency list is an empty list, and a default frequency value is used instead in subsequent calculations; the default frequency value is preferably set to the historical average frequency of all trajectory segments to avoid risk assessment bias caused by the lack of frequency information for single-point segments.

[0080] S2.2: Based on the time period distribution of each trajectory segment, calculate the time period influence weight coefficient of this trajectory segment.

[0081] Specifically, the time-period influence weighting coefficient quantifies the differentiated impact of different visit times on privacy risks. A base time period weight is set for each of the four time periods, and the base time period weight reflects the privacy sensitivity of the visit behavior during that time period. The base time period weight for the early morning time period is set to the highest value because there are fewer tourists visiting attractions during the early morning time period, and the visit behavior has significant personal characteristic identification. The base time period weight for the nighttime time period is set to the second highest value. The base time period weights for the daytime time period and the afternoon time period are set to lower values ​​because these two time periods are regular visit times, and the visit behavior is more common.

[0082] Furthermore, the specific values ​​of the base time period weights for the four time periods are preferably set as follows: the base time period weight for the early morning time period is set to 0.2, the base time period weight for the night time period is set to 1.5, the base time period weight for the daytime time period is set to 1, and the base time period weight for the afternoon time period is set to 0.8. The setting of the base time period weights is based on the statistical analysis of the scenic area's historical visitor flow data, reflecting the differences in visitor density at different times.

[0083] Furthermore, the time-period influence weight coefficient of the trajectory segment is calculated, where the time-period influence weight coefficient is the sum of the products of the access percentage of each time period within the trajectory segment and the corresponding basic time period weight. The calculation process is as follows: multiply the access percentage of the early morning period by the basic time period weight of the early morning period, multiply the access percentage of the daytime period by the basic time period weight of the daytime period, multiply the access percentage of the afternoon period by the basic time period weight of the afternoon period, multiply the access percentage of the nighttime period by the basic time period weight of the nighttime period, and sum the four products to obtain the time-period influence weight coefficient of the trajectory segment.

[0084] It should be noted that the numerical range of the time period influence weight coefficient is between 0.8 and 2. When all access points of the trajectory segment are concentrated in the afternoon, the time period influence weight coefficient takes the minimum value of 0.8; when all access points are concentrated in the early morning, the time period influence weight coefficient takes the maximum value of 2; when most trajectory segments have access points distributed across multiple time periods, the time period influence weight coefficient is between the two extreme values; the time period influence weight coefficient is used to adjust the sensitivity of the segment in the time dimension during subsequent risk value calculation.

[0085] Preferably, the weight of the basic time period is dynamically adjusted according to the seasonal and holiday characteristics of the scenic area. During the peak tourist season or statutory holidays, the visitor density during the daytime and afternoon hours increases significantly, and the privacy risk is relatively reduced. Accordingly, the weight of the basic time period for these two hours is reduced to 0.6 and 0.5, respectively. During the off-season, the visitor density is low even during the daytime. Accordingly, the weight of the basic time period during the daytime is increased to 1.2. The dynamic adjustment mechanism makes the weight coefficient of the time period adapt to the time change pattern of the scenic area's visitor flow.

[0086] In an optional embodiment, the adjustment of the weighting coefficient of weather factors on the time period is considered; under severe weather conditions, such as during rainstorms, heavy snow, and high temperature warnings, the density of visitors to the scenic area is greatly reduced, and the privacy sensitivity of the access behavior in all time periods increases; when severe weather conditions are detected, the basic time period weight of all time periods is uniformly multiplied by the severe weather adjustment coefficient, which is preferably set to 1.3, so that the calculated time period impact weighting coefficient can reflect the impact of weather on access privacy risks.

[0087] S2.3: Calculate the frequency uniqueness factor of this trajectory segment based on the historical occurrence frequency of adjacent access point combinations within the trajectory segment.

[0088] Specifically, the frequency uniqueness factor quantifies the rarity and uniqueness of the access pattern of the trajectory segment; for all adjacent access point combinations within each trajectory segment, the corresponding historical occurrence frequency value is read; the historical occurrence frequency value represents the relative frequency of the adjacent access point combination in the historical tourist trajectory set. The lower the historical occurrence frequency, the rarer the access pattern, the stronger the uniqueness of the trajectory, and the higher the risk of identity re-identification.

[0089] Furthermore, a frequency scarcity index is defined, which is the reciprocal of the historical occurrence frequency. For each combination of adjacent access points within a trajectory segment, its frequency scarcity index is calculated as one divided by the historical occurrence frequency of that combination. When the historical occurrence frequency approaches zero, the frequency scarcity index tends towards infinity, indicating extremely high access pattern uniqueness. To avoid instability caused by excessively large values, an upper limit threshold is set for the frequency scarcity index, preferably 1000. When the calculated frequency scarcity index exceeds 1000, it is truncated to 1000.

[0090] Furthermore, the frequency uniqueness factor of the trajectory segment is calculated, where the frequency uniqueness factor is the arithmetic mean of the frequency scarcity indices of all adjacent access point combinations within the trajectory segment. The calculation process is as follows: sum the frequency scarcity indices of all adjacent access point combinations within the trajectory segment, divide the sum by the number of adjacent access point combinations, and obtain the average frequency scarcity as the frequency uniqueness factor. The larger the value of the frequency uniqueness factor, the rarer the average access pattern of the trajectory segment, and the stronger the trajectory uniqueness.

[0091] It should be noted that the frequency uniqueness factor not only considers the rarity of individual adjacent access point combinations, but also reflects the overall rarity of the trajectory segment through the average value. If there are multiple low-frequency adjacent access point combinations within the trajectory segment, the frequency uniqueness factor increases significantly. If the trajectory segment mainly consists of high-frequency common access combinations, the frequency uniqueness factor remains at a low level. The frequency uniqueness factor provides a statistical measure of the trajectory sequence dependency characteristics.

[0092] Preferably, in addition to the arithmetic mean, a minimum frequency penalty mechanism is introduced to enhance the sensitivity of the frequency uniqueness factor to extremely low frequency combinations. The calculation method of the minimum frequency penalty mechanism is as follows: identify the lowest historical frequency combination of adjacent access points within the trajectory segment, calculate the frequency scarcity index of the lowest frequency combination, multiply the frequency scarcity index by a penalty weight coefficient, wherein the penalty weight coefficient is preferably set to 0.3; add the penalty term to the average frequency scarcity to obtain the enhanced frequency uniqueness factor. The minimum frequency penalty mechanism ensures that trajectory segments containing extremely rare access combinations receive higher uniqueness scores.

[0093] In an optional embodiment, a comprehensive frequency uniqueness factor is constructed by combining conditional transition frequency and association strength. The calculation of the comprehensive frequency uniqueness factor considers three dimensions: the scarcity of historical occurrence frequency, the anomaly of conditional transition frequency, and the extreme degree of association strength. The anomaly of conditional transition frequency is calculated as the degree of deviation between the conditional transition frequency and the average transition frequency of the scenic area. The extreme degree of association strength is calculated as the absolute value of the association strength. The measures of the three dimensions are combined according to weights, with the weight of the historical occurrence frequency dimension set to 0.5, the weight of the conditional transition frequency dimension set to 0.3, and the weight of the association strength dimension set to 0.2. The accuracy and robustness of the frequency uniqueness factor are improved through multi-dimensional comprehensive evaluation.

[0094] S2.4: Based on segment sensitivity, time period influence weighting coefficient and frequency uniqueness factor, calculate the trajectory segment risk value of each trajectory segment.

[0095] Specifically, the trajectory segment risk value quantifies the overall privacy leakage risk of the trajectory segment; the trajectory segment risk value is calculated by a weighted combination of three basic risk factors; three risk dimension weight parameters are defined, namely sensitivity weight, time period weight, and frequency weight, and the sum of the values ​​of the three weight parameters is equal to one; the sensitivity weight controls the contribution ratio of segment sensitivity to the risk value, the time period weight controls the contribution ratio of the time period influence weight coefficient to the risk value, and the frequency weight controls the contribution ratio of the frequency uniqueness factor to the risk value.

[0096] Furthermore, the preferred weighting parameters for the three risk dimensions are: sensitivity weight is set to 0.4, time period weight is set to 0.3, and frequency weight is set to 0.3. The weighting is determined based on experimental data analysis. Segment sensitivity, as a direct privacy risk indicator, occupies the largest weight, while time period impact and frequency uniqueness, as indirect risk indicators, each account for 30% of the weight. The relative importance of different risk dimensions is balanced through weight allocation.

[0097] Furthermore, the specific process for calculating the risk value of a trajectory segment is as follows: The segment sensitivity is normalized to a value range of zero to one, where the normalization method is to divide the segment sensitivity by the maximum sensitivity level of five; the time period influence weight coefficient is normalized to a value range of zero to one, where the normalization method is to subtract the minimum possible value of 0.8 from the time period influence weight coefficient and then divide by the difference between the maximum and minimum values ​​of 1.2; the frequency uniqueness factor is logarithmically transformed and normalized, where the logarithmic transformation method is to calculate the frequency uniqueness factor, add one, and then take the natural logarithm; the normalization method is to divide by the preset maximum logarithmic value; the three normalized risk factors are multiplied by their corresponding weight parameters, and the sum of the three weighted results is obtained to obtain the trajectory segment risk value.

[0098] It should be noted that the risk value of a trajectory segment ranges from zero to one. The closer the value is to one, the higher the risk of privacy leakage for that trajectory segment. A risk value of 0.5 indicates a medium risk level. A risk value greater than 0.75 is considered a high-risk segment, requiring a smaller dynamic privacy budget for strong protection. A risk value less than 0.25 is considered a low-risk segment, which can be allocated a larger dynamic privacy budget to retain more recommendation utility.

[0099] Preferably, a spatial dispersion adjustment factor is introduced to correct the risk value of the trajectory segment; spatial dispersion reflects the geographical dispersion of visit points within the trajectory segment; high spatial dispersion indicates that tourists move within a larger range, the visit pattern is more personalized, and the risk of re-identification increases; the spatial dispersion adjustment factor is calculated by multiplying the spatial dispersion value by an adjustment coefficient, which is preferably set to 0.1; the spatial dispersion adjustment factor is added to the previously calculated trajectory segment risk value to obtain the corrected trajectory segment risk value; the correction operation ensures the contribution of spatial behavioral characteristics to risk assessment.

[0100] In an optional embodiment, personalized risk adjustment is introduced based on tourists' historical visit records; for tourists who repeatedly visit scenic spots, their past visit trajectories are retrieved from the historical database; the similarity between the current trajectory segment and the historical trajectory segment is compared, with the similarity calculation based on the overlap rate of attractions and the consistency of the visit order; if the current trajectory segment is highly similar to the historical trajectory segment, it indicates that the tourist's visit behavior is stable and predictable, and the risk value of the trajectory segment is reduced accordingly; the similarity adjustment coefficient is preferably set to the range of -0.1 to 0, and the higher the similarity, the closer the adjustment coefficient is to -0.1; through personalized adjustment, the risk assessment adapts to the differences in the behavioral patterns of different tourists.

[0101] S2.5: Perform global normalization on the risk values ​​of all trajectory segments in the complete tourist behavior sequence to generate a normalized risk value sequence.

[0102] Specifically, the normalized risk value sequence is used for the fair allocation of the subsequent privacy budget; the risk values ​​of all trajectory segments in the complete tourist behavior sequence are collected to form a risk value list, where the length of the risk value list is equal to the total number of trajectory segments; the risk value list is traversed to find the maximum and minimum trajectory segment risk values, which are recorded as the maximum and minimum risk values.

[0103] Furthermore, a minimum-maximum normalization operation is performed on the trajectory segment risk value of each trajectory segment. The calculation method for the minimum-maximum normalization operation is as follows: subtract the minimum risk value from the trajectory segment risk value of this trajectory segment, divide the difference by the difference between the maximum risk value and the minimum risk value, and obtain the normalized risk value of this trajectory segment. The normalized risk value is strictly within the range of zero to one. The trajectory segment with the minimum risk value is normalized to zero, and the trajectory segment with the maximum risk value is normalized to one.

[0104] Furthermore, the normalized risk values ​​of all trajectory segments are arranged in the order of the trajectory segments in the complete tourist behavior sequence to form a normalized risk value sequence. The normalized risk value sequence and the trajectory segment sequence maintain a one-to-one correspondence, and the specific trajectory segment corresponding to each normalized risk value can be traced through the index position. The normalized risk value sequence eliminates the difference in risk value scale between different tourist trajectories, making the risk assessment results comparable on a global scale.

[0105] It should be noted that when the risk values ​​of all trajectory segments are exactly the same, the maximum risk value is equal to the minimum risk value, and the denominator of the minimum-maximum normalization operation is zero. In this special case, the normalized risk value of all trajectory segments is uniformly set to 0.5, which represents an equal medium risk level. This processing method avoids division by zero errors and ensures the normal execution of subsequent privacy budget allocation.

[0106] Preferably, a softening boundary mechanism is introduced during the normalization process to avoid the normalized risk value from being strictly zero or one. The softening boundary mechanism is implemented by adding a small offset to the normalization formula. Specifically, an offset is added to the numerator of the minimum-maximum normalization and twice the offset is added to the denominator. The offset is preferably set to 0.01. After the softening boundary processing, the actual range of the normalized risk value is from 0.01 to 0.99, avoiding the adverse effects of extreme values ​​on subsequent calculations.

[0107] In an optional embodiment, quantile normalization is used instead of min-max normalization. Quantile normalization is more robust to outliers in the risk value distribution. The calculation process of quantile normalization is as follows: sort the risk values ​​of all trajectory segments in ascending order and assign a sorting position to each trajectory segment; divide the sorting position by the total number of trajectory segments minus one to obtain the quantile normalized risk value of that trajectory segment. Quantile normalization ensures that the normalized risk value is evenly distributed between zero and one, and is not affected by individual extreme risk values.

[0108] S2.6: Based on privacy protection requirements and recommendation system performance requirements, set the total privacy budget applied to the entire tourist behavior sequence, and verify that the total privacy budget satisfies the mathematical definition of differential privacy.

[0109] Specifically, the total privacy budget represents the total strength of privacy protection allowed to be applied to the entire sequence of tourist behavior, expressed using the privacy parameter in differential privacy theory. The smaller the total privacy budget, the stronger the privacy protection, but the greater the loss of recommendation utility; the larger the total privacy budget, the weaker the privacy protection, but the better the recommendation utility is preserved. The setting of the total privacy budget needs to find a balance between privacy protection and recommendation utility.

[0110] Furthermore, the preferred value range for the total privacy budget is 0.5 to 2; when the privacy protection requirement is extremely high, such as processing medical tourism trajectories containing highly sensitive personal information, the total privacy budget is set to 0.5; when the recommendation utility requirement is high and the privacy sensitivity is relatively low, such as processing regular sightseeing tourism trajectories, the total privacy budget is set to 1.5 to 2; for balanced scenarios, the total privacy budget is set to 1.

[0111] Furthermore, a personalized total privacy budget can be set based on the visitor's privacy preferences. When a visitor registers or uses the recommended service, their privacy protection preferences are asked through the privacy settings interface, providing three privacy protection levels: low, medium, and high. The low privacy protection level corresponds to a total privacy budget of 2, the medium privacy protection level corresponds to a total privacy budget of 1, and the high privacy protection level corresponds to a total privacy budget of 0.5. The corresponding total privacy budget value is set according to the level selected by the visitor. Personalized settings respect the visitor's right to privacy autonomy and meet different privacy needs.

[0112] It should be noted that the total privacy budget conforms to the combination law of differential privacy; when the tourist behavior sequence undergoes multiple privacy protection operations, the total privacy loss is equal to the sum of the privacy budgets of each operation; in this invention, the privacy protection of the tourist behavior sequence mainly occurs during the training and inference phases of the generative adversarial network. After the total privacy budget is allocated to all trajectory segments, the sum does not exceed the set total privacy budget value, ensuring that the overall privacy protection strength meets the differential privacy guarantee.

[0113] Preferably, the rationality of the total privacy budget setting is verified; the verification process is evaluated using a privacy-utility trade-off curve; the privacy-utility trade-off curve describes the relationship between privacy protection effectiveness and recommendation accuracy under different total privacy budget settings; through historical data experiments, the privacy protection rate and recommendation accuracy are tested in the range of 0.1 to 3 for total privacy budgets; the privacy protection rate is defined as the proportion of successfully resisting re-identification attacks, and the recommendation accuracy is defined as the degree of matching between the recommendation list and the actual preferences; a total privacy budget with a privacy protection rate higher than 90% and a recommendation accuracy decrease of no more than 10% is selected as the preferred setting.

[0114] In an optional embodiment, an adaptive total privacy budget adjustment mechanism is introduced. This mechanism dynamically adjusts the total privacy budget based on the overall risk level of the tourist behavior sequence. The average risk value of all trajectory segments is calculated as an overall risk level indicator. When the overall risk level indicator is higher than a preset high-risk threshold, the total privacy budget is automatically reduced to the range of 0.5 to 0.8 to enhance privacy protection. When the overall risk level indicator is lower than a preset low-risk threshold, the total privacy budget is automatically increased to the range of 1.5 to 2 to improve recommendation effectiveness. The preset high-risk threshold is preferably set to 0.7, and the preset low-risk threshold is preferably set to 0.3. This adaptive adjustment mechanism ensures that the strength of privacy protection matches the actual risk level.

[0115] S2.7: Based on the normalized risk value sequence and the total privacy budget, allocate a dynamic privacy budget to each trajectory segment.

[0116] Specifically, the dynamic privacy budget is inversely proportional to the normalized risk value; trajectory segments with higher risk values ​​are allocated smaller dynamic privacy budgets. The allocation principle of the dynamic privacy budget is defined as follows: high-risk trajectory segments receive smaller dynamic privacy budgets for strong protection, while low-risk trajectory segments receive larger dynamic privacy budgets to retain recommendation utility. The allocation principle establishes a mapping between the normalized risk value and the dynamic privacy budget through an inverse proportional function. This inverse proportional function ensures that the limited total privacy budget is reasonably allocated according to risk differences.

[0117] Furthermore, the risk inverse sequence is calculated, where each element in the risk inverse sequence is one minus the normalized risk value of the corresponding trajectory segment; the risk inverse sequence converts high normalized risk values ​​into low values ​​and low normalized risk values ​​into high values, reflecting an inverse proportional relationship; the sum of all elements in the risk inverse sequence is calculated and recorded as the risk inverse sum, where the risk inverse sum serves as a normalization factor for the dynamic privacy budget allocation.

[0118] Furthermore, a dynamic privacy budget is calculated for each trajectory segment. The calculation method is as follows: divide the inverse of the risk corresponding to the trajectory segment by the sum of the inverses of the risks to obtain the budget allocation ratio of the trajectory segment; multiply the budget allocation ratio by the total privacy budget to obtain the dynamic privacy budget of the trajectory segment. The larger the value of the dynamic privacy budget, the weaker the privacy protection strength that can be applied to the trajectory segment, the less noise the generative adversarial network injects when processing the segment, and the more original information is retained.

[0119] It should be noted that the sum of the dynamic privacy budgets of all trajectory segments is strictly equal to the total privacy budget, satisfying the combinatorial property of differential privacy; the allocation of the dynamic privacy budget ensures that the overall privacy budget is optimized among the trajectory segments according to the differences in risk; high-risk segments are strongly protected by a smaller dynamic privacy budget, reducing the risk of identity re-identification; low-risk segments retain more original features by a larger dynamic privacy budget, maintaining the utility of the recommendation system.

[0120] Preferably, upper and lower limits are set for the dynamic privacy budget to avoid extreme allocation; the lower limit constraint ensures that even low-risk trajectory segments receive minimum privacy protection, and the lower limit of the dynamic privacy budget is preferably set to 5% of the total privacy budget; the upper limit constraint ensures that even high-risk trajectory segments retain basic recommendation utility, and the upper limit of the dynamic privacy budget is preferably set to 30% of the total privacy budget; after calculating the dynamic privacy budget, values ​​exceeding the lower or upper limit are truncated, and the privacy budget saved or exceeded after truncation is redistributed to other trajectory segments to keep the sum equal to the total privacy budget.

[0121] In an optional embodiment, a smooth allocation strategy for the dynamic privacy budget is introduced. The smooth allocation strategy avoids drastic fluctuations in the dynamic privacy budget between adjacent trajectory segments. The smoothing method is as follows: for each trajectory segment, calculate the weighted average of the dynamic privacy budget of the segment and its preceding and following segments. In the weighted average, the weight of the current segment is set to 0.6, and the weights of the preceding and following segments are each set to 0.2. Replace the original dynamic privacy budget with the weighted average. After smoothing, renormalize all dynamic privacy budgets to ensure that the sum is still equal to the total privacy budget. The smooth allocation strategy reduces abrupt changes in privacy protection strength and improves the stability of generative adversarial network training.

[0122] S2.8: Associate each trajectory segment with its corresponding dynamic privacy budget, generate a dynamic privacy budget allocation table, and perform a budget audit on the dynamic privacy budget allocation table to verify the correctness of the allocation results and differential privacy guarantees.

[0123] Specifically, a dynamic privacy budget allocation table is constructed, which is a two-dimensional data table structure, with each row corresponding to a trajectory segment. The columns and fields of each row are as follows: trajectory segment identifier, segment sensitivity, time period influence weight coefficient, frequency uniqueness factor, trajectory segment risk value, normalized risk value, risk reciprocal, budget allocation ratio, and dynamic privacy budget. The dynamic privacy budget allocation table fully records all intermediate calculation results from basic risk factors to final budget allocation, supporting audit traceability and debugging analysis.

[0124] Furthermore, an integrity audit is performed on the dynamic privacy budget allocation table to verify that there are no missing or outlier values ​​in the data table; the integrity audit checks whether all fields of each trajectory segment have valid values ​​and whether the values ​​are within a reasonable range; the risk value and normalized risk value of the trajectory segment should be between zero and one, and the dynamic privacy budget should be positive and not exceed the total privacy budget; when outliers are found, an audit anomaly report is generated, marking the location and type of the anomaly field.

[0125] Furthermore, a sum audit is performed to verify that the sum of the dynamic privacy budgets for all trajectory segments equals the set total privacy budget; the sum of the values ​​in the dynamic privacy budget column of all trajectory segments in the dynamic privacy budget allocation table is calculated; the calculated sum is compared with the set total privacy budget, and the relative error is calculated; if the absolute value of the relative error is less than 0.1%, the sum audit is deemed to have passed; if the relative error exceeds the threshold, the budget reallocation process is triggered to adjust the dynamic privacy budgets of each trajectory segment so that the sum is strictly equal to the total privacy budget.

[0126] It should be noted that the dynamic privacy budget allocation table serves as an important input for training the generative adversarial network in S3 and S4. When processing each trajectory segment, the generator adjusts the noise injection intensity according to the dynamic privacy budget corresponding to that segment. The smaller the dynamic privacy budget, the greater the variance of the injected Laplacian or Gaussian noise, the stronger the perturbation to the original trajectory, and the more adequate the privacy protection. The larger the dynamic privacy budget, the weaker the noise intensity, the closer the generated proxy visitor sequence is to the original sequence, and the better the recommendation utility is preserved.

[0127] Preferably, timestamps and version numbers are added to the dynamic privacy budget allocation table; the timestamp records the generation time of the dynamic privacy budget allocation table, and the version number identifies the version of the risk calculation and budget allocation algorithm; when the risk calculation method or budget allocation strategy is updated, the version number is incremented; the timestamp and version number support comparative analysis of results from different versions and evaluation of the effectiveness of algorithm iteration optimization.

[0128] In an optional embodiment, a visual monitoring system for dynamic privacy budget allocation is established. This system displays the distribution of risk values ​​for trajectory segments, the distribution of dynamic privacy budget allocation, and the relationship curve between risk and budget in graphical form. The visual charts include: a histogram of trajectory segment risk values, showing the distribution of the number of segments at different risk levels; a box plot of the dynamic privacy budget, showing the central tendency and dispersion of budget allocation; and a risk-budget scatter plot, showing the inverse relationship between normalized risk values ​​and the dynamic privacy budget. Through this visual monitoring system, researchers and system administrators can intuitively assess the rationality of budget allocation, identify potential allocation anomalies, and adjust risk weight parameters or budget allocation strategies in a timely manner.

[0129] S3: During the training phase, the tourist behavior sequence and dynamic privacy budget are input into the generator network to generate the proxy tourist sequence. The proxy tourist sequence is then input into the privacy discriminator and the recommendation utility discriminator to obtain the identity re-identification probability and recommendation ranking bias.

[0130] S3.1: Construct a generator network, which receives a sequence of visitor behaviors and a dynamic privacy budget as input, and outputs a sequence of proxy visitors.

[0131] Specifically, the generator network adopts a sequence-to-sequence deep neural network architecture, which includes three main components: an encoder module, a privacy-conditional fusion module, and a decoder module. The encoder module is responsible for encoding the tourist behavior sequence into a high-dimensional semantic representation; the privacy-conditional fusion module is responsible for incorporating dynamic privacy budget information into the encoded representation; and the decoder module is responsible for generating the proxy tourist sequence based on the fused representation.

[0132] Furthermore, the encoder module adopts a bidirectional long short-term memory network as its basic architecture. The bidirectional long short-term memory network includes a forward propagation layer and a backward propagation layer. The forward propagation layer processes the tourist behavior sequence in chronological order, and the backward propagation layer processes the tourist behavior sequence in reverse chronological order. The hidden layer dimension of the bidirectional long short-term memory network is preferably set to 256 dimensions, and the number of network layers is preferably set to two layers. The bidirectional processing captures the contextual dependencies and semantic information of the access sequence.

[0133] Furthermore, the decoder module also adopts a long short-term memory network structure. The long short-term memory network of the decoder module receives the final hidden state of the encoder module as the initial state and generates each visit point in the proxy tourist sequence step by step. In each generation step, the decoder module predicts the attraction identifier, visit time, stay duration and attraction category of the next visit point based on the current hidden state and the previously generated visit point. The hidden layer dimension of the decoder module is consistent with that of the encoder module, which is set to 256 dimensions.

[0134] It should be noted that the input layer of the generator network converts each visit point in the tourist behavior sequence into an embedding vector; the embedding vector is a concatenation of three parts: attraction embedding, time embedding, and category embedding; the attraction embedding maps the attraction identifier to a 128-dimensional dense vector, the time embedding encodes the visit time and stay duration into a 64-dimensional vector, and the category embedding maps the attraction category into a 32-dimensional vector; the three parts are concatenated to form a 224-dimensional visit point embedding vector, which serves as the input to the encoder module.

[0135] Preferably, an attention mechanism is introduced into the generator network, whereby the decoder module can pay attention to the hidden states at different positions processed by the encoder module when generating each access point; the attention mechanism calculates the similarity weight between the current hidden state of the decoder and the hidden states of the encoder at all time steps, and uses the similarity weight to perform a weighted summation of the encoder's hidden states to obtain a context vector; after concatenating the context vector with the current hidden state of the decoder, the input and output layers predict the next access point; the attention mechanism improves the generator network's ability to model long sequences.

[0136] In an optional embodiment, a variational autoencoder structure is used instead of the standard encoder-decoder structure. The variational autoencoder structure adds the prediction of mean and variance vectors to the output layer of the encoder module, and samples latent vectors from the Gaussian distribution through reparameterization techniques. The latent vectors are then input into the decoder module. The variational autoencoder structure increases the diversity of generation and avoids the generator network from overfitting the training data and generating overly similar proxy visitor sequences.

[0137] S3.2: Convert each visit point in the visitor behavior sequence into an embedding vector to form an embedding sequence, which serves as the input to the generator network encoder module.

[0138] Specifically, iterate through all the visit points in the tourist behavior sequence. For each visit point, extract four attributes: attraction identifier, visit time, stay duration, and attraction category. For the attraction identifier attribute, query the pre-trained attraction embedding matrix, where the attraction embedding matrix establishes a mapping relationship between identifiers and vectors for all attractions. The number of rows in the matrix equals the total number of attractions, and the number of columns equals the attraction embedding dimension of 128. Retrieve the corresponding 128-dimensional attraction embedding vector from the embedding matrix based on the attraction identifier.

[0139] Furthermore, for the access time attribute, a time encoding function is used to convert the timestamp into a time embedding vector. The time encoding function uses sine and cosine functions to encode different periodic features of time. The hour portion of the access time is encoded as sine and cosine values ​​with a period of 24 cycles, the minute portion is encoded as sine and cosine values ​​with a period of 60 cycles, and the weekday information is encoded as sine and cosine values ​​with a period of 7 cycles. The time encoding captures the periodic pattern of time and generates a 32-dimensional time feature vector.

[0140] Furthermore, for the dwell time attribute, logarithmic transformation and normalization are used to convert the dwell time in minutes into a numerical feature. The logarithmic transformation calculates the natural logarithm of the dwell time plus one, avoiding the problem of undefined logarithms of zero values. The logarithmic value is normalized by dividing it by the preset maximum dwell time logarithmic value, and the normalized value ranges between zero and one. The normalized dwell time value is concatenated with the time feature vector to form a 64-dimensional time embedding vector.

[0141] It should be noted that, for the scenic spot category attribute, the pre-trained category embedding matrix is ​​queried. The category embedding matrix establishes a mapping relationship between all scenic spot categories and vectors. The number of rows in the matrix is ​​equal to the total number of scenic spot categories, and the number of columns is equal to the category embedding dimension of 32. The corresponding 32-dimensional category embedding vector is retrieved from the category embedding matrix according to the scenic spot category. The scenic spot embedding matrix and the category embedding matrix are updated synchronously during the generator network training process to learn better embedding representations.

[0142] Preferably, the scenic spot embedding vector, time embedding vector, and category embedding vector of each visit point are concatenated in sequence to form a 224-dimensional visit point embedding vector; the visit point embedding vectors of all visit points in the tourist behavior sequence are arranged in the visit order to form an embedding sequence, wherein the embedding sequence is a three-dimensional tensor structure, the first dimension is the batch size, the second dimension is the sequence length, and the third dimension is the embedding dimension 224; the embedding sequence is input into the encoder module of the generator network for sequence encoding.

[0143] In an optional embodiment, position encoding information is added to the access point embedding vector. The position encoding information identifies the position index of the access point in the sequence. The position encoding adopts the sine and cosine position encoding method to generate a fixed position vector for each position index. The position vector is added to the access point embedding vector to obtain an enhanced embedding vector containing position information. Position encoding helps the generator network identify the sequential relationship of access points and improves the ability to model the sequence structure.

[0144] S3.3: Convert the dynamic privacy budget of each trajectory segment in the dynamic privacy budget allocation table into a privacy condition vector, and integrate the privacy condition vector into the hidden state representation of the encoder module.

[0145] Specifically, the dynamic privacy budget value corresponding to each trajectory segment is read from the dynamic privacy budget allocation table. The dynamic privacy budget value is a scalar with a value range from zero to the total privacy budget. The dynamic privacy budget value is mapped to a high-dimensional privacy condition vector through a fully connected layer. The output dimension of the fully connected layer is set to the encoder hidden layer dimension of 256. The privacy condition vector encodes the privacy protection strength information that the trajectory segment should receive.

[0146] Furthermore, for a tourist behavior sequence containing multiple trajectory segments, a privacy condition vector of the trajectory segment to which each access point belongs is assigned; the trajectory segment identifier to which each access point belongs is determined based on the trajectory segment segment segmentation result; based on the trajectory segment identifier, the privacy condition vector of the corresponding trajectory segment is associated with the access point; all access points within the same trajectory segment share the same privacy condition vector.

[0147] Furthermore, when the encoder module processes the tourist behavior sequence, the privacy condition vector is incorporated into the encoding process. The fusion method adopts a gating mechanism to calculate the fusion weight between the privacy condition vector and the hidden state of the encoder at the current time step. The fusion weight is obtained by concatenating the privacy condition vector and the hidden state and then passing it through a fully connected layer and a sigmoid activation function. The fusion weight is used to perform a weighted summation of the privacy condition vector and the hidden state to obtain the fused hidden state.

[0148] It should be noted that the role of the privacy condition vector is to guide the decoder module to apply different levels of privacy protection when generating proxy visitor sequences. For trajectory segments with smaller dynamic privacy budgets, the corresponding privacy condition vector guides the decoder to inject stronger noise perturbations, generating proxy sequences that differ more from the original sequences. For trajectory segments with larger dynamic privacy budgets, the privacy condition vector guides the decoder to retain more original features, generating proxy sequences that are closer to the original sequences.

[0149] Preferably, conditional batch normalization is used to enhance the control of the privacy condition vector over the generation process. Conditional batch normalization inserts a batch normalization layer after each layer of the decoder module. The scaling and offset parameters of the batch normalization layer are not learned in a fixed manner, but are dynamically predicted and generated by the privacy condition vector through the fully connected layer. The privacy condition vector directly affects the activation distribution of each layer of the decoder by controlling the normalization parameters, thereby precisely controlling the privacy protection strength of the generated data.

[0150] In an optional embodiment, a privacy budget decay mechanism is designed to simulate the noise injection process of differential privacy; at each time step in the decoder generating the proxy visitor sequence, the currently consumed privacy budget is calculated; the dynamic privacy budget of the trajectory segment is divided by the number of access points within the trajectory segment to obtain the average privacy budget for each access point; the privacy budget consumed by the generated access points is accumulated and deducted from the dynamic privacy budget; the less the remaining privacy budget, the greater the noise intensity when subsequent access points are generated; the privacy budget decay mechanism more accurately simulates the combinatorial properties of differential privacy.

[0151] S3.4: The decoder module of the generator network generates each access point in the proxy visitor sequence based on the encoded representation with fused privacy conditions, and injects privacy-preserving noise during the generation process.

[0152] Specifically, the decoder module adopts an autoregressive generation method, starting from the final hidden state of the encoder module and iteratively generating a sequence of proxy visitors. In the first generation step, the decoder module receives a special start tag as input and combines the final hidden state of the encoder with the privacy condition vector to predict the attributes of the first proxy access point. In subsequent generation steps, the decoder module receives the access point embedding generated in the previous step as input and predicts the proxy access point attributes in the current step.

[0153] Furthermore, the attribute prediction of the proxy access point includes four parallel prediction tasks: attraction identification prediction, visit time prediction, stay duration prediction, and attraction category prediction. Attraction identification prediction outputs the probability distribution of all attractions through a softmax classification layer, selecting the attraction with the highest probability or sampling attractions based on the probability distribution. Visit time prediction and stay duration prediction output continuous values ​​through a regression layer. Attraction category prediction outputs the probability distribution of all categories through a softmax classification layer.

[0154] Furthermore, privacy-preserving noise is injected into the attraction identification prediction process. The intensity of the privacy-preserving noise is adjusted according to the size of the dynamic privacy budget. The noise injection method is as follows: Laplace noise or exponential noise is added to the attraction probability distribution output by the softmax layer. The scale parameter of the Laplace noise is inversely proportional to the dynamic privacy budget. The smaller the dynamic privacy budget, the larger the noise scale. After adding noise, the probability distribution is renormalized, and attraction identification is generated by sampling the probability distribution after noise perturbation.

[0155] It should be noted that the injection of privacy-preserving noise satisfies the mathematical definition of differential privacy. For a trajectory segment with a dynamic privacy budget of a certain value, the noise intensity injected when generating the proxy access point of the segment is set to the differential privacy noise level corresponding to that value. Through noise injection, the proxy visitor sequences generated by adjacent visitor behavior sequences satisfy the differential privacy indistinguishability, and attackers cannot accurately infer the original visitor behavior sequence from the proxy visitor sequence, thereby protecting visitor privacy.

[0156] Preferably, privacy-preserving noise is also injected into the prediction of visit time and stay duration; Gaussian noise is used for time and duration, and the standard deviation of the noise is inversely proportional to the dynamic privacy budget; Gaussian noise is added to the visit time value predicted by the decoder, and Gaussian noise is added to the predicted stay duration value; after adding noise, the values ​​are subject to reasonableness constraints, ensuring that the visit time is within a reasonable time range and the stay duration is ensured to be a non-negative value; the noise perturbation of time and duration enhances the difference between the proxy visitor sequence and the original sequence in the time dimension.

[0157] In optional embodiments, a temperature parameter is introduced to control the balance between the diversity and fidelity of the generated data; the temperature parameter is used to scale the logits in the softmax probability distribution calculation; when the temperature parameter is greater than one, the probability distribution is smoother and the generation is more diverse; when the temperature parameter is less than one, the probability distribution is sharper and the generation is more deterministic; the temperature parameter is associated with a dynamic privacy budget, with segments with a small dynamic privacy budget using a larger temperature parameter to increase diversity, and segments with a large dynamic privacy budget using a smaller temperature parameter to preserve the original features; temperature adjustment provides an alternative privacy protection mechanism besides noise injection.

[0158] S3.5: Construct a privacy discriminator network, which receives the sequence of proxy visitors and the sequence of real visitor behavior as input, and outputs the probability of identity re-identification.

[0159] Specifically, the identity re-identification probability quantification method addresses the privacy leakage risk of proxy tourist sequences; the privacy discriminator network adopts a member inference attack model architecture to simulate an attack scenario where a malicious attacker attempts to infer the identity of the original tourist from the proxy tourist sequence; the privacy discriminator network includes a sequence encoding layer, a feature extraction layer, and a classification output layer; the sequence encoding layer encodes the input tourist sequence into a fixed-length feature vector; the feature extraction layer learns discriminative features; and the classification output layer predicts the tourist identity identifier corresponding to the tourist sequence.

[0160] Furthermore, the sequence coding layer adopts a bidirectional long short-term memory network with a hidden layer dimension of 128 and two layers. The forward and backward hidden states of the last time step of the bidirectional long short-term memory network are concatenated to obtain a 256-dimensional sequence feature vector.

[0161] Furthermore, the classification output layer is a multi-classification layer, with the number of classes equal to the total number of different tourists in the training set. The classification output layer maps the sequence feature vector to a probability distribution of tourist identities through a fully connected layer and a softmax activation function. Each element in the probability distribution represents the probability that the input sequence belongs to the corresponding tourist. The tourist identity with the highest probability is selected as the prediction result, and the corresponding probability value is used as the confidence level of the prediction.

[0162] It should be noted that the identity re-identification probability is defined as the confidence level of the privacy discriminator network in predicting the identity of the proxy visitor sequence. The proxy visitor sequence is input into the privacy discriminator network to obtain the visitor identity probability distribution, and the maximum probability value in the probability distribution is extracted as the identity re-identification probability. The higher the identity re-identification probability value, the easier it is for attackers to infer the original visitor identity from the proxy visitor sequence, and the greater the risk of privacy leakage. The lower the identity re-identification probability value, the better the proxy visitor sequence hides the original identity, and the more sufficient the privacy protection.

[0163] Preferably, when training the privacy discriminator network, real tourist behavior sequences are used as positive samples, and proxy tourist sequences generated by the generator network are used as negative samples or confusion samples. The training objective of the privacy discriminator network is to maximize the accuracy of identifying real tourist identities. The attack capability of the privacy discriminator is strengthened through training, making it a more rigorous privacy risk assessment tool. When the probability of identity re-identification on proxy tourist sequences is low, it indicates that the proxy tourist sequences have withstood the test of strong attack models, and the privacy protection is reliable.

[0164] In an optional embodiment, a contrastive learning method is used to train the privacy discriminator network. The contrastive learning method uses different access sequences of the same tourist as positive sample pairs and access sequences of different tourists as negative sample pairs. The privacy discriminator network learns to bring positive sample pairs closer together in the feature space and push negative sample pairs further apart in the feature space. After training, for the input proxy tourist sequence, the similarity between its feature vector and the feature vectors of all real tourist sequences is calculated. The tourist corresponding to the highest similarity is the re-identification result, and the highest similarity value is the identity re-identification probability. The contrastive learning method improves the sensitivity of the privacy discriminator to subtle identity features.

[0165] S3.6: Construct a recommendation utility discriminator network, which receives agent visitor sequences and real visitor behavior sequences, generates recommendation lists respectively, and calculates recommendation ranking bias.

[0166] Specifically, the recommendation ranking bias quantifies the impact of the proxy tourist sequence on the recommendation utility; the recommendation utility discriminator network includes a sequence encoding module and a recommendation generation module; the sequence encoding module encodes the tourist sequence into a user interest representation vector; the recommendation generation module calculates the recommendation score based on the user interest representation vector and the attraction representation vector, and generates a recommendation list; the recommendation utility discriminator network adopts deep collaborative filtering.

[0167] Furthermore, the sequence encoding module employs a recurrent neural network, using a gated recurrent unit network with a hidden layer dimension of 128. The attraction embedding and category embedding of each visit point in the tourist sequence are input into the gated recurrent unit network, and the hidden state at the last time step is extracted as the user interest representation vector.

[0168] Furthermore, the recommendation generation module maintains a scenic spot representation matrix, which learns a low-dimensional dense vector representation for each scenic spot. The dimension of the scenic spot representation vector is consistent with the dimension of the user interest representation vector, set to 128 dimensions. The inner product or cosine similarity between the user interest representation vector and all scenic spot representation vectors is calculated as the user's recommendation rating for each scenic spot. All scenic spots are sorted from high to low according to their recommendation ratings, and the top 20 scenic spots with the highest ratings are selected as the recommendation list.

[0169] It should be noted that the recommendation ranking bias is calculated by comparing the difference between the recommendation list generated from the real tourist behavior sequence and the recommendation list generated from the proxy tourist sequence. The real tourist behavior sequence is input into the recommendation utility discriminator network to generate the real recommendation list; the proxy tourist sequence is input into the recommendation utility discriminator network to generate the proxy recommendation list; the normalized loss cumulative gain index is used to measure the ranking consistency of the two recommendation lists.

[0170] Preferably, the calculation process of the normalized cumulative gain index is as follows: using the real recommendation list as the ideal ranking benchmark, for each attraction in the proxy recommendation list, calculate the gain value based on its position in the real recommendation list; the earlier the attraction is in the real recommendation list, the higher the gain value; perform cumulative loss on the gain value according to the ranking position in the proxy recommendation list, the later the position, the smaller the loss coefficient; calculate the ratio of the cumulative gain value of the proxy recommendation list to the cumulative gain value of the ideal ranking, as the normalized cumulative gain; the closer the normalized cumulative gain value is to one, the more consistent the two recommendation lists are.

[0171] In an optional embodiment, the recommendation ranking bias is defined as a value minus the cumulative gain of normalized loss. The value of the recommendation ranking bias ranges from zero to one. The closer the value is to zero, the more consistent the recommendation list generated by the proxy visitor sequence is with the recommendation list generated by the real sequence, and the recommendation utility is well preserved. The larger the value, the greater the difference between the two recommendation lists, and the more severe the utility loss caused by using the proxy visitor sequence for recommendation. The recommendation ranking bias serves as an important feedback signal for the generator network training, guiding the generator to preserve recommendation utility while protecting privacy.

[0172] S3.7: Record the proxy visitor sequence, identity re-identification probability, and recommendation ranking bias of the current training batch as training sample data.

[0173] Specifically, a training batch data structure is constructed, which includes the following fields: batch number, real tourist behavior sequence, dynamic privacy budget allocation, proxy tourist sequence, identity re-identification probability, and recommendation ranking bias; the batch number identifies the batch index of the current training iteration; the real tourist behavior sequence and dynamic privacy budget allocation are obtained from steps one and two; the proxy tourist sequence, identity re-identification probability, and recommendation ranking bias are generated and calculated in this step.

[0174] Furthermore, the training batch data structure is saved to the training log file or memory cache to support loss calculation access in subsequent steps; in large-scale training scenarios, distributed storage or database systems are used to manage the training batch data; each training batch data is appended with a timestamp to record the time when the data was generated; the timestamp is used for monitoring and debugging of the training process, and to analyze training speed and convergence trend.

[0175] Furthermore, statistics are generated for the identity re-identification probability and recommendation ranking bias of the current training batch, including the mean, minimum, maximum, and standard deviation. These statistics reflect the overall privacy protection effect and recommendation utility retention of the proxy visitor sequences generated in the current batch. The statistics are then output to the training monitoring interface or log file for researchers to observe the training progress in real time.

[0176] It should be noted that the training batch data provides the necessary input for calculating the category preference loss and the adjacent order loss in step four; the category preference loss requires comparing the distribution of attraction categories in the proxy tourist sequence with the real tourist behavior sequence; the adjacent order loss requires examining the order relationship of adjacent visit points in the proxy tourist sequence; all loss calculations are based on the training data of the current batch.

[0177] Preferably, a training checkpoint mechanism is established, which saves parameter snapshots of the generator network, privacy discriminator network, and recommendation utility discriminator network at preset batch intervals; the preset batch interval is preferably set to every 100 batches; the checkpoint saves network parameters, optimizer status, and the current batch number; when the training process is interrupted, training is resumed from the most recent checkpoint to avoid starting from scratch; the checkpoint mechanism improves the robustness and recoverability of training.

[0178] In an optional embodiment, an early stopping mechanism is introduced to monitor the overfitting risk during the training process. The early stopping mechanism periodically evaluates the performance of the generator network on the validation set and calculates the identity re-identification probability and recommendation ranking bias of the validation set. When the performance of the validation set no longer improves or begins to deteriorate for several consecutive batches, the training is terminated early. The number of consecutive monitoring batches is preferably set to 20 batches. The early stopping mechanism avoids the generator network from overfitting on the training set and improves the generalization ability of the model.

[0179] S4: Update the generator parameters based on the identity re-identification probability, recommendation ranking deviation, category preference loss, and adjacent order loss until the identity re-identification probability is lower than the preset re-identification threshold and the recommendation ranking deviation is lower than the preset deviation threshold, thus obtaining the trained generator.

[0180] S4.1: Based on the difference in attraction category distribution between the agent tourist sequence and the real tourist behavior sequence, calculate the category preference loss, where the category preference loss constrains the generator network to retain the attraction category preference characteristics of tourists.

[0181] Specifically, the number of visits to each attraction category in the real tourist behavior sequence is counted, the visit percentage of each attraction category is calculated, and a real category distribution is formed. The real category distribution is a probability distribution vector with a length equal to the total number of attraction categories. Each element represents the visit percentage of the corresponding category, and the sum of all elements equals one. The real category distribution reflects the interests and preferences of tourists. Tourists with a high preference for natural landscapes have a larger visit percentage in the natural landscape category.

[0182] Furthermore, the generation frequency of each attraction category in the proxy tourist sequence is counted, and the generation proportion of each attraction category is calculated to form the proxy category distribution. The calculation method of the proxy category distribution is the same as that of the real category distribution. Ideally, the proxy category distribution should be close to the real category distribution, indicating that the proxy tourist sequence retains the category preference characteristics of tourists.

[0183] Furthermore, the difference between the true category distribution and the proxy category distribution can be measured using either the cross-entropy loss function or the KL divergence. When using the cross-entropy loss function, the access percentage of each category in the true category distribution is multiplied by the logarithm of the corresponding category percentage in the proxy category distribution, and the sum is taken over all categories, with the negative value obtained to obtain the cross-entropy loss. When using the KL divergence, the access percentage of each category in the true category distribution is multiplied by the logarithm of the true percentage divided by the proxy percentage, and the sum is taken over all categories to obtain the KL divergence loss.

[0184] It should be noted that the smaller the category preference loss value, the more similar the proxy tourist sequence is to the real sequence in terms of attraction category distribution, and the better the tourist's category preference is preserved; a category preference loss of zero indicates that the two distributions are completely consistent; a large category preference loss indicates that the generator network has excessively perturbed the attraction category information in the process of privacy protection, which may cause the recommendation system to fail to accurately capture user preferences.

[0185] Preferably, a category importance weight is introduced into the category preference loss; the category importance weight is set according to the contribution of different attraction categories to the recommendation utility; higher weights are given to categories with a greater impact on the recommendation effect, and lower weights are given to categories with a smaller impact on the recommendation effect; when calculating cross-entropy or KL divergence, the loss term of each category is multiplied by the corresponding category importance weight; the weighted category preference loss focuses more on the retention of important categories and optimizes the recommendation utility.

[0186] In an optional embodiment, in addition to the overall category distribution, category consistency at the trajectory segment level is further constrained; for each trajectory segment, the true category distribution and the surrogate category distribution within the segment are calculated respectively; the category preference loss at the segment level is calculated; the category preference loss of all trajectory segments is averaged as the fine-grained category preference loss; the fine-grained constraint ensures that the category preference of each trajectory segment is preserved, avoiding the situation where the overall distribution is similar but the local segment categories deviate significantly.

[0187] S4.2: Calculate the adjacent order loss based on the adjacent visitor sequence and the adjacent visitor behavior sequence of the agent tourist sequence. The adjacent order loss constrains the generator network to preserve the tourist's attraction visit order pattern.

[0188] Specifically, extract all adjacent visit point combinations from the real tourist behavior sequence, where an adjacent visit point combination is an ordered pair consisting of two consecutively visited attractions; for a real tourist behavior sequence containing several visit points, it contains the number of visit points minus one adjacent visit point combination; record the preceding and following attraction categories for each adjacent visit point combination to form a real category transition sequence.

[0189] Furthermore, all adjacent visit point combinations in the proxy visitor sequence are extracted, and the preceding and following attraction categories of each combination are recorded to form a proxy category transfer sequence. The length of the proxy category transfer sequence is the same as that of the real category transfer sequence, which is equal to the sequence length minus one. The category transfer pairs at corresponding positions of the real category transfer sequence and the proxy category transfer sequence are compared one by one.

[0190] Furthermore, we define a sequence violation index, which counts the number of transition pairs in the surrogate category transition sequence that are inconsistent with the real category transition sequence. We iterate through all positions, and when the preceding or following category of a certain position in the surrogate category transition sequence is different from the corresponding position in the real category transition sequence, it is counted as a sequence violation. We divide the number of sequence violations by the total length of the category transition sequence to obtain the normalized sequence violation rate.

[0191] It should be noted that the adjacent order loss is defined as the order violation rate. The adjacent order loss ranges from zero to one. The closer the value is to zero, the more consistent the visit order of the proxy tourist sequence is with the real sequence, and the better the temporal dependence of the attraction visits is preserved. The larger the value is, the more the proxy sequence disrupts the original visit order, which may destroy the logical coherence of the tourist's visit behavior.

[0192] Preferably, an edit distance algorithm is used to calculate a more refined adjacency order loss; the edit distance algorithm calculates the minimum number of edit operations required to convert the real class transfer sequence into a surrogate class transfer sequence; the edit operations include three types: insertion, deletion and replacement; the edit distance is divided by the sequence length to obtain the normalized edit distance, which is used as the adjacency order loss; the edit distance method takes into account the sequence alignment problem and has better robustness to differences in sequence length.

[0193] In an optional embodiment, a transition probability constraint is introduced to replace hard order matching; from the attraction transition probability matrix obtained in step 1.7, the transition probability of each adjacent combination of visit points in the real tourist behavior sequence is queried; for adjacent combination of visit points in the proxy tourist sequence, if the transition probability of the combination is higher than a preset reasonableness threshold, it is considered that the transition conforms to a common access pattern and is not counted as a sequence violation; if the transition probability is lower than the threshold, it indicates that an unreasonable access transition has been generated and is counted as a sequence violation; the preset reasonableness threshold is preferably set to 0.05; the transition probability constraint allows the proxy sequence to adjust the access order within a reasonable range, providing a more flexible space for privacy protection.

[0194] S4.3: Combine the identity re-identification probability, recommendation ranking bias, category preference loss, and adjacent order loss according to their weights to construct the total loss function of the generator network, where the total loss function guides the optimization direction of the generator parameters.

[0195] Specifically, the total loss function of the generator network is defined as a weighted linear combination of four loss terms: privacy loss, utility loss, category loss, and order loss. The privacy loss is calculated based on the identity re-identification probability, the utility loss is calculated based on the recommendation ranking bias, the category loss is the category preference loss, and the order loss is the adjacent order loss.

[0196] Furthermore, the objective of calculating the privacy loss term is to minimize the probability that the generator network will cause the proxy visitor sequence to be re-identified by the privacy discriminator. Using the adversarial training approach, the privacy loss term is set as a negative log-likelihood function. The privacy loss term is obtained by subtracting the identity re-identification probability from the calculation, taking the natural logarithm, and then taking the negative value. The privacy loss term prompts the generator to generate proxy sequences that are difficult to be re-identified.

[0197] Furthermore, the objective of calculating the utility loss term is to minimize the difference in recommendation effectiveness between the agent tourist sequence and the real tourist behavior sequence; the utility loss term directly uses the recommendation ranking bias value; the smaller the recommendation ranking bias, the smaller the utility loss term, indicating better preservation of recommendation utility; the utility loss term and the privacy loss term have an inherent conflicting relationship, the stronger the privacy protection, the greater the recommendation utility loss.

[0198] It should be noted that weight parameters are set for each of the four loss terms, and these weight parameters control the relative importance of each loss term in the total loss function. Four weight parameters are defined: privacy weight, utility weight, class weight, and order weight. The total loss function of the generator network is calculated as follows: privacy weight multiplied by privacy loss term, plus utility weight multiplied by utility loss term, plus class weight multiplied by class loss term, plus order weight multiplied by order loss term. The sum of the four weight parameters does not need to be equal to one and can be set independently.

[0199] Preferably, the four weight parameters are set as follows: privacy weight is set to 1, utility weight is set to 1, category weight is set to 0.5, and order weight is set to 0.3. The weight setting gives equal importance to privacy protection and recommendation utility, with category preference and access order serving as auxiliary constraints. By adjusting the weights, the balance point of the privacy-utility trade-off can be changed. Increasing the privacy weight improves privacy protection, while increasing the utility weight improves recommendation accuracy.

[0200] In an optional embodiment, a dynamic weight adjustment strategy is adopted to adaptively adjust the four weight parameters according to the training progress. In the early stage of training, the utility weight and category weight are increased, while the privacy weight is decreased, so that the generator first learns to retain the recommendation utility and category preference. In the middle and later stages of training, the privacy weight is gradually increased to strengthen the privacy protection capability. The weight adjustment strategy adopts linear decay or cosine annealing scheduling. The dynamic weight strategy balances training stability and final performance, and avoids the training from being difficult to converge due to excessively strong privacy constraints in the early stage.

[0201] S4.4: Based on the total loss function of the generator network, the backpropagation algorithm and gradient descent optimizer are used to update all learnable parameters of the generator network.

[0202] Specifically, the gradient of the generator network's total loss function with respect to all parameters of the generator network is calculated. The gradient calculation is backpropagated from the total loss function to each learnable parameter of the encoder module, privacy-conditional fusion module, and decoder module through automatic differentiation. The learnable parameters include the network weight matrix, bias vector, embedding matrix, and batch normalization parameter.

[0203] Furthermore, an adaptive learning rate optimizer is used to perform parameter updates; the adaptive learning rate optimizer is preferably the Adam optimizer or the AdamW optimizer; the Adam optimizer maintains the first-order moment estimate and the second-order moment estimate of each parameter, and adaptively adjusts the update step size of each parameter according to historical gradient information; the learning rate of the Adam optimizer is preferably set to between 0.0001 and 0.001.

[0204] Furthermore, a parameter update operation is performed, subtracting the learning rate multiplied by the gradient of each parameter to obtain the updated parameter value; for optimizers using momentum, the parameter update also considers the exponential moving average of historical gradients; after the parameter update, the representational power of the generator network is adjusted, generating different proxy visitor sequences in the next training batch.

[0205] It should be noted that gradient clipping is performed to avoid gradient explosion. Gradient clipping sets a maximum value for the gradient norm. When the calculated gradient norm exceeds the maximum value, the gradient is scaled down to the maximum value. The maximum gradient norm is preferably set to 5.0. Gradient clipping improves the numerical stability of training, especially in avoiding gradient overflow when dealing with long sequences.

[0206] Preferably, a learning rate preheating and decay strategy is introduced. The learning rate preheating strategy involves linearly increasing the learning rate from zero to a set initial learning rate within the first few batches of training. The number of preheating batches is preferably set to one thousand batches. Learning rate preheating avoids drastic parameter fluctuations caused by initial gradient instability. In the later stages of training, a learning rate decay strategy is adopted, in which the learning rate is gradually reduced according to a preset decay rate. The decay rate is preferably set to decay to 0.9 times the original value for every ten thousand batches. Learning rate decay helps the model finely adjust parameters in the later stages of training and converge to a better solution.

[0207] In an optional embodiment, gradient accumulation is used to handle large-batch training; gradient accumulation accumulates the gradients of multiple small batches before performing a parameter update; the number of accumulated batches is preferably set to four to eight small batches; gradient accumulation is equivalent to increasing the batch size, improving training stability and convergence speed, while avoiding the problem of insufficient GPU memory caused by a single large batch; the accumulated gradient is cleared to zero after the parameter update, and the next round of accumulation begins.

[0208] S4.5: Enhance the discrimination capabilities of the privacy discriminator and the recommendation utility discriminator.

[0209] Specifically, the training objective of the privacy discriminator is to maximize the accuracy of identifying real tourists. A privacy discriminator loss function is constructed, which is the cross-entropy classification loss. The real tourist behavior sequence is input into the privacy discriminator to obtain the predicted tourist identity probability distribution. The cross-entropy loss is calculated by comparing the predicted probability distribution with the real tourist identity labels. The smaller the cross-entropy loss, the stronger the privacy discriminator's ability to identify real tourists.

[0210] Furthermore, the proxy visitor sequence generated by the generator is also input into the privacy discriminator to obtain the identity prediction probability distribution of the proxy sequence; the real label of the proxy sequence is still the original visitor identity; the cross-entropy loss between the proxy sequence prediction probability and the real label is calculated; the proxy sequence loss term prompts the privacy discriminator to learn to identify the original identity from the perturbed proxy sequence, simulating a stronger attack capability.

[0211] Furthermore, the total loss function of the privacy discriminator is a weighted sum of the real sequence loss term and the proxy sequence loss term; the weight of the real sequence loss term is set to 0.5, and the weight of the proxy sequence loss term is set to 0.5; the gradient is calculated based on the total loss function of the privacy discriminator, and all learnable parameters of the privacy discriminator network are updated using the Adam optimizer; the learning rate of the privacy discriminator is preferably set to 0.0005.

[0212] It should be noted that the training objective of the recommendation utility discriminator is to learn accurate user interest representations and attraction recommendation ratings; the recommendation utility discriminator loss function is constructed, which includes recommendation ranking loss and rating regression loss; the recommendation ranking loss adopts Bayesian personalized ranking loss or list-level ranking loss, so that relevant attractions are ranked before irrelevant attractions in the recommendation list; the rating regression loss adopts mean squared error loss, so that the predicted rating is close to the actual user's preference rating for attractions.

[0213] Preferably, training samples are prepared for the recommendation utility discriminator. The training samples include tourist sequences, positive sample attractions, and negative sample attractions. Positive sample attractions are attractions that tourists have actually visited, representing attractions that users are interested in. Negative sample attractions are attractions that tourists have not visited, and are randomly sampled from all attractions or selected using a difficult negative sample mining strategy. The recommendation utility discriminator learns to assign high recommendation scores to positive sample attractions and low recommendation scores to negative sample attractions.

[0214] In an optional embodiment, an alternating training strategy is used to update the generator and discriminator. In each training batch, the discriminator is trained for several steps with the generator parameters fixed, and then the generator is trained for several steps with the discriminator parameters fixed. The discriminator training steps are preferably set to three to five steps, and the generator training steps are set to one step. The alternating training strategy balances the training progress of the generator and the discriminator, and avoids one side becoming too strong, which leads to an imbalance in adversarial training. When the discriminator is too strong, the generator has difficulty deceiving the discriminator, and the gradient vanishing causes training to stagnate.

[0215] S4.6: After each training batch or every few batches, evaluate the training convergence of the generator network and determine whether the preset training termination conditions are met.

[0216] Specifically, the training termination conditions are defined by the judgment criteria of privacy goal achievement, utility goal achievement, and training stability. When all three criteria are met simultaneously, the training is considered to have converged and the training process is terminated. If any criterion is not met, training continues.

[0217] Furthermore, the privacy goal achievement criteria require that the average identity re-identification probability on the verification set be lower than a preset re-identification threshold; several tourist behavior sequences are extracted from the verification set, and corresponding proxy tourist sequences are generated using the current generator network; the proxy tourist sequences are input into the privacy discriminator to calculate the identity re-identification probability of each proxy sequence; the identity re-identification probabilities of all verification samples are averaged to obtain the average re-identification probability of the verification set; the preset re-identification threshold is preferably set to 0.2, indicating that the probability of an attacker correctly identifying a tourist's identity through a proxy sequence does not exceed 20%.

[0218] Furthermore, the utility goal achievement criterion requires that the average recommendation ranking deviation on the validation set be lower than a preset deviation threshold; using the same validation samples as the privacy goal assessment, the recommendation ranking deviation between each proxy tourist sequence and the real tourist behavior sequence is calculated; the average recommendation ranking deviation of all validation samples is calculated to obtain the average recommendation ranking deviation of the validation set; the preset deviation threshold is preferably set to 0.15, indicating that the utility loss of using proxy sequences for recommendation does not exceed 15%.

[0219] It should be noted that the training stability criterion requires that the variation of the generator network's total loss function within a number of consecutive batches be less than a preset stability threshold; record the total loss function values ​​of the generator network for the most recent 100 training batches; calculate the standard deviation of the 100 values ​​as an indicator of loss fluctuation; when the loss fluctuation is less than the preset stability threshold, the training is considered to have reached stable convergence; the preset stability threshold is preferably set to 5% of the mean of the loss function.

[0220] Preferably, an early termination mechanism is introduced to avoid overfitting; the early termination mechanism monitors the changing trend of the validation set performance; when the average identity re-identification probability or average recommendation ranking bias of the validation set does not improve or begins to deteriorate for 20 consecutive evaluation cycles, early termination is triggered; the evaluation cycle is preferably set to once every 1000 training batches; early termination saves the model parameters at the moment when the validation set performance is at its best, avoiding the decline in generalization ability caused by continued training.

[0221] In an optional embodiment, a multi-objective Pareto optimization method is used to evaluate convergence. The Pareto optimization method treats privacy protection and recommendation utility as two conflicting optimization objectives. During training, the validation set privacy protection rate and recommendation accuracy are recorded at different training times. A privacy-utility Pareto front curve is plotted, and the points on the Pareto front curve represent the highest recommendation accuracy achievable at a given privacy protection rate. Convergence is determined when a new training result falls on the Pareto front and meets the minimum requirements for privacy and utility. Pareto optimization provides multiple balance points for selection.

[0222] S4.7: When the training convergence condition is met, save all parameters and configuration information of the current generator network to obtain the trained generator.

[0223] Specifically, all learnable parameters of the generator network are serialized and saved to the model file; the learnable parameters include the bidirectional long short-term memory network weights of the encoder module, the long short-term memory network weights of the decoder module, the attention mechanism parameters, the spot embedding matrix, the category embedding matrix, and the fully connected layer parameters; the model file adopts a common deep learning framework format, which supports cross-platform loading and deployment.

[0224] Furthermore, the configuration information of the generator network is saved, including network architecture parameters, embedding dimension, hidden layer dimension, number of network layers, and activation function type. The configuration information is saved in JSON or YAML format and used in conjunction with the model parameter file. When loading the model in the recommendation stage, the configuration information is read first to reconstruct the network structure, and then the parameter file is loaded to populate the network weights.

[0225] Furthermore, metadata information about the training process is saved, including the batch number when training is completed, the performance metrics of the final validation set, the total training time, and the criteria for convergence judgment. This metadata information is used for model version management and performance tracking. A unique version number is assigned to each model file, which includes the training date and performance identifier.

[0226] It should be noted that the trained generator is the only generative model used in S5; the privacy discriminator and recommendation utility discriminator are only used in the training phase and are no longer needed in the recommendation phase; the trained generator has learned the ability to generate privacy-preserving proxy sequences under a given dynamic privacy budget; in the recommendation phase, the current visitor behavior sequence of the new visitor and the calculated dynamic privacy budget are input, and the trained generator outputs the current proxy visitor sequence for the recommendation system to use.

[0227] Preferably, the trained generator is subjected to model compression and optimization; model compression techniques include weight pruning, quantization, and knowledge distillation; weight pruning removes connections with absolute weight values ​​less than a threshold, reducing the number of model parameters; quantization converts floating-point weights into low-bit integers, reducing model storage space and computational overhead; knowledge distillation trains small student models to mimic the output of large teacher models; the compressed generator reduces computational resource requirements and improves inference speed when deployed in the recommendation phase.

[0228] In an optional embodiment, a performance benchmark for the trained generator is established; the performance benchmark includes privacy protection rate, recommendation accuracy, inference latency, and throughput metrics on a standard test set; the performance of the trained generator is tested under different hardware environments; the performance test results are recorded in the model metadata for deployment decision reference; when the recommendation system has strict requirements for latency, a compressed model with fast inference speed is selected; when high accuracy is required, a complete uncompressed model is selected.

[0229] S5: In the recommendation phase, the current tourist behavior sequence and dynamic privacy budget are input into the trained generator to obtain the current agent tourist sequence. Based on the current agent tourist sequence, candidate attractions are selected from the attraction knowledge graph to generate a tourist recommendation list.

[0230] S5.1: In the recommendation phase, obtain the current visitor's access data, obtain the current visitor's behavior sequence according to the method in step S1, and calculate the current dynamic privacy budget according to the method in step S2.

[0231] S5.2: Input the current visitor behavior sequence and the current dynamic privacy budget into the trained generator to generate the current agent visitor sequence.

[0232] Specifically, the trained generator model file and configuration file are loaded from the model storage system; the generator network structure is reconstructed based on the network architecture parameters in the configuration file; the parameters saved in the model file are loaded into each layer of the generator network; after loading, the trained generator enters inference mode, and dropout and batch normalization updates during training are turned off.

[0233] Furthermore, following the method in step 3.2, each visit point in the current tourist behavior sequence is converted into an embedding vector; the attraction embedding matrix and category embedding matrix are queried, the visit time and stay duration are encoded, and they are concatenated to form the visit point embedding vector; all visit point embedding vectors are organized into the current embedding sequence, which is used as the encoder input of the trained generator.

[0234] Furthermore, following the method in step S3.3, the current dynamic privacy budget of each current trajectory segment in the current dynamic privacy budget allocation table is converted into a current privacy condition vector; the current dynamic privacy budget scalar is mapped to a high-dimensional vector through a fully connected layer; and the current privacy condition vector of its current trajectory segment is assigned to each visit point in the current visitor behavior sequence.

[0235] It should be noted that, according to the method in step 3.4, the decoder module of the trained generator generates each proxy access point in the current proxy visitor sequence step by step based on the encoded representation of the fused current privacy condition vector. During the generation process, privacy-preserving noise of corresponding intensity is injected according to the size of the current dynamic privacy budget. For current trajectory segments with small current dynamic privacy budgets, the generated proxy access points are significantly different from the original access points. For current trajectory segments with large current dynamic privacy budgets, the proxy access points are closer to the original access points.

[0236] Preferably, post-processing verification is performed on the generated current proxy visitor sequence. The post-processing verification checks the rationality of the current proxy visitor sequence, including the monotonicity of the visit time, the non-negativity of the stay duration, and the matching of the attraction's opening hours. When an unreasonable proxy visit point is detected, rule correction or resampling is adopted. If the visit time violates the monotonicity, it is adjusted to the previous visit time plus a reasonable interval. If the stay duration is negative, it is corrected to zero or a small positive value. If the visit time is outside the opening hours, it is adjusted to the nearest opening time period.

[0237] In optional embodiments, diverse generation options are provided; for the same current tourist behavior sequence, the trained generator can generate multiple different current agent tourist sequences; diverse agent sequences are generated by adjusting the sampling temperature or random seed during the decoding process; from multiple current agent tourist sequences, the sequence with the best privacy protection effect and the smallest recommended utility loss is selected as the final output; diversified generation provides multiple candidate solutions for privacy-utility trade-offs.

[0238] S5.3: Construct a scenic spot knowledge graph, which includes scenic spot entity nodes, scenic spot attributes, and relationship edges between scenic spots, for the selection and reasoning of candidate scenic spots.

[0239] Specifically, the scenic spot knowledge graph is represented by a graph database or a triplet storage structure; scenic spot entity nodes correspond to each scenic spot within the scenic area, and the nodes contain attribute information such as scenic spot identifier, name, category, sensitivity level, geographical location, and opening time; the relationship edges between scenic spots represent the association between different scenic spots, and the relationship types include same category relationship, spatial proximity relationship, visitor co-occurrence relationship, and temporal access relationship.

[0240] Furthermore, the same-category relationship connects scenic spot nodes belonging to the same scenic spot category, indicating that these scenic spots have similar functional attributes and tourist appeal; the spatial proximity relationship connects scenic spot nodes that are geographically close, with the distance threshold preferably set to 500 meters; the tourist co-occurrence relationship connects scenic spot nodes that are frequently visited by tourists in the same visit, and the co-occurrence frequency is obtained through statistics from historical tourist trajectory sets.

[0241] Furthermore, the temporal access relationship connects the scenic spot nodes that are associated with the order of their visits, with the relationship direction pointing from the preceding scenic spot to the following scenic spot; the strength of the temporal access relationship is quantified by the conditional transition frequency calculated in step S1.7; scenic spot pairs with high conditional transition frequencies establish stronger temporal access relationship edges in the knowledge graph; the temporal access relationship reflects the typical visit paths and sequence patterns of tourists.

[0242] It should be noted that the scenic spot knowledge graph is built offline before system deployment, or dynamically updated based on real-time data during operation. When built offline, data is extracted from the scenic spot attribute library, historical visitor trajectory collection, and geographic information system to create nodes and relationship edges in batches. When updated dynamically, changes in co-occurrence relationships and temporal access relationships are statistically analyzed from new visitor trajectory data periodically, and the knowledge graph is updated incrementally.

[0243] Preferably, the relationship edges of the scenic spot knowledge graph are assigned weight attributes; the weight attributes quantify the strength or importance of the relationship; the weight of the same category relationship is set according to the fine-grained similarity of the category, and the weight of the same sub-category is higher than that of the same major category; the weight of the spatial proximity relationship is inversely proportional to the distance, and the closer the distance, the higher the weight; the weight of the visitor co-occurrence relationship is equal to the co-occurrence frequency; the weight of the temporal visit relationship is equal to the condition transition frequency; the relationship weight is used for reasoning of the knowledge graph and ranking of candidate scenic spots.

[0244] In optional embodiments, semantic embedding representations of attraction entities are introduced to enhance the expressive power of the knowledge graph; knowledge graph embedding algorithms, such as TransE, DistMult, or ComplEx, are used to map attraction nodes and relation edges into a low-dimensional vector space; in the vector space, attraction node vectors with similar semantics are closer together; the semantic embedding representation captures the implicit associations between attractions and supports candidate attraction retrieval based on vector similarity; the embedded vectors are concatenated with attraction attribute vectors to form a comprehensive attraction representation that integrates structured and semantic information.

[0245] S5.4: Based on the access patterns of the current agent tourist sequence in the scenic spot knowledge graph, select a set of candidate scenic spots that match the current agent tourist sequence through graph reasoning.

[0246] Specifically, extract the list of attraction identifiers for the attractions already visited in the current agent tourist sequence; locate the attraction entity nodes corresponding to multiple attractions in the attraction knowledge graph as the starting point nodes for the query; starting from each starting point node, traverse the relationship edges of the knowledge graph to find neighboring attraction nodes that are related to the starting point node.

[0247] Furthermore, multi-hop graph traversal is performed based on different relationship types; for same-category relationships, all scenic spot nodes of the same category as the starting node are found and added to the candidate set; for spatial proximity relationships, scenic spot nodes that are geographically close to the starting node are found; for temporal access relationships, scenic spot nodes that are frequently visited by the starting node in the historical trajectory are found; for tourist co-occurrence relationships, scenic spot nodes that frequently co-occur with the starting node are found.

[0248] Furthermore, the candidate attraction set is initially filtered to remove attractions that do not meet the basic conditions. The basic conditions include: the candidate attraction has not been visited in the current agent visitor sequence to avoid duplicate recommendations; the opening hours of the candidate attraction match the current time to ensure that it is currently accessible; and the geographical location of the candidate attraction is within a reasonable access distance, preferably within a 10-kilometer radius of the current location.

[0249] It should be noted that during the graph traversal, the association score of candidate attractions is calculated using the weight attributes of relation edges; for the same candidate attraction reached through multiple relation paths, the weights of each path are summed to obtain the total association score; the higher the association score, the more the candidate attraction matches the access pattern of the current agent tourist sequence; the association score serves as an important feature for subsequent recommendation ranking.

[0250] Preferably, a graph neural network model is introduced to enhance the graph reasoning capability; the graph neural network model performs message passing and feature aggregation on the scenic spot knowledge graph; each scenic spot node aggregates the feature information of its neighboring nodes through multi-layer propagation of the graph neural network; the graph neural network outputs the updated representation vector of each scenic spot node; the similarity between the overall representation vector of the current agent tourist sequence and the representation vector of the candidate scenic spots is calculated as the candidate scenic spot score for graph reasoning.

[0251] In an optional embodiment, a collaborative filtering method is combined to expand the candidate attraction set. The collaborative filtering method is based on the user-attraction interaction matrix to find other tourists with similar access patterns to the current tourist. Attractions that similar tourists have visited but the current tourist has not visited are extracted and added to the candidate set. The collaborative filtering method captures the collective wisdom of the user group and discovers potential associations that are not explicitly encoded in the knowledge graph. Collaborative filtering and graph reasoning complement each other to improve the coverage and diversity of candidate attractions.

[0252] S5.5: Calculate the recommendation utility score, privacy penalty, and opening time matching for each candidate attraction in the candidate attraction set for the current agent visitor sequence.

[0253] Specifically, the recommendation utility score quantifies the expected effect of recommending the attraction; the current agent tourist sequence is input into the recommendation utility discriminator network trained simultaneously during the training phase; according to the sequence encoding module of the recommendation utility discriminator in step S3.6, the current agent tourist sequence is encoded into the current user interest representation vector; the current user interest representation vector captures the attraction preference pattern of the current tourist based on historical visit behavior.

[0254] Furthermore, from the scenic spot representation matrix of the recommendation utility discriminator network, the scenic spot representation vector of each candidate scenic spot in the candidate scenic spot set is extracted; the inner product or cosine similarity between the current user's interest representation vector and the representation vector of each candidate scenic spot is calculated; the inner product or cosine similarity value is used as the basic recommendation utility score of the candidate scenic spot; the higher the similarity, the better the match between the candidate scenic spot and the current tourist's interests.

[0255] Furthermore, the popularity feature of candidate attractions is introduced to adjust the recommendation utility score; the popularity feature is based on the total number of visits to candidate attractions according to the historical tourist trajectory set; candidate attractions with high number of visits are popular attractions, and those with low number of visits are unpopular attractions; in order to avoid over-recommendation of popular attractions leading to homogenization of recommendations, the popularity is logarithmically transformed and normalized; the normalized popularity is multiplied by the popularity weight coefficient and added to the basic recommendation utility score.

[0256] It should be noted that the recommendation utility score comprehensively considers both personalized matching degree and attraction popularity; personalized matching degree ensures that the recommendation matches the current interests and preferences of tourists; popularity adjustment balances personalization and public acceptance, avoiding recommendations of overly unpopular or substandard attractions; the popularity weight coefficient is preferably set to 0.1 to 0.2, so that personalized matching dominates.

[0257] Preferably, a diversity penalty mechanism is introduced to avoid the recommendation list being too monotonous. The diversity penalty mechanism calculates the similarity between candidate attractions and recommended attractions. When a candidate attraction is in the same category, geographically close, or has highly similar attributes as a recommended attraction, a penalty is imposed on the recommendation utility score of the candidate attraction. The penalty intensity is proportional to the similarity. The diversity penalty encourages the recommendation list to include attractions of different categories and regions, thereby improving the richness of tourists' travel experience.

[0258] In an optional embodiment, the recommendation utility score is dynamically adjusted in conjunction with contextual features. These contextual features include the current time, weather conditions, scenic area crowding level, and the tourist's remaining visit time. Candidate attractions that are not open during the current time are filtered out based on the current time. The scores of candidate attractions suitable for the current weather are increased based on the weather conditions, for example, the scores of indoor attractions are increased on rainy days. The scores of overcrowded attractions are decreased based on the scenic area crowding level. Candidate attractions that are too far away or take too long to visit are filtered out based on the tourist's remaining visit time. The contextual adjustment makes the recommendation more in line with the current actual situation.

[0259] Specifically, the privacy penalty item quantifies the additional privacy leakage risk that the recommendation of the attraction may lead to; the sensitivity level of the candidate attraction is read from the attraction attribute library; the sensitivity level has been defined in step 1.2, and the numerical range is one to five; the sensitivity level is normalized to a numerical range of zero to one, and the normalization method is to subtract one from the sensitivity level and then divide by four; the normalized sensitivity level is used as the basic component of the privacy penalty item.

[0260] Furthermore, the visit frequency of candidate attractions in the historical visitor trajectory set is statistically analyzed. The visit frequency is calculated by dividing the number of visitors to the candidate attraction by the total number of historical visitors. The lower the visit frequency, the more niche the candidate attraction is, and the more specific the visitor group is, which may increase the risk of identity verification. The frequency penalty factor is defined as one minus the visit frequency. Candidate attractions with low visit frequency have a large frequency penalty factor, while candidate attractions with high visit frequency have a small frequency penalty factor.

[0261] Furthermore, a privacy penalty item is calculated by combining the sensitivity level and access frequency; the privacy penalty item is the weighted sum of the normalized sensitivity level and the frequency penalty factor; the sensitivity level weight is preferably set to 0.6, and the frequency penalty factor weight is preferably set to 0.4; the larger the value of the privacy penalty item, the higher the privacy risk brought by recommending the candidate attraction; when ranking recommendations, a high privacy penalty item reduces the overall score of the candidate attraction.

[0262] Preferably, the weight of privacy penalty items is adjusted according to the current privacy preferences of tourists; for tourists with a high privacy protection level, the weight of privacy penalty items in the overall score is increased to strengthen the suppression of highly sensitive candidate attractions; for tourists with a low privacy protection level, the weight of privacy penalty items is reduced to give priority to recommendation utility; personalized weight adjustment respects tourists' privacy and autonomous choice.

[0263] In an optional embodiment, dynamic privacy budget consumption monitoring is introduced; the privacy budget consumed by the current tourist at the attractions visited during the current tour is recorded; the remaining available privacy budget is calculated; when the remaining privacy budget is low, the weight of privacy penalty items is increased, and new attractions are recommended more cautiously; when the remaining privacy budget is sufficient, the weight of privacy penalty items is reduced, allowing for the recommendation of more diverse candidate attractions; the dynamic monitoring mechanism ensures that the privacy budget is not exceeded throughout the entire tour.

[0264] Specifically, the opening time matching item quantifies the degree of matching between the opening time of candidate attractions and the current time; the opening time information of candidate attractions is read from the attraction attribute library; the opening time information includes the start time and end time of opening; the current system time is obtained as the reference time for recommendation generation; and it is determined whether the current time is within the opening time range of candidate attractions.

[0265] Furthermore, if the current time is within the opening hours of the candidate attractions, the remaining opening time before the closing time is calculated. The remaining opening time is then compared with the average visit time for that attraction. If the remaining opening time is greater than or equal to 1.5 times the average visit time, the opening time matching item is set to 1, indicating that there is ample time. If the remaining opening time is less than the average visit time, the opening time matching item is set to 0.3, indicating that time is tight. If the remaining opening time is between the two, the opening time matching item is calculated using linear interpolation.

[0266] Furthermore, if the current time is outside the opening hours of the candidate attractions, the next opening time of the candidate attractions is checked; the waiting time from the current time to the start time of the next opening is calculated; if the waiting time is less than 30 minutes, the opening time matching item is set to 0.5, indicating that you can visit after a short wait; if the waiting time is greater than or equal to 30 minutes, the opening time matching item is set to 0.1, indicating that the attraction is not suitable for recommendation at the moment.

[0267] It should be noted that the opening time matching item ensures that the recommended candidate attractions are accessible or about to open at the current time; recommending candidate attractions that are closed and will not be open in the short term will reduce the usability and user satisfaction of the recommendation system; by using the opening time matching item, the ranking of currently accessible candidate attractions is improved in the overall score, while suppressing inaccessible candidate attractions.

[0268] Preferably, the opening time matching is optimized based on the visitor's planned departure time; when the visitor sets a planned departure time in the system, it is checked whether the visit time of the candidate attractions plus the current time exceeds the planned departure time; if it does, the opening time matching item of the candidate attraction is reduced to avoid recommending attractions that cannot be completed within the planned time; time planning matching improves the feasibility of recommendations.

[0269] In an optional embodiment, a seasonal opening adjustment is introduced; some candidate attractions are only open during specific seasons or holidays; the seasonal opening identifier of candidate attractions is read from the attraction attribute database; it is determined whether the current date is within the seasonal opening period of the candidate attractions; the opening time matching item of candidate attractions in non-open seasons is set to zero, and they are completely excluded from the recommendation list; the seasonal adjustment avoids recommending candidate attractions that are not open in the current season.

[0270] S5.6: Based on the recommendation utility score, privacy penalty item, and opening time matching item, calculate the comprehensive recommendation score of the candidate attractions and generate a tourist recommendation list.

[0271] Specifically, combined weights are set for the recommendation utility score, privacy penalty item, and open time matching item; three weight parameters are defined: utility weight, privacy weight, and time weight; the utility weight controls the proportion of the recommendation utility score in the overall score, the privacy weight controls the proportion of the privacy penalty item, and the time weight controls the proportion of the open time matching item.

[0272] Furthermore, the preferred settings for the three weight parameters are: utility weight is set to 0.5, privacy weight is set to 0.3, and time weight is set to 0.2. The maximum utility weight ensures that recommendation accuracy is the primary goal; the secondary privacy weight reflects the importance of privacy protection; and the smaller time weight serves as an auxiliary constraint. The weight configuration balances the three dimensions of recommendation accuracy, privacy security, and practicality.

[0273] Furthermore, calculate the comprehensive recommendation score for each candidate attraction. The comprehensive recommendation score is calculated as follows: utility weight multiplied by the recommendation utility score, minus privacy weight multiplied by the privacy penalty item, and plus time weight multiplied by the opening time matching item. A negative sign before the privacy penalty item indicates a penalty effect, and the larger the value, the lower the comprehensive score. Sort all candidate attractions from highest to lowest comprehensive recommendation score.

[0274] It should be noted that the top few candidate attractions with the highest comprehensive recommendation scores are selected from the sorted candidate attraction list to form the final tourist recommendation list; the length of the recommendation list is preferably set to ten to twenty attractions; a recommendation list that is too short limits user selection, while a recommendation list that is too long increases the user's decision-making burden; the tourist recommendation list is arranged in order of comprehensive score, with the candidate attraction with the highest score at the top of the list.

[0275] Preferably, post-processing optimization is performed on the tourist recommendation list; post-processing optimization includes deduplication, diversity adjustment, and route optimization; the deduplication operation removes attractions in the recommendation list that are duplicates of attractions already visited by the current agent tourist sequence; the diversity adjustment checks the proportion of attractions of the same category in the recommendation list, and when the proportion of attractions of a certain category exceeds 50%, some attractions of the same category are replaced with attractions of other categories; the route optimization adjusts the recommendation order based on the geographical location of the candidate attractions to make the visiting route more reasonable and reduce the round-trip distance.

[0276] In an optional embodiment, a recommendation reason is attached to each candidate attraction in the tourist recommendation list; the recommendation reason is generated based on the high rating sources of that candidate attraction; if the recommendation utility score contributes the most, the recommendation reason is that it is recommended to you based on your access preferences; if the opening time matching item contributes the most, the recommendation reason is that it is currently open and there is ample time; if the knowledge graph association score is high, the recommendation reason is that it is related to a certain attraction you have already visited; the recommendation reason improves the interpretability and user trust of the recommendation, and helps tourists understand the basis for the recommendation.

[0277] In summary, this invention achieves differentiated protection for high-risk leakage links by calculating and allocating dynamic privacy budgets based on trajectory segment risk values, avoiding uniform noise that could impair recommendation utility. It leverages a dual-discriminator approach, combining privacy and utility, to counteract training and constraints based on category preference and adjacent order loss, enabling the generator to retain user preferences and access patterns while concealing identity, thus achieving a balance between privacy and recommendation. Furthermore, it utilizes proxy sequences to infer candidate attractions in a knowledge graph and introduces privacy penalties and opening time matching to improve recommendation accuracy while ensuring security and timeliness.

[0278] Based on the teachings of the above embodiments, other aspects of the present invention also propose a system for balancing visitor privacy protection and recommendation utility based on generative adversarial networks, such as... Figure 2 As shown, it includes: The behavior sequence construction and statistics module is used to obtain tourist visit sequences, visit times, stay durations, and attraction categories, and to call the attraction attribute library to obtain the sensitivity level, geographical location, and opening hours of each visit point to generate tourist behavior sequences; it also counts the historical frequency of adjacent visit point combinations in tourist behavior sequences based on historical tourist trajectory sets. The dynamic privacy budget allocation module is used to calculate the risk value of a trajectory segment based on the sensitivity level, access time, and historical frequency of occurrence, and to allocate a dynamic privacy budget based on the risk value of the trajectory segment. The dual-discriminator adversarial generation module is used to input tourist behavior sequences and dynamic privacy budgets into the generator network during the training phase to generate proxy tourist sequences. The proxy tourist sequences are then input into the privacy discriminator and the recommendation utility discriminator, respectively, to obtain the identity re-identification probability and recommendation ranking bias. The generator parameter update module is used to update the generator parameters based on the identity re-identification probability, recommendation ranking deviation, category preference loss and adjacent order loss until the identity re-identification probability is lower than the preset re-identification threshold and the recommendation ranking deviation is lower than the preset deviation threshold, thus obtaining the trained generator. The personalized recommendation output module is used to input the current tourist behavior sequence and dynamic privacy budget into the trained generator during the recommendation stage to obtain the current agent tourist sequence, and select candidate attractions from the attraction knowledge graph based on the current agent tourist sequence to generate a tourist recommendation list.

[0279] This embodiment also provides a computer device applicable to the tourist privacy protection and recommendation utility balance method based on generative adversarial networks, including a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the tourist privacy protection and recommendation utility balance method based on generative adversarial networks proposed in the above embodiment.

[0280] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0281] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks as proposed in the above embodiments.

[0282] The storage medium proposed in this embodiment and the data storage method proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0283] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks, characterized in that, include: The system obtains visitor access sequences, visit times, stay durations, and attraction categories, and calls the attraction attribute library to obtain the sensitivity level, geographical location, and opening hours of each access point, generating a visitor behavior sequence; it also calculates the historical frequency of adjacent access point combinations in the visitor behavior sequence based on the historical visitor trajectory set. The risk value of the trajectory segment is calculated based on the sensitivity level, the access time, and the historical frequency of occurrence, and a dynamic privacy budget is allocated based on the risk value of the trajectory segment. During the training phase, the tourist behavior sequence and the dynamic privacy budget are input into the generator network to generate a proxy tourist sequence. The proxy tourist sequence is then input into the privacy discriminator and the recommendation utility discriminator to obtain the identity re-identification probability and recommendation ranking bias. The generator parameters are updated based on the identity re-identification probability, the recommendation ranking deviation, the category preference loss, and the adjacent order loss until the identity re-identification probability is lower than a preset re-identification threshold and the recommendation ranking deviation is lower than a preset deviation threshold, thus obtaining the trained generator. During the recommendation phase, the current tourist behavior sequence and dynamic privacy budget are input into the trained generator to obtain the current agent tourist sequence. Based on the current agent tourist sequence, candidate attractions are selected from the attraction knowledge graph to generate a tourist recommendation list.

2. The method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks as described in claim 1, characterized in that, The generation of the tourist recommendation list includes: Construct a scenic spot knowledge graph, wherein the scenic spot knowledge graph includes scenic spot entity nodes, scenic spot attributes, and relationship edges between scenic spots; Based on the access patterns of the current agent tourist sequence in the scenic spot knowledge graph, a set of candidate scenic spots matching the current agent tourist sequence is selected through graph reasoning; Calculate the recommendation utility score, privacy penalty, and opening time matching item for each candidate attraction in the candidate attraction set for the current agent tourist sequence; Based on the recommendation utility score, privacy penalty item, and opening time matching item, the comprehensive recommendation score of the candidate attractions is calculated, and a tourist recommendation list is generated.

3. The method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks as described in claim 2, characterized in that, The trained generator includes: Based on the difference in attraction category distribution between the agent tourist sequence and the real tourist behavior sequence, the category preference loss is calculated, wherein the category preference loss constrains the generator network to preserve the tourist's attraction category preference characteristics; Based on the adjacent visitor order relationship between the agent tourist sequence and the real tourist behavior sequence, the adjacent order loss is calculated, wherein the adjacent order loss constrains the generator network to preserve the tourist's attraction visit order pattern. The total loss function of the generator network is constructed by combining the identity re-identification probability, recommendation ranking bias, category preference loss and adjacent order loss according to weights, wherein the total loss function guides the optimization direction of the generator parameters; Based on the total loss function of the generator network, all learnable parameters of the generator network are updated using the backpropagation algorithm and the gradient descent optimizer. Enhance the discriminative capabilities of the privacy discriminator and the recommendation utility discriminator; After each training batch or every few batches, evaluate the training convergence of the generator network to determine whether the preset training termination condition is met. When the training convergence condition is met, all parameters and configuration information of the current generator network are saved to obtain the trained generator.

4. The method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks as described in claim 3, characterized in that, The training termination criteria include the judgment criteria for achieving privacy goals, achieving utility goals, and training stability.

5. The method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks as described in claim 3, characterized in that, The generator network adopts a sequence-to-sequence deep neural network architecture, comprising three main components: an encoder module, a privacy-conditional fusion module, and a decoder module. The encoder module is responsible for encoding the tourist behavior sequence into a high-dimensional semantic representation. The privacy-conditional fusion module is responsible for incorporating dynamic privacy budget information into the encoded representation. The decoder module is responsible for generating a proxy tourist sequence based on the fused representation.

6. The method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks as described in claim 3, characterized in that, The privacy discriminator network receives the proxy visitor sequence and the real visitor behavior sequence as input, and outputs the identity re-identification probability; the recommendation utility discriminator network receives the proxy visitor sequence and the real visitor behavior sequence, generates recommendation lists respectively, and calculates the recommendation ranking bias.

7. The method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks as described in claim 6, characterized in that, The privacy discriminator network includes a sequence encoding layer, a feature extraction layer, and a classification output layer. The sequence encoding layer encodes the input tourist sequence into a fixed-length feature vector. The feature extraction layer learns discriminative features. The classification output layer predicts the tourist identity identifier corresponding to the tourist sequence. The recommendation utility discriminator network includes a sequence encoding module and a recommendation generation module. The sequence encoding module encodes the tourist sequence into a user interest representation vector. The recommendation generation module calculates a recommendation score based on the user interest representation vector and the attraction representation vector, and generates a recommendation list.

8. A system for balancing tourist privacy protection and recommendation utility based on generative adversarial networks, based on the method for balancing tourist privacy protection and recommendation utility based on generative adversarial networks as described in any one of claims 1 to 7, characterized in that, include: The behavior sequence construction and statistics module is used to obtain tourist visit sequences, visit times, stay durations, and attraction categories, and to call the attraction attribute library to obtain the sensitivity level, geographical location, and opening hours of each visit point to generate tourist behavior sequences; and to count the historical frequency of adjacent visit point combinations in the tourist behavior sequences based on the historical tourist trajectory set. The dynamic privacy budget allocation module is used to calculate the risk value of the trajectory segment based on the sensitivity level, the access time, and the historical occurrence frequency, and allocate a dynamic privacy budget based on the risk value of the trajectory segment. The dual-discriminator adversarial generation module is used to input the tourist behavior sequence and the dynamic privacy budget into the generator network during the training phase to generate a proxy tourist sequence, and then input the proxy tourist sequence into the privacy discriminator and the recommendation utility discriminator respectively to obtain the identity re-identification probability and recommendation ranking bias. The generator parameter update module is used to update the parameters of the generator according to the identity re-identification probability, the recommendation ranking deviation, the category preference loss and the adjacent order loss, until the identity re-identification probability is lower than a preset re-identification threshold and the recommendation ranking deviation is lower than a preset deviation threshold, thus obtaining the trained generator. The personalized recommendation output module is used to input the current tourist behavior sequence and dynamic privacy budget into the trained generator during the recommendation stage to obtain the current agent tourist sequence, and select candidate attractions from the attraction knowledge graph based on the current agent tourist sequence to generate a tourist recommendation list.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the method for balancing visitor privacy protection and recommendation utility based on generative adversarial networks as described in any one of claims 1 to 7.