Federal learning processing system for privacy data of scenic spot users

By encrypting the privacy data of scenic spot users and uploading them with encrypted parameters, the privacy leakage problem in the traditional centralized data processing model is solved, data security aggregation and model accuracy are improved, data silos are broken, and a safe and efficient intelligent management solution for scenic spots is provided.

CN120744975APending Publication Date: 2025-10-03NANJING MOCHOU INTELLIGENT INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510921762.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Under the traditional centralized data processing model, there is a risk of leakage of scenic spot user privacy data, and data from different scenic spots are stored independently. Traditional federated learning is difficult to effectively coordinate, and the model generalization ability is limited.

Method used

The data encryption module is used to encrypt private data. By generating random double keys for spiral expansion and rearrangement, the encrypted private data is generated by combining the data preprocessing module and local model training. A parameter encryption upload module is constructed using a weighted directed graph, and parameter encryption is performed through permutation sequences and mask matrices to achieve secure parameter aggregation and transmission.

Benefits of technology

Effectively protect user privacy data security, achieve secure aggregation of data from each scenic spot node, improve model prediction accuracy, break data silos, and provide a safe and efficient scenic spot intelligent management solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744975A_ABST
    Figure CN120744975A_ABST
Patent Text Reader

Abstract

The invention discloses a federal learning processing system for privacy data of scenic spot users, and relates to the technical field of data processing and privacy protection. The system comprises a data acquisition module, a data preprocessing module, a data encryption module, a local model training module, a parameter encryption uploading module, a parameter aggregation module and a parameter encryption issuing module. The method comprises the following steps: acquiring privacy data of scenic spot users through a data acquisition module, desensitizing and preprocessing the data, arranging the data into a 2 * 3 matrix, and ensuring the data security through a secondary verification and privacy matrix transformation mode; the parameter encryption module performs topological transformation, matrix perturbation and mask confusion processing on training parameters by using a weighted directed graph encryption algorithm to realize secure transmission; the parameter aggregation module re-aggregates gradient and weight parameters after decrypting the parameters, retains personalized offsets and generates a global model. According to the system, the security of user privacy data is enhanced, and meanwhile, the model prediction precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data processing and privacy protection, and specifically relates to a federated learning processing system for scenic spot user privacy data. Background Art

[0002] With the development of the tourism industry, scenic spots are becoming increasingly digitalized, collecting a vast amount of visitor data. This data is of great value for optimizing scenic services and enhancing the visitor experience. However, the collection and utilization of user privacy data faces the following challenges: the traditional centralized data processing model leads to the potential leakage of sensitive information such as user identity information, user travel history, and consumption records; data from different scenic spots are stored independently and have different spatiotemporal characteristics. Traditional federated learning struggles to effectively coordinate cross-domain data, and the model's generalization capabilities are limited. Therefore, a method is needed that can effectively protect user privacy while breaking down data silos. Based on this, the present invention designs a technical solution to address this problem. Summary of the Invention

[0003] The purpose of the present invention is to provide a federated learning processing system for scenic spot user privacy data, which solves the security problem in the prior art that user privacy data and model training parameters are not encrypted at the same time.

[0004] The purpose of the present invention can be achieved through the following technical solutions: A federated learning processing system for scenic spot user privacy data, characterized by comprising: The data encryption module is used to encrypt the acquired private data consisting of name identifier, gender identifier, identity identifier, contact identifier, trajectory sequence, and consumption point sequence. Specifically: Arrange the name identifier, gender identifier, identity identifier, contact identifier, trajectory sequence, and consumption point sequence into a 2×3 privacy matrix; A random double key K=(K1,K2) is generated, where K1 is the spiral starting direction key, with a value range of 0-3, and each value corresponds to a direction, with 0 corresponding to the right, 1 corresponding to the bottom, 2 corresponding to the left, and 3 corresponding to the top. K2 is the step size factor, with a value of 1-5, which is used to control the step size increment of each spiral circle. Starting from the upper left corner (1,1) of the matrix, the spiral expansion begins in the direction specified by K1, and the direction changes alternately with each circle. The step size increases by K2, and the actual step size is limited by the matrix size. The matrix elements are rearranged according to the spiral traversal path to obtain the encrypted private data.

