Content pushing method and system for router, gateway and camera
By building a user portrait generation model and performing real-time optimization, the problems of single interest modeling and resource constraints in content push by edge computing devices are solved, efficient personalized content push is achieved, and matching and user stickiness are improved.
Patent Information
- Application Number
- CN202510269193.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-07-18
AI Technical Summary
In the content push, existing edge computing devices have single interest modeling dimensions, insufficient dynamic adaptability of algorithms, and performance bottlenecks under device resource constraints, resulting in low matching content push and poor user stickiness.
By building a user portrait generation model, including feature extraction, feature embedding, behavioral sequence modeling, feature fusion and image generation modules, combining knowledge distillation, dynamic pruning and model quantization technologies to compress the model, and optimize user portraits in real time, using multi-dimensional data modeling and real-time feedback for personalized content push.
It improves the matching and flexibility of content push, enhances user stickiness, improves the accuracy and dynamic adaptability of user portrait generation, reduces storage overhead, and ensures the security of push logs.
Smart Images

Figure CN120336618A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of edge computing, and particularly to a content push method and system for routers, gateways, and cameras. Background Art
[0002] In the 5G era of the deep integration of edge computing and Internet of Things technologies, edge computing devices such as routers, gateways, and cameras have formed a perception network covering users' living scenarios. According to statistics, the daily heterogeneous data volume generated by edge computing devices in a single household has reached the order of 2.3TB, covering multi-modal information such as user behavior logs (such as web browsing trajectories), environmental perception data (such as spatial movement features captured by cameras), and cross-platform interaction data (such as voice commands of smart speakers). Merchants continuously push various information to users based on the data collected by edge computing devices. People face a vast amount of information every day, resulting in information overload. Without an intelligent push method, users may be interfered by a large amount of irrelevant or duplicate content, leading to information overload and user fatigue; if users search and filter content by themselves, it will undoubtedly increase the usage cost and time consumption, and reduce the quality of the user experience. Therefore, there is a need for personalized content push. Content push relies on a personalized recommendation system. However, traditional personalized recommendation systems (such as collaborative filtering algorithms and content-based recommendation engines) have the following problems:
[0003] 1. Single-dimensional interest modeling: It relies on the user historical click-through rate matrix for latent factor analysis, ignoring the dynamic influence of environmental context (such as the number of people present identified by a home camera) on interest preferences; for example, a user prefers technology news in a work scenario and is more concerned about entertainment content in a home scenario. The existing system cannot capture this spatio-temporal correlation and instead recommends homogeneous content.
[0004] 2. Insufficient algorithm dynamic adaptability: It updates the user profile in an offline batch processing mode, and the update period usually exceeds 24 hours, unable to respond to the real-time demand changes in the edge scenario; laboratory tests show that when a user's interest suddenly changes (such as a breaking news event), the recommendation accuracy of the traditional system drops by up to 62%.
[0005] 3. Performance bottleneck under device resource constraints: The computing density of existing deep learning models (such as the Transformer architecture) exceeds 2.5 TOPS, far exceeding the computing power bearing range of edge computing devices, resulting in forced downsampling during actual deployment and causing loss of feature information.
[0006] Therefore, how to provide a content push method and system for routers, gateways, and cameras to improve the matching degree and flexibility of content push, and further improve user stickiness has become an urgent technical problem to be solved. Summary of the Invention
[0007] The technical problem to be solved by the present invention is to provide a content push method and system for routers, gateways, and cameras to improve the matching degree and flexibility of content push, and further improve user stickiness.
[0008] In a first aspect, the present invention provides a content push method for routers, gateways, and cameras, including the following steps:
[0009] Step S1: Obtain a large amount of historical user information, preprocess and label each piece of historical user information, and then construct a data set;
[0010] Step S2: Create a user portrait generation model based on a feature extraction module, a feature embedding module, a behavior sequence modeling module, a feature fusion module, and a portrait generation module, and set the loss function of the user portrait generation model;
[0011] Step S3: Train the user portrait generation model through the data set and the loss function. During the training process, compress the user portrait generation model, and deploy the trained user portrait generation model to an edge computing device with a device type of router, gateway, or camera;
[0012] Step S4: The edge computing device obtains real-time user information, preprocesses the real-time user information, inputs it into the user portrait generation model to obtain a real-time user portrait, and performs personalized push based on the recommended content matched by the real-time user portrait;
[0013] Step S5: The edge computing device continuously optimizes the user portrait generation model based on the input push feedback and the real-time user portrait;
[0014] Step S6: The edge computing device records in real time a push log including at least the real-time user portrait, recommended content, and push time, encrypts the push log into an encrypted log, uploads the encrypted log to the server for storage, and deletes the encrypted log locally.
[0015] Further, the specific content of step S1 is as follows:
[0016] Obtain a large amount of historical user information including basic information, behavior data, preference data, location data, and scenario data. After preprocessing each of the historical user information, which at least includes removing noise data, filling in missing values, and normalizing numerical data, use natural language processing techniques to identify keyword extraction, sentiment analysis, and topic recognition for each of the preprocessed historical user information, and then perform user portrait annotation on each of the historical user information, and construct a dataset based on each of the annotated historical user information.
[0017] Further, in the step S2, the feature extraction module, the feature embedding module, the behavior sequence modeling module, the feature fusion module, and the portrait generation module are connected in sequence;
[0018] The feature extraction module is used to extract initial features from user information; the feature embedding module is used to map the initial features to a low-dimensional dense vector space to obtain a dense vector representation; the behavior sequence modeling module is constructed based on long short-term memory units and self-attention units. The long short-term memory unit is used to capture temporal dependence features from the vector representation, and the self-attention unit is used to capture long-distance dependence features from the vector representation; the feature fusion module is used to fuse the temporal dependence features and the long-distance dependence features to obtain fused features; the portrait generation module is used to output a user portrait based on the fused features;
[0019] The loss function is constructed based on the cross-entropy loss function and the mean squared error function.
[0020] Further, the step S3 is specifically as follows:
[0021] Divide the dataset into a training set, a validation set, and a test set based on a splitting ratio of 7:2:1. Train the user portrait generation model through the training set until the loss value of the loss function is less than a preset loss threshold. During the training process, compress the user portrait generation model through knowledge distillation technology, dynamic pruning technology, and model quantization technology; verify the trained user portrait generation model through the validation set to determine whether the portrait accuracy is greater than a preset accuracy threshold. If not, the verification fails, expand the training set and continue training. If so, the verification is successful; test the user portrait generation model that has passed the verification through the test set to determine whether the confidence level is greater than a preset confidence level threshold. If not, the test fails, expand the training set and continue training. If so, the test is successful, and the training ends;
[0022] Deploy the trained user portrait generation model to edge computing devices of device types such as routers, gateways, or cameras.
[0023] Further, the step S6 is specifically as follows:
[0024] The edge computing device records in real time a push log that at least includes the real-time user profile, recommended content, and push time;
[0025] At every preset upload cycle, the edge computing device obtains the current timestamp and the MAC address of the local machine, performs an exclusive OR operation on the push log and the MAC address to obtain first-level encrypted data, encrypts the first-level encrypted data and the timestamp into second-level encrypted data through the AES algorithm, encrypts the second-level encrypted data and the MAC address into third-level encrypted data through the RSA algorithm, calculates the hash value of the push log through the SHA-256 algorithm, encrypts the third-level encrypted data and the hash value through the RC6 algorithm to obtain an encrypted log, uploads the encrypted log to the server for storage through the TLS protocol, and deletes the encrypted log locally.
[0026] In a second aspect, the present invention provides a content push system for routers, gateways, and cameras, including the following modules:
[0027] A dataset construction module, configured to obtain a large amount of historical user information, preprocess and label each piece of historical user information, and construct a dataset;
[0028] A user profile generation model creation module, configured to create a user profile generation model based on a feature extraction module, a feature embedding module, a behavior sequence modeling module, a feature fusion module, and a profile generation module, and set the loss function of the user profile generation model;
[0029] A user profile generation model deployment module, configured to train the user profile generation model through the dataset and the loss function, compress the user profile generation model during the training process, and deploy the trained user profile generation model to an edge computing device of a device type of a router, a gateway, or a camera;
[0030] A personalized push module, configured to enable the edge computing device to obtain real-time user information, preprocess the real-time user information, input it into the user profile generation model to obtain a real-time user profile, and perform personalized push based on the real-time user profile to match recommended content;
[0031] A user profile generation model optimization module, configured to enable the edge computing device to continuously optimize the user profile generation model based on the input push feedback and the real-time user profile;
[0032] A push log management module, configured to enable the edge computing device to record in real time a push log that at least includes the real-time user profile, recommended content, and push time, encrypt the push log into an encrypted log, upload the encrypted log to the server for storage, and delete the encrypted log locally.
[0033] Further, the dataset construction module is specifically configured to:
[0034] Obtain a large amount of historical user information including basic information, behavior data, preference data, location data, and scenario data. After preprocessing each piece of the historical user information, which at least includes removing noise data, filling in missing values, and normalizing numerical data, use natural language processing techniques to identify keyword extraction, sentiment analysis, and topic recognition for each piece of the preprocessed historical user information, and then annotate user portraits for each piece of the historical user information. Based on the annotated historical user information, construct a dataset.
[0035] Further, in the user portrait generation model creation module, the feature extraction module, the feature embedding module, the behavior sequence modeling module, the feature fusion module, and the portrait generation module are connected in sequence;
[0036] The feature extraction module is used to extract initial features from user information; the feature embedding module is used to map the initial features to a low-dimensional dense vector space to obtain a dense vector representation; the behavior sequence modeling module is constructed based on long short-term memory units and self-attention units. The long short-term memory unit is used to capture temporal dependence features from the vector representation, and the self-attention unit is used to capture long-distance dependence features from the vector representation; the feature fusion module is used to fuse the temporal dependence features and the long-distance dependence features to obtain fused features; the portrait generation module is used to output a user portrait based on the fused features;
[0037] The loss function is constructed based on the cross-entropy loss function and the mean squared error function.
[0038] Further, the user portrait generation model deployment module is specifically configured to:
[0039] Divide the dataset into a training set, a validation set, and a test set based on a splitting ratio of 7:2:1. Train the user portrait generation model through the training set until the loss value of the loss function is less than a preset loss threshold. During the training process, compress the user portrait generation model through knowledge distillation technology, dynamic pruning technology, and model quantization technology; verify the trained user portrait generation model through the validation set to determine whether the portrait accuracy is greater than a preset accuracy threshold. If not, the verification fails, and the training set is expanded and training continues. If so, the verification is successful; test the user portrait generation model with successful verification through the test set to determine whether the confidence level is greater than a preset confidence level threshold. If not, the test fails, and the training set is expanded and training continues. If so, the test is successful, and training ends;
[0040] Deploy the trained user profile generation model to an edge computing device with a device type of router, gateway, or camera.
[0041] Further, the push log management module is specifically used for:
[0042] The edge computing device records in real time a push log that at least includes the real-time user profile, recommended content, and push time;
[0043] The edge computing device obtains the current timestamp and the MAC address of the local machine every preset upload period, performs an exclusive OR operation on the push log and the MAC address to obtain first-level encrypted data, encrypts the first-level encrypted data and the timestamp into second-level encrypted data through the AES algorithm, encrypts the second-level encrypted data and the MAC address into third-level encrypted data through the RSA algorithm, calculates the hash value of the push log through the SHA-256 algorithm, encrypts the third-level encrypted data and the hash value through the RC6 algorithm to obtain an encrypted log, uploads the encrypted log to the server for storage through the TLS protocol, and clears the encrypted log locally.
[0044] The advantages of the present invention are:
[0045] 1. A user portrait generation model is created by preprocessing and annotating a large amount of historical user information to construct a dataset. Then, based on a feature extraction module, a feature embedding module, a behavioral sequence modeling module, a feature fusion module, and a portrait generation module, a loss function of the user portrait generation model is set, and the user portrait generation model is trained through the dataset and the loss function. During the training process, the user portrait generation model is compressed, and the trained user portrait generation model is deployed to an edge computing device with a device type of router, gateway, or camera. The edge computing device obtains real-time user information, preprocesses it, and inputs it into the user portrait generation model to obtain a real-time user portrait. Based on the real-time user portrait, recommended content is matched for personalized push, and the user portrait generation model is continuously optimized based on the input push feedback and the real-time user portrait. The edge computing device records in real time a push log including at least the real-time user portrait, the recommended content, and the push time, encrypts the push log into an encrypted log and uploads it to the server for storage, and deletes the encrypted log locally. That is, a user portrait generation model is created based on the feature extraction module, the feature embedding module, the behavioral sequence modeling module, the feature fusion module, and the portrait generation module to generate a real-time user portrait, and then content is pushed based on the real-time user portrait. Since the dataset for training the user portrait generation model includes basic information, behavioral data, preference data, location data, and scenario data, the user portrait can be modeled from multiple dimensions, effectively improving the accuracy of user portrait generation and avoiding the recommendation of homogeneous content based on single-dimensional modeling as in the traditional method. The behavioral sequence modeling module uses a long short-term memory unit to capture temporal dependence features from vector representations, uses a self-attention unit to capture long-distance dependence features from vector representations, and then fuses the temporal dependence features and the long-distance dependence features through the feature fusion module, effectively improving the feature extraction ability and further improving the accuracy of user portrait generation. During the training process, the user portrait generation model is compressed through knowledge distillation technology, dynamic pruning technology, and model quantization technology. Combined with continuous verification and testing, the model volume and portrait generation accuracy of the user portrait generation model are effectively balanced, facilitating deployment on resource-constrained edge computing devices. The edge computing device can update the real-time user portrait in real time through the user portrait generation model for content push, effectively improving the dynamic adaptability, and without the need for downsampling processing as in the traditional method. Finally, the matching degree and flexibility of content push are greatly improved, and thus the user stickiness is greatly improved.
[0046] 2. The user portrait generation model is continuously optimized through push feedback and the real-time user portrait, that is, the user portrait generation model is iterated based on the latest data, which can continuously improve the matching degree of content push.
[0047] 3. By recording in real time at least the push logs including real-time user profiles, recommended content, and push time, encrypt the push logs into encrypted logs and upload them to the server for storage, which is convenient for later traceability.
[0048] 4. By clearing the local encrypted logs after uploading them to the encrypted log server, the storage overhead of the edge computing device can be effectively saved.
[0049] 5. By obtaining a large amount of historical user information including basic information, behavior data, preference data, location data, and scenario data, after preprocessing each piece of historical user information including at least removing noise data, filling in missing values, and normalizing numerical data, use natural language processing technology to identify keywords, perform sentiment analysis, and identify themes for each piece of preprocessed historical user information, and then label the user profiles for each piece of historical user information. Based on the labeled historical user information, construct a dataset; that is, collect multi-dimensional user information to construct a dataset, and perform data cleaning before construction. Combine natural language processing technology to label the historical user information, that is, perform marking and classification, which is convenient for subsequent analysis and learning, greatly improves the quality of the dataset, greatly improves the training effect of the user profile generation model, and thus greatly improves the matching degree of content push.
[0050] 6. By setting the loss function based on the cross-entropy loss function and the mean squared error function, that is, performing a weighted sum of the cross-entropy loss function and the mean squared error function. The cross-entropy loss function is used to measure the difference between the predicted interest label and the true label, and the mean squared error function is used to measure the difference between the predicted continuous feature and the true value. It can combine the advantages of both, and further improve the training effect of the user profile generation model.
[0051] 7. By obtaining the current timestamp and the MAC address of the local machine every preset upload period, perform an exclusive OR operation on the push log and the MAC address to obtain the first-level encrypted data. Encrypt the first-level encrypted data and the timestamp into the second-level encrypted data through the AES algorithm, encrypt the second-level encrypted data and the MAC address into the third-level encrypted data through the RSA algorithm, calculate the hash value of the push log through the SHA-256 algorithm, and encrypt the third-level encrypted data and the hash value through the RC6 algorithm to obtain the encrypted log. Upload the encrypted log to the server for storage through the TLS protocol; that is, perform alternating encryption through symmetric encryption algorithms (AES algorithm, RC6 algorithm) and asymmetric encryption algorithms (RSA algorithm), and also combine data transformation, time validity verification, and integrity verification. And the TLS protocol is a secure transmission protocol. At least 7 layers of security measures are taken before and after (exclusive OR, timestamp, AES algorithm, RSA algorithm, SHA-256 algorithm, RC6 algorithm, TLS protocol), which greatly improves the security of push log transmission and storage, and avoids being stolen and tampered with in plain text. Brief Description of the Drawings
[0052] The present invention will be further described below with reference to the accompanying drawings in conjunction with embodiments.
[0053] Figure 1 It is a flowchart of a content push method for routers, gateways, and cameras according to the present invention.
[0054] Figure 2 It is a schematic structural diagram of a content push system for routers, gateways, and cameras according to the present invention. Detailed Embodiments
[0055] The overall idea of the technical solution in the embodiments of the present application is as follows: Based on a feature extraction module, a feature embedding module, a behavior sequence modeling module, a feature fusion module, and a portrait generation module, a user portrait generation model is created to generate a real-time user portrait, and then content is pushed based on the real-time user portrait; Since the dataset for training the user portrait generation model includes basic information, behavior data, preference data, location data, and scenario data, the user portrait can be modeled from multiple dimensions to avoid pushing homogeneous content; The behavior sequence modeling module captures both temporal dependence features and long-distance dependence features at the same time, effectively improving the feature extraction ability; During the training process, the user portrait generation model is compressed, combined with continuous verification and testing, effectively balancing the model volume of the user portrait generation model and the accuracy of portrait generation, facilitating deployment on resource-constrained edge computing devices, enabling the edge computing device to update the real-time user portrait in real time through the user portrait generation model for content push, and without the need for downsampling processing as in the traditional way, so as to improve the matching degree and flexibility of content push, and further improve user stickiness.
[0056] Please refer to Figures 1 to 2 As shown, a preferred embodiment of a content push method for routers, gateways, and cameras according to the present invention includes the following steps:
[0057] Step S1: Obtain a large amount of historical user information, preprocess and label each piece of the historical user information, and then construct a dataset;
[0058] Step S2: Based on a feature extraction module, a feature embedding module, a behavior sequence modeling module, a feature fusion module, and a portrait generation module, create a user portrait generation model, and set a loss function for the user portrait generation model;
[0059] Step S3: Train the user portrait generation model through the dataset and the loss function, compress the user portrait generation model during the training process, and deploy the trained user portrait generation model to an edge computing device of a device type of router, gateway, or camera;
[0060] Step S4: The edge computing device obtains real-time user information, preprocesses the real-time user information, and then inputs it into the user portrait generation model to obtain a real-time user portrait, and based on the real-time user portrait, matches recommended content for personalized push;
[0061] Step S5: The edge computing device continuously optimizes the user portrait generation model based on the input push feedback and the real-time user portrait;
[0062] Continuously optimizing the user portrait generation model through push feedback and real-time user portrait, that is, iterating the user portrait generation model based on the latest data, can continuously improve the matching degree of content push.
[0063] Step S6: The edge computing device records in real time a push log including at least the real-time user portrait, recommended content, and push time, encrypts the push log into an encrypted log, uploads the encrypted log to the server for storage, and deletes the local encrypted log.
[0064] By recording in real time a push log including at least the real-time user portrait, recommended content, and push time, encrypting the push log into an encrypted log and uploading it to the server for storage, it is convenient for later traceability.
[0065] By deleting the local encrypted log after uploading the encrypted log to the server, the storage overhead of the edge computing device is effectively saved.
[0066] The specific content of step S1 is as follows:
[0067] Obtain a large amount of historical user information including basic information, behavior data, preference data, location data, and scenario data. After preprocessing each piece of historical user information, including at least removing noise data, filling in missing values, and normalizing numerical data, use natural language processing technology to identify keywords, perform sentiment analysis, and identify themes for each piece of preprocessed historical user information, and then label the user portraits of each piece of historical user information. Based on the labeled historical user information, construct a data set.
[0068] By obtaining a large amount of historical user information including basic information, behavioral data, preference data, location data, and scenario data, and performing preprocessing on each piece of historical user information, including at least removing noise data, filling in missing values, and normalizing numerical data, then through natural language processing techniques, keyword extraction, sentiment analysis, and topic recognition are carried out on the preprocessed historical user information, and then each piece of historical user information is labeled for user profiling. Based on the labeled historical user information, a dataset is constructed; that is, multi-dimensional user information is collected to construct a dataset, and data cleaning is performed before construction. Combining natural language processing techniques to label historical user information, that is, marking and classifying, which is convenient for subsequent analysis and learning, greatly improves the quality of the dataset, greatly improves the training effect of the user profiling generation model, and further greatly improves the matching degree of content push.
[0069] In the step S2, the feature extraction module, the feature embedding module, the behavior sequence modeling module, the feature fusion module, and the profiling generation module are connected in sequence;
[0070] The feature extraction module is used to extract initial features from user information; the feature embedding module is used to map the initial features to a low-dimensional dense vector space to obtain a dense vector representation; the behavior sequence modeling module is constructed based on long short-term memory units and self-attention units. The long short-term memory unit is used to capture temporal dependence features from the vector representation, and the self-attention unit is used to capture long-distance dependence features from the vector representation; the feature fusion module is used to fuse the temporal dependence features and the long-distance dependence features to obtain fused features; the profiling generation module is used to output a user profile based on the fused features;
[0071] Since user profiling involves a large amount of categorical data (such as gender, region, interest tags, etc.), the role of the feature embedding module is to map these categorical features to a low-dimensional dense vector space to better capture the similarity and correlation between features. For example: User ID embedding: Assign a unique embedding vector to each user to capture the personalized differences between users. Categorical feature embedding: Embed categorical features such as gender and region and transform them into dense vector representations.
[0072] The behavioral data of users (such as browsing history, purchase records, etc.) is usually serialized, and the behavior sequence modeling module is used to capture the temporal features and dynamic changes of user behavior.
[0073] User profiling generation needs to comprehensively consider various features such as the basic information, behavioral data, and preference data of users. The role of the feature fusion module is to fuse these features from different sources to form a unified user feature representation, that is, fused features.
[0074] The image generation module can be constructed based on a classification network and a regression network. The classification network predicts the classification features (such as interest tags) of the user profile through a fully connected layer, and the regression network predicts continuous profile features (such as the user's consumption ability score). The user profile can include the user's interest tags, consumption preferences, behavior patterns, etc.
[0075] The loss function is constructed based on the cross-entropy loss function and the mean squared error function.
[0076] By setting the loss function to be constructed based on the cross-entropy loss function and the mean squared error function, that is, performing a weighted sum of the cross-entropy loss function and the mean squared error function. The cross-entropy loss function is used to measure the difference between the predicted interest tags and the true tags, and the mean squared error function is used to measure the difference between the predicted continuous features and the true values. Combining the advantages of both can further improve the training effect of the user profile generation model.
[0077] The specific steps of step S3 are as follows:
[0078] The data set is divided into a training set, a validation set, and a test set based on a splitting ratio of 7:2:1. The user profile generation model is trained using the training set until the loss value of the loss function is less than a preset loss threshold. During the training process, the user profile generation model is compressed using knowledge distillation technology, dynamic pruning technology, and model quantization technology. The trained user profile generation model is verified using the validation set to determine whether the image accuracy is greater than a preset accuracy threshold. If not, the verification fails, and the training set is expanded for continued training. If so, the verification is successful. The successfully verified user profile generation model is tested using the test set to determine whether the confidence level is greater than a preset confidence threshold. If not, the test fails, and the training set is expanded for continued training. If so, the test is successful, and the training ends.
[0079] The trained user profile generation model is deployed to an edge computing device with a device type of router, gateway, or camera.
[0080] Knowledge distillation technology is a machine learning model compression method aimed at transferring the knowledge of large models to small models to improve model performance and generalization ability. The core idea of knowledge distillation is to transform the knowledge of complex models into more concise and effective representations, enabling them to maintain high performance while reducing computational complexity and resource requirements. Dynamic pruning technology aims to remove parts of the neural network that have little impact on model performance (such as accuracy), such as neurons, connections (weights), etc., thereby reducing the complexity of the model and computational resource requirements. Model quantization technology reduces the storage space and computational complexity of the model by converting model parameters from high precision (such as 32-bit floating-point numbers) to low precision (such as 8-bit integers or 16-bit floating-point numbers).
[0081] The specific steps of step S6 are as follows:
[0082] The edge computing device records in real time a push log including at least the real-time user profile, recommended content, and push time;
[0083] Every preset upload period, the edge computing device obtains the current timestamp and the MAC address of the local machine, performs exclusive OR on the push log and the MAC address to obtain first-level encrypted data, encrypts the first-level encrypted data and the timestamp into second-level encrypted data through the AES algorithm, encrypts the second-level encrypted data and the MAC address into third-level encrypted data through the RSA algorithm, calculates the hash value of the push log through the SHA-256 algorithm, encrypts the third-level encrypted data and the hash value through the RC6 algorithm to obtain an encrypted log, uploads the encrypted log to the server for storage through the TLS protocol, and clears the local encrypted log.
[0084] By obtaining the current timestamp and the MAC address of the local machine every preset upload period, performing exclusive OR on the push log and the MAC address to obtain first-level encrypted data, encrypting the first-level encrypted data and the timestamp into second-level encrypted data through the AES algorithm, encrypting the second-level encrypted data and the MAC address into third-level encrypted data through the RSA algorithm, calculating the hash value of the push log through the SHA-256 algorithm, encrypting the third-level encrypted data and the hash value through the RC6 algorithm to obtain an encrypted log, and uploading the encrypted log to the server for storage through the TLS protocol; that is, alternating encryption is performed through symmetric encryption algorithms (AES algorithm, RC6 algorithm) and asymmetric encryption algorithms (RSA algorithm), combined with data transformation, timeliness verification, and integrity verification. Moreover, the TLS protocol is a secure transmission protocol, and at least 7 security measures are taken before and after (exclusive OR, timestamp, AES algorithm, RSA algorithm, SHA-256 algorithm, RC6 algorithm, TLS protocol), greatly enhancing the security of push log transmission and storage and avoiding being stolen and tampered with in plain text.
[0085] A preferred embodiment of a content push system for routers, gateways, and cameras according to the present invention includes the following modules:
[0086] A dataset construction module for obtaining a large amount of historical user information, preprocessing and annotating each piece of the historical user information, and constructing a dataset;
[0087] A user profile generation model creation module for creating a user profile generation model based on a feature extraction module, a feature embedding module, a behavior sequence modeling module, a feature fusion module, and a profile generation module, and setting a loss function for the user profile generation model;
[0088] A user profile generation model deployment module for training the user profile generation model through the dataset and the loss function, compressing the user profile generation model during the training process, and deploying the trained user profile generation model to an edge computing device of a device type of a router, a gateway, or a camera;
[0089] A personalized push module for the edge computing device to obtain real-time user information, preprocess the real-time user information, input it into the user profile generation model to obtain a real-time user profile, and perform personalized push based on the recommended content matched by the real-time user profile;
[0090] A user profile generation model optimization module for the edge computing device to continuously optimize the user profile generation model based on the input push feedback and the real-time user profile;
[0091] Continuously optimizing the user profile generation model through push feedback and real-time user profiles, that is, iterating the user profile generation model based on the latest data, can continuously improve the matching degree of content push.
[0092] A push log management module for the edge computing device to record in real time a push log including at least the real-time user profile, recommended content, and push time, encrypt the push log into an encrypted log, upload the encrypted log to a server for storage, and delete the encrypted log locally.
[0093] By recording in real time a push log including at least the real-time user profile, recommended content, and push time, encrypting the push log into an encrypted log and uploading it to a server for storage, it is convenient for later traceability.
[0094] By deleting the encrypted log locally after uploading the encrypted log to the server, the storage overhead of the edge computing device is effectively saved.
[0095] The dataset construction module is specifically used for:
[0096] Obtain a large amount of historical user information including basic information, behavior data, preference data, location data, and scenario data. After preprocessing each piece of the historical user information, which at least includes removing noise data, filling in missing values, and normalizing numerical data, use natural language processing technology to identify keyword extraction, sentiment analysis, and topic recognition for each piece of the preprocessed historical user information. Then, perform user portrait annotation on each piece of the historical user information, and construct a dataset based on the annotated historical user information.
[0097] By obtaining a large amount of historical user information including basic information, behavior data, preference data, location data, and scenario data, after preprocessing each piece of historical user information, which at least includes removing noise data, filling in missing values, and normalizing numerical data, use natural language processing technology to identify keyword extraction, sentiment analysis, and topic recognition for each piece of the preprocessed historical user information. Then, perform user portrait annotation on each piece of the historical user information, and construct a dataset based on the annotated historical user information; that is, collect multi-dimensional user information to construct a dataset, and perform data cleaning before construction. Combine natural language processing technology to annotate historical user information, that is, perform marking and classification, which is convenient for subsequent analysis and learning, greatly improves the quality of the dataset, greatly improves the training effect of the user portrait generation model, and then greatly improves the matching degree of content push.
[0098] In the user portrait generation model creation module, the feature extraction module, the feature embedding module, the behavior sequence modeling module, the feature fusion module, and the portrait generation module are connected in sequence;
[0099] The feature extraction module is used to extract initial features from user information; the feature embedding module is used to map the initial features to a low-dimensional dense vector space to obtain a dense vector representation; the behavior sequence modeling module is constructed based on long short-term memory units and self-attention units. The long short-term memory unit is used to capture temporal dependence features from the vector representation, and the self-attention unit is used to capture long-distance dependence features from the vector representation; the feature fusion module is used to fuse the temporal dependence features and the long-distance dependence features to obtain fused features; the portrait generation module is used to output a user portrait based on the fused features;
[0100] Since user portraits involve a large amount of categorical data (such as gender, region, interest tags, etc.), the role of the feature embedding module is to map these categorical features to a low-dimensional dense vector space to better capture the similarity and correlation between features. For example: User ID embedding: Assign a unique embedding vector to each user to capture the personalized differences between users. Categorical feature embedding: Embed categorical features such as gender and region and convert them into dense vector representations.
[0101] The behavior data of users (such as browsing history, purchase records, etc.) is usually serialized, and the behavior sequence modeling module is used to capture the temporal characteristics and dynamic changes of user behavior.
[0102] User portrait generation needs to comprehensively consider various characteristics of users, such as basic information, behavior data, and preference data. The role of the feature fusion module is to fuse these features from different sources to form a unified user feature representation, that is, the fused feature.
[0103] The portrait generation module can be constructed based on a classification network and a regression network. The classification network predicts the classification features of the user portrait (such as interest tags) through a fully connected layer, and the regression network predicts continuous portrait features (such as the consumption ability score of the user). The user portrait can include the user's interest tags, consumption preferences, behavior patterns, etc.
[0104] The loss function is constructed based on the cross-entropy loss function and the mean square error function.
[0105] By setting the loss function to be constructed based on the cross-entropy loss function and the mean square error function, that is, performing a weighted sum of the cross-entropy loss function and the mean square error function. The cross-entropy loss function is used to measure the difference between the predicted interest tags and the true tags, and the mean square error function is used to measure the difference between the predicted continuous features and the true values. It can combine the advantages of both and further improve the training effect of the user portrait generation model.
[0106] The user portrait generation model deployment module is specifically used for:
[0107] Dividing the data set into a training set, a validation set, and a test set based on a splitting ratio of 7:2:1, training the user portrait generation model through the training set until the loss value of the loss function is less than a preset loss threshold. During the training process, compress the user portrait generation model through knowledge distillation technology, dynamic pruning technology, and model quantization technology; verify the trained user portrait generation model through the validation set, and judge whether the portrait accuracy is greater than a preset accuracy threshold. If not, the verification fails, and expand the training set to continue training. If so, the verification is successful; test the user portrait generation model that has passed the verification through the test set, and judge whether the confidence level is greater than a preset confidence level threshold. If not, the test fails, and expand the training set to continue training. If so, the test is successful, and the training ends;
[0108] Deploy the trained user portrait generation model to edge computing devices with device types of routers, gateways, or cameras.
[0109] Knowledge distillation technology is a machine learning model compression method aimed at transferring the knowledge of large models to small models to improve model performance and generalization ability. The core idea of knowledge distillation is to transform the knowledge of complex models into more concise and effective representations, reducing computational complexity and resource requirements while maintaining high performance. Dynamic pruning technology aims to remove parts of the neural network that have little impact on model performance (such as accuracy), such as neurons, connections (weights), etc., thereby reducing the complexity of the model and computational resource requirements. Model quantization technology reduces the storage space and computational complexity of the model by converting model parameters from high precision (such as 32-bit floating-point numbers) to low precision (such as 8-bit integers or 16-bit floating-point numbers).
[0110] The push log management module is specifically used for:
[0111] The edge computing device records in real time the push logs that at least include the real-time user profile, recommended content, and push time;
[0112] The edge computing device obtains the current timestamp and the MAC address of the local machine every preset upload period, performs exclusive OR on the push log and the MAC address to obtain first-level encrypted data, encrypts the first-level encrypted data and the timestamp into second-level encrypted data through the AES algorithm, encrypts the second-level encrypted data and the MAC address into third-level encrypted data through the RSA algorithm, calculates the hash value of the push log through the SHA-256 algorithm, encrypts the third-level encrypted data and the hash value through the RC6 algorithm to obtain the encrypted log, uploads the encrypted log to the server for storage through the TLS protocol, and clears the encrypted log locally.
[0113] By obtaining the current timestamp and the MAC address of the local machine every preset upload period, performing exclusive OR on the push log and the MAC address to obtain first-level encrypted data, encrypting the first-level encrypted data and the timestamp into second-level encrypted data through the AES algorithm, encrypting the second-level encrypted data and the MAC address into third-level encrypted data through the RSA algorithm, calculating the hash value of the push log through the SHA-256 algorithm, encrypting the third-level encrypted data and the hash value through the RC6 algorithm to obtain the encrypted log, and uploading the encrypted log to the server for storage through the TLS protocol; that is, alternating encryption is performed through symmetric encryption algorithms (AES algorithm, RC6 algorithm) and asymmetric encryption algorithms (RSA algorithm), combined with data transformation, time validity verification, and integrity verification. Moreover, the TLS protocol is a secure transmission protocol, and at least 7 layers of security measures (exclusive OR, timestamp, AES algorithm, RSA algorithm, SHA-256 algorithm, RC6 algorithm, TLS protocol) are taken before and after, greatly improving the security of push log transmission and storage and avoiding being stolen and tampered with in plain text.
[0114] In summary, the advantages of the present invention are as follows:
[0115] 1. A dataset is constructed by obtaining a large amount of historical user information, preprocessing it, and annotating it. Then, a user portrait generation model is created based on a feature extraction module, a feature embedding module, a behavior sequence modeling module, a feature fusion module, and a portrait generation module. The loss function of the user portrait generation model is set, and the user portrait generation model is trained using the dataset and the loss function. During the training process, the user portrait generation model is compressed, and the trained user portrait generation model is deployed to an edge computing device with a device type of router, gateway, or camera. The edge computing device obtains real-time user information, preprocesses it, and inputs it into the user portrait generation model to obtain a real-time user portrait. Based on the real-time user portrait, recommended content is matched for personalized push, and the user portrait generation model is continuously optimized based on the input push feedback and the real-time user portrait. The edge computing device records in real time a push log that includes at least the real-time user portrait, recommended content, and push time, encrypts the push log into an encrypted log and uploads it to the server for storage, and deletes the encrypted log locally. That is, a user portrait generation model is created based on a feature extraction module, a feature embedding module, a behavior sequence modeling module, a feature fusion module, and a portrait generation module to generate a real-time user portrait, and then content is pushed based on the real-time user portrait. Since the dataset for training the user portrait generation model includes basic information, behavior data, preference data, location data, and scenario data, the user portrait can be modeled from multiple dimensions, effectively improving the accuracy of user portrait generation and avoiding the recommendation of homogeneous content based on single-dimensional modeling as in the traditional method. The behavior sequence modeling module uses long short-term memory units to capture temporal dependence features from vector representations, and self-attention units to capture long-distance dependence features from vector representations. Then, the feature fusion module fuses the temporal dependence features and long-distance dependence features, effectively improving the feature extraction ability and further improving the accuracy of user portrait generation. During the training process, the user portrait generation model is compressed using knowledge distillation technology, dynamic pruning technology, and model quantization technology. Combined with continuous verification and testing, the model volume and portrait generation accuracy of the user portrait generation model are effectively balanced, facilitating deployment on resource-constrained edge computing devices. The edge computing device can update the real-time user portrait in real time through the user portrait generation model for content push, effectively improving the dynamic adaptability, and without the need for downsampling processing as in the traditional method. Ultimately, the matching degree and flexibility of content push are greatly improved, and thus the user stickiness is greatly enhanced.
[0116] 2. The user portrait generation model is continuously optimized through push feedback and real-time user portraits, that is, iterated based on the latest data, which can continuously improve the matching degree of content push.
[0117] 3. By recording in real time at least the push logs including real-time user portraits, recommended content, and push times, encrypt the push logs into encrypted logs and upload them to the server for storage, which is convenient for later traceability.
[0118] 4. By clearing the local encrypted logs after uploading them to the encrypted log server, the storage overhead of edge computing devices can be effectively saved.
[0119] 5. By obtaining a large amount of historical user information including basic information, behavior data, preference data, location data, and scenario data, after preprocessing each piece of historical user information including at least removing noise data, filling in missing values, and normalizing numerical data, through natural language processing technology, extract keywords, perform sentiment analysis, and identify themes for each piece of preprocessed historical user information, and then label the user portraits for each piece of historical user information. Based on the labeled historical user information, construct a dataset; that is, collect multi-dimensional user information to construct a dataset, and perform data cleaning before construction. Combine natural language processing technology to label historical user information, that is, perform marking and classification, which is convenient for subsequent analysis and learning, greatly improves the quality of the dataset, greatly improves the training effect of the user portrait generation model, and thus greatly improves the matching degree of content push.
[0120] 6. By setting the loss function based on the cross-entropy loss function and the mean squared error function, that is, performing weighted summation on the cross-entropy loss function and the mean squared error function. The cross-entropy loss function is used to measure the difference between the predicted interest label and the true label, and the mean squared error function is used to measure the difference between the predicted continuous feature and the true value. It can combine the advantages of both, and further improve the training effect of the user portrait generation model.
[0121] 7. By obtaining the current timestamp and the MAC address of the local machine every preset upload period, perform exclusive OR on the push log and the MAC address to obtain the first-level encrypted data, encrypt the first-level encrypted data and the timestamp into the second-level encrypted data through the AES algorithm, encrypt the second-level encrypted data and the MAC address into the third-level encrypted data through the RSA algorithm, calculate the hash value of the push log through the SHA-256 algorithm, and encrypt the third-level encrypted data and the hash value through the RC6 algorithm to obtain the encrypted log, and upload the encrypted log to the server for storage through the TLS protocol; that is, perform alternating encryption through symmetric encryption algorithms (AES algorithm, RC6 algorithm) and asymmetric encryption algorithms (RSA algorithm), and also combine data transformation, timeliness verification, and integrity verification. And the TLS protocol is a secure transmission protocol, taking at least 7 security measures before and after (exclusive OR, timestamp, AES algorithm, RSA algorithm, SHA-256 algorithm, RC6 algorithm, TLS protocol), which greatly improves the security of push log transmission and storage, and avoids being stolen and tampered with in plain text.
[0122] Although the specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments we described are illustrative rather than used to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered by the scope protected by the claims of the present invention.
Claims
1. A content push method for routers, gateways, and cameras, characterized in that: It includes the following steps: Step S1: Obtain a large amount of historical user information, preprocess and annotate each piece of the historical user information, and then construct a dataset; Step S2: Create a user portrait generation model based on a feature extraction module, a feature embedding module, a behavior sequence modeling module, a feature fusion module, and a portrait generation module, and set the loss function of the user portrait generation model; Step S3: Train the user portrait generation model with the dataset and the loss function. During the training process, compress the user portrait generation model, and deploy the trained user portrait generation model to an edge computing device with a device type of router, gateway, or camera; Step S4: The edge computing device obtains real-time user information, preprocesses the real-time user information, inputs it into the user portrait generation model to obtain a real-time user portrait, and performs personalized push based on the real-time user portrait to match recommended content; Step S5: The edge computing device continuously optimizes the user portrait generation model based on the input push feedback and the real-time user portrait; Step S6: The edge computing device records in real time a push log including at least the real-time user portrait, recommended content, and push time, encrypts the push log into an encrypted log, uploads the encrypted log to the server for storage, and deletes the encrypted log locally.
2. The content push method for a router, gateway, and camera according to claim 1, wherein: Specifically, step S1 is as follows: Obtain a large amount of historical user information including basic information, behavior data, preference data, location data, and scenario data. After preprocessing each piece of the historical user information, which at least includes removing noise data, filling in missing values, and normalizing numerical data, use natural language processing technology to identify keyword extraction, sentiment analysis, and topic recognition for each piece of the preprocessed historical user information, and then annotate the user portraits for each piece of the historical user information. Based on the annotated historical user information, construct a dataset.
3. A content push method for a router, gateway, and camera according to claim 1, characterized in that: In step S2, the feature extraction module, the feature embedding module, the behavior sequence modeling module, the feature fusion module, and the portrait generation module are connected in sequence; The feature extraction module is used to extract initial features from user information; The feature embedding module is used to map the initial features to a low-dimensional dense vector space to obtain a dense vector representation. The behavior sequence modeling module is constructed based on a long short-term memory unit and a self-attention unit. The long short-term memory unit is used to capture temporal dependence features from the vector representation, and the self-attention unit is used to capture long-distance dependence features from the vector representation. The feature fusion module is used to fuse the temporal dependence features and the long-distance dependence features to obtain fused features. The portrait generation module is used to output a user portrait based on the fused features; The loss function is constructed based on a cross-entropy loss function and a mean square error function.
4. A content push method for a router, gateway, and camera according to claim 1, characterized in that: Specifically, step S3 is as follows: Divide the dataset into a training set, a validation set, and a test set based on a 7:2:1 split ratio. Train the user profile generation model using the training set until the loss value of the loss function is less than a preset loss threshold. During the training process, compress the user profile generation model using knowledge distillation technology, dynamic pruning technology, and model quantization technology. Verify the trained user profile generation model using the validation set to determine whether the portrait accuracy is greater than a preset accuracy threshold. If not, the verification fails, expand the training set and continue training. If so, the verification succeeds. Test the user profile generation model that has passed the verification using the test set to determine whether the confidence level is greater than a preset confidence threshold. If not, the test fails, expand the training set and continue training. If so, the test succeeds and the training ends. Deploy the trained user profile generation model to an edge computing device with a device type of router, gateway, or camera.
5. A content push method for a router, gateway, and camera according to claim 1, characterized in that: The specific steps of step S6 are as follows: The edge computing device records in real time a push log including at least the real-time user profile, recommended content, and push time. At every preset upload period, the edge computing device obtains the current timestamp and the MAC address of the local machine, performs an exclusive OR operation on the push log and the MAC address to obtain first-level encrypted data, encrypts the first-level encrypted data and the timestamp into second-level encrypted data using the AES algorithm, encrypts the second-level encrypted data and the MAC address into third-level encrypted data using the RSA algorithm, calculates the hash value of the push log using the SHA-256 algorithm, encrypts the third-level encrypted data and the hash value into an encrypted log using the RC6 algorithm, uploads the encrypted log to the server for storage via the TLS protocol, and deletes the encrypted log locally.
6. A content push system for routers, gateways, and cameras, characterized in that: It includes the following modules: A dataset construction module for obtaining a large amount of historical user information, preprocessing and annotating each piece of historical user information, and constructing a dataset. A user profile generation model creation module for creating a user profile generation model based on a feature extraction module, a feature embedding module, a behavioral sequence modeling module, a feature fusion module, and a portrait generation module, and setting the loss function of the user profile generation model. A user profile generation model deployment module for training the user profile generation model using the dataset and the loss function, compressing the user profile generation model during the training process, and deploying the trained user profile generation model to an edge computing device with a device type of router, gateway, or camera. A personalized push module for the edge computing device to obtain real-time user information, preprocess the real-time user information, input it into the user profile generation model to obtain a real-time user profile, and perform personalized push based on the real-time user profile to match recommended content. A user profile generation model optimization module for the edge computing device to continuously optimize the user profile generation model based on the input push feedback and the real-time user profile. The push log management module is used to record in real time the push logs of the edge computing device, which at least include the real-time user profile, recommended content, and push time, encrypt the push logs into encrypted logs, upload the encrypted logs to the server for storage, and delete the encrypted logs locally.
7. The content push system for a router, gateway, and camera according to claim 6, characterized in that: The dataset construction module is specifically used for: Obtaining a large amount of historical user information including basic information, behavior data, preference data, location data, and scenario data, preprocessing each piece of the historical user information by at least removing noise data, filling in missing values, and normalizing numerical data, and then identifying keywords, performing sentiment analysis, and identifying topics for each piece of the preprocessed historical user information through natural language processing technology, and further annotating the user profiles for each piece of the historical user information, and constructing a dataset based on each piece of the annotated historical user information.
8. A content push system for a router, gateway, and camera according to claim 6, characterized in that: In the user profile generation model creation module, the feature extraction module, the feature embedding module, the behavior sequence modeling module, the feature fusion module, and the profile generation module are connected in sequence; The feature extraction module is used to extract initial features from user information; The feature embedding module is used to map the initial features to a low-dimensional dense vector space to obtain a dense vector representation; the behavior sequence modeling module is constructed based on a long short-term memory unit and a self-attention unit, the long short-term memory unit is used to capture temporal dependence features from the vector representation, and the self-attention unit is used to capture long-distance dependence features from the vector representation; the feature fusion module is used to fuse the temporal dependence features and the long-distance dependence features to obtain fused features; the profile generation module is used to output a user profile according to the fused features; The loss function is constructed based on a cross-entropy loss function and a mean square error function.
9. A content push system for a router, gateway, and camera according to claim 6, characterized in that: The user profile generation model deployment module is specifically used for: Dividing the dataset into a training set, a validation set, and a test set according to a splitting ratio of 7:2:1, training the user profile generation model with the training set until the loss value of the loss function is less than a preset loss threshold, and compressing the user profile generation model during the training process through knowledge distillation technology, dynamic pruning technology, and model quantization technology; validating the trained user profile generation model with the validation set to determine whether the profile accuracy is greater than a preset accuracy threshold, if not, the validation fails, expand the training set and continue training, if so, the validation succeeds; testing the user profile generation model that has passed the validation with the test set to determine whether the confidence level is greater than a preset confidence level threshold, if not, the test fails, expand the training set and continue training, if so, the test succeeds, and end the training; Deploy the trained user profile generation model to an edge computing device of a device type of router, gateway, or camera.
10. A content push system for routers, gateways, and cameras according to claim 6, characterized in that: The push log management module is specifically used for: The edge computing device records in real time the push logs that at least include the real-time user profile, recommended content, and push time; The edge computing device obtains the current timestamp and the MAC address of the local machine at every preset upload cycle, performs exclusive OR on the push log and the MAC address to obtain first-level encrypted data, encrypts the first-level encrypted data and the timestamp into second-level encrypted data through the AES algorithm, encrypts the second-level encrypted data and the MAC address into third-level encrypted data through the RSA algorithm, calculates the hash value of the push log through the SHA-256 algorithm, encrypts the third-level encrypted data and the hash value through the RC6 algorithm to obtain an encrypted log, uploads the encrypted log to the server for storage through the TLS protocol, and clears the encrypted log locally.