Internet of Things equipment firmware version identification method based on deep learning

Through the deep learning method and the FirmW2V framework, combining the loss function of comparison loss and center loss, the high-dimensional features of the Internet of Things device web interface are extracted, and the problems of low accuracy and heterogeneity of firmware version recognition of IoT devices are solved, achieving high efficiency , secure firmware version identification and vulnerability assessment.

CN119025152APending Publication Date: 2024-11-26TAIYUAN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411085759.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The prior art has problems in the recognition of firmware versions of IoT devices, such as low recognition accuracy, insufficient data integrity and accuracy, subjective bias, difficulty in handling heterogeneity, and the possibility of a large number of HTTP requests being considered malicious behavior, especially in the device. The recognition effect is significantly reduced when the version information is disclosed.

Method used

Using a deep learning-based method, the web interface is converted into vectors through the FirmW2V framework, the features of the embedded web interface are extracted using a large language model, and a new loss function that compares the loss and center loss can be achieved to achieve fine-grainedness of adjacent firmware versions. Identify. The method includes a firmware collection module, an embedded web interface acquisition module, a web interface encoding module and a hierarchical request module. It uses an autoencoder and classifier to perform high-dimensional feature vector encoding and decoding, and generates a low-dimensional potential vector representation to identify the firmware version .

Benefits of technology

Significantly improves the accuracy and efficiency of firmware version identification of IoT devices, can timely and accurately evaluate the vulnerability propagation of adjacent firmware versions, enhances the security of firmware management, reduces the number of HTTP requests, and avoids being considered malicious. risk and improves the processing capability of firmware heterogeneity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025152A_ABST
    Figure CN119025152A_ABST
Patent Text Reader

Abstract

The invention relates to an Internet of Things equipment firmware version identification method, in particular to an Internet of Things equipment firmware version identification method based on deep learning, which comprises the following steps of: downloading a firmware mirror image from a website of an equipment supplier, and obtaining a file system through decompression and simulation; the method comprises the following steps: acquiring a Web interface by an embedded Web interface, and preprocessing and segmenting a Web interface file; feature extraction and encoding: extracting feature representation of a Web interface file by using a large language model, and encoding and decoding through an auto-encoder to generate a low-dimensional potential vector; model training and optimization: optimizing model training through comparison loss and central loss, and improving the recognition accuracy; hierarchical request and identification are carried out, a hierarchical request strategy is executed on actual equipment, and efficient identification is achieved by comparing file structure changes. According to the method and the device, the efficient identification of the adjacent firmware versions of the Internet of Things equipment is realized, the vulnerability propagation condition of the adjacent firmware versions can be timely and accurately evaluated, and the security of firmware management is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for identifying the firmware version of an Internet of Things device, and in particular to a method for identifying the firmware version of an Internet of Things device based on deep learning. Background Art

[0002] The widespread use of Internet of Things (IoT) devices has brought high attention to their security and functionality. IoT devices, such as gateways / routers, network printers, and IP cameras, usually rely on frequent firmware updates to patch security vulnerabilities, improve overall performance, and add new features. However, different versions of firmware often have a lot of similarities in code and configuration, causing vulnerabilities to spread widely between different versions.

[0003] Existing research methods mainly identify IoT devices through Internet search engines (such as Shodan and Censys) and analyze their firmware versions using protocol banner information (such as metadata, service options, and web management pages of embedded servers). However, this method relies on the information publicly available from the device, and the recognition accuracy drops significantly when the device does not display its version information. For example, the banner information of the Netgear EX6200 does not contain the "EX6200" string, making it undetectable. In addition, these methods rely on the integrity and accuracy of existing data and feature information, and are vulnerable to outdated or manipulated data. Another method is to build firmware fingerprints of embedded web interfaces based on real devices and IoT firmware simulation, and identify firmware versions by comparing these fingerprints. This method has subjective bias problems and is difficult to handle the heterogeneity of IoT device firmware. In addition, these methods usually require a large number of HTTP requests to identify the firmware version of a single device, which may be regarded as malicious behavior. Although the accessible files in the network interface are used as signatures, the high similarity between adjacent firmware versions reduces their effectiveness. IoT device manufacturers are increasingly restricting public access to firmware, making it difficult to obtain the latest version for research.