[0005] Furthermore, the data collection module is used to collect privacy data of scenic spot users. The privacy data mainly includes name, gender, ID number, mobile phone number, tour trajectory, and consumption records; the tour trajectory refers to the spatial record of the user's movement path and stay location in the scenic spot; the consumption record includes consumption time, consumption location and consumption amount.

[0006] Furthermore, the data preprocessing module is used to preprocess the acquired privacy data including the user's name, gender, ID number, mobile phone number, travel trajectory, and consumption record to obtain the name identifier, gender identifier, identity identifier, contact identifier, trajectory sequence, and consumption point sequence; and store the preprocessed privacy data in the server configured by the local node.

[0007] Furthermore, the preprocessing method is: After obtaining the name information, convert the Chinese names involved into pinyin letters, retain the English letters, and convert the pinyin letters and English letters into ASCII codes to obtain the processed name identifier; After obtaining gender information, different gender identifiers are assigned to males and females, with [1,0] representing males and [0,1] representing females. The ID number is processed by retaining the first six digits and randomly shuffling the last four digits, and the remaining digits are masked to obtain the identity identification; The first three digits of the mobile phone number are retained, and the last four digits are converted into hexadecimal, which is then processed using a mask to obtain the contact ID.

[0008] Furthermore, the preprocessing method is: Obtain the minimum rectangle covering the entire scenic area and divide it into several squares. Each square is assigned a grid coordinate according to its row and column. Each grid coordinate corresponds to a location in the scenic area. The grid coordinate includes a horizontal identifier and a vertical identifier. The horizontal identifier indicates the row number of the grid, and the vertical coordinate indicates the column number of the grid. The grid coordinate is obtained based on the row and column numbers. According to the user's tour trajectory information, any location where the user stays in any scenic spot for more than the set time T1 is marked as a stay point, and the grid coordinates corresponding to several stay points constitute the user's trajectory sequence; Obtain all the user's consumption records, convert the time in the consumption record into a digital representation in the format of year, month, day, hour and minute, represent the location using the corresponding grid coordinates, and then form a consumption point in the form of digital representation + grid coordinate representation + amount. Several consumption points arranged in chronological order constitute a consumption point sequence.

[0009] Furthermore, it also includes: The local model training module is used to train the model deployed on the local node of the scenic area with the help of decrypted encrypted privacy data, and generate corresponding training parameters. The training parameters include gradient, weight, iteration rounds and data size.

[0010] Furthermore, it also includes: The parameter encryption upload module is used to obtain and encrypt training parameters, specifically: A weighted directed graph G = (V, E, W) is constructed for the gradients and weights in the training parameters. This weighted directed graph is labeled the privacy parameter graph. Here, the node set V represents the node corresponding to each parameter, the edge set E is the set of connections between nodes, representing the dependencies between parameters, and the weight matrix W is the set of edges, where the edge weights represent the strength of the association between parameters. The adjacency matrix A is used to represent the connection between each node in the initial privacy parameter graph. Generate a permutation sequence π according to the iteration rounds, and rearrange the node order of the privacy parameter graph according to the permutation sequence π; use A` to represent the connection relationship between the nodes in the privacy parameter graph after the node order is rearranged; use W` to represent the weight matrix of the privacy parameter graph after the node order is rearranged; Generate a mask matrix M, and multiply the encrypted adjacency matrix A' by the mask matrix M to obtain a new adjacency matrix C; the mask matrix M is a matrix generated based on node degree centrality and edge weights; Convert the adjacency matrix C and weight matrix W' into one-dimensional data and add a checksum. Finally, upload the data to the central server for parameter aggregation. The checksum is expressed as ; The construction rules of the weighted directed graph G are as follows: (1) Arrange the gradient parameters into nodes v1, v2, ..., v n ; (2) Arrange the weight parameters into nodes v n+1 ,v n+2 ,……,v n+m ; (3) The iteration round is used as a global parameter to dynamically adjust the edge weight through the coefficient associated with the sine function; (4) The amount of data is proportional to the centrality of the node degree. The node degree is used to calculate the number of edges connecting each node in the graph, and the degree centrality of the node is obtained at the same time. The larger the amount of data, the higher the node degree centrality.

