Group control equipment identification method and device

By preprocessing and feature engineering of group control equipment for feature data collection, building a logistic regression model and combining cross-verification and early shutdown mechanism methods, the problems of poor adaptability and high cost in group control equipment recognition are solved, achieving efficient and accurate recognition effect.

CN119494086AInactive Publication Date: 2025-02-21AIEASY
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510079400.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-18
Publication Date
2025-02-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In a digital network environment, there are challenges in identifying group control devices to ensure their safety and reliability. Existing methods such as dependency rules, device behavior characteristics, traffic characteristics and traditional machine learning have problems such as poor adaptability, high misjudgment rate and high cost. .

Method used

A group control device recognition method is adopted to pre-process and feature engineering processing of group control devices, and build a logistic regression model, combining K-fold cross-validation and traversal training to introduce an early stop mechanism to the model Perform training and evaluation.

Benefits of technology

It improves the accuracy and efficiency of group control equipment identification, reduces the rate of misjudgment and misjudgment, is highly adaptable, can promptly respond to changes in the behavioral patterns and technical means of group control equipment, and has cost-effective advantages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494086A_ABST
    Figure CN119494086A_ABST
Patent Text Reader

Abstract

The invention discloses a group control equipment identification method and device, belongs to the technical field of computers, and particularly relates to a group control equipment identification method which comprises the following steps: collecting feature data of group control equipment; the collected feature data are preprocessed; the preprocessing operation comprises the steps of cleaning repeated data, processing missing values and standardizing the data; performing feature engineering processing on the preprocessed feature data; constructing a logistic regression model; and a K-fold cross validation and traversal training combined mode is adopted, an early stop mechanism is introduced, the constructed logistic regression model is trained, and the trained model is evaluated. Therefore, the recognition accuracy and the working efficiency of the full-control equipment are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and in particular relates to a group control device identification method and device. Background Art

[0002] In today's digital network environment, the use of group control devices has many potential hazards. Identifying group control devices and ensuring their safety and reliability are urgent issues to be resolved.

[0003] When identifying group control devices, it is usually based on rules, device behavior characteristics, traffic characteristics, and traditional machine learning methods. Research has found that when relying on rules for identification, it is difficult to cover all group control modes, and the identification method has poor adaptability; when based on device behavior characteristics, the available features are single and prone to misjudgment; when based on traffic characteristics, it is impossible to identify encrypted traffic and complex disguised traffic in a targeted manner; and when using traditional machine learning methods and feature engineering for identification, it requires a lot of manual work, and the models used are complex and costly. Summary of the invention

[0004] In order to at least solve the above technical problems, the present invention provides a group control device identification method, device, equipment and readable storage medium.

[0005] According to a first aspect of the present invention, a group control device identification method is provided, comprising: Collect characteristic data of group control equipment; Preprocessing the collected feature data; The preprocessing operations include cleaning duplicate data, processing missing values, and standardizing data: Perform feature engineering on the preprocessed feature data; Build a logistic regression model; A combination of K-fold cross validation and traversal training was used, and an early stopping mechanism was introduced to train the constructed logistic regression model, and the trained model was evaluated.

[0006] Further, The collecting characteristic data of the group control device includes: Collect network device data, server-side data, mobile device and application data.

[0007] Further, The cleaning of duplicate data includes: Adopting an accurate deduplication method based on a hash algorithm, first perform hash calculation on the data records, and treat data with the same hash value as potential duplicate data; Compare the details of the data to ensure that real duplicate data is removed; For network traffic data, Bloom filters are used for preliminary deduplication, quickly eliminating most of the data that is unlikely to be duplicated, and then accurate comparison is performed; Build a digital fingerprint library, generate fingerprints based on a specific algorithm, store them in the library to determine duplication, and clean up duplicate data; The processing of missing values ​​comprises: Local weighted regression is used to fill in missing numerical data; Bayesian filling of missing data for categorical variables; Use the autoregressive moving average model to predict and fill in the missing data of the time series; The data standardization includes: The network traffic data is standardized by using adaptive method based on traffic distribution characteristics; For equipment performance data, logarithmic transformation is performed first and then standardization is performed.

[0008] Further, The performing feature engineering processing on the preprocessed feature data includes: The pre-processed feature data is used to deeply mine the device behavior characteristics, extract network behavior characteristics, refine application usage characteristics, and finally screen features and perform dimensionality reduction optimization processing.

