A recommendation method and system based on double-view time domain contrast alignment

By using a dual-view temporal domain comparison and alignment method, the problem of insufficient separation between semantic intent expression and temporal modeling in existing recommendation systems is solved, generating a unified user representation and improving the accuracy and interpretability of the recommendation system in dynamic scenarios.

CN122153176APending Publication Date: 2026-06-05CHONGQING UNIV OF POSTS & TELECOMM

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING UNIV OF POSTS & TELECOMM
Filing Date
2026-03-03
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing recommendation systems suffer from insufficient semantic intent expression, inadequate temporal modeling separation, and insufficient utilization of feature granularity complementarity, making it difficult to achieve accurate recommendations with sparse interactive data, especially in dynamic scenarios where the ability to characterize the evolution of user interests is insufficient.

Method used

A dual-view temporal comparison alignment method is adopted, which extracts features in parallel through collaborative views and semantic views, and combines temporal feature enhancement and cross-view comparison alignment to generate a unified user representation, including data acquisition, dual-view decoupling modeling, temporal feature enhancement, time-aware dynamic aggregation, cross-view comparison alignment, adaptive gating fusion and multi-task joint optimization.

Benefits of technology

It improves the recommendation system's ability to capture the evolution of user interests in dynamic scenarios, and significantly enhances the accuracy and interpretability of recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122153176A_ABST
    Figure CN122153176A_ABST
Patent Text Reader

Abstract

The application relates to a recommendation method and system based on double-view time domain contrast alignment, and belongs to the technical field of recommendation systems. A user-item bipartite graph is constructed through a data acquisition and preprocessing module; a double-view decoupling modeling module is used to extract a collaborative embedding sequence and a semantic intention embedding sequence in parallel; a time interval of adjacent interactions is calculated through a time domain feature enhancement module, and the time interval is converted into a discrete time coding vector sequence based on a logarithmic bucketing function; a time-aware dynamic aggregation module is used to generate user collaborative dynamic representation and user semantic dynamic representation after injecting the time coding; a cross-view contrast alignment module is used to construct a symmetric contrast learning loss, so that the distribution distance of a positive sample pair in a heterogeneous space is reduced; an adaptive gating fusion module is used to weigh the contributions of the double views and generate a unified user representation in combination with a residual term; finally, a recommendation result generation module is used to calculate a prediction score and output a recommendation list. The application can effectively capture the dynamic evolution law of user interest, and significantly enhance the accuracy and explainability of recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of recommendation system technology, and specifically to a recommendation method and system based on dual-view temporal domain comparison and alignment. Background Technology

[0002] With the development of internet technology and the increasing richness of the digital ecosystem, online information is experiencing explosive growth. Recommendation systems, as a key bridge connecting users with massive amounts of content, have been widely used in e-commerce, social media, online advertising, and many other fields, effectively alleviating the problem of information overload.

[0003] Currently, mainstream recommendation systems, such as those based on collaborative filtering, primarily utilize historical user-item interaction data to uncover potential interests. However, the inventors discovered limitations in practical applications during their research. Firstly, there is insufficient semantic intent representation. Most traditional models heavily rely on unique identifiers for users and items, i.e., ID embeddings. ID features are essentially decontextualized implicit symbols, failing to reflect explicit semantic motivations generated during interactions, such as specific preferences implied in user reviews. This leads to difficulties in achieving accurate recommendations when faced with sparse interaction data due to the lack of explicit intent support. Secondly, there is the issue of fragmented temporal modeling. Most multi-view recommendation methods lack a unified dynamic temporal modeling framework. Different views, such as text views and collaborative views, often independently process static graph structures or separate behavioral sequences, making it difficult to accurately distinguish the differences between short-term behavioral fluctuations and long-term stable preferences over time, resulting in insufficient ability to characterize the dynamic evolution of user interests. Finally, there is insufficient utilization of feature granularity and complementarity: existing methods often rely on general LLM encoding for text views, resulting in relatively coarse feature granularity, making it difficult to accurately capture explicit intents reflecting personalized user preferences. While collaborative views can effectively model global common information such as high-order connectivity at the group level, they lack a detailed understanding of individual semantic motivations. Currently, the potential fine-grained complementary relationship between the two has not been fully explored and aligned in dynamic recommendation scenarios, resulting in poor prediction performance. Summary of the Invention

