Safety education recommendation method and system based on demand profile and content label
Through the combination of dynamic user portraits and security knowledge graphs, the recommendation of security education content is optimized, and the problem of insufficient personalization and dynamic adaptability in the existing technology is solved, and efficient personalized recommendation is achieved.
Patent Information
- Application Number
- CN202411281054.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-09-13
AI Technical Summary
The existing security education methods lack personalization and fail to fully consider the multi-dimensional characteristics of users and the semantic information of content, resulting in poor recommendation results, lack of dynamic adaptability, and inability to track changes in user interests in real time.
By obtaining user behavior data, generating dynamic adaptive user portraits, and conducting multi-level semantic analysis of the content of the security education material library, combining the domain expert knowledge base, building a security knowledge graph, using a hybrid recommendation algorithm to optimize recommendation strategies, and generating personalized content recommendations.
It realizes highly personalized and precise recommendations of security education content, dynamically adapts to changes in user interests, and improves the relevance of user satisfaction and recommendations.
Smart Images

Figure CN118797173B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a safety education recommendation method and system based on demand portraits and content tags. Background Art
[0002] With the widespread application of information technology, safety education is facing new opportunities and challenges. Traditional safety education methods usually adopt a "one-size-fits-all" approach, pushing the same safety knowledge and education content to all groups, ignoring the personalized needs and interest preferences of different users, resulting in poor education results and low user participation and satisfaction.
[0003] However, the existing technology still has the following shortcomings: First, there is a lack of comprehensive characterization of user needs, and it does not fully consider multi-dimensional factors such as user demographic characteristics, behavioral preferences, and knowledge level, making it difficult to accurately capture users' personalized needs; second, there is insufficient semantic understanding of security knowledge content, and it mainly relies on keyword matching and shallow content analysis, and is unable to deeply explore the semantic information and topic associations of the content; third, the recommendation process lacks dynamic adaptability and fails to track changes and feedback in user interests in real time, resulting in low relevance and novelty of recommended content.
[0004] To sum up, there is an urgent need for a personalized safety education recommendation method that can comprehensively utilize user portraits and content tags, deeply explore user needs and content semantics, dynamically adapt to user interests, and provide highly personalized and accurate safety education content recommendations. The present invention can solve the problems in the prior art. Summary of the invention
[0005] The embodiments of the present invention provide a safety education recommendation method and system based on demand portraits and content tags, which can solve the problems in the prior art.
[0006] According to a first aspect of the embodiments of the present invention,
[0007] Provides a security education recommendation method based on demand profiles and content tags, including:
[0008] Obtain user behavior attribute data, dynamically model user multi-dimensional features through adaptive incremental learning algorithms, generate user multi-dimensional portraits, and perform real-time decay updates on the weights corresponding to each dimension in the user multi-dimensional portrait through a time decay model based on the knowledge forgetting curve to generate a dynamically adaptive user portrait.
[0009] Perform multi-level semantic analysis on the heterogeneous content in the preset safety education material library to generate initial multi-granular content labels. Optimize and expand the initial multi-granular content labels through ontology construction technology combined with the pre-acquired domain expert knowledge base to obtain comprehensive multi-granular content labels covering explicit topic labels and implicit concept labels. Through the dynamic embedding representation learning method that incorporates the time decay factor, the temporal semantic evolution association between the comprehensive multi-granular content labels is mined to construct a safety knowledge graph.
[0010] Through a hybrid recommendation algorithm, a cross-correlation matrix of the dynamically adaptive user portrait and the security knowledge graph is comprehensively modeled, the recommendation strategy weights of short-term interest mining and long-term preference grasp are adaptively optimized, and a recommended list of security education content is generated.
[0011] In an optional embodiment,
[0012] Obtain user behavior attribute data, dynamically model user multi-dimensional features through adaptive incremental learning algorithms, and generate user multi-dimensional portraits including:
[0013] Obtain user behavior attribute data including demographic attributes, browsing history, interaction text, attitude tendencies, and knowledge and skills;
[0014] Preprocessing the user behavior attribute data, for structured data, using attribute values as features, and for unstructured data, using word embedding convolutional neural networks to extract semantic features, to obtain original features of each dimension;
[0015] The original features of each dimension are input into the shared layer, which is built based on the attention mechanism enhanced capsule network. The original features are mapped to the high-dimensional semantic space through the dynamic routing algorithm to obtain the shared intermediate feature representation between dimensions.
[0016] After the shared layer, a dimension-specific layer is set up. According to each dimension, a multi-head attention mechanism and a gated recurrent unit network are independently set up to map the shared intermediate feature representation into the dimension feature representation.
[0017] Adopt a multi-dimensional task joint learning strategy with adaptive weight adjustment, combine the difficulty and convergence speed of dimensional tasks, dynamically adjust the weight of the loss function of each dimensional task, introduce adversarial regularization constraints between dimensional tasks, optimize the joint loss function of all dimensional tasks, and update the parameters of shared layers and dimensional task-specific layers through adaptive gradient algorithms;
[0018] When new user behavior data arrives, the knowledge distillation model is used to compress the current model, predict the new data and calculate the prediction loss, add the new data to the training set, and incrementally update the current model by combining ensemble learning and adaptive learning rate strategy. The small batch SVRG algorithm is used to optimize the parameters, control the update amplitude, and take into account the fitting ability of new and old data.
[0019] By designing a meta-learning controller with an LSTM structure, the proximal strategy optimization algorithm and the Bayesian optimization algorithm are used to adaptively adjust the model hyperparameter combination; based on dimensional feature representation, a combination of a variational autoencoder network and a generative adversarial network is used to generate a dynamically updated multi-dimensional user portrait.
[0020] In an optional embodiment,
[0021] Through the time decay model based on the knowledge forgetting curve, the weights corresponding to each dimension in the user's multi-dimensional portrait are updated in real time to generate a dynamic adaptive user portrait including:
[0022] The first time decay curve function is used to determine the short-term memory forgetting trajectory of the user's behavioral attributes. The second time decay curve function is used to determine the long-term memory retention trajectory of the user's core behavioral attributes. The weight coefficients of the two curves are combined to determine the differences in memory retention under different time scales, and a hyperbolic forgetting model is constructed.
[0023] Introduce the attention mechanism to dynamically adjust the importance of each dimension of the user portrait, use the user behavior sequence as the query vector, and the embedding vector of each dimension of the user portrait as the key value vector. Calculate the attention weight of each dimension through the attention function, and multiply the attention weight with the time decay curve function value in the hyperbolic forgetting model to obtain the dimension weight update factor;
[0024] For each piece of behavioral attribute data of each user, the time interval with the current time is calculated according to the data timestamp, and the weight of each dimension in the multi-dimensional portrait of the user is attenuated and updated by using the time interval, the hyperbolic forgetting model and the dimension weight update factor to generate a dynamically changing user portrait dimension weight vector;
[0025] Based on the multi-scale time coding method, the timestamps corresponding to the user behavior attribute data are processed, the sine-cosine time features with a period of day, week, and month are extracted, the periodic law of user behavior at different time granularities is captured, the multi-scale time features are determined, and the multi-scale time features are spliced with the behavior attribute features to determine the spatiotemporal context representation of the user behavior;
[0026] The gated recurrent unit network is used to model the user behavior sequence. The newly received user behavior data is combined with the spatiotemporal context representation of the user behavior, and the encoder in the gated recurrent unit network is used to extract and compress the features to obtain the behavior hidden state representation. The behavior hidden state representation is gated and fused with the original user multi-dimensional feature representation, and the user multi-dimensional feature representation is dynamically updated.
[0027] The user portrait dimension weight vector is weightedly combined with the dynamically updated user multi-dimensional feature representation to generate a dynamically adaptive user portrait vector, thereby obtaining a dynamically adaptive user portrait.
[0028] In an optional embodiment,
[0029] Perform multi-level semantic analysis on the heterogeneous content in the preset safety education material library to generate initial multi-granular content tags including:
[0030] The heterogeneous content includes text content, image content and video content;
[0031] Based on the text content, generate a multi-granularity text content label; based on the image content, generate a multi-granularity image content label; based on the video content, generate a multi-granularity video content label;
[0032] Mapping the multi-granularity text content labels, the multi-granularity image content labels, and the multi-granularity video content labels to a unified semantic space for representation alignment, and constructing a text-image-video content label tripartite graph by calculating the TF-IDF weights of all content labels;
[0033] By iteratively updating the label information of nodes in the content label tripartite graph and utilizing the link relationship between nodes, the label information is smoothed. Combined with the label propagation process, content label fusion is achieved to generate initial multi-granular content labels.
[0034] In an optional embodiment,
[0035] Based on the text content, generating a multi-granularity text content label includes:
[0036] Segment the text content, construct the observation sequence through the hidden Markov model, use the Viterbi algorithm to solve the hidden state sequence, and modify the segmentation result in combination with the predefined text dictionary;
[0037] The word segmentation results are input into the conditional random field model to extract the part-of-speech and named entity features. The marginal probability is calculated through the forward-backward algorithm to solve the optimal tagging sequence and obtain the part-of-speech tagging and named entity recognition results.
[0038] The word segmentation results are mapped into word segmentation vectors through word embedding, and the context information is learned using a bidirectional long short-term memory network. Combined with the dependency constraints modeled by conditional random fields, the dependency syntactic tree is decoded.
[0039] The word segmentation results and the corresponding part-of-speech tagging and named entity recognition results are input into the latent Dirichlet allocation model. Through Gibbs sampling, the parameters of the topic-word distribution and document-topic distribution are gradually updated to extract the text topic labels.
[0040] Based on the word segmentation results and the dependency syntax tree, the importance scores of candidate keywords are calculated through a text sorting algorithm, the centrality of candidate keywords is calculated and sorted iteratively, and the words with the largest centrality of candidate keywords are selected according to a preset number to determine the keywords;
[0041] Fuse text topic tags and keywords to generate multi-granularity text content tags;
[0042] In an optional embodiment,
[0043] Based on the image content, generating a multi-granularity image content label includes:
[0044] Using the pre-trained residual network model, the image content is extracted through layer-by-layer convolution and pooling operations to obtain multi-scale image features;
[0045] Based on multi-scale image features, the YOLO object detection model is used, combined with the multi-scale feature fusion method to predict the bounding boxes and category labels of objects of different sizes. Non-maximum suppression is used to remove redundant detection results to obtain the object location category label.
[0046] The scene convolutional neural network pre-trained on the Places365 dataset is used to extract scene features based on multi-scale image features, and the scene features are classified in combination with the fully connected layer to obtain scene category labels;
[0047] The masked region image neural network model is used to perform pixel-level semantic segmentation based on multi-scale image features to obtain region content labels.
[0048] Fusion of the object position category label, the scene category label and the region content label to generate a multi-granularity image content label;
[0049] In an optional embodiment,
[0050] Based on the video content, generating multi-granularity video content tags includes:
[0051] The video frames corresponding to the video content are clustered using spectral clustering, a similarity graph is constructed by calculating the similarity matrix between the video frames, the similarity graph is spectrally decomposed to solve the feature vector, and the feature vector is clustered in combination with the K-Means algorithm to obtain the clustering result of the video frame, and the video frame closest to the cluster center is selected as the key frame in each cluster; the saliency detection algorithm and the inter-frame difference algorithm are used to calculate the saliency score by determining the color contrast and motion saliency of the video frame and the histogram difference between adjacent video frames, and according to the preset key frame number threshold, the video frame with the largest saliency score is selected as the supplementary key frame; based on the key frame and the supplementary key frame, the visual semantic features are extracted;
[0052] The optical flow method is used to extract the motion features of the video. The motion vectors of pixels between adjacent video frames are calculated to obtain the optical flow field of the video clip. The optical flow field is quantized and encoded to form a motion feature descriptor to determine the segment-level motion features.
[0053] A 3D convolutional neural network is used to perform convolution operations on the spatiotemporal dimensions of video clips through a 3D convolution kernel to capture the temporal information of the video. Combined with the parameters of the 3D convolutional neural network, the semantic representation of the video clips is learned and the spatiotemporal semantic features are extracted.
[0054] The audio signal corresponding to the video content is transformed from the time domain to the frequency domain by Fourier transform, segmented by Mel filter bank processing, and the cepstral coefficients are extracted by discrete cosine transform to determine the audio level features;
[0055] The visual semantic features, the segment-level motion features, the spatiotemporal semantic features, and the audio-level features are fused to generate a multi-granularity video content label;
[0056] In an optional embodiment,
[0057] By combining ontology construction technology with the pre-acquired domain expert knowledge base, the initial multi-granular content labels are optimized and expanded to obtain comprehensive multi-granular content labels covering explicit topic labels and implicit concept labels. By incorporating a dynamic embedding representation learning method with a time decay factor, the temporal semantic evolution associations between the comprehensive multi-granular content labels are mined to construct a security knowledge graph, including:
[0058] The pre-acquired domain expert knowledge base is structured through ontology construction technology to construct a security domain ontology model that includes ontology concept classes and hierarchical relationships, ontology concept class attributes and value constraints, semantic associations between ontology concept classes, and ontology axioms based on domain knowledge.
[0059] The semantic mapping between the initial multi-granular content labels and the ontology concept classes in the security domain ontology model is achieved through string matching, stem extraction and word sense disambiguation. Based on the ontology concept classes and hierarchical relationships, the ontology classification relationships are determined. Based on the ontology classification relationships, the hierarchical relationships are traced upward to obtain the label generalization extension. Based on the ontology concept class attributes and value constraints, the ontology attribute relationships are determined. The concept attribute features are mined using the ontology attribute relationships to obtain label refinement extensions. Based on the semantic association relationships between ontology concept classes, label association extensions are obtained. Finally, a comprehensive multi-granular content label covering explicit subject labels and implicit concept labels is obtained.
[0060] Based on comprehensive multi-granular content tags, the time decay factor combining exponential decay and power law decay is integrated to construct a tag association graph. Through time-aware random walk, a time-series node sequence is generated. The time decay factor is introduced to adjust the contribution of node pairs at different time points. The dynamic semantic association between nodes is determined by dynamically updating the embedding vector of the node.
[0061] The expanded comprehensive multi-granular content tags are transformed into nodes that constitute the knowledge graph, and the security knowledge graph is constructed by combining the edges connecting the nodes based on dynamic semantic associations.
[0062] In an optional embodiment,
[0063] Through the hybrid recommendation algorithm, the cross-correlation matrix of the dynamic adaptive user portrait and the security knowledge graph is comprehensively modeled, the recommendation strategy weights of short-term interest mining and long-term preference grasp are adaptively optimized, and a recommended list of security education content is generated, including:
[0064] The similarity calculation method is used to calculate the feature vectors in the dynamic adaptive user portrait and the node embedding vectors in the security knowledge graph. Combined with the user's various interactive behavior data on security knowledge content, the collaborative filtering algorithm is used to quantify the degree of user-content correlation from the behavioral level, dynamically adjust the weights of similarity and interaction intensity, and construct a user-content cross-correlation matrix.
[0065] Based on the time decay function, the behavior weight is adjusted according to the distance in time, and the content topics and behavior patterns of users' high-frequency interactions are extracted through the deep learning network to determine the user's short-term interests; collaborative filtering and matrix decomposition algorithms are used to explore the user's continuous preferences for different security topics, different knowledge difficulties and different content forms, and determine the user's long-term preferences; through the reinforcement learning framework, combined with the exploration and utilization equilibrium mechanism, the recommendation strategy weight is adaptively optimized to obtain the optimized recommendation strategy weight;
[0066] Combining dynamically adaptive user portraits, security knowledge graphs, user-content cross-correlation matrices and optimized recommendation strategy weights, the matching degree between candidate content and users is calculated in multiple dimensions, and the semantic similarity based on content, behavioral similarity based on collaborative filtering and structural correlation based on knowledge are integrated to generate a recommended list of security education content.
[0067] According to a second aspect of the embodiments of the present invention,
[0068] Provide a safety education recommendation system based on demand profiles and content tags, including:
[0069] The first unit is used to obtain user behavior attribute data, dynamically model user multi-dimensional features through an adaptive incremental learning algorithm, generate a user multi-dimensional portrait, and perform real-time decay updates on the weights corresponding to each dimension in the user multi-dimensional portrait through a time decay model based on a knowledge forgetting curve to generate a dynamic adaptive user portrait, wherein the user behavior attribute data includes demographic characteristics, historical browsing behavior, online interaction data, attitude tendency survey results, and knowledge and skills assessment evaluation;
[0070] The second unit is used to perform multi-level semantic analysis on the heterogeneous content in the preset safety education material library, generate initial multi-granular content labels, optimize and expand the initial multi-granular content labels through ontology construction technology combined with the pre-acquired domain expert knowledge base, and obtain comprehensive multi-granular content labels covering explicit topic labels and implicit concept labels. Through the dynamic embedding representation learning method that incorporates the time decay factor, the temporal semantic evolution association between the comprehensive multi-granular content labels is mined to construct a safety knowledge graph;
[0071] The third unit is used to comprehensively model the cross-correlation matrix of the dynamic adaptive user portrait and the security knowledge graph through a hybrid recommendation algorithm, adaptively optimize the recommendation strategy weights of short-term interest mining and long-term preference grasp, and generate a recommended list of security education content.
[0072] In an embodiment of the present invention, through an adaptive incremental learning algorithm, the user's multi-dimensional feature model can be dynamically updated to ensure that the user portrait always reflects the user's latest behavior and interest changes; based on the time decay model of the knowledge forgetting curve, the weights of each dimension in the user portrait are adjusted in real time, so that the user portrait can effectively capture and reflect the timeliness of the user's interests; through multi-level semantic analysis and ontology construction technology, the initial content labels are optimized and expanded to comprehensive multi-granular content labels covering explicit topics and implicit concepts, ensuring the comprehensiveness and accuracy of the labels; the dynamic embedding representation learning method that incorporates the time decay factor can effectively mine the temporal semantic evolution associations between content labels and capture the potential relationship between content changes over time; through a hybrid recommendation algorithm, the association between the dynamically adapted user portrait and the security knowledge graph is comprehensively modeled to generate a more accurate security education content recommendation list; the recommendation strategy of short-term interests and long-term preferences is adaptively optimized to ensure that the recommended content is more in line with the user's current interests and long-term preferences, thereby improving the personalization of the recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 A flowchart of a safety education recommendation method based on demand profiles and content tags according to an embodiment of the present invention;
[0074] Figure 2 The present invention is a schematic diagram of the structure of a safety education recommendation system based on demand portraits and content tags according to an embodiment of the present invention. DETAILED DESCRIPTION
[0075] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0076] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0077] Figure 1 FIG. 1 is a flow chart of a safety education recommendation method based on demand profile and content tags according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0078] S101. Obtain user behavior attribute data, dynamically model user multi-dimensional features through an adaptive incremental learning algorithm, generate a user multi-dimensional portrait, and perform real-time decay updates on the weights corresponding to each dimension in the user multi-dimensional portrait through a time decay model based on a knowledge forgetting curve to generate a dynamically adaptive user portrait;
[0079] In this embodiment, through the adaptive incremental learning algorithm, the user's multi-dimensional feature model can be dynamically updated to ensure that the user portrait always reflects the user's latest behavior and interest changes; based on the time decay model of the knowledge forgetting curve, the weights of each dimension in the user portrait are adjusted in real time, so that the user portrait can effectively capture and reflect the timeliness of the user's interests; the generated dynamically adaptive user portrait can provide the personalized recommendation system with more accurate and real-time user characteristics, improve the relevance of recommendations and user satisfaction; the system can continuously adapt to changes in user behavior and avoid outdated portraits, thereby maintaining a keen insight into user needs.
[0080] In an optional embodiment, obtaining user behavior attribute data, dynamically modeling user multi-dimensional features through an adaptive incremental learning algorithm, and generating a user multi-dimensional portrait includes:
[0081] Obtain user behavior attribute data including demographic attributes, browsing history, interaction text, attitude tendencies, and knowledge and skills;
[0082] Preprocessing the user behavior attribute data, for structured data, using attribute values as features, and for unstructured data, using word embedding convolutional neural networks to extract semantic features, to obtain original features of each dimension;
[0083] The original features of each dimension are input into the shared layer, which is built based on the attention mechanism enhanced capsule network. The original features are mapped to the high-dimensional semantic space through the dynamic routing algorithm to obtain the shared intermediate feature representation between dimensions.
[0084] After the shared layer, a dimension-specific layer is set up. According to each dimension, a multi-head attention mechanism and a gated recurrent unit network are independently set up to map the shared intermediate feature representation into the dimension feature representation.
[0085] Adopt a multi-dimensional task joint learning strategy with adaptive weight adjustment, combine the difficulty and convergence speed of dimensional tasks, dynamically adjust the weight of the loss function of each dimensional task, introduce adversarial regularization constraints between dimensional tasks, optimize the joint loss function of all dimensional tasks, and update the parameters of shared layers and dimensional task-specific layers through adaptive gradient algorithms;
[0086] When new user behavior data arrives, the knowledge distillation model is used to compress the current model, predict the new data and calculate the prediction loss, add the new data to the training set, and incrementally update the current model by combining ensemble learning and adaptive learning rate strategy. The small batch SVRG algorithm is used to optimize the parameters, control the update amplitude, and take into account the fitting ability of new and old data.
[0087] By designing a meta-learning controller with an LSTM structure, the proximal strategy optimization algorithm and the Bayesian optimization algorithm are used to adaptively adjust the model hyperparameter combination; based on dimensional feature representation, a combination of a variational autoencoder network and a generative adversarial network is used to generate a dynamically updated multi-dimensional user portrait.
[0088] Obtain user behavior attribute data including demographic attributes, browsing history, interactive text, attitudes, and knowledge and skills. For structured data, directly use the attribute value as the original feature. For unstructured data such as text, first perform preprocessing such as word segmentation and stop word removal, and then use word embedding technology, such as Glove, to map each word into a low-dimensional dense vector, and then use TextCNN to perform convolution and pooling operations on the word vector sequence to extract the semantic features of the text and obtain the original feature representation of each dimension.
[0089] The original features of each dimension are input into a shared capsule network. The capsule network first uses a fully connected layer to map the original features to a high-dimensional space, and then adaptively aggregates information through a dynamic routing algorithm to obtain high-level abstract capsules. Each capsule represents the common features between certain dimensions. The dynamic routing algorithm can update the coupling coefficient in an iterative manner so that highly correlated dimensions can be selectively fused. The attention mechanism is used to enhance the interaction between capsules and adaptively adjust the importance of different capsules. Finally, this stage can learn the shared intermediate feature representations between different dimensions.
[0090] After the shared layer, an independent task-specific network is set up for each dimension. For each dimension, a multi-head attention mechanism and a gated recurrent unit (GRU) network are used to further extract and fuse features. The multi-head attention mechanism captures different aspects of the shared features in this dimension in parallel through multiple attention heads, enhancing the diversity and robustness of feature representation. The GRU network can model temporal dependencies and mine the evolutionary pattern of user behavior in this dimension. The last layer of the dedicated network maps the dimensional features to a fixed-length vector representation.
[0091] A multi-task learning framework is used to jointly optimize modeling tasks of all dimensions. Each task has its own loss function, such as cross entropy loss for classification tasks and mean square error loss for regression tasks. By designing an adaptive weight adjustment strategy, the weights of the loss functions of each task are dynamically adjusted according to the difficulty and convergence speed of different tasks to balance the contribution of different tasks to model learning. In order to further improve the consistency between tasks, an adversarial regularization term is introduced in the joint objective function to encourage the feature distributions learned by different tasks to be as similar as possible. The model backpropagates the joint loss function through an adaptive gradient algorithm and updates the parameters of the shared layer and the task-specific layer at the same time.
[0092] When new user behavior data arrives, in order to avoid the high cost of retraining the model, an incremental learning strategy is used to update the existing model. Specifically, the knowledge distillation technology is used to transfer the knowledge of the current model to a smaller student model, and the student model is used to predict and calculate the loss on the new data. Then the new data is added to the training set, and the Boosting idea and adaptive learning rate method in ensemble learning are combined to incrementally learn the pattern of the new data based on the original model. The SVRG optimization algorithm is used for model fine-tuning. By introducing the variance reduction technology of the historical gradient, the model update amplitude is controlled while ensuring the convergence speed, so that it has better performance on the new data, while trying to retain the fitting ability of the old data, to achieve a smooth transition between new and old knowledge.
[0093] In order to further improve the performance of the model, an automated hyperparameter optimization mechanism is introduced. A meta-learning controller based on LSTM is designed to predict the optimal hyperparameter combination by learning the loss functions of different tasks. The controller uses a search algorithm that combines proximal policy optimization and Bayesian optimization to efficiently explore the optimal configuration in the parameter space. Proximal policy optimization uses the reward signal in reinforcement learning to guide the search direction of the controller, while Bayesian optimization uses Gaussian processes to model the shape of the objective function, intelligently selects the next evaluation point, and balances exploration and utilization.
[0094] Based on the learned feature representations of each dimension, a deep generative model is used to construct a multi-dimensional portrait of the user. First, a variational autoencoder (VAE) is used to reconstruct the features of each dimension and estimate its posterior distribution. Then the hidden variables of the VAE are used as conditions and input into the generative adversarial network (GAN). GAN can generate synthetic user vectors that are highly similar to the real user distribution through game learning between the generator and the discriminator. Gradient penalties are added to stabilize the training process. The generated user vectors are spliced with the original user vectors to form a richer and more diverse user portrait. The entire process is end-to-end, with VAE and GAN jointly optimized and mutually reinforcing, dynamically updating the multi-dimensional feature representation of the user and capturing the evolution of user interests.
[0095] In this embodiment, a detailed and rich user portrait is generated through multi-dimensional feature extraction and fusion technology to more comprehensively reflect the user's diverse behaviors and interests; incremental learning and automatic parameter adjustment mechanisms are used to reduce the overhead of model retraining, ensuring that the model remains efficient and accurate after receiving new data; using shared features, attention mechanisms and multi-task learning frameworks, the model can capture the correlation between multi-dimensional features and improve the accuracy of prediction and recommendation; the evolution of user interests is captured through a deep generative model to ensure that the user portrait can reflect the user's latest preferences and behavioral characteristics in real time; combined with VAE and improved GAN structures, the generated user portrait is not only diverse, but also has higher stability and authenticity, thereby improving the robustness of the overall system.
[0096] In an optional embodiment, the weights corresponding to each dimension in the multi-dimensional user portrait are updated in real time by using a time decay model based on a knowledge forgetting curve, and the generation of a dynamic adaptive user portrait includes:
[0097] The first time decay curve function is used to determine the short-term memory forgetting trajectory of the user's behavioral attributes. The second time decay curve function is used to determine the long-term memory retention trajectory of the user's core behavioral attributes. The weight coefficients of the two curves are combined to determine the differences in memory retention under different time scales, and a hyperbolic forgetting model is constructed.
[0098] Introduce the attention mechanism to dynamically adjust the importance of each dimension of the user portrait, use the user behavior sequence as the query vector, and the embedding vector of each dimension of the user portrait as the key value vector. Calculate the attention weight of each dimension through the attention function, and multiply the attention weight with the time decay curve function value in the hyperbolic forgetting model to obtain the dimension weight update factor;
[0099] For each piece of behavioral attribute data of each user, the time interval with the current time is calculated according to the data timestamp, and the weight of each dimension in the multi-dimensional portrait of the user is attenuated and updated by using the time interval, the hyperbolic forgetting model and the dimension weight update factor to generate a dynamically changing user portrait dimension weight vector;
[0100] Based on the multi-scale time coding method, the timestamps corresponding to the user behavior attribute data are processed, the sine-cosine time features with a period of day, week, and month are extracted, the periodic law of user behavior at different time granularities is captured, the multi-scale time features are determined, and the multi-scale time features are spliced with the behavior attribute features to determine the spatiotemporal context representation of the user behavior;
[0101] The gated recurrent unit network is used to model the user behavior sequence. The newly received user behavior data is combined with the spatiotemporal context representation of the user behavior, and the encoder in the gated recurrent unit network is used to extract and compress the features to obtain the behavior hidden state representation. The behavior hidden state representation is gated and fused with the original user multi-dimensional feature representation, and the user multi-dimensional feature representation is dynamically updated.
[0102] The user portrait dimension weight vector is weightedly combined with the dynamically updated user multi-dimensional feature representation to generate a dynamically adaptive user portrait vector, thereby obtaining a dynamically adaptive user portrait.
[0103] By analyzing user behavior data, two time decay curve functions are constructed. The first curve function is used to characterize the short-term memory forgetting trajectory of users' behavior attributes. It has a faster decay rate, reflecting that users have a short memory retention time for most behaviors. The second curve function is used to characterize the long-term memory retention trajectory of users' core behavior attributes. It has a slower decay rate, reflecting that users can retain memories of a few important behaviors for a long time. By setting the weight coefficients of the two curves, the differences in memory retention under different time scales can be flexibly adjusted. The resulting hyperbolic forgetting model can comprehensively consider users' short-term and long-term behavior patterns.
[0104] On the basis of the hyperbolic forgetting model, the attention mechanism is introduced to dynamically adjust the importance of each dimension of the user portrait. The user's behavior sequence is used as the query vector, and the user portrait embedding vector of the corresponding dimension is used as the key value vector. The correlation between the user behavior and each dimension is calculated through the attention function (such as dot product, splicing, etc.), and the attention weight reflecting the importance of each dimension is obtained. Then the attention weight is multiplied by the time decay curve function value in the hyperbolic forgetting model to obtain the dimension weight update factor that comprehensively considers the behavior correlation and time factors. This method can dynamically adjust the weights of different dimensions according to the user's real-time behavior and improve the adaptability of the user portrait.
[0105] For each behavioral attribute data of the user, first calculate the time interval between the data and the current time based on the timestamp of the data. Then use the time interval as input and substitute it into the two time decay curve functions in the hyperbolic forgetting model to obtain the corresponding forgetting degree value. Then multiply the forgetting degree value by the dimension weight update factor obtained in the previous step to obtain the decay update value of the behavioral attribute data for the weight of each dimension of the user portrait. By traversing all the historical behavioral data of the user, the weights of each dimension of the user portrait are cumulatively updated, and finally a dynamically changing user portrait dimension weight vector is generated. This process combines the time distance of the behavior and the correlation between the behavior and the dimension, and can characterize the dynamic evolution of user interests.
[0106] In order to capture the periodic laws of user behavior at different time granularities, the timestamps corresponding to the user behavior attribute data are encoded at multiple scales. Specifically, with days, weeks, and months as periods, sine and cosine transforms are performed on the timestamps to obtain time features that reflect the periodicity at different time granularities. For example, for features with a daily period, the timestamp is mapped to a relative position in a day, and then the sine and cosine values corresponding to the position are calculated. Similarly, features with weekly and monthly periods can capture the periodic patterns of user behavior within a week and a month, respectively. Finally, the time features of different granularities are spliced into the user behavior attribute features to obtain a representation vector that comprehensively characterizes the spatiotemporal context of user behavior.
[0107] The gated recurrent unit (GRU) network is used to model user behavior sequences and dynamically update the multi-dimensional feature representation of users. When new user behavior data arrives, it is concatenated with the corresponding spatiotemporal context representation of the user behavior to form a complete behavior representation. Then, the behavior representation is input into the encoder of the GRU network, and the high-level semantic features of the behavior are extracted through the gating mechanism and recurrent connection, and compressed into a fixed-length behavior hidden state representation. Next, the gating mechanism is used to fuse the behavior hidden state representation with the original user multi-dimensional feature representation to update the new user feature representation. The gating mechanism can adaptively control the flow of new and old information, integrating new behavior information while retaining the key features of historical behavior.
[0108] The updated multi-dimensional feature representation of the user is weighted and combined with the previously obtained user portrait dimension weight vector to generate a dynamically adaptive user portrait vector. Specifically, the feature representation of each dimension is multiplied by the corresponding dimension weight, and then the weighted features of all dimensions are summed to obtain the final user portrait vector. Since the dimension weight vector is dynamically adjusted according to the time distance and relevance of user behavior, the generated user portrait can adapt to the dynamic changes of user interests and reflect the user's real-time preferences in a timely manner. At the same time, through the weighted combination of multi-dimensional features, the influence of important dimensions can be highlighted and the expressiveness of the user portrait can be improved. The final dynamically adaptive user portrait can accurately portray the dynamic characteristics of the user and provide support for applications such as personalized recommendations.
[0109] In this embodiment, through the hyperbolic forgetting model and attention mechanism, the dimensional weights of the user portrait can be dynamically adjusted to accurately reflect the user's short-term and long-term behavioral changes and timely adapt to the user's real-time preferences; the weighted combination of multi-dimensional features highlights the influence of important dimensions, so that the generated user portrait can more accurately express the user's core interests and improve the accuracy of applications such as personalized recommendations; the model combines the temporal distance of user behavior and the correlation between behavior and dimensions, and the generated user portrait more comprehensively reflects the spatiotemporal context of user behavior and improves the ability to capture user behavior patterns; the generated dynamically adaptive user portrait provides a more accurate and timely user feature representation for the personalized recommendation system, which helps to improve the relevance and satisfaction of recommendations.
[0110] S102. Perform multi-level semantic analysis on the heterogeneous content in the preset safety education material library to generate initial multi-granular content labels. Optimize and expand the initial multi-granular content labels by combining ontology construction technology with the pre-acquired domain expert knowledge base to obtain comprehensive multi-granular content labels covering explicit topic labels and implicit concept labels. By incorporating a dynamic embedding representation learning method with a time decay factor, explore the temporal semantic evolution associations between the comprehensive multi-granular content labels to construct a safety knowledge graph;
[0111] In this embodiment, through multi-level semantic analysis and ontology construction technology, the initial content labels are optimized and expanded into comprehensive multi-granular content labels covering explicit topics and implicit concepts, ensuring the comprehensiveness and accuracy of the labels; the dynamic embedding representation learning method that incorporates the time decay factor can effectively mine the temporal semantic evolution associations between content labels and capture the potential relationships of content changing over time; the final generated security knowledge graph combines rich labels and temporal semantic associations, providing strong support for security education and knowledge management, and improving the practicality and accuracy of the knowledge graph.
[0112] In an optional embodiment, performing multi-level semantic analysis on heterogeneous content in a preset safety education material library to generate initial multi-granular content tags includes:
[0113] The heterogeneous content includes text content, image content and video content;
[0114] Based on the text content, generate a multi-granularity text content label; based on the image content, generate a multi-granularity image content label; based on the video content, generate a multi-granularity video content label;
[0115] Mapping the multi-granularity text content labels, the multi-granularity image content labels, and the multi-granularity video content labels to a unified semantic space for representation alignment, and constructing a text-image-video content label tripartite graph by calculating the TF-IDF weights of all content labels;
[0116] By iteratively updating the label information of nodes in the content label tripartite graph and utilizing the link relationship between nodes, the label information is smoothed. Combined with the label propagation process, content label fusion is achieved to generate initial multi-granular content labels.
[0117] Preprocess the text content, such as word segmentation, stop word removal, part-of-speech tagging, etc. Then use a variety of text representation methods to extract text features from different granularities. At the word level, keywords can be extracted as labels; at the sentence level, topic sentences can be extracted as labels; at the paragraph level, central sentences can be extracted as labels; at the document level, article keywords can be extracted as labels. By setting different thresholds, the quantity and quality of labels at each level can be controlled. Finally, a set of text content labels covering different semantic granularities is obtained.
[0118] For image content, we first use a pre-trained convolutional neural network to extract features from the image to obtain a high-level semantic representation of the image. We use target detection algorithms on different convolutional layers, such as YOLO, to identify objects, scenes, people, etc. in the image and generate corresponding detection labels. We use an image segmentation algorithm to perform pixel-level semantic segmentation on the image and identify the category labels of different regions in the image. Finally, we combine the label information at the image level, region level, and pixel level to build a multi-granular image content label system.
[0119] For video content, the video is first divided into multiple segments, illustratively, at fixed time intervals or key frames. For each video segment, the key frames are extracted, and the multi-granular image labels of the segment are obtained with the help of the image content label generation method. Then, the timing information of the video is used to analyze the correlation and continuity of adjacent segment labels, and extract labels at the video segment level. At a higher semantic level, semantically similar video segments can be combined into scenes through clustering algorithms, and scene-level labels can be further extracted. Finally, multi-level content labels covering different semantic granularities of the video are obtained.
[0120] Map the multi-granular content labels of text, images, and videos to a unified semantic space for representation learning. Topic models and word embedding methods can be used to map labels of different modalities into low-dimensional dense vectors. During the mapping process, labels of different modalities are aligned through information such as label co-occurrence and context similarity. Calculate the TF-IDF weights of all content labels. The larger the weight, the stronger the label's ability to represent the content. Based on the label vector representation and TF-IDF weight, construct a text-image-video content label tripartite graph. The nodes in the tripartite graph represent content labels of different modalities, and the edges between the nodes represent the strength of the semantic association between the labels.
[0121] The label propagation algorithm is used to iteratively update the content label tripartite graph to achieve the fusion of content labels of different modalities. Initially, the label information of each node is the corresponding content label vector. During the iteration process, each node receives label information from its neighboring nodes and updates it in combination with its own label information. The depth and strength of label propagation are controlled by setting the number of iterations and the fusion coefficient. At the same time, the link relationship between nodes is used to smooth the label information to reduce the impact of label noise. After multiple rounds of iterations, the content labels of different modalities are gradually merged to obtain a unified semantic representation. Finally, the initial multi-granular content label is generated by sorting and filtering the fused label vector.
[0122] In this embodiment, by generating multi-granularity labels for text, image, and video content, it is possible to comprehensively capture information of different modalities and semantic levels, and improve the accuracy and diversity of content representation; labels of different modalities are mapped to a unified semantic space, and fused through a three-part graph and label propagation algorithm to solve the semantic alignment problem of cross-modal content and enhance the semantic consistency of labels; through iterative updates and label propagation mechanisms, label information can be effectively smoothed and optimized, the impact of noise can be reduced, and ultimately high-quality initial multi-granularity content labels can be generated to ensure the applicability of labels in different content and modalities.
[0123] In an optional embodiment, generating a multi-granularity text content label based on the text content includes:
[0124] Segment the text content, construct the observation sequence through the hidden Markov model, use the Viterbi algorithm to solve the hidden state sequence, and modify the segmentation result in combination with the predefined text dictionary;
[0125] The word segmentation results are input into the conditional random field model to extract the part-of-speech and named entity features. The marginal probability is calculated through the forward-backward algorithm to solve the optimal tagging sequence and obtain the part-of-speech tagging and named entity recognition results.
[0126] The word segmentation results are mapped into word segmentation vectors through word embedding, and the context information is learned using a bidirectional long short-term memory network. Combined with the dependency constraints modeled by conditional random fields, the dependency syntactic tree is decoded.
[0127] The word segmentation results and the corresponding part-of-speech tagging and named entity recognition results are input into the latent Dirichlet allocation model. Through Gibbs sampling, the parameters of the topic-word distribution and document-topic distribution are gradually updated to extract the text topic labels.
[0128] Based on the word segmentation results and the dependency syntax tree, the importance scores of candidate keywords are calculated through a text sorting algorithm, the centrality of candidate keywords is calculated and sorted iteratively, and the words with the largest centrality of candidate keywords are selected according to a preset number to determine the keywords;
[0129] Fuse text topic tags and keywords to generate multi-granularity text content tags;
[0130] First, the text content is preprocessed, such as removing punctuation marks, special characters, etc. Then the text content is converted into an observation sequence, where each observation value is a character. The relationship between the observation sequence and the hidden state sequence is described by the hidden Markov model, where the hidden state corresponds to the word position of each character. The Viterbi algorithm is used to find the most likely hidden state sequence under the condition of a given observation sequence, that is, to obtain the optimal word segmentation result. Finally, combined with the predefined text dictionary, the word segmentation result is corrected, such as merging named entities, correcting incorrect word segmentations, etc., to obtain the final word segmentation result.
[0131] The word segmentation results are converted into the input sequence of the conditional random field, with each word corresponding to a node. Then, part-of-speech and named entity features are extracted, such as the word itself, the previous and next words, and the character composition of the word, as the observation features of the conditional random field. The transition features and state features between nodes are defined by feature templates. The feature weights of the conditional random field are learned using the training corpus, and the model parameters are optimized by methods such as maximum likelihood estimation. In the inference stage, the forward-backward algorithm is used to calculate the marginal probability, and the Viterbi algorithm is used to solve the optimal tagging sequence to obtain the part-of-speech tagging and named entity recognition results for each word.
[0132] The word segmentation results are input into a pre-trained word embedding model, preferably Word2Vec, to map each word into a fixed-dimensional word segmentation vector. Then, a bidirectional long short-term memory network is used to learn the contextual information of the word segmentation sequence, while capturing the forward and backward dependencies of the words. In the output layer of the bidirectional long short-term memory network, a conditional random field is used to model the dependency constraints and learn the dependency transition probabilities between different words. The optimal dependency annotation sequence is obtained through conditional random field decoding, and a dependency syntactic tree is constructed. The dependency syntactic tree represents the dependency relationships between words in a sentence, such as subject-predicate relationships, verb-object relationships, etc.
[0133] The word segmentation results, part-of-speech tagging and named entity recognition results are used as input to construct the word-document co-occurrence matrix of the text corpus. Then the latent Dirichlet allocation model is used to perform topic modeling on the text corpus. Assuming that each document consists of multiple topics, and each topic consists of multiple words, the topic distribution is inferred by the co-occurrence relationship of words in the document. The Gibbs sampling algorithm is used for posterior inference, and the parameters of the topic-word distribution and document-topic distribution are iteratively updated to gradually converge to the optimal topic model. Finally, according to the word distribution of each topic, the corresponding topic label is extracted.
[0134] Based on the word segmentation results and the dependency syntax tree, a candidate keyword set is constructed. The importance score of each candidate keyword is calculated through a text sorting algorithm, such as TextRank. The similarity between candidate keywords is iterated to obtain the centrality of the candidate keywords. The candidate keywords are sorted according to the centrality, and the words with the largest centrality are selected as the final keywords according to the preset number of keywords.
[0135] The extracted text topic tags and keywords are fused to generate multi-granular text content tags. Text topic tags reflect the overall theme and semantic category of the text, while keywords provide a more specific and fine-grained content description. By fusing the two types of tags, text content tags covering different semantic granularities can be obtained. For example, for a sports news article, the text topic tag may be "sports", while keywords may include "football", "World Cup", etc. The fused multi-granular content tags are "sports-football", "sports-World Cup", etc., providing a more comprehensive and accurate content description.
[0136] In this embodiment, the semantic understanding accuracy of the text content is improved and the accuracy of the word segmentation and tagging results is ensured by using hidden Markov model word segmentation, conditional random field part-of-speech tagging and named entity recognition; the dependency relationship between words in the text is captured by using bidirectional long short-term memory network and dependency syntax analysis, and a detailed dependency syntax tree is constructed to reveal the sentence structure and semantic relationship; based on the latent Dirichlet allocation model and the dependency syntax tree, combined with the text sorting algorithm, the theme and keywords of the text are accurately extracted to fully reflect the core content and important information of the text; by fusing topic tags and keywords, text content tags covering different semantic granularities are generated to provide a more comprehensive and detailed content description and enhance the effects of text classification, retrieval and recommendation.
[0137] In an optional embodiment, generating a multi-granularity image content label based on the image content includes:
[0138] Using the pre-trained residual network model, the image content is extracted through layer-by-layer convolution and pooling operations to obtain multi-scale image features;
[0139] Based on multi-scale image features, the YOLO object detection model is used, combined with the multi-scale feature fusion method to predict the bounding boxes and category labels of objects of different sizes. Non-maximum suppression is used to remove redundant detection results to obtain the object location category label.
[0140] The scene convolutional neural network pre-trained on the Places365 dataset is used to extract scene features based on multi-scale image features, and the scene features are classified in combination with the fully connected layer to obtain scene category labels;
[0141] The masked region image neural network model is used to perform pixel-level semantic segmentation based on multi-scale image features to obtain region content labels.
[0142] Fusion of the object position category label, the scene category label and the region content label to generate a multi-granularity image content label;
[0143] The input image is scaled to a fixed size, and the image features are extracted using a pre-trained residual network model. By introducing residual connections, the residual network can train deeper convolutional neural networks and extract richer and more abstract image features. Specifically, the image passes through multiple convolutional layers and pooling layers in sequence. Each convolutional layer includes multiple convolution kernels, and local features are extracted through convolution operations. The pooling layer reduces the size of the feature map through downsampling operations and increases the receptive coverage area of neurons in the neural network. At different depths of the network, image features of different scales and abstraction levels can be obtained, forming multi-scale image features.
[0144] After obtaining multi-scale image features, the YOLO model is used for object detection. The image is divided into grids of fixed size, and each grid is responsible for predicting the objects in its area. For each grid, multiple bounding boxes and the probability of the object category to which each bounding box belongs are predicted. The feature maps of different scales are fused by the multi-scale feature fusion method to improve the detection accuracy of objects of different sizes. The non-maximum suppression algorithm is used to remove redundant and overlapping detection results to obtain the final object position and category label.
[0145] Use the scene convolutional neural network pre-trained on the Places365 dataset to perform scene recognition on images. Places365 is a large-scale scene image dataset containing 365 scene categories. The pre-trained scene network can effectively capture the scene features of the image. Multi-scale image features are input into the scene network to extract high-level semantic features. Then, the scene features are classified through the fully connected layer to obtain the scene category label to which the image belongs. The scene label provides the overall semantic information of the image.
[0146] The masked region image neural network model is used to perform pixel-level semantic segmentation on the image. Based on object detection, an additional branch is introduced to generate the mask of the object. Multi-scale image features are input, and candidate regions are generated through the region proposal network. Then, each candidate region is operated and mapped to a fixed-size feature map. Furthermore, convolutional and deconvolutional layers are used to perform pixel-level mask prediction on the candidate regions to obtain the accurate segmentation mask of each object instance. By superimposing the mask with the original image, the content labels of different regions in the image are obtained.
[0147] The object position and category labels obtained by object detection, the scene category labels obtained by scene recognition, and the regional content labels obtained by semantic segmentation are fused to generate multi-granular image content labels. The object label provides the location and category information of specific objects in the image, the scene label provides the overall semantic information of the image, and the regional label provides a detailed content description of different regions of the image. By combining these three labels, image content labels covering different semantic granularities can be obtained.
[0148] In this embodiment, image features of different scales and abstract levels are extracted based on the residual network to provide richer and more diverse image representations and improve the accuracy of image analysis; high-precision detection of objects of different sizes is achieved, and redundancy is removed by non-maximum suppression to ensure the reliability of the detection results; a pre-trained scene convolutional neural network is used for scene recognition to capture the overall semantic information of the image and provide important support for the semantic understanding of the image; pixel-level semantic segmentation is performed to accurately identify object areas in the image, provide detailed content labels, enhance the fine-grained description of image understanding, comprehensively describe the image content, and improve the effects of image content retrieval, classification, and recommendation.
[0149] In an optional embodiment, generating a multi-granularity video content tag based on the video content includes:
[0150] The video frames corresponding to the video content are clustered using spectral clustering, a similarity graph is constructed by calculating the similarity matrix between the video frames, the similarity graph is spectrally decomposed to solve the feature vector, and the feature vector is clustered in combination with the K-Means algorithm to obtain the clustering result of the video frame, and the video frame closest to the cluster center is selected as the key frame in each cluster; the saliency detection algorithm and the inter-frame difference algorithm are used to calculate the saliency score by determining the color contrast and motion saliency of the video frame and the histogram difference between adjacent video frames, and according to the preset key frame number threshold, the video frame with the largest saliency score is selected as the supplementary key frame; based on the key frame and the supplementary key frame, the visual semantic features are extracted;
[0151] The optical flow method is used to extract the motion features of the video. The motion vectors of pixels between adjacent video frames are calculated to obtain the optical flow field of the video clip. The optical flow field is quantized and encoded to form a motion feature descriptor to determine the segment-level motion features.
[0152] A 3D convolutional neural network is used to perform convolution operations on the spatiotemporal dimensions of video clips through a 3D convolution kernel to capture the temporal information of the video. Combined with the parameters of the 3D convolutional neural network, the semantic representation of the video clips is learned and the spatiotemporal semantic features are extracted.
[0153] The audio signal corresponding to the video content is transformed from the time domain to the frequency domain by Fourier transform, segmented by Mel filter bank processing, and the cepstral coefficients are extracted by discrete cosine transform to determine the audio level features;
[0154] The visual semantic features, the segment-level motion features, the spatiotemporal semantic features, and the audio-level features are fused to generate a multi-granularity video content label;
[0155] The video content is preprocessed, and then the video frames corresponding to the video content are spectrally clustered. Specifically, the similarity matrix between video frames is calculated and a similarity graph is constructed. The similarity can be calculated by methods such as color histogram and SIFT features. The similarity graph is spectrally decomposed, the feature vector is solved, and the feature representation of each video frame is obtained. The feature vectors are clustered using the K-Means algorithm to divide the video frames into different clusters. In each cluster, the video frame closest to the cluster center is selected as the key frame, and these key frames can represent the main content of different scenes. In order to supplement the key frames, the saliency detection algorithm and the inter-frame difference algorithm are used. By calculating the color contrast and motion saliency of the video frame, as well as the histogram difference between adjacent video frames, the saliency score of each video frame is obtained. According to the preset key frame number threshold, the video frame with the largest saliency score is selected as the supplementary key frame. The key frames and supplementary key frames finally obtained can fully cover the main content of the video.
[0156] Based on the obtained keyframes and supplementary keyframes, visual semantic features are extracted. A pre-trained convolutional neural network can be used to extract features from keyframes. The keyframes are input into the convolutional neural network, and high-level semantic features of the keyframes are extracted through multi-layer convolution and pooling operations. These features represent the visual content and semantic information of the keyframes.
[0157] The optical flow method is used to extract motion features from video clips. Optical flow is an important feature for describing the motion of objects in a video. The optical flow field of the video clip is obtained by calculating the motion vectors of pixels between adjacent video frames. The optical flow field is quantized and encoded, and the continuous motion vectors are discretized into several motion modes to form motion feature descriptors. The motion feature descriptors represent the motion information of the video clip, such as motion direction, speed, etc.
[0158] The three-dimensional convolutional neural network is used to extract the spatiotemporal semantic features of video clips, which can simultaneously process the spatial and temporal dimension information of the video. The three-dimensional convolution kernel is used to perform convolution operations on the spatiotemporal dimension of the video clip to capture the temporal and spatial information of the video. Combined with the network parameters, the semantic representation of the video clip is learned to extract high-level spatiotemporal semantic features.
[0159] The audio signal corresponding to the video content is feature extracted. The audio signal is preprocessed, and then the audio signal is converted from the time domain to the frequency domain through Fourier transform to obtain the spectrum information of the audio. The Mel frequency cepstral coefficient (MFCC) is used to extract the timbre and pitch characteristics of the audio. Specifically, the spectrum is segmented through the Mel filter group to simulate the auditory characteristics of the human ear. After discrete cosine transform, the MFCC feature is obtained to represent the timbre and pitch information of the audio signal. The MFCC feature is one of the important features of audio content analysis.
[0160] The extracted visual semantic features, motion features of video clips, spatiotemporal semantic features of video clips, and audio-level features are fused to generate multi-granular video content labels. Features of different granularities can be fused using methods such as feature splicing and feature weighting. The fused features represent multiple aspects of the video content, including visual information, motion information, spatiotemporal information, and audio information. By classifying or clustering the fused features, multi-granular labels of the video content can be obtained. Multi-granular video content labels provide rich semantic information for tasks such as video understanding, retrieval, and recommendation.
[0161] In this embodiment, through spectral clustering and saliency detection algorithms, key frames that can represent the main content of the video are accurately extracted to ensure that the core scenes of the video content are effectively covered; the different aspects of the video content are fully captured by extracting visual semantic features, motion features, spatiotemporal semantic features and audio features, providing rich feature data for subsequent analysis; through three-dimensional convolutional neural networks and optical flow methods, the spatiotemporal semantic features and motion features of video clips are obtained to improve the understanding of the dynamic changes of video content; multiple features are integrated to generate multi-granularity video content labels, covering multi-level semantic information such as scenes, actions and events, and enhancing the accuracy and effect of video understanding and retrieval.
[0162] In an optional embodiment, the initial multi-granular content tags are optimized and expanded by combining ontology construction technology with a pre-acquired domain expert knowledge base to obtain comprehensive multi-granular content tags covering explicit topic tags and implicit concept tags. The temporal semantic evolution association between the comprehensive multi-granular content tags is mined by a dynamic embedding representation learning method that incorporates a time decay factor, and the construction of a security knowledge graph includes:
[0163] The pre-acquired domain expert knowledge base is structured through ontology construction technology to construct a security domain ontology model that includes ontology concept classes and hierarchical relationships, ontology concept class attributes and value constraints, semantic associations between ontology concept classes, and ontology axioms based on domain knowledge.
[0164] The semantic mapping between the initial multi-granular content labels and the ontology concept classes in the security domain ontology model is achieved through string matching, stem extraction and word sense disambiguation. Based on the ontology concept classes and hierarchical relationships, the ontology classification relationships are determined. Based on the ontology classification relationships, the hierarchical relationships are traced upward to obtain the label generalization extension. Based on the ontology concept class attributes and value constraints, the ontology attribute relationships are determined. The concept attribute features are mined using the ontology attribute relationships to obtain label refinement extensions. Based on the semantic association relationships between ontology concept classes, label association extensions are obtained. Finally, a comprehensive multi-granular content label covering explicit subject labels and implicit concept labels is obtained.
[0165] Based on comprehensive multi-granular content tags, the time decay factor combining exponential decay and power law decay is integrated to construct a tag association graph. Through time-aware random walk, a time-series node sequence is generated. The time decay factor is introduced to adjust the contribution of node pairs at different time points. The dynamic semantic association between nodes is determined by dynamically updating the embedding vector of the node.
[0166] The expanded comprehensive multi-granular content tags are transformed into nodes that constitute the knowledge graph, and the security knowledge graph is constructed by combining the edges connecting the nodes based on dynamic semantic associations.
[0167] The pre-acquired expert knowledge base in the daily safety field is structured and the ontology model of the daily safety field is constructed using ontology construction technology. Specifically, the ontology concept classes and their hierarchical relationships are defined to represent the core concepts of the domain knowledge and the hierarchical relationships between concepts. For example, concept classes such as "accident", "danger", and "prevention" can be defined, and a hierarchical structure can be established between them, such as "fire" is a subconcept of "accident" and "scald" is a subconcept of "danger". The attributes of the ontology concept classes and their value constraints are defined to characterize the characteristics and restrictions of the concepts. For example, the "accident" concept class can have attributes such as "accident type", "accident cause", and "accident consequence", and each attribute has a corresponding value range. The semantic association relationship between the ontology concept classes is defined to represent the non-hierarchical relationship between concepts, such as the "avoid" relationship between "danger" and "prevention". Based on the domain knowledge, the ontology axioms are defined to represent the constraint rules and reasoning rules of the domain, such as "if a hazard is not prevented, it may lead to an accident". Through the above steps, a complete ontology model of the daily safety field is constructed, providing a semantic basis for subsequent label expansion and knowledge graph construction.
[0168] The initial multi-granular content labels are semantically mapped with the ontology model of the daily safety domain to achieve label expansion and enrichment. The labels are mapped to ontology concept classes through string matching, stem extraction, and word sense disambiguation. For example, the label "scalding accident" is mapped to the ontology concept classes "scalding" and "accident". The ontology concept classes and their hierarchical relationships are used to generalize and expand the labels. Tracing up along the hierarchy, more abstract and extensive concept labels are obtained, such as "scalding accident" can be expanded to "danger" and "accident". The attributes of the ontology concept classes and their value constraints are used to refine and expand the labels. By mining the attribute characteristics of the concepts, more specific and fine-grained labels are obtained, such as "scalding accident" can be expanded to "hot water scalding accident". The semantic association relationship between ontology concept classes is used to expand the association of labels. Implicit concept labels are discovered through association relationships, such as "scalding accident" can be expanded to "scalding prevention". After the above label expansion steps, a comprehensive multi-granular content label covering explicit topic labels and implicit concept labels is obtained, enriching the semantic representation ability of the label.
[0169] Based on the expanded comprehensive multi-granular content tags, a time-aware tag association graph is constructed to capture the dynamic semantic associations between tags. Tags are used as nodes in the association graph, and a time decay factor that combines exponential decay and power-law decay is incorporated to represent the change in the importance of tags over time. A time-series node sequence is generated on the association graph through a time-aware random walk algorithm. During the random walk process, a time decay factor is introduced to adjust the contribution of node pairs at different time points. The earlier the node pairs appear, the smaller their contribution. By dynamically updating the embedding vectors of the nodes, the dynamic semantic associations between nodes are learned, and the semantic representations of tags at different time points are obtained. The time-aware tag association graph can characterize the temporal associations and semantic evolution between tags.
[0170] Integrate the expanded comprehensive multi-granular content tags and the tag association graph built based on dynamic semantic associations to build a daily security knowledge graph. Convert the comprehensive multi-granular content tags into nodes of the knowledge graph, and each tag represents an entity or concept. According to the edges in the tag association graph, build edges connecting nodes in the knowledge graph to represent the relationship between entities or concepts. Edge attributes can include relationship type, time information, etc. Integrate the axioms and constraint rules in the ontology model into the knowledge graph to form a complete security knowledge graph.
[0171] In this embodiment, by constructing an ontology model of the daily security field, defining core concepts, attributes and their relationships, it is ensured that the semantic expression of labels and knowledge systems is more comprehensive and accurate; based on the ontology model, the initial labels are generalized, refined and associated with expansion to generate multi-granularity comprehensive labels covering explicit and implicit content, thereby improving the expressive power of labels; by constructing a time-aware label association graph, the dynamic semantic associations between labels are captured, reflecting the semantic changes and association evolution of labels at different time points; integrating extended labels and dynamic association graphs to construct a daily security knowledge graph, systematically organizing domain knowledge, and enhancing the accuracy and effectiveness of tasks such as knowledge retrieval and recommendation.
[0172] S103. Through a hybrid recommendation algorithm, a cross-correlation matrix of the dynamically adaptive user portrait and the security knowledge graph is comprehensively modeled, the recommendation strategy weights of short-term interest mining and long-term preference grasp are adaptively optimized, and a recommended list of security education content is generated.
[0173] In this embodiment, a hybrid recommendation algorithm is used to comprehensively model the relationship between the dynamic adaptation user portrait and the security knowledge graph to generate a more accurate recommendation list of security education content; the recommendation strategy of short-term interests and long-term preferences is adaptively optimized to ensure that the recommended content is more in line with the user's current interests and long-term preferences, thereby improving the personalization of the recommendation; the relevance of the user's real-time behavior and security knowledge is comprehensively considered to effectively balance short-term and long-term interests, optimize the recommendation strategy, and improve the overall recommendation effect and user satisfaction.
[0174] In an optional embodiment, a hybrid recommendation algorithm is used to comprehensively model the cross-correlation matrix of the dynamic adaptive user portrait and the security knowledge graph, adaptively optimize the recommendation strategy weights of short-term interest mining and long-term preference grasp, and generate a security education content recommendation list including:
[0175] The similarity calculation method is used to calculate the feature vectors in the dynamic adaptive user portrait and the node embedding vectors in the security knowledge graph. Combined with the user's various interactive behavior data on security knowledge content, the collaborative filtering algorithm is used to quantify the degree of user-content correlation from the behavioral level, dynamically adjust the weights of similarity and interaction intensity, and construct a user-content cross-correlation matrix.
[0176] Based on the time decay function, the behavior weight is adjusted according to the distance in time, and the content topics and behavior patterns of users' high-frequency interactions are extracted through the deep learning network to determine the user's short-term interests; collaborative filtering and matrix decomposition algorithms are used to explore the user's continuous preferences for different security topics, different knowledge difficulties and different content forms, and determine the user's long-term preferences; through the reinforcement learning framework, combined with the exploration and utilization equilibrium mechanism, the recommendation strategy weight is adaptively optimized to obtain the optimized recommendation strategy weight;
[0177] Combining dynamically adaptive user portraits, security knowledge graphs, user-content cross-correlation matrices and optimized recommendation strategy weights, the matching degree between candidate content and users is calculated in multiple dimensions, and the semantic similarity based on content, behavioral similarity based on collaborative filtering and structural correlation based on knowledge are integrated to generate a recommended list of security education content.
[0178] The similarity calculation method is used to calculate the feature vector in the dynamic adaptive user portrait and the node embedding vector in the security knowledge graph to quantify the similarity between the user features and the knowledge nodes. Various features in the user portrait are extracted to form a user feature vector. Using the knowledge graph embedding technology, the nodes in the knowledge graph are mapped to a low-dimensional vector space to obtain the node embedding vector. The similarity calculation methods such as cosine similarity and Euclidean distance are used to calculate the similarity between the user feature vector and the node embedding vector to obtain the user-node similarity matrix.
[0179] Combined with various interactive behavior data of users on security knowledge content, the degree of user-content association is quantified from the behavioral level through collaborative filtering algorithm. Collect various interactive behavior data of users on security knowledge content to form a user-content interaction matrix. Apply collaborative filtering algorithm to calculate the degree of user-content association based on the behavioral similarity between users. Through collaborative filtering, the user-content association matrix is obtained to represent the user's implicit preference for different content. Dynamically adjust the weights of similarity and interaction intensity, comprehensively consider user-node similarity and user-content association, construct a user-content cross-correlation matrix, and integrate the information of user portrait, knowledge graph and interactive behavior.
[0180] Based on the time decay function, the weight of user interaction behavior is adjusted according to the distance in time. Smaller weights are assigned to earlier interaction behaviors, while larger weights are assigned to newer interaction behaviors. Through the deep learning network, the content topics and behavior patterns of users' high-frequency interactions are extracted to learn users' short-term interests. Collaborative filtering and matrix decomposition algorithms are used to explore users' continuous preferences for different security topics, different knowledge difficulties, and different content forms, and determine users' long-term preferences. Collaborative filtering and matrix decomposition algorithms can discover users' potential preferences and reveal users' long-term interests in different types of content. By integrating short-term interests and long-term preferences, a comprehensive representation of user interests is obtained.
[0181] Through the reinforcement learning framework, combined with the exploration and utilization balance mechanism, the weights of the recommendation strategies are adaptively optimized. First, the reward function of the recommendation strategy is defined as the optimization target of reinforcement learning. The exploration and utilization balance mechanism is designed to balance the exploration of new recommendation strategies and the use of existing effective strategies. By continuously interacting with users and receiving feedback, the reinforcement learning algorithm adaptively adjusts the weights of the recommendation strategies and learns the optimal combination of recommendation strategies. After multiple rounds of iteration and optimization, the optimized weights of the recommendation strategies are obtained.
[0182] Combined with dynamically adaptive user portraits, security knowledge graphs, user-content cross-correlation matrices, and optimized recommendation strategy weights, the matching degree between candidate content and users is calculated through multiple dimensions. Using semantic similarity measurement, the similarity between candidate content and user portraits and knowledge graphs is calculated to capture the semantic association of content. Using the behavioral similarity of collaborative filtering, the similarity between candidate content and user historical interaction content is calculated to mine users' implicit preferences. Using the structural association of the knowledge graph, the structural relationship of candidate content in the knowledge graph is calculated to reveal the semantic connection between content. The matching degrees of the above multiple dimensions are integrated with the optimized recommendation strategy weights to generate a personalized recommendation list of security education content. The recommendation list takes into account user characteristics, knowledge structure, interaction behavior, and recommendation strategies, and can provide highly relevant and interesting security education content.
[0183] In this embodiment, by calculating the similarity between the user portrait and the knowledge graph, as well as the interaction between the user and the content, a highly personalized safety education content recommendation list is generated to improve the accuracy of the recommendation and user satisfaction; the user's short-term interests and long-term preferences are integrated, and through dynamic adaptive weight optimization, the user's interest changes are better grasped to provide content that better meets the user's current needs; through the adaptive optimization of the reinforcement learning framework, the recommendation strategy can be continuously improved, balancing the effects of exploring new content and utilizing existing content, thereby improving the recommendation effect; multi-dimensional matching degree calculation ensures the diversity and relevance of the recommended content.
[0184] Figure 2 FIG. 1 is a schematic diagram of the structure of a safety education recommendation system based on demand profiles and content tags according to an embodiment of the present invention. Figure 2 As shown, the system comprises:
[0185] The first unit is used to obtain user behavior attribute data, dynamically model user multi-dimensional features through an adaptive incremental learning algorithm, generate a user multi-dimensional portrait, and perform real-time decay updates on the weights corresponding to each dimension in the user multi-dimensional portrait through a time decay model based on a knowledge forgetting curve to generate a dynamic adaptive user portrait, wherein the user behavior attribute data includes demographic characteristics, historical browsing behavior, online interaction data, attitude tendency survey results, and knowledge and skills assessment evaluation;
[0186] The second unit is used to perform multi-level semantic analysis on the heterogeneous content in the preset safety education material library, generate initial multi-granular content labels, optimize and expand the initial multi-granular content labels through ontology construction technology combined with the pre-acquired domain expert knowledge base, and obtain comprehensive multi-granular content labels covering explicit topic labels and implicit concept labels. Through the dynamic embedding representation learning method that incorporates the time decay factor, the temporal semantic evolution association between the comprehensive multi-granular content labels is mined to construct a safety knowledge graph;
[0187] The third unit is used to comprehensively model the cross-correlation matrix of the dynamic adaptive user portrait and the security knowledge graph through a hybrid recommendation algorithm, adaptively optimize the recommendation strategy weights of short-term interest mining and long-term preference grasp, and generate a recommended list of security education content.
[0188] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0189] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A safety education recommendation method based on demand profiles and content tags, characterized in that: include: Obtain user behavior attribute data, dynamically model user multi-dimensional features through adaptive incremental learning algorithms, generate user multi-dimensional portraits, and perform real-time decay updates on the weights corresponding to each dimension in the user multi-dimensional portrait through a time decay model based on the knowledge forgetting curve to generate a dynamically adaptive user portrait. Perform multi-level semantic analysis on the heterogeneous content in the preset safety education material library to generate initial multi-granular content labels. Optimize and expand the initial multi-granular content labels through ontology construction technology combined with the pre-acquired domain expert knowledge base to obtain comprehensive multi-granular content labels covering explicit topic labels and implicit concept labels. Through the dynamic embedding representation learning method that incorporates the time decay factor, the temporal semantic evolution association between the comprehensive multi-granular content labels is mined to construct a safety knowledge graph. Through a hybrid recommendation algorithm, a cross-correlation matrix of the dynamically adaptive user portrait and the security knowledge graph is comprehensively modeled, the recommendation strategy weights of short-term interest mining and long-term preference grasp are adaptively optimized, and a recommended list of security education content is generated.
2. The method according to claim 1, characterized in that Obtain user behavior attribute data, dynamically model user multi-dimensional features through adaptive incremental learning algorithms, and generate user multi-dimensional portraits including: Obtain user behavior attribute data including demographic attributes, browsing history, interaction text, attitude tendencies, and knowledge and skills; Preprocessing the user behavior attribute data, for structured data, using attribute values as features, and for unstructured data, using word embedding convolutional neural networks to extract semantic features, to obtain original features of each dimension; The original features of each dimension are input into the shared layer, which is built based on the attention mechanism enhanced capsule network. The original features are mapped to the high-dimensional semantic space through the dynamic routing algorithm to obtain the shared intermediate feature representation between dimensions. After the shared layer, a dimension-specific layer is set up. According to each dimension, a multi-head attention mechanism and a gated recurrent unit network are independently set up to map the shared intermediate feature representation into the dimension feature representation. Adopting a multi-dimensional task joint learning strategy with adaptive weight adjustment, combining the difficulty and convergence speed of dimensional tasks, dynamically adjusting the weight of the loss function of each dimensional task, introducing adversarial regularization constraints between dimensional tasks, optimizing the joint loss function of all dimensional tasks, and updating the parameters of the shared layer and the dimensional task-specific layer through an adaptive gradient algorithm; When new user behavior data arrives, the knowledge distillation model is used to compress the current model, predict the new data and calculate the prediction loss, add the new data to the training set, and incrementally update the current model by combining ensemble learning and adaptive learning rate strategy. The small batch SVRG algorithm is used to optimize the parameters, control the update amplitude, and take into account the fitting ability of new and old data. By designing a meta-learning controller with an LSTM structure, the proximal strategy optimization algorithm and the Bayesian optimization algorithm are used to adaptively adjust the model hyperparameter combination; based on dimensional feature representation, a combination of a variational autoencoder network and a generative adversarial network is used to generate a dynamically updated multi-dimensional user portrait.
3. The method according to claim 2, characterized in that Through the time decay model based on the knowledge forgetting curve, the weights corresponding to each dimension in the user's multi-dimensional portrait are updated in real time to generate a dynamic adaptive user portrait including: The first time decay curve function is used to determine the short-term memory forgetting trajectory of the user's behavioral attributes. The second time decay curve function is used to determine the long-term memory retention trajectory of the user's core behavioral attributes. The weight coefficients of the two curves are combined to determine the differences in memory retention under different time scales, and a hyperbolic forgetting model is constructed. Introduce the attention mechanism to dynamically adjust the importance of each dimension of the user portrait, use the user behavior sequence as the query vector, and the embedding vector of each dimension of the user portrait as the key value vector. Calculate the attention weight of each dimension through the attention function, and multiply the attention weight with the time decay curve function value in the hyperbolic forgetting model to obtain the dimension weight update factor; For each piece of behavioral attribute data of each user, the time interval with the current time is calculated according to the data timestamp, and the weight of each dimension in the multi-dimensional portrait of the user is attenuated and updated by using the time interval, the hyperbolic forgetting model and the dimension weight update factor to generate a dynamically changing user portrait dimension weight vector; Based on the multi-scale time coding method, the timestamps corresponding to the user behavior attribute data are processed, the sine-cosine time features with a period of day, week, and month are extracted, the periodic law of user behavior at different time granularities is captured, the multi-scale time features are determined, and the multi-scale time features are spliced with the behavior attribute features to determine the spatiotemporal context representation of the user behavior; The gated recurrent unit network is used to model the user behavior sequence. The newly received user behavior data is combined with the spatiotemporal context representation of the user behavior, and the encoder in the gated recurrent unit network is used to extract and compress the features to obtain the behavior hidden state representation. The behavior hidden state representation is gated and fused with the original user multi-dimensional feature representation, and the user multi-dimensional feature representation is dynamically updated. The user portrait dimension weight vector is weightedly combined with the dynamically updated user multi-dimensional feature representation to generate a dynamically adaptive user portrait vector, thereby obtaining a dynamically adaptive user portrait.
4. The method according to claim 1, characterized in that: Perform multi-level semantic analysis on the heterogeneous content in the preset safety education material library to generate initial multi-granular content tags including: The heterogeneous content includes text content, image content and video content; Based on the text content, generate a multi-granularity text content label; based on the image content, generate a multi-granularity image content label; based on the video content, generate a multi-granularity video content label; Mapping the multi-granularity text content labels, the multi-granularity image content labels, and the multi-granularity video content labels to a unified semantic space for representation alignment, and constructing a text-image-video content label tripartite graph by calculating the TF-IDF weights of all content labels; By iteratively updating the label information of nodes in the content label tripartite graph and utilizing the link relationship between nodes, the label information is smoothed. Combined with the label propagation process, content label fusion is achieved to generate initial multi-granular content labels.
5. The method according to claim 4, characterized in that Based on the text content, generating a multi-granularity text content label includes: Segment the text content, construct the observation sequence through the hidden Markov model, use the Viterbi algorithm to solve the hidden state sequence, and modify the segmentation result in combination with the predefined text dictionary; The word segmentation results are input into the conditional random field model to extract the part-of-speech and named entity features. The marginal probability is calculated through the forward-backward algorithm to solve the optimal tagging sequence and obtain the part-of-speech tagging and named entity recognition results. The word segmentation results are mapped into word segmentation vectors through word embedding, and the context information is learned using a bidirectional long short-term memory network. Combined with the dependency constraints modeled by conditional random fields, the dependency syntactic tree is decoded. The word segmentation results and the corresponding part-of-speech tagging and named entity recognition results are input into the latent Dirichlet allocation model. Through Gibbs sampling, the parameters of the topic-word distribution and document-topic distribution are gradually updated to extract the text topic labels. Based on the word segmentation results and the dependency syntax tree, the importance scores of candidate keywords are calculated through a text sorting algorithm, the centrality of candidate keywords is calculated and sorted iteratively, and the words with the largest centrality of candidate keywords are selected according to a preset number to determine the keywords; Fuse text topic tags and keywords to generate multi-granularity text content tags.
6. The method according to claim 5, characterized in that Based on the image content, generating a multi-granularity image content label includes: Using the pre-trained residual network model, the image content is extracted through layer-by-layer convolution and pooling operations to obtain multi-scale image features; Based on multi-scale image features, the YOLO object detection model is used, combined with the multi-scale feature fusion method to predict the bounding boxes and category labels of objects of different sizes. Non-maximum suppression is used to remove redundant detection results to obtain the object location category label. The scene convolutional neural network pre-trained on the Places365 dataset is used to extract scene features based on multi-scale image features, and the scene features are classified in combination with the fully connected layer to obtain scene category labels; The masked region image neural network model is used to perform pixel-level semantic segmentation based on multi-scale image features to obtain region content labels. The object position category label, the scene category label and the region content label are fused to generate a multi-granularity image content label.
7. The method according to claim 6, characterized in that Based on the video content, generating multi-granularity video content tags includes: The video frames corresponding to the video content are clustered using spectral clustering, a similarity graph is constructed by calculating the similarity matrix between the video frames, the similarity graph is spectrally decomposed to solve the feature vector, and the feature vector is clustered in combination with the K-Means algorithm to obtain the clustering result of the video frame, and the video frame closest to the cluster center is selected as the key frame in each cluster; the saliency detection algorithm and the inter-frame difference algorithm are used to calculate the saliency score by determining the color contrast and motion saliency of the video frame and the histogram difference between adjacent video frames, and according to the preset key frame number threshold, the video frame with the largest saliency score is selected as the supplementary key frame; based on the key frame and the supplementary key frame, the visual semantic features are extracted; The optical flow method is used to extract the motion features of the video. The motion vectors of pixels between adjacent video frames are calculated to obtain the optical flow field of the video clip. The optical flow field is quantized and encoded to form a motion feature descriptor to determine the segment-level motion features. A 3D convolutional neural network is used to perform convolution operations on the spatiotemporal dimensions of video clips through a 3D convolution kernel to capture the temporal information of the video. Combined with the parameters of the 3D convolutional neural network, the semantic representation of the video clips is learned and the spatiotemporal semantic features are extracted. The audio signal corresponding to the video content is transformed from the time domain to the frequency domain by Fourier transform, segmented by Mel filter bank processing, and the cepstral coefficients are extracted by discrete cosine transform to determine the audio level features; The visual semantic features, the segment-level motion features, the spatiotemporal semantic features and the audio-level features are fused to generate multi-granularity video content labels.
8. The method according to claim 1, characterized in that By combining ontology construction technology with the pre-acquired domain expert knowledge base, the initial multi-granular content labels are optimized and expanded to obtain comprehensive multi-granular content labels covering explicit topic labels and implicit concept labels. By incorporating a dynamic embedding representation learning method with a time decay factor, the temporal semantic evolution associations between the comprehensive multi-granular content labels are mined to construct a security knowledge graph, including: The pre-acquired domain expert knowledge base is structured through ontology construction technology to construct a security domain ontology model that includes ontology concept classes and hierarchical relationships, ontology concept class attributes and value constraints, semantic associations between ontology concept classes, and ontology axioms based on domain knowledge. The semantic mapping between the initial multi-granular content labels and the ontology concept classes in the security domain ontology model is achieved through string matching, stem extraction and word sense disambiguation. Based on the ontology concept classes and hierarchical relationships, the ontology classification relationships are determined. Based on the ontology classification relationships, the hierarchical relationships are traced upward to obtain the label generalization extension. Based on the ontology concept class attributes and value constraints, the ontology attribute relationships are determined. The concept attribute features are mined using the ontology attribute relationships to obtain label refinement extensions. Based on the semantic association relationships between ontology concept classes, label association extensions are obtained. Finally, a comprehensive multi-granular content label covering explicit subject labels and implicit concept labels is obtained. Based on comprehensive multi-granular content tags, the time decay factor combining exponential decay and power law decay is integrated to construct a tag association graph. Through time-aware random walk, a time-series node sequence is generated. The time decay factor is introduced to adjust the contribution of node pairs at different time points. The dynamic semantic association between nodes is determined by dynamically updating the embedding vector of the node. The expanded comprehensive multi-granular content tags are transformed into nodes that constitute the knowledge graph, and the security knowledge graph is constructed by combining the edges connecting the nodes based on dynamic semantic associations.
9. The method according to claim 1, characterized in that: Through the hybrid recommendation algorithm, the cross-correlation matrix of the dynamic adaptive user portrait and the security knowledge graph is comprehensively modeled, the recommendation strategy weights of short-term interest mining and long-term preference grasp are adaptively optimized, and a recommended list of security education content is generated, including: The similarity calculation method is used to calculate the feature vectors in the dynamic adaptive user portrait and the node embedding vectors in the security knowledge graph. Combined with the user's various interactive behavior data on security knowledge content, the collaborative filtering algorithm is used to quantify the degree of user-content correlation from the behavioral level, dynamically adjust the weights of similarity and interaction intensity, and construct a user-content cross-correlation matrix. Based on the time decay function, the behavior weight is adjusted according to the distance in time, and the content topics and behavior patterns of users' high-frequency interactions are extracted through the deep learning network to determine the user's short-term interests; collaborative filtering and matrix decomposition algorithms are used to explore the user's continuous preferences for different security topics, different knowledge difficulties and different content forms, and determine the user's long-term preferences; through the reinforcement learning framework, combined with the exploration and utilization equilibrium mechanism, the recommendation strategy weight is adaptively optimized to obtain the optimized recommendation strategy weight; Combining dynamically adaptive user portraits, security knowledge graphs, user-content cross-correlation matrices and optimized recommendation strategy weights, the matching degree between candidate content and users is calculated in multiple dimensions, and the semantic similarity based on content, behavioral similarity based on collaborative filtering and structural correlation based on knowledge are integrated to generate a recommended list of security education content.
10. A safety education recommendation system based on demand portraits and content tags, used to implement the method described in any one of claims 1 to 9, characterized in that: include: The first unit is used to obtain user behavior attribute data, dynamically model user multi-dimensional features through an adaptive incremental learning algorithm, generate a user multi-dimensional portrait, and perform real-time decay updates on the weights corresponding to each dimension in the user multi-dimensional portrait through a time decay model based on a knowledge forgetting curve to generate a dynamic adaptive user portrait, wherein the user behavior attribute data includes demographic characteristics, historical browsing behavior, online interaction data, attitude tendency survey results, and knowledge and skills assessment evaluation; The second unit is used to perform multi-level semantic analysis on the heterogeneous content in the preset safety education material library, generate initial multi-granular content labels, optimize and expand the initial multi-granular content labels through ontology construction technology combined with the pre-acquired domain expert knowledge base, and obtain comprehensive multi-granular content labels covering explicit topic labels and implicit concept labels. Through the dynamic embedding representation learning method that incorporates the time decay factor, the temporal semantic evolution association between the comprehensive multi-granular content labels is mined to construct a safety knowledge graph; The third unit is used to comprehensively model the cross-correlation matrix of the dynamic adaptive user portrait and the security knowledge graph through a hybrid recommendation algorithm, adaptively optimize the recommendation strategy weights of short-term interest mining and long-term preference grasp, and generate a recommended list of security education content.