[0009] Further, The construction of the logistic regression model comprises: Construct the mathematical expression of the model and initialize the parameters, and select the optimization algorithm and parameters.

[0010] Further, The method of combining K-fold cross validation and traversal training, introducing an early stopping mechanism, training the constructed logistic regression model, and evaluating the trained model includes: Dataset partitioning and cross-validation, including partitioning the preprocessed and feature-engineered dataset into training, validation, and test sets in a ratio of 8:1:1; During the model training process, K-fold cross validation is used to further evaluate the generalization ability of the model; The model training adopts batch training method, and the size of each batch of data is set to a preset value. In each training round, all batches of data in the training set are traversed and the model parameters are updated according to the SGD algorithm; When the model's loss value on the validation set does not decrease for K consecutive rounds or the accuracy does not increase for a preset number of consecutive rounds, stop training.

[0011] Further, The method further comprises: deploying the logistic regression model on a cloud server using a microservice architecture; The step of collecting feature data from the group control device, the step of preprocessing the collected feature data, and the step of performing feature engineering on the preprocessed feature data are respectively encapsulated as independent microservices; Use containerization technology to package microservices into container images, manage and schedule containers, and dynamically adjust the number of container instances based on actual traffic load conditions.

[0012] According to a second aspect of the present invention, a group control device identification device includes: Data collection module, used to collect characteristic data of group control equipment; A preprocessing module, used for preprocessing the collected feature data; The preprocessing module includes cleaning duplicate data, processing missing values, and standardizing data: Feature processing module, used to perform feature engineering on preprocessed feature data; Modeling module, used to build logistic regression models; The training and evaluation module is used to train the constructed logistic regression model by combining K-fold cross validation and traversal training, introduce an early stopping mechanism, and evaluate the trained model.

[0013] According to a third aspect of the present invention, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of any method described in the first aspect of the present invention are implemented.

[0014] According to a fourth aspect of the present invention, a computer-readable storage medium stores a program, and when the program is executed, it can implement any method as described in the first aspect of the present invention.

[0015] Significantly improved efficiency: Through carefully designed data collection and preprocessing processes, it is able to quickly process massive amounts of device data, with high model training and prediction efficiency. It can monitor and identify group control devices in real time in a large-scale network environment, greatly shortening the processing time compared to traditional methods.

[0016] Accuracy is greatly improved: By integrating multi-source data and deep feature engineering, many distinguishing features are mined. The logistic regression model can more accurately identify group control devices, effectively reduce the misjudgment and missed judgment rates, and overcome the defect of single feature of traditional methods.

[0017] Good interpretability facilitates optimization: The logistic regression model has a simple structure and its output results are highly interpretable, which makes it easy for technicians to understand the impact of features on the judgment of group control equipment, and thus adjust and optimize the model in a targeted manner. This is an advantage that some complex black box models do not have.

[0018] Strong adaptability to changes: The regular update mechanism combined with incremental learning enables the model to promptly adapt to the changing behavior patterns and technical means of group control devices and maintain efficient recognition capabilities. Traditional methods often find it difficult to quickly respond to new group control strategies.

[0019] Outstanding cost-effectiveness advantage: The relatively simple model structure and efficient training algorithm reduce the requirements for computing resources and hardware equipment, and can still be effectively deployed and operated under limited resources. Compared with complex deep learning models, it has obvious cost advantages. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which: Figure 1 A flow chart of a group control device identification method provided by the present invention; Figure 2 A schematic diagram of a data acquisition architecture provided by the present invention; Figure 3 A flow chart of a feature engineering processing method provided by the present invention; Figure 4 A schematic diagram of a logistic regression model provided by the present invention; Figure 5 A deployment diagram of a model provided by the present invention. DETAILED DESCRIPTION

[0021] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.

[0022] In order to more clearly illustrate the present invention, the present invention is further described below in conjunction with preferred embodiments and accompanying drawings. Similar components in the accompanying drawings are represented by the same reference numerals. It should be understood by those skilled in the art that the content specifically described below is illustrative rather than restrictive, and should not be used to limit the scope of protection of the present invention.

[0023] In a first aspect of the present invention, a group control device identification method is provided, such as Figure 1 As shown, including: Step 101: Collecting characteristic data of the group control device; In the embodiment of the present invention, network device data, server-side data, mobile device and application data may be collected.