[0011] Furthermore, the formula for generating the permutation sequence π is: π(i)=(i+r 2 ) mod N; Where r represents the number of iterations and N represents the total number of nodes; Add random perturbations to the adjacency matrix A and transform the adjacency matrix A according to the transformation formula. The transformed adjacency matrix is ​​represented by A`. The transformation formula is: A`=A+ ϵ·D·diag(sin(r·eigenvalues(A))); Where ϵ is the perturbation coefficient, D is the degree matrix, and eigenvalues(A) is used to calculate the eigenvalues ​​of the adjacency matrix A; The transformation matrix T is generated using the iteration round r and the node index. The transformed W`=T·W·T-1, T=sin((i+j)·r+hash(i,j)), where i and j represent the node numbers in the privacy parameter graph structure.

[0012] Furthermore, the formula for generating the mask matrix is, M=round(tanh(degree(i)·degree(j)·W`)), where tanh is the hyperbolic tangent function with a range between -1 and 1. The product of node degree and edge weight is calculated using the tanh function, the result is mapped to a specific interval, and then rounded using the round function to obtain the original value of the binary mask matrix M, where degree(i) and degree(j) represent the degrees of node i and node j, respectively. The new adjacency matrix C is obtained by element-by-element multiplication of the adjacency matrix A` and the mask matrix M, expressed as C=A`⊙M.

[0013] Furthermore, it also includes: The parameter aggregation module is used to aggregate the decrypted local model parameters of each scenic spot node according to the corresponding weight and generate a global model; The parameter encryption and distribution module is used to encrypt the encrypted global model parameters and distribute them to the local models of each scenic spot node to update the local models of each scenic spot node.

[0014] Beneficial effects of the present invention: The present invention effectively solves the security problem of the existing technology that does not encrypt both user privacy data and model training parameters through dual encryption, and ensures the security of scenic spot user privacy data during collection, processing, transmission and training. With the help of the federated learning framework and graph encryption algorithm, the secure aggregation of node data in each scenic spot and the global model update are achieved, which not only breaks the data silos but also improves the model prediction accuracy, providing a safe and efficient solution for the intelligent management of scenic spots. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The present invention will be further described below with reference to the accompanying drawings.

[0016] Figure 1It is a flow chart of the system.

[0017] Figure 2 It is the flow chart of the data encryption module.

[0018] Figure 3 This is the flow chart of the parameter encryption upload module. DETAILED DESCRIPTION

