Subscription control method and device of equipment, electronic equipment and storage medium

By obtaining real-time usage environment information and historical data of smart home devices, building a subscription prediction model and dynamically adjusting topic subscriptions, the problem of device resource waste and performance degradation is solved, and device subscription needs can be flexibly met.

CN118740905AActive Publication Date: 2024-10-01GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202410937633.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-10-01
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

When smart home IoT devices subscribe to a large number of topic messages, resources are wasted and performance degrades. The traditional unsubscription method is static and difficult to meet the actual needs of the device.

Method used

By obtaining real-time usage environment information of the target device, a prediction model is used to build a target subscription algorithm based on historical usage data, dynamically adjust the device topic subscription, and select a suitable topic to execute the subscription.

Benefits of technology

It realizes dynamically adjusting topic subscriptions according to the device usage environment to meet device needs and avoid resource waste and performance degradation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740905A_ABST
    Figure CN118740905A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a subscription control method and device of equipment, electronic equipment and a storage medium. The method comprises the following steps: acquiring real-time use environment information of target equipment; predicting target subscription demand information corresponding to the real-time use environment information according to a target subscription algorithm corresponding to the target equipment; and the target device selects a target theme from a plurality of themes according to the target subscription demand information to execute subscription. Through the embodiment of the invention, the theme required by the equipment can be predicted in real time according to the actual use environment information of the user on the basis of the target subscription algorithm, dynamic theme subscription is realized, the equipment subscription requirement is met, and resource waste and performance reduction can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of device control, and in particular to a device subscription control method and apparatus, electronic equipment, and storage medium. Background Art

[0002] At present, smart home IoT devices are widely used. Each device can set a variety of different topic messages, and the device can obtain relevant information by subscribing to message topics.

[0003] However, when a device subscribes to a large number of topic messages, many topics may not be required by the device, resulting in resource waste and performance degradation. In addition, traditional unsubscription methods are usually static, that is, manual subscription or unsubscription, while the actual needs of the device may change in different scenarios. Therefore, the static topic subscription method is difficult to meet the actual subscription needs of the device in real time. Summary of the invention

[0004] In view of the above problems, a device subscription control method and apparatus, an electronic device, and a storage medium are proposed to overcome the above problems or at least partially solve the above problems.

[0005] A first aspect of the present invention provides a subscription control method for a device, the method comprising:

[0006] Obtain real-time usage environment information of the target device;

[0007] Predicting target subscription demand information corresponding to the real-time usage environment information according to a target subscription algorithm corresponding to the target device;

[0008] The target device selects a target topic from a plurality of topics to perform subscription according to the target subscription requirement information.

[0009] A second aspect of the present invention provides a subscription control device for a device, the device comprising:

[0010] A real-time usage environment information acquisition module is used to acquire the real-time usage environment information of the target device;

[0011] A subscription demand prediction module, used to predict the target subscription demand information corresponding to the real-time usage environment information according to the target subscription algorithm;

[0012] The subscription execution module is used to select a target topic from multiple topics to execute subscription according to the target subscription demand information.

[0013] A third aspect of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the subscription control method of the device as described above when executed by the processor.

[0014] A fourth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the subscription control method of the device described above is implemented.

[0015] The embodiments of the present invention have the following advantages:

[0016] The embodiment of the present invention obtains the real-time usage environment information of the target device; then the target subscription demand information corresponding to the real-time usage environment information can be predicted according to the target subscription algorithm corresponding to the target device; then the target device can select the target topic from multiple topics to execute subscription according to the target subscription demand information, thereby realizing dynamic adjustment of device topic subscription according to the target subscription algorithm. When the device is in different real-time usage environments, a topic subscription strategy suitable for the real-time usage environment can be predicted, thereby satisfying the device subscription demand and avoiding resource waste and performance degradation. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0018] Figure 1 is a flowchart of the steps of subscription control of a device provided by an embodiment of the present invention;

[0019] Figure 2 is a flowchart of the steps of another device subscription control method provided by an embodiment of the present invention;

[0020] Figure 3 is a flowchart of the steps of another device subscription control method provided by an embodiment of the present invention;

[0021] Figure 4 is a flowchart of the steps of a topic subscription control method provided by an embodiment of the present invention;

[0022] Figure 5 It is a structural diagram of a subscription control device of a device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all 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.

[0024] Reference Figure 1 , shows a flowchart of a subscription control method for a device provided by an embodiment of the present invention, which may specifically include the following steps:

[0025] Step S101, obtaining real-time usage environment information of the target device;

[0026] The target device may be a household appliance, such as a refrigerator, a washing machine, a dryer, a sweeping robot, an air purifier, an air conditioner, etc.

[0027] The real-time usage environment information of the target device may include the device model of the target device, the environment in which the target device operates (eg, location, temperature, humidity, time, etc.), and topics to which the target device has subscribed.