[0004] In general, the existing technologies have the following defects in the identification of IoT device firmware versions: reliance on publicly available information from the device, resulting in low recognition accuracy; insufficient data integrity and accuracy, susceptible to manipulation and outdated data; subjective bias and difficulty in handling heterogeneity in firmware simulation methods; a large number of HTTP requests may be considered malicious behavior; the high similarity of adjacent firmware versions reduces the recognition effect; manufacturers restrict public firmware access, making it difficult to obtain the latest version for research. The above defects show that there is an urgent need for a fast and robust method to identify the firmware versions of IoT devices and accurately evaluate the propagation of vulnerabilities in adjacent firmware versions. Summary of the invention

[0005] In order to solve the problem of low recognition accuracy in the existing technology of IoT device firmware version recognition, this paper proposes a method for IoT device firmware version recognition based on deep learning. Based on the FirmW2V framework, web is converted into vec vectors for identifying adjacent firmware versions of IoT devices. The framework extracts features of embedded Web interfaces using large language models (LLMs) and proposes a new loss function combining contrast loss and center loss to achieve fine-grained recognition of adjacent firmware versions.

[0006] The present invention is implemented by adopting the following technical scheme: a method for identifying the firmware version of an Internet of Things device based on deep learning, comprising four modules: a firmware collection module, an embedded Web interface acquisition module, a Web interface encoding module and a hierarchical request module; wherein the firmware collection module is responsible for collecting firmware images from the website of the device supplier and through an OTA extraction tool, the embedded Web interface acquisition module simulates the operating environment of a real device through firmware simulation and full system simulation, and obtains Web interface files; the hierarchical request module executes a hierarchical request strategy on an actual device, compares and analyzes the Web directory changes between firmware versions by utilizing the Web directory of the file system extracted by the embedded Web interface acquisition module, and realizes preliminary identification of the firmware version; if the hierarchical request module cannot realize the firmware version identification, the Web interface encoding module is further used to identify the firmware version; the Web interface encoding module extracts high-dimensional feature vectors of the Web interface files through a large language model, constructs an autoencoder to encode and decode the high-dimensional feature vectors, and generates a low-dimensional latent vector representation, the latent vector is used as the input of a classifier, and the classifier outputs a predicted firmware version probability.

[0007] In the above-mentioned method for identifying firmware versions of IoT devices based on deep learning, when the Web interface encoding module identifies the firmware version, it first pre-processes the collected Web interface files, deletes files without content, removes symbols and formats in the text, and then segments the long text, retaining the overlapping parts between adjacent paragraphs; then, a pre-trained large language model is used to extract high-dimensional feature vectors. In order to capture potential semantic features, an autoencoder is constructed to encode and decode the high-dimensional feature vectors to generate a low-dimensional latent vector representation; in order to improve the recognition accuracy of the model, contrast loss and center loss are used to optimize the training of the autoencoder, increase the distinction between files with the same name between different versions, and make the file features within the same version more aggregated;

[0008] The specific steps are:

[0009] 1) After collecting the Web interface file set W i After preprocessing, the token sequence X is generated using the tokenizer of the large language model i, using the pre-trained large language model to generate a high-dimensional feature vector H i :H i =LLM(X i )={h i,1 ,h i,2 ,...,h i,n},in, A high-dimensional feature vector representing a labeled sequence; X i is the i-th firmware version f i The marker sequence of

