Sequence recommendation method based on attribute semantic evolution modeling, electronic equipment and storage medium
Through attribute evolution embedding, temporal semantic fusion and self-supervised learning enhancement, the problems of lack of attribute semantic dynamic evolution modeling and susceptibility of attention mechanism to padding interference in existing sequence recommendation methods are solved, and more accurate user interest dynamic modeling and improved recommendation accuracy are achieved, which is suitable for personalized recommendations in e-commerce and social media.
Patent Information
- Application Number
- CN202510945935.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-10-10
AI Technical Summary
When utilizing item attribute information, existing sequence recommendation methods face the problems of lack of modeling of the dynamic evolution of attribute semantics, insufficient fusion of historical time information, and susceptibility of attention mechanism to padding interference when processing variable-length attribute sequences, which affects the model's ability to finely depict the dynamic changes of user interests.
Through attribute evolution embedding construction, temporal semantic fusion, self-supervised learning enhancement and joint modeling of user behavior and attribute representation, the time trajectory of attribute values is explicitly constructed, the time decay effect is quantified, the interference of filler items is suppressed, and the recommendation accuracy is improved through dynamic-static feature fusion.
It significantly improves the accuracy and generalization ability of recommendations, can more sensitively respond to users' preferences for attribute semantic drift and time sensitivity, reduce noise introduction, and alleviate the risk of overfitting, making it suitable for personalized recommendation scenarios in e-commerce and social media.
Smart Images