[0004] To address the above problems, this invention proposes a recommendation method and system based on dual-view temporal domain contrast alignment, comprising:

[0005] The data acquisition and preprocessing module is used to obtain the target user's historical interaction item sequence, corresponding comment text sequence, and interaction timestamp sequence, and to construct a user-item bipartite graph to represent global structural information;

[0006] The dual-view decoupled modeling module is used to extract two complementary features in parallel for each user's interaction history. The collaborative view branch uses a lightweight graph convolutional network to propagate information on a bipartite graph to obtain the user's collaborative embedding and the collaborative embedding sequence of the items they interact with. The semantic view branch uses a pre-trained text encoder to map the comment sequence into a semantic intent embedding sequence.

[0007] The temporal feature enhancement module is used to calculate the time interval between adjacent interactions and transform it into a discrete temporal encoded vector sequence based on the logarithmic bucketing function, so as to provide a unified temporal reference for features of different dimensions.

[0008] The time-aware dynamic aggregation module is used to utilize a dual-path time-aware self-attention encoder to perform weighted aggregation on the collaborative embedding sequence and the semantic intent embedding sequence after injecting the time encoding vector, thereby generating user collaborative dynamic representation and user semantic dynamic representation.

[0009] The cross-view contrast alignment module is used to construct a cross-level symmetric contrast learning loss function. By calculating the interaction between the user semantic dynamic representation and the positive and negative samples of the item co-embedding within the batch, it narrows the distribution distance of positive sample pairs in two heterogeneous spaces and achieves depth alignment of the representation space.

[0010] The adaptive gating fusion module is used to generate gating coefficients based on the feature states of the current dual views, perform nonlinear weighted fusion of user collaborative dynamic representation and user semantic dynamic representation, and introduce global user static embedding in combination with residual terms to generate the final unified user representation.

[0011] The recommendation result generation module is used to calculate the interaction prediction score between the unified user representation and the candidate item embedding, and generate a personalized recommendation list based on the score.

[0012] The multi-task joint optimization module is used to combine binary cross-entropy loss, contrast alignment loss, and prediction residual regularization loss to construct a multi-task joint optimization objective function, and to perform end-to-end training on the system to update the parameters of each module.

[0013] The recommended method and system for dual-view temporal comparison alignment described in this invention, wherein the dual-view decoupling modeling module is used to construct two independent representation spaces through a parallel structure, specifically including:

[0014] (1) Collaborative view building unit, used to build upon the user-project bipartite graph through... A lightweight graph convolutional layer aggregates neighborhood information to obtain the collaborative embedding sequence of each interactive item:

[0015] ,in, Indicates the first position in the sequence Project Collaborative embedding. For user-defined collaborative embedding... The calculation is similar.

[0016] (2) Semantic view building unit, used to process user comment text sequences through a pre-trained large model's text encoder. Perform semantic mapping to obtain text embeddings The text embedding is aligned to the recommendation latent space using a non-linear projection matrix, calculated as follows:

[0017] ,in, For activation function, Representation layer normalization is used to improve training stability; and Given a trainable parameter matrix and bias vector, optimization is performed during model training using gradient descent. The final result is the semantic intent embedding sequence. .

[0018] The method and system for recommending dual-view temporal contrast alignment described in this invention, wherein the temporal feature enhancement module is used to capture non-uniform temporal evolution signals through a logarithmic bucketing mechanism, specifically including:

[0019] (1) Time interval calculation unit, in the form of collaborative view sequence For example, first calculate the absolute time interval between any two interactive items i and j in the sequence. .

[0020] (2) Logarithmic bucketing unit, used to divide consecutive time intervals Mapped to a discrete index space, with its bucket boundaries. The calculation formula is as follows:

[0021] ,in, It is the maximum observed time interval. To ensure the stability of extremely small positive numbers, The preset total number of buckets, This is the current bucket index.