[0010] 2) Convert the data into negative samples to train the autoencoder. For the i-th firmware version f i The web interface fileset contained in W i , corresponding to negative samples N i , for the jth Web interface file w i,j , randomly select a web interface file with the same name in an adjacent firmware version k,j As negative samples, construct a training data set: T train ={(w i,j ,w k,j ,y i )|w i,j ,w k,j ,y i ∈W i ,N i ,Y},y i is the true class label;

[0011] 3) When using the large language model from firmware version f i The tag sequence X i Extract high-dimensional feature vector H i After that, the autoencoder is trained to capture the information in the latent semantic space and realize feature reconstruction. The autoencoder includes an encoder E and a decoder D, where the latent vector z output by the encoder is i,j =E(h i,j ), the feature vector output by the decoder Where L is the dimension of the input high-dimensional feature vector and d is the dimension of the latent vector; the reconstruction loss is defined by the minimum mean square error loss to ensure the minimum difference between the input and the reconstructed output:

[0012] 4) For the selected negative samples, constraints are imposed during the autoencoder training process to ensure that the encoder separates the features of files with the same name but different labels in the latent space. The specific method is as follows:

[0013] Where margin is a hyperparameter representing the minimum distance between files with the same name in different versions;

[0014] 5) Calculate each true class label y i The center vector The center loss is defined as the mean squared error between the current sample latent vector and the corresponding class center vector:

[0015] 6) The input of the classifier is the latent vector z obtained by the encoder i,j ; The output is the probability distribution of versions: Where m is the number of versions, P(y i = k | z i,j ) is the latent vector z i,j The probability of being classified as the kth version; then use the cross entropy loss: Supervise the classifier, where y i Represents the true class label.

[0016] In the above-mentioned IoT device firmware version identification method based on deep learning, the large language model adopts NV-Embed-v1.

[0017] In the above-mentioned method for identifying firmware versions of IoT devices based on deep learning, the firmware collection module collects firmware images in the following process: first, a customized crawler script is used to automatically download the firmware release version from the service support page of the brand supplier; then, OTA firmware extraction is performed by configuring various OTA protocols supported by different suppliers and devices.

[0018] In the above-mentioned method for identifying firmware version of IoT devices based on deep learning, the process of acquiring the Web interface file by the embedded Web interface acquisition module is as follows: before acquiring the Web interface file, the firmware image is first decompressed and preprocessed, including locating the Web directory and saving the original file name and path; then, the firmware is fully simulated through the firmware simulation tool to ensure that the Web interface file can be accessed on a real device.

[0019] The present invention realizes efficient identification of adjacent firmware versions of IoT devices, and can timely and accurately evaluate the vulnerability propagation of adjacent firmware versions, significantly improving the security of firmware management. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic diagram of the system overview.

[0021] Figure 2 Schematic diagram of the FirmW2V framework. DETAILED DESCRIPTION

[0022] The present invention is described in detail below with reference to the accompanying drawings.

[0023] 1. System Design Overview

[0024] The invention comprises four main modules: a firmware collection module, an embedded Web interface acquisition module, a Web interface encoding module and a hierarchical request module. Figure 1 An overview of the system design is presented.

[0025] The firmware collection module is responsible for collecting firmware images from the device vendor's website and through the OTA extraction tool. First, a custom crawler script is used to automatically download the firmware release version for the service support page of the major brand vendors. Then, OTA firmware extraction is performed by configuring various OTA protocols supported by different vendors and devices. In order to capture OTA upgrade traffic, first identify and capture the OTA upgrade traffic of the device, analyze the traffic characteristics, such as the source IP address or domain name, protocol, port number, and data volume, and then perform TCP reassembly on the OTA upgrade traffic and extract the firmware file from it. Finally, the integrity of the extracted firmware file is verified to ensure that it is consistent with the hash value in the OTA request.