[0024] Furthermore, the method for collecting network device data includes: using SNMP protocol to interact with network devices, configuring a management station and setting a community string, such as setting a suitable string for a specific router to obtain basic information.

[0025] Use Wireshark and libpcap library to capture packets, open the monitoring interface, set capture rules, extract key information and store it in the database.

[0026] Link the firewall with the intrusion detection system, export and parse the firewall logs, and obtain data integration through the intrusion detection system API.

[0027] The method for collecting server-side data includes: Use tools or scripts to analyze Web server logs, extract information using regular expressions, parse user agent content, store and associate.

[0028] Enable slow query log for MySQL database and set threshold, obtain relevant information, store it in the database and wait for analysis.

[0029] Process logs according to application server type, extract operation and error information, store and associate them.

[0030] Methods for collecting mobile device and application data, including: Use the Android application integration SDK, use the corresponding class to obtain the acceleration value, and process it at intervals.

[0031] Use a specific class to obtain power information and record, store or send it through a broadcast receiver.

[0032] In the service component, relevant classes are used to obtain and process background information.

[0033] In one embodiment of the present invention, data collection can be performed by using a multi-faceted method of collecting network device data, including: Obtain the device's connection timestamp, connection duration, connection times, and other information from the logs of network devices such as routers and switches. By deeply parsing the network packet header information, record data such as the source MAC address, destination MAC address, and corresponding VLAN tags to distinguish device behavior characteristics in different network areas.

[0034] Collaborate with network security devices (such as firewalls and intrusion detection systems) to collect device-related data marked as abnormal or suspicious connection attempts, including attack type, attack frequency, and target information, etc., to provide more dimensional information for subsequent feature extraction.

[0035] Use network management protocols (such as SNMP) to regularly obtain real-time data such as port status and traffic load of network devices to monitor dynamic changes of devices in the network.

[0036] In terms of obtaining data on the server side: In-depth analysis of Web server logs, in addition to conventional IP address, request page URL, request time and other information, also extracts detailed device information in the user agent string, such as device brand, model, operating system kernel version, etc. By mining this information, some potential clues to group control devices can be discovered, such as a large number of similar requests initiated from the same IP segment by devices of the same brand and model in a short period of time.

[0037] The database server log focuses on the frequency and complexity of data query statements and the query source IP. Frequent execution of complex query statements and concentrated source IPs may indicate that group control devices are collecting data or performing malicious operations.

[0038] The application server log records the internal operation process and error information of the application, and collects the order and frequency of specific application functions being called and the regularity of error codes. For example, a group control device may quickly call multiple application functions in a fixed order to complete a specific task. These abnormal operation sequence patterns can serve as important features.

[0039] Collection of mobile device and application data, including: Cooperate with mobile application developers to collect sensor data of mobile devices, such as the change pattern of acceleration sensor data, through the SDK in the application. When normal users use mobile devices, the acceleration sensor data will show natural random changes, while the group control devices often have more regular sensor data changes during simulated operations, such as almost no change in acceleration during virtual click operations.

[0040] Obtain the power consumption curve of the mobile device. Since the group control device runs specific tasks for a long time and at a high frequency, its power consumption pattern is significantly different from that of normal devices in normal usage scenarios, such as excessively fast power consumption and no obvious charging interval.

[0041] Collect the background running data of the application, including the time interval and duration of the application waking up in the background, and the interaction data with other applications. Group control devices may frequently wake up applications and interact with data within a specific time interval, while the background application activities of normal devices are relatively scattered and random.

[0042] Step 102: pre-processing the collected feature data; In the embodiment of the present invention, the collected feature data can be cleaned of duplicate data, processed for missing values, and standardized.

[0043] Furthermore, duplicate data is cleaned up, including: using the hashlib library to calculate the data hash value, using sets to determine duplication, and using the pybloom_live library Bloom filter to initially screen and then accurately compare the traffic data. Furthermore, an accurate deduplication method based on a hash algorithm is used to first perform a hash calculation on the data records, and treat the data with the same hash value as potential duplicate data, and then further compare the detailed content of the data, including key information such as timestamps, IP addresses, and device identifiers, to ensure that real duplicate data is removed. For network traffic data, due to its large amount of data and partial similarities, a Bloom filter is used for preliminary deduplication, quickly eliminating most of the data that is unlikely to be duplicated, and then an accurate comparison is performed.