[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0020] As a specific embodiment of the present invention, please refer to Figure 1 ,This invention designs a federated learning and processing system for scenic ,users’ privacy data; As Example 1 of this application, refer to Figure 2 , specifically including: The data encryption module is used to encrypt the acquired private data consisting of name identifier, gender identifier, identity identifier, contact identifier, trajectory sequence, and consumption point sequence. Specifically: Arrange the name identifier, gender identifier, identity identifier, contact identifier, trajectory sequence, and consumption point sequence into a 2×3 privacy matrix; A random double key K=(K1,K2) is generated, where K1 is the spiral starting direction key, with a value range of 0-3, and each value corresponds to a direction, with 0 corresponding to the right, 1 corresponding to the bottom, 2 corresponding to the left, and 3 corresponding to the top. K2 is the step size factor, with a value of 1-5, which is used to control the step size increment of each spiral circle. Starting from the upper left corner (1,1) of the matrix, the spiral expansion begins in the direction specified by K1, and the direction changes alternately with each circle. The step size increases by K2, and the actual step size is limited by the matrix size. The matrix elements are rearranged according to the spiral traversal path to obtain the encrypted private data. For example, setting the key K=(1,2) means the starting direction is downward and the step factor is 2. In the first round, the step size is 1, starting from (1,1), and moving 1 step in the direction "down" to (2,1); in the second round, the step size is 1+K2=3, but the matrix size is limited to 2×3, the actual step size is the minimum of 3 and the number of remaining spaces, the direction turns "right", and moves to (2,2)→(2,3)→(1,3); in the third round, the step size is 3+K2=5, the remaining spaces are (1,2), the direction turns "up", and moves to (1,2); the path sequence can be obtained, which is the traversal order (1,1)→(2,1)→(2,2)→(2,3)→(1,3)→(1,2). Finally, the original data is stored in the corresponding position of the new matrix according to the traversal order to form an encrypted matrix.

[0021] Upload the privacy matrix and privacy data to the local node server of the scenic spot for storage.

[0022] As the second embodiment of the present application, this embodiment specifically includes: The data collection module is used to collect private data from scenic area users. This private data primarily includes name, gender, ID number, mobile phone number, travel history, and consumption records. Travel history refers to the spatial record of a user's movement paths and locations within the scenic area; consumption records include specific information such as the time, location, and amount of consumption. The data collection module also transmits this private data to the data preprocessing module.

[0023] The data preprocessing module preprocesses the collected user privacy data, processes the corresponding data into the form required by the model and stores it in the server configured by the local node. The specific method of preprocessing is as follows: First, obtain the name information. If it is a Chinese name, convert it into pinyin form with all letters in lowercase. For English names, retain the original letters. According to the corresponding rules of ASCII code, convert the corresponding letters into the corresponding ASCII codes to form the processed name information. The processed name information is marked as the name identifier. For example, "Zhang San" becomes "122, 104, 97, 110, 103, 32, 115, 97, 110, 32, 97, 110" after preprocessing, and "John Curry" becomes "74, 111, 104, 110, 32, 67, 117, 114, 114, 121" after preprocessing.

[0024] Obtain the gender information. Use [1,0] to represent male and [0,1] to represent female; [1,1] and [0,0] are both meaningless; the processed information is marked as the gender identifier.

[0025] Obtain the ID card number information. Retain the first six digits, mask the middle eight digits, and randomly scramble the last four digits to hide the key identity recognition information. The processed ID card number is marked as the identity identifier; for example, process "11010519491231002X" into "110105********X020".

[0026] Obtain the mobile phone number information. Retain the first three digits, mask the middle four digits, and convert the last four digits into hexadecimal. Mark the processed mobile phone number information as the contact identifier; for example, for the mobile phone number "15912345678", retain the first three digits "159", mask the middle four digits with "****", and convert the last four digits into hexadecimal "0x35363737".

[0027] For the tour track information, perform grid processing on the scenic area plane. Divide it according to the size of the scenic area area. Specifically, obtain the plane map of the scenic area, establish a rectangular plane grid on the plane map, and the plane maintains the minimum area that can cover all positions of the scenic area; then divide the grid into a specified size, which is set by the administrator. Generally, it can be 500×500 or 1000×1000, and of course it can also be other sizes; then assign a horizontal identifier to each grid in the order from left to right. The horizontal identifier starts from 1 and ends at the last grid; and perform the same processing on the vertical grids in the order from top to bottom to obtain the vertical identifier, which also starts from 1 and ends at the last grid; thus forming the grid coordinates corresponding to each position in the scenic area, and the grid coordinates include the horizontal identifier and the vertical identifier; thus forming the grid coordinates corresponding to each position in the scenic area, and the grid coordinates include the horizontal identifier and the vertical identifier; According to the main staying location of tourists, here, the main staying location refers to the user staying at any scenic spot for more than T1; here, T1 is generally taken as twice the time required for the user to pass through the scenic spot; for example, if it takes ten minutes for the user to pass through any scenic spot, then T1 here is taken as twenty minutes; the user's visit to the scenic spot is continuously monitored to obtain the user's trajectory sequence composed of several grid coordinates; for example, a user mainly stays at the following locations, the shopping mall is at [234,123], and the scenic spot is at [567,789]. The approximate trajectory sequence can be expressed as [(234,123), (567,789)].