[0026] The embedded Web interface acquisition module simulates the operating environment of the real device through firmware simulation and full system simulation to obtain the Web interface file. Before obtaining the Web interface file, the firmware image is first decompressed and preprocessed, including locating the Web directory and saving the original file name and path. Then, the firmware is fully simulated through a firmware simulation tool (such as QEMU) to ensure that the Web interface file can be accessed on the real device and avoid potential model performance degradation.

[0027] The web interface encoding module extracts features from web interface files through large language models (LLMs). First, the collected web interface files are preprocessed to delete files without content, remove symbols and formats in the text, and then the long text is segmented to retain the overlap between adjacent paragraphs. Then, a pre-trained large language model (such as NV-Embed-v1) is used to extract high-dimensional feature vectors. In order to capture potential semantic features, an autoencoder is constructed to encode and decode high-dimensional feature vectors to generate low-dimensional latent vector representations. In order to improve the recognition accuracy of the model, contrast loss and center loss are used to optimize model training, increase the distinction between files with the same name between different versions, and make the file features within the same version more clustered.

[0028] The hierarchical request module implements the hierarchical request strategy on the actual device, and compares and analyzes the changes in the web directories between the firmware versions by using the web directories of the file system extracted by the embedded web acquisition module, so as to achieve efficient preliminary identification of the firmware version. The specific steps include initializing the comparison table and the file occurrence count table, calculating the difference between each pair of files in the firmware version file set, generating a comparison table, requesting files based on file differences, gradually narrowing the possible firmware version set, and giving priority to requesting the pages with the most significant changes. If the file difference request cannot determine the version, the FirmW2V framework is further used to identify its firmware version in a fine-grained manner.

[0029] 2. Problem Definition

[0030] In the firmware identification task, the present invention develops an encoder that can generate feature representations for the web interfaces of adjacent firmware versions, thereby facilitating subsequent firmware classification. Assume that there is a firmware version set F = {f1, f2, ..., f m}, where f i Table ith firmware version, |F| = m represents the total number of firmware version sets. Each firmware version contains web interface files obtained through remote access after firmware simulation, which cover various file formats. In order to facilitate the subsequent feature extraction process, all non-empty text files are retained, non-text files such as images, audio and video are removed, and filtered by file extension (such as "*.png"). The ith firmware version f i A set of web interface files W i ={w i,1 ,w i,2 ,…,w i,n} means that w i,j Represents the jth Web interface file. The content of each Web interface file is labeled by a large language model to generate an input sequence in represents the kth tag. The i-th firmware version f i The set of labeled sequences is denoted as X i ={x i,1 ,x i,2 ,…,x i,n}.

[0031] Construct the input data set T = {(y i ,w i,j ,x i,j )|y i =f i ∈F,w i,j ∈W i ,x i,j ∈X i}. Firmware version f iThe web interface files in the . i,j and the true class label y i , the latent vector of the labeled input sequence is Where d is the dimension of the latent vector. Firmware version f i The latent vectors of all web interface files in form a latent matrix Z i ={z i,j |j=1,2,…,n i}, whose dimension is n i ×d. Due to the file reuse phenomenon in adjacent firmware versions, the dataset is significantly unbalanced. i and f i+1 , the file with the same name w i,j and w (i+1),j The latent vector of i,j -z (i+1),j ||< <z i,j -z i,k ||, where j≠k. Based on the above notation and problem definition, the formal goal of this work is as follows: Given an input dataset T, the goal of this work is as follows:

[0032] 1) Learn a firmware version Web interface file indicating encoder f:X i →Z i , so that for any set of labeled sequences X i , relative to samples X with the same name but different labels k and randomly sampled samples X with the same label s , satisfying ||f(X i )-f(X k )||>>||f(X i )-f(X s )||=δ,(δ<∈ and i≠k), where ∈ is the threshold for clustering features of files with the same label;

[0033] 2) Learn a probability function g:Z i →y i Get the correct firmware version classification;

[0034] 3) Get the representative page The cluster center C i =Cluster(Z i ).