[0044] Build a data fingerprint library, generate fingerprints based on specific algorithms, store them in the library to determine duplication, and clean up duplicate data. Specifically, you can build a data fingerprint library, combine the key features of the data to generate data fingerprints, and identify duplicate data by comparing data fingerprints. For example, for device connection data, use a specific algorithm to combine the device's MAC address, the connected server IP, and the connection timestamp to generate a data fingerprint, so that duplicate data can be efficiently found in large-scale data sets.

[0045] Methods for handling missing values ​​include: For missing data of numerical type, the local weighted regression of Lowess class in statsmodels library is used to fill; specifically, for missing values ​​of numerical type, when the missing ratio is less than 10%, the local weighted regression algorithm based on density is used to fill. This algorithm gives more reasonable estimated values ​​to missing values ​​according to the local density distribution of data, and can better preserve the local characteristics of data compared with simple mean or median filling.

[0046] For missing data of categorical variables, the MultinomialNB class of the sklearn.naive_bayes library is used for Bayesian filling. Specifically, the Bayesian classification algorithm can be used for filling. Based on the conditional probability relationship between other relevant features in the data set and the categorical variable, the category to which the missing value is most likely to belong is calculated. For example, the missing device type can be inferred based on features such as the device's operating system version and application installation status.

[0047] For missing data in time series, we use the ARIMA class prediction and filling in the statsmodels.tsa.arima_model library. Specifically, we use the autoregressive moving average (ARIMA) model for prediction and filling. This model is based on the autocorrelation and moving average of time series data, and can better predict the values ​​at missing time points, so that the filled data maintains consistency in the time series.

[0048] Data standardization methods include: For network traffic data, KMeans clustering is used and then clustering and normalization is performed. Specifically, an adaptive normalization method based on traffic distribution characteristics is used. First, cluster analysis is performed on the traffic data to divide the traffic data into different traffic pattern categories, and then the mean and standard deviation of each category are calculated for normalization. This can avoid ignoring the differences between different traffic patterns due to overall normalization and improve the accuracy of normalization.

[0049] For device performance data, first perform logarithmic transformation and then standardize it using the StandardScaler class. Specifically, for device performance data such as CPU usage and memory occupancy, logarithmic transformation can be used before standardization. Because these data often show a skewed distribution, logarithmic transformation can make their distribution closer to a normal distribution, thereby improving the effect of standardization and making the data more suitable for subsequent model training.

[0050] In another embodiment of the present invention, the following operations may be performed on the data to be preprocessed: The data is input into the cleaning module for deduplication and error detection. For duplicate data, duplicate records must be removed after deduplication. For the erroneous data detected by the error detection operation, the erroneous data is corrected, the data cleaning is completed, and the missing values ​​are processed, including filling missing values, deleting records and interpolation, and then standardized, including feature scaling and feature encoding operations, and the preprocessed data is output.

[0051] Step 103: Perform feature engineering processing on the preprocessed feature data; In one embodiment of the present invention, feature engineering is performed on the processed feature data, specifically, Figure 3 As shown, first, the pre-processed feature data is deeply mined for device behavior features, including: Calculate the entropy characteristics of device operations to measure the randomness of device operations. For example, for the application startup sequence of a device within a period of time, the degree of disorder of the operation can be determined by calculating its information entropy. The application startup sequence of a normal device usually has a higher entropy value, while the entropy value of a group control device is lower because it operates according to a fixed script or mode. Specifically, the entropy function of the scipy.stats library can be used to calculate the entropy value of device operations.

[0052] Extract the time series pattern features of device operations and use the dynamic time warping (DTW) algorithm to compare the similarities of different device operation time series. This algorithm can find the optimal matching path when there is local expansion and distortion of the time series, so as to accurately identify devices with similar operation time patterns, which is very effective for discovering batch operation behaviors of group control devices. Specifically, the dtw library can be used to extract the time series pattern features of device operations based on the DTW algorithm.

[0053] Analyze the event interval distribution characteristics of device operations, including but not limited to the average interval, and calculate the variance, skewness, kurtosis and other statistics of the interval. For example, when a group control device is performing a task, the interval between operation events may show a small variance and specific skewness and kurtosis, which is significantly different from the natural operation interval distribution of normal devices.