Figure CN120763404A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine learning recommendation systems. More specifically, the present invention relates to a sequence recommendation method based on attribute semantic evolution modeling, an electronic device, and a storage medium. Background Art
[0002] Sequential recommendation systems, a type of machine learning recommendation system, aim to predict future user preferences based on historical interaction sequences (e.g., click and purchase records). These models capture the evolution of user interests by analyzing the temporal dependencies of user behavior sequences. However, existing sequential recommendation methods have several limitations in leveraging item-level attributes (e.g., product category, author, director, and tags) to improve recommendations. These limitations directly impact the accuracy and generalization of the models' ability to model dynamic user preferences.
[0003] First, a significant limitation lies in the lack of modeling the semantic evolution of item attributes. Current mainstream methods typically treat item attributes as static, unchanging features. For example, "Director A" is treated as a fixed embedding vector that remains unchanged throughout the entire sequence. However, in real-world scenarios, the semantics of the same attribute (such as a director or a genre label) and its influence on user preferences can change significantly over time (e.g., the evolution of a director's work styles over time or the fluctuations in the popularity of a tag). This dynamic drift of attribute semantics is not effectively captured by existing methods. The fundamental reason is that existing models lack the ability to explicitly model the occurrence trajectory of attribute values and their semantic changes in historical interaction sequences. Attributes are simplified into static identifiers bound to items rather than entities with their own temporal evolution. This makes it difficult for models to accurately reflect users' sensitivity to attribute semantic changes and their shifting preferences, limiting further improvements in recommendation accuracy.
[0004] Secondly, even in the few methods that attempt to introduce attribute sequence information, there are deficiencies in the way attribute historical information is integrated. Specifically, the time interval information of attribute values at different historical moments is not effectively utilized. Existing methods often only record whether the attribute value appears in a certain historical item, or simply average or splice the historical attribute embeddings, ignoring the impact of the time span between different historical interaction events on the current attribute semantic representation. For example, attribute values that appear recently may have a more direct correlation with the current user preference than the same attribute values that appeared a long time ago, but this time decay effect or nonlinear time dependency is not fully reflected in the attribute representation construction process. The difficulty lies in how to quantify the complex impact of time intervals on attribute semantics and naturally incorporate it into the embedded representation without destroying the original semantic structure.
[0005] Third, when using sequence models (such as attention-based mechanisms) to process attribute history information, another common problem is the inability to handle variable-length sequences. The length of historical interaction sequences corresponding to attribute values is typically variable, and models often require padding of short sequences to achieve a uniform length. However, standard attention mechanisms struggle to effectively distinguish between valid historical items and padded items when processing such padded sequences. This causes the calculation of attention weights to be affected by invalid padded locations, which in turn affects the accuracy of the aggregation of valid historical information. This interference effect is particularly pronounced when the historical sequence contains fewer valid items and more padded items, easily leading to the model learning noise or overfitting. Existing methods lack effective mechanisms to suppress padding interference and ensure that the attention mechanism focuses only on valid historical inputs, which poses a technical challenge in constructing robust dynamic representations of attributes.
[0006] In summary, existing sequential recommendation technologies, when leveraging item attribute information, face three interrelated technical challenges: a lack of modeling for the dynamic evolution of attribute semantics, insufficient integration of historical time information, and susceptibility of attention mechanisms to padding when processing variable-length attribute sequences. These issues hinder the model's ability to accurately capture the dynamics of user interests, hindering further improvement in recommendation effectiveness. Summary of the Invention
[0007] One objective of the present invention is to provide a sequence recommendation method, electronic device, and storage medium based on attribute semantic evolution modeling, which can accurately capture users' preferences for attribute semantic changes, significantly improve recommendation accuracy and generalization capabilities, and is suitable for personalized recommendation scenarios in e-commerce and social media.
[0008] To achieve these objectives and other advantages of the present invention, according to one aspect of the present invention, the present invention provides a sequence recommendation method based on attribute semantic evolution modeling, comprising the following steps: S1: Attribute evolution embedding construction: Collect the structured attributes of items in the user's historical interaction sequence; for each structured attribute value , collect the time series data in the user's historical interaction sequence, and generate structured attribute values based on the time series data Corresponding to the semantic embedding of each item in the historical sequence, For items A structured set of attributes; S2: Temporal semantic fusion: The semantic embedding generated in step S1 is input into the attention mechanism to aggregate the historical item semantic embeddings of structured attribute values to generate dynamic attribute representations. ; S3: Self-supervised learning enhancement: Perform a random masking operation on the semantic embedding sequence generated in step S1 to generate two sets of perturbation variants; input the perturbation variants into the attention mechanism of step S2 to generate corresponding perturbation dynamic attribute representations; construct a contrastive learning objective based on the perturbation dynamic attribute representations for training; S4: Jointly modeling user behavior and attribute representation: Represent the dynamic attributes generated in step S2 , static attribute representation obtained by mapping After attribute-level weighted aggregation, and the original embedding of the item The fusion forms an overall representation of the item; this overall representation is input into the basic sequence recommendation model that can process time series behavior data, and combined with the user's historical interaction sequence to perform interest modeling and prediction.
[0009] Preferably, the method of constructing semantic embedding in step S1 is: Given a training set, which contains: users Interaction sequence , items in the interaction sequence The structured attribute set of each structured attribute value Corresponding historical interaction sequence , each structured attribute value Historical sequence timestamps ; Do the following: a. Yes Embed the items in the map: ; b. Based on Compute a time difference sequence: ; c. Generate temporal encoding vector: d. Combine item embedding and temporal encoding to generate structured attribute values The overall semantic embedding of: .
[0010] Preferably, the attention mechanism is constructed in step S2 as follows: The semantic embedding of a given structured attribute value a , through the trainable projection matrix 、 Do the following: Generate query matrix , key matrix Sum Matrix : 、 、 ; Will Enter the multi-head attention mechanism, which introduces a binary mask matrix Eliminating the padding position weights, the attention weights are calculated as: ; Extract the last valid time step from the attention output The result is characterized as a dynamic property: ;in For historical sequence The effective length of , ⊙ represents the element-by-element multiplication of matrices.
[0011] 4. The sequence recommendation method based on attribute semantic evolution modeling according to claim 3, wherein the binary mask matrix Defined as when the corresponding item at position i, j is a valid history item , when the corresponding item at position i, j is a fill item ; The dynamic property representation is the attention output matrix Row vector.
[0012] Preferably, the specific process of step S3 is: Semantic embedding sequence of structured attribute value a , randomly select time steps in proportion 𝛾; The item embedding component and the time interval encoding component of the selected time step are replaced by the padding token vector to generate two sets of independent perturbation variants: , ; Will and Input the attention mechanism of step S2 respectively to generate the corresponding perturbation dynamic attribute representation and : The InfoNCE contrast loss function is constructed based on the dynamic attribute representation of the disturbance: .
[0013] Preferably, the method for fusing the dynamic attribute representation with the original embedding of the item in step S4 is: For each structured attribute value of item i , generate static embeddings through the static embedding layer: ;in, Indicates items The j-th attribute value of ; Based on dynamic attribute representation and static embedding , calculate the dynamic weight and static weight of each structured attribute value a: , ; in, is a trainable parameter, is the total number of attributes; Perform attribute-level weighted aggregation on dynamic attribute representation and static embedding respectively: , ; Embed the item originally , aggregate dynamic features and aggregate static features Splicing to form the overall representation of the item: .
[0014] Preferably, the method further includes the step of constructing a loss function: At time step , based on the user comprehensive embedding output in step S4 and item comprehensive embedding matrix , calculate the candidate item prediction score: ;in, For users At time step The comprehensive embedding of is the comprehensive embedding matrix of all items; Construct the recommended main loss function based on the prediction score: ; Where n is the length of the user interaction sequence, |U| is the total number of users, For users At time step The real interaction label of The total loss function is: ;in, is the self-supervised contrastive loss, is the self-supervisory loss weight coefficient, is the regularization weight coefficient, is the L2 regularization term of the model parameters.
[0015] The present invention also provides an electronic device comprising: at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores an instruction set executable by the processor, and when executed, the instructions enable the processor to perform the steps of the sequential recommendation method based on attribute semantic evolution modeling. The memory stores instructions executable by the processor, and when the processor executes the instructions, any embodiment of the method described in the present invention can be implemented. The electronic device can be a terminal device in various forms, such as a smartphone, tablet computer, laptop computer, desktop computer, personal digital assistant (PDA), point of sale (POS), in-vehicle computing device, etc.
[0016] The present invention also provides a storage medium storing a computer program that, when loaded and executed by a processor, implements the sequence recommendation method based on attribute semantic evolution modeling. The storage medium may be a hard disk, floppy disk, USB flash drive, optical disk, magnetic tape, flash memory, read-only memory (ROM), random access memory (RAM), or other medium capable of storing program code.
[0017] The present invention has at least the following beneficial effects: By explicitly constructing the temporal trajectory of attribute values in historical interactions, it dynamically captures the evolution of their semantics over time (e.g., the phased changes in a director's style), overcoming the limitations of static attribute assumptions and enabling the model to more sensitively respond to user preferences for attribute semantic drift. By incorporating the time difference information of historical interaction events into attribute embeddings, it quantifies the time decay effect (e.g., assigning higher weights to recent attribute values), avoids the loss of temporal information caused by simple averaging or concatenation, and improves the timeliness and accuracy of attribute representations. By suppressing the interference of filler items on the attention mechanism, the model focuses on the feature aggregation of valid historical items, reduces the introduction of noise, and stably generates reliable dynamic attribute representations even in short sequences or sparse scenarios. A self-supervised contrastive learning mechanism enhances the representation's fault tolerance through masked perturbations. Even with limited historical attribute data, the model can still learn discriminative semantic evolution patterns, mitigating the risk of overfitting due to insufficient training samples. An adaptive weighting mechanism for dynamic and static attributes automatically adjusts the contribution ratio of different attribute features based on context, avoiding feature conflicts and ensuring that the overall item representation is more aligned with the user's current preferences. These technical improvements jointly enhance the accuracy and robustness of sequential recommendation models in modeling dynamic user interests, especially when dealing with attribute semantic drift, time-sensitive preferences, and sparse data scenarios, with more stable performance.
[0018] Other advantages, objectives and features of the present invention will be reflected in part from the following description and will be understood by those skilled in the art through study and practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a diagram illustrating the implementation principle of the sequence recommendation method based on attribute semantic evolution modeling described in one technical solution of the present invention. DETAILED DESCRIPTION
[0020] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments so that those skilled in the art can implement the invention with reference to the description.
[0021] It should be understood that terms such as “having”, “including” and “comprising” used herein do not preclude the existence or addition of one or more other elements or combinations thereof.
[0022] The present invention provides a sequence recommendation method based on attribute semantic evolution modeling, comprising the following steps: S1: Attribute evolution embedding construction: Collect the structured attributes of items in the user's historical interaction sequence; for each structured attribute value , collect the time series data in the user's historical interaction sequence, and generate structured attribute values based on the time series data Corresponding to the semantic embedding of each item in the historical sequence, For items A structured set of attributes; S2: Temporal semantic fusion: The semantic embedding generated in step S1 is input into the attention mechanism to aggregate the structured attribute values Semantic embedding of historical items to generate dynamic attribute representations ; S3: Self-supervised learning enhancement: Perform a random masking operation on the semantic embedding sequence generated in step S1 to generate two sets of perturbation variants; input the perturbation variants into the attention mechanism of step S2 to generate corresponding perturbation dynamic attribute representations; construct a contrastive learning objective based on the perturbation dynamic attribute representations for training; S4: Jointly modeling user behavior and attribute representation: Represent the dynamic attributes generated in step S2 , static attribute representation obtained by mapping After attribute-level weighted aggregation, and the original embedding of the item The fusion forms an overall representation of the item; this overall representation is input into the basic sequence recommendation model that can process time series behavior data, and combined with the user's historical interaction sequence to perform interest modeling and prediction.
[0023] In this technical solution, the structured attribute values of items (such as product category, director name or author ID) are collected in the user's historical interaction sequence. , extract its appearance timestamp in the sequence and corresponding item identification. When generating semantic embeddings, the upper limit of the history sequence length can be set to 100, and the timestamp precision can be millisecond level; a distributed database (such as Apache Cassandra) can be used to store the attribute sequence, and an in-memory computing module (such as Redis) can be used to cache the embedding vector; the attribute collection module is deployed in the server data preprocessing layer, and the <item ID, attribute value, timestamp> triplets in the user behavior log are extracted through SQL query. The embedding mapping uses a pre-trained matrix (dimension 64-256), which is spliced with the time encoding function Φ( )( = − ) to form . In the data preprocessing layer, the historical item sequence and timestamp of the attribute are extracted through SQL query. For each item in the historical item sequence, the pre-trained embedding table is called to generate a vector ; the adjacent time difference value is calculated based on the timestamp (the first item = 0), and the encoding vector is generated through the time series encoding function (multi-layer nonlinear calculation, output dimension can be selected as 32, 64 or 128). Finally, the item embedding and time series encoding are spliced to form a k x (d1+d2) dimensional semantic embedding matrix d1 is the dimension of the item embedding, and d2 is the dimension of the time encoding). The explicit fusion of time interval information converts the static attribute into a time-sensitive embedding, solves the problem of ignoring the history change of the attribute in the traditional method, and provides a basis for subsequent dynamic modeling.
[0024] Semantic embedding input attention mechanism: the number of attention heads can be selected as 4, 8 or 12, and the hidden layer dimension is set to 128, 256 or 512. A binary mask matrix is introduced when the position i, j corresponds to a valid historical item, otherwise it is 0, to eliminate the interference of padding. The mask ratio γ is set to 10%, 20% or 30%, and the padding marker is a zero vector. GPU acceleration matrix operation can be deployed, and attention mask is realized through a comparator circuit (effective item judgment threshold 0.5, normalized embedding norm). Self-supervised training: two independent mask variants are generated for the same semantic embedding sequence, and the perturbed dynamic representation is output through the same attention module, and the mutual information is maximized through the InfoNCE loss function (temperature coefficient τ = 0.1). Projection matrices , (the dimension matches the embedding, and the initialization range is [-0.01, 0.01]) convert the semantic embedding into query, key, and value matrices. In multi-head attention calculation, the mask matrix Generated in real time by the comparator (set to 1 when the norm of the valid item > threshold 0.5). The attention output extracts the vector of the last valid time step k as the dynamic attribute representation In the self-supervision phase, the pseudo-random number generator (random seed provided by the system clock) is proportional to A perturbed variant is generated by replacing the embedding component of a selected time step with a zero vector. After the two sets of variants are represented by the output of the attention module, similarity is calculated through inner products and the InfoNCE loss is constructed. A masking mechanism eliminates padding interference and ensures that attribute aggregation relies on valid historical data. Self-supervised contrastive learning enhances generalization capabilities under sparse data and reduces the risk of overfitting.
[0025] Dynamic-static feature fusion: for each attribute value , generating static embeddings (Dimensions are consistent with dynamic embeddings).
[0026] Dynamic weight calculation: = ( + ), the same applies to static weights.
[0027] Item holistic representation: concatenating original embeddings , aggregate dynamic features and static features , input the underlying sequence model (such as SASRec).
[0028] Loss function: The main loss is cross entropy loss, and the total loss is added with self-supervised contrast loss (weight coefficients λ=0.1 / 0.5 / 1.0) and L2 regularization (coefficient β=0.001 / 0.01).
[0029] Static embedding layer generates attribute values Static vector The dynamic and static weights are calculated through the fully connected layer (output dimension 1) and normalized to a probability distribution. and static features After being concatenated with the original item embedding, the data is fed into the sequence model. During the prediction phase, the user's comprehensive embedding is dot-producted with the item embedding matrix to calculate the matching score (configurable dimensions: 128 / 256 / 512). The loss function is implemented using a piecewise linear circuit and a logarithmic lookup table. Adaptive weighting balances the contributions of dynamic and static features to avoid conflicts. End-to-end joint optimization improves the consistency of interest modeling and enhances prediction reliability in time-sensitive scenarios.
[0030] By explicitly modeling attribute semantic evolution, suppressing padding interference, self-supervision enhancement, and dynamic-static feature fusion, the accuracy and robustness of sequence recommendation in attribute drift and time-sensitive scenarios are improved.
[0031] In another technical solution, the method of constructing semantic embedding in step S1 is: Given a training set, which contains: users Interaction sequence , items in the interaction sequence A structured property set , each structured attribute value Corresponding historical interaction sequence , each structured attribute value Historical sequence timestamps ; a. Yes Embed the items in the map: ; b. Based on Compute a time difference sequence: ; c. Generate temporal encoding vector: ; d. Combine item embedding and temporal encoding to generate structured attribute values The overall semantic embedding of: .
[0032] In this technical solution, the upper limit of the length of historical interaction sequences in sequence data collection and item embedding mapping is set to 100 items, and the timestamp accuracy is millisecond level. A distributed database can be used to store historical sequence data, and an in-memory computing module can be used to perform embedding mapping. The item embedding dimension can be selected as 64, 128 or 256, and the vector is generated by pre-training the embedding table. The data preprocessing layer is deployed on the server front end, and extracts the <item ID, attribute value, timestamp> triple from the user behavior log through SQL query. During the working process, in the data preprocessing stage, the historical item sequence of attribute value a is obtained through SQL query. and the corresponding timestamp sequence For each item in the sequence , call the pre-trained embedding table (stored in the memory computing module) to generate the vector When the sequence length exceeds 100, the most recent 100 items are truncated and padded with zero vectors. This ensures the complete collection and standardization of historical data, providing a foundation for time series modeling.
[0033] In time difference calculation and timing code generation, time difference sequence calculation: the first item =0, follow-up (Unit: milliseconds). Timing encoding function Using multi-layer nonlinear calculation, the output dimension can be 32, 64 or 128. Weight matrix and bias Stored in the model parameter server. GPU can be deployed to accelerate matrix operations, and the computing unit is integrated into the time series encoding module. During the working process, the difference between adjacent timestamps is calculated based on the timestamp sequence. (The first term is forced to be 0). Input the time series encoding function Φ: The calculation is done by floating point arithmetic unit and the result is temporarily stored in register array. In the functional test, in Douban dataset verification, input the historical time difference of director attribute "Christopher Nolan" (such as the interval between works is 1460 days), and output It should exhibit nonlinear attenuation characteristics (recent difference output values are higher). It should quantify the impact of time intervals on attribute semantics and enhance the weight distribution of recent historical items.
[0034] In semantic embedding concatenation and verification, the concatenation operation merges item embeddings along the feature dimension. (Dimension d1) and temporal encoding (dimension d2), generating a k×(d1+d2)-dimensional matrix The concatenation can be implemented using TensorFlow's tf.concat or PyTorch's torch.cat module. Verification method: For the same attribute (such as the product category "smartphone"), compare the distribution changes of similar items in the k-nearest neighbor search before and after concatenation. The working process is to embed the item vector (dimension d1∈{64,128,256}) and temporal encoding vector (dimension d2∈{32,64,128}) is concatenated by column to generate a joint vector [ || The joint vector of all history items forms the matrix , stored in a dual-port RAM module (address bus width 8 bits, supporting a maximum sequence length of 256). Experimental verification: K-nearest neighbor search (k=10) was performed on the Amazon product dataset using the concatenated embeddings. The results showed that the introduction of time encoding increased the proportion of recently popular items among similar items for "smartphones," validating the effectiveness of temporal information. By integrating item semantics with time interval information, a time-sensitive embedding representation was formed, supporting dynamic attribute modeling.
[0035] This technical solution explicitly constructs dynamic semantic trajectories of attribute values through standardized sequence acquisition, time difference encoding and feature splicing, thus overcoming the limitations of static attribute assumptions.
[0036] In another technical solution, the method of constructing the attention mechanism in step S2 is: The semantic embedding of a given structured attribute value a , through the trainable projection matrix 、 Do the following: Generate query matrix , key matrix Sum Matrix : 、 、 ; Will Enter the multi-head attention mechanism, which introduces a binary mask matrix Eliminating the padding position weights, the attention weights are calculated as: ; Extract the last valid time step from the attention output The result is characterized as a dynamic property: ;in For historical sequence The effective length of , ⊙ represents the element-by-element multiplication of matrices.
[0037] This technical solution, the projection matrix 、 The dimensions can be 128×128, 256×256, or 512×512, matching the embedding vector dimensions. The initialization range is set to a uniform distribution of [-0.01, 0.01]. The matrix multiplication unit of the GPU can be used to perform projection operations, and the floating-point arithmetic unit is integrated into the processor core. The parameters are stored in the DRAM chip of the device memory and transferred to the computing unit via the PCIe bus. During operation, the input semantic embedding The computation is multiplied by the three projection matrices, with a timeout threshold of 5 milliseconds. A hardware interrupt is triggered if the computation is too slow. During the testing phase, 1000 random embeddings are injected to verify that the error norm of the output matrix is less than 0.001.
[0038] In mask attention calculation and interference suppression, binary mask matrix Generated by sequence validity detection: when the embedding vector norm corresponding to position i, j is greater than the threshold 0.5 (after normalization) , otherwise it is 0. A digital comparator circuit can be used to implement the decision logic and integrated into the data path between the memory controller and the computing unit. The attention weight calculation formula is: ; where d is the key vector dimension (optional 64, 128, or 256), and ⊙ represents element-wise multiplication. The calculation is processed in parallel by a multi-head attention module (optional 4, 8, or 12 heads), and the padding weight suppression target value is 10 -6 During testing, a sequence containing 20% padding items was injected to verify that the weights of invalid positions approached 0.
[0039] In dynamic representation extraction and output control, the dynamic attribute representation f_^dynamic is obtained from the attention output matrix 𝑂∈𝑅 k×d Extract the kth row vector (k is the valid sequence length). An address counter can be used to obtain the k value in real time, with the counting logic based on valid item detection (embedding norm > 0.5). The output vector is temporarily stored in an SRAM cache chip and transmitted to the downstream module via a PCIe 3.0×8 interface (transmission rate 8 GT / s). The interface circuit includes a serial-to-parallel converter and a differential driver, with physical layer impedance matching of 100Ω ± 10%. During operation, the counter is cleared at initialization and incremented by 1 for each valid item processed. The final count value is used as the row address to access the dual-port RAM module. During the testing phase, variable-length sequences (length 10-100) are constructed to verify that the output error rate is less than 0.1%, and that eye diagram analysis meets signal integrity requirements (SJNR > 30 dB).
[0040] Through configurable projection parameters, hardware-level masking mechanism and dynamic addressing extraction, it effectively aggregates attribute historical semantic information and eliminates padding interference, providing highly robust dynamic representation for subsequent recommendation modeling.
[0041] In another technical solution, the binary mask matrix Defined as when the corresponding item at position i, j is a valid history item , when the corresponding item at position i,j is a fill item ; The dynamic property representation is the k-th row vector of the attention output matrix.
[0042] In this technical solution, the binary mask matrix The decision logic is based on valid history item detection: when the norm of the input embedding vector corresponding to position i, j is greater than the threshold 0.5 (0-1 normalized value) , otherwise 0. A digital comparator circuit (such as the 74HC85 chip) can be used to implement the decision logic. This circuit is integrated into the data path between the memory controller and the computation unit. During operation, the input embedding vector is generated into a scalar value by the norm calculation unit (with an integrated floating-point arithmetic unit). The comparator checks in parallel whether the scalar value at each position exceeds the threshold, and the output result is written to the mask register. Matrix elements are stored in an SRAM chip (such as the CY7C1049DV33), and the address bus is mapped to the attention computation unit. During testing, a sequence containing 30% padding (marked with an all-zero vector) is injected to verify that the mask accuracy is >99.9%.
[0043] In the storage and addressing mechanism of dynamic representation, dynamic attribute representation The data is stored in a dual-port RAM module (such as the IDT70V24) with an 8-bit row address bus width (supporting a maximum sequence length of 256) and a 64-bit data bus width (corresponding to a d = 512 configuration). An address counter (such as the 74LS191 chip) can be used to obtain the valid sequence length k in real time: the counter is initialized to zero and incremented by 1 for each valid entry (norm > threshold 0.5). The final count value is used as the row address for accessing the RAM. The k-th row vector is temporarily stored in a cache register (such as the SN74LVTH16244) and transmitted to downstream modules. During operation, timing control is implemented in FPGA programmable logic (clock frequency 200MHz), and an anomaly detection circuit triggers an interrupt when the count value overflows. During the testing phase, variable-length sequences (length 10-100) are constructed and verified to have an extraction error rate of <0.01%.
[0044] Output interface and signal integrity assurance, extracted The output is via a PCIe 3.0 x8 interface with a transmission rate of 8 GT / s. A serial-to-parallel converter (such as the DS90CR287) and a differential driver (such as the SN65LVDS31) are used to form the interface circuit. The physical layer uses the LVDS level standard with an impedance matching of 100Ω ± 10%. The output vector dimension can be set to 128, 256, or 512, via a configuration register. The output buffer depth is set to 4 vectors, and a FIFO queue (such as the IDT72V36100) is used to manage data flow. During operation, an eye diagram analyzer monitors signal quality in real time, requiring a signal-to-noise ratio (SJNR) > 30dB. During the testing phase, load disturbances are applied to verify that the signal jitter tolerance is < 0.1 UI.
[0045] Through hardware-level mask determination, dynamic address counting and standardized output interface, the accurate aggregation and reliable transmission of effective historical information are ensured, the impact of padding interference on dynamic representation is suppressed, and the real-time and stability of the sequence recommendation system are improved.
[0046] In another technical solution, the specific process of step S3 is: For structured attribute values Semantic embedding sequence , randomly select time steps in proportion 𝛾; The item embedding component and the time interval encoding component of the selected time step are replaced by the padding token vector to generate two sets of independent perturbation variants: , ; Will and Input the attention mechanism of step S2 respectively to generate the corresponding perturbation dynamic attribute representation and : The InfoNCE contrast loss function is constructed based on the dynamic attribute representation of the disturbance: .
[0047] In this technical solution, in mask generation and perturbation variant construction, the mask ratio The options are 10%, 20% or 30%. A pseudo-random number generator can be used to generate the mask index, and the random seed is provided by the system clock chip. When the random number is lower than the γ threshold, the item embedding component and the time interval encoding component of the corresponding time step are replaced by an all-zero padded vector (the dimension is the same as the original embedding). This operation is completed in the data preprocessing module, and a multiplexer circuit can be used to switch the original data and the padded data. During the working process, the semantic embedding sequence Traverse by time step, trigger the mask when the random number is lower than γ, and generate two sets of independent variants and During the testing phase, 1000 sequences were injected to verify that the standard deviation of the mask ratio was <0.5%.
[0048] In the dual-channel attention processing mechanism, two sets of perturbation variants are processed through independent hardware channels. Each channel includes: a data buffer that can use a dual-port RAM module to temporarily store the perturbation sequence, with a storage depth of 256×512 (sequence length × feature dimension) Attention operation; reuse of multi-head attention modules, 1:1 hardware resource allocation ratio; dynamic attribute representation The data is stored in a FIFO queue. The timing control parameters are a clock frequency of 200MHz and a single sequence processing delay threshold of ≤5μs. During operation, the state machine coordinates data flow transmission, and the anomaly detection circuit triggers an interrupt when the output norm is abnormal (such as all zeros). During the test, a sequence of length 50 is input to verify that the output error norm is ≤1×10 -6 .
[0049] InfoNCE loss function implementation includes: Similarity calculation can be calculated using multiplication and accumulation ; Exponential operation can use the CORDIC algorithm module to implement the natural exponential function; the denominator sum is 32-bit accumulator bit width, and the overflow protection threshold is 1×10 38 The temperature coefficient τ can be fixed to 0.07. The computing unit is deployed in the FPGA programmable logic area and receives the input vector through the PCIe interface. , Calculate the numerator and the denominator for the negative samples (randomly sample 10 groups). During testing, construct a positive-to-negative sample ratio of 1:10 and output a loss value with an error tolerance of ≤0.1%.
[0050] Effective perturbation variants are generated through a configurable mask mechanism, dual-channel parallel processing ensures throughput, and fixed-point loss calculation reduces resource overhead, significantly improving the generalization and robustness of dynamic attribute representation in sparse data scenarios.
[0051] In another technical solution, the method for fusing the dynamic attribute representation with the original embedding of the item in step S4 is: For items Each structured attribute value of , generate static embeddings through the static embedding layer: ;in, represents the j-th attribute value of item i; Based on dynamic attribute representation and static embedding , calculate each structured attribute value Dynamic weight and static weight of: , ; in, is a trainable parameter, m is the total number of attributes; Perform attribute-level weighted aggregation on dynamic attribute representation and static embedding respectively: , ; Embed the item originally , aggregate dynamic features and aggregate static features Splicing to form the overall representation of the item: .
[0052] In this technical solution, the static embedding layer generates the item attribute value Vector , with optional dimensions of 128, 256, or 512. A fully connected layer integrated circuit can be used for mapping, and the weights are stored in the DRAM chip of the model parameter server. During operation, attribute values are mapped to embedding table indices through a hash function, and the pre-trained static embedding table is called to generate vectors. The static embedding table is initialized to a range of [-0.1, 0.1] and deployed in the memory storage area of the parameter server. During the testing phase, the Amazon dataset was used for verification. The input attribute "color: red" was used, and the output embedding vector must be within the preset numerical tolerance (error <1×10 -4 ).
[0053] Dynamic weight calculation: ; The static weight calculation is similar. Parameter matrix dimensions: ∈R d×1 (d is the dimension of the input vector), is a scalar bias. A 32-bit floating-point arithmetic unit can be used to perform matrix multiplication and addition operations, and the activation function σ Sigmoid circuit is used to realize the dynamic property characterization. and static embedding The weight calculation module is input separately, and the output weight values are temporarily stored in the register array. In the verification phase, 500 sets of synthetic features are injected to verify that the weight output range is 0-1 and the distribution is reasonable (mean 0.5±0.2).
[0054] In weighted aggregation, dynamic feature aggregation: ; Static feature aggregation: ; A multiplier-accumulator circuit can be used to implement weighted summation, and the accumulator bit width is 64 bits.
[0055] Final splicing: The splicing operation is completed by connecting the integrated circuit with tensors, and the output dimension is the sum of the original embedding dimension and the dynamic / static feature dimension. The output features (optional dimensions: 128 / 256 / 512) are concatenated with the aggregated features column-wise, and the result is stored in a dual-port RAM module (storage depth: 1024). During the testing phase, synthetic item data is injected to verify that the output dimensions match the preset value (e.g., 128+256+256=640).
[0056] Through static embedding tables, trainable weight calculation modules and hardware aggregation circuits, adaptive fusion of dynamic and static attributes is achieved to form a representation vector that comprehensively describes the characteristics of items, providing highly discriminative input for sequential recommendation models.
[0057] In another technical solution, the loss function construction step is also included: At time step , based on the user comprehensive embedding output in step S4 and the item comprehensive embedding matrix , calculate the candidate item prediction score: ; wherein, is the comprehensive embedding of user u at time step t, is the comprehensive embedding matrix of all items; construct a recommendation main loss function based on the prediction score: ; wherein, n is the length of the user interaction sequence, |U| is the total number of users, is the real interaction label of user u at time step t; The total loss function is: ; wherein, is the self-supervised contrastive loss, is the self-supervised loss weight coefficient, is the regularization weight coefficient, is the model parameter L2 regularization term.
[0058] In the technical solution, the prediction score calculation module, the user comprehensive embedding vector and the item embedding matrix are stored in a DDR4 memory chip with a data bit width of 64 bits. A matrix multiplication accelerator can be selected to calculate the dot product score: ; the accelerator integrates 1024 parallel multiplication accumulation units with a clock frequency of 500 MHz. The input vector dimension supports 128 / 256 / 512 configurable, deployed on a server computing card. In the working process, the user current state vector and the candidate item vector are transmitted to the accelerator through the PCIe interface, and the element-by-element multiplication and addition operation is performed. In the test phase, 1000 groups of random vectors are injected to verify that the output error norm is <0.001.
[0059] The cross-entropy loss calculation is: ; The following hardware modules can be selected: Probability conversion: a piecewise linear approximation circuit maps the score to the [0, 1] interval; Logarithmic operation: 1024-bit depth LUT lookup table (address mapping accuracy 0.001); Accumulator: 32-bit fixed-point accumulator, overflow threshold 10 6 .
[0060] The calculation pipeline is deployed in the FPGA programmable logic area, and the single sample processing delay is ≤1μs. In the working process, the real label controls the data selector to switch the calculation path. When testing, the standardized score data is injected, and the output loss value and the floating-point reference deviation are <0.1%.
[0061] Total loss function: ; Self-monitoring loss The loss is input through the PCIe 3.0×8 interface (rate 8 GT / s). The regularization term is generated in real time by the square accumulator, and the coefficient is adjustable: λ (self-supervision weight) can be selected as 0.1 / 0.5 / 1.0, β (regularization strength) can be selected as 0.001 / 0.01. A 32-bit floating point adder chain can be used to implement synthetic calculations, with a dynamic range of 10 -6 to 10 6 Parameter configuration registers are stored in an EEPROM chip, and an anomaly detection circuit triggers an alarm when the output exceeds the limit. Sweep testing verifies that the full-scale linearity error is <0.05%.
[0062] Through dedicated hardware-accelerated dot product calculations, modular loss pipelines, and configurable synthesis mechanisms, efficient and stable end-to-end training optimization is achieved to meet the real-time requirements of recommendation scenarios of different scales.
[0063] The present invention also provides an electronic device comprising: at least one processor, and a memory communicatively connected to the at least one processor; wherein the memory stores an instruction set executable by the processor, and when the instructions are executed, the processor is able to perform the steps of the sequence recommendation method based on attribute semantic evolution modeling.
[0064] In this technical solution, the main frequency of at least one processor can be selected as 1.5GHz, 2.4GHz or 3.0GHz, and the number of cores is ≥2. A multi-core architecture processor chip can be selected, which integrates a floating-point operation unit and a matrix acceleration module and is deployed in the central position of the main circuit board of the device. During operation, the processor accesses the instruction set in the memory through the memory bus and schedules the recommended algorithm tasks according to priority. The anomaly detection module triggers frequency reduction protection when the temperature is >85℃ or the voltage fluctuation is >±5%. During the test phase, the stress load (such as continuous matrix multiplication operations) is run to verify that the instruction throughput is ≥10 8 bars / second.
[0065] The memory includes RAM and ROM dual modules, with optional capacity configuration: RAM: 8GB / 16GB / 32GB DDR4, transfer rate 2400MT / s; ROM: 256GB / 512GB / 1TB NAND flash memory, read / write speed 550 / 520 MB / s; DRAM chips can be used as RAM, while NAND flash memory chips can be used as ROM, connected to the processor via a 64-bit memory bus. The memory modules are deployed in slots adjacent to the processor, and the heat sink is made of aluminum alloy. During operation, the recommendation algorithm instruction set is stored in ROM and loaded into RAM during runtime. User interaction sequence data is cached in RAM via the PCIe interface. Temperature monitoring thresholds: RAM < 80°C, ROM < 70°C.
[0066] Instruction execution process: The processor loads the recommendation algorithm program from ROM to RAM, parses the user interaction sequence data (maximum length 100 items), calls the machine instructions of the sequence recommendation method based on attribute semantic evolution modeling, and outputs the recommendation results to the I / O interface. The fault tolerance mechanism includes: Instruction check code: CRC-32 check circuit, error threshold 1bit / 10 9 bits; Watchdog timer: automatic reset after timeout threshold of 50ms; Data backup: Automatically save the status to the ROM backup area in case of abnormality.
[0067] During the testing phase, an instruction stream containing 0.1% random bit flips was injected to verify that the fault tolerance recovery success rate was >99.9%.
[0068] Through multi-level processor configuration, dual-mode memory architecture and triple fault tolerance mechanism, the sequence recommendation method is ensured to be stably executed on the electronic device side, meeting the reliability requirements in industrial environments.
[0069] The present invention also provides a storage medium on which a computer program is stored. When the program is loaded and executed by a processor, it can implement the sequence recommendation method based on attribute semantic evolution modeling.
[0070] In this technical solution, the storage medium uses NAND flash memory chips with optional storage capacities of 256GB / 512GB / 1TB and read / write speeds of 550 / 520 MB / s. The packaging material can be an epoxy resin substrate, and the interface type supports SATA 3.0 or PCIe 3.0×4. During operation, the computer program is burned to the storage medium through the JTAG programming interface. The write voltage threshold is 3.3V±5%, and the data buffer capacity is 4KB. The verification phase is executed 10 5 Repeated write-erase cycles, bad block rate threshold <0.1%.
[0071] The processor loads the program: The DMA controller reads program data from the storage medium into the RAM buffer (8MB capacity). The instruction decoder parses the program header identifier (magic number 0x7F454C46). The dynamic link library is loaded into the processor's dedicated memory partition (address space 0x800000-0xFFFFFF). The operating clock frequency is 200MHz, and the load timeout threshold is 50ms. Program decompression uses the LZ77 algorithm hardware accelerator, with a compression ratio of 1:2.5. During the testing phase, 1GB of program data was injected, and the complete load time was verified to be less than 1.5 seconds.
[0072] The operation monitoring mechanism includes: Temperature sensor: monitors the storage medium operating temperature (threshold 0-70°C); Voltage monitoring circuit: fluctuation tolerance ±3%; Error correction: BCH coding circuit (error correction capability 4bit / 512B); Fault-tolerance process: If three consecutive read errors are detected, the system automatically switches to a backup sector (reserving 5% redundancy). The storage media is installed in a dedicated slot on the device's mainboard, and the heat sink is made of aluminum alloy 6063. Aging testing is conducted in an 85°C / 85% RH environment for 500 hours, with a functional availability requirement of >99.5%.
[0073] This technical solution ensures the long-term stable storage and reliable execution of the recommendation algorithm program through standardized storage structure, hardware accelerated loading mechanism and multi-level fault-tolerant design, meeting the data persistence requirements of industrial-grade equipment.
[0074] like Figure 1 As shown, the sequence recommendation method based on attribute semantic evolution provided by the present invention includes the following steps: S1: Collect user historical behavior sequences, extract the structured attributes of items (such as author, label, director, etc.), and extract the occurrence records of attributes at different time points from the user's historical interaction sequence to form an attribute time series. Construct a temporal semantic embedding trajectory for each attribute value, and generate a vector representation of its historical sequence at different times. This embedding can come from a pre-trained language model, a graph neural network, or a learnable embedding table to enhance the ability to model the contextual meaning and evolutionary patterns of attributes. This step breaks through the limitation of traditional models that treat attributes as static inputs, enabling the recommendation system to capture the dynamic changes in attribute semantics, which helps to more accurately characterize user preference responses to changes in attribute semantics.
[0075] S2: For each attribute's constructed historical semantic trajectory, an attention mechanism, gating network, or other learnable aggregation strategy is employed to perform a weighted fusion of the attribute's historical embeddings at different moments, generating a dimensionally consistent dynamic attribute representation. This fusion method automatically adjusts the importance of each sequence item at each historical moment based on its information contribution, enabling adaptive modeling of the attribute's semantic evolutionary trends. Compared to simple averaging or concatenation, this step offers greater time sensitivity and expression flexibility while maintaining dimensional consistency, more accurately reflecting users' dynamic responses to the attribute's historical semantics.
[0076] S3: To improve the robustness and generalization of the model during dynamic attribute representation learning, a self-supervised learning task based on attribute trajectories is introduced. Specifically, the model applies a random mask to the historical attribute embedding sequence, constructs two sets of perturbation tables, and introduces a contrast objective function based on the InfoNCE framework as an auxiliary training objective to strengthen the model's understanding of the attribute evolution structure. This step generates high-quality supervisory signals without additional labels, helping to prevent overfitting and alleviate cold start issues. It also improves the model's versatility and performance in real-world recommendation tasks.
[0077] S4: After obtaining the dynamic representation of each attribute, the system concatenates or nonlinearly maps it with the static representation of the attribute and the original item embedding to generate the final item representation. This item representation, along with the user's historical interaction sequence, is fed into a mainstream sequential recommendation model (such as SASRec and BERT4Rec) for user interest modeling and item score prediction. By incorporating dynamically modeled attribute semantics, this model not only captures the intrinsic characteristics of items but also incorporates attribute evolution trends, thereby improving its ability to model user interest shifts, long-term preferences, and contextual context, ultimately achieving more accurate and stable recommendations.
[0078] This method introduces a modeling mechanism for the temporal evolution of attribute semantics, combined with attention aggregation and self-supervision enhancement strategies, enabling the recommendation system to more precisely capture the dynamic changes in user interests across different timescales. Furthermore, by jointly modeling dynamic attribute representations with user behavior, it achieves a deep coupling of item semantics and user preferences. Compared to existing methods that treat attributes as static spliced information, this method significantly improves attribute representation dimensionality, temporal perception, and personalized modeling accuracy.
[0079] Furthermore, this method boasts a highly modular and compatible structure. The proposed dynamic attribute modeling mechanism can be seamlessly integrated into various mainstream sequential recommendation frameworks without modifying the existing model structure, enabling rapid deployment and efficient reuse. Experiments have shown that this method maintains its superior recommendation accuracy while also possessing enhanced generalization and semantic adaptability. It is applicable to a variety of real-world recommendation scenarios and possesses broad practical value and industrial application prospects. Example
[0080] The sequence recommendation method based on attribute semantic evolution modeling provided by the present invention is implemented in a book recommendation scenario, using the Goodreads public dataset (containing 10 million user-book interaction records).
[0081] Implementation Process 1. Attribute Evolution Embedding Construction Collect a historical sequence of author attributes (such as "Stephen King"): Timestamp sequence: 1974-01-01 ("Carrie"), 1977-01-01 ("The Shining"), ..., 2023-09-01 ("Holly"); Book sequence: ISBN is mapped to a 128-dimensional embedding; Calculate the time difference: the first Δt=0, the subsequent Δt j = t j -t j-1 (Unit: day); Generate temporal code: Φ(Δt) uses a single-layer fully connected network (output dimension 128); Concatenation: Book embedding (128 dimensions) + temporal encoding (128 dimensions) → 256-dimensional semantic embedding.
[0082] 2. Temporal Semantic Fusion The projection matrix dimension is 20×256, and the initialization range is [-0.01, 0.01]. Masking mechanism: the upper limit of sequence length is 100, and the threshold of valid item norm is 0.5; Attention calculation: 4-head attention, output is the last valid step vector.
[0083] 3. Self-supervision enhancement The mask ratio γ = 20%, and the contrast loss temperature coefficient τ = 0.1.
[0084] 4. Joint Modeling Dynamic-static weight: Sigmoid layer outputs dynamic weight; Item representation: original embedding + dynamic features + static features → 384 dimensions; Base model: SASRec.
[0085] Deployment Environment Processor: 8-core CPU; Memory: 32GB DDR4; Storage: 512GB SSD.
[0086] Training parameters Batch size: 256; Optimizer: Adam; Training epochs: 100; Regularization coefficient β = 0.01.
[0087] Comparative Example Control method Using the same base model (SASRec), but using only static attribute processing: Author attributes as fixed embedding vectors; No time difference calculation and timing coding; The attribute embedding is directly concatenated with the original item embedding; No self-supervised contrastive learning module; Other hyperparameters remain the same as in the embodiment.
[0088] The performance comparison is shown in Table 1.
[0089] Table 1 According to the data in Table 1, a larger NDCG@N value indicates a more accurate model recommendation result. The trained model in the embodiment significantly outperforms the model in the comparative example before using this method, provided that the space and time requirements do not expand exponentially.
[0090] Although the embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the description and implementation methods. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.
Claims
1. A sequence recommendation method based on attribute semantic evolution modeling, characterized by: The following steps are involved: S1: Attribute evolution embedding construction: Collect the structured attributes of items in the user's historical interaction sequence; for each structured attribute value , collect the time series data in the user's historical interaction sequence, and generate structured attribute values based on the time series data Corresponding to the semantic embedding of each item in the historical sequence, For items A structured set of attributes; S2: Temporal semantic fusion: The semantic embedding generated in step S1 is input into the attention mechanism to aggregate the structured attribute values Semantic embedding of historical items to generate dynamic attribute representations ; S3: Self-supervised learning enhancement: Perform a random masking operation on the semantic embedding sequence generated in step S1 to generate two sets of perturbation variants; input the perturbation variants into the attention mechanism of step S2 to generate corresponding perturbation dynamic attribute representations; construct a contrastive learning objective based on the perturbation dynamic attribute representations for training; S4: Jointly modeling user behavior and attribute representation: Represent the dynamic attributes generated in step S2 , static attribute representation obtained by mapping After attribute-level weighted aggregation, and the original embedding of the item The fusion forms an overall representation of the item; this overall representation is input into the basic sequence recommendation model that can process time series behavior data, and combined with the user's historical interaction sequence to perform interest modeling and prediction.
2. The sequence recommendation method based on attribute semantic evolution modeling according to claim 1, characterized in that: The way to construct semantic embedding in step S1 is: Given a training set, which contains: users Interaction sequence , items in the interaction sequence A structured set of attributes , each structured attribute value Corresponding historical interaction sequence , each structured attribute value Historical series timestamps ; Do the following: a. Yes Embed the items in the map: ; b. Based on Compute a time difference sequence: ; c. Generate temporal encoding vector: ; d. Combine item embedding and temporal encoding to generate structured attribute values The overall semantic embedding of: 。 3. The sequence recommendation method based on attribute semantic evolution modeling according to claim 2, characterized in that: The way to construct the attention mechanism in step S2 is: Given a structured attribute value Semantic embedding of , through the trainable projection matrix 、 Do the following: Generate query matrix , key matrix Sum Matrix : 、 、 ; Will Enter the multi-head attention mechanism, which introduces a binary mask matrix Eliminating the padding position weights, the attention weights are calculated as: ; Extract the last valid time step from the attention output The result is characterized as a dynamic property: ;in For historical sequence The effective length of ⊙ represents the element-by-element multiplication of matrices.
4. The sequence recommendation method based on attribute semantic evolution modeling according to claim 3, characterized in that: The binary mask matrix Defined as when the corresponding item at position i, j is a valid history item , when the corresponding item at position i,j is a fill item ; The dynamic property representation is the attention output matrix Row vector.
5. The sequence recommendation method based on attribute semantic evolution modeling according to claim 4, characterized in that: The specific process of step S3 is: For structured attribute values Semantic embedding sequence , randomly select time steps in proportion 𝛾; The item embedding component and the time interval encoding component of the selected time step are replaced by the padding token vector to generate two sets of independent perturbation variants: , ; Will and Input the attention mechanism of step S2 respectively to generate the corresponding perturbation dynamic attribute representation and : The InfoNCE contrast loss function is constructed based on the dynamic attribute representation of the disturbance: 。 6. The sequence recommendation method based on attribute semantic evolution modeling according to claim 5, characterized in that: The method for fusing the dynamic attribute representation with the original embedding of the item in step S4 is: For items Each structured attribute value of , generate static embeddings through the static embedding layer: ;in, Indicates items The j-th attribute value of ; Based on dynamic attribute representation and static embedding , calculate each structured attribute value Dynamic weight and static weight of: , ; in, is a trainable parameter, is the total number of attributes; Perform attribute-level weighted aggregation on dynamic attribute representation and static embedding respectively: , ; Embed the item originally , aggregate dynamic features and aggregate static features Splicing to form the overall representation of the item: .
7. The sequence recommendation method based on attribute semantic evolution modeling according to claim 6, characterized in that: It also includes the loss function construction step: At time step , based on the user comprehensive embedding output in step S4 and item comprehensive embedding matrix , calculate the candidate item prediction score: ;in, For users At time step The comprehensive embedding of is the comprehensive embedding matrix of all items; Construct the recommended main loss function based on the prediction score: ; Where n is the length of the user interaction sequence, |U| is the total number of users, For users At time step The real interaction label of The total loss function is: ;in, is the self-supervised contrastive loss, is the self-supervisory loss weight coefficient, is the regularization weight coefficient, is the L2 regularization term of the model parameters.
8. An electronic device, characterized in that include: At least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores a set of instructions executable by the processor, and when the instructions are executed, the processor is capable of performing the steps of the sequence recommendation method based on attribute semantic evolution modeling as described in any one of claims 1 to 7.
9. A storage medium, characterized in that A computer program is stored thereon, and when the program is loaded and executed by a processor, it can implement the sequence recommendation method based on attribute semantic evolution modeling as described in any one of claims 1 to 7.