[0028] For the user's consumption record information, the time, location and amount features in the consumption record information are combined to form a consumption point. Each consumption point is formed in the form of time + grid coordinates corresponding to the location + amount; several consumption points form a consumption point sequence in chronological order; the time format here is obtained in the format of year, month, day, hour and minute; for example, if a souvenir worth 500 yuan is purchased in a shopping mall at 14:50 on June 20, 2025, the consumption record information can be expressed as [202506201450, (234, 123), 500].

[0029] After the above processing, the processed privacy data includes name identifier, gender identifier, identity identifier, contact identifier, trajectory sequence and consumption point sequence; As the third embodiment of the present application, this embodiment is implemented on the basis of the second embodiment, except that it further includes: The local model training module uses decrypted pre-processed data to train the model deployed at each scenic spot's local node and generate corresponding parameters. The specific steps of this process are as follows: A1. Decrypt the data to obtain the key K = (K1, K2). The privacy matrix is ​​obtained by inversely following the spiral encryption process. Based on the privacy matrix, the corresponding pre-processed data is retrieved from the scenic spot's local node server to prepare for input into the model.

[0030] A2. Data division: The decrypted pre-processed data is divided into training set, validation set, and test set. The training set accounts for 70% of the data, the validation set accounts for 15% of the data, and the test set accounts for 15% of the data.

[0031] A3. Train the model of the local node of each scenic spot. After the model training process is completed, the parameters, gradients, weights, iteration rounds, and data size parameters generated by the training are counted and uploaded to the parameter encryption module for subsequent parameter encryption.

[0032] See also Figure 3, parameter encryption upload module, reads the parameters generated after the local model training of each scenic spot node, and encrypts the parameters generated after the local model training. The specific steps are as follows: P1. Read the gradients, weights, iteration rounds, and data size parameters generated after model training. Build a weighted directed graph G = (V, E, W) for the parameters generated by local training at each scenic spot node. Mark this weighted directed graph as a privacy parameter graph. Use the adjacency matrix A to represent the connection relationship between each node in the initial privacy parameter graph. The G represents a weighted directed graph, the node set V represents the node corresponding to each parameter, where the parameters refer to the gradient and weight, the edge set E is the connection set between the nodes, representing the dependency relationship between the parameters, and the weight matrix W is the set of edges, where the weight of the edge represents the strength of the association between the parameters. The construction rules of the graph are as follows: (1) Arrange the gradient parameters into nodes v1, v2, ..., v n , (2) Arrange the weight parameters into nodes v n+1 ,v n+2 ,……,v n+m , (3) The iteration round is a global parameter that affects the calculation of edge weights. (4) The amount of data affects the degree centrality of the node. The node degree (degree function) is used to calculate the number of edges connecting each node in the graph. The degree centrality of the node reflects the importance of the node in the graph. The larger the amount of data, the higher the value of the importance representation in the graph structure.

[0033] P2, transform and encrypt the privacy parameter graph; The specific encryption process is to generate a permutation sequence π according to the iteration rounds and rearrange the node order. The calculation formula of π is π(i)=(i+r 2 ) mod N. In the calculation formula for π, r represents the number of iterations, and N represents the total number of nodes. Random perturbations are added to the adjacency matrix A, but certain graph invariants are maintained. The specific rules for transforming A are shown in the formula: A`=A+ ϵ·D·diag(sin(r·eigenvalues(A))), where ϵ is the perturbation coefficient, D is the degree matrix, and eigenvalues(A) calculates the eigenvalues ​​of the adjacency matrix A. The number of iterations and node indices are used to generate the transformation matrix T. Here, the transformed W`=T·W·T -1 , where T ij = sin((i+j)·r+hash(i,j)) ; A` represents the connection relationship between the nodes in the privacy parameter graph after the node order is rearranged; W` represents the weight matrix of the privacy parameter graph after the node order is rearranged.