[0054] Secondly, extract network behavior features, including: Construct the graph features of network behavior, treat devices as nodes, network connections between devices as edges, and calculate the graph's degree centrality, betweenness centrality, and closeness centrality. The connection mode of group control devices in the network is often different from that of normal devices, and may form some subgraph structures with specific centrality features, such as connections between a small number of high-centrality control nodes and a large number of low-centrality controlled nodes. Specifically, the networkx library can be used to construct the network behavior graph and calculate the relevant centrality indicators as features.

[0055] Statistics on the distribution of network traffic protocols, and processing by time window as features. Analyze the geographical distribution features of network connections, obtain the geographical location information of device connections through IP address positioning technology, and calculate the geographical dispersion and concentrated area features of device connections. For example, group control devices may initiate connections from a specific geographical area, or quickly switch the geographical area of ​​connection in a short period of time. These abnormal geographical distribution patterns can be used as important identification features. Specifically, the GeoIP2 library can be used to analyze the geographical distribution of network connections and calculate dispersion as features.

[0056] Next, refine the application usage characteristics, including: The collaborative matrix features of application usage are calculated to measure the degree of collaborative usage between different applications. For example, for a normal user, social media applications and instant messaging applications may have a high frequency of collaborative usage, while group control devices may perform some unnatural collaborative operations between different applications. These abnormal patterns can be discovered through the collaborative matrix.

[0057] Extract resource consumption characteristics used by applications, including CPU time slice occupancy ratio, memory read and write speed, disk I / O operation frequency, etc. When group control devices run applications, due to batch operation and optimization purposes, resource consumption patterns may be different from normal devices. For example, the CPU may run at high load for a long time, and memory read and write frequently and in a single mode. Use relevant tools or APIs in Android applications to obtain resource consumption data as features.

[0058] Analyze the function call path features used by the application, and build a function call path graph by tracking the call order and number of functions in the application. The function call paths of normal devices are usually complex and diverse, while group control devices often follow a fixed, simple function call path to complete tasks. These features can effectively distinguish group control devices from normal devices. Specifically, code instrumentation or AOP framework can be used to analyze the application function call path as a feature.

[0059] Finally, feature selection and dimensionality reduction optimization processing are performed, including: The mutual information-based feature selection method is used to calculate the mutual information value between each feature and the target variable of whether the device is a group control device, and the features with larger mutual information values ​​are selected as important features. At the same time, combined with the redundancy analysis of the features, the redundant features that are highly correlated with the selected important features are removed to reduce the feature dimension and improve the model training efficiency. Specifically, the mutual_info_classif function of the sklearn.feature_selection library can be used to select features with large mutual information and remove redundancy.

[0060] A hybrid dimensionality reduction method combining principal component analysis (PCA) and linear discriminant analysis (LDA) is used. PCA is first used to perform preliminary dimensionality reduction on the data to retain most of the data variance information, and then LDA is used to further optimize the features in the low-dimensional space to maximize the distinction between different categories (group control devices and normal devices), thereby improving the classification performance of the model.

[0061] Step 104: construct a logistic regression model; In one embodiment of the present invention, first, a mathematical expression of the model and parameter initialization are constructed, wherein: The mathematical expression of the logistic regression model is: P(Y=1|X)=1 / (1+exp(-(w^T*X+b))), where Y indicates whether the device is a group control device (1 for yes, 0 for no), X is the feature vector after feature engineering, w is the weight vector, and b is the bias term. When the model is initialized, a random initialization method is used to assign small random values ​​to w and b. For example, the elements of w are randomly generated in the range of [-0.01, 0.01], and b is randomly generated in the range of [-0.1, 0.1] to avoid the deviation during model initialization from having too much impact on the training results. In the present invention, the mutual_info_classif function of the sklearn.feature_selection library can be used to select features with large mutual information and remove redundancy.

[0062] Second, select the optimization algorithm and parameters: Furthermore, the stochastic gradient descent (SGD) algorithm with adaptive learning rate is selected as the optimization algorithm for model parameters. During the training process, the learning rate is dynamically adjusted according to the change of gradient. For example, an exponential decay learning rate strategy is adopted, and the initial value of the learning rate is set to 0.1. After each training round (epoch), the learning rate is multiplied by a decay factor (such as 0.95). This can achieve rapid convergence in the early stage of training, and avoid skipping the optimal solution due to excessive learning rate in the later stage.