[0035] 3.FirmW2V Framework

[0036] FirmW2V generates feature representations of web interface files. First, the collected web interface files are preprocessed to delete files without content, remove symbols and formats in the text, and then the long text is segmented, retaining the overlap between adjacent paragraphs. Next, a pre-trained large language model (such as NV-Embed-v1) is used to extract high-dimensional feature vectors. In order to capture potential semantic features, an autoencoder is constructed to encode and decode high-dimensional feature vectors to generate low-dimensional latent vector representations. In order to improve the recognition accuracy of the model, contrast loss and center loss are used to optimize model training, increase the distinction between files with the same name between different versions, and make the file features within the same version more clustered.

[0037] 1) After collecting the Web interface file set W i After preprocessing, the token sequence X is generated using the tokenizer of the large language model i , using the pre-trained large language model to generate a high-dimensional feature vector H i :H i =LLM(X i )={h i,1 ,h i,2 ,…,h i,n},in, A high-dimensional feature vector representing the input sequence.

[0038] 2) Convert the data into negative sample pairs to train the autoencoder. For the i-th firmware version f i The web interface fileset contained in W i , there are corresponding negative samples N i For each web interface file w i,j , randomly select a web interface file with the same name in an adjacent firmware version k,j As negative samples, construct a training data set: T train ={(w i,j ,w k,j ,y i )|w i,j ,w k,j ,y i ∈W i ,N i ,Y}.

[0039] 3) Use autoencoders to solve the difference between real firmware and simulated firmware. i The input sequence X i Extract high-dimensional feature vector H i After that, the autoencoder is trained to capture the information in the latent semantic space and achieve feature reconstruction. Define encoder E and decoder D, where the latent vector z output by the encoder is i,j=E(h i,j ), the feature vector output by the decoder Where L is the input feature dimension and d is the latent vector dimension. The reconstruction loss is defined by the minimum mean square error (MSE) loss to ensure the minimum difference between the input and the reconstructed output:

[0040] 4) Contrastive learning is used to alleviate the similarity problem of web interface files with the same name in adjacent firmware versions. For the selected negative samples, constraints are imposed during the autoencoder training process to ensure that the encoder separates the features of files with the same name but different labels in the latent space. The specific method is as follows:

[0041] Where margin is a hyperparameter that represents the minimum distance between different versions of web interface files with the same name.

[0042] 5) Use the center loss to minimize the distance between similar features to solve the problem of scattered distribution of Web interface file features in the same firmware version. Calculate each true class label y i The center vector c yi : The center loss is defined as the mean squared error between the current sample latent vector and the corresponding class center vector:

[0043] 6) The classifier uses a fully connected neural network and a SoftMax function. The input is the latent vector z obtained by the encoder i,j , the output is the probability distribution of versions: Where m is the number of versions, P(y i = k | z i,j ) is the latent vector z i,j The probability of being classified as the kth version; then use the cross entropy loss: Supervise the classifier, where y i Represents the true class label.

[0044] Training objective: Based on reconstruction loss, contrast loss and center loss, the complete loss function of FirmW2V can be expressed as: L total =L Recon +αL Contrastive +βL Center +γL Cls . Among them, α, β and γ balance the contribution of loss. After the complete loss continues to decrease and stabilizes, the model training is completed. In practical applications, we first use the hierarchical request strategy to send page requests to real devices to achieve preliminary judgment. If the judgment fails, we use the representative page R iA request is made to a real device and the requested page is input into the FirmW2V framework. The result given by the classifier is used to determine the firmware version running on the device.

