A mobile device detection method and system based on USB direct connection
By collecting and processing static parameters and dynamic time-series data of mobile devices in a USB direct communication link, a multimodal feature library is constructed and an LSTM model is used for fault prediction. This solves the problem that existing technologies cannot identify potential device faults and achieves high-precision fault detection and compliance verification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YIWU HAIYE ELECTRONICS CO LTD
- Filing Date
- 2026-03-13
- Publication Date
- 2026-05-29
AI Technical Summary
Existing USB direct connection-based mobile device detection technologies cannot capture the dynamic timing characteristics that reflect hardware aging trends during device operation, and cannot achieve early identification and warning of potential faults, making it difficult to meet the forward-looking needs of fault management in large-scale mobile device operation and maintenance scenarios.
By establishing a USB direct-connection anti-interference communication link, static parameters and dynamic time-series data of mobile devices are collected and noise-reduced, a multimodal standard feature library is constructed, and feature fusion and inference are performed using an LSTM model to output fault judgment results and compliance verification results.
It enables accurate identification and compliance verification of mobile device faults, improves the accuracy and foresight of detection, can predict potential faults in advance, and the detection results are traceable and visualized.
Smart Images

Figure CN122120159A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile device fault detection technology, specifically to a method and system for detecting mobile devices based on USB direct connection. Background Technology
[0002] With the widespread adoption and deep application of smartphones, industrial tablets, and portable mobile terminals in enterprise offices, industrial production, and public services, the monitoring and compliance management of mobile device operation status has become a crucial link in ensuring the continuous and stable operation of related business scenarios. USB direct connection-based device testing, with its stable physical connection, direct data interaction, and lack of network environment limitations, has become the mainstream technical implementation path for centralized offline testing and maintenance management of mobile devices. Iterative optimization of related technologies has significant application value in improving equipment maintenance efficiency and reducing equipment operation risks.
[0003] Current mobile device detection technologies based on USB direct connection mostly adopt the implementation logic of static hardware parameter acquisition combined with fixed threshold comparison. They can only identify and judge the explicit hardware failures and compliance issues that have already occurred in the device. They cannot capture the dynamic temporal characteristics that reflect the hardware aging trend during the operation of the device, and therefore cannot achieve early identification and warning of potential device failures. This makes it difficult to meet the forward-looking needs of fault management in large-scale mobile device operation and maintenance scenarios. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for detecting mobile devices based on USB direct connection, so as to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for detecting mobile devices based on USB direct connection, comprising the following steps: Includes the following steps: S1: Establish a USB direct connection anti-interference communication link; S2: Collect static parameters and dynamic timing data of the mobile device through the USB direct connection anti-interference communication link, and perform noise reduction processing on the dynamic timing data to obtain clean data; S3: Construct a multimodal standard feature library, which includes a static compliance benchmark library, a dynamic time-series feature template library, and a fault feature fingerprint library; S4: Perform feature fusion on the cleaned data and the static parameters, input the fused features into the trained LSTM model for inference, and obtain the fault judgment result and compliance verification result; S5: Output the fault judgment result, the compliance verification result, and the data traceability information to form a test report.
[0006] Preferably, step S1 specifically includes: S11: The detection terminal establishes a physical connection with the mobile device via the USB protocol to monitor the transmission error rate, transmission delay and signal strength of the transmission link in real time; S12: When the transmission error rate is greater than 0.01% or the transmission delay is greater than 50ms, the data packet size is automatically adjusted to adaptively switch within the range of 512B to 4KB, the CRC-32 dual check mechanism is enabled, and the power supply stability of the USB bus is optimized. S13: Establish an end-to-end encrypted channel based on the AES-128 algorithm to encrypt all data transmitted subsequently.
[0007] Preferably, step S2 specifically includes: S21: Collect the static parameters, which include device model, unique identifier, processor model, memory capacity, and authentication certificate number; S22: Collect the dynamic timing data, which includes processor load timing data, battery voltage timing data, memory occupancy timing data, and sensor response delay timing data; wherein, the processor load timing data and the memory occupancy timing data are collected at a frequency of 10ms per point for a duration of 30s; the battery voltage timing data is collected at a frequency of 5ms per point for a duration of 60s; and the sensor response delay timing data is collected at a frequency of 5ms per point for a duration of 20s. S23: Perform dual noise reduction on the dynamic time series data. First, correct the systematic fluctuation value through Kalman filtering. Then, use 5 consecutive data points as a sliding window, calculate the mean of the data within the window as valid data, and remove isolated outliers to obtain the cleaned data.
[0008] Preferably, the specific process of the dual noise reduction process in step S23 is as follows: First, the original dynamic time series data is processed by Kalman filtering. The actual operating values of the corresponding hardware parameters are used as state variables. Based on the Gaussian distribution characteristics of the time series data, the observation equation is constructed to output the time series data after correcting the continuous fluctuations of the system. Then, five consecutive data points are used as a fixed sliding window, which slides along the time axis point by point. The arithmetic mean of the data in each window is calculated as the effective data at the center of the window. Isolated abnormal jump points caused by electromagnetic interference and transmission errors are removed, and finally cleaned data is obtained.
[0009] Preferably, step S3 specifically includes: S31: Construct the static compliance benchmark library, which stores a list of authorized devices, the validity range of certification certificates, and the qualified threshold range of hardware parameters; S32: Construct the dynamic time series feature template library, based on the normal operation data of at least 20 mainstream mobile device models and at least 3 mobile devices of the same batch with a normal operation time not exceeding 100 hours for each model, train and generate time series templates exclusive to each device model, each time series template containing four features: mean, variance, peak value and trend slope. S33: Construct the fault feature fingerprint database, simulate corresponding hardware faults through accelerated aging tests such as battery cycle charging and discharging and processor continuous overclocking, combine with real fault cases of the same model from the after-sales maintenance of equipment manufacturers, obtain at least 50 sets of valid fault data, and extract time-series feature fingerprints corresponding to multiple types of known equipment faults. S34: The multimodal standard feature library adopts a two-level index structure of device model and feature type, and supports online updates and local cache synchronization.
[0010] Preferably, step S4 specifically includes: S41: Extract the mean, variance, peak value and trend slope features from the cleaned data, and concatenate the extracted features with the static parameters to form a 16-dimensional initial feature vector; S42: The 16-dimensional initial feature vector is reduced in dimensionality using the PCA algorithm, and the top 12 principal components with a cumulative variance contribution rate ≥95% are retained to obtain a 12-dimensional fused feature vector. S43: Input the 12-dimensional fused feature vector into the LSTM model for inference. The structure of the LSTM model is a 12-dimensional input layer, a 64-neuron hidden layer, and a 2-dimensional output layer. The two dimensions of the output layer are the fault probability and the compliance probability, respectively. The ratio of the training set to the validation set of the LSTM model is 8:2. S44: When the failure probability is greater than or equal to 30% and less than 70%, the failure judgment result is that a potential failure exists; when the failure probability is greater than or equal to 70%, the failure judgment result is that a failure has occurred; when the failure probability is less than 30%, the failure judgment result is normal; when the compliance probability is greater than or equal to 90%, the compliance verification result is compliant; when the compliance probability is less than 90%, the compliance verification result is non-compliant. S45: Perform adaptive compliance verification. If the mobile device is a customized terminal, retrieve the exclusive compliance benchmark for the corresponding customized terminal and perform dual verification in combination with the static compliance benchmark library.
[0011] Preferably, step S5 specifically includes: S51: The inspection report is a three-dimensional inspection report, which includes hardware status information, compliance information, and data traceability information; the hardware status information includes the fault judgment result, fault-related components, fault probability, and predicted fault occurrence time window; the compliance information includes the compliance verification result, non-compliance reasons, and compliance benchmark source; the data traceability information includes the collection timestamp, transmission link quality data, and feature fusion process data; S52: The three-dimensional detection report is visualized through the display interface of the detection terminal. When the fault probability is greater than or equal to 50%, an audible and visual alarm is triggered.
[0012] Preferably, the method further includes step S6: when a new model appears, normal operation data and fault data of the new model are collected, the multimodal standard feature library is updated, and the LSTM model is incrementally trained. The incrementally trained LSTM model is pushed to all detection terminals to achieve adaptation to the new model; when the fault judgment result is that there is a potential fault or a fault has occurred, the fault-related components are located by feature contribution analysis.
[0013] The present invention also provides a mobile device detection system based on USB direct connection, comprising: The communication module is used to establish a USB direct-connection anti-interference communication link; The data acquisition and processing module is used to acquire static parameters and dynamic time-series data of the mobile device through the USB direct connection anti-interference communication link, and to perform noise reduction processing on the dynamic time-series data to obtain clean data. The data storage module is used to construct a multimodal standard feature library, which includes a static compliance benchmark library, a dynamic time-series feature template library, and a fault feature fingerprint library. The analysis and reasoning module is used to perform feature fusion on the cleaned data and the static parameters, input the fused features into the trained LSTM model for reasoning, and obtain the fault judgment result and the compliance verification result. The output module is used to output the fault judgment result, the compliance verification result, and the data traceability information to form a test report.
[0014] The present invention also provides an electronic device, which is a physical device, comprising: The processor and the memory are communicatively connected. The memory is used to store at least one executable instruction executed by the processor, which executes the executable instruction to implement a USB direct connection-based mobile device detection method as described above.
[0015] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described method for detecting a mobile device based on a USB direct connection.
[0016] Compared with the prior art, the beneficial effects of the present invention are: By establishing a USB direct-connection anti-interference communication link, the system ensures stable and secure data transmission. By collecting static parameters and dynamic time-series data from mobile devices and performing noise reduction processing to obtain clean data, the system acquires high-quality basic data on device operation. By constructing a multimodal standard feature library, the system establishes a unified and accurate detection and judgment benchmark. By fusing clean data and static parameters and inputting them into an LSTM model for inference, the system obtains fault judgment results and compliance verification results, achieving accurate identification of device faults and completion of compliance verification. By outputting relevant information to form a detection report, the system achieves traceable and visualized detection results, significantly improving the accuracy, foresight, and scenario adaptability of mobile device detection. Attached Figure Description
[0017] Figure 1 The main flowchart of a mobile device detection method based on USB direct connection provided in an embodiment of the present invention; Figure 2 A structural block diagram of a mobile device detection system based on USB direct connection provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Please see Figure 1 This invention provides a method for detecting mobile devices based on USB direct connection, comprising: S1: Establish a USB direct connection anti-interference communication link.
[0020] Specifically, step S1 includes: S11: The detection terminal establishes a physical connection with the mobile device via the USB protocol to monitor the transmission error rate, transmission delay and signal strength of the transmission link in real time; S12: When the transmission error rate is greater than 0.01% or the transmission delay is greater than 50ms, the data packet size is automatically adjusted to adaptively switch within the range of 512B to 4KB, the CRC-32 dual check mechanism is enabled, and the power supply stability of the USB bus is optimized. S13: Establish an end-to-end encrypted channel based on the AES-128 algorithm to encrypt all data transmitted subsequently.
[0021] Specifically, step S1 provides a stable and secure communication foundation for the entire detection method. In response to the shortcomings of existing technologies, such as the susceptibility of USB direct transmission to electromagnetic interference, high data loss rate, and easy leakage of plaintext transmission, the integrity and security of the subsequently collected data are ensured through a combination of link status monitoring, parameter adaptive adjustment, double verification and encryption.
[0022] The monitoring period for transmission error rate and transmission delay is 10ms to ensure that link anomalies can be captured in a timely manner. In step S12, the step size for adaptive switching of data packets is 512B. When a link anomaly occurs, the step size is gradually reduced from the default 4KB to the minimum 512B. When the transmission error rate is ≤0.005% for three consecutive monitoring periods, it is gradually reverted to the default value according to the same step size, forming a complete closed-loop control. The CRC-32 dual verification mechanism refers to calculating the CRC-32 check value for the header and body of each data packet. The receiving end only considers the data packet valid when both check values match, which can simultaneously avoid header transmission errors and body data distortion, preventing erroneous data from entering the subsequent detection stage from the source. Optimizing the stability of USB bus power supply means controlling the USB bus output voltage fluctuation within ±0.1V to avoid voltage fluctuations causing abnormal response of the mobile device hardware monitoring interface.
[0023] Optionally, the physical connection established in step S1 is compatible with all versions of the USB 2.0 to USB 3.2 protocol, as well as all types of interfaces such as Type-A, Type-C, and Micro-USB, without the need to design separate hardware circuits for different interfaces.
[0024] In one possible implementation, when the mobile device is an iOS system device, the detection terminal establishes communication with the device through an MFi certified accessory, obtains link status parameters based on the external accessory framework open by the iOS system, completes link monitoring and adjustment, and achieves compatibility with all system devices.
[0025] S2: Collect static parameters and dynamic timing data of the mobile device through the USB direct connection anti-interference communication link, and perform noise reduction processing on the dynamic timing data to obtain clean data.
[0026] It should be noted that step S2 addresses the core shortcomings of existing technologies that only collect static single-point parameters, cannot reflect the operating trend of the equipment, and have high data noise leading to inaccurate subsequent detection. By combining dynamic time-series acquisition with dual noise reduction, it provides high-quality basic data for subsequent fault prediction.
[0027] Specifically, step S2 includes: S21: Collect the static parameters, which include device model, unique identifier, processor model, memory capacity, and authentication certificate number; S22: Collect the dynamic timing data, which includes processor load timing data, battery voltage timing data, memory occupancy timing data, and sensor response delay timing data; wherein, the processor load timing data and the memory occupancy timing data are collected at a frequency of 10ms per point for a duration of 30s; the battery voltage timing data is collected at a frequency of 5ms per point for a duration of 60s; and the sensor response delay timing data is collected at a frequency of 5ms per point for a duration of 20s. S23: Perform dual noise reduction on the dynamic time series data. First, correct the systematic fluctuation value through Kalman filtering. Then, use 5 consecutive data points as a sliding window, calculate the mean of the data within the window as valid data, and remove isolated outliers to obtain the cleaned data.
[0028] In step S21, the unique identification code refers to the International Mobile Equipment Identity (IMEI) of the mobile device, which is a unique identifier for each device. The certification certificate number refers to the mandatory product certification certificate number, network access certification number, or exclusive authorization certification number for enterprise-customized devices, which is the core basis for subsequent compliance verification. The testing terminal can obtain static parameters by calling the hardware information interface opened by the mobile device system through the USB link, and the collection time is no more than 1 second. In step S22, the dynamic time-series data refers to a continuous data sequence arranged in chronological order, reflecting the changes in the device's operating status over time. It can capture the potential aging trend and hidden fault characteristics of the device hardware, solving the problem that traditional static acquisition can only obtain parameters at a certain moment and cannot predict potential faults. The acquisition process adopts a time-division multiplexing mechanism, collecting only one type of time-series data at the same time, and switching to the next type after completion. This addresses the defects of USB bandwidth congestion and timestamp misalignment caused by multi-dimensional synchronous acquisition in existing technologies, ensuring that the time axis of the time-series data is completely aligned and guaranteeing the accuracy of subsequent feature extraction.
[0029] Furthermore, the specific process of the dual noise reduction processing in step S23 is as follows: First, the original dynamic time series data is processed by Kalman filtering. The actual operating values of the corresponding hardware parameters are used as state variables. Based on the Gaussian distribution characteristics of the time series data, the observation equation is constructed to output the time series data after correcting the continuous fluctuations of the system. Then, five consecutive data points are used as a fixed sliding window, which slides along the time axis point by point. The arithmetic mean of the data in each window is calculated as the effective data at the center of the window. Isolated abnormal jump points caused by electromagnetic interference and transmission errors are removed, and finally cleaned data is obtained.
[0030] It should be noted that the dual noise reduction process addresses the shortcomings of existing technologies where single filtering cannot simultaneously handle continuous systemic fluctuations and isolated impulse noise. It adopts a combination of Kalman filtering followed by sliding window mean filtering: Kalman filtering alone cannot eliminate isolated impulse noise, and mean filtering alone will smooth out the trend characteristics of time series data. The combined design of this solution not only fully preserves the trend characteristics of equipment operation, but also completely removes both types of noise, which can improve the accuracy of subsequent model inference by more than 15%.
[0031] In addition, if the acquisition of a certain type of time series data fails, it will be automatically repeated 3 times. If it still fails, the data of that type will be marked as abnormal and clearly marked in the subsequent test report to avoid the interruption of the entire test process due to a single type of data abnormality.
[0032] S3: Construct a multimodal standard feature library, which includes a static compliance benchmark library, a dynamic time-series feature template library, and a fault feature fingerprint library.
[0033] It is worth noting that step S3 addresses the pain points of existing technologies that only use a single static threshold, cannot adapt to the hardware characteristics of different models of equipment, and cannot identify hidden faults. It establishes a three-dimensional standard library covering static compliance, normal operation characteristics, and fault characteristics, providing a unified and accurate basis for subsequent detection and prediction.
[0034] Specifically, step S3 includes: S31: Construct the static compliance benchmark library, which stores a list of authorized devices, the validity range of certification certificates, and the qualified threshold range of hardware parameters; S32: Construct the dynamic time series feature template library, based on the normal operation data of at least 20 mainstream mobile device models and at least 3 mobile devices of the same batch with a normal operation time not exceeding 100 hours for each model, train and generate time series templates exclusive to each device model, each time series template containing four features: mean, variance, peak value and trend slope. S33: Construct the fault feature fingerprint database, simulate corresponding hardware faults through accelerated aging tests such as battery cycle charging and discharging and processor continuous overclocking, combine with real fault cases of the same model from the after-sales maintenance of equipment manufacturers, obtain at least 50 sets of valid fault data, and extract time-series feature fingerprints corresponding to multiple types of known equipment faults. S34: The multimodal standard feature library adopts a two-level index structure of device model and feature type, and supports online updates and local cache synchronization.
[0035] In step S31, the data in the static compliance benchmark library comes from publicly available certification data, official technical specifications from equipment manufacturers, and customized authorization lists provided by users, ensuring the authority and accuracy of the benchmark data. In step S32, the time-series template refers to the standard feature set of each dynamic time-series data point under normal no-load operation of the corresponding model of equipment, serving as the benchmark for judging whether the operating status of the device under test is normal. The mean refers to the arithmetic mean of the time-series data within the acquisition period, reflecting the overall operating level of the hardware parameters; the variance refers to the dispersion of the time-series data relative to the mean, reflecting the stability of hardware operation; the peak value refers to the maximum value of the time-series data within the acquisition period, reflecting the extreme operating state of the hardware; and the trend slope refers to the slope of the linear trend line of the time-series data fitted using the least squares method, reflecting the long-term trend of hardware parameters. In step S33, the fault feature fingerprint refers to the fixed and reproducible characteristic change pattern of the dynamic time-series data when a corresponding type of fault occurs. For example, the characteristic corresponding to a battery degradation fault is a significant increase in the variance of the voltage time-series data, and the characteristic corresponding to a processor aging fault is a significant increase in the frequency of peak occurrences in the load time-series data. In step S34, the first level of the secondary index structure is the device model, and the second level is the feature type, which can quickly locate the benchmark data of the corresponding model, improving the retrieval efficiency by more than 80% compared with the single-level index. The online update and local cache synchronization means that the detection terminal can obtain the update data package of the feature library through the cloud, update the local library file, and directly call the locally cached library file to complete the detection in the absence of network environment, adapting to different usage scenarios.
[0036] S4: Perform feature fusion on the cleaned data and the static parameters, input the fused features into the trained LSTM model for inference, and obtain the fault judgment result and compliance verification result.
[0037] It should be noted that step S4 addresses the core pain points of existing technologies, which can only perform post-fault detection through static threshold comparison, cannot predict potential faults, and have low detection accuracy. By combining temporal feature fusion with the LSTM temporal inference model, it achieves early prediction of potential equipment faults.
[0038] Specifically, step S4 includes: S41: Extract the mean, variance, peak value and trend slope features from the cleaned data, and concatenate the extracted features with the static parameters to form a 16-dimensional initial feature vector; S42: The 16-dimensional initial feature vector is reduced in dimensionality using the PCA algorithm, and the top 12 principal components with a cumulative variance contribution rate ≥95% are retained to obtain a 12-dimensional fused feature vector. S43: Input the 12-dimensional fused feature vector into the LSTM model for inference. The structure of the LSTM model is a 12-dimensional input layer, a 64-neuron hidden layer, and a 2-dimensional output layer. The two dimensions of the output layer are the fault probability and the compliance probability, respectively. The ratio of the training set to the validation set of the LSTM model is 8:2. S44: When the failure probability is greater than or equal to 30% and less than 70%, the failure judgment result is that a potential failure exists; when the failure probability is greater than or equal to 70%, the failure judgment result is that a failure has occurred; when the failure probability is less than 30%, the failure judgment result is normal; when the compliance probability is greater than or equal to 90%, the compliance verification result is compliant; when the compliance probability is less than 90%, the compliance verification result is non-compliant. S45: Perform adaptive compliance verification. If the mobile device is a customized terminal, retrieve the exclusive compliance benchmark for the corresponding customized terminal and perform dual verification in combination with the static compliance benchmark library.
[0039] In step S41, the 16-dimensional initial feature vector specifically includes four features from each of four types of time-series data: processor load, battery voltage, memory occupancy, and sensor response delay, totaling 16 dimensions. All features are mapped to the 0-1 interval using the min-max normalization method, with the normalization formula being: ,in These are the original eigenvalues. , To identify the minimum and maximum values of corresponding features within the same model's time-series template, the dimensional differences between different features are eliminated, preventing features with large numerical ranges from dominating the model's inference results. Feature concatenation involves aligning the extracted time-series features with the device model and authentication information, ensuring a complete match between the features and the model of the device to be detected, thus avoiding the use of incorrect baseline data. In step S43, the LSTM model is a Long Short-Term Memory network, which can effectively capture long-term dependencies in time-series data, adapting to the device operation trend prediction scenario of this solution. The 12-dimensional input layer perfectly matches the fusion feature vector dimension, the 64 neurons in the hidden layer use the tanh activation function, and the 2-dimensional output layer uses the sigmoid activation function, outputting the fault probability and compliance probability in the 0-1 interval. Model training uses the Adam optimizer with an initial learning rate of 0.001, employs the binary cross-entropy loss function, and has an upper limit of 100 training iterations. Training is terminated early when the validation set loss shows no decrease after 10 consecutive iterations to avoid overfitting. The threshold division in step S44 is determined based on the statistical results of a large amount of test data. The fault probability range of 30%-70% corresponds to the stage where the equipment has shown a fault development trend but has not yet experienced an obvious fault. The occurrence of faults can be predicted 1-3 months in advance.
[0040] In addition, the LSTM model is deployed based on a lightweight deep learning framework, which can perform local inference directly on the embedded processor of the detection terminal with an inference latency of ≤100ms. It does not rely on a cloud server and avoids the risk of leakage caused by data upload.
[0041] S5: Output the fault judgment result, the compliance verification result, and the data traceability information to form a test report.
[0042] Specifically, step S5 is the result output stage of the entire detection method. Its core is to present the detection results to the user clearly and completely, while ensuring the traceability of the detection results. Specifically, step S5 includes: S51: The inspection report is a three-dimensional inspection report, which includes hardware status information, compliance information, and data traceability information; the hardware status information includes the fault judgment result, fault-related components, fault probability, and predicted fault occurrence time window; the compliance information includes the compliance verification result, non-compliance reasons, and compliance benchmark source; the data traceability information includes the collection timestamp, transmission link quality data, and feature fusion process data; S52: The three-dimensional detection report is visualized through the display interface of the detection terminal. When the fault probability is greater than or equal to 50%, an audible and visual alarm is triggered.
[0043] In step S51, the three dimensions of the 3D inspection report are hardware status, compliance, and data traceability. These three dimensions are interconnected to form a complete chain of inspection evidence, ensuring that the inspection results are reproducible and traceable. The fault-related components are determined through feature contribution analysis. The feature contribution is calculated using the attention weights of an LSTM model. The contribution of each feature is the proportion of its corresponding attention weight to the total weight of all features. The hardware component corresponding to the feature with the highest contribution proportion is the fault-related component. The predicted fault occurrence time window is obtained by fitting the changing trend of the fault probability with the development pattern of the corresponding fault. The reasons for non-compliance are obtained by comparing equipment information with compliance benchmarks one by one. The source of the compliance benchmarks is marked with the issuing unit and standard number of the corresponding compliance requirements, ensuring that the verification basis is traceable. The data traceability information collection timestamp is accurate to milliseconds and is used for the subsequent reproduction and verification of inspection results. In step S52, the visualization is presented using a combination of charts and graphs. Hardware status information is displayed through time-series curves and a fault probability dashboard, compliance information is displayed through a checklist, and data traceability information is displayed through a collapsible details panel. The audible and visual alarm refers to the detection terminal display showing a red alarm pop-up window, while the built-in buzzer emits a prompt sound to remind the user to pay attention to the equipment's fault risks.
[0044] In addition, the 3D inspection report supports encrypted storage and export. The exported file contains a digital signature that is bound to the unique identifier of the inspection terminal hardware, which cannot be tampered with and can serve as a valid basis for equipment compliance certification and after-sales maintenance.
[0045] In one possible implementation, for enterprise-level equipment management scenarios, the testing terminal can synchronize the 3D testing report to the enterprise equipment management platform via a local area network, enabling batch testing and unified management of multiple devices.
[0046] S6: When a new model appears, collect the normal operation data and fault data of the new model, update the multimodal standard feature library, and incrementally train the LSTM model. Push the incrementally trained LSTM model to all detection terminals to achieve adaptation to the new model. When the fault judgment result is that there is a potential fault or a fault has occurred, locate the fault-related components through feature contribution analysis.
[0047] It should be noted that step S6 addresses the shortcomings of existing technologies, such as long adaptation cycles for new models and inaccurate fault location, by using incremental training and feature contribution analysis to achieve rapid adaptation of new models and accurate fault location.
[0048] The specific logic for adapting to new models is as follows: First, collect dynamic time-series data from at least three normally operating devices of this new model to generate a time-series template specific to this model. At the same time, collect static compliance benchmarks and fault feature fingerprints generated from simulated fault data for this model and update them to the multimodal standard feature library. Then, the newly collected normal data and fault data are added to the training dataset of the LSTM model, and the model is incrementally trained. During incremental training, the weight parameters of the input layer and hidden layer of the model are frozen, and only the weight parameters of the output layer are adjusted. In order to address the defect of the existing technology that the detection capability of old models is reduced due to full parameter incremental training, this ensures that the model can adapt to new models without losing the detection capability of the original models. Incremental training uses an initial learning rate of 0.0005, with a maximum of 50 iterations. Training is terminated when the validation set accuracy is ≥98%, and the training cycle does not exceed 24 hours. After training, the updated model and feature library are pushed to all detection terminals via the cloud to complete the adaptation for new models. The calculation logic of the feature contribution analysis is consistent with step S51, and is used to accurately locate fault-related components to guide equipment repair and maintenance.
[0049] In this embodiment, by establishing a USB direct-connection anti-interference communication link, the stability and security of data transmission are ensured. By collecting static parameters and dynamic time-series data of the mobile device and performing noise reduction processing to obtain clean data, high-quality basic data of device operation is obtained. By constructing a multimodal standard feature library, a unified and accurate detection and judgment benchmark is established. By fusing features of clean data and static parameters and inputting them into an LSTM model for inference, fault judgment results and compliance verification results are obtained, achieving accurate identification of device faults and completion of compliance verification. By outputting relevant information to form a detection report, the detection results are made traceable and visualized, significantly improving the accuracy, foresight, and scenario adaptability of mobile device detection.
[0050] Based on the above embodiments, such as Figure 2 As shown, the present invention also provides a USB direct connection-based mobile device detection system to support the USB direct connection-based mobile device detection method of the above embodiments. The USB direct connection-based mobile device detection system includes: The communication module is used to establish a direct USB physical connection with mobile devices, monitor the transmission error rate, transmission delay and signal strength of the transmission link in real time, adaptively adjust the transmission parameters and establish an end-to-end encrypted channel to realize the construction of a direct USB anti-interference communication link. The data acquisition and processing module is used to acquire static parameters and dynamic time-series data of the mobile device through the USB direct connection anti-interference communication link established by the communication module, and to perform dual noise reduction processing on the dynamic time-series data to obtain clean data. The data storage module is used to build and store a multimodal standard feature library, which includes a static compliance benchmark library, a dynamic time-series feature template library, and a fault feature fingerprint library, and supports online data updates and local caching. The analysis and reasoning module is used to perform feature fusion and dimensionality reduction on the cleaned data and the static parameters, input the processed fused features into the trained LSTM model for reasoning, and output the fault judgment result and compliance verification result. The output module is used to integrate the fault judgment results, compliance verification results and data traceability information, generate a three-dimensional detection report and complete the visualization display and anomaly alarm.
[0051] In this embodiment, by establishing a USB direct-connection anti-interference communication link, the stability and security of data transmission are ensured. By collecting static parameters and dynamic time-series data of the mobile device and performing noise reduction processing to obtain clean data, high-quality basic data of device operation is obtained. By constructing a multimodal standard feature library, a unified and accurate detection and judgment benchmark is established. By fusing features of clean data and static parameters and inputting them into an LSTM model for inference, fault judgment results and compliance verification results are obtained, achieving accurate identification of device faults and completion of compliance verification. By outputting relevant information to form a detection report, the detection results are made traceable and visualized, significantly improving the accuracy, foresight, and scenario adaptability of mobile device detection.
[0052] Furthermore, the aforementioned USB direct-connect mobile device detection system can run the above-mentioned USB direct-connect mobile device detection method. For specific implementation details, please refer to the method embodiment, which will not be repeated here.
[0053] Based on the above embodiments, such as Figure 3 As shown, the present invention also provides an electronic device, the electronic device comprising: The processor 202 includes at least one processor 202, at least one memory 201, a communication interface 203, and a communication bus 204, wherein the processor 202 is communicatively connected to the memory 201. In this embodiment, the memory 201 can be implemented in any suitable manner, for example, the memory 201 can be a read-only memory, a hard disk drive, a solid-state drive, or a USB flash drive, etc.; the memory 201 is used to store at least one executable instruction executed by the processor; In this embodiment, the processor 202 can be implemented in any suitable manner. For example, the processor 202 can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) that can be executed by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers, etc.; the processor is used to execute the executable instructions to implement a USB direct connection-based mobile device detection method as described above.
[0054] Based on the above embodiments, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described method for detecting a mobile device based on USB direct connection.
[0055] Those skilled in the art will recognize that the modules and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0056] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, equipment, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0057] In the several embodiments provided in this application, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or units may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or equipment, and may be electrical, mechanical, or other forms.
[0058] The modules described as separate components may or may not be physically separate. The components shown as modules 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 units can be selected to achieve the purpose of this embodiment according to actual needs.
[0059] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0060] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion 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 this invention. The aforementioned storage medium includes various media capable of storing program instructions, such as USB flash drives, portable hard drives, read-only storage servers, random access storage servers, magnetic disks, or optical disks.
[0061] Furthermore, it should be noted that the combination of the various technical features in this case is not limited to the combination methods described in the claims of this case or the combination methods described in the specific embodiments. All technical features described in this case can be freely combined or combined in any way, unless they contradict each other.
[0062] It should be noted that the above examples are merely specific embodiments of the present invention, and the present invention is obviously not limited to the above embodiments, with many similar variations. All modifications that can be directly derived or conceived by those skilled in the art from the content disclosed in this invention should fall within the protection scope of this invention.
[0063] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for detecting mobile devices based on direct USB connection, characterized in that, Includes the following steps: S1: Establish a USB direct connection anti-interference communication link; S2: Collect static parameters and dynamic timing data of the mobile device through the USB direct connection anti-interference communication link, and perform noise reduction processing on the dynamic timing data to obtain clean data; S3: Construct a multimodal standard feature library, which includes a static compliance benchmark library, a dynamic time-series feature template library, and a fault feature fingerprint library; S4: Perform feature fusion on the cleaned data and the static parameters, input the fused features into the trained LSTM model for inference, and obtain the fault judgment result and compliance verification result; S5: Output the fault judgment result, the compliance verification result, and the data traceability information to form a test report.
2. The method for detecting mobile devices based on USB direct connection according to claim 1, characterized in that, Step S1 specifically includes: S11: The detection terminal establishes a physical connection with the mobile device via the USB protocol to monitor the transmission error rate, transmission delay and signal strength of the transmission link in real time; S12: When the transmission error rate is greater than 0.01% or the transmission delay is greater than 50ms, the data packet size is automatically adjusted to adaptively switch within the range of 512B to 4KB, the CRC-32 dual check mechanism is enabled, and the power supply stability of the USB bus is optimized. S13: Establish an end-to-end encrypted channel based on the AES-128 algorithm to encrypt all data transmitted subsequently.
3. The method for detecting mobile devices based on USB direct connection according to claim 1, characterized in that, Step S2 specifically includes: S21: Collect the static parameters, which include device model, unique identifier, processor model, memory capacity, and authentication certificate number; S22: Collect the dynamic timing data, which includes processor load timing data, battery voltage timing data, memory occupancy timing data, and sensor response delay timing data; wherein, the processor load timing data and the memory occupancy timing data are collected at a frequency of 10ms per point for a duration of 30s; the battery voltage timing data is collected at a frequency of 5ms per point for a duration of 60s; and the sensor response delay timing data is collected at a frequency of 5ms per point for a duration of 20s. S23: Perform dual noise reduction on the dynamic time series data. First, correct the systematic fluctuation value through Kalman filtering. Then, use 5 consecutive data points as a sliding window, calculate the mean of the data within the window as valid data, and remove isolated outliers to obtain the cleaned data.
4. The method for detecting mobile devices based on USB direct connection according to claim 3, characterized in that, The specific process of the dual noise reduction process in step S23 is as follows: First, the original dynamic time series data is processed by Kalman filtering. The actual operating values of the corresponding hardware parameters are used as state variables. Based on the Gaussian distribution characteristics of the time series data, the observation equation is constructed to output the time series data after correcting the continuous fluctuations of the system. Then, five consecutive data points are used as a fixed sliding window, which slides along the time axis point by point. The arithmetic mean of the data in each window is calculated as the effective data at the center of the window. Isolated abnormal jump points caused by electromagnetic interference and transmission errors are removed, and finally cleaned data is obtained.
5. The method for detecting mobile devices based on USB direct connection according to claim 1, characterized in that, Step S3 specifically includes: S31: Construct the static compliance benchmark library, which stores a list of authorized devices, the validity range of certification certificates, and the qualified threshold range of hardware parameters; S32: Construct the dynamic time series feature template library, and train and generate time series templates exclusive to each device model based on the normal operation data of multiple mobile devices. Each time series template contains four features: mean, variance, peak value and trend slope. S33: Construct the fault feature fingerprint database, which includes time-series feature fingerprints corresponding to various types of known equipment faults; S34: The multimodal standard feature library adopts a two-level index structure of device model and feature type, and supports online updates and local cache synchronization.
6. The method for detecting mobile devices based on USB direct connection according to claim 1, characterized in that, Step S4 specifically includes: S41: Extract the mean, variance, peak value and trend slope features from the cleaned data, and concatenate the extracted features with the static parameters to form a 16-dimensional initial feature vector; S42: The 16-dimensional initial feature vector is reduced in dimensionality using the PCA algorithm, and the top 12 principal components with a cumulative variance contribution rate ≥95% are retained to obtain a 12-dimensional fused feature vector. S43: Input the 12-dimensional fused feature vector into the LSTM model for inference. The structure of the LSTM model is a 12-dimensional input layer, a 64-neuron hidden layer, and a 2-dimensional output layer. The two dimensions of the output layer are the fault probability and the compliance probability, respectively. The ratio of the training set to the validation set of the LSTM model is 8:
2. S44: When the failure probability is greater than or equal to 30% and less than 70%, the failure judgment result is that a potential failure exists; when the failure probability is greater than or equal to 70%, the failure judgment result is that a failure has occurred; when the failure probability is less than 30%, the failure judgment result is normal; when the compliance probability is greater than or equal to 90%, the compliance verification result is compliant; when the compliance probability is less than 90%, the compliance verification result is non-compliant. S45: Perform adaptive compliance verification. If the mobile device is a customized terminal, retrieve the exclusive compliance benchmark for the corresponding customized terminal and perform dual verification in combination with the static compliance benchmark library.
7. The method for detecting mobile devices based on USB direct connection according to claim 1, characterized in that, Step S5 specifically includes: S51: The inspection report is a three-dimensional inspection report, which includes hardware status information, compliance information, and data traceability information; the hardware status information includes the fault judgment result, fault-related components, fault probability, and predicted fault occurrence time window; the compliance information includes the compliance verification result, non-compliance reasons, and compliance benchmark source; the data traceability information includes the collection timestamp, transmission link quality data, and feature fusion process data; S52: The three-dimensional detection report is visualized through the display interface of the detection terminal. When the fault probability is greater than or equal to 50%, an audible and visual alarm is triggered.
8. The method for detecting mobile devices based on USB direct connection according to claim 1, characterized in that, The method further includes step S6: when a new model appears, normal operation data and fault data of the new model are collected, the multimodal standard feature library is updated, and the LSTM model is incrementally trained. The incrementally trained LSTM model is pushed to all detection terminals to achieve adaptation to the new model. When the fault judgment result is that there is a potential fault or a fault has occurred, the fault-related components are located by feature contribution analysis.
9. A mobile device detection system based on USB direct connection, characterized in that, include: The communication module is used to establish a USB direct-connection anti-interference communication link; The data acquisition and processing module is used to acquire static parameters and dynamic time-series data of the mobile device through the USB direct connection anti-interference communication link, and to perform noise reduction processing on the dynamic time-series data to obtain clean data. The data storage module is used to construct a multimodal standard feature library, which includes a static compliance benchmark library, a dynamic time-series feature template library, and a fault feature fingerprint library. The analysis and reasoning module is used to perform feature fusion on the cleaned data and the static parameters, input the fused features into the trained LSTM model for reasoning, and obtain the fault judgment result and the compliance verification result. The output module is used to output the fault judgment result, the compliance verification result, and the data traceability information to form a test report.
10. An electronic device, characterized in that, The electronic device includes: The processor and the memory are communicatively connected. The memory is used to store at least one executable instruction executed by the processor, the processor being used to execute the executable instruction to implement a USB direct connection-based mobile device detection method as described in any one of claims 1 to 8.