[0063] Combined with L2 regularization term to prevent overfitting, the regularization coefficient λ is determined by cross-validation. During the cross-validation process, try different λ values ​​(such as 0.01, 0.1, 1, etc.) and select the λ value that makes the model perform best on the validation set. At the same time, in order to improve the convergence speed of the model, the momentum term is used, and the momentum coefficient is set to 0.9, which can accelerate the convergence of SGD in the relevant direction and suppress oscillation. When building, you can customize the initialization weight vector w and bias term b according to your needs.

[0064] Step 105: K-fold cross validation and traversal training are combined, an early stopping mechanism is introduced, the constructed logistic regression model is trained, and the trained model is evaluated.

[0065] In one embodiment of the present invention, first, the data set is divided and cross-validated, including: The preprocessed and feature-engineered dataset is divided into training set, validation set, and test set in a ratio of 8:1:1. The stratified sampling method is used to ensure that the ratio of group control devices to normal devices in the training set, validation set, and test set is roughly the same as that in the original dataset, so as to avoid the impact of uneven data distribution on model performance evaluation. Specifically, the train_test_split function can be used to divide the dataset into training, validation, and test sets.

[0066] During the model training process, K-fold cross validation (such as K=5) is used to further evaluate the generalization ability of the model. The training set is divided into K subsets, one of which is selected as the validation set each time, and the remaining subsets are used as the training set for training. This is repeated K times, and the average of the K validation results is finally taken as the final evaluation indicator of the model. This can make full use of limited training data and improve the stability and reliability of the model. Specifically, the StratifiedKFold class can be used for K-fold cross validation.

[0067] Then, the training process and early stopping mechanism include: The model training adopts batch training, and the size of each batch of data (batch size) is set to a preset value, which can be 64. In each training round, all batches of data in the training set are traversed, and the model parameters are updated according to the SGD algorithm. During the training process, the loss value (loss) and accuracy (accuracy) of the model on the validation set are recorded.

[0068] An early stopping mechanism is introduced. When the loss value of the model on the validation set does not decrease for 5 consecutive rounds or the accuracy does not increase for a preset number of consecutive rounds, training is stopped to prevent the model from overfitting. The preset number of rounds can be 3 rounds. At the same time, the model parameters with the best performance on the validation set are saved as the final model parameters. This method specifically traverses batch data during training and combines the early stopping mechanism to prevent overfitting.

[0069] In terms of model evaluation, in one embodiment of the present invention, the model is evaluated using accuracy, precision, recall and F1 value, as well as the Matthews correlation coefficient (MCC). By using the Matthews correlation coefficient for evaluation, the true positive, true negative, false positive and false negative results of the model can be comprehensively considered, which has a better evaluation effect for data sets with imbalanced categories. By calculating the values ​​of these indicators on the test set, the performance of the model is comprehensively evaluated.

[0070] Furthermore, the confusion matrix is ​​plotted to intuitively display the classification results of the model on the test set, including the number of true positives, false positives, true negatives, and false negatives. The confusion matrix can be used to deeply analyze the classification effect of the model on different categories and find possible misjudgments of the model and their causes.

[0071] For threshold adjustment and performance optimization, the logistic regression model outputs the probability value of the device being a group control device. By adjusting the threshold, the classification result of the model can be changed. During the evaluation process, try different thresholds, including but not limited to 0.3, 0.5, and 0.7, calculate the evaluation index values ​​under different thresholds, and select the threshold that makes the overall performance best as the final decision threshold of the model. For example, in some scenarios with high requirements for recall rate, the threshold can be appropriately lowered; in scenarios with high requirements for precision, the threshold can be appropriately increased.

[0072] In another embodiment of the present invention, the constructed model is trained and the trained model is evaluated, including: at the beginning of training, respectively configuring a training set and a validation set, adopting a K-fold cross-validation method and a batch training method to obtain the training set loss, training set accuracy, validation set loss and validation set accuracy, and then drawing a loss curve based on the training set loss and the validation set loss, and drawing an accuracy curve based on the training set accuracy and the validation set accuracy, and finally evaluating the model performance in combination with the loss curve and the accuracy curve.

[0073] In another embodiment of the present invention, the deployment of the model is as follows: Figure 5 As shown in the figure, the specific implementation includes: using microservice architecture to deploy the model on the cloud server, and encapsulating data collection, preprocessing, model prediction and other functions into independent microservices. This can improve the flexibility and scalability of the system and facilitate the individual optimization and upgrade of each functional module according to actual needs.