[0028] Step S102, predicting target subscription demand information corresponding to the real-time usage environment information according to a target subscription algorithm corresponding to the target device;

[0029] For each device, a target subscription algorithm corresponding to the device can be pre-built. The target subscription algorithm can be used to predict the current subscription demand information of the device based on the real-time environmental information of the target device, and then installed into the device in the form of a chip. Therefore, during the operation of the device, the target subscription algorithm can be used to dynamically subscribe to topic messages.

[0030] After obtaining the target subscription algorithm and real-time usage environment information of the target device, the real-time usage environment information can be input into the target subscription algorithm for prediction to determine the real-time usage environment and the corresponding target subscription demand information, wherein the target subscription demand information is the topic that the target device needs to subscribe to in the real-time usage environment.

[0031] In one example, the target subscription requirement information may include the topic that the target device needs to subscribe to; in another example, the target subscription requirement information may be composed of feature information of the topic that the target device needs to subscribe to. Among them, the feature information may include topic category, topic importance, etc., and topic relevance. The topic type may be the category to which the topic belongs after classification according to a preset classification direction, and the topic importance may be set according to actual needs. For example, a topic associated with the operating status of the device may be set with a higher topic importance so that the user can pay attention to the operating status of the user when using the device. The topic relevance is used to represent multiple topics that have an associated relationship, wherein the association relationship between topics can be set according to the actual scenario, and there are no excessive restrictions on this in the embodiments of the present invention.

[0032] In one embodiment of the present invention, before obtaining the real-time usage environment information of the target device, it also includes: obtaining historical usage data of the target device; the historical usage data may include historical usage environment information and historical subscription information; based on the historical usage data, constructing a target subscription algorithm for the target device.

[0033] The historical usage environment information may include any one or more of the following:

[0034] Usage patterns, frequency of topic use, and importance of topics.

[0035] The usage mode of the target device may include the device's operating frequency, usage time period, common functions, etc. The usage mode of the target device may be set according to different scenarios of device use. For example, when the target device is an air conditioner, the usage mode of the air conditioner may be set to include winter mode, summer mode, sunny mode, and rainy mode. In actual applications, different modes may be set in advance in the device by the device manufacturer, or the device control center may provide a user-editable usage mode, and the user may set different device usage modes according to their preferences.

[0036] The frequency of topic usage is the frequency of data updates of the message topic. The importance of the topic may include the criticality of the message topic to the device function. The historical subscription information is the services or content that the user has subscribed to in the past, which may include the type, frequency, duration, etc. of the subscription.

[0037] In practical applications, historical usage data of the target device during its previous use can be collected, and then the historical usage data can be used for training to build a target subscription algorithm corresponding to the target device.

[0038] Specifically, a prediction model can be built. This model will use machine learning algorithms (such as decision trees, random forests, neural networks, etc., i.e., target subscription algorithms) to analyze the historical usage data of the device and learn how to predict subscription needs based on real-time usage environment information. The input of the prediction model can include real-time usage environment information (such as current usage patterns, topic usage frequency, topic importance, etc.), and the output is the predicted subscription demand information. Use historical data to train the model to ensure that the model can accurately learn the patterns and trends of subscription needs from historical usage data.

[0039] The training process of the prediction model may include the following processes:

[0040] Dataset division: Based on the collected historical usage data, the training set and test set are divided. The training set is used to train the prediction module, and the test set is used to test the trained model. The training set and the test set can be randomly extracted from the historical usage data according to the preset ratio. For example, 85% of the historical usage data is used as the training set, and 15% of the historical usage data is used as the test set.

[0041] Initial model and parameter determination: The target initial model can be determined from multiple candidate initial models by matching the features of each model and the features of the data to be trained. For example, the model using the decision tree algorithm is suitable for processing classification problems and data that require explanation. The model using the random forest algorithm is suitable for processing high-dimensional data and noisy data and has strong robustness. The model using the neural network algorithm is suitable for processing images, speech and complex pattern data and has strong nonlinear mapping capabilities.

[0042] After determining the target initial model, you can set the relevant hyperparameters for model training, such as learning rate, number of iterations, etc.

[0043] Among them, the learning rate determines the step size of the model parameter update in each iteration. The choice of learning rate has a significant impact on the training effect of the model. Too high or too low learning rate may cause the model training to not converge or converge too slowly. Choose the learning rate reasonably. The number of iterations (Epochs) is the number of times the entire training data set is traversed.

[0044] In one example, a fixed learning rate can be used throughout the training process. The learning rate can also be adjusted dynamically. For example, an initial learning rate is set, usually starting with a larger learning rate, such as 0.1 or 0.01, and then adjusting it as the training progresses. Gradually reducing the learning rate during training can help the model make more detailed adjustments as it approaches the optimal solution.

[0045] Specifically, the learning rate can be adjusted by applying a learning rate adjustment strategy, which may include but is not limited to: one of the following methods: learning rate decay, learning rate warm-up, cosine annealing, and adaptive learning rate algorithm.