[0022] (3) Bucket index determination unit, used to determine the time interval based on the bucket boundaries. corresponding bucket index The formula is as follows:

[0023] ,in, This is an indicator function used to find a preset time-coding matrix to generate the corresponding time-coding vector.

[0024] The recommendation method and system for dual-view temporal comparison alignment described in this invention, wherein the time-aware dynamic aggregation module is used to generate user dynamic representations using a dual-path time-aware self-attention encoder, specifically including:

[0025] (1) Temporal weight calculation unit, used to inject the time encoding vector into the self-attention mechanism and calculate the attention weight under time awareness, as shown in the following formula:

[0026] ,in, These are query, key, and value matrices, respectively. Let be the dimension of the key vector. For indexes composed of multiple buckets The resulting time-coded vector sequence is obtained through mapping. is the dimension of the key vector.

[0027] (2) Dual-path aggregation unit, used for co-embedding sequences and semantic intent embedding sequence Each self-attention layer with independent parameters and consistent structure is configured, and a multi-head attention mechanism is used to splice and nonlinearly transform the sequence information.

[0028] (3) Dynamic representation generation unit, used to stack two layers of multi-head temporal self-attention encoders and use mask mean pooling to aggregate sequence information.

[0029] The recommendation method and system for dual-view temporal contrast alignment described in this invention, wherein the cross-view contrast alignment module is used to achieve deep alignment of heterogeneous spatial features through bidirectional contrast learning, specifically including:

[0030] (1) Similarity calculation unit, used for user Using the positive sample items as anchors and other items in the batch as negative examples, calculate the dynamic semantic representation of the user. Collaborative embedding vectors with its positive sample items The collaborative embedding vectors of its negative sample items Cosine similarity between and The formula is as follows:

[0031] , The calculation is similar.

[0032] (2) Unidirectional contrast loss construction unit, used to construct the user-side contrast loss term. The formula is as follows:

[0033] ,in, For temperature hyperparameters, This is the set of negative examples within the batch.

[0034] (3) Symmetric loss generation unit, used to construct a project using the same computational logic as step (2). The inverse comparison loss term for the anchor point And calculate the symmetric average of the two to obtain the total bidirectional contrastive learning loss. The formula is as follows:

[0035] ,in, Given the size of the current training batch, minimize the total loss. This enables gradients to propagate evenly between the semantic view and the collaborative view, achieving depth alignment of the representation space.

[0036] The recommendation method and system for dual-view temporal comparison alignment described in this invention, wherein the adaptive gating fusion module is used to dynamically weigh the contribution ratio of implicit behavioral habits and explicit semantic intent, specifically including:

[0037] (1) Gating coefficient generation unit, used to generate the user collaborative dynamic representation With user semantic dynamic representation Vector concatenation is performed, and gating coefficients are calculated using a two-layer multilayer perceptron. The calculation formula is as follows:

[0038] in, This represents a vector concatenation operation. It is a two-layer, multi-layer perceptron.

[0039] (2) Dynamic representation fusion unit, used to utilize the gating coefficient Weighted fusion of dynamic representations from two views is performed to generate a fused representation. The calculation formula is: .

[0040] (3) Long-term preference enhancement unit, used to enhance preferences through linear projection matrix Global user static embeddings learned by lightweight graph convolutional networks Mapped to a dynamic representation space, and using residual connections to generate a unified user representation. The calculation formula is: ,in, For a trainable projection matrix, It also includes information on users' long-term stable preferences and recent heterogeneous intention evolution.

[0041] The recommendation method and system for dual-view temporal comparison alignment described in this invention, wherein the recommendation result generation module is used to generate final personalized suggestions based on feature interaction calculations, specifically including:

[0042] (1) Feature interaction prediction unit, used to predict the unified user representation With candidate projects Cooperative embedding vectors Feature concatenation is performed, a multilayer perceptron is used to execute nonlinear interactions, and the predicted interaction score of the target user for the item is calculated. The calculation formula is: .