[0034] P3, to further enhance security, generate a mask matrix M and multiply it with the encrypted adjacency matrix A'; Specifically, the mask is generated based on the node degree centrality and edge weight. The specific formula is as follows: ij =round(tanh(degree(i)·degree(j)·W` ij ), where tanh is the hyperbolic tangent function, with a range between -1 and 1. The tanh function is used to calculate the product of node degree and edge weight, mapping the result to a specific interval. The result is then rounded using the round function to obtain the original value of the binary mask matrix M, where degree(i) and degree(j) represent the degrees of node i and node j, respectively. Masking is achieved by element-by-element multiplication with the elements of matrix A, C=A`⊙M; the mask matrix M is generated based on the node degree centrality and edge weights.

[0035] P4. Convert the encrypted adjacency matrix C and weight matrix W' into one-dimensional data and add a checksum. Finally, upload the data to the central server for parameter aggregation. The conversion process can be expressed as flatten(C)=[C 11 ,C 12 ,……,C NN ]. The checksum can be expressed as . Where flatten(C) i The i-th element in the flattened one-dimensional array of the encrypted adjacency matrix C is generated by summing all elements and taking the sum modulo 256 to generate a check value for verifying data integrity.

[0036] Parameter aggregation module: aggregate the decrypted local model parameters of each scenic spot node according to the corresponding weights and generate a global model. The specific steps are as follows: Q1: Convert the encrypted adjacency matrix C and weight matrix W' uploaded by each scenic spot node back into matrix form. Verify the integrity of the data during transmission using a checksum. If the checksums do not match, discard the node data and send a data retransmission request to the corresponding scenic spot node. If the checksums match, proceed to the next step.

[0037] Specifically, the conversion form is parameter decryption. The parameter decryption process is as follows: first, the checksum is checked to see if it is S, then the matrix is ​​reconstructed, and then the inverse mask operation is performed. -1 To achieve this, M -1 The same rules are used to reconstruct the graph at the receiving end, followed by the node restoration process, and finally the gradients and weight parameters are extracted from the restored graph structure.

[0038] Q2. Aggregate the gradients and weight parameters obtained from the local model training of each scenic spot node.

[0039] Q3. Apply the aggregated gradient and weight parameters to the global model, while retaining some of the original feature information of the parameters of each scenic spot node as the personalized offset of the model. After generating the parameters of the global model, upload the global model to the encrypted distribution module to prepare for encrypted distribution and local model updates of each scenic spot node.

[0040] The parameter encryption and distribution module encrypts the encrypted global model parameters and distributes them to the local models of each scenic area node for updating. This encryption process is identical to the encryption and upload of local model parameters. After the local model decrypts the global parameters, it uses the global parameters to update the local model to obtain the updated parameters.

[0041] The modules of the present invention realize efficient and secure federated learning processing of scenic area user privacy data through collaborative operation. The data acquisition module and the pre-processing module perform structured processing on the basis of compliant desensitization to provide reliable data for subsequent processes; the data encryption module combines matrix storage and verification mechanism to ensure data privacy security; the local model training module ensures the quality of model training through scientific data division and rigorous verification; the parameter encryption upload, aggregation and distribution module, with the help of innovative graph encryption algorithms and weight aggregation strategies, improves the global model performance while maintaining personalized features during secure transmission. The modules are closely linked to each other, starting from the source of the data, and each process is strictly encrypted, which not only ensures the security of scenic area user privacy data, but also breaks the data silos through federated learning. The prediction accuracy of the local model of each scenic area node is improved, making a creative contribution to improving scenic area management and user experience.