[0046] The learning rate decay strategy is to gradually reduce the learning rate as the training progresses. For example, after a certain number of iterations, the learning rate is multiplied by a factor less than 1.

[0047] The learning rate warm-up strategy is to use a smaller learning rate at the beginning of training, and then gradually increase it to the initial learning rate to help the model converge better.

[0048] The cosine annealing strategy is to adjust the learning rate in the form of a cosine function, gradually reducing it from the initial learning rate to close to zero, and then starting again.

[0049] Adaptive learning rate algorithms (such as Adam, RMSprop, etc.) can automatically adjust the learning rate according to changes in the gradient.

[0050] Training process: input the historical usage data in the training set into the target initial model, and after being processed by the preset algorithm in the target initial model, output the first prediction result;

[0051] The algorithm parameters in the target initial model are adjusted based on the comparison result of the first prediction result with the historical subscription information in the historical usage data, so that the prediction result output by the model approaches the historical subscription information.

[0052] Iterative training: Use the model after the algorithm parameters are adjusted for iterative training, and count the actual number of iterations. When the actual number of iterations is greater than or equal to the preset number of iterations, output the algorithm parameters of the current model, and use the prediction model generated based on the algorithm parameters as the subscription prediction algorithm.

[0053] Testing process: Input the historical usage environment information in the test set into the trained subscription prediction model to obtain the second prediction result output by the subscription prediction model, and determine the accuracy of the subscription prediction model based on the second prediction result and the historical subscription information of the test set. Accuracy = accuracy number / total number of tests. When the matching degree between the second prediction result and the historical subscription information of the test set reaches the preset matching degree, the accuracy number is increased by one.

[0054] When the accuracy of the subscription prediction model is lower than the preset accuracy, it means that the current subscription prediction model has low accuracy, and the iteration is continued or the model is reselected for training. When the accuracy of the trained subscription prediction model is greater than or equal to the preset accuracy, the subscription prediction model training is determined to be completed, and the trained subscription prediction model can be used to predict the real-time usage environment information.

[0055] In one example, the acquired historical usage data may be preprocessed before building the prediction model to facilitate model training. The data preprocessing method may include but is not limited to any of the following:

[0056] Data cleaning, data transformation, data dimension reduction, data encoding, and data normalization.

[0057] Data cleaning can specifically include any one of the following methods: processing missing values, processing outliers, and data deduplication; processing missing values ​​can specifically include filling missing values ​​(such as using mean, median, mode, or prediction model) or deleting records containing missing values. Processing outliers can specifically include detecting and processing outliers, and statistical methods (such as Z-score, IQR) or visualization tools (such as box plots) can be used. Deduplication can specifically include deleting duplicate records.