[0043] (2) Recommendation list acquisition unit, used to set the number of items recommended by the system. According to the predicted interaction score Sort all candidate items in descending order and select the top ones with the highest scores. Each project builds a personalized recommendation list for the target user.

[0044] The recommendation method and system for dual-view temporal contrast alignment described in this invention include a multi-task joint optimization module for end-to-end training of the system, specifically including:

[0045] (1) Main target prediction unit, used to predict the target using binary cross-entropy loss. The formula for maximizing the likelihood of observed interaction data is as follows:

[0046] ,in, For the training set, The tag represents actual interaction, with 1 indicating interaction and 0 indicating no interaction. This is a tag for real-world interaction.

[0047] (2) Prediction residual regularization unit, used to constrain the consistency between predicted scores and true labels in the numerical space, and to construct regularization loss. The formula is .

[0048] (3) Joint optimization unit, used to combine the contrast loss generated by the cross-view contrast alignment module. Construct the overall optimization objective, the formula is: ,in, and These are the weights for the contrast alignment loss and the regularization loss, respectively.

[0049] This invention proposes a recommendation method and system based on dual-view temporal contrast alignment. It models user behavior patterns and linguistic intent using a collaborative view and a semantic view respectively, and introduces a time-aware mechanism to uniformly characterize their dynamic evolution. Finally, through contrastive learning and adaptive fusion, it generates accurate user representations. This effectively improves the recommendation system's ability to capture the evolution of user interests in dynamic scenarios, thereby significantly enhancing the accuracy and interpretability of recommendations. Attached Figure Description

[0050] Figure 1 is a system framework diagram of the present invention;

[0051] Figure 2 is a flowchart of the algorithm of the present invention;

[0052] Figure 3 shows the comparison results of the recommendation accuracy of the present invention with existing mainstream baseline models on different datasets.

[0053] Figure 4 shows the ablation experiment results illustrating the contribution of each technical module provided by this invention to the model performance.

[0054] Figure 5 shows the interest evolution path of the present invention in a practical case. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of this invention clearer, the following detailed description, in conjunction with the accompanying drawings, provides a recommended method and system for temporal comparison and alignment based on dual views. It should be understood that the specific implementation methods described herein are merely illustrative of the invention and are not intended to limit the invention. Any changes, modifications, additions, alterations, or substitutions made by those skilled in the art within the scope of this invention should be covered by the claims of this invention.

[0056] Figure 1 This is a framework diagram of the recommendation system of this invention. From... Figure 1As can be seen, the recommendation system proposed in this invention includes a data acquisition and preprocessing module, a dual-view decoupling modeling module, a temporal feature enhancement module, a time-aware dynamic aggregation module, a cross-view comparison and alignment module, an adaptive gating fusion module, a recommendation result generation module, and a multi-task joint optimization module. The data acquisition and preprocessing module is used to acquire users' historical behavior sequences and construct a global structure graph; the dual-view decoupling modeling module is used to extract collaborative features and semantic intent features of items in parallel; the temporal feature enhancement module is used to transform time intervals into a unified temporal reference vector; the time-aware dynamic aggregation module is used to generate a dynamic dual-view representation of users using a time-aware self-attention mechanism; the cross-view comparison and alignment module is used to achieve deep alignment of different representation spaces through bidirectional comparison learning; the adaptive gating fusion module is used to dynamically weigh the contributions of the two views and generate a unified user representation; the recommendation result generation module is used to predict the user's interaction probability with candidate items; and the multi-task joint optimization module is used to perform end-to-end optimization of system parameters through a joint loss function.

[0057] Figure 2 This is a schematic diagram of the recommended method of the present invention. From... Figure 2 As can be seen, the recommendation method proposed in this invention includes extracting interaction sequences and text comments from the original data and constructing a bipartite graph; decoupling the interaction history into collaborative and semantic branches to extract complementary features in parallel; calculating the temporal difference between adjacent interactions and performing bucketing mapping to enhance temporal information; injecting temporal information into a self-attention layer to aggregate and generate dynamic user interest representations; using cross-level symmetric contrastive learning objectives to shorten the distance between positive sample pairs in heterogeneous spaces; fusing dual-view features through a gating mechanism and introducing a global static background; and finally generating a recommendation list based on the predicted interaction scores and performing multi-task joint training.