[0042] The above contents are merely examples and explanations of the present invention. Those skilled in the art may make various modifications or additions to the described specific embodiments or replace them in similar ways. As long as they do not deviate from the invention or exceed the scope defined by the claims, they should all fall within the scope of protection of the present invention.

Claims

1. A federated learning processing system for scenic spot user privacy data, characterized by: include: The data encryption module is used to encrypt the acquired private data consisting of name identifier, gender identifier, identity identifier, contact identifier, trajectory sequence, and consumption point sequence. Specifically: Arrange the name identifier, gender identifier, identity identifier, contact identifier, trajectory sequence, and consumption point sequence into a 2×3 privacy matrix; Generate a random double key K=(K1,K2), where K1 is the spiral starting direction key, with a value range of 0-3, each value corresponding to a direction, 0 corresponding to right, 1 corresponding to down, 2 corresponding to left, and 3 corresponding to up. K2 is the step size factor, which ranges from 1 to 5 and is used to control the step size increment of each spiral turn. Starting from the upper left corner (1,1) of the matrix, spiral expansion begins in the direction specified by K1. The direction changes alternately in each circle, and the step size increases by K2. The actual step size is limited by the matrix size. The positions of the matrix elements are rearranged according to the spiral traversal path to obtain the encrypted private data.

2. The federated learning processing system for scenic spot user privacy data according to claim 1 is characterized in that: It also includes a data collection module, which is used to collect privacy data of users in each scenic spot. The privacy data mainly includes name, gender, ID number, mobile phone number, tour trajectory, and consumption records; the tour trajectory refers to the spatial record of the user's movement path and stay location in the scenic spot; the consumption record includes consumption time, consumption location and consumption amount.

3. The federated learning processing system for scenic spot user privacy data according to claim 1 is characterized in that: It also includes a data preprocessing module for preprocessing the acquired privacy data including the user's name, gender, ID number, mobile phone number, travel trajectory, and consumption record to obtain name identification, gender identification, identity identification, contact identification, trajectory sequence, and consumption point sequence; and storing the preprocessed privacy data in the server configured by the local node.

4. The federated learning processing system for scenic spot user privacy data according to claim 3 is characterized in that: The preprocessing method is: After obtaining the name information, convert the Chinese names involved into pinyin letters, retain the English letters, and convert the pinyin letters and English letters into ASCII codes to obtain the processed name identifier; After obtaining gender information, different gender identifiers are assigned to males and females, with [1,0] representing males and [0,1] representing females. The ID number is processed by retaining the first six digits and randomly shuffling the last four digits, and the remaining digits are masked to obtain the identity identification; The first three digits of the mobile phone number are retained, and the last four digits are converted into hexadecimal, which is then processed using a mask to obtain the contact ID.

5. The federated learning processing system for scenic spot user privacy data according to claim 3 is characterized in that: The preprocessing method is: Obtain the minimum rectangle covering the entire scenic area and divide it into several squares. Each square is assigned a grid coordinate according to its row and column. Each grid coordinate corresponds to a location in the scenic area. The grid coordinate includes a horizontal identifier and a vertical identifier. The horizontal identifier indicates the row number of the grid, and the vertical coordinate indicates the column number of the grid. The grid coordinate is obtained based on the row and column numbers. According to the user's tour trajectory information, any location where the user stays in any scenic spot for more than the set time T1 is marked as a stay point, and the grid coordinates corresponding to several stay points constitute the user's trajectory sequence; Obtain all the user's consumption records, convert the time in the consumption record into a digital representation in the format of year, month, day, hour and minute, represent the location using the corresponding grid coordinates, and then form a consumption point in the form of digital representation + grid coordinate representation + amount. Several consumption points arranged in chronological order constitute a consumption point sequence.