[0058] Data integration can be used to merge data sets from different sources using join operations, or to detect and process redundant features and identify related data using correlation analysis (such as Pearson's correlation coefficient).

[0059] Data transformation may include any one or more of standardization / normalization, discretization, and feature engineering, wherein standardization / normalization may be used to scale data to a specific range, and the specific standardization / normalization method may be any one of Z-score standardization and minimum-maximum normalization. Discretization may be used to convert continuous variables into discrete variables, such as binning. Feature engineering may be used to create new features, such as polynomial features and interactive features.

[0060] Data dimensionality reduction can include principal component analysis, feature selection, etc. Among them, principal component analysis can project data into a low-dimensional space through linear transformation to retain the main information. Feature selection can select the most relevant features, and can be performed using filtering, packaging, or embedding methods.

[0061] Data encoding may include any of the encoding methods such as One-Hot Encoding and Label Encoding, wherein One-Hot Encoding is used to convert categorical variables into binary vectors, and Label Encoding is used to convert categorical variables into numerical labels.

[0062] Data normalization can include any of text normalization and time series normalization. Text normalization can be used to process text data, such as stemming, lemmatization, and stop word removal. Time series normalization can be used to process time series data, such as smoothing and differencing.

[0063] In another example, the performance of the model can also be evaluated through cross-validation or other validation methods to ensure its prediction accuracy on unknown data.

[0064] Among them, cross-validation divides the dataset into multiple subsets and performs training and validation on different subsets to more accurately evaluate the generalization ability of the model.

[0065] The cross-validation method may include, but is not limited to, any one or more of K-fold cross-validation, leave-one-out cross-validation, and time series cross-validation.

[0066] The data processing of K-fold cross validation is as follows: randomly divide the data set into K subsets (folds) of equal size. Each time, select one subset as the validation set, and the remaining K-1 subsets as the training set. Repeat K times, each time selecting a different subset as the validation set. The performance of the final model is the average of the K validation results.

[0067] The data processing process of leave-one-out cross-validation is: select one sample as the validation set each time, and the rest of the samples as the training set. Repeat N times (N is the total number of samples), and select a different sample as the validation set each time. Leave-one-out cross-validation can be applied to situations where the number of samples is small.

[0068] The data processing process of stratified K-fold cross validation is similar to that of K-fold cross validation, but the category distribution in each subset is consistent with the category distribution of the entire dataset. Stratified K-fold cross validation can be applied to datasets with imbalanced categories.

[0069] Time series cross validation can be applied to time series data, dividing the data set in chronological order. Each time a time window is selected as the validation set, and the rest of the data is used as the training set. This ensures that the model is validated on future data.

[0070] Other validation methods may include, but are not limited to, simple partitioning, bootstrapping, and nested cross validation.

[0071] Simple partitioning can randomly divide the data set into a training set and a test set. The model is trained on the training set and the model performance is evaluated on the test set. The simple partitioning verification method is simple and fast, but it may be greatly affected by the data partitioning.

[0072] The bootstrap method can randomly extract samples from the data set with replacement to form a new training set. The samples that were not selected are used as the validation set. After repeated multiple times, the average performance of the model is calculated.

[0073] Nested cross validation is used for model selection and hyperparameter tuning. K-fold cross validation is used externally and another K-fold cross validation is used internally for hyperparameter tuning. This ensures the independence of model selection and hyperparameter tuning.

[0074] Through cross-validation or other validation methods, the generalization ability of the model can be evaluated more accurately to avoid overfitting and underfitting. Choosing appropriate validation methods and evaluation indicators, combined with actual problems and data characteristics, can effectively improve the performance and reliability of the model.

[0075] In an embodiment of the present invention, after the model is trained, the trained model can be deployed on the target device in the form of a chip, so that it can predict subscription needs in real time based on the device's usage environment information. The model can also continuously optimize the model based on actual usage to improve the accuracy and response speed of the prediction. That is, after the model training is completed, the prediction effect of the model can also be monitored regularly to ensure that it can adapt to changes in user behavior. In addition, when new historical usage data is available, the model can be updated in a timely manner to maintain its prediction ability.

[0076] In actual applications, a model monitoring cycle can be set, such as a 10-day cycle, and the performance of the model can be verified and evaluated every 10 days. When it is determined that the model performance does not meet the preset performance conditions, the model is updated or retrained based on the historical usage data collected in the last 20 days. The preset performance conditions can be set according to the actual scenario. For example, the accuracy of the model prediction can be used as the performance condition for model evaluation. When the accuracy is lower than 80%, the model is iteratively updated, and when the accuracy is lower than 60%, the model is retrained.

[0077] In the embodiment of the present invention, the target subscription algorithm may be adjusted accordingly with the change of the historical usage data to adapt to the latest target device. Specifically, the adjustment triggering process of the target subscription algorithm may include but is not limited to any of the following:

[0078] (1) When the usage pattern of the target device is monitored to be adjusted, the target subscription algorithm is rebuilt based on the adjusted usage pattern.

[0079] In actual applications, when the usage mode of the target device is adjusted, the usage environment data and subscription information after the adjusted usage mode can be collected, and then the target subscription algorithm can be re-trained based on the collected data. The usage mode change can include deleting the original usage mode, adding a new usage mode, and modifying any one or more of the parameters of the original mode.

[0080] (2) When the adjustment of the topic importance of the target device is detected, the target subscription algorithm is rebuilt based on the adjusted topic importance.

[0081] Among them, the topic importance adjustment may include the topic importance level adjustment, specifically including adjustment from a high level to a low level, or from a low level to a high level.

[0082] For example, the importance level of Topic 1 is level 1. When the importance level of Topic 1 is updated to level 2, it can be determined that the importance of the topic has changed.

[0083] (3) When the usage pattern and topic importance of the target device are monitored to be adjusted, the target subscription algorithm is rebuilt based on the adjusted usage pattern and topic importance.

[0084] By updating the target subscription algorithm corresponding to the target device when the target device usage mode and / or topic importance is adjusted, a target subscription algorithm suitable for the current target device is constructed, and then the subscription needs of the target device are predicted based on the target subscription algorithm. Even if the usage environment of the target device changes, the corresponding topic subscription needs can be obtained, and dynamic subscription topics can be achieved.

[0085] Step S103: the target device selects a target topic from multiple topics to perform subscription according to the target subscription requirement information.

[0086] After determining the target subscription requirement information, the target device may determine a target topic that matches the target subscription requirement among multiple topics published by the server, and then subscribe to the target topic.

[0087] In one embodiment of the present invention, after determining the target topic, the target topic can be compared with the topic currently subscribed by the target device, and then the topic subscription or topic unsubscription is performed, so that the subscription topic of the final target device is the target topic.

[0088] Specifically, the non-target topics among the currently subscribed topics of the target device may be unsubscribed, and the target topics that are not subscribed to among the currently subscribed topics may be supplementally subscribed.

[0089] For example, when it is determined according to the target subscription demand information that the target topics of the target device 1 include topic 1, topic 10, and topic 11, and the topics currently subscribed by the target device 1 are topic 1, topic 2, and topic 5, the topic subscription adjustment method for the target device is to unsubscribe from topic 2 and topic 5, and add subscriptions to topic 10 and topic 11. At this time, the topics finally subscribed by the target device 1 are topic 1, topic 10, and topic 11, which match the current real-time environment of the target device 1.

[0090] In an embodiment of the present invention, the real-time usage environment information of the target device can be obtained; the target subscription demand information corresponding to the real-time usage environment information can be predicted according to the target subscription algorithm; and then the target device can select a target topic from multiple topics according to the target subscription demand information to perform subscription, so that the device topic subscription can be dynamically adjusted according to the target subscription algorithm. When the device is in different real-time usage environments, a topic subscription strategy suitable for the real-time usage environment can be predicted, thereby satisfying the device subscription demand and avoiding resource waste and performance degradation.

[0091] Reference Figure 2 , shows a flowchart of another method for controlling a subscription of a device provided by an embodiment of the present invention, which may specifically include the following steps:

[0092] Step S201, obtaining real-time usage environment information of the target device;

[0093] Step S202, predicting target subscription demand information corresponding to the real-time usage environment information according to a target subscription algorithm corresponding to the target device;

[0094] In step S203, the target device may select a target topic from multiple topics to perform subscription according to the target subscription requirement information.

[0095] Step S204, obtaining the unused time of the subscribed topics in the target device;

[0096] In actual applications, if the device's subscribed topics are not used for a long time, resources will be occupied and resource waste will be caused. To avoid resource waste, during the operation of the target device, the unused time of each subscribed topic can be detected in real time. Specifically, a timer is set for the subscribed topic of the target device each time the use ends to count the unused time. When the target device uses the subscribed topic again, the timer is reset, that is, the time is cleared.

[0097] Step S205, determining a target topic whose unused time is greater than a preset time threshold;

[0098] Among them, the preset time threshold can be set according to the actual scenario.

[0099] In one embodiment of the present invention, a preset duration threshold may also be set based on the historical usage data corresponding to the target theme. Specifically, the usage pattern of the target theme may be determined based on the historical usage data, and then the preset duration threshold may be set based on the usage pattern. The usage pattern may be information associated with the usage time and the usage frequency, and the setting of the preset duration threshold may also be associated with the current time.

[0100] For example, the usage pattern of the target theme is that the target theme is frequently used in July and August throughout the year, and is less used in other months. When setting the preset duration threshold for the target theme, if the current month is July or August, the preset duration threshold is the first preset duration threshold; if the current month is not July or August, the preset duration threshold is the second preset duration threshold, wherein the first preset duration threshold is greater than the second preset duration threshold to avoid mistakenly canceling the target theme in July and August when the device may frequently use the target theme.

[0101] Step S206, cancel subscription to the target topic.

[0102] If the target topic has not been used for a long time, you can unsubscribe from the target topic to release the resources occupied by the target topic subscription and avoid resource waste.

[0103] The embodiment of the present invention proposes a smart mechanism for canceling device subscription messages. By combining intelligent algorithms and message usage monitoring and analysis technology to monitor the unused time of topics, the device can dynamically adjust the subscription behavior according to a certain strategy. This mechanism can effectively solve the problem of too many subscription messages for smart home devices, reduce unnecessary message transmission and processing, and improve the efficiency and performance of the system.

[0104] In one embodiment of the present invention, it is also possible to determine whether the target theme needs to be cancelled in combination with the unused time and the theme importance of the target theme. Specifically, when the unused time of the target theme is greater than a preset time threshold, if the theme importance of the target theme is lower than the target theme importance, the target theme is cancelled.

[0105] In actual applications, different preset duration thresholds may be set for topics of different importance, and the preset duration threshold for topics of high importance is greater than the preset duration threshold for topics of low importance.

[0106] For example, the importance level of Topic 1 is level 1, the importance level of Topic 2 is level 2, and the importance level of Topic 3 is level 3. The importance levels of Topic 1, Topic 2, and Topic 3 are ranked from high to low as: Topic 1 > Topic 2 > Topic 3. Therefore, when setting the preset duration threshold, the preset duration threshold corresponding to Topic 1 > the preset duration threshold corresponding to Topic 2 > the preset duration threshold corresponding to Topic 3.

[0107] In one embodiment of the present invention, it is also possible to determine whether the target topic needs to be cancelled in combination with the unused time and the current time. Specifically, the usage pattern of the target topic can be determined based on the historical usage data of the target topic. Its usage pattern includes a frequently used time period with a usage frequency higher than a preset usage frequency. When the unused time of the target topic is greater than the preset time threshold, the current time is obtained, and it is determined whether the current time is in the frequently used time period corresponding to the target topic. If the current time is not in the frequent time period corresponding to the target topic, the target topic is unsubscribed. If the current time is in the frequent time period corresponding to the target topic, the timer continues to accumulate the unused time during the frequent time period, and the subscription is not unsubscribed. If the target topic has not been used during the frequent time period, the subscription is unsubscribed when the current time is not in the frequent use time. If the device uses the target topic during the frequent time period, the timer is reset.

[0108] In an embodiment of the present invention, whether the target topic needs to be cancelled may also be determined in combination with the non-use time and the device status and / or the environment status.

[0109] When the unused time of the target topic is greater than the preset time threshold, and the device status and / or environment status meet the preset conditions, the target topic is unsubscribed, wherein the preset conditions of the device status and environment status can be set according to the device status and environment status during the previous use of the target topic.

[0110] Specifically, when the unused time of the target topic is greater than the preset time threshold, and the device state is not in the target device state and / or the environment state is not in the target environment state, the target topic is unsubscribed. The target device state and environment state are the states of the target topics that the device frequently uses and subscribes to. The device state is the operating state of the device, and the environment state is the operating environment state of the device, such as ambient temperature, humidity, outdoor weather, etc.

[0111] In the embodiment of the present invention, when there are multiple target topics whose unused time is greater than a preset time threshold, the priority of unsubscribing the multiple target topics can be determined comprehensively according to the unused time and the importance of the topic.

[0112] For example, a first weight of unused time and a second weight of topic importance can be set. The first weight and the second weight can be set according to the actual application. In the embodiment of the present invention, there is no excessive restriction on this. Then, the score of each target topic can be determined in combination with the first weight information and the second weight information. For example, the score of the target topic = first weight * unused time score + second weight * topic importance score. Among them, the unused time score and the topic importance score can be converted according to the preset indicator scoring rules. The indicator scoring rules include the conversion rules between unused time and unused time score, and the conversion rules between topic importance and topic importance score. The shorter the unused time and the higher the topic importance, the higher the corresponding unused time score and topic importance score.

[0113] After determining the score of each target topic, you can sort them from low to high according to the score to determine the priority of unsubscribing multiple target topics. The lower the score, the higher the priority, and the target topics with low scores are unsubscribed first.

[0114] In one example, after determining the score of each target topic, a preset number of target topics can be cancelled according to the score priority, wherein the preset number can be set according to actual needs and is not excessively restricted in the embodiments of the present invention.

[0115] In another example, after determining the score of each target topic, the target topic whose topic score is lower than the preset score can be cancelled, wherein the preset score can be set according to actual needs and is not excessively restricted in the embodiments of the present invention.

[0116] In the embodiment of the present invention, by obtaining the real-time usage environment information of the target device; predicting the target subscription demand information corresponding to the real-time usage environment information according to the target subscription algorithm; the target device can select a target topic from multiple topics according to the target subscription demand information to perform subscription, and can obtain the unused time of multiple topics subscribed in the target device; determine the target topic whose unused time is greater than the preset time threshold; and unsubscribe from the target topic, the target topic of the target device is dynamically determined by the target subscription algorithm. And during the operation of the target device, the unused topic can be canceled immediately by monitoring the unused time of the topic, avoiding resource waste and performance degradation.

[0117] Reference Figure 3 , shows a flowchart of another method for controlling a subscription of a device provided by an embodiment of the present invention, which may specifically include the following steps:

[0118] Step S301, obtaining real-time usage environment information of the target device;

[0119] Step S302, predicting target subscription demand information corresponding to the real-time usage environment information according to the target subscription algorithm corresponding to the target device;

[0120] Step S303, determining the target topic to be subscribed by the target device and the subscription time period of the target topic according to the target subscription requirement information;

[0121] In actual applications, different topics can be subscribed in different time periods. The target subscription requirement obtained based on the target subscription algorithm is a subscription policy set for the target device, which may include the target topics that the target device needs to subscribe to and the specific subscription time period for each topic.

[0122] After obtaining the target subscription requirement information, the target topic and the subscription time period of the target topic can be parsed.

[0123] For example, the target subscription requirement information of the target device 1 may be to subscribe to topic 1 from 10:00 to 10:30, to subscribe to topic 10 from 18:00 to 19:00, and to subscribe to topic 11 from 22:00 to 23:00.

[0124] Step S304: the target device subscribes to a target topic from multiple topics according to a subscription time period.

[0125] When determining the target topic and the subscription time period of the target topic, subscribe to the corresponding topic in the time period.

[0126] For example, target device 1 automatically subscribes to topic 1 from 10:00 to 10:30 and unsubscribes from topic 1 at other times; automatically subscribes to topic 10 from 18:00 to 19:00 and unsubscribes from topic 10 at other times; subscribes to topic 11 from 22:00 to 23:00 and unsubscribes from topic 11 at other times.

[0127] In an embodiment of the present invention, the target device subscribes to the target topic from multiple topics according to the subscription time period, including: obtaining current time information; when the current time is consistent with the start time of the subscription time period, subscribing to the target topic from the multiple topics.

[0128] In actual applications, the current time (i.e., real-time usage time) can be determined based on the clock of the target device, and then the current time is matched with the time period, and the subscription or unsubscription of the topic is determined based on the matching result.

[0129] For example, when the current time is 10:00, subscribe to topic 1. When the current time is 18:00, subscribe to topic 10.

[0130] In an embodiment of the present invention, real-time usage environment information of the target device can be obtained; then, the target subscription demand information corresponding to the real-time usage environment information can be predicted according to the target subscription algorithm. Thus, based on the target subscription algorithm, the subject required by the device can be predicted in real time according to the user's actual usage environment information, and dynamic subscription to the subject can be achieved, which can not only meet the device subscription needs, but also avoid resource waste and performance degradation.

[0131] Reference Figure 4 , shows a topic subscription control method in an embodiment of the present invention, comprising the following steps:

[0132] Step S401, collecting and analyzing device usage data (ie, historical usage data).

[0133] Before implementing a smart mechanism to unsubscribe devices from messages, the device first needs to collect and analyze information such as device usage patterns, data frequency, and importance.

[0134] Among them, the usage mode may include the device's operating frequency, usage time period, common functions, etc.; the data frequency refers to the frequency of data updates on the message subject; the importance refers to the criticality of the message subject to the device function, which can be specifically expressed using the importance level.

[0135] Step S402: predicting the future subscription needs of the device based on an intelligent algorithm.

[0136] Based on the collected usage data, the intelligent algorithm (i.e., target subscription algorithm) is trained and applied to the device in the form of a chip. The intelligent algorithm can dynamically determine whether to unsubscribe from certain topics by analyzing factors such as the device's usage pattern, data frequency, and importance. The intelligent algorithm can also automatically adjust the subscription behavior based on the actual needs of the device and environmental conditions to ensure that the message topics subscribed by the device are always consistent with its needs, such as the support vector machine algorithm. The intelligent algorithm can also learn the device's usage pattern based on historical data and predict the device's future subscription needs based on the learning results.

[0137] For example, by collecting the user's usage habits within a week, the device background records the user's device usage at each time point, such as mode, switching frequency (i.e. command issuance frequency), and local weather conditions, an algorithm model specifically for the user is trained and installed in the device in the form of a chip.

[0138] Step S403: the device implements message usage monitoring and analysis technology.

[0139] By recording and analyzing the device's processing of messages, you can monitor the device's use of different message topics.

[0140] Step S404, determine whether the message of a certain topic has not been used for a long time. When the determination result is "yes", go to step S405, when the determination result is no, execute step S406.

[0141] When it is found that the messages of a certain topic have not been used by the device for a long time (that is, the unused time is greater than the preset time threshold), the topic will be marked as a topic that can be unsubscribed.

[0142] Step S405, automatically cancel the subscription to the topic message.

[0143] The device will automatically unsubscribe from topics that are marked as unsubscribeable. The unsubscription action is completed automatically without manual intervention. This makes subscription management more intelligent and efficient.

[0144] Step S406: The device continuously collects new data and makes real-time adjustments and optimizations.

[0145] In the embodiment of the present invention, the device can continuously collect new data related to the use of the topic, and adjust the subscription strategy in real time according to the data. When the usage mode of the device and / or the importance of the topic changes, the algorithm can be changed accordingly, and then the subscription behavior can be adjusted in time by using the intelligent algorithm to adapt to the new needs of the device. This real-time adjustment and optimization ensures the flexibility and adaptability of the system.

[0146] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0147] Reference Figure 5 , shows a schematic diagram of the structure of a subscription control device of a device provided by an embodiment of the present invention, which may specifically include the following modules:

