Recommendation method and system based on hierarchical local personalized style prediction
Patent Information
- Application Number
- CN202610774197.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-01
- Publication Date
- 2026-08-18
AI Technical Summary
即使用户同意,其顾虑也会限制可用于训练的数据广度和质量,直接影响模型效果
[0022] This invention proposes a recommendation method and system based on hierarchical local personalized style prediction. It constructs a privacy-preserving paradigm where data and models reside locally. Both the original user data and the final personalized model parameters reside on the user's terminal. This allows for enhanced generalization capabilities through collective knowledge and efficient fine-tuning using local private data to reduce terminal load, thereby achieving accurate and forward-looking style evolution prediction and personalized services while adhering to compliance requirements. Through the synergy of four stages—controlled data training, collective anonymization enhancement, efficient local personalization, and privacy-preserving service coordination—it systematically resolves the long-standing core contradiction in personalized recommendation: the difficulty in simultaneously balancing user privacy protection, model generalization ability, and terminal computational efficiency.
Smart Images

Figure CN122596987A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of personalized recommendation technology, and in particular relates to a recommendation method and system based on hierarchical local personalized style prediction. Background Technology
[0002] Accurately predicting the long-term evolution of user interests to achieve precise recommendations, such as predicting changes in users' clothing styles in fashion e-commerce, is crucial for improving user experience and commercial value. However, existing technologies have long faced an irreconcilable trilemma in achieving this goal: it is difficult to simultaneously achieve user privacy protection, model generalization ability (data utility), and terminal computing efficiency (terminal acceptability). Specifically, existing technical solutions have the following problems.
[0003] First, centralized data aggregation models conflict with privacy regulations.
[0004] In other words, to train high-performance prediction models, traditional personalized recommendation systems require the centralized collection, storage, and processing of long-term, fine-grained user behavioral data. With increasingly stringent global data privacy regulations (such as GDPR and the Personal Information Protection Act) and growing user awareness of privacy protection, this model faces significant legal compliance risks and a crisis of user trust. Even if users consent, their concerns can limit the breadth and quality of data available for training, directly impacting model performance.
[0005] Second, small-scale, controllable datasets present challenges in model generalization.
[0006] To address privacy risks, existing technologies utilize limited, clearly authorized, and controllable datasets (such as internal corporate data or volunteer data) for training. However, such data often fails to adequately capture the diversity and dynamism of real user groups, resulting in models with insufficient generalization ability. When faced with new users or new scenarios, severe "cold start" problems and "data bias" easily arise, leading to a significant decrease in prediction accuracy.
[0007] Third, the computational burden caused by the use of technologies such as federated learning is enormous.
[0008] While current technologies such as federated learning can protect data privacy, when using distributed data while protecting privacy, heavy computing tasks are shifted to the terminal, leading to a sharp increase in mobile device power consumption, high memory usage, and slower response speed, which seriously affects user experience and makes large-scale deployment difficult.
[0009] Furthermore, the simple combination of the aforementioned existing technologies cannot systematically reconcile the trilemma. Increasing noise to enhance privacy can impair model performance; simplifying the model to reduce terminal load can sacrifice prediction accuracy. For example, patent CN117272380A proposes a privacy-preserving distributed survival analysis method that uses homomorphic encryption and other technologies to achieve multi-party secure modeling, but its scheme is complex and does not consider the computational limitations of terminal devices. Patent CN118170972A proposes an efficient adaptive secure cross-domain recommendation method, and patent CN118484596A proposes a next-generation interest point secure recommendation strategy based on asynchronous advantage reinforcement learning, combining differential privacy with cross-domain recommendation and next-generation style point recommendation, respectively. Although these methods strengthen privacy boundaries, the noise added to protect privacy often impairs the model's prediction performance and cannot solve the efficiency problem of terminal personalization adaptation. The invention patent with publication number CN116503109A proposes an information recommendation method that attempts to make recommendations without user identification, but it relies on a server-side prediction model and has limited personalization.
[0010] Therefore, how to provide a personalized style prediction method that can reconcile the contradictions between user privacy protection, model generalization ability and terminal computing efficiency, so as to fully utilize data to improve the model's ability to predict users' long-term style evolution under the premise of legality and compliance, while protecting user privacy and reducing the computational burden of personalized prediction to an acceptable level for the terminal, is an urgent technical problem to be solved. Summary of the Invention
[0011] To reconcile and resolve the contradictions between user privacy protection, model generalization ability, and terminal computing efficiency, this invention proposes a recommendation method and system based on hierarchical local personalized style prediction.
[0012] In a first aspect, embodiments of the present invention provide a recommendation method based on hierarchical local personalized style prediction. The method includes: locally generating a counting matrix reflecting individual user style shifts; uploading the counting matrix to a server; and receiving a global model from the server. The server improves a pre-trained baseline survival analysis model based on the counting matrices uploaded from different terminal devices to obtain a global model. The baseline survival analysis model is used to predict the probability of user style change events occurring at different future time points based on user historical behavior time-series data. The received global model is then fine-tuned based on local private historical data to obtain a local personalized model. The local personalized model identifies high-risk time windows of user style evolution and extracts style change direction vectors based on the corresponding probability distribution vectors output by each window within the high-risk time windows. An abstract intent package is generated based on the quantized high-risk time windows and the style change direction vectors. The encrypted abstract intent package is uploaded to the server, and a coarse-grained recall set is received from the server. A final recommendation result matching the user's personalized style is generated based on the coarse-grained recall set and the locally maintained user private profile. The coarse-grained recall set includes a set of candidate results that match the decrypted encrypted intent package selected by the server.
[0013] In some embodiments of the present invention, the method further includes the step of pre-training a baseline survival analysis model using a controllable dataset, specifically including: acquiring a controllable dataset with clearly defined data usage permissions and controllable privacy risks; wherein, the controllable dataset includes one or more time-series data of user historical behavior that can reflect individual user styles; constructing a dynamic feature vector as input to the basic prediction model based on the controllable dataset; defining user style change events and risk times in the basic prediction model; constructing the basic prediction model, using a neural network-based deep survival analysis framework as the core architecture of the basic prediction model, iteratively training and evaluating the basic prediction model using the dynamic feature vector, constructing a loss function using the standard negative log-likelihood loss of survival analysis, and obtaining a baseline survival analysis model with baseline prediction capabilities.
[0014] In some embodiments of the present invention, the counting matrix is constructed based on local private time-series data of user historical behavior within a preset time span; before the step of uploading the counting matrix to the server, the method further includes: adding noise to the counting matrix to meet differential privacy requirements, so that even if the server or an attacker obtains the noisy counting matrix, they cannot infer any individual information from it.
[0015] In some embodiments of the present invention, the step of the server improving the pre-trained baseline survival analysis model based on the counting matrices uploaded by different terminal devices to obtain a global model includes: the server aggregating the noisy counting matrices uploaded by different terminal devices to form a group style transition probability tensor representing the group style evolution law; the server integrating the group style evolution law represented by the group style transition probability tensor into the baseline survival analysis model through a conditional augmentation network to generate the global model.
[0016] In some embodiments of the present invention, the step of fine-tuning the received global model based on local private historical data to obtain a local personalized model specifically includes: injecting a LORA adapter into the global model and freezing the original weights of the global model; fine-tuning the global model using the LORA scheme based on local private historical data; and merging the weights learned by the LORA adapter during the fine-tuning training with the frozen original weights of the global model to obtain the local personalized model.
[0017] In some embodiments of the present invention, the step of identifying high-risk time windows of user style evolution based on the local personalization model specifically includes: smoothing the original risk prediction curve output by the local personalization model; filtering out continuous time periods with risk values higher than the threshold according to a preset dynamic threshold; and determining a continuous time period as a high-risk time window only when the length of the continuous time period is not less than the preset minimum window length; wherein, risk refers to the occurrence of user style change events.
[0018] In some embodiments of the present invention, the method further includes obtaining a coarse-grained recall set by the server based on the received abstract intent packet through broad recall, specifically including: the server decrypting the received abstract intent packet; obtaining a preliminary coarse-grained recall set by parallel recall using multiple strategies based on the decrypted encrypted intent packet in a public resource library maintained by the server; wherein, the multiple strategies include some or all of the main style focusing strategy, directional exploration strategy, temporal popularity supplementation strategy, and diversity guarantee strategy; and performing deduplication and coarse screening on the preliminary coarse-grained recall set to obtain the final coarse-grained recall set.
[0019] In some embodiments of the present invention, the step of generating a final recommendation result adapted to the user's personalized style based on the coarse-grained recall set and the locally maintained user private profile includes: sorting the candidate result set included in the coarse-grained recall set according to the locally maintained user private profile, generating a final personalized recommendation list adapted to the user's personalized style, and the final personalized recommendation list serving as the final recommendation result.
[0020] Secondly, embodiments of the present invention provide a recommendation system based on hierarchical local personalized style prediction, including a processor, a memory, and a computer program / instructions stored in the memory, characterized in that the processor is used to execute the computer program / instructions, and when the computer program / instructions are executed, the system implements the steps of any of the methods described in the above embodiments.
[0021] Thirdly, embodiments of the present invention provide a computer-readable storage medium having a computer program / instructions stored thereon, characterized in that the computer program / instructions, when executed by a processor, implement the steps of the method as described in any of the above embodiments.
[0022] This invention proposes a recommendation method and system based on hierarchical local personalized style prediction. It constructs a privacy-preserving paradigm where data and models reside locally. Both the original user data and the final personalized model parameters reside on the user's terminal. This allows for enhanced generalization capabilities through collective knowledge and efficient fine-tuning using local private data to reduce terminal load, thereby achieving accurate and forward-looking style evolution prediction and personalized services while adhering to compliance requirements. Through the synergy of four stages—controlled data training, collective anonymization enhancement, efficient local personalization, and privacy-preserving service coordination—it systematically resolves the long-standing core contradiction in personalized recommendation: the difficulty in simultaneously balancing user privacy protection, model generalization ability, and terminal computational efficiency.
[0023] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the text, or may be learned by practice of the invention. The objects and other advantages of the invention will become apparent from the description and the accompanying drawings.
[0024] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description
[0025] The accompanying drawings are provided to further understand the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof.
[0026] In the attached diagram: Figure 1 This describes a recommendation methodology based on hierarchical local personalized style prediction.
[0027] Figure 2 A flowchart illustrating the method for fine-tuning to obtain a local personalized model.
[0028] Figure 3 A flowchart illustrating the method for identifying high-risk time windows.
[0029] Figure 4 This is a flowchart of a recommendation method based on hierarchical local personalized style prediction. Detailed Implementation
[0030] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0031] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0032] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" or any other variations thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0033] Existing personalized style prediction recommendation methods cannot systematically reconcile the trilemma: user privacy protection, model generalization ability (data utility), and terminal computational efficiency (terminal acceptability).
[0034] To reconcile and resolve the conflict between user privacy protection, model generalization ability, and terminal computing efficiency, this invention proposes a recommendation method and system based on hierarchical local personalized style prediction. A baseline survival analysis model is trained using a controllable dataset to learn user style transition risks. A differentially privacy-enhanced style transfer counting matrix is generated locally and aggregated into a group transition probability tensor on the server side. This group knowledge is then fused into the baseline survival analysis model through a conditional augmentation network to generate a global model. The global model is then distributed and fine-tuned using local private data using low-rank adaptation techniques to obtain a personalized model and identify high-risk time windows. In response to high-risk windows, the terminal generates an encrypted abstract intent packet and sends it to the server. After broad recall by the server, the terminal combines the local private profile to complete the final sorting and presentation.
[0035] Figure 1 This describes a recommendation method based on hierarchical local personalized style prediction, where the local execution entity is the terminal device. The method includes the following steps: Step S1: Generate a counting matrix reflecting the individual style transfer of a user locally, upload the counting matrix to the server, and receive the global model sent by the server; wherein, the server improves the pre-trained baseline survival analysis model based on the counting matrix uploaded by different terminal devices to obtain the global model. The baseline survival analysis model is used to predict the probability of user style change events occurring at different time points in the future based on the user's historical behavior time series data.
[0036] The baseline survival analysis model takes historical user behavior time-series data as input and outputs the probability of user style change events occurring at different future time points. Integrating the baseline survival analysis model over time yields the baseline cumulative risk function. The probability of a user style change event can also be expressed as the risk of that event occurring. Step S1 allows for the collection of statistical information reflecting macro-level population style evolution patterns without accessing raw user behavior data. This information is then used to enhance the baseline survival analysis model, giving it stronger generalization capabilities.
[0037] Step S2: Fine-tune the received global model based on local private historical data to obtain a local personalized model. Identify high-risk time windows of user style evolution based on the local personalized model, and extract style change direction vectors based on the corresponding probability distribution vectors output by each window in the high-risk time windows.
[0038] The fine-tuning of the received global model based on local private historical data can employ low-rank adaptation techniques. Furthermore, the data distributed can be either the global model alone or a combination of the global model and a baseline cumulative risk function. The difference between the local private historical data in step S2 and the local private historical data used to train the baseline survival analysis model lies in the fact that the baseline survival analysis model may have been trained earlier, making its data "early data," while the local private historical data in step S2 is data collected from the current time backward. Both are stored locally as private data, but the local private historical data used to train the baseline survival analysis model is used to construct a transfer pattern reflecting the user's long-term style evolution habits, i.e., contributing to the group, while the local private historical data in step S2 primarily reflects recent preference changes for personalized fine-tuning (reflecting the individual). Moreover, the two may not be targeting the same specific object of data (i.e., they are not the same data).
[0039] Step S3: Generate an abstract intent package based on the quantified high-risk time window and the style change direction vector, upload the encrypted abstract intent package to the server, and receive the coarse-grained recall set sent by the server. Generate a final recommendation result adapted to the user's personalized style based on the coarse-grained recall set and the locally maintained user private profile; wherein, the coarse-grained recall set includes a set of candidate results that match the encrypted intent package selected by the server based on the decrypted encryption intent package.
[0040] Step S3, in response to the identification of the high-risk time window, executes a complete collaborative process from intent abstraction, secure transmission, server-side fuzzy recall, and local sorting on the terminal device to obtain the final presentation, thereby providing personalized recommendation services without compromising user privacy. Specifically, this includes: the terminal device generating an encrypted abstract intent package containing a style change direction vector and the high-risk time window, and sending it to the server; the server performing broad recall based on the abstract intent package; and the terminal device using its local private profile to complete the final fusion, sorting, and presentation of the recall results. This method effectively balances service personalization and user privacy protection, significantly improving the conversion efficiency and user experience from style prediction to service delivery. Broad recall refers to efficiently filtering all content that users "might be interested in" from a massive candidate pool.
[0041] The proposed recommendation method based on hierarchical local personalized style prediction constructs a privacy-preserving paradigm where data and models reside locally. Both the original user data and the final personalized model parameters reside on the user's terminal. It enhances generalization ability through collective knowledge and efficiently fine-tunes the system using local private data to reduce terminal load, thereby achieving accurate and forward-looking style evolution prediction and personalized services while adhering to compliance requirements. Through the synergy of four stages—controlled data training, collective anonymization enhancement, efficient local personalization, and privacy-preserving service coordination—it systematically resolves the long-standing core contradiction in personalized recommendation: the difficulty of balancing user privacy protection, model generalization ability, and terminal computational efficiency.
[0042] In some embodiments of the present invention, the method further includes the step of pre-training a baseline survival analysis model using a controllable dataset, specifically including: obtaining a controllable dataset with clearly defined data usage permissions and controllable privacy risks; wherein the controllable dataset includes one or more time-series data of user historical behavior that can reflect individual user styles; constructing a dynamic feature vector as input to the basic prediction model based on the controllable dataset; defining user style change events and risk times in the basic prediction model; constructing the basic prediction model, using a neural network-based deep survival analysis framework as the core architecture of the basic prediction model, iteratively training and evaluating the basic prediction model using the dynamic feature vector, constructing a loss function using the standard negative log-likelihood loss of survival analysis, and obtaining a baseline survival analysis model with baseline prediction capabilities.
[0043] By employing this embodiment of the invention, the generalization ability of the baseline survival analysis model can be guaranteed through controlled data training, thus avoiding overfitting of the subsequent local personalized model.
[0044] In some embodiments of the present invention, the counting matrix is constructed based on local private time-series data of user historical behavior within a preset time span.
[0045] In some embodiments of the present invention, before the step of uploading the counting matrix to the server, the method further includes: adding noise to the counting matrix to meet differential privacy requirements, so that even if the server or an attacker obtains the noisy counting matrix, they cannot infer any individual information from it.
[0046] By employing this embodiment of the invention, the data privacy of each user can be protected through differential privacy noise addition, and the counting matrices uploaded by different terminals constitute anonymous group knowledge.
[0047] In some embodiments of the present invention, the step of the server improving the pre-trained baseline survival analysis model based on the counting matrices uploaded by different terminal devices to obtain a global model includes: the server aggregating the noisy counting matrices uploaded by different terminal devices to form a group style transition probability tensor representing the group style evolution law; the server integrating the group style evolution law represented by the group style transition probability tensor into the baseline survival analysis model through a conditional augmentation network to generate the global model.
[0048] By employing this embodiment of the invention, the generalization ability of the global model can be further improved through the anonymous group knowledge aggregated in the cloud. Based on the attention mechanism, the Conditional Enhancement Network (CEN) can dynamically and effectively integrate macroscopic evolutionary knowledge represented by the group style transfer probability tensor processed with differential privacy from massive users into the basic prediction model, thereby significantly improving the model's generalization ability to real, diverse user distributions and alleviating the "cold start" and data bias problems caused by relying on limited and controllable datasets.
[0049] In some embodiments of the present invention, the step of fine-tuning the received global model based on local private historical data to obtain a local personalized model... Figure 2 The flowchart for fine-tuning the local personalized model is as follows: Figure 2 As shown, it specifically includes: Step S21: Inject the LORA adapter into the global model and freeze the original weights of the global model.
[0050] Step S22: Fine-tune the global model using the LORA scheme based on local private historical data.
[0051] Step S23: The weights learned by the LORA adapter during fine-tuning training are combined with the original weights of the frozen global model to obtain a local personalized model.
[0052] By employing this embodiment of the invention, efficient parameter fine-tuning techniques (such as LoRA) can be used in the personalization stage, updating only a very small number of parameters and controlling the fine-tuning time to the second level. The increase in memory and energy consumption is significantly lower than that of traditional federated learning schemes, enabling complex AI models to be deployed and run efficiently and feasiblely on mobile terminals.
[0053] Furthermore, to address the issue of limited terminal device resources, lightweight compression can be achieved through post-training quantization and sparse pruning during the model distribution phase.
[0054] In some embodiments of the present invention, the step of identifying high-risk time windows of user style evolution based on the local personalization model specifically includes: smoothing the original risk prediction curve output by the local personalization model; filtering out continuous time periods with risk values higher than the threshold according to a preset dynamic threshold; and determining the continuous time period as a high-risk time window only when the length of the continuous time period is not less than the preset minimum window length; wherein, risk refers to the occurrence of user style change events.
[0055] By employing this embodiment of the invention, it is possible to predict locally the probability of user style change events occurring at different points in the future, and successfully achieve accurate and forward-looking prediction of the long-term evolution trend of user style while strictly complying with privacy regulations.
[0056] In some embodiments of the present invention, the method further includes obtaining a coarse-grained recall set by the server based on the received abstract intent packet through broad recall. Figure 3 A flowchart illustrating the method for identifying high-risk time windows, such as... Figure 3 As shown, it specifically includes: Step S31: The server decrypts the received abstract intent packet.
[0057] Step S32: In the public resource library maintained by the server, a preliminary coarse-grained recall set is obtained by multi-strategy parallel recall based on the decrypted encrypted intent packet; wherein, the multi-strategy includes some or all of the main style focusing strategy, directional exploration strategy, time series heat supplementation strategy and diversity guarantee strategy.
[0058] Step S33: Perform deduplication and coarse screening on the initial coarse-grained recall set to obtain the final coarse-grained recall set.
[0059] By employing this embodiment of the invention, predictive insights can be securely and efficiently transformed into personalized recommendation services. This solution can simultaneously take into account and balance the three key dimensions of privacy protection, model performance, and computational efficiency.
[0060] In some embodiments of the present invention, the step of generating a final recommendation result adapted to the user's personalized style based on the coarse-grained recall set and the locally maintained user private profile includes: sorting the candidate result set included in the coarse-grained recall set according to the locally maintained user private profile, generating a final personalized recommendation list adapted to the user's personalized style, and the final personalized recommendation list serving as the final recommendation result.
[0061] By employing this embodiment of the invention, predictive insights can be securely and efficiently transformed into personalized recommendation services, while taking into account and balancing the three key dimensions of privacy protection, model performance, and computational efficiency.
[0062] Figure 4This is a flowchart of a recommendation method based on hierarchical local personalized style prediction. First, the server pre-trains a baseline survival analysis model using a controllable dataset. Then, the terminal device uploads data after adding noise, based on a count matrix representing user style transfer. Next, the server aggregates the count matrices to obtain a group style transfer probability tensor, trains a global model based on this tensor, and distributes the global model to the terminal device. Then, the terminal device uses low-rank adaptation technology to fine-tune the global model based on local private historical data to obtain a local personalized model. Based on this model, high-risk time windows are identified, and an encrypted abstract intent package is constructed and sent to the server. Then, the server performs broad recall based on the decrypted abstract intent package to obtain a coarse-grained recall set, which is sent to the terminal device. Finally, the terminal device determines the final recommendation result based on the local user profile and the coarse-grained recall set.
[0063] In one specific embodiment of the present invention, a controllable dataset is constructed by collecting source data and performing preprocessing. The source data of the controllable dataset may include anonymized internal employee clothing data, time-series data of fashion bloggers obtained compliantly from public platforms, and long-term behavioral data of volunteers with explicit informed consent, as well as other historical user behavior time-series data. It should be noted that the aforementioned source data undergoes compliant processing to ensure clear access rights to the data source and controllable privacy risks. After obtaining the aforementioned source data, it can be preprocessed using a data preprocessing pipeline to form high-quality training data.
[0064] Specifically, the data on de-identified internal employee attire can be sourced from anonymized records of employee attire. The data includes primary style tags (e.g., "business," "casual," "sports," "retro") and secondary tags (e.g., "minimalist," "bohemian"). Each record contains an anonymous employee ID, a timestamp (year and month), and the corresponding clothing item ID, all processed with irreversible hashing. Privacy is ensured by processing all employee identifiers using a one-way hash function (e.g., SHA-256) to guarantee that the data is unrecoverable and contains no personally identifiable information (PII). For example, in one embodiment of this invention, the data collection involves approximately 1200 internal employees over a period of 3 years (36 months), resulting in approximately 1200 × 36 = 43200 records.
[0065] Specifically, the data source for publicly available fashion blogger time-series data can be obtained compliantly from the public APIs of mainstream fashion social media platforms. The data content includes: based on the outfit images and descriptions posted by bloggers each month, extracting their monthly dominant style tags. For example, in one embodiment of this invention, data from approximately 150 fashion bloggers over the past two years was collected and analyzed, totaling approximately 150 × 24 = 3600 data entries.
[0066] Specifically, regarding the long-term behavioral data authorized by volunteers, the data source could be approximately 350 volunteers recruited after obtaining explicit and broad informed consent, who were then granted access to their shopping and browsing history over the past two years on a specific partner e-commerce platform. The data content includes: anonymizing the original behavioral logs, extracting the user's monthly purchase style tag sequence and browsing content style preferences, and constructing monthly style tags. All volunteer IDs are decoupled from platform account IDs. For example, in one embodiment of this invention, the amount of data obtained is approximately 350 × 24 = 8400 records.
[0067] In some embodiments of the present invention, the above-mentioned data preprocessing pipeline includes some or all of the following: 1) Cleaning and deduplication: removing records with missing or invalid style tags, and merging duplicate records of the same user in the same month. 2) Style tag standardization: establishing a normalized dictionary containing 128 fine-grained style tags (such as "business-formal", "casual-street", "retro-Hong Kong style"). All original tags are mapped to the nearest neighbor tags in the dictionary through a semantic similarity model. 3) Sequence alignment and imputation: ensuring the continuity of the time series for each user (or blogger). If data for a certain month is missing, forward imputation is used to supplement it with the tags of the previous month, ensuring that each user has a complete style series for 24-36 consecutive months. 4) Constructing the final controllable dataset: merging the three types of processed data to form a controllable dataset of approximately 55,200 high-quality monthly style records. Each record can be represented as a triple. .in, This represents the user ID after hashing. Represents a timestamp. This indicates a style tag.
[0068] In some embodiments of the present invention, the step of constructing a dynamic feature vector as input to the basic prediction model based on the controllable dataset includes: constructing a dynamic feature vector for input to the basic prediction model. The dynamic feature vector is obtained by analyzing the user's behavioral sequence over a period of time, and includes at least: style tag encoding representation, long-term preference distribution characteristics, style transfer statistical characteristics, and recent preference characteristics based on time decay. After the basic prediction model is trained, the baseline survival analysis model is established. Specifically, for a controllable dataset... Each user in the game, based on their past... Months (e.g.) The style sequence is used to construct dynamic feature vectors for model input. The dynamic feature vector is a concatenation of the style label One-Hot encoded sequence, the style TF-IDF vector, the style transfer frequency, and the time decay weight.
[0069] The style tag One-Hot encoding sequence can encode the style tags (128 dimensions) from the most recent 6 months into a 6×128 sparse matrix. .
[0070] The style TF-IDF vector is calculated by assigning TF-IDF weights to all style tags used by the user over the past 24 months, resulting in a 128-dimensional vector. This reflects their long-term preference distribution.
[0071] Style transfer frequency: The upper triangular portion (excluding the diagonal) of the first-order transition probability matrix (128×128) between style tags of statistical users over the past 6 months, flattened into an 8128-dimensional sparse vector. .
[0072] The time decay weight assigns higher weight to observations from the most recent month. The weighted average style vector is then calculated. Among them, the attenuation factor Set it to 0.8. Indicates the first The style tag for the month. This value is determined on the validation set through a grid search, designed to balance the weights of recent and historical information (e.g., approximately 0.8 for 1 month ago, approximately 0.8 for 6 months ago). That is, dynamic feature vectors: That's understandable. The total dimension is Dimensions. Among them, This indicates the style tag One-Hot encoded sequence. Representing style TF-IDF vectors, Indicates the frequency of style transfer. This represents the time decay weight.
[0073] Optionally, to facilitate model processing, a fully connected layer can be used to... The dimensions were reduced to 512, which were then used as the final input features for the model.
[0074] In some embodiments of the present invention, for the steps of defining user style change events and risk time in the basic prediction model described above, the definition of the user style change event may be: for user If in two consecutive months and If any of the following conditions are met, then it is determined that... A style shift event occurred in the month. Conditions: 1) Its primary style tag (the tag corresponding to the maximum value in Style_Vector) changes; 2) Its monthly style vector... and The cosine similarity between them is lower than a preset threshold. In one embodiment of the present invention, the preset threshold θ can be set to 0.7, that is... Test statistics show that when the preset threshold θ=0.7, it can effectively distinguish between normal monthly style fluctuations and significant style shifts that can be regarded as changes.
[0075] The specific definition of risk time is: for each observation point (the user in a certain month)... ), its risk time Defined as the number of months from the current month until the next style change event occurs. If no event occurs by the end of the observation period, the sample is marked as censored.
[0076] In one embodiment of the present invention, the DeepSurv neural network-based deep survival analysis model is used as the basic prediction model and baseline survival analysis model. The core architecture of the basic prediction model. Structurally, the basic prediction model specifically includes: Input layer: Receives preprocessed feature vectors with dimension 512. Among them, the preprocessed feature vector It is extracted from time-series data of users’ historical behavior that can reflect individual user styles; Feature extractor: a neural network containing three fully connected layers. First layer: 512-dimensional input → 256-dimensional output, using the ReLU activation function and applying Dropout. To prevent overfitting.
[0077] Second layer: 256 dimensions → 128 dimensions, ReLU activation, Dropout (… ).
[0078] Third layer: 128 dimensions → 64 dimensions, ReLU activation.
[0079] Survival analysis layer: Inputs 64-dimensional features into a linear layer and outputs a scalar risk score (log-riskhazard). , This is the risk function. The risk score represents the risk score given a feature. Under the conditions, in time The relative risk of an event occurring.
[0080] Risk function: a parameterized benchmark risk function and characteristics influence Commonly define risk function .in These are the parameters learned by the model. Represents a given feature.
[0081] In some embodiments of the present invention, the above-described steps of iteratively training and evaluating the basic prediction model using the dynamic feature vector can employ the standard negative log-likelihood loss of survival analysis to construct a loss function, thereby obtaining a baseline survival analysis model with baseline prediction capabilities. The training settings include: Optimizer: In this embodiment, the Adam optimizer can be used to set the initial learning rate. Set batch size .
[0082] Loss function: In this embodiment, the standard negative log-likelihood loss from survival analysis is used. The loss function considers both individuals who experienced the event and those who were right-censored. in, Represents the risk function, Represents the cumulative baseline risk function. Indicates events of stylistic change. Represents the eigenvector. As an independent variable, it is estimated along with the model.
[0083] Training period: In this embodiment, on a controllable dataset The model was trained for 50 epochs. Validation showed that the model loss function converged sufficiently within this period. Furthermore, the early stopping strategy on the validation set (patience=10) effectively prevented overfitting, ensuring a balance between training efficiency and model performance.
[0084] Evaluation Metrics and Baseline Performance: Prediction Accuracy: Converts the risk score predicted by the model into a binary prediction (whether it will occur in the future). Changes occurred within a month. The accuracy is calculated. In this embodiment, the baseline survival analysis model... The accuracy rate reached 75.2% on the test set. The C-index measures the consistency between the model's predicted risk ranking and the actual event timing ranking; a value closer to 1 is better. In this embodiment, The C-index is 0.78. Time-dependent AUC: The AUC is calculated for different prediction time points (1 month later, 3 months later, 6 months later) to evaluate the model's discriminative ability over different prospective periods. In this embodiment, The AUC for the March forecast period is 0.76.
[0085] In some embodiments of the present invention, the step of locally generating a counting matrix reflecting an individual user's style transfer specifically includes: the terminal device locally generating the style evolution pattern representation, which generates a discrete style ID sequence by clustering and discretizing the continuous style space in the user's local private data, and constructing an individual style transfer counting matrix based on the sequence. When a user explicitly agrees to participate in (e.g., a group style trend analysis plan) in the terminal device's application (APP), the APP locally processes their private historical behavior data in a one-time manner to construct the individual style transfer counting matrix.
[0086] Specifically, constructing an individual style transfer counting matrix includes: counting the user's past... Monthly continuous style vectors are mapped to macro-style ID sequences using a predefined clustering model. Initialize a zero matrix ,in Total number of macro style categories; traversal sequence For from arrive ,implement The resulting matrix This is a counting matrix that reflects the style transfer patterns of individual users.
[0087] In a specific embodiment of the present invention, the step of generating a counting matrix that reflects the individual style transfer of a user locally includes: inputting local private historical data, performing clustering and discretization processing on the style space, and constructing an individual style transfer counting matrix.
[0088] The aforementioned input local private historical data includes: behavioral logs of the APP (applications on the terminal device) accessing its locally encrypted storage, which can contain fine-grained records from the past L months (e.g., L=24 months). Each record contains a timestamp (year and month) and a 128-dimensional style preference vector. 128-dimensional style preference vector Style preference vectors can be extracted based on user behavior data such as monthly shopping data, browsing data, and collection data. Each dimension corresponds to the preference intensity of the 128 fine-grained style tags defined in the previous steps (with values between 0 and 1).
[0089] The aforementioned clustering and discretization of the style space includes: to further reduce computational complexity and privacy risks, the server can use the K-Means algorithm for style clustering, dividing the 128-dimensional continuous style space into... Clusters Each cluster represents a macro style (e.g., "Commuter Business," "Urban Casual," "Sweet Retro"). In this embodiment, the number of clusters K is set to 50. This is to determine the clusters on a public dataset using the elbow rule. Using K=50 strikes a balance between preserving sufficient macro style discriminative power and ensuring the efficiency of subsequent matrix calculations. The terminal device APP synchronizes the mapping relationship between the 128-dimensional continuous style space and the clusters with the server, and stores the continuous style vectors for each month. Mapped to the most similar cluster ID: ( Through this operation, a user's 24-month history is converted into a macro-style ID sequence of length 24. .
[0090] The construction of the individual style transfer counting matrix includes: analyzing the sequence S and statistically analyzing the style transfer between adjacent months. Specifically, a 50×50 all-zero matrix is initialized. (user (Transition counting matrix). For =1 to 23, execute: That is, if a user's style is 'a' in January and 'b' in February, then the element in the 'a'-th row and 'b'-th column of the matrix is incremented by 1. Ultimately, It is a sparse counting matrix whose elements This indicates that the user, over the past 24 months, has adopted a macro style... Shift to style The number of observations. This matrix encodes the user's individual style evolution pattern while removing sensitive information such as specific products and time points, thereby further reducing the risk of privacy leaks.
[0091] In some embodiments of the present invention, the above-described step of adding noise to the counting matrix to satisfy differential privacy requirements is designed to ensure that even if the server or an attacker obtains the processed data, they cannot infer any individual information. Each terminal device APP uploads its... Previously, differential privacy noise was added locally.
[0092] Optionally, a privacy budget can be set based on overall privacy protection requirements. After experimental trade-offs, this budget value can maintain the availability of population statistics while providing strong mathematical privacy. For the transition counting matrix... Its global sensitivity Defined as: the maximum L1 norm of the difference between corresponding elements in a matrix generated from any two adjacent datasets (i.e., data differing by only one user per month). Since a user contributes to the transfer count at most once at a given time point (from a certain... To a certain ),therefore .
[0093] Injecting Laplace noise, specifically including: to the matrix Each element in Independently add noise sampled from the Laplace distribution: The elements after adding noise are: Non-negative truncation of the noise-added results is strictly prohibited at this stage; the generated negative values must be fully preserved. Preserving negative values is an algebraic prerequisite for maintaining the zero-mean property of the Laplace distribution, ensuring that local noise can be statistically canceled when the server performs large-scale tensor aggregation, thus meeting the unbiased estimation requirements of differential privacy. It should be noted that injecting Laplace noise can be done on the user's device using a secure random number generator, preserving the matrix of original positive and negative values. That is to satisfy Differential privacy local unbiased perturbation data can be directly output for uploading.
[0094] The differential privacy noise reduction process specifically includes: ① setting a privacy budget. ② Determine the global sensitivity of the individual style transfer counting matrix. ③ For each element in the matrix, independently add elements from the Laplace distribution. ④ Retain the original positive and negative values of the matrix elements after adding noise to meet the unbiased estimation requirements of differential privacy, and directly output the unbiased perturbation matrix for uploading.
[0095] In some embodiments of the present invention, the step of aggregating the noisy counting matrices uploaded by different terminal devices on the server side to form a group style transfer probability tensor characterizing the evolution law of the group style is detailed as follows: Noise matrix of all participating users After secure upload, the data is mixed and aggregated at a trusted aggregation node. This trusted aggregation node can be a server based on a Trusted Execution Environment (TEE) or a decentralized service employing a Secure Multi-Party Computation (MPC) protocol.
[0096] The secure upload mentioned above can specifically be: the terminal device APP transmits data through a TLS 1.3 encrypted channel. The corresponding monthly index is uploaded to the trusted aggregation node. The monthly index identifies which month this is from which period of the statistics, and no user ID or device identifier is included during the upload process.
[0097] Time-aligned aggregation is performed during the mixing and summarizing process. Understandably, since different users participate in the group style trend analysis plan at different times, time alignment is necessary for trend analysis. In this embodiment, the trusted aggregation node maintains a... 3D tensor Each corresponds to the starting style Target style Time offset (months) The three-dimensional tensor The initial value is all zeros.
[0098] For each uploaded Based on its month index, it is accumulated into the tensor. On the corresponding time slice. That is, if Data representing the user's most recent 24 months, then Added to middle.
[0099] After time-aligned aggregation, a group style transfer probability tensor is generated. Specifically, this includes: After all participating users' data is aggregated, due to the zero-mean characteristic of individual Laplace noise, the aggregated three-dimensional tensor... The noise in the signal cancels out. The server then... Perform global non-negative truncation, setting all negative values to zero.
[0100] Subsequently, Each time slice (one (matrix), normalize its rows, and calculate the conditional transition probabilities: .
[0101] in For a small smoothing factor (in this embodiment, (), used to prevent division by zero and improve stability.
[0102] Finally, the group style transfer probability tensor is obtained. Its elements Indicates time offset Months later, the group's style Shift to style The estimated probability. In essence, it is an anonymous, dynamic knowledge graph of collective style evolution extracted from a massive number of users.
[0103] In some embodiments of the present invention, the step of the server integrating the group style evolution law represented by the group style transfer probability tensor into the baseline survival analysis model through a conditional augmentation network to generate the global model involves the server obtaining the group style transfer probability tensor. Then, it is used to enhance the baseline survival analysis model trained in the aforementioned steps. Generate a global model with stronger generalization ability. In this embodiment, the enhancement is achieved through a conditional enhancement network. This step specifically includes: CEN architecture design, global model training and fine-tuning, and global model ensemble.
[0104] In the aforementioned CEN architecture design, the conditional enhancement network is an independent, attention-based neural network module. This neural network module receives two inputs: 1) a group style transfer probability tensor. Extracted context vector; 2) Feature representation of the intermediate layer.
[0105] Initial settings: Context encoder: Transforming the group style transfer probability tensor Encodes a fixed-length context vector through a 3D convolutional layer and a global pooling layer. (e.g., 256 dimensions), which summarize the current trends in population evolution.
[0106] Cross-attention layer: Let yes The output features of a certain intermediate layer (e.g., 64-dimensional). CEN will... As key and value, As a query, calculate cross-attention: ; in, , and These are learnable parameters. It is the dimension of the key vector.
[0107] Feature fusion and output: combining attention-weighted group information with the original features The features are added or concatenated, and then passed through a residual feedforward network to output the enhanced features. This feature will be input into The subsequent layers.
[0108] The training and fine-tuning settings for the aforementioned global model are as follows: Training data: using a controlled dataset Training is then performed. Understandably, the augmentation process does not rely on new sensitive data, but only utilizes existing safe data and the group style transfer probability tensor. .
[0109] Training process: The parameters are frozen (or a very low learning rate is used), and the parameters of the CEN module are primarily trained. The training objective is to minimize the parameters of the CEN module. The negative log-likelihood loss.
[0110] Training techniques: Introduce gradient clipping to prevent excessive distortion in CEN updates. The knowledge already learned. Simultaneously, a course-based learning strategy is employed, primarily utilizing the group style transfer probability tensor in the early stages of training. The overall average value is used, and later, more granular time slice information is introduced to allow the model to gradually adapt to dynamic group knowledge.
[0111] The aforementioned global model ensemble includes: after training, [the following steps are taken]. Integrate with the trained CEN module into a new model, i.e., a global model. The reasoning process is as follows: Input user characteristics → First few layers → CEN (Integrated Group Context) → The remaining layer outputs risk predictions, which are based on the time series data of users' historical behavior to predict the probability of user style change events occurring at different points in the future.
[0112] Understandably, performance evaluation is performed after global model integration. In this embodiment, this evaluation is conducted on a controllable dataset. On the test set, The accuracy of style change predictions has increased from The percentage increased from 75.2% to 87.5%, and the C-index increased from 0.78 to 0.90. Additionally, it was possible to test on a completely independent new test set sampled from real app users. The prediction accuracy reached 82.1%, significantly better than... On this set, 65.5% of the results demonstrate that group statistical anonymization enhancement substantially improves the model's generalization ability. Furthermore, validation revealed that the success rate of inferring any specific user's original behavioral sequence from this data is lower than... ,satisfy Differential privacy requirements, while group style transfer probability tensor It retains over 88% of the macro style shift patterns, achieving a balance between privacy and utility.
[0113] Optionally, before the step of fine-tuning the received global model based on local private historical data, the method further includes: the terminal device receiving the global model and its corresponding baseline cumulative risk function after lightweight compression and encryption transmission. The curve parameters are then processed, and security verification and loading are performed. The server generates... Then, it is deployed efficiently and securely to user terminals in the following manner. The above process includes: model lightweighting and compression, secure encrypted transmission and verification.
[0114] The aforementioned model lightweighting and compression specifically includes: Inherited from (DeepSurv architecture) with the addition of a conditional augmentation network. To adapt to mobile network environments, post-training dynamic range quantization can be used to quantize the model weights from FP32 to INT8, while retaining the output layer as FP16 to maintain accuracy. In this embodiment, the total number of parameters is about 1.2M. Through this processing method, the model file size can be reduced from about 4.8MB to about 1.8MB.
[0115] Furthermore, amplitude-based unstructured sparsity pruning is applied to remove... Weighted connections with amplitudes below a threshold (e.g., 1e-3). This threshold, determined experimentally, effectively compresses the model while maintaining controllable accuracy loss, achieving a sparsity of approximately 30%. Furthermore, rapid fine-tuning is performed for one epoch after pruning to restore accuracy, further reducing the model size.
[0116] Furthermore, after quantification and pruning, it can be... It is packaged into a .litemodel file with a total size of less than 2.5MB, making it easy to download over mobile networks.
[0117] Specifically, the aforementioned secure encrypted transmission and verification include: a global model. The file is sent from the server to the local terminal device APP via a TLS 1.3 encrypted channel, and the forward secret cipher suite is used during the transmission process.
[0118] Furthermore, integrity verification is performed after transmission. That is, after the APP receives the file, it uses the public key pre-set on the server to verify the digital signature of the file to ensure that the model has not been tampered with during transmission.
[0119] Once the verification is successful, the app calls the local neural network inference engine of the terminal device (such as NNAPI for Android or Core ML for iOS) to load and compile the model, preparing it for subsequent local personalized fine-tuning.
[0120] In one embodiment of the present invention, the terminal device needs to prepare user-private historical data, entirely stored locally, for model fine-tuning. The data required for personalized fine-tuning originates locally on the user device. It is understood that performing personalized fine-tuning locally on the user device ensures that this data does not leave the local device, thereby preventing privacy leaks.
[0121] The data sources required for personalized fine-tuning include: Structured Behavior Logs: User behavior records (i.e., local private historical data) stored in the app's local database over the past N months (e.g., N=36 months), including purchase records (product ID, time, style tags), browsing sessions (product list, dwell time), favorites, likes, etc. Choosing 36 months aims to cover a sufficiently long historical behavioral pattern.
[0122] Real-time context cache: A temporary cache of real-time interactive events within the past week.
[0123] When a fine-tuning task is triggered, the app invokes a local lightweight feature extractor for immediate processing. This extractor is a small neural network of approximately 200KB containing two fully connected layers, used to transform the raw behavior logs into a real-time representation of the target data. Feature vectors with a consistent format. Understandably, the extraction process can be performed entirely in memory, for example, calculating style TF-IDF vectors and style transfer frequencies based on behavior over the past 6 months.
[0124] Furthermore, training samples can be constructed from data over the past 36 months using a sliding window approach. Each training sample consists of features from six consecutive months. As input, the corresponding style change event label As a supervisory signal, a mini training set can be constructed using the 12 most recent similar samples (covering approximately 18 months of data) in a default configuration. This data, collected locally and privately, was used for this fine-tuning. Although the sample size was small, all samples were highly correlated with recent user behavior.
[0125] In a specific embodiment of the present invention, the step of fine-tuning the received global model based on local private historical data to obtain a local personalized model includes: the terminal device using Parametric Efficient Fine-Tuning (PEFT) technology to personalize the global model, generating the personalized model. To avoid the significant overhead of full model training on the terminal, this embodiment employs a Low-Rank Adaptation (LoRA) scheme, only training the global model on the local private historical data. A small number of parameters were updated.
[0126] In one embodiment of the present invention, injecting a LORA adapter into the global model and freezing the original weights of the global model specifically includes: The feature extractor part (i.e., the aforementioned three fully connected layers) uses a weight matrix for each weight matrix. Inject a pair of trainable low-rank matrices and ,in It is rank. Original weight It's frozen and will no longer be updated. This is understandable, given the rank... It can adaptively select based on the terminal's computing power. For example, for mainstream mid-range devices such as the Snapdragon 7 series, the rank can be set. For low-end devices such as the Snapdragon 6 series or lower, the rank can be dynamically adjusted. For high-end devices such as the Snapdragon 8 series, it can... This design ensures a balance between computational load and personalization capabilities. Understandably, the modified forward propagation formula is: ,in Constructing the original weights Low-rank update The parameters that need to be trained are only... and The quantity is far fewer This significantly reduces the number of trainable parameters in the model from 1.2M to approximately 10K.
[0127] In one embodiment of the present invention, the local private historical data is a local dataset. The global model is fine-tuned and trained using the LoRa scheme based on local private historical data, specifically including: Optimizer: In this embodiment, SGD (Stochastic Gradient Descent) is used instead of Adam to save memory (Adam requires maintaining momentum and variance states). Meanwhile, the learning rate is set... This value is determined through a small-scale grid search to strike a balance between convergence speed and stability.
[0128] Batch size: Due to the small amount of data, full-batch gradient descent is used in this embodiment (Batch Size = total number of samples, approximately 12).
[0129] Number of training epochs: In this embodiment, only 5 epochs are trained. Because... Since they are already highly correlated, fine-tuning converges very quickly. This round setting can minimize computational overhead while ensuring personalization.
[0130] Loss function: The negative log-likelihood loss is used in the baseline survival analysis model. However, the calculations are based on local samples.
[0131] Optionally, resource consumption can be monitored and limited during training, including: automatic fusion of operations by the inference engine to reduce kernel calls; locking model weights in contiguous memory to reduce fragmentation; and setting fine-tuning tasks as low-priority background tasks that are executed automatically only when the device is charging or idle, or manually triggered by the user.
[0132] After training, the learned low-rank matrices A and B are compared with the frozen original weights. The models are merged to form the final personalized model. In this embodiment, The model file is only about 100KB in size and is stored independently on the user's local device.
[0133] In one specific embodiment of the present invention, the terminal device performs style evolution prediction locally based on the personalized model, generates a prediction curve, and identifies high-risk time windows by analyzing the curve.
[0134] The identification of high-risk time windows specifically includes: smoothing the original risk prediction curve output by the model; filtering out continuous time periods with risk values higher than the preset dynamic threshold; wherein the risk value is the probability value of the occurrence of user style change events; and only when the length of the continuous time period is not less than the preset minimum window length is it determined to be a high-confidence risk time window. Once deployed, it can utilize the latest user behavior data to perform real-time, low-latency risk prediction and inflection point identification locally.
[0135] Furthermore, style change direction vectors are extracted from the corresponding probability distribution vectors output by each window within the high-risk time window, i.e., real-time risk prediction. The process is as follows: Input: Extract feature vectors in real time based on the user's behavior data over the past month. .
[0136] Risk curve generation: Input local personalized model The model front-end outputs the individual's log-proportional risk scalar. The terminal utilizes the baseline cumulative risk function distributed with the model. Through formula Calculate users in the future any time during the day The cumulative probability of change is calculated. This cumulative probability distribution is discretized and differencing to obtain the marginal probability of occurrence for each future day, thus forming a daily risk probability density curve. ,in .
[0137] Output Explanation: This curve presents the time probability density of actual change behavior after relative risk weighting.
[0138] High-confidence inflection point time window identification: Smoothing: First, smooth the original risk curve. Applying a moving average filter, with a window width of 7 days in this embodiment, a smooth curve is obtained. This eliminates noise and short-term fluctuations. A 7-day window effectively smooths out daily fluctuations and reflects weekly trend changes.
[0139] Threshold trigger: Define a dynamic threshold Initial threshold Personalized adjustments are made based on the stability of the user's historical predictions: if the user's past predictions of inflection points have a high accuracy rate, T is appropriately reduced to improve sensitivity; conversely, T is increased. To reduce false alarms.
[0140] Persistence determination: Identify all conditions that satisfy the following criteria. A continuous range of dates. Only if the length (number of days) of the range is... Only then is it determined to be a high-confidence inflection point time window. , Indicates the start date of the window. This indicates the end date of the window. This persistence constraint prevents short-term fluctuations from being misjudged as trend inflection points.
[0141] New style distribution prediction: For each identified window The model will also output a dimensional probability distribution vector ,in, This indicates that the user may be redirected to the third... The probability of a macroscopic style. This is obtained by analyzing the characteristic activation states within the model during risk peaks. Then, from the probability distribution vector... The one with the highest probability is selected. A new style is identified, the core style change direction vector is extracted, and the projection and probability distribution vector of the user's current month's style vector on the macro style space are used to define the style. The expected projection of the future style vector is calculated using a dimension consistent with the macro style space. VI (e.g.) Style change direction vector .
[0142] The daily risk prediction results and identified windows are cached locally. It will perform online incremental learning based on the user's daily new behavioral data. Specifically, every fixed period (e.g., 5 days), the new data within that period can be used to perform an incremental fine-tuning of the LoRA adapter (1 epoch), so that the model can continuously adapt to the latest changes in the user.
[0143] Optionally, performance evaluation and effect verification can be carried out after the new style distribution prediction is completed.
[0144] In one embodiment of the present invention, the specific form and content of performance evaluation and effect verification are as follows: Testing method: In a six-month test involving 120 real users, their behavioral data and the actual time of style change can be collected periodically (which can be confirmed through a questionnaire survey).
[0145] result: The accuracy rate for predicting "style shifts within the next 3 months" reached 90.0%, significantly higher than direct use. (Non-personalized) The accuracy rate on the same batch of users is 85.0%. The time overlap (IoU) between its predicted inflection point time window and the user's actual perceived style change period is 0.75 on average.
[0146] In addition, the terminal's computing efficiency and resource consumption were tested, as follows: Test environment: mainstream mid-range mobile devices (processor: Qualcomm Snapdragon 778G; memory: 8GB).
[0147] Accordingly, the test results during the fine-tuning phase are as follows: Time taken: The average time to complete a full 5-epoch LoRA fine-tuning is 14 seconds (range: 10-20 seconds).
[0148] CPU usage: Peak utilization 18%, average utilization 12%.
[0149] Memory increment: The additional memory usage resulting from the fine-tuning process is approximately 25MB.
[0150] Energy consumption: The energy consumption increase from a single fine-tuning is roughly equivalent to the energy consumed by playing a 3-minute high-definition video.
[0151] Accordingly, the test results for the inference and prediction phase are as follows: Time taken for a single prediction (90-day risk curve): <300 milliseconds.
[0152] Daily CPU / memory usage: negligible, comparable to background tasks in a typical app.
[0153] Privacy and security verification: The user's original behavioral data, locally trained gradients, and final personalized model parameters never leave the user's device; it can be observed that the only communication with the server occurs during the model download phase, where a generic, anonymous global model is downloaded. Localized Personalized Model By residing entirely locally, a high level of privacy protection can be achieved for data and models.
[0154] In one embodiment of the present invention, the step of the server decrypting the received abstract intent packet includes: when the high-risk time window is identified, the terminal device generates an abstract intent packet locally, the abstract intent packet containing a quantized style change direction vector and high-risk time window information.
[0155] When local personalized model Identify a high-confidence inflection point time window and its corresponding new style probability distribution Subsequently, the terminal device APP triggers the intent abstraction and security encapsulation process locally. The generation of the abstract intent package includes extracting and quantifying the following elements: ① Core style transition vector, selecting the most probable style categories and their probabilities from the predicted new style distribution; ② Change intensity and direction vector, calculating the normalized difference between the current style vector and the expected future style vector; ③ High-risk time window information, including the window start offset and duration; ④ Prediction confidence.
[0156] The steps for the server to decrypt the received abstract intent packet include: intent element extraction and quantification, construction of the original intent description packet, and multi-layer privacy-enhancing encapsulation.
[0157] Optionally, the above-mentioned intention element extraction and quantification involves extracting four types of elements: core style change direction vector, change intensity and direction vector, time window encoding, and confidence encoding, and then quantifying and encoding them, specifically as follows: Core style shift direction vector: From The one with the highest probability is selected. A new style is proposed, and the core style transition direction vector is extracted. In this embodiment, it is set that... It can balance information richness and data compactness to form a list of triples. .in, Anonymous identifiers for a predefined set of macro styles (e.g., 50 styles). , express In probability, the first The probability value corresponding to each style represents the likelihood that a user will switch to that style.
[0158] Change intensity and direction vector: Calculate a dimension consistent with the macro style space. VI (e.g.) Style change direction vector The specific method is as follows: ,in It is the projection of the user's style vector for the current month onto the macro style space. It is based on The expected projection of future style vectors. After normalization, scalar quantization is performed, mapping each dimension value to an integer range of 0-255. A consistent approach is adopted. The dimensional design is to ensure that subsequent vectors in the server-side library can be subjected to rigorous algebraic projection calculations.
[0159] Time window encoding: Encoding the inflection point window Starting offset days (day in the future relative to the current date) and window length The encoding scheme uses 7-bit and 5-bit binary numbers respectively. This encoding scheme supports a maximum offset of 127 days and a window length of 31 days, meeting practical requirements.
[0160] Confidence Encoding: The overall confidence score of this prediction (derived from the peak of the risk curve and the estimation of internal uncertainty in the model) is quantified into a 4-bit binary number, providing 16 confidence levels.
[0161] Optionally, the above steps for constructing the original intent description package involve serializing the quantized elements according to a predefined fixed format to form a binary data block. In one specific embodiment, its structure (approximately 200 bytes in total length) includes: a header version number (1 byte), a time window encoding (12 bits), a confidence encoding (4 bits), a style ID list (3 bytes), a style probability list (3 bytes), and a style change direction vector. (32 bytes).
[0162] Optionally, the above-mentioned multi-layer privacy-enhancing encapsulation steps, to enhance privacy protection, involve a three-layer encapsulation process on the original intent description packet, specifically including: ① adding masquerading noise: in Append a randomly generated, variable-length redundant data segment to the end. By simulating the statistical characteristics of noise to represent real intent data, even if the ciphertext is decrypted, attackers cannot reliably distinguish real data from noise, thus achieving a plausible deduction. ② Deterministic encryption: Using the AES-256-GCM (Galois / Counter Mode) algorithm to encrypt the concatenated data. Encryption is performed. Encryption key. Generated temporarily for each session, a secure key agreement is established between the terminal device and the server via an elliptic curve Diffie-Hellman (ECDH) based key negotiation protocol. GCM mode provides both confidentiality and integrity authentication. ③ Metadata obfuscation: The ciphertext is packaged with a randomly generated session ID, the current timestamp, and an "intent type label" (such as "style exploration" or "trend following") randomly selected from a public dictionary to form the final abstract intent package. The packet appears to be a regular service request carrying an encrypted payload and ordinary metadata.
[0163] In one embodiment of the present invention, the terminal device performs privacy-enhanced encapsulation and encryption on the abstract intent packet before sending it to the server. Sending data to the server via a dedicated communication protocol, specifically including: 1) Transmission channel: using a custom application layer protocol based on QUIC. QUIC's low latency, multiplexing, and 0-RTT connection characteristics are suitable for frequent, high-speed transmission of such small data packets. 2) Traffic obfuscation: The timing of intent packet transmission is mixed with periodic heartbeat packets or regular content update requests, making it difficult for network eavesdroppers to identify specific intent-triggered events from the traffic patterns. 3) Server-side reception verification: The server receives... Next, the freshness of the timestamp is first verified to prevent replay attacks. Then, the obfuscated metadata is stripped to prepare for decryption of the encrypted payload (which requires the key material exchanged later).
[0164] In a specific embodiment of the present invention, the step of obtaining a preliminary coarse-grained recall set based on the decrypted encrypted intent packet in a public resource library maintained on the server side involves the server decrypting the intent elements and then performing a broad recall to cover relevant strategies. This ensures that the recall set covers all possible user preferences without pursuing absolute precision; the recall aims for comprehensiveness rather than deliberate accuracy. This process includes: indexing the public resource library, multi-strategy parallel recall, deduplication and coarse screening of the recall set, and adding differential privacy aggregation information.
[0165] The aforementioned public repository index includes: server-side maintenance of public repository. The public resource library Contains tens of thousands to millions of product or content entries, each entry Each one pre-calculates its correlation vector with the macro style set. And popularity scores based on publicly available sales or interaction data.
[0166] The above-mentioned multi-strategy parallel recall specifically employs the following four strategies: 1) Strategy A (Main Style Focus): Directly retrieve based on the style ID list in the intent. Zhongyu The most relevant Each product (in this embodiment, =200). This number is intended to provide a sufficient number of dominant style candidates. 2) Strategy B (Directional Exploration): Utilizing style change direction vectors Each item in the computational database Style vectors With a server-simulated "current style vector" Dot product changes: ,in This is the average style vector. Recall the top-ranked samples with that score. Each product (in this embodiment, =150). The server determines the data based on the received data. and its probability 3) Strategy C (Time-series heat supplement): Based on the inflection point window The recall involves products expected to be launched or become popular around this window period (based on industry trend forecasts), with a quantity of [number missing]. (In this embodiment, =100). 4) Strategy D (diversity guarantee): random sampling Other styles of goods (in this embodiment, =50), to avoid information cocoons.
[0167] The aforementioned recall set deduplication and coarse screening includes: merging the recall results of the above strategies and removing duplicates. Subsequently, non-personalized filtering rules based on public knowledge (such as removing out-of-stock items and filtering items with extreme prices) are applied to form a recall set containing approximately... (In this embodiment, Coarse-grained recall set of 10 candidate products .
[0168] The aforementioned additional differential privacy aggregated information includes: server-side calculation and appending of aggregated statistical information (such as "average price range of business-style products" and "recent popularity trend of retro-style products"). This information undergoes [further processing / processing] before publication. (such as preferred settings) Differential privacy processing provides a group reference for terminal devices while protecting the statistical privacy of other users.
[0169] In a specific embodiment of the present invention, the candidate result set included in the coarse-grained recall set is sorted according to the locally maintained user private profile to generate a final personalized recommendation list adapted to the user's personalized style. The final personalized recommendation list serves as the final recommendation result and includes: after receiving the coarse-grained recall set, the terminal device performs secondary fusion and fine sorting in combination with the local private user profile to generate the final presentation list.
[0170] Optionally, the server returns the processed recall results to the terminal device, including: 1) Response encapsulation: The response packet contains... The non-sensitive metadata for each product, such as anonymous product ID, encrypted title keywords, style tags, public attributes (materials, etc.), public market ratings, and aggregated information processed with differential privacy. 2) Transmission encryption: using the encryption key of this session. 3) Caching and update instructions: Lightweight global models (such as...) can be attached to the response. Incremental parameters or updated style clustering information are provided for terminal devices to cache or update when idle.
[0171] Optionally, after obtaining the final personalized recommendation list presented to the user by the terminal device, user feedback can be collected locally to drive the continuous evolution of the model. This step is performed locally on the terminal device, and all sensitive information remains on the device.
[0172] Optionally, the step of sorting the candidate result set included in the coarse-grained recall set according to the locally maintained user private profile to generate a final personalized recommendation list adapted to the user's personalized style, wherein the final personalized recommendation list serves as the final recommendation result, includes: local fine-grained profile activation, multi-target fusion sorting, and generating the final presentation list.
[0173] Optionally, the aforementioned local refined profiling activation includes: decrypting the recall set received by the terminal device APP. Subsequently, a local lightweight ranking model is activated. The aforementioned A small neural network (in this embodiment, it could be a small multilayer perceptron of approximately 500KB containing three fully connected layers) is used. Its inputs include: product metadata, the user's complete private historical behavior sequence, the user's local profile (e.g., including precise size, brand preference list, price sensitivity range, color preference, and return history), and the current context (geographic location, time, device battery level, etc.). Highly personalized features are calculated in real-time, such as whether the product price falls within the user's historical purchase range, whether the brand is favorited by the user, and color matching.
[0174] The above multi-objective fusion ranking includes: Model output comprehensive score The score is a weighted sum of scores for multiple objectives: ; in, This indicates the degree of match between the product and the abstract intent (from the server). This indicates the degree of matching between the product and the user's local profile (core personalization score). This indicates the novelty of the product to the user; This indicates considerations regarding the product's practicality (such as inventory and delivery time). Weighting parameters. , , , It can be dynamically adjusted based on user type (such as "explorer" or "utility").
[0175] The above-mentioned final presentation list includes: based on right The products in the list are sorted in descending order, and the Top-K (e.g., K=20) products are selected to form the final personalized recommendation list. . This is a typical setting based on mobile interface display and user attention span.
[0176] In some embodiments of the present invention, after obtaining the final recommendation result, the method further includes a final presentation and privacy-preserving feedback loop. The final presentation and privacy-preserving feedback loop includes: user interface presentation, implicit and explicit feedback collection, and feedback-driven local model evolution.
[0177] The aforementioned user interface presentation includes: displaying a personalized recommendation list within the app interface. The list is presented to the user in interface modules such as "Style Trend Preview" or "Inspiration Showcase". All sensitive personal matching reasons are generated locally only and do not appear in any network communications or logs.
[0178] The collection of implicit and explicit feedback mentioned above includes: Implicit feedback: User actions such as clicking, adding to favorites, and purchasing items in the list are fully recorded in the local database. Explicit feedback: Feedback provided by users through options such as "I don't like the style" is also stored locally.
[0179] The aforementioned feedback-driven local model evolution includes: using user feedback data as a supervisory signal to periodically (e.g., weekly) update the local personalized model. Adapters (such as LoRA) and local lightweight sorting models Incremental fine-tuning is performed to achieve complete local closed-loop model self-evolution.
[0180] Optionally, in one embodiment of the present invention, after the feedback-driven local model evolution, the method further includes: performance evaluation and privacy and security verification. For example, A / B testing, user surveys, and security analysis are used to comprehensively verify the service effectiveness and privacy and security protection.
[0181] In A / B testing, the experimental group that adopted the complete solution process saw a 40% improvement in conversion rate from inflection point prediction to final product click / purchase, compared to the control group that only made predictions without providing collaborative services. User surveys showed that 85% of users felt the recommendations "matched their evolving style," and 92% of users were satisfied or very satisfied with "receiving personalized recommendations without uploading personal data."
[0182] Through member inference attack simulation experiments, the results show that relying solely on abstract intent packets... The attacker's probability of successfully inferring a specific consumption record of the target user was no more than 3% (50%) of random guessing, proving the effectiveness of the abstract intent. Network traffic analysis showed that 99.9% of requests and responses were encrypted data packets, making it impossible to parse out valid user information. Obfuscating metadata successfully misled the traffic classification system. Code auditing and runtime monitoring confirmed that user's original behavior data, local profiles, and detailed feedback data never generated any form of network outflow logs throughout the entire process.
[0183] Secondly, embodiments of this application provide a recommendation system based on hierarchical local personalized style prediction. The device includes a computer device, which includes a processor and a memory. The memory stores computer instructions, and the processor executes the computer instructions stored in the memory. When the computer instructions are executed by the processor, the device implements the steps of the recommendation method based on hierarchical local personalized style prediction.
[0184] By employing this embodiment of the invention, differential privacy noise can be added during the data collection phase, and privacy protection at the communication layer can be achieved through abstract intent packets and multi-layer security encapsulation (noise addition, deterministic encryption, and metadata obfuscation) during the intent interaction phase. In the service loop, all feedback and model evolution are completed locally, effectively ensuring that sensitive user information is not leaked throughout the process.
[0185] Thirdly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the aforementioned personalized online education method.
[0186] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0187] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0188] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0189] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, systems, apparatuses, and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0190] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A recommendation method based on hierarchical local personalized style prediction, characterized in that, The method includes: A counting matrix reflecting individual user style transfer is generated locally, and the counting matrix is uploaded to the server. The server also receives a global model. The server improves the pre-trained baseline survival analysis model based on the counting matrices uploaded from different terminal devices to obtain the global model. The baseline survival analysis model is used to predict the probability of user style change events occurring at different time points in the future based on the user's historical behavior time series data. The received global model is fine-tuned based on local private historical data to obtain a local personalized model. Based on the local personalized model, high-risk time windows of user style evolution are identified, and style change direction vectors are extracted according to the corresponding probability distribution vectors output by each window in the high-risk time window. An abstract intent package is generated based on the quantified high-risk time window and the style change direction vector. The encrypted abstract intent package is uploaded to the server, and a coarse-grained recall set is received from the server. Based on the coarse-grained recall set and the locally maintained user private profile, a final recommendation result adapted to the user's personalized style is generated. The coarse-grained recall set includes a set of candidate results that match the encrypted intent package selected by the server based on the decrypted version.
2. The method according to claim 1, characterized in that, The method also includes the step of pre-training a baseline survival analysis model using a controllable dataset, specifically including: Access to controllable datasets with clearly defined data usage permissions and manageable privacy risks; wherein, controllable datasets include one or more time-series data of user historical behavior that can reflect the individual style of users; A dynamic feature vector is constructed based on the controllable dataset as the input to the basic prediction model; Define user style change events and risk timing in the base prediction model; A basic prediction model is constructed, with a deep survival analysis framework based on neural networks as the core architecture of the basic prediction model. The basic prediction model is iteratively trained and evaluated using the dynamic feature vectors. The loss function is constructed using the standard negative log-likelihood loss of survival analysis, resulting in a baseline survival analysis model with baseline prediction capabilities.
3. The method according to claim 1, characterized in that, The counting matrix is constructed based on local private time-series data of user historical behavior within a preset time span; Before the step of uploading the counting matrix to the server, the method further includes: adding noise to the counting matrix to meet differential privacy requirements, so that even if the server or an attacker obtains the noisy counting matrix, they cannot infer any individual information from it.
4. The method according to claim 1, characterized in that, The steps by which the server improves the pre-trained baseline survival analysis model based on the counting matrix uploaded by different terminal devices to obtain the global model include: The server aggregates the noisy counting matrices uploaded from different terminal devices to form a group style transfer probability tensor that represents the evolution of group style. The server integrates the group style evolution law represented by the group style transfer probability tensor into the baseline survival analysis model through a conditional augmentation network to generate the global model.
5. The method according to claim 1, characterized in that, The step of fine-tuning the received global model based on local private historical data to obtain a local personalized model specifically includes: Inject the LORA adapter into the global model and freeze the original weights of the global model; The global model is fine-tuned and trained using the LORA scheme based on local private historical data; The weights learned by the LORA adapter during fine-tuning training are combined with the original weights of the frozen global model to obtain a local personalized model.
6. The method according to claim 1, characterized in that, The step of identifying high-risk time windows of user style evolution based on the local personalization model specifically includes: Smooth the original risk prediction curve output by the local personalized model; Filter out consecutive time periods with risk values higher than the preset dynamic threshold; A time window is considered high-risk only if the length of the continuous time period is not less than the preset minimum window length; where risk refers to the occurrence of a user style change event.
7. The method according to claim 1, characterized in that, The method also includes, on the server side, obtaining a coarse-grained recall set through broad recall based on the received abstract intent packet, specifically including: The server decrypts the received abstract intent packet; In the publicly maintained resource library on the server, a preliminary coarse-grained recall set is obtained by multi-strategy parallel recall based on the decrypted encrypted intent packet; wherein, the multi-strategy includes some or all of the main style focusing strategy, directional exploration strategy, time series heat supplementation strategy and diversity guarantee strategy. The initial coarse-grained recall set is deduplicated and coarsely screened to obtain the final coarse-grained recall set.
8. The method according to claim 1, characterized in that, The step of generating a final recommendation result adapted to the user's personalized style based on the coarse-grained recall set and the locally maintained user private profile includes: sorting the candidate result set included in the coarse-grained recall set according to the locally maintained user private profile, generating a final personalized recommendation list adapted to the user's personalized style, and the final personalized recommendation list serving as the final recommendation result.
9. A recommendation system based on hierarchical local personalized style prediction, comprising a processor, a memory, and a computer program / instructions stored in the memory, characterized in that, The processor is configured to execute the computer program / instructions, and when the computer program / instructions are executed, the system implements the steps of the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Information recommendation method and device, storage medium and electronic equipment
CN116503109A
Distributed survival analysis method and system for privacy protection
CN117272380A
Efficient self-adaptive safe cross-domain recommendation method
CN118170972A
Next-generation point-of-interest security recommendation strategy based on asynchronous advantage reinforcement learning
CN118484596A