[0074] Use containerization technology (such as Docker) to package microservices into container images for rapid deployment and migration in different environments. Use the Kubernetes container orchestration tool to manage and schedule containers to achieve high availability and automatic scaling of model services, and dynamically adjust the number of container instances based on actual traffic load conditions.

[0075] On the other hand, a regular update mechanism can be established for the model, including: Set a regular time period for updating the model, such as weekly or monthly. When updating, first collect new device data and process it according to the same data collection, preprocessing and feature engineering steps as before.

[0076] The new data is then merged with the original training data, and the model is updated using incremental learning. In the incremental learning process, only the model part related to the new data is fine-tuned to avoid retraining the entire model, thereby improving update efficiency and reducing computing resource consumption.

[0077] In a second aspect of the present invention, a group control device identification device is provided, comprising: Data collection module, used to collect characteristic data of group control equipment; In one embodiment of the present invention, the data collection module can collect network device data, server-side data, mobile device and application data.

[0078] The data collection module is specifically used to interact with network devices using the SNMP protocol, configure the management station and set the community string, such as setting a suitable string for a specific router to obtain basic information. With the help of Wireshark and libpcap library, packet capture is enabled, the monitoring interface is enabled, capture rules are set, and key information is extracted and stored. The firewall is linked to the intrusion detection system, the firewall log is exported and analyzed, and data integration is obtained through the intrusion detection system API.

[0079] The data collection module is also used to analyze Web server logs using tools or scripts, extract information using regular expressions, parse user agent content, store and associate. Enable slow query logs for the MySQL database and set thresholds to obtain relevant information, store and wait for analysis. Process logs according to application server types, extract operations and error information, store and associate.

[0080] The data acquisition module is also used to use the Android application integration SDK to obtain the acceleration value using the corresponding class and process it at intervals. A specific class is used to obtain power information, which is recorded, stored or sent through a broadcast receiver. In the service component, a related class is used to obtain background information and process it.

[0081] In another embodiment of the present invention, the data collection module can collect data by using a multi-element method of collecting network device data.

[0082] The data collection module is also used to deeply analyze the Web server logs. In addition to the conventional IP address, request page URL, request time and other information, it also extracts detailed device information in the user agent string, such as device brand, model, operating system kernel version, etc. By mining this information, some potential clues to group control devices can be found, such as a large number of similar requests initiated from the same IP segment by devices of the same brand and model in a short period of time.

[0083] The data collection module is also used to cooperate with mobile application developers to collect sensor data of mobile devices through the SDK in the application, such as the change pattern of acceleration sensor data. When normal users use mobile devices, the acceleration sensor data will show natural random changes, while the group control devices often have more regular sensor data changes during simulated operations, for example, the acceleration almost does not change during virtual click operations.

[0084] Obtain the power consumption curve of the mobile device. Since the group control device runs specific tasks for a long time and at a high frequency, its power consumption pattern is significantly different from that of normal devices in normal usage scenarios, such as excessively fast power consumption and no obvious charging interval.

[0085] Collect the background running data of the application, including the time interval and duration of the application waking up in the background, and the interaction data with other applications. Group control devices may frequently wake up applications and interact with data within a specific time interval, while the background application activities of normal devices are relatively scattered and random.

[0086] A preprocessing module, used for preprocessing the collected feature data; In one embodiment of the present invention, the preprocessing module includes cleaning duplicate data, processing missing values, and standardizing data: Feature processing module, used to perform feature engineering on preprocessed feature data; In one embodiment of the present invention, the feature processing module is specifically used to perform in-depth mining of device behavior features on pre-processed feature data, extract network behavior features, refine application usage features, screen features and perform dimensionality reduction optimization processing.

[0087] Modeling module, used to build logistic regression models; In one embodiment of the present invention, the modeling module is specifically used to construct a mathematical expression of the model and initialize parameters, and select optimization algorithms and parameters.

[0088] The training and evaluation module is used to train the constructed logistic regression model by combining K-fold cross validation and traversal training, introduce an early stopping mechanism, and evaluate the trained model.

[0089] In one embodiment of the present invention, the training evaluation module is specifically used for data set partitioning and cross-validation, and then the training process and early stopping mechanism.

[0090] In the third aspect of the present invention, an electronic device is provided. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), etc., and fixed terminals such as digital TVs, desktop computers, etc.

[0091] An electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0092] Typically, the following devices may be connected to the I / O interface: input devices including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices including, for example, a magnetic tape, a hard disk, etc.; and communication devices. The communication devices may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data.