[0148] A real-time usage environment information acquisition module 501 is used to acquire the real-time usage environment information of the target device;

[0149] A subscription demand prediction module 502 is used to predict the target subscription demand information corresponding to the real-time usage environment information according to the target subscription algorithm corresponding to the target device;

[0150] The subscription execution module 503 is used to select a target topic from multiple topics to execute subscription according to the target subscription requirement information.

[0151] In one embodiment of the present invention, the device further comprises:

[0152] A historical usage data acquisition module, used to acquire historical usage data of the target device; the historical usage data includes historical usage environment information and historical subscription information;

[0153] The target subscription algorithm building module is used to build a target subscription algorithm for the target device based on the device attribute data and the historical usage data.

[0154] In one embodiment of the present invention, the device further comprises:

[0155] An unused time acquisition module, used to acquire the unused time of the subscribed topics in the target device;

[0156] A target theme determination module, used to determine the target theme whose unused time is greater than a preset time threshold;

[0157] The target topic unsubscription module is used to unsubscribe from the target topic.

[0158] In one embodiment of the present invention, the historical usage environment information includes any one or more of the following:

[0159] Usage patterns, frequency of topic use, and importance of topics.

[0160] In one embodiment of the present invention, the device further comprises:

[0161] A first subscription algorithm adjustment module, configured to reconstruct the target subscription algorithm based on the adjusted usage pattern when the usage pattern adjustment is detected;