[0058] Figure 3 This table compares the recommendation accuracy of the present invention with existing mainstream baseline models on different datasets. The table shows the performance metrics of the present invention on multiple publicly available datasets, demonstrating its significant advantages in both recommendation accuracy and ranking quality.

[0059] Figure 4 This figure shows the ablation experiment results illustrating the contribution of each technical module provided by this invention to model performance. Through comparative experiments, this figure verifies the necessity of the cross-view contrast alignment module and the temporal feature enhancement module in capturing the evolution of user interests.

[0060] Figure 5 This diagram illustrates the interest evolution path of the present invention in a real-world scenario. It demonstrates how the model captures semantic changes to represent the dynamic process of a user's shift from general intent to specific vertical domain interests, showcasing good interpretability.

[0061] Furthermore, the following example illustrates this further:

[0062] Assume there is and Let these represent the user set and the item set, respectively. For any user... Its historical interaction behavior is represented as three sequences, namely the interaction item sequence. The corresponding comment text sequence and the timestamp sequence of the interaction ,in The sequence length is given.

[0063] First, the system data is acquired and cleaned through the data acquisition and preparation module to obtain the variables in the hypothesis. The specific implementation steps of the proposed recommendation system based on dual-view temporal comparison and alignment are as follows:

[0064] S1: Data Acquisition and Preprocessing. Obtain the target user's historical interaction sequence. The corresponding comment text sequence and interactive timestamp sequence And construct a user-project bipartite graph to represent global structural information;

[0065] S2: Dual-view decoupled modeling. The collaborative view branch utilizes a lightweight graph convolutional network to propagate information and obtain the collaborative embedding sequence of each item. in, Indicates the first position in the sequence Collaborative embedding of individual projects. For user-integrated collaborative embedding. The calculation is similar.

[0066] The semantic view branch maps comment sequences using a pre-trained large model's text encoder, calculated as follows:

[0067] ,in, Semantic embeddings obtained for large models For activation function, Representation layer normalization is used to improve training stability; and Given a trainable parameter matrix and bias vector, optimization is performed during model training using gradient descent. The final result is the semantic intent embedding sequence. .

[0068] S3: Temporal Feature Enhancement. Calculate the absolute time interval between any two interactive items i and j in the sequence. . Continuous time intervals Mapped to a discrete index space, with its bucket boundaries. The calculation formula is as follows:

[0069] ,in, It is the maximum observed time interval. To ensure the stability of extremely small positive numbers, The preset total number of buckets, The current bucket index. The time interval is determined based on the bucket boundaries. corresponding bucket index The formula is as follows:

[0070] ,in, This is an indicator function used to find a preset time-coding matrix to generate the corresponding time-coding vector.

[0071] S4: Time-Aware Dynamic Aggregation. A dual-path time-aware self-attention encoder is used to generate a dynamic user representation. The time-encoded vector is injected into the self-attention mechanism, and the attention weights under time awareness are calculated using the following formula:

[0072] ,in, These are query, key, and value matrices, respectively. Let be the dimension of the key vector. For indexes composed of multiple buckets The resulting time-coded vector sequence is obtained through mapping. is the dimension of the key vector.

[0073] For collaborative embedding sequences and semantic intent embedding sequence Each self-attention layer with independent parameters and consistent structure is configured. The multi-head temporal attention mechanism described above is used to concatenate and nonlinearly transform the sequence information. Then, two multi-head temporal self-attention encoders are stacked, and masked mean pooling is used to aggregate the sequence information to obtain the dynamic representation of the user in the collaborative view. Dynamic representation under semantic view .

[0074] S5: Cross-view contrast alignment. (Based on user...) Using the positive sample items as anchors and other items in the batch as negative examples, calculate the dynamic semantic representation of the user. Collaborative embedding vectors with its positive sample items The collaborative embedding vectors of its negative sample items Cosine similarity between and The formula is as follows:

[0075] , The calculation is similar.

