Privacy-enhanced campus network psychological data federated learning analysis method
By minimizing and protecting the privacy of campus network data, window statistical features are generated, which solves the problem of privacy protection for network behavior data in the campus network environment and enhances the privacy and security of mental health assessment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LANZHOU UNIV
- Filing Date
- 2026-02-09
- Publication Date
- 2026-05-29
Smart Images

Figure CN122113161A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network behavior data collection and privacy-preserving computing, and in particular to a privacy-enhancing federated learning analysis method for campus network psychological data. Background Technology
[0002] The mental health risks of college students are both insidious and dynamic, making the development of objective, continuous, and scalable risk screening methods imperative. Since internet usage behavior can reflect an individual's information acquisition and daily routines to some extent, assessments based on online behavior data can provide continuous observation over a longer time span and are less reliant on subjective memory compared to traditional self-report or questionnaire-based methods.
[0003] In related technologies, psychological health risk assessment typically employs statistical analysis or machine learning modeling based on behavioral characteristics. This approach extracts features from online behavior data and performs risk scoring or grading; it also allows for periodic updates and monitoring tailored to the needs of campus settings, enhancing responsiveness to changes in risk. In engineering implementation, such solutions often require acquiring a certain range of online behavior data from the campus network, cleaning, aggregating, and characterizing it to support subsequent analysis and model inference. However, in campus network scenarios, online behavior data is inherently sensitive. Directly uploading raw online sessions or identifiable information to third parties or centralized systems for analysis could lead to privacy breaches and compliance risks. Even with characterized data, the presence of overly fine-grained identifiers or semantic information could result in misidentification.
[0004] Therefore, there is an urgent need for a data security analysis solution for the campus network environment that can meet the needs of mental health risk assessment while protecting privacy and controlling the risk of data leakage during data collection, processing and output. Summary of the Invention
[0005] This application provides a privacy-enhanced federated learning analysis method for campus network psychological data, which can perform secure analysis of online data without uploading the original online content, reducing the risk of data leakage. The technical solution is as follows:
[0006] On the one hand, a privacy-enhanced federated learning analysis method for psychological data in campus networks is provided. The method includes: performing field whitelist projection, hard discarding of sensitive fields, pseudo-anonymization and irreversible digest processing, and binning on each of multiple original network sessions collected within the campus network to obtain multiple minimal event streams corresponding one-to-one with the multiple original network sessions; wherein, the minimal event stream includes pseudo-anonymous subject identifiers, time bucket information, irreversible cue digests, binned access strength information, and quality indicators; and performing semantic classification and feature extraction on each of the multiple minimal event streams to obtain multiple window statistical features corresponding one-to-one with the multiple minimal event streams. The statistical features are used to describe the changing characteristics of the original network session within a preset time window. Based on multiple window statistical features, the mental health assessment model is trained, and the uploaded object to be protected in the i-th round is generated. The uploaded object to be protected includes the model update amount in the i-th round, which is the difference between the model parameters in the i-th round and the model parameters in the (i-1)-th round, where i is a positive integer less than N, and N is the maximum number of training rounds for the mental health assessment model. The mental health assessment model is used to assess the mental health status of the target student based on the target student's original network session, and output the target student's mental health assessment result. Privacy protection processing is performed on the uploaded object to be protected in the i-th round to obtain the protected uploaded object in the i-th round. Specifically, when the uploaded object to be protected is a statistical uploaded object, at least pruning, binning, and noise addition processing are performed on it; when the protected uploaded object is an update uploaded object, at least pruning and noise addition processing are performed on it.
[0007] On the other hand, a privacy-enhanced campus network psychological data federated learning analysis device is provided, the device comprising:
[0008] The acquisition module is used to acquire the network sessions of the gateway, perform field whitelist projection and hard discarding of sensitive fields on the network sessions, and generate a minimized event stream.
[0009] Pseudo-anonymous module: Used to perform hash message authentication code calculation on the source identifier according to a preset rotation cycle, generate pseudo-anonymous subject identifier, and update the rotation key;
[0010] Feature extraction module: used to perform set membership testing based on irreversible prompts, obtain low-sensitivity behavior categories and application types, and aggregate window statistical features by subject and time window;
[0011] The generation module is used to infer and output psychological risk indicators based on window statistical features, train the model to update the data, and generate objects to be uploaded.
[0012] Privacy Management Module: Used to perform privacy protection processing on objects to be uploaded to form protected uploaded objects, and to perform cropping, binning and noise addition on statistical feature data, and record budget consumption;
[0013] The Federation Collaboration Control Module is used to maintain the privacy budget ledger and trigger degradation policies. When participating in a federation round, it receives the round configuration, encapsulates the federation payload, and performs pre-upload access control verification. After passing the verification, it uploads the payload to participate in the aggregation.
[0014] On the other hand, a computer device is provided, the computer device including a memory and a processor, the memory for storing computer programs, and the processor for executing the computer programs stored in the memory to implement the steps of the above-described privacy-enhanced campus network psychological data federated learning analysis method.
[0015] On the other hand, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the steps of the above-described privacy-enhanced campus network psychological data federated learning analysis method.
[0016] On the other hand, a computer program product containing instructions is provided that, when the instructions are run on a computer, causes the computer to perform the steps of the aforementioned privacy-enhanced campus network psychological data federated learning analysis method.
[0017] The technical solution provided in this application can bring at least the following beneficial effects:
[0018] By forming a closed loop through privacy protection outputs that minimize data collection, employ low-sensitivity feature extraction, local learning, and budget constraints, the system first performs field whitelisting projection, hard discarding of sensitive fields, pseudo-anonymization, irreversible summarization, and binning on the original network session records. This limits the data entering subsequent processing to a minimal event stream devoid of content payload and whose subjects cannot be directly identified, compressing potentially leaky information at the source. Subsequently, based on the irreversible cue summary, set membership testing is used to map the cue information to low-sensitivity categories and aggregate them into window statistical feature vectors according to subject and time window. This ensures that local training and inference rely solely on statistical features rather than the original plaintext identifiers and fine-grained behavioral sequences. Furthermore, statistical or model-updated objects to be protected are generated, and protected objects are obtained through pruning, binning, and noise addition (or pruning and noise addition), while recording privacy budget consumption. This allows the magnitude and random perturbation of a single uploaded object to be kept within a controllable range, while still being usable for subsequent collaborative analysis. This constrains privacy exposure during the analysis of psychological risks in campus networks, thereby improving overall privacy security. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application;
[0021] Figure 2 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application;
[0022] Figure 3 This is a flowchart illustrating a privacy-enhanced campus network psychological data federated learning analysis method provided in an embodiment of this application;
[0023] Figure 4 This application provides a schematic diagram of the structure of a privacy-enhanced campus network psychological data federated learning analysis device. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0025] Before providing a detailed explanation of the privacy-enhanced campus network psychological data federated learning analysis method provided in the embodiments of this application, the application scenarios and implementation environments involved in the embodiments of this application will be introduced first.
[0026] In the practice of mental health governance in universities, student psychological risks are often characterized by their hidden nature and dynamic changes, making it difficult to achieve continuous and objective risk observation through a single questionnaire or manual interview. Campus networks, as an important digital space for students' learning and life, can statistically reflect trends in their daily routines, information acquisition, and social interactions, thus possessing value as a source of signals for auxiliary assessment of psychological risks. However, this type of data is highly sensitive, involving individual online activity, interests, and potentially private content. Adopting a centralized collection and modeling approach can easily lead to risks such as content leakage, excessive identifiability, and unclear compliance boundaries.
[0027] This application addresses such scenarios and needs by providing a privacy-enhancing federated learning method that enables collaborative analysis across multiple gateways without uploading original internet content.
[0028] For example, the privacy-enhanced campus network psychological data federated learning analysis method provided in this application embodiment can be applied to... Figure 1 The system shown. For example... Figure 1 As shown, the system includes a campus gateway 100, a federated aggregation terminal 200, a federated learning security analysis node 300, and an internal controlled system 400. The federated learning security analysis node 300 is communicatively connected to the campus gateway 100, the federated aggregation terminal 200, and the internal controlled system 400.
[0029] The Campus Gateway 100 is deployed near the campus network's exit point, core switching, or authentication access link. It can acquire visible information related to internet access behavior, such as network session or traffic metadata and domain name resolution prompts. As a data entry point located at the campus network boundary, the gateway is a key location for implementing data collection with minimal intervention: at this location, the payload content can be naturally isolated, and operations such as field whitelist projection, hard discarding of sensitive fields, and pseudo-anonymization can be completed during the collection phase, thereby ensuring that subsequent processing links do not access the original content.
[0030] The Federated Learning Security Analysis Node 300 is the implementing entity of the technical solution in this application embodiment. It can be included in the campus gateway, that is, integrated with the campus network as the same hardware; or it can be independent hardware deployed at the bypass mirror location of the campus gateway. In the technical solution provided in this application embodiment, the Federated Learning Security Analysis Node 300 is used to convert gateway-visible data into low-sensitivity statistical features and output risk indicators locally. At the same time, it only uploads protected federated payloads for aggregation when the privacy budget allows and the security verification passes.
[0031] The Federation Aggregator 200 is deployed in a central coordination environment outside the campus network boundary. It is used to distribute federated round configurations and perform aggregate updates on protected payloads from multiple federated learning security analysis nodes. The Federation Aggregator only receives payloads that have undergone differential privacy processing and are masked by a secure aggregation mechanism. In principle, it does not access any original Internet content and should not receive individual contributions from a single gateway, thereby supporting improved model generalization ability and cross-scenario robustness under privacy constraints.
[0032] The campus-controlled system 400 is deployed for business scenarios such as mental health management and security governance. It receives risk levels or trend indicators or authorized summary statistics generated locally by the federated learning security analysis node 300 and displays them visually to authorized administrators, such as mental health centers, counselor systems, and campus security management departments. In this embodiment, the campus-controlled system emphasizes access control, minimum necessary display, and audit trails; that is, it only displays necessary risk indicators and trends, does not present raw network content, and can form a closed-loop collaboration with existing campus workflows.
[0033] Figure 2 This application provides a schematic diagram of the structure of a computer device, which can be used as... Figure 1The illustrated federated learning security analysis node 300 executes the privacy-enhanced campus network federated learning analysis method provided in this application embodiment. For example... Figure 2 As shown, the computer device includes at least one processor 210, a communication bus 220, a memory 230, and at least one communication interface 240.
[0034] The processor 210 can be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or one or more integrated circuits for implementing the solutions of this application, such as an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0035] The communication bus 220 is used to transmit information between the aforementioned components. The communication bus 220 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 2 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0036] The memory 230 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions; it may also be a random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions; it may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices; or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.
[0037] Optionally, the memory 230 may exist independently and be connected to the processor 210 via the communication bus 220; the memory 230 may also be integrated with the processor 210.
[0038] Communication interface 240 is used to communicate with other devices or communication networks. Communication interface 240 includes a wired communication interface and may also include a wireless communication interface. The wired communication interface may be, for example, an Ethernet interface. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a Wireless Local Area Network (WLAN) interface, a cellular network communication interface, or a combination thereof.
[0039] Optionally, processor 210 may include one or more CPUs. A computer device may include multiple processors. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU).
[0040] It should be noted that the processor here can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0041] In some embodiments, the computer device may further include output devices and input devices. The output device communicates with the processor 210 and can display information in various ways. For example, the output device may be a liquid crystal display (LCD), a light-emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. The input device communicates with the processor 210 and can receive user input in various ways. For example, the input device may be a mouse, keyboard, touchscreen device, or sensing device, etc.
[0042] In some embodiments, the memory 230 is used to store computer programs that execute the technical solutions provided in the embodiments of this application, and the processor 210 can execute the computer programs stored in the memory 230. For example, the computer device can use the processor 210 and the computer programs in the memory 230 to implement the privacy-enhanced campus network psychological data network federated learning analysis method provided in the embodiments of this application.
[0043] It should be noted that the application scenarios and implementation environments described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the emergence of new application scenarios and the evolution of implementation environments, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0044] The following section provides a detailed explanation of the privacy-enhanced campus network psychological data federated learning analysis method provided in the embodiments of this application.
[0045] Figure 3 This is a flowchart illustrating a privacy-enhanced campus network psychological data federated learning analysis method provided in an embodiment of this application. The method is applied to... Figure 1 In the Federated Learning Security Analysis Node 300 shown, the Federated Learning Security Analysis Node 300 can be Figure 2 The computer equipment shown. Please refer to... Figure 3 The method includes the following steps:
[0046] Step 310: For each of the multiple original network sessions collected within the campus network, perform field whitelist projection, hard discarding of sensitive fields, pseudo-anonymization and irreversible digest processing, and binning to obtain multiple minimized event streams that correspond one-to-one with the multiple original network sessions; wherein, the minimized event stream includes pseudo-anonymous subject identifier, time bucket information, irreversible hint digest, access strength information after binning, and quality flag.
[0047] For example, a raw network session (denoted as R) can be represented by the following formula (1):
[0048] R={ts, src, dst, dur, hint} (1)
[0049] Wherein, ts is the timestamp, representing the start time, end time, or export time of the network session (depending on the data collection source). In this embodiment, the timestamp is used for time window statistics and rhythm feature calculation; src is the source address, representing the address identifier of the side that initiates the connection, commonly a source IP address combined with a port, such as "10.240.33.149:80". In some implementations, it can also be the source host identifier, such as an internal address or network segment identifier; dst is the destination address, representing the address identifier of the side that receives the connection, commonly a destination IP address combined with a port; dur is the duration, representing the length of time from the start to the end of the session, in seconds, such as "364 seconds"; hint is the visible hint field, representing a clue field that is still visible without decryption and is used to identify the destination service or category, such as "domain name, server name indication, DNS query domain name".
[0050] Field whitelist projection retains only the fields necessary for behavioral statistics during the data collection process, explicitly excluding payload information such as HTTP body, search keywords, and chat content.
[0051] Hard discard for sensitive domains: If R hits a high-sensitivity domain or service marked by the policy, the record will be discarded directly within the collection thread.
[0052] Pseudo-anonymization is the process of irreversibly pseudo-anonymizing the source address (src) to generate a pseudo-anonymous subject identifier. This identifier does not contain a plaintext identity. K t This refers to the key that is rotated periodically at the federated aggregation end. `id` is a standardized identifier for the source address in R, and rotation reduces the risk of cross-period association. Irreversible hint digest. The norm(·) is a normalization process that removes trailing dots and other normalization features to ensure that the same prompt field is consistent within the same round or period, but it is difficult to deduce the plaintext.
[0053] Binning involves dividing the duration into intervals to obtain the binned intensity field. , where b(·) is the binning function, which retains only the coarse-grained interval and reduces the leakage of precise values.
[0054] Based on the original network session R in the example above, the minimized event stream (denoted as R) obtained after processing in step 310 above. ), can be expressed by the following formula (2):
[0055] (2)
[0056] Here, tb is a discrete time unit obtained by quantizing and compressing the original timestamp ts, used to reduce the accuracy of behavioral tracing. tb can be rounded down to the nearest minute; for example, tb can be based on... The calculated time bucket number or bucket start time, here The length of the time bucket; pid is the pseudo-anonymous subject identifier; hashhint is the irreversible hint summary; q is the strength field after binning; q is the quality flag, indicating whether there are missing values, anomalies, etc., and can be 0 (indicating an anomaly) or 1 (indicating a normal situation). It is determined by a combination of multiple rules, such as field completeness and parsing quality, numerical rationality and outliers.
[0057] This step achieves data collection and desensitization at the source, ensuring that the objects processed by the subsequent system naturally lack payload information that can be directly restored from online content; hard discarding of sensitive domains further reduces compliance risks; pseudo-anonymity and binning reduce cross-cycle tracking and exposure of precise behavioral trajectories, laying a low-risk data foundation for subsequent federal collaboration.
[0058] Step 320: Perform semantic classification and feature extraction on each of the multiple minimized event streams to obtain multiple window statistical features that correspond one-to-one with the multiple minimized event streams. The window statistical features are used to describe the change characteristics of the original network session within a preset time window.
[0059] This step first performs semantic classification. Semantic classification takes the irreversible hint digest hashhint as input and adopts a set membership test classification method to map the irreversible representation of network hint information such as domain name and application hints to low-sensitivity behavior category identifier (denoted as catid) and low-sensitivity application type identifier (denoted as appid). Here, set membership test means that instead of storing a complete mapping table from plaintext domain name to category, a Bloom filter or hierarchical hash index is maintained for judgment. The corresponding label is output only by judging whether the hashhint belongs to a certain preset category set, thereby completing the low-sensitivity classification. Among them, catid indicates that the instance has categories such as learning, entertainment, and social, and appid indicates that the instance has categories such as short video, instant messaging, and online games. The classification process can be represented by the following formula (3):
[0060] (3)
[0061] F(·) is achieved by Bloom filter hit or hierarchical hash index hit. Specifically: if the application type set such as "short video, instant messaging, online game" is hit, the corresponding appid is output; then the catid can be directly obtained by merging the appid. For example, if the appid is short video, the catid can be merged into entertainment; if the appid is online classroom, the catid can be merged into learning. If the appid cannot be determined, the catid is output directly based on the hit result of the category set. After the classification is completed, a tag event stream can be represented by the following formula (4):
[0062] (4)
[0063] The next step in this process is to extract features using window aggregation. For each subject pid and a fixed window w, the window statistical features obtained by aggregation based on the number of statistical events, category strength, rhythm ratio, rate of change, and stability can be expressed by the following formula (5):
[0064] (5)
[0065] Among them, the category frequency feature is the number of times the i-th category appears in the window. The processing procedure is to count the events by category and add them up within a time window w, which can be expressed by the following formula (6):
[0066] (6)
[0067] Where i is the category index; the category strength feature is the sum of the Durbin representative values, which can be expressed by the following formula (7):
[0068] (7)
[0069] Where Val(·) is the binning representation value mapping, and i is the category index; the window rhythm features include two dimensions: nighttime and weekend, which can be represented by the following formula (8):
[0070] (8)
[0071] in, and The symbol represents events occurring at night and events occurring on weekends within the window; # represents the standard symbol for the cardinality of the set; the window rate of change is the difference fluctuation between adjacent windows, which also includes two dimensions and can be expressed by the following formulas (9) and (10):
[0072] (9)
[0073] (10)
[0074] in, The previous adjacent window; the window stability feature can be expressed by the following formula (11):
[0075] (11)
[0076] Where Var(·) represents variance and Mean(·) represents mean activity. To prevent constants with a denominator of 0, the window w is divided into n equal-length sub-time periods h1, h2, ..., h... n a j For the subinterval h j The number of events within.
[0077] This step minimizes the event flow by transforming it into semantically usable but low-sensitivity window statistical features without exposing plaintext domain names; aggregate member testing reduces the risk of configuration leakage and reverse inference; and windowed statistical features reduce reliance on individual behaviors, making subsequent models more robust and easier to implement in compliance with regulations.
[0078] Step 330: Based on multiple window statistical features, train the mental health assessment model and generate the object to be protected for upload in the i-th round. The object to be protected for upload includes the model update amount in the i-th round. The model update amount is the difference between the model parameters in the i-th round and the model parameters in the (i-1)-th round. i is a positive integer less than N, and N is the maximum number of training rounds of the mental health assessment model. The mental health assessment model is used to assess the mental health status of the target student based on the target student's original online conversation, so as to output the psychological assessment result of the target student.
[0079] This step involves training on each federated learning security analysis node and optimizing the update quantity using the local sample set. This serves as the raw material for subsequent federated uploads. The local sample set is defined by the following formula (12):
[0080] (12)
[0081] in, For tags, The quality score is used to determine whether this sample should be used for training or given a smaller weight. The loss function is defined by the following formula (13):
[0082] (13)
[0083] in, This is a single-sample error function, such as cross-entropy or mean squared error. Local updates are defined by the following formula (14):
[0084] (14)
[0085] in Here are the parameters for the model update in the i-th round after local optimization. This represents the model update amount for the (i-1)th round, where i is a positive integer less than N, and N is the maximum number of training rounds set for the mental health assessment model.
[0086] This step involves offline training at edge nodes, generating an update quantity Δθ based on the local sample set. This compresses the information from multiple samples into parameter increments, which serve as raw materials for subsequent federated uploads, avoiding direct exposure of the samples themselves. The quality score q is included in this process. w This is used to control whether a sample participates in training or reduces its weight, limiting the impact of low-quality samples on θ′ from an optimization perspective, thereby transforming training effectiveness and privacy controllability into executable constraints.
[0087] Step 340: Perform privacy protection processing on the upload objects to be protected in the i-th round to obtain the protected upload objects in the i-th round. Specifically, when the upload object to be protected is a statistical upload object, at least cropping, binning, and noise addition processing are performed on it; when the protected upload object is an update upload object, at least cropping and noise addition processing are performed on it.
[0088] In this embodiment, the uploaded objects to be protected include two types: statistical uploaded objects and update uploaded objects. The privacy protection processes for these two types of uploaded objects will be described below.
[0089] For statistical upload objects, use the statistical feature vector x. w As the upload object, its implementation process is carried out by performing cropping, binning, and noise addition through the following formula (15):
[0090] (15)
[0091] Clip restricts the features to [0, P], and Bin represents binning. For Laplace noise, P is the maximum cutoff threshold. For privacy budgets, smaller budgets offer more protection but also result in less accurate data.
[0092] For upload objects that are being updated, use the model update amount. As the upload object, its implementation process is obtained by first performing norm clipping using the following formula (16). :
[0093] (16)
[0094] Where S is the maximum allowed range. (Based on norm-based cropping) Gaussian noise is added using the following formula (17):
[0095] (17)
[0096] in, It is noise intensity. I is the 2-norm; I is the identity matrix. It is zero-mean isotropic Gaussian noise.
[0097] It should be noted that the federated learning security analysis node also stores and manages a privacy budget ledger. This ledger records the correspondence between the privacy budget consumption of the protected upload object generated in round i and the round number. When the remaining budget is lower than a preset threshold, the upload object to be protected in round i needs to be downgraded. The downgrade process includes at least one of the following:
[0098] Switch from fine-grained classification to coarse-grained classification;
[0099] Multiple window statistical features are used as the objects to be protected and uploaded in the i-th round. It should be noted that the default upload is the model update upload. If it is downgraded, the window statistical features will be used for upload.
[0100] Increase noise intensity and extend upload interval.
[0101] In some embodiments, the protected uploaded object is used to participate in collaborative activities at the federated aggregation end. In this case, the privacy-enhanced campus network psychological data federated learning analysis method provided in this application embodiment further includes the following steps 41-44:
[0102] Step 41: Receive the round configuration from the federated aggregation terminal. The round configuration includes at least the model version number of the mental health assessment model, the round identifier of the i-th round, a one-time random number, and the aggregation strategy.
[0103] Step 42: Encapsulate the protected upload object, the round identifier of the i-th round, a one-time random number, and a timestamp into a federated payload, and perform access control verification on the federated payload before uploading; wherein, the federated payload contains the upload data after randomly masking the protected upload object, and the random masking includes:
[0104] Generate a random mask value r locally that is associated with the round configuration. k ;
[0105] The random masking value is superimposed or mixed with the protected upload object to obtain the masked upload data, and the masked upload data is written into the federated payload.
[0106] The federated aggregation end aggregates masked uploaded data from multiple federated learning security analysis nodes, and obtains the aggregation result through mask cancellation or mask removal processes.
[0107] As an example, if the protected upload object is u k Each node gives its own u k Add another layer of random mask r k Then the uploaded data after masking is m k = u k + r k The federated aggregation end receives many m k It combines multiple m k In summary, the key design point is that these masks r k They will cancel each other out when added, making ∑r k = 0, so the final aggregation result obtained by the coordinator is u. k The sum of.
[0108] Step 43: When the access control verification passes, upload the federated payload to the federated aggregation terminal; the access control verification includes at least integrity and freshness verification, reasonableness verification, and identity consistency verification.
[0109] First, integrity and freshness checks are performed. The model version number, round identifier and round configuration of the federated payload are checked to see if they are consistent. The first check result is used to indicate whether the federated payload has not been tampered with and whether it belongs to the current federated round.
[0110] When the first verification result is passed, the rationality verification of the federated load is performed to obtain the second verification result. The second verification result is used to indicate whether the numerical characteristics of the federated load meet the preset constraints.
[0111] When the second verification result is passed, the identity consistency verification of the federated payload is performed to obtain the third verification result. The third verification result is used to indicate whether the uploader's identity is trustworthy and consistent with the preset identity binding information.
[0112] It should be noted that the three verification steps included in the access control verification do not have a specific order; the order described above is merely an example of how they can be performed. Furthermore, whether a verification passes or fails can be determined by passing all verification steps or by meeting one or more of the specific steps.
[0113] Step 44: When the access control verification result is successful, the federated payload is uploaded to the federated aggregation terminal. Under the condition of satisfying the aggregation policy, the federated aggregation terminal performs secure aggregation docking processing on the protected uploaded objects, so that the federated aggregation terminal only obtains the aggregation results of objects uploaded by multiple federated learning security analysis nodes.
[0114] This step applies privacy protection mechanisms to two types of uploaded objects to ensure that the output is usable for federated collaboration while making it difficult to backtrack individual node information: For statistical uploaded objects, Clip is first used to limit the statistical quantity of each dimension to [0, P], which is equivalent to fixing the upper bound of the maximum impact of a single uploaded object to P. Then, Bin discretization is used to reduce the resolution. Finally, Laplace noise controlled by the privacy budget ε is injected, so that the federated analysis only relies on the truncated coarse-grained statistics and controlled noise, thereby compressing the amount of information that can be leaked to the budget-allowed range. For update uploaded objects, norm pruning is first performed to limit the upper bound of the update amplitude of a single node to S. Then, zero-mean isotropic Gaussian noise is superimposed, so that the identifiable contribution of any single node to the aggregation model is blurred by the amplitude constraint and noise. At the same time, the privacy budget ledger binds each consumption to the round and triggers degradation such as subdivision to coarse division, update to statistics, and noise reduction when the budget is insufficient, so that the cumulative leakage risk over a long period of time is kept within a controllable threshold. Furthermore, before uploading, the federated payload is subject to a random mask associated with the round configuration and passes a three-stage access control check. On the one hand, the mask prevents the aggregator from seeing the real uploaded value of a single node before aggregation. On the other hand, the access control filters out abnormal values and forged identity payloads, ultimately ensuring that the aggregator only obtains multi-node aggregation results that meet the policy constraints. This improves the credibility and robustness of federated collaboration under the premise of compliance and security.
[0115] In summary, the privacy-enhanced campus network psychological data federated learning analysis method provided in this application takes the original network sessions abstracted from the original network sessions within the campus network as input. First, it performs field whitelist projection, hard discarding of sensitive fields, pseudo-anonymization and irreversible digest processing, and binning on each of the collected original network sessions to obtain multiple minimal event streams corresponding to the original network sessions. Then, it performs semantic classification and feature extraction on each of the multiple minimal event streams to obtain multiple window statistical features corresponding to the multiple minimal event streams. These window statistical features are used to describe the original network sessions within a preset timeframe. The changes within the time window are analyzed. Further, based on multiple window statistical features, a mental health assessment model is trained, generating the upload object to be protected in the i-th round. The upload object includes the model update amount in the i-th round, which is the difference between the model parameters in the i-th round and the model parameters in the (i-1)-th round, where i is a positive integer less than N, and N is the maximum training round of the mental health assessment model. The mental health assessment model is used to assess the mental health status of the target student based on their original online conversations, outputting the target student's mental health assessment results. Finally, privacy protection processing is applied to the upload object to be protected in the i-th round to obtain the protected upload object in the i-th round. Specifically, when the upload object to be protected is a statistical upload object, at least pruning, binning, and noise addition processing are performed; when the protected upload object is an update upload object, at least pruning and noise addition processing are performed. This achieves local analysis of campus network psychological risks and privacy-controlled federated collaborative preparation.
[0116] The apparatus involved in the embodiments of this application will be described next.
[0117] Figure 4 This is a schematic diagram of a privacy-enhanced campus network federated learning analytics device provided in an embodiment of this application. This device can be implemented using software, hardware, or a combination of both. Figure 1 The federated learning security analysis node 300 shown may be part or all of the processing device 300. Figure 2 The computer equipment shown. Please refer to... Figure 4 The device includes: a data acquisition module 410, a pseudo-anonymity module 420, a feature extraction module 430, a generation module 440, a privacy management module 450, and a federated collaboration control module 460.
[0118] The acquisition module 410 is used to acquire the network sessions of the gateway, perform field whitelist projection and hard discarding of sensitive fields on the network sessions, and generate a minimized event stream;
[0119] The pseudo-anonymous module 420 is used to perform hash message authentication code calculation on the source identifier according to a preset rotation cycle, generate a pseudo-anonymous subject identifier, and update the rotation key;
[0120] The feature extraction module 430 is used to perform set membership testing based on irreversible prompt information, obtain low-sensitivity behavior categories and application types, and aggregate window statistical features according to subject and time window.
[0121] The generation module 440 is used to infer and output psychological risk indicators based on window statistical features, train the model update quantity, and generate objects to be uploaded.
[0122] The privacy management module 450 is used to perform privacy protection processing on the object to be uploaded to form a protected uploaded object, and to perform cropping, binning and noise addition on statistical feature data, and record budget consumption;
[0123] The Federation Collaboration Control Module 460 is used to maintain the privacy budget ledger and trigger degradation policies. When participating in a federation round, it receives the round configuration, encapsulates the federation payload, and performs pre-upload access control verification. After passing the verification, it uploads and participates in aggregation.
[0124] In one possible implementation, this privacy-enhanced campus network federated learning analytics device is also used for:
[0125] Whitelist projection and hard discarding of sensitive domains are performed based on fields. This means that only network metadata fields used for behavior statistics are retained, while content payload fields are not collected or written. When any original network session hits a sensitive category rule, the network session is directly discarded. At the same time, the sensitive domain hit count and sensitive hit rate are counted.
[0126] In one possible implementation, the pseudo-anonymous module 420 is specifically used for:
[0127] Based on pseudo-anonymous subject identifier generation processing, that is, standardizing the source identifier to obtain a standardized identifier;
[0128] The pseudo-anonymous subject identifier is calculated based on the key generated and rotated at a predetermined period by the federated aggregation end, and updated in conjunction with the rotating key.
[0129] In one possible implementation, the feature extraction module 430 is specifically used for:
[0130] Semantic classification and window feature generation processing, namely, the standardization of network prompt information to generate irreversible prompt summaries;
[0131] Complete collection membership testing based on Bloom filters or hierarchical hash indexes to output low-sensitivity behavior categories and / or application types;
[0132] The statistical features of a window are formed by aggregating the subject and time window. The statistical features of a window include the event frequency feature, the access intensity feature obtained by statistical analysis based on the access intensity information after binning, the window change rate feature representing the difference between adjacent time windows, the window rhythm feature representing the proportion of active nights and weekends, and the window stability feature representing the temporal consistency and fluctuation of network behavior distribution within the time window.
[0133] In one possible implementation, the generation module 440 is specifically used for:
[0134] The system generates psychological risk output based on window statistical features. At the same time, it builds a training sample set locally and optimizes and updates the model parameters to obtain the trained model parameters. Then, it uses the difference between the trained model parameters and the untrained model parameters as the model update amount, so that the uploaded object to be protected and the psychological risk output are independent of each other. The uploaded object to be protected is used for cross-node collaboration, while the psychological risk output is used for local output or display.
[0135] In one possible implementation, the privacy management module 450 is specifically used for:
[0136] When the uploaded object to be protected is a statistical uploaded object, the following steps are performed sequentially: counting statistical feature pruning to the maximum truncation threshold, binning discretization, and injection of Laplace noise.
[0137] When the uploaded object to be protected is a model update type uploaded object, the model update amount is pruned by norm and Gaussian noise is injected, and the corresponding privacy budget consumption is written into the budget record field of the protected uploaded object;
[0138] Maintain a privacy budget ledger and bind budget consumption to round number. Trigger degradation processing when the remaining budget is below a threshold. The degradation processing includes at least switching from fine category to coarse category, switching from model update type upload object to statistical upload object, and increasing noise intensity and extending upload interval.
[0139] In one possible implementation, the federated cooperation control module 460 is specifically used for:
[0140] When a protected upload object is used to participate in the collaboration of the federated aggregation end, it receives the round configuration and encapsulates the protected upload object, round identifier, one-time random number and timestamp into a federated payload. Before uploading, access control verification is performed. The federated payload contains the upload data after the protected upload object is randomly masked. The random masking includes generating a random mask value associated with the round configuration and superimposing or mixing it with the protected upload object to form the masked upload data. The federated aggregation end aggregates the masked upload data of multiple security analysis nodes and obtains the aggregation result by mask cancellation or mask removal.
[0141] When the access control verification passes, the federated payload is uploaded. The access control verification includes at least integrity and freshness verification, reasonableness verification, and identity consistency verification. The secure aggregation docking is completed when the aggregation strategy is met, so that the federated aggregation end only obtains the aggregation results of the objects uploaded by multiple federated learning security analysis nodes.
[0142] It should be noted that the privacy-enhanced campus network federated learning analysis device provided in the above embodiments is only illustrated by the division of the above functional modules when analyzing and evaluating the mental health status based on the campus network data of the target students. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0143] In some embodiments, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of the privacy-enhanced campus network federated learning analysis method described in the above embodiments. For example, the computer-readable storage medium may be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, or optical data storage device.
[0144] It is worth noting that the computer-readable storage medium mentioned in the embodiments of this application can be a non-volatile storage medium, in other words, it can be a non-transient storage medium.
[0145] It should be understood that all or part of the steps of the above embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented wholly or partially in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions can be stored in the above-described computer-readable storage medium.
[0146] That is, in some embodiments, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the steps of the privacy-enhanced campus network federated learning analysis method described above.
[0147] It should be understood that "at least one" as used herein refers to one or more, and "multiple" refers to two or more. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. In addition, in order to clearly describe the technical solutions of the embodiments of this application, the terms "first," "second," etc., are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and the terms "first," "second," etc., are not necessarily different.
[0148] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0149] The above are merely specific implementations of the embodiments of this application and are not intended to limit the protection scope of the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made based on the technical solutions of the embodiments of this application should be included within the protection scope of the embodiments of this application.
Claims
1. A privacy-enhanced federated learning analysis method for psychological data in campus networks, characterized in that, The method, applied to a federated learning security analysis node, includes: For each of the multiple original network sessions collected within the campus network, field whitelist projection, hard discarding of sensitive fields, pseudo-anonymization and irreversible digest processing, and binning are performed to obtain multiple minimized event streams that correspond one-to-one with the multiple original network sessions; wherein, the minimized event stream includes pseudo-anonymous subject identifier, time bucket information, irreversible hint digest, access strength information after binning, and quality flag; Semantic classification and feature extraction are performed on each of the multiple minimized event streams to obtain multiple window statistical features that correspond one-to-one with the multiple minimized event streams. The window statistical features are used to describe the change characteristics of the original network session within a preset time window. Based on the aforementioned multiple window statistical features, the mental health assessment model is trained, and a protected upload object for the i-th round is generated. The protected upload object includes the model update amount for the i-th round, which is the difference between the model parameters for the i-th round and the model parameters for the (i-1)-th round, where i is a positive integer less than N, and N is the maximum number of training rounds for the mental health assessment model. The mental health assessment model is used to assess the mental health status of the target student based on the target student's original online session, and output the mental health assessment result of the target student. The upload objects to be protected in the i-th round are subjected to privacy protection processing to obtain the protected upload objects in the i-th round. Specifically, when the uploaded object to be protected is a statistical uploaded object, at least it shall be subjected to cropping, binning, and noise addition processing; when the uploaded object to be protected is an update uploaded object, at least it shall be subjected to cropping and noise addition processing.
2. The method according to claim 1, characterized in that, The field whitelist projection and sensitive field hard discarding include: Only retain network metadata fields used for behavioral statistics, and explicitly do not collect or write content payload fields; If the target original network session hits a sensitive category rule, the target network session is discarded and the sensitive domain hit count and sensitive hit rate are counted. The target network session is any one of the multiple original network sessions.
3. The method according to claim 1, characterized in that, Each original network session includes a source identifier and generates a pseudo-anonymous subject identifier, including: The source identifier is normalized to obtain a standardized identifier; Obtain the rotation key generated by the federated aggregation end at a predetermined period; Based on the standardized identifier and the rotation key, the pseudo-anonymous subject identifier is calculated using the Hash Message Authentication Code (HMAC).
4. The method according to claim 1, characterized in that, The process involves semantic classification and feature extraction for each of the plurality of minimized event streams, resulting in multiple window statistical features corresponding one-to-one with each of the plurality of minimized event streams, including: Based on the irreversible hint summary in the target minimization event stream, a classification mechanism of set membership testing is adopted to map the irreversible representation of the domain name to a low-sensitivity behavior category identifier and the irreversible representation of the application hint to an application type identifier. The target minimization event stream is any one of the multiple minimization event streams. Based on the low-sensitivity behavior category identifier and the application type identifier, the target minimization event stream is semantically categorized to obtain the tag event stream corresponding to the target minimization event stream; Based on a preset time window and the pseudo-anonymous subject identifier, feature extraction is performed on the labeled event stream to obtain the window statistical features corresponding to the target minimized event stream.
5. The method according to claim 4, characterized in that, Each window's statistical characteristics include at least one of the following: The event frequency characteristics of each low-sensitivity behavior category within the time window; The access intensity characteristics of each low-sensitivity behavior category within the time window are obtained statistically based on the access intensity information after binning. Window rate of change feature, which is used to characterize the differential change between adjacent time windows; Window rhythm features, which include a first rhythm feature for characterizing the proportion of activity during nighttime periods and a second rhythm feature for characterizing the proportion of activity during weekend periods. Window stability features are used to characterize the temporal consistency and volatility of network behavior distribution within a time window.
6. The method according to claim 1, characterized in that, The object to be protected and uploaded is used to update the model parameters of the mental health assessment model through cross-node collaboration.
7. The method according to claim 1, characterized in that, The privacy protection processing of the uploaded object to be protected includes: The model update amount is pruned according to its norm. Gaussian noise is injected into the update amount of the clipped model.
8. The method according to any one of claims 1-7, characterized in that, The uploaded object to be protected also includes the multiple window statistical features, and the privacy protection processing of the uploaded object to be protected further includes: The statistical features of the multiple windows are each clipped to a preset maximum truncation threshold; The statistical features of each clipped window are binned and discretized. Laplace noise is injected into the statistical features of each window after binning and discretization.
9. The method according to claim 8, characterized in that, The federated learning security analysis node also stores and manages a privacy budget ledger, which records the correspondence between the privacy budget consumption and the round number for generating the protected upload object in the i-th round; the method further includes: If the remaining budget is below the threshold, the uploaded objects to be protected in the i-th round will be downgraded, and the downgrade process includes at least one of the following: Switch from fine-grained classification to coarse-grained classification; The statistical features of the multiple windows are used as the objects to be protected for upload in the i-th round; Increase noise intensity and extend upload interval.
10. The method according to any one of claims 1-7, characterized in that, The method further includes: Receive round configuration from the federated aggregation terminal. The round configuration includes at least the model version number of the mental health assessment model, the round identifier of the i-th round, a one-time random number, and the aggregation strategy. The protected upload object, the round identifier of the i-th round, a one-time random number, and a timestamp are encapsulated into a federated payload, and access control verification is performed on the federated payload. The federated payload also includes upload data obtained by randomly masking the protected upload object. Random masking refers to superimposing or mixing a locally generated random mask value associated with the round configuration with the protected upload object to obtain the upload data. The access control verification includes integrity and freshness verification, rationality verification, and identity consistency verification. The integrity and freshness verification verifies whether the federated payload has not been tampered with and whether it belongs to the current federated round. The rationality verification verifies whether the numerical characteristics of the federated payload meet preset constraints. The identity consistency verification verifies whether the uploader's identity is trustworthy and consistent with preset identity binding information. When the access control verification result is passed, the federated payload is uploaded to the federated aggregation terminal; wherein, under the condition of satisfying the aggregation policy, the federated aggregation terminal performs secure aggregation docking processing on the protected uploaded object, so that the federated aggregation terminal only obtains the aggregation result of the uploaded objects of multiple federated learning security analysis nodes.