[0093] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0094] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0095] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the field to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.

[0096] It should be understood that the detailed description of the technical solutions of the present invention by means of the preferred embodiments is illustrative rather than restrictive. A person skilled in the art may modify the technical solutions described in the embodiments, or replace some of the technical features by equivalents, based on reading the specification of the present invention; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A group control device identification method, characterized in that: include: Collect characteristic data of group control equipment; Preprocessing the collected feature data; The preprocessing operation includes cleaning duplicate data, processing missing values, and standardizing data; Perform feature engineering on the preprocessed feature data; Build a logistic regression model; A combination of K-fold cross validation and traversal training was used, and an early stopping mechanism was introduced to train the constructed logistic regression model, and the trained model was evaluated.

2. The method according to claim 1, characterized in that The collecting characteristic data of the group control device includes: Collect network device data, server-side data, mobile device and application data.

3. The method according to claim 2, characterized in that The cleaning of duplicate data includes: Adopting an accurate deduplication method based on a hash algorithm, first perform hash calculation on the data records, and treat data with the same hash value as potential duplicate data; Compare the details of the data to ensure that real duplicate data is removed; For network traffic data, Bloom filters are used for preliminary deduplication, quickly eliminating most of the data that is unlikely to be duplicated, and then accurate comparison is performed; Build a digital fingerprint library, generate fingerprints based on a specific algorithm, store them in the library to determine duplication, and clean up duplicate data; The processing of missing values ​​comprises: Local weighted regression is used to fill in missing numerical data; Bayesian filling of missing data for categorical variables; Use the autoregressive moving average model to predict and fill in the missing data of the time series; The data standardization includes: The network traffic data is standardized by using adaptive method based on traffic distribution characteristics; For equipment performance data, logarithmic transformation is performed first and then standardization is performed.

4. The method according to claim 3, characterized in that The performing feature engineering processing on the preprocessed feature data includes: The pre-processed feature data is used to deeply mine the device behavior characteristics, extract network behavior characteristics, refine application usage characteristics, and finally screen features and perform dimensionality reduction optimization processing.

5. The method according to claim 4, characterized in that The construction of the logistic regression model comprises: Construct the mathematical expression of the model and initialize the parameters, and select the optimization algorithm and parameters.

6. The method according to claim 5, characterized in that The method of combining K-fold cross validation and traversal training, introducing an early stopping mechanism, training the constructed logistic regression model, and evaluating the trained model includes: Dataset partitioning and cross-validation, including partitioning the preprocessed and feature-engineered dataset into training, validation, and test sets in a ratio of 8:1:1; During the model training process, K-fold cross validation is used to further evaluate the generalization ability of the model; The model training adopts batch training method, and the size of each batch of data is set to a preset value. In each training round, all batches of data in the training set are traversed and the model parameters are updated according to the SGD algorithm; When the model's loss value on the validation set does not decrease for K consecutive rounds or the accuracy does not increase for a preset number of consecutive rounds, stop training.

7. The method according to claim 6, characterized in that The method further comprises: deploying the logistic regression model on a cloud server using a microservice architecture; The step of collecting feature data from the group control device, the step of preprocessing the collected feature data, and the step of performing feature engineering on the preprocessed feature data are respectively encapsulated as independent microservices; Use containerization technology to package microservices into container images, manage and schedule containers, and dynamically adjust the number of container instances based on actual traffic load conditions.

8. A group control device identification device, characterized in that: include: Data collection module, used to collect characteristic data of group control equipment; A preprocessing module, used for preprocessing the collected feature data; The preprocessing module includes cleaning duplicate data, processing missing values, and standardizing data: Feature processing module, used to perform feature engineering on preprocessed feature data; Modeling module, used to build logistic regression models; The training and evaluation module is used to train the constructed logistic regression model by combining K-fold cross validation and traversal training, introduce an early stopping mechanism, and evaluate the trained model.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and when the program is executed, the method according to any one of claims 1 to 7 can be implemented.

Citation Information

Patent Citations

  • Method of identifying risk device and related device

    CN109784403A

  • Mobile device man-machine operation detection method and system

    CN112597493A

  • Group control equipment identification method based on logistic regression model

    CN112926045A

  • Network threat detection method based on big data

    CN118018229A

  • Multi-mode electric energy prediction and optimization method based on HS-MOE

    CN118708886A