[0076] Subsequently, cosine similarity was used to construct a user-side contrast loss term. The formula is as follows:

[0077] ,in, For temperature hyperparameters, This is the set of negative examples within the batch.

[0078] Using the same calculation logic as when constructing the user-side comparative loss term, a project-based loss term is constructed. The inverse comparison loss term for the anchor point And calculate the symmetric average of the two to obtain the total bidirectional contrastive learning loss. The formula is as follows:

[0079] ,in, Given the size of the current training batch, minimize the total loss. This enables gradients to propagate evenly between the semantic view and the collaborative view, achieving depth alignment of the representation space.

[0080] S6: Adaptive Gated Fusion. This involves dynamically representing the user collaboration. With user semantic dynamic representation Vector concatenation is performed, and gating coefficients are calculated using a two-layer multilayer perceptron. The calculation formula is as follows:

[0081] in, This represents a vector concatenation operation. It is a two-layer, multi-layer perceptron.

[0082] Then the gating coefficient is used Weighted fusion of dynamic representations from two views is performed to generate a fused representation. The calculation formula is: .

[0083] Then through the linear projection matrix Global user static embeddings learned by lightweight graph convolutional networks Mapped to a dynamic representation space, and using residual connections to generate a unified user representation. The calculation formula is: ,in, For a trainable projection matrix, It also includes information on users' long-term stable preferences and recent heterogeneous intention evolution.

[0084] S7: Recommendation result generation. The unified user representation... With candidate projects Cooperative embedding vectors Feature concatenation is performed, a multilayer perceptron is used to execute nonlinear interactions, and the predicted interaction score of the target user for the item is calculated. The calculation formula is: .

[0085] Set the number of items recommended by the system According to the predicted interaction score Sort all candidate items in descending order and select the top ones with the highest scores. Each project builds a personalized recommendation list for the target user.

[0086] S8: Multi-task joint optimization. The system is trained end-to-end, including a three-part loss function: first, the main objective prediction loss, then the binary cross-entropy loss... The formula for maximizing the likelihood of observed interaction data is as follows:

[0087] ,in, For the training set, The tag represents actual interaction, with 1 indicating interaction and 0 indicating no interaction. This is a tag for real-world interaction.

[0088] Secondly, the prediction residual regularization loss is constructed by constraining the consistency between the predicted score and the true label in the numerical space. The formula is ;

[0089] Finally, a joint optimization unit is performed, combining the contrast loss generated by the cross-view contrast alignment module. Construct the overall optimization objective, the formula is: ,in, and These are the weights for the contrast alignment loss and the regularization loss, respectively.

[0090] Figure 3 This is a comparison table of recommendation accuracy results provided by the present invention. The present invention uses the NDCG and HR metrics. NDCG measures ranking accuracy, and HR measures hit rate; their calculation methods and measurement content are as follows:

[0091] Hit Ratio: Measures the proportion of users whose test items appear in the top k positions of the recommendation list, reflecting the coverage of the recommendation results.

[0092] ,in, Indicates user The top of the recommended list Each project, if it includes users The test set samples, then Otherwise, it is 0.

[0093] Normalized Discount Cumulative Gain (NDCG@K): Evaluates the ranking quality of the recommendation list by considering the ranking position of the hit item in the recommendation list.

[0094] ,in, Indicates the test project is in the user The ranking in the recommended list.

[0095] The results show that the present invention outperforms the mainstream baseline model.

[0096] Figure 4 This figure shows the ablation experiment results of the present invention. It illustrates the performance changes after removing different modules, verifying the necessity of each component in capturing the dynamic evolution of interest.

[0097] Figure 5 This is a roadmap illustrating the practical application of the present invention. It demonstrates the interpretability advantage of the model in capturing the shift in user intent from general to vertical interests.

Claims

