Recommendation method and device of Internet of Things equipment, electronic equipment, storage medium and program product
By constructing an indicator dataset and utilizing an IoT device recommendation model with deep learning and statistical modules, the most matching IoT devices are automatically selected, solving the problem of low recommendation accuracy in existing technologies and achieving higher recommendation precision and flexibility.
Patent Information
- Application Number
- CN202510783060.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-12-16
AI Technical Summary
Existing IoT device recommendation methods rely too heavily on manual analysis, resulting in low recommendation accuracy and difficulty in achieving precise recommendation results.
By acquiring IoT device data and user behavior data, an indicator dataset is constructed. After preprocessing, it is input into the IoT device recommendation model. The BERT deep learning module and Bayesian statistics module are used to extract valid HOSTNAME and reconstruct URLs, determine the initial weights, and calculate the matching probability value to select the most matching IoT device.
It improves the accuracy and flexibility of IoT device recommendations, avoids interference from human factors, and enhances the precision and scope of application of recommendations.
Smart Images

Figure CN121144591A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) technology, and more particularly to a method, apparatus, electronic device, storage medium, and program product for recommending IoT devices. Background Technology
[0002] Internet of Things (IoT) device identification and recommendation is an important derivative product for home users to use mobile services.
[0003] The existing method for recommending IoT devices is for data analysts or data operations to analyze users' existing device usage records based on business experience, associate devices with high correlation according to rules, and recommend devices to users to bind.
[0004] Existing IoT device recommendation methods rely excessively on the business experience and analytical capabilities of relevant personnel, while manual analysis often has limited capacity to consider various correlations. Furthermore, recommendations based on historical data rarely achieve the desired accuracy. At the product operation level, recommending similar devices to all users with specific characteristics based on analytical conclusions significantly reduces recommendation accuracy. Summary of the Invention
[0005] This invention provides a method, apparatus, electronic device, storage medium, and program product for recommending Internet of Things (IoT) devices, in order to address the shortcomings of low accuracy in IoT device recommendations in the prior art and improve the accuracy of IoT device recommendations.
[0006] In a first aspect, the present invention provides a method for recommending Internet of Things (IoT) devices, comprising: obtaining an indicator dataset based on IoT device data and user behavior data of using IoT devices; preprocessing the indicator data in the indicator dataset to obtain feature data of IoT devices and users; the feature data including hostname data and URL data; inputting the feature data into an IoT device recommendation model to obtain the most matching IoT device output by the IoT device recommendation model; wherein, the IoT device recommendation model extracts valid hostnames and reconstructed URLs from the feature data; determines the initial weights of valid hostnames and reconstructed URLs; determines at least one matching probability value between a matching IoT device and a recommendation scenario based on the valid hostname, reconstructed URL, and initial weights; comparing the matching probability values, and selecting the matching IoT device corresponding to the largest matching probability value as the most matching IoT device.
[0007] In one embodiment, the indicator data in the indicator dataset is preprocessed to obtain feature data of IoT devices and users, including: processing the missing values of the first indicator data based on the missing values and the type of the first indicator data in the indicator dataset to obtain second indicator data; filtering the second indicator data to obtain third indicator data; performing logarithmic transformation and collinearity testing on the third indicator data to obtain the correlation coefficient of the third indicator data; when the correlation coefficient is greater than the correlation coefficient threshold, the indicator gap of the third indicator data is the smallest, the supplementary data of the third indicator data is the least, and the third indicator data has the most normal shape, the third indicator data is used as feature data.
[0008] In one embodiment, the type of the first indicator data includes device attribute indicators and non-device attribute indicators. Based on the missing values of the first indicator data in the indicator dataset and the type of the first indicator data, the first indicator data is processed to obtain the second indicator data, including: when the type of the first indicator data is a non-device attribute indicator and the missing value of the first indicator data is less than a first set value, the data containing the missing value of the first indicator data is removed to obtain the second indicator data; when the type of the first indicator data is a non-device attribute indicator and the missing value of the first indicator data is greater than or equal to the first set value and less than or equal to the second set value, the data containing the missing value of the first indicator data is filled in based on similar feature data to obtain the second indicator data; when the type of the first indicator data is a non-device attribute indicator and the missing value of the first indicator data is greater than the second set value, the first indicator data is removed; when the type of the first indicator data is a device attribute indicator and the first indicator data is missing a device type field, the first indicator data is removed; when the type of the first indicator data is a device attribute indicator and the first indicator data is missing a non-device type field, the first indicator data is used as the second indicator data.
[0009] In one embodiment, filtering the second indicator data to obtain the third indicator data includes: obtaining the home gateway corresponding to the second indicator data; obtaining a first number of IoT devices connected to the home gateway within a unit time and a second number of newly connected IoT devices to the home gateway within a unit time; removing the second indicator data when the first number is greater than a first number threshold or the second number is greater than a second number threshold; and using the retained second indicator data as the third indicator data.
[0010] In one embodiment, the IoT device recommendation model determines the recombined URL and initial weights based on the following steps: segmenting the URL data to obtain keywords; obtaining keyword groups based on the preset keyword length; constructing a graph network of keyword groups; combining multiple nodes of the graph network to obtain the recombined URL; and obtaining the initial weights based on the criticality weights of the recombined URLs and the weights of valid HOSTNAMEs.
[0011] In one embodiment, the IoT device recommendation model determines the valid HOSTNAME based on the following steps: The HOSTNAME data is input into the device filtering sub-model, and the valid HOSTNAME output by the device filtering sub-model is obtained. The device filtering sub-model identifies valid and invalid HOSTNAMEs in the HOSTNAME data based on chi-square statistical tests and regular expression matching algorithms. If the device filtering sub-model outputs an invalid HOSTNAME, the device's Media Access Control (MAC) address corresponding to the HOSTNAME data is compared with the historical MAC address database for a brute-force attack test. If the HOSTNAME data passes the brute-force attack test, it is considered a valid HOSTNAME. If the HOSTNAME data fails the brute-force attack test, the HOSTNAME data is segmented into words, the segmentation results are converted into vector features, and logistic regression binary classification is performed on the vector features to obtain the HOSTNAME information. The HOSTNAME information is then matched with a regular expression database at least once. When the result of the regular expression database matching is valid, a valid HOSTNAME is obtained.
[0012] Secondly, the present invention provides a device for recommending Internet of Things (IoT) devices, comprising: an acquisition module for acquiring an indicator dataset based on IoT device data and user behavior data of using IoT devices; a preprocessing module for preprocessing the indicator data in the indicator dataset to obtain feature data of IoT devices and users; the feature data including hostname data and URL data; and a recommendation module for inputting the feature data into an IoT device recommendation model to obtain the most matching IoT device output by the IoT device recommendation model; wherein the IoT device recommendation model extracts valid hostnames and reconstructed URLs from the feature data; determines the initial weights of valid hostnames and reconstructed URLs; determines at least one matching probability value between a matching IoT device and a recommendation scenario based on the valid hostname, reconstructed URL, and initial weights; compares the matching probability values, and selects the matching IoT device corresponding to the largest matching probability value as the most matching IoT device.
[0013] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the recommended method of any of the above-described Internet of Things devices.
[0014] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the recommended method of any of the above-described Internet of Things devices.
[0015] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the recommended method for any of the above-described Internet of Things devices.
[0016] The present invention provides a method, apparatus, electronic device, storage medium, and program product for recommending IoT devices. It determines an indicator dataset through IoT device data and user behavior data, and extracts feature data from the indicator dataset, which is beneficial for further uncovering hidden information behind user behavior. The present invention achieves automatic acquisition of the most matching IoT devices through an IoT device recommendation model, avoiding interference from human factors and improving the accuracy of recommended IoT devices. The present invention determines the most matching IoT devices based on a valid hostname, reconstructed URL, and initial weights, improving the flexibility and application scope of IoT device usage. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is one of the flowcharts illustrating the recommended method for IoT devices provided by the present invention.
[0019] Figure 2 This is a schematic diagram of the indicator dataset provided by the present invention.
[0020] Figure 3 This is a schematic diagram of the process for obtaining feature data provided by the present invention.
[0021] Figure 4 This is a schematic diagram of the process for determining the most suitable IoT device provided by the present invention.
[0022] Figure 5 This is a schematic diagram of the recommended device for IoT devices provided by the present invention.
[0023] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0025] The following is combined with Figures 1-6 This invention describes recommended methods, apparatuses, and electronic devices for Internet of Things (IoT) devices.
[0026] Figure 1 This is one of the flowcharts illustrating the recommended method for IoT devices provided by the present invention, such as... Figure 1 As shown, the recommended method for IoT devices includes the following steps S100 to S500, each step in detail below.
[0027] S100: Obtain indicator datasets based on IoT device data and user behavior data of using IoT devices.
[0028] Data from IoT devices and user behavior data related to IoT device usage are acquired through a home gateway, and a dataset of metrics is constructed. For example... Figure 2 As shown, the metric dataset represents all offline and real-time metric data related to IoT devices, including IoT device attribute data, IoT device access data, IoT device device parameter information (DPI) data, etc. Home gateways include, but are not limited to, various gateway or router device plugins.
[0029] IoT device attribute data includes the type of IoT device (e.g., IoT device is a mobile phone, computer, router, camera, etc.), the brand of IoT device (e.g., Huawei, ZTE, Apple, Xiaomi, etc.), the model of IoT device (e.g., X20, P70, 13pro, etc.), the operating system of IoT device (e.g., Android, Apple mobile operating system, Windows, etc.), the release date of IoT device, and the market price field of IoT device.
[0030] IoT device access data includes data on the IoT device's access time, the number of access gateways, and the frequency with which devices access the same gateway.
[0031] The DPI data for IoT devices includes the Uniform Resource Locator (URL) address accessed by the IoT device.
[0032] Set up a real-time or offline scheduled task to iterate through the metric data of all households, IoT devices, users, and services according to the scheduled time, and obtain a time data sequence. Based on this time data sequence, obtain the metric dataset.
[0033] S200: Preprocess the indicator data in the indicator dataset to obtain the feature data of IoT devices and users; the feature data includes hostname data and URL data.
[0034] Missing values are filled in, filtered, and data is transformed in the indicator dataset to obtain feature data that characterizes IoT devices and user behavior.
[0035] S300: Input the feature data into the IoT device recommendation model and obtain the best matching IoT device output by the IoT device recommendation model.
[0036] The IoT device recommendation model extracts valid HOSTNAME and reconstructed URL from feature data; determines the initial weights of valid HOSTNAME and reconstructed URL; determines the matching probability value between at least one matching IoT device and the recommendation scenario based on valid HOSTNAME, reconstructed URL and initial weight; compares the matching probability values and selects the matching IoT device with the highest matching probability value as the best matching IoT device.
[0037] Feature data is input into the IoT device recommendation model. The model filters the hostname data in the feature data to obtain valid hostnames. The model then segments and reassembles the Uniform Resource Locator (URL) data in the feature data to obtain all reassembled URLs corresponding to the user. Initial weights are determined for valid hostnames and reassembled URLs.
[0038] The IoT device recommendation model includes a Bidirectional Encoder Representations from Transformers (BERT) deep learning module and a Bayesian statistics module. Based on a valid hostname, reconstructed URL, and initial weights, it determines the matching probability value between at least one matching IoT device and the recommended scenario. For example, the BERT deep learning module determines a first matching probability value (BERT matching probability value) between a first matching IoT device and a first recommended scenario based on a valid hostname, reconstructed URL, and initial weights. The Bayesian statistics module determines a second matching probability value (Bayesian matching probability value) between a second matching IoT device and a second recommended scenario based on a valid hostname, reconstructed URL, and initial weights.
[0039] Compare the first matching probability value and the second matching probability value, and select the matching IoT device corresponding to the largest matching probability value as the best matching IoT device.
[0040] The IoT device recommendation method provided in this invention determines an indicator dataset through IoT device data and user behavior data, and extracts feature data from the indicator dataset, which is beneficial for further uncovering hidden information behind user behavior. This invention, through an IoT device recommendation model, automatically obtains the most suitable IoT device, avoiding interference from human factors and improving the accuracy of recommended IoT devices. This invention determines the most suitable IoT device based on a valid hostname, reconstructed URL, and initial weight, improving the flexibility and application scope of IoT device usage.
[0041] Based on the above embodiments, the indicator data in the indicator dataset is preprocessed to obtain the feature data of IoT devices and users, including the following steps: Based on the missing values and the type of the first indicator data in the indicator dataset, the missing values of the first indicator data are processed to obtain the second indicator data. The second indicator data is filtered to obtain the third indicator data; Logarithmic transformation and collinearity test were performed on the third indicator data to obtain the correlation coefficient of the third indicator data; When the correlation coefficient is greater than the correlation coefficient threshold, the index gap of the third indicator data is the smallest, the supplementary data of the third indicator data is the least, and the third indicator data has the most normal shape, the third indicator data is used as the feature data.
[0042] Based on the type of the first indicator data and the missing values of the first indicator data, the missing data of the first indicator data is filled in or discarded to varying degrees to obtain the second indicator data.
[0043] According to predetermined rules, the second indicator data is filtered, excluding data from non-home gateways, resulting in the third indicator data. The third indicator data is then logarithmically transformed to reduce the discrepancies between different data points.
[0044] in, The third indicator data after logarithmic transformation. This is the third indicator data. It is the natural logarithm.
[0045] Collinearity tests were performed on all logarithmically transformed third indicator data, and the correlation coefficients (r) between the logarithmically transformed third indicator data were calculated. When the correlation coefficient was greater than the correlation coefficient threshold (e.g., r > 0.65), the third indicator data with the smallest index gap, the fewest supplementary data, and the most normal distribution was selected as the feature data. This feature data characterizes the features of the user's corresponding household and its IoT devices.
[0046] This invention uses missing value processing, filtering, and correlation coefficients to filter the final feature data, enabling the summarization of feature data based on IoT device data and user behavior data of IoT devices, thus improving the accuracy of feature data. Simultaneously, the preprocessing standardizes the format of the feature data, facilitating subsequent processing of the feature data based on IoT device recommendation models.
[0047] Based on the above embodiments, the types of the first indicator data include equipment attribute indicators and non-equipment attribute indicators. Based on the missing values of the first indicator data in the indicator dataset and the type of the first indicator data, the missing values of the first indicator data are processed to obtain the second indicator data, including the following steps: When the type of the first indicator data is a non-device attribute indicator, and the missing value of the first indicator data is less than the first set value, remove the data containing the missing value of the first indicator data to obtain the second indicator data; When the type of the first indicator data is a non-device attribute indicator, and the missing value of the first indicator data is greater than or equal to the first set value, while being less than or equal to the second set value, the data containing the missing value of the first indicator data is filled in based on similar feature data to obtain the second indicator data; When the type of the first indicator data is a non-device attribute indicator, and the missing value of the first indicator data is greater than the second set value, the first indicator data is removed. When the type of the first indicator data is a device attribute indicator, and the device type field is missing from the first indicator data, remove the first indicator data; When the type of the first indicator data is a device attribute indicator, and the first indicator data is missing a non-device type field, the first indicator data will be used as the second indicator data.
[0048] like Figure 3 As shown, when the type of the first indicator data is a non-device attribute indicator, missing value handling is performed on the non-device attribute indicator. For example, the first set value is 3%, and the second set value is 8%. If the missing value is less than 3%, the data containing the missing value of the first indicator data is removed to obtain the second indicator data. If the missing value is between 3% and 8%, the data containing the missing value of the first indicator data is filled in based on similar feature data to obtain the second indicator data. If the missing value is greater than 8%, the first indicator data is directly removed.
[0049] like Figure 3 As shown, when the first indicator data is a device attribute indicator, missing values are handled. For example, if the first indicator data is missing a device type field (an important field), the first indicator data is directly removed. If the first indicator data is missing a non-device type field (a non-important field), the first indicator data is used as the second indicator data.
[0050] This invention improves the precision and accuracy of missing value processing by processing different missing values to varying degrees based on the type and missing values of the first indicator data.
[0051] Based on the above embodiments, the second indicator data is filtered to obtain the third indicator data, including the following steps: Obtain the home gateway corresponding to the second indicator data; Get the first number of IoT devices connected to the home gateway within a unit of time, and the second number of newly connected IoT devices to the home gateway within a unit of time; When the first quantity is greater than the first quantity threshold, or the second quantity is greater than the second quantity threshold, the second indicator data is removed; The second indicator data that is retained will be used as the third indicator data.
[0052] For example, the first threshold is 16, and the second threshold is 10. Obtain the home gateway corresponding to the second indicator data. Obtain the first number of IoT devices connected to the home gateway within a unit of time, and the second number of newly connected IoT devices to the home gateway within the same unit of time. For example, obtain the first number of IoT devices connected to the home gateway each month corresponding to the second indicator data, and the second number of newly connected IoT devices to the home gateway each month corresponding to the second indicator data. When the first number is greater than 16, it indicates that the home gateway is not a real home gateway, and the second indicator data corresponding to that home gateway is removed. When the second number is greater than 10, it indicates that the home gateway is not a real home gateway, and the second indicator data corresponding to that home gateway is removed. The retained second indicator data is used as the third indicator data.
[0053] This invention uses a second indicator based on the first number of IoT devices connected to a home gateway within a unit of time and the second number of newly connected IoT devices to the home gateway within a unit of time to eliminate non-real home gateway data, which helps to improve the accuracy of subsequent IoT device recommendations for home users.
[0054] Based on the above embodiments, the IoT device recommendation model determines the valid HOSTNAME based on the following steps: Input the HOSTNAME data into the device filtering sub-model, obtain the valid HOSTNAME output by the device filtering sub-model. The device filtering sub-model identifies the valid and invalid HOSTNAME in the HOSTNAME data based on chi-square statistical test and regular matching algorithm. If the device filter sub-model outputs an invalid HOSTNAME, then the device media access control MAC address corresponding to the HOSTNAME data will be compared with the historical MAC address database for a brute-force attack. If the HOSTNAME data is determined through a credential stuffing attack, then the HOSTNAME data will be considered a valid HOSTNAME. If the HOSTNAME data fails the credential stuffing test, then the HOSTNAME data is segmented into words, the segmentation results are converted into vector features, and logistic regression binary classification is performed on the vector features to obtain the HOSTNAME information. The HOSTNAME information is then matched with a regular expression library at least once. If the result of the regular expression library matching is valid, a valid HOSTNAME is obtained.
[0055] Feature data includes hostname data. The device filtering sub-model is trained based on the preset model, using historical device sample hostname data and labels indicating whether the sample hostname data is valid.
[0056] like Figure 4 As shown, the HOSTNAME data is input into the device filtering sub-model. The device filtering sub-model performs calculations on the HOSTNAME data using chi-square statistical tests and regular matching algorithms to identify valid and invalid HOSTNAMEs.
[0057] Furthermore, such as Figure 4 As shown, some cold-start HostNAME data cannot be determined as valid or invalid using the historically accumulated device filtering sub-model. If the HostNAME data is from a cold start, a custom valid and invalid dictionary is used to identify whether the cold-start HostNAME data is valid or invalid.
[0058] If the device filtering sub-model identifies the HOSTNAME data as a valid HOSTNAME, then that valid HOSTNAME is obtained. If the device filtering sub-model identifies the HOSTNAME data as an invalid HOSTNAME, then a brute-force test is performed between the device's Media Access Control (MAC) address corresponding to the HOSTNAME data and the historical MAC address database. If the HOSTNAME data passes the brute-force test (MAC matching), then that HOSTNAME data is taken as a valid HOSTNAME.
[0059] like Figure 4 As shown, if the HOSTNAME data fails the MAC matching test, the HOSTNAME data is segmented, and the segmentation results are converted into vector features. For example, the segmentation results are mapped onto the classifier dictionary to obtain a 1000-dimensional sparse vector matrix. The vector combination in kv format is input into a logistic regression binary classification algorithm to obtain the HOSTNAME information. Regularized MAC matching is then performed on this HOSTNAME information to determine its validity. If valid, the valid HOSTNAME is directly obtained. If the HOSTNAME data is determined to be invalid, it undergoes a second MAC matching using Gradient Boosting Decision Trees (GBDT) and is matched again. If still invalid, the invalid HOSTNAME data is added to the invalid HOSTNAME dictionary. If valid, the valid HOSTNAME is obtained.
[0060] This invention improves the accuracy and efficiency of identifying valid and invalid hostnames by using chi-square statistical tests, regular expression matching algorithms, brute-force judgment based on historical MAC address databases, and regular expression database matching.
[0061] Based on the above embodiments, the IoT device recommendation model determines the recombined URL and initial weights based on the following steps: The URL data is segmented to obtain keywords. Based on the preset keyword length, keyword groups are obtained, and a graph network of keyword groups is constructed. By combining multiple nodes of the graph network, a recombined URL can be obtained; The initial weight is obtained based on the criticality weight of the reconstructed URL and the weight of the valid HOSTNAME.
[0062] like Figure 4As shown, URL data is completely segmented according to protocol type, host, port number, path, and query string. Then, the parsed host, port number, path, and query string keywords are processed using a Term Frequency–Inverse Document Frequency (TF-IDF) model. Based on a preset keyword length (adjustable as needed), a dynamic multivariate word probability model is constructed to build keyword groups. Each constructed keyword group is evaluated, and those meaningful to the business are given a 2x weight increase.
[0063] Obtain the weight of keyword groups, rank the keyness of keyword groups according to their weight levels, process the relationship between multiple keyword groups, construct a graph network of keyword groups with the keyword with the highest weight as the center and the relationship between keywords as the edges, and form a family access graph information.
[0064] Multiple nodes in the graph network are combined to obtain a reconstructed URL. Initial weights are then obtained based on the criticality weights of the reconstructed URL and the weights of the valid hostnames. For example, given a reconstructed URL and a valid hostname, the top 30% of the criticality weights are set as the weights of the valid hostnames, together forming the initial weights.
[0065] Furthermore, the initial weights, recombined URLs, and valid hostnames are input into the BERT deep learning module and the Bayesian statistics module, respectively.
[0066] This invention constructs a graph network and then obtains recombined URLs, enabling the traversal of all URL data of a household. This facilitates further mining of hidden information behind user behavior, thereby improving the accuracy of the most matching IoT device output by the IoT device recommendation model.
[0067] The following describes the device for recommending IoT devices provided by the present invention. The device for recommending IoT devices described below can be referred to in correspondence with the method for recommending IoT devices described above.
[0068] like Figure 5 As shown, a recommendation device for Internet of Things (IoT) devices includes an acquisition module 501, a preprocessing module 502, and a recommendation module 503.
[0069] The acquisition module 501 is used to acquire an indicator dataset based on IoT device data and user behavior data of using IoT devices.
[0070] The preprocessing module 502 is used to preprocess the indicator data in the indicator dataset to obtain the feature data of IoT devices and users; the feature data includes hostname data and URL data.
[0071] The recommendation module 503 is used to input feature data into the IoT device recommendation model and obtain the most matching IoT device output by the IoT device recommendation model. The IoT device recommendation model extracts the valid HOSTNAME and reconstructed URL from the feature data; determines the initial weights of the valid HOSTNAME and reconstructed URL; determines the matching probability value between at least one matching IoT device and the recommendation scenario based on the valid HOSTNAME, reconstructed URL and initial weights; compares the matching probability values and selects the matching IoT device with the largest matching probability value as the most matching IoT device.
[0072] The IoT device recommendation device provided in this invention determines an indicator dataset through IoT device data and user behavior data, and extracts feature data based on the indicator dataset, which is beneficial for further mining hidden information behind user behavior. This invention, through an IoT device recommendation model, automatically obtains the most matching IoT device, avoiding interference from human factors and improving the accuracy of recommended IoT devices. This invention determines the most matching IoT device based on a valid HOSTNAME, reconstructed URL, and initial weight, improving the flexibility and application scope of IoT device usage.
[0073] In one embodiment, the preprocessing module 502 is used to: process the missing values of the first indicator data in the indicator dataset and the type of the first indicator data to obtain the second indicator data; filter the second indicator data to obtain the third indicator data; perform logarithmic transformation and collinearity test on the third indicator data to obtain the correlation coefficient of the third indicator data; when the correlation coefficient is greater than the correlation coefficient threshold, the indicator gap of the third indicator data is the smallest, the supplementary data of the third indicator data is the least, and the third indicator data has the most normal shape, the third indicator data is used as feature data.
[0074] In one embodiment, the type of the first indicator data includes device attribute indicators and non-device attribute indicators. The preprocessing module 502 is used to: when the type of the first indicator data is a non-device attribute indicator and the missing value of the first indicator data is less than a first set value, remove the data containing the missing value of the first indicator data to obtain the second indicator data; when the type of the first indicator data is a non-device attribute indicator and the missing value of the first indicator data is greater than or equal to the first set value and less than or equal to the second set value, fill in the data containing the missing value of the first indicator data based on similar feature data to obtain the second indicator data; when the type of the first indicator data is a non-device attribute indicator and the missing value of the first indicator data is greater than the second set value, remove the first indicator data; when the type of the first indicator data is a device attribute indicator and the first indicator data is missing a device type field, remove the first indicator data; when the type of the first indicator data is a device attribute indicator and the first indicator data is missing a non-device type field, use the first indicator data as the second indicator data.
[0075] In one embodiment, the preprocessing module 502 is used to: obtain the home gateway corresponding to the second indicator data; obtain the first number of IoT devices connected to the home gateway within a unit time and the second number of newly connected IoT devices to the home gateway within a unit time; remove the second indicator data when the first number is greater than the first number threshold or the second number is greater than the second number threshold; and use the retained second indicator data as the third indicator data.
[0076] In one embodiment, the recommendation module 503 is used to: segment URL data to obtain keywords, obtain keyword groups based on the preset keyword length, and construct a graph network of keyword groups; combine multiple nodes of the graph network to obtain a reconstructed URL; and obtain an initial weight based on the criticality weight of the reconstructed URL and the weight of the valid HOSTNAME.
[0077] In one embodiment, the recommendation module 503 is used to: input HOSTNAME data into the device filtering sub-model, obtain the valid HOSTNAME output by the device filtering sub-model, the device filtering sub-model identifying valid and invalid HOSTNAMEs in the HOSTNAME data based on chi-square statistical test and regular expression matching algorithm; if the device filtering sub-model outputs an invalid HOSTNAME, then the device media access control MAC address corresponding to the HOSTNAME data is compared with the historical MAC address database for a brute-force attack test; if the HOSTNAME data passes the brute-force attack test, then the HOSTNAME data is taken as a valid HOSTNAME; if the HOSTNAME data fails the brute-force attack test, then the HOSTNAME data is segmented into words, the segmentation result is converted into vector features, logistic regression binary classification is performed on the vector features to obtain HOSTNAME information, and the HOSTNAME information is matched with the regular expression database at least once. When the result of the regular expression database matching is valid, a valid HOSTNAME is obtained.
[0078] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6 As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630, and a communication bus 640, wherein the processor 610, communications interface 620, and memory 630 communicate with each other through the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute a recommendation method for IoT devices. This method includes: obtaining an indicator dataset based on IoT device data and user behavior data using IoT devices; preprocessing the indicator data in the indicator dataset to obtain feature data of IoT devices and users; the feature data includes hostname data and Uniform Resource Locator (URL) data; inputting the feature data into an IoT device recommendation model to obtain the most matching IoT device output by the IoT device recommendation model; wherein the IoT device recommendation model extracts valid hostnames and reconstructed URLs from the feature data; determines the initial weights of valid hostnames and reconstructed URLs; determines the matching probability value of at least one matching IoT device with the recommendation scenario based on the valid hostname, reconstructed URL, and initial weights; comparing the matching probability values, and selecting the matching IoT device with the highest matching probability value as the most matching IoT device.
[0079] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0080] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the IoT device recommendation method provided by the above methods. The method includes: obtaining an indicator dataset based on IoT device data and user behavior data of using IoT devices; preprocessing the indicator data in the indicator dataset to obtain feature data of IoT devices and users; the feature data includes hostname data and URL data; inputting the feature data into an IoT device recommendation model to obtain the most matching IoT device output by the IoT device recommendation model; wherein, the IoT device recommendation model extracts the valid hostname and reconstructed URL from the feature data; determines the initial weights of the valid hostname and reconstructed URL; determines at least one matching probability value between the matching IoT device and the recommendation scenario based on the valid hostname, reconstructed URL and initial weights; compares the matching probability values and selects the matching IoT device corresponding to the largest matching probability value as the most matching IoT device.
[0081] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the IoT device recommendation method provided by the above methods. The method includes: obtaining an indicator dataset based on IoT device data and user behavior data of using IoT devices; preprocessing the indicator data in the indicator dataset to obtain feature data of IoT devices and users; the feature data includes hostname data and URL data; inputting the feature data into an IoT device recommendation model to obtain the most matching IoT device output by the IoT device recommendation model; wherein, the IoT device recommendation model extracts the valid hostname and reconstructed URL from the feature data; determines the initial weights of the valid hostname and reconstructed URL; determines the matching probability value of at least one matching IoT device and the recommendation scenario based on the valid hostname, reconstructed URL and initial weights; compares the matching probability values, and selects the matching IoT device corresponding to the largest matching probability value as the most matching IoT device.
[0082] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0083] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for recommending Internet of Things (IoT) devices, characterized in that, include: Based on IoT device data and user behavior data of using IoT devices, obtain indicator datasets; The indicator data in the indicator dataset is preprocessed to obtain feature data of IoT devices and users; the feature data includes hostname data and URL data. The feature data is input into an IoT device recommendation model to obtain the most matching IoT device output by the IoT device recommendation model. The IoT device recommendation model extracts the valid HOSTNAME and reconstructed URL from the feature data; determines the initial weights of the valid HOSTNAME and the reconstructed URL; determines at least one matching probability value between the matching IoT device and the recommendation scenario based on the valid HOSTNAME, the reconstructed URL, and the initial weights; compares the matching probability values, and selects the matching IoT device with the highest matching probability value as the most matching IoT device.
2. The method for recommending IoT devices according to claim 1, characterized in that, The preprocessing of the indicator data in the indicator dataset to obtain feature data of IoT devices and users includes: Based on the missing values and the type of the first indicator data in the indicator dataset, the missing values of the first indicator data are processed to obtain the second indicator data. The second indicator data is filtered to obtain the third indicator data; Logarithmic transformation and collinearity test are performed on the third indicator data to obtain the correlation coefficient of the third indicator data; When the correlation coefficient is greater than the correlation coefficient threshold, the index difference of the third indicator data is the smallest, the supplementary data of the third indicator data is the least, and the third indicator data has the most normal shape, the third indicator data is used as the feature data.
3. The method for recommending IoT devices according to claim 2, characterized in that, The first indicator data includes equipment attribute indicators and non-equipment attribute indicators. The step of processing the missing values of the first indicator data in the indicator dataset and the type of the first indicator data to obtain the second indicator data includes: When the type of the first indicator data is the non-device attribute indicator, and the missing value of the first indicator data is less than the first set value, the data containing the missing value of the first indicator data is removed to obtain the second indicator data; When the type of the first indicator data is the non-device attribute indicator, and the missing value of the first indicator data is greater than or equal to the first set value, and less than or equal to the second set value, the data containing the missing value of the first indicator data is filled in based on similar feature data to obtain the second indicator data. When the type of the first indicator data is the non-device attribute indicator, and the missing value of the first indicator data is greater than the second set value, the first indicator data is removed. When the type of the first indicator data is the device attribute indicator, and the first indicator data is missing the device type field, the first indicator data is removed. When the type of the first indicator data is the device attribute indicator, and the first indicator data is missing a non-device type field, the first indicator data is used as the second indicator data.
4. The method for recommending IoT devices according to claim 2, characterized in that, The process of filtering the second indicator data to obtain the third indicator data includes: Obtain the home gateway corresponding to the second indicator data; Obtain a first number of IoT devices connected to the home gateway within a unit of time, and a second number of newly connected IoT devices to the home gateway within the unit of time; When the first quantity is greater than the first quantity threshold, or the second quantity is greater than the second quantity threshold, the second indicator data is removed; The retained second indicator data will be used as the third indicator data.
5. The method for recommending IoT devices according to claim 1, characterized in that, The IoT device recommendation model determines the recombined URL and the initial weight based on the following steps: The URL data is segmented to obtain keywords. Based on the preset keyword length, keyword groups are obtained, and a graph network of the keyword groups is constructed. By combining multiple nodes of the graph network, a recombined URL can be obtained; The initial weight is obtained based on the criticality weight of the reconstructed URL and the weight of the valid HOSTNAME.
6. The method for recommending IoT devices according to claim 5, characterized in that, The IoT device recommendation model determines the valid HOSTNAME based on the following steps: The HOSTNAME data is input into the device filtering sub-model to obtain the valid HOSTNAME output by the device filtering sub-model. The device filtering sub-model identifies the valid HOSTNAME and invalid HOSTNAME in the HOSTNAME data based on chi-square statistical test and regular matching algorithm. If the device filtering sub-model outputs the invalid HOSTNAME, then the device media access control MAC address corresponding to the HOSTNAME data is compared with the historical MAC address database for a brute-force attack test. If the HOSTNAME data is determined through a credential stuffing attack, then the HOSTNAME data will be used as the valid HOSTNAME. If the HOSTNAME data fails the credential stuffing test, then the HOSTNAME data is segmented into words, the segmentation results are converted into vector features, and logistic regression binary classification is performed on the vector features to obtain the HOSTNAME information. The HOSTNAME information is then matched with a regular expression library at least once. When the result of the regular expression library matching is valid, the valid HOSTNAME is obtained.
7. A device for recommending Internet of Things (IoT) devices, characterized in that, include: The acquisition module is used to acquire indicator datasets based on IoT device data and user behavior data when using IoT devices. The preprocessing module is used to preprocess the indicator data in the indicator dataset to obtain feature data of IoT devices and users; the feature data includes hostname data and Uniform Resource Locator (URL) data. The recommendation module is used to input the feature data into an IoT device recommendation model and obtain the most matching IoT device output by the IoT device recommendation model; wherein, the IoT device recommendation model extracts the valid HOSTNAME and reconstructed URL from the feature data; determines the initial weights of the valid HOSTNAME and the reconstructed URL; determines at least one matching probability value between the matching IoT device and the recommendation scenario based on the valid HOSTNAME, the reconstructed URL, and the initial weights; compares the matching probability values, and selects the matching IoT device corresponding to the largest matching probability value as the most matching IoT device.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the recommended method for the Internet of Things device as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the recommended method for the Internet of Things device as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the recommended method for the Internet of Things device as described in any one of claims 1 to 6.