[0162] Or, a second subscription algorithm adjustment module is used to rebuild the target subscription algorithm based on the adjusted topic importance when the topic importance adjustment is monitored.

[0163] In one embodiment of the present invention, the device further comprises:

[0164] The third subscription algorithm adjustment module is used to rebuild the target subscription algorithm based on the adjusted usage model and topic importance when the usage pattern and the topic importance are monitored.

[0165] In an embodiment of the present invention, the subscription execution module 504 may include:

[0166] A subscription time period determination submodule, used to determine the target topic to be subscribed by the target device and the subscription time period of the target topic according to the target subscription requirement information;

[0167] The subscription control submodule is used to subscribe to the target topic from multiple topics according to the subscription time period.

[0168] In an embodiment of the present invention, the subscription control submodule may include:

[0169] A real-time usage time determination unit is used to obtain current time information;

[0170] The target topic subscription unit is used to unsubscribe the target topic when the current time is consistent with the start time of the subscription time period. The target topic unsubscription unit is used to unsubscribe the target topic when the actual usage time does not match the subscription time period.

[0171] In an embodiment of the present invention, real-time usage environment information of the target device can be obtained; target subscription demand information corresponding to the real-time usage environment information can be predicted according to the target subscription algorithm; the target device selects a target topic from multiple topics to perform subscription according to the target subscription demand information, so that the device topic subscription can be dynamically adjusted according to the target subscription algorithm. When the device is in different real-time usage environments, a topic subscription strategy suitable for the real-time usage environment can be predicted, thereby satisfying the device subscription demand and avoiding resource waste and performance degradation.