1. A recommendation method and system based on dual-view temporal domain contrast alignment, characterized in that, include: The data acquisition and preprocessing module is used to obtain the target user's historical interaction item sequence, corresponding comment text sequence, and interaction timestamp sequence, and to construct a user-item bipartite graph to represent global structural information; The dual-view decoupled modeling module is used to extract two complementary features in parallel for each user's interaction history. The collaborative view branch uses a lightweight graph convolutional network to propagate information on a bipartite graph to obtain the user's collaborative embedding and the collaborative embedding sequence of the items they interact with. The semantic view branch uses a pre-trained text encoder to map the comment sequence into a semantic intent embedding sequence. The temporal feature enhancement module is used to calculate the time interval between adjacent interactions and transform it into a discrete temporal encoded vector sequence based on the logarithmic bucketing function, so as to provide a unified temporal reference for features of different dimensions. The time-aware dynamic aggregation module is used to utilize a dual-path time-aware self-attention encoder to perform weighted aggregation on the collaborative embedding sequence and the semantic intent embedding sequence after injecting the time encoding vector, thereby generating user collaborative dynamic representation and user semantic dynamic representation. The cross-view contrast alignment module is used to construct a cross-level symmetric contrast learning loss function. By calculating the interaction between the user semantic dynamic representation and the positive and negative samples of the item co-embedding within the batch, it narrows the distribution distance of positive sample pairs in two heterogeneous spaces and achieves depth alignment of the representation space. The adaptive gating fusion module is used to generate gating coefficients based on the feature states of the current dual views, perform nonlinear weighted fusion of user collaborative dynamic representation and user semantic dynamic representation, and introduce global user static embedding in combination with residual terms to generate the final unified user representation. The recommendation result generation module is used to calculate the interaction prediction score between the unified user representation and the candidate item embedding, and generate a personalized recommendation list based on the score. The multi-task joint optimization module is used to combine binary cross-entropy loss, contrast alignment loss, and prediction residual regularization loss to construct a multi-task joint optimization objective function, and to perform end-to-end training on the system to update the parameters of each module.

2. The recommendation method and system based on dual-view temporal domain comparison alignment as described in claim 1, characterized in that, The dual-view decoupling modeling module is used to construct two independent representation spaces through a parallel structure, specifically including: (1) Collaborative view building unit, used to build upon the user-project bipartite graph through... A lightweight graph convolutional layer aggregates neighborhood information to obtain the collaborative embedding sequence of each interactive item: ,in, Indicates the first position in the sequence Project Collaborative embedding; for user collaborative embedding The calculation is similar; (2) Semantic view building unit, used to process user comment text sequences through a pre-trained large model's text encoder. Perform semantic mapping to obtain text embeddings The text embedding is aligned to the recommendation latent space using a non-linear projection matrix, calculated as follows: ,in, For activation function, Representation layer normalization is used to improve training stability; and Given a trainable parameter matrix and bias vector, gradient descent is used for optimization during model training to ultimately obtain the semantic intent embedding sequence. .

3. The recommendation method and system based on dual-view temporal domain comparison alignment as described in claim 1, characterized in that, The time-domain feature enhancement module is used to capture non-uniform time-evolution signals through a logarithmic bucketing mechanism, specifically including: (1) Time interval calculation unit, in the form of collaborative view sequence For example, first calculate the absolute time interval between any two interactive items i and j in the sequence. ; (2) Logarithmic bucketing unit, used to divide consecutive time intervals Mapped to a discrete index space, with its bucket boundaries. The calculation formula is as follows: ,in, It is the maximum observed time interval. To ensure the stability of extremely small positive numbers, The preset total number of buckets, For the current bucket index; (3) Bucket index determination unit, used to determine the time interval based on the bucket boundaries. corresponding bucket index The formula is as follows: ,in, This is an indicator function used to find a preset time-coding matrix to generate the corresponding time-coding vector.

4. The recommendation method and system based on dual-view temporal domain comparison alignment as described in claim 1, characterized in that, The time-aware dynamic aggregation module is used to generate a dynamic user representation using a dual-path time-aware self-attention encoder, specifically including: (1) Temporal weight calculation unit, used to inject the time encoding vector into the self-attention mechanism and calculate the attention weight under time awareness, as shown in the following formula: ,in, These are query, key, and value matrices, respectively. Let be the dimension of the key vector. For indexes composed of multiple buckets The resulting time-coded vector sequence is obtained through mapping. The dimension of the key vector; (2) Dual-path aggregation unit, used for co-embedding sequences and semantic intent embedding sequence Each self-attention layer with independent parameters and consistent structure is configured, and a multi-head attention mechanism is used to splice and nonlinearly transform the sequence information; (3) Dynamic representation generation unit, used to stack two layers of multi-head temporal self-attention encoders and use mask mean pooling to aggregate sequence information.