6. The federated learning processing system for scenic spot user privacy data according to claim 1 is characterized in that: Also includes: The local model training module is used to train the model deployed on the local node of the scenic area with the help of decrypted encrypted privacy data, and generate corresponding training parameters. The training parameters include gradient, weight, iteration rounds and data size.

7. The federated learning processing system for scenic spot user privacy data according to claim 6 is characterized in that: Also includes: The parameter encryption upload module is used to obtain and encrypt training parameters, specifically: A weighted directed graph G = (V, E, W) is constructed for the gradients and weights in the training parameters. This weighted directed graph is labeled the privacy parameter graph. Here, the node set V represents the node corresponding to each parameter, the edge set E is the set of connections between nodes, representing the dependencies between parameters, and the weight matrix W is the set of edges, where the edge weights represent the strength of the association between parameters. The adjacency matrix A is used to represent the connection between each node in the initial privacy parameter graph. Generate a permutation sequence π according to the iteration rounds, and rearrange the node order of the privacy parameter graph according to the permutation sequence π; use A` to represent the connection relationship between the nodes in the privacy parameter graph after the node order is rearranged; use W` to represent the weight matrix of the privacy parameter graph after the node order is rearranged; Generate a mask matrix M, and multiply the encrypted adjacency matrix A' by the mask matrix M to obtain a new adjacency matrix C; the mask matrix M is a matrix generated based on node degree centrality and edge weights; Convert the adjacency matrix C and weight matrix W' into one-dimensional data and add a checksum. Finally, upload the data to the central server for parameter aggregation. The checksum is expressed as ; The construction rules of the weighted directed graph G are as follows: (1) Arrange the gradient parameters into nodes v1,v 2, ……,v n ; (2) Arrange the weight parameters into nodes v n+1 ,v n+2 ,……,v n+m ; (3) The iteration round is used as a global parameter to dynamically adjust the edge weight through the coefficient associated with the sine function; (4) The amount of data is proportional to the centrality of the node degree. The node degree is used to calculate the number of edges connecting each node in the graph, and the degree centrality of the node is obtained at the same time. The larger the amount of data, the higher the node degree centrality.

8. The federated learning processing system for scenic spot user privacy data according to claim 9 is characterized in that: The formula for generating the permutation sequence π is: π(i)=(i+r 2 ) mod N; Where r represents the number of iterations and N represents the total number of nodes; Add random perturbations to the adjacency matrix A and transform the adjacency matrix A according to the transformation formula. The transformed adjacency matrix is ​​represented by A`. The transformation formula is: A`=A+ ϵ·D·diag(sin(r·eigenvalues(A))); Where ϵ is the perturbation coefficient, D is the degree matrix, and eigenvalues(A) is used to calculate the eigenvalues ​​of the adjacency matrix A; Generate the transformation matrix T using the iteration round r and node index, and the transformed W`=T·W·T -1 , T=sin((i+j)·r+hash(i,j)), where i and j represent the node numbers in the privacy parameter graph structure.

9. The federated learning processing system for scenic spot user privacy data according to claim 7, characterized in that: The formula for generating the mask matrix is, M=round(tanh(degree(i)·degree(j)·W`)), where tanh is the hyperbolic tangent function with a range between -1 and 1. The product of node degree and edge weight is calculated using the tanh function, the result is mapped to a specific interval, and then rounded using the round function to obtain the original value of the binary mask matrix M, where degree(i) and degree(j) represent the degrees of node i and node j, respectively. The new adjacency matrix C is obtained by element-by-element multiplication of the adjacency matrix A` and the mask matrix M, expressed as C=A`⊙M.

10. The federated learning processing system for scenic spot user privacy data according to claim 8, characterized in that: Also includes: The parameter aggregation module is used to aggregate the decrypted local model parameters of each scenic spot node according to the corresponding weight and generate a global model; The parameter encryption and distribution module is used to encrypt the encrypted global model parameters and distribute them to the local models of each scenic spot node to update the local models of each scenic spot node.