[0172] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0173] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0174] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0175] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0176] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0178] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0179] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0180] The subscription control method and apparatus, electronic device, and storage medium of a device provided are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A device subscription control method, characterized in that: The method comprises: Obtain real-time usage environment information of the target device; Predicting target subscription demand information corresponding to the real-time usage environment information according to a target subscription algorithm corresponding to the target device; The target device selects a target topic from a plurality of topics to perform subscription according to the target subscription requirement information.

2. The method according to claim 1, characterized in that Before obtaining the real-time usage environment information of the target device, the method further includes: Acquire historical usage data of the target device; the historical usage data includes historical usage environment information and historical subscription information; A target subscription algorithm for the target device is constructed based on the historical usage data.

3. The method according to claim 1, characterized in that Also includes: Obtaining the unused duration of the subscribed topics in the target device; Determine the target topic whose unused time is greater than a preset time threshold; Unsubscribe from the target topic.

4. The method according to claim 2, characterized in that: The historical usage environment information includes any one or more of the following: Usage patterns, frequency of topic use, and importance of topics.

5. The method according to claim 4, characterized in that Also includes: When the usage pattern adjustment is detected, reconstructing the target subscription algorithm based on the adjusted usage pattern; Or, when the topic importance adjustment is monitored, the target subscription algorithm is reconstructed based on the adjusted topic importance.