[0045] The working principle and process of the present invention include: firmware collection and preprocessing, downloading the firmware image from the website of the equipment supplier, obtaining the file system through decompression and simulation, and locating the Web directory; embedded Web interface acquisition, sending HTTP requests to obtain Web interface files, preprocessing and segmenting Web interface files; feature extraction and encoding, using a large language model to extract feature representations of Web interface files, encoding and decoding through an autoencoder to generate low-dimensional potential vectors; model training and optimization, optimizing model training through contrast loss and center loss to improve recognition accuracy; hierarchical request and recognition, executing hierarchical request strategies on actual devices, and achieving efficient recognition by comparing file structure changes. Through the above steps, the present invention realizes efficient recognition of adjacent firmware versions of IoT devices, and can timely and accurately evaluate the propagation of vulnerabilities of adjacent firmware versions, significantly improving the security of firmware management.

[0046] The deep learning-based firmware identification framework FirmW2V proposed in this invention has the following significant advantages and beneficial effects:

[0047] 1. Improved recognition accuracy and efficiency. By leveraging pre-trained large language models (LLMs) to automatically extract features from web interface text, FirmW2V can effectively capture the deep semantics of the text, thereby significantly improving the accuracy of firmware version recognition. Experimental results show that the ROC curve on the test firmware dataset shows that the FirmW2V framework significantly outperforms existing methods in terms of accuracy. In addition, the hierarchical request module achieves efficient firmware version recognition by comparing the file structure changes between different firmware versions, greatly improving recognition efficiency.

[0048] 2. Enhanced handling of firmware heterogeneity. Existing technical solutions often have difficulty coping with the heterogeneity of firmware from different vendors and devices. However, the present invention uses LLMs to automatically extract features, which can maintain good stability and consistency when processing firmware with different specifications, formats, and characteristics. This not only reduces the labor intensity of manual feature design, but also improves the accuracy and robustness of feature extraction.

[0049] 3. Improved ability to distinguish files with the same name in adjacent firmware versions. The high similarity between adjacent firmware versions is a major challenge for existing methods. The present invention optimizes model training by using contrast loss and center loss to ensure that samples of files with the same name in adjacent versions are more separated in the feature space, thereby increasing the distinction between different versions. At the same time, the center loss is used to make the file features in the same version more clustered, improving the classification effect of the model.

[0050] 4. Improved the security and efficiency of real-time identification. By implementing a layered request strategy on the actual device, the number and frequency of HTTP requests are greatly reduced by gradually narrowing the set of possible firmware versions and prioritizing requests for pages with the most significant changes, avoiding the risk of being considered malicious behavior. This not only improves the efficiency of real-time identification, but also enhances the security of operations.

[0051] 5. High degree of automation in data collection and processing. The firmware collection module proposed in the present invention can automatically download firmware from the official website of the equipment supplier, decompress the firmware, perform firmware simulation, and statically analyze the file system. This automated processing greatly reduces manual intervention and improves the efficiency of data collection and processing.

[0052] Under experimental conditions, the FirmW2V framework demonstrated significant superiority when processing 4442 firmware images and 130,445 valid embedded web interface files. The experimental method includes the use of contrast loss and center loss, which ensures the model's recognition ability at a fine-grained level and enhances the distinction between files of different versions. The experimental results show that the accuracy of FirmW2V is significantly higher than that of traditional methods, verifying the effectiveness of the invention in practical applications.

Claims

1. A method for identifying firmware versions of IoT devices based on deep learning. Features: It includes four modules: firmware collection module, embedded web interface acquisition module, web interface encoding module and hierarchical request module; The firmware collection module is responsible for collecting firmware images from the device vendor's website and through OTA extraction tools. The embedded Web interface acquisition module simulates the operating environment of the real device through firmware simulation and full system simulation to obtain the Web interface file. The hierarchical request module executes the hierarchical request strategy on the actual device, obtains the Web directory of the file system extracted by the embedded Web interface acquisition module, compares and analyzes the changes in the Web directory between firmware versions, and realizes the preliminary identification of the firmware version. If the hierarchical request module cannot realize the firmware version identification, the Web interface encoding module is further used to identify the firmware version. The Web interface encoding module extracts high-dimensional feature vectors of the Web interface file through a large language model, constructs an autoencoder to encode and decode the high-dimensional feature vectors, and generates a low-dimensional latent vector representation. The latent vector is used as the input of the classifier, and the classifier outputs the predicted firmware version probability.