5. The recommendation method and system based on dual-view temporal domain comparison alignment as described in claim 1, characterized in that, The cross-view comparison and alignment module is used to achieve deep alignment of heterogeneous spatial features through bidirectional comparison learning, specifically including: (1) Similarity calculation unit, used for user Using the positive sample items as anchors and other items in the batch as negative examples, calculate the dynamic semantic representation of the user. Collaborative embedding vectors with its positive sample items The collaborative embedding vectors of its negative sample items Cosine similarity between and The formula is as follows: , The calculation is similar; (2) Unidirectional contrast loss construction unit, used to construct the user-side contrast loss term. The formula is as follows: ,in, For temperature hyperparameters, The set of negative examples within the batch; (3) Symmetric loss generation unit, used to construct a project using the same computational logic as step (2). The inverse comparison loss term for the anchor point And calculate the symmetric average of the two to obtain the total bidirectional contrastive learning loss. The formula is as follows: ,in, Given the size of the current training batch, minimize the total loss. This enables gradients to propagate evenly between the semantic view and the collaborative view, achieving depth alignment of the representation space.

6. The recommendation method and system based on dual-view temporal domain comparison alignment as described in claim 1, characterized in that, The adaptive gating fusion module is used to dynamically weigh the contribution ratio of implicit behavioral habits and explicit semantic intent, specifically including: (1) Gating coefficient generation unit, used to generate the user collaborative dynamic representation With user semantic dynamic representation Vector concatenation is performed, and gating coefficients are calculated using a two-layer multilayer perceptron. The calculation formula is as follows: ,in, This represents a vector concatenation operation. It is a two-layer, multi-layer sensor; (2) Dynamic representation fusion unit, used to utilize the gating coefficient Weighted fusion of dynamic representations from two views is performed to generate a fused representation. The calculation formula is: ; (3) Long-term preference enhancement unit, used to enhance preferences through linear projection matrix Global user static embeddings learned by lightweight graph convolutional networks Mapped to a dynamic representation space, and using residual connections to generate a unified user representation. The calculation formula is: ,in, For a trainable projection matrix, It also includes information on users' long-term stable preferences and recent heterogeneous intention evolution.

7. The recommendation method and system based on dual-view temporal domain comparison alignment as described in claim 1, characterized in that, The recommendation result generation module is used to generate final personalized suggestions based on feature interaction calculations, specifically including: (1) Feature interaction prediction unit, used to predict the unified user representation With candidate projects Cooperative embedding vectors Feature concatenation is performed, a multilayer perceptron is used to execute nonlinear interactions, and the predicted interaction score of the target user for the item is calculated. The calculation formula is: ; (2) Recommendation list acquisition unit, used to set the number of items recommended by the system. According to the predicted interaction score Sort all candidate items in descending order and select the top ones with the highest scores. Each project builds a personalized recommendation list for the target user.

8. The recommendation method and system based on dual-view temporal domain contrast alignment as described in claim 1, characterized in that, It includes a multi-task joint optimization module for end-to-end training of the system, specifically including: (1) Main target prediction unit, used to predict the target using binary cross-entropy loss. The formula for maximizing the likelihood of observed interaction data is as follows: ,in, For the training set, The tag represents actual interaction, with 1 indicating interaction and 0 indicating no interaction. Tags for real interactions; (2) Prediction residual regularization unit, used to constrain the consistency between predicted scores and true labels in the numerical space, and to construct regularization loss. The formula is ; (3) Joint optimization unit, used to combine the contrast loss generated by the cross-view contrast alignment module. Construct the overall optimization objective, the formula is: ,in, and These are the weights for the contrast alignment loss and the regularization loss, respectively.