6. The method according to claim 4, characterized in that Also includes: When the usage pattern and the topic importance are adjusted, the target subscription algorithm is reconstructed based on the adjusted usage pattern and topic importance.

7. The method according to any one of claims 1 to 6, characterized in that The target device selects a target topic from a plurality of topics to perform subscription according to the target subscription requirement information, including: Determine the target topic to be subscribed by the target device and the subscription time period of the target topic according to the target subscription requirement information; The target device subscribes to the target topic from a plurality of topics according to the subscription time period.

8. The method according to claim 7, characterized in that The target device subscribes to the target topic from a plurality of topics according to the subscription time period, including: Get current time information; When the current time is consistent with the start time of the subscription time period, the target topic is subscribed from multiple topics.

9. A subscription control device for a device, characterized in that: The device comprises: A real-time usage environment information acquisition module is used to acquire the real-time usage environment information of the target device; A subscription demand prediction module, used to predict the target subscription demand information corresponding to the real-time usage environment information according to the target subscription algorithm corresponding to the target device; The subscription execution module is used to select a target topic from multiple topics to execute subscription according to the target subscription demand information.

10. An electronic device, characterized in that: The device comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the subscription control method of the device according to any one of claims 1 to 8 is implemented.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the subscription control method of the device according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Data subscription method and device, electronic equipment and storage medium

    CN111654397A

  • Theme determination method, related method, device and system

    CN113347074A

  • Method and device for dynamically subscribing data, electronic equipment and storage medium

    CN114979242A

  • Message subscription method and device, equipment and storage medium

    CN115086066A

  • Network communication method and device, computer equipment and storage medium

    CN115190164A