2. According to the method for identifying the firmware version of an IoT device based on deep learning according to claim 1, Features: When the web interface encoding module identifies the firmware version, it first preprocesses the collected web interface files, deletes files without content, removes symbols and formats in the text, and then segments the long text, retaining the overlapping parts between adjacent paragraphs; then, it uses the pre-trained large language model to extract high-dimensional feature vectors. In order to capture potential semantic features, it constructs an autoencoder to encode and decode the high-dimensional feature vectors to generate a low-dimensional latent vector representation; in order to improve the recognition accuracy of the model, it uses contrast loss and center loss to optimize the autoencoder training, increase the distinction between files with the same name between different versions, and make the file features within the same version more clustered; The specific steps are: 1) After collecting the Web interface file set W i After preprocessing, the token sequence X is generated using the tokenizer of the large language model i , using the pre-trained large language model to generate a high-dimensional feature vector H i :H i =LLM(X i )={h i,1 ,h i,2 ,...,h i,n },in, A high-dimensional feature vector representing a labeled sequence; X i is the i-th firmware version f i The marker sequence of 2) Convert the data into negative samples to train the autoencoder. For the i-th firmware version f i The web interface fileset contained in W i , corresponding to negative samples N i , for the jth Web interface file w i,j , randomly select a web interface file with the same name in an adjacent firmware version k,j As negative samples, construct a training data set: T train ={(w i,j ,w k,j ,y i )|w i,j ,w k,j ,y i ∈W i ,N i ,Y},y i is the true class label; 3) When using the large language model from firmware version f i The tag sequence X i Extract high-dimensional feature vector H i After that, the autoencoder is trained to capture the information in the latent semantic space and realize feature reconstruction. The autoencoder includes an encoder E and a decoder D, where the latent vector z output by the encoder is i,j =E(h i,j ), the feature vector output by the decoder Where L is the dimension of the input high-dimensional feature vector and d is the dimension of the latent vector; the reconstruction loss is defined by the minimum mean square error loss to ensure the minimum difference between the input and the reconstructed output: 4) For the selected negative samples, constraints are imposed during the autoencoder training process to ensure that the encoder separates the features of files with the same name but different labels in the latent space. The specific method is as follows: Where margin is a hyperparameter representing the minimum distance between files with the same name in different versions; 5) Calculate each true class label y i The center vector The center loss is defined as the mean squared error between the current sample latent vector and the corresponding class center vector: 6) The input of the classifier is the latent vector z obtained by the encoder i,j ; The output is the probability distribution of versions: Where m is the number of versions, P(y i = k | z i,j ) is the latent vector z i,j The probability of being classified as the kth version; then use the cross entropy loss: Supervise the classifier, where y i Represents the true class label.

3. According to the method for identifying the firmware version of an IoT device based on deep learning in claim 2, Features: The large language model uses NV-Embed-v1.

4. According to a method for identifying the firmware version of an IoT device based on deep learning according to claim 1, 2 or 3, Features: The firmware collection module collects firmware images in the following way: first, it uses a custom crawler script to automatically download the firmware release version from the brand vendor’s service support page; then, it performs OTA firmware extraction by configuring various OTA protocols supported by different vendors and devices.

5. According to a method for identifying the firmware version of an IoT device based on deep learning according to claim 1, 2 or 3, Features: The process of acquiring the Web interface file by the embedded Web interface acquisition module is as follows: before acquiring the Web interface file, the firmware image is first decompressed and preprocessed, including locating the Web directory and saving the original file name and path; Then, the firmware is fully simulated through the firmware simulation tool to ensure that the web interface files can be accessed on the real device.