LED spectrum fingerprint open set identification method based on Transform and support vector data description and related equipment

By combining the spectral feature extraction and classification methods of Transformer and SVDD algorithms, the problems of low LED spectral recognition accuracy and poor anti-interference ability in the prior art are solved, and LED spectral fingerprint open-set recognition with high accuracy and low computational complexity are achieved , suitable for security threat identification in complex environments.

CN119249250APending Publication Date: 2025-01-03Chinese People's Liberation Army Cyberspace Force Information Engineering University

Patent Information

Application Number
CN202411349202.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The existing LED spectrum recognition method is low in recognition accuracy and poor in interference resistance when processing complex and diverse spectral data, especially when facing new or unknown data, and has high data acquisition and labeling costs, which limits its wide range. application.

Method used

Using a method based on Transformer and support vector data description, a hyperspheric model is constructed through a feature extraction network combined with SVDD algorithm to classify spectral feature vectors. Transformer's self-attention mechanism extracts global features and local features of CNN for fusing, and combines particles. The group optimization algorithm optimizes the hyperspheric model parameters to realize the identification of spectral data of unknown categories.

Benefits of technology

It achieves high recognition accuracy, especially in multi-light environments, and has the ability to open set recognition, which reduces data demand and calculation complexity, and enhances the practicality and flexibility of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249250A_ABST
    Figure CN119249250A_ABST
Patent Text Reader

Abstract

The invention provides an LED spectrum fingerprint open set identification method based on Transform and support vector data description and related equipment. The method comprises the following steps: collecting an optical signal emitted by at least one LED device, converting the optical signal into spectral data, and dividing the spectral data into a training set and a test set; inputting the training set into a preset feature extraction network to carry out network training so as to learn and obtain a spectral feature vector; wherein the feature extraction network comprises a Transform branch, a CNN (Convolutional Neural Network) branch and a feature interaction module; based on the spectral feature vectors of the training set, constructing a hypersphere model by using an SVDD algorithm, and optimizing parameters of the hypersphere model to obtain an optimal hypersphere model; and inputting test samples in a test set into the trained feature extraction network to obtain corresponding spectral feature vectors, and inputting the spectral feature vectors of the test samples into the optimal hypersphere model for classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of spectrum analysis and machine learning, and in particular to an open-set identification method for LED spectrum fingerprint based on Transformer and support vector data description (SVDD) and related equipment. Background Art

[0002] With the rapid development of wireless communication technology, traditional radio frequency (RF) communication faces spectrum congestion and security issues. As an emerging technology, visible light communication (VLC) uses light-emitting diodes (LEDs) for data transmission, providing a high-bandwidth, low-cost solution and enhancing the security of communication systems. However, with the widespread application of VLC systems, its security challenges have gradually emerged, especially in identifying unauthenticated or untrusted devices. Therefore, ensuring the safe operation of VLC systems and effectively identifying potential threat devices has become an important direction of current research.

[0003] Inspired by radio frequency systems, device fingerprinting technology is applied to the field of optical communications to prevent spoofing or impersonation attacks. The light emitted by a light-emitting diode (LED) is analyzed to extract subtle features related to the LED hardware and generate a specific signature for each device to identify the individual device.

[0004] (1) Limitations of traditional identification methods

[0005] At present, most LED light source identification and detection methods mainly rely on spectral analysis and simple statistical methods. These methods usually measure the spectral characteristics of LED light sources and then use statistical analysis to classify and identify them. Although these methods can provide effective solutions in some cases, they often have problems such as low recognition accuracy and poor anti-interference ability when dealing with complex and diverse spectral data. For example, when the spectral characteristics of LED light sources are similar or interfered by environmental noise, the recognition effect of these methods is significantly reduced, making it difficult to meet the needs of actual applications.

[0006] (2) Application limitations of machine learning methods

[0007] Although some advanced machine learning methods (such as neural networks, support vector machines, etc.) have been applied to the field of spectral recognition, these methods usually require a large amount of labeled data for training and have high computational complexity when processing high-dimensional spectral data. Machine learning methods have significant advantages in processing complex and high-dimensional data, but they still have limitations in open set recognition tasks. Specifically, these methods usually assume that the distribution of training and test data is the same, and the performance of the model may drop significantly when encountering new or unknown category data. In addition, the training process of machine learning methods requires a large amount of labeled data, and the cost of data acquisition and annotation is high, which further limits the widespread application of these methods. Summary of the invention

[0008] In view of the problem that the existing machine learning methods have low recognition accuracy when encountering new or unknown category spectral data, the present invention provides an LED spectral fingerprint open set recognition method and related equipment based on Transformer and support vector data description.

[0009] In a first aspect, the present invention provides an open set identification method for LED spectrum fingerprint based on Transformer and support vector data description, comprising:

[0010] Step 1: Collecting a light signal emitted by at least one LED device and converting the light signal into spectral data, and dividing the spectral data into a training set and a test set;

[0011] Step 2: Input the training set into a preset feature extraction network for network training to learn and obtain a spectral feature vector; wherein the feature extraction network includes a Transformer branch, a CNN branch and a feature interaction module; the Transformer branch extracts the global features of the spectral data, the CNN branch extracts the local features of the spectral data, and the global features and the local features are fused through the feature interaction module to obtain the spectral feature vector;

[0012] Step 3: Based on the spectral feature vector of the training set, a hypersphere model is constructed using the SVDD algorithm, and the parameters of the hypersphere model are optimized to obtain an optimal hypersphere model;

[0013] Step 4: Input the test samples in the test set into the trained feature extraction network to obtain the corresponding spectral feature vector, and input the spectral feature vector of the test sample into the optimal hypersphere model for classification. If the spectral feature vector of the test sample falls within the optimal hypersphere model, the spectral category of the test sample is determined to be a known category, otherwise, it is an unknown category.

[0014] Furthermore, the Transformer branch adopts a Transformer encoder, the CNN branch includes two first convolutional layers, and the feature interaction module includes two second convolutional layers, a downsampling layer, and an upsampling layer;

[0015] Correspondingly, the Transformer branch extracts the global features of the spectral data, and the CNN branch extracts the local features of the spectral data. The global features and the local features are fused through the feature interaction module to obtain the spectral feature vector, which specifically includes:

[0016] Using one of the first convolutional layers to divide the input spectral data into several segments, for each segment of spectral data, concatenating information from different channels to obtain a corresponding first local feature, thereby obtaining several first local features;

[0017] The plurality of the first local features are sequentially passed through a second convolutional layer and a downsampling layer to obtain a first intermediate feature;

[0018] Convert the input spectral data into a sequence, fuse the sequence with the first intermediate feature, and input the sequence into a Transformer encoder to extract a global feature;

[0019] The global feature passes through another second convolutional layer and an upsampling layer in sequence to obtain a second intermediate feature;

[0020] The second intermediate feature is fused with a plurality of the first local features and then input into another first convolutional layer to obtain a second local feature;

[0021] The second local feature and the global feature are summed to obtain the spectral feature vector.

[0022] Furthermore, in step 2, during the network training process, a combined loss function consisting of center loss and cross entropy loss is adopted.

[0023] Furthermore, in step 3, a particle swarm optimization algorithm is used to optimize the parameters of the hypersphere model to obtain an optimal hypersphere model; wherein a particle represents a set of parameters of the hypersphere model, and the classification accuracy of the hypersphere model under the parameters is used as the fitness of the particle.

[0024] Furthermore, in step 1, when collecting the light signal emitted by one of the LED devices, there is at least one other LED device that is also emitting light at the same time.

[0025] Furthermore, for the LED device currently being collected, light signals emitted by the LED device are collected at different distances and different angles.

[0026] Furthermore, in step 2 or step 4, before inputting the spectral data into the feature extraction network, it also includes: preprocessing the spectral data; the preprocessing includes: denoising and / or normalization.

[0027] In a second aspect, the present invention provides an LED spectrum fingerprint open set recognition system based on Transformer and support vector data description, comprising:

[0028] A spectrum acquisition module, used for acquiring a light signal emitted by at least one LED device and converting the light signal into spectrum data, and dividing the spectrum data into a training set and a test set;

[0029] A feature extraction module is used to input the training set into a preset feature extraction network for network training to learn and obtain a spectral feature vector; and input the test sample in the test set into the trained feature extraction network to obtain the corresponding spectral feature vector; wherein the feature extraction network includes a Transformer branch, a CNN branch and a feature interaction module; the Transformer branch extracts the global features of the spectral data, the CNN branch extracts the local features of the spectral data, and the global features and the local features are fused through the feature interaction module to obtain the spectral feature vector;

[0030] A classification and recognition module is used to construct a hypersphere model based on the spectral feature vector of the training set using the SVDD algorithm, and optimize the parameters of the hypersphere model to obtain an optimal hypersphere model; and input the spectral feature vector of the test sample into the optimal hypersphere model for classification. If the spectral feature vector of the test sample is within the optimal hypersphere model, the spectral category of the test sample is determined to be a known category, otherwise, it is an unknown category.

[0031] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.

[0032] In a fourth aspect, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in the first aspect.

[0033] Beneficial effects of the present invention:

[0034] (1) High recognition accuracy. The present invention combines the deep learning capability of Transformer to extract rich feature information from high-dimensional spectral data; the application of the SVDD algorithm further improves the accuracy of anomaly detection and recognition. In a multi-lamp experimental environment, the recognition accuracy of the present invention reaches or exceeds 90%.

[0035] (2) Open set recognition capability. The present invention has open set recognition capability through the SVDD algorithm, which can effectively identify and classify LED light sources of unknown categories. This significantly enhances the practicality and flexibility of the system in dynamic and changing environments, ensuring timely response when facing new equipment or potential threats.

[0036] (3) Small data requirement and low computational complexity. The present invention combines the Transformer model and the SVDD algorithm. Although a certain amount of training data is still required, due to the self-attention mechanism of the Transformer model, data can be used more efficiently and effective dimensionality reduction can be achieved in the feature extraction process, thereby reducing data requirements and computational complexity. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 One of the flow charts of an LED spectrum fingerprint open set recognition method based on Transformer and support vector data description provided in an embodiment of the present invention;

[0038] Figure 2 A schematic diagram of data collection under interference from multiple LED devices provided by an embodiment of the present invention;

[0039] Figure 3 The SVDD algorithm principle provided by the embodiment of the present invention;

[0040] Figure 4 A second flow chart of an open set identification method for LED spectrum fingerprint based on Transformer and support vector data description provided in an embodiment of the present invention;

[0041] Figure 5 The Transformer encoder structure provided by the embodiment of the present invention;

[0042] Figure 6 A structural diagram of an LED spectrum fingerprint open set recognition system based on Transformer and support vector data description provided by an embodiment of the present invention;

[0043] Figure 7 A structural block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] like Figure 1 As shown, an embodiment of the present invention provides an LED spectrum fingerprint open set recognition method based on Transformer and support vector data description, including:

[0046] S101: Collecting a light signal emitted by at least one LED device and converting the light signal into spectral data, and dividing the spectral data into a training set and a test set;

[0047] Specifically, in order to enable the model subsequently constructed by the present invention to perform well in a complex light source environment, the embodiment of the present invention constructs a rich data set containing interference from multiple LED devices, so that the recognition model trained using the data set can perform well in an environment where multiple LED devices are on at the same time (such as Figure 2 As shown in the figure, one of the LED devices is identified to ensure that the accuracy of the identification result can still be maintained above a certain threshold (such as 90%) in a complex light source environment. In addition, when constructing a data set, in order to obtain the spectral characteristics of a specific LED device as much as possible, for the currently collected LED device, the embodiment of the present invention collects the light signal emitted by the LED device at different distances and angles.

[0048] As a specific data set construction scenario, 12 commercial LED lamps of the OPPLE brand were selected, all of which were LED-BP2220 / 3-E27-18 models, each with a power of 3 watts and a color temperature of 6500K. The relative distance between the light source LED and the spectrometer was set between 30 and 60 cm. When multiple lamps were on at the same time, spectral data was collected directly below each lamp, and the relative angle varied between -45° and +45°. The data collection covered a wavelength range of 380 to 760 nm with a step size of 0.1 nm. Under the same conditions, data was collected for each LED lamp. 80 sets of data were collected for each lamp at different distances and angles.

[0049] S102: Preprocessing the training set, inputting the preprocessed training set into a preset feature extraction network for network training to learn and obtain a spectral feature vector; wherein the feature extraction network includes a Transformer branch, a CNN branch and a feature interaction module; the Transformer branch extracts global features of the spectral data, the CNN branch extracts local features of the spectral data, and the global features and the local features are fused through the feature interaction module to obtain the spectral feature vector;

[0050] Specifically, preprocessing includes operations such as denoising and / or normalization to improve the accuracy of subsequent analysis. Because the traditional convolutional neural network CNN has a fixed local receptive field, CNN cannot effectively capture the global dependencies of the entire input spectral data. The Transformer attention mechanism is global and can learn and model the long-distance relationship between different wavelengths, so as to better capture the important features of the spectral data. In addition, the Transformer attention mechanism can learn global spectral features in the training data and generate more accurate classification results for the input data by using an encoder-decoder structure. This feature enables the Transformer attention network to have better generalization capabilities for new and unseen spectral data. Therefore, the embodiment of the present invention uses a Transformer-CNN combined structure as a feature extraction network.

[0051] S103: constructing a hypersphere model based on the spectral feature vector of the training set using the SVDD algorithm, and optimizing the parameters of the hypersphere model to obtain an optimal hypersphere model;

[0052] Specifically, in the open set identification problem of LED spectral fingerprints in the visible light communication system, after receiving the LED spectral data, it is first necessary to determine whether it comes from a known LED, and then to determine the individual category. Therefore, this problem can be converted into a single classification problem, and its judgment result is only "yes" or "no". In order to solve this problem, the embodiment of the present invention introduces the SVDD algorithm, in which the spectral features of the known LED samples are taken as a whole, and a multidimensional hypersphere model is trained to describe these features. When performing open set identification detection, if the features of the spectral data fall within the hypersphere, it will be judged as a known category; conversely, if the features fall outside the hypersphere, it will be judged as an unknown category.

[0053] The principle of SVDD algorithm is as follows Figure 3 As shown. The SVDD algorithm has an optimization goal during training, which is to solve the minimum sphere of a model. The center of the minimum sphere is defined as a and the radius is R. The model can be expressed as:

[0054]

[0055] In the formula, ξ k is the slack variable; c is the penalty factor. The trained model can make the multidimensional hypersphere transform the data point x k Fully covered, meeting:

[0056] At the same time, referring to the principle of SVM, the Lagrange multiplier method is used to solve the SVDD to obtain:

[0057]

[0058] In the formula, α k ,γ k ≥0 Taking the derivative of the parameter and setting the derivative equal to 0 gives:

[0059]

[0060] Therefore, the Lagrangian function can be optimized as:

[0061]

[0062] Where K(·) is the kernel function, 0≤α i ≤c, if the input spectral data sample meets the judgment condition, it is judged as a known class, otherwise it is judged as an unknown class.

[0063] S104: Preprocess the test, input the test samples in the preprocessed test set into the trained feature extraction network to obtain the corresponding spectral feature vector, input the spectral feature vector of the test sample into the optimal hypersphere model for classification, if the spectral feature vector of the test sample falls within the optimal hypersphere model, then the spectral category of the test sample is determined to be a known category, otherwise, it is an unknown category.

[0064] In practical applications, the identified LED devices of unknown categories can be labeled and then added to the original training set to expand the original training set.

[0065] The LED spectral fingerprint open set recognition method provided by the embodiment of the present invention first uses the Transformer-CNN combined structure as a feature extraction network to efficiently process and analyze high-dimensional spectral data, thereby extracting distinctive spectral features; secondly, it combines the SVDD algorithm for open set recognition. The SVDD algorithm constructs a hypersphere surrounding normal spectral data to realize the detection and recognition of unknown category spectral data, solving the problem that traditional methods are difficult to cope with open set recognition of new or unknown category spectral data.

[0066] In one embodiment, Figure 4As shown, the embodiment of the present invention provides a specific structure of a feature extraction network. Considering that the present invention studies spectral classification, the amount of data in the sequence input to the Transformer branch is relatively small. Therefore, the Transformer branch in the embodiment of the present invention only uses the Transformer encoder and uses the Self-Attention mechanism to extract the global high-dimensional context feature vector. The Transformer encoder mainly includes a multi-head attention (Multi-Head Attention) and a fully connected feed-forward network layer (Feed-Forward), and the structure is as follows Figure 5 Furthermore, the CNN branch includes two first convolutional layers (in this embodiment, convolutional layers with a convolutional kernel size of 1×3), and the feature interaction module includes two second convolutional layers (in this embodiment, convolutional layers with a convolutional kernel size of 1×1), a downsampling layer, and an upsampling layer.

[0067] Correspondingly, the feature extraction process of the feature extraction network specifically includes: in order to ensure that the spectral features extracted by the one-dimensional CNN branch match the input features of the Transformer branch, one of the 1×3 convolutional layers is used to divide the input spectral data into several segments, and for each segment of spectral data, the information of different channels is spliced ​​to obtain the corresponding first local features, thereby obtaining several first local features; several of the first local features are sequentially passed through a 1×1 convolutional layer (aimed at aligning each channel information) and a downsampling layer (aimed at aligning feature lengths) to obtain first intermediate features; the input spectral data is converted (Reshaped) into a sequence, and the sequence is fused with the first intermediate features and then input into the Transformer encoder to extract global features; the global features are sequentially passed through another 1×1 convolutional layer (aimed at aligning each channel information) and an upsampling layer (aimed at aligning feature lengths) to obtain second intermediate features; the second intermediate features are fused with several of the first local features and then input into another 1×3 convolutional layer to obtain second local features; the second local features and the global features are summed to obtain the spectral feature vector.

[0068] Specifically, assume that the sequence converted from the input spectral data is represented as an input sequence x=(x1, x2, …x n ), combined with Figure 5 As shown in Figure 2, the process of extracting global features from the Transformer encoder specifically includes: converting each element in x into a d-dimensional vector representation through an embedding layer to obtain a matrix X∈R n×d . Treat X as query, key and value, and get three matrices Q, K, V∈Rn×d . The similarity score matrix S∈R between Q and K is calculated using the scaled dot product n×n :S=QK T . And normalize the score matrix through the Softmax function to get the attention matrix A∈R n×n : in is a scaling factor used to prevent the inner product from being too large or too small. Each row in the attention matrix A represents the attention weight of a position in the input sequence for all positions, that is, which positions in the input sequence should the position pay attention to. Then, multiply the attention matrix A by the value matrix V to obtain a weighted sum vector C∈R n×d :C=AV, which is the global feature.

[0069] The advantage of the Transformer attention mechanism is that it can adaptively pay different degrees of attention to the input sequence, thereby capturing important information in the input sequence. At the same time, since the self-attention mechanism can calculate the attention weights of multiple positions at the same time, it can be easily calculated in parallel.

[0070] In one embodiment, in order to enhance the consistency of the feature extraction network when processing fingerprints of the same type of devices, and effectively expand the distance between fingerprints of different types of devices, thereby improving the recognition accuracy of unknown LED devices, in the embodiment of the present invention, when training the feature extraction network, a center loss function is introduced into the total loss function. Its expression is:

[0071]

[0072] In the formula, v i (x) represents the spectral feature vector corresponding to the i-th spectral data sample input, and m is the number of data samples captured in one training; Indicates the yth i The center loss optimizes the clustering effect of the feature space by constraining the distance between the spectral feature vector and its category center, which helps improve the performance of the model in classification tasks.

[0073] The classification loss of the neural network uses the cross entropy loss function, and its formula is:

[0074]

[0075] Where N is the total number of categories.

[0076] Therefore, the total loss function of the neural network can be expressed as:

[0077]

[0078] In one embodiment, a particle swarm optimization (PSO) algorithm is used to automatically optimize and adjust the parameters of the SVDD model to achieve the best recognition effect. When using SVDD to construct a multidimensional hypersphere, the PSO algorithm can be used to find the optimal model parameters. The combination of the two aims to create a hypersphere with the smallest volume to contain data samples of known categories of LED devices as much as possible, and have a certain robustness to data samples of new or LED devices. In the description of the above embodiments, it can be seen that the key to the SVDD model is to determine two main parameters: the penalty factor c and the kernel function parameters (such as the Gaussian kernel σ), and the two parameters have a significant impact on the model performance.

[0079] Specifically, PSO is initialized as a group of random particles (random solutions), and then finds the optimal solution through iteration. In each iteration, the particles update themselves by tracking two "extreme values" (i.e., individual extreme value pbest and population extreme value gbest). In this embodiment, the process of using PSO to optimize SVDD parameters specifically includes:

[0080] (1) Initialization: Generate a swarm of particles, each particle represents a set of candidate parameters (such as c and σ) of the SVDD model. Assign a random speed and position to each particle.

[0081] (2) Evaluation: For each particle, the SVDD model is trained using a set of parameters that it represents, and the accuracy of the model is evaluated on the validation set, and the accuracy is used as the fitness of the particle.

[0082] (3) Update pbest and gbest: If the current particle performs better than its previous best performance, update its pbest. If the current particle performs better than any individual in the group, update gbest.

[0083] Specifically, assuming that in the decision space, the particle swarm size is N, the current number of iterations is t, and the position of the rth (r = 1, 2, ... N) particle in the swarm is: x r (t) = [x r,1 (t),x r,2 (t),…x r,d (t)], the velocity of the rth particle is: v r (t) = [v r,1 (t),v r,2 (t),…,v r,d The historical best position of all particles in the entire population in the dth dimension is: gbest(t) = [g1(t), g2(t), …, g d(t)], the historical best position of particle r is pbest r (t) = [p r,1 (t),p r,2 (t)…p r,d (t)].

[0084] (4) Update speed and position: Adjust the speed and position of each particle according to the following speed and position update formula.

[0085] v r,d (t+1)=ωv r,d (t)+c1r1(pbest r,d (t)-x r,d (t))+c2r2(gbest d (t)-x r,d (t))

[0086] x r,d (t+1)=x r,d (t)+v r,d (t+1)

[0087] Among them, r1, r2 are random numbers distributed in the interval [0, 1] to increase the randomness of the algorithm. c1, c2 are acceleration constants [0, 2] used to control the learning step size; ω is the inertia weight, which is responsible for adjusting the speed and the influence of the current speed.

[0088] (5) Termination condition: Check whether the algorithm meets the termination condition (such as reaching the predetermined number of iterations or the fitness change is very small). If not, return to step (2).

[0089] (6) Output the optimal solution: When the algorithm terminates, use gbest as the optimal parameters found.

[0090] Through the global search capability of the particle swarm optimization algorithm, the embodiment of the present invention can find the SVDD parameters that best suit the current training set and effectively construct an optimal hypersphere model that accurately describes the data.

[0091] like Figure 6 As shown, an embodiment of the present invention provides an LED spectrum fingerprint open set recognition system based on Transformer and support vector data description, including a spectrum acquisition module, a preprocessing module, a feature extraction module, a classification and recognition module, a result display and alarm module, and a data storage and management module.

[0092] Among them, the spectrum acquisition module is used to collect the light signal emitted by at least one LED device and convert the light signal into spectrum data, and divide the spectrum data into a training set and a test set. The preprocessing module is used to process the collected spectrum data, including denoising, normalization and other operations to improve the accuracy of subsequent analysis. The feature extraction module is used to input the training set into a preset feature extraction network for network training to learn and obtain the spectrum feature vector; and input the test samples in the test set into the trained feature extraction network to obtain the corresponding spectrum feature vector; wherein, the feature extraction network includes a Transformer branch, a CNN branch and a feature interaction module; the Transformer branch extracts the global features of the spectrum data, and the CNN branch extracts the local features of the spectrum data, and the global features and the local features are fused through the feature interaction module to obtain the spectrum feature vector. The classification and recognition module is used to construct a hypersphere model based on the spectral feature vector of the training set using the SVDD algorithm, and optimize the parameters of the hypersphere model to obtain the optimal hypersphere model; and input the spectral feature vector of the test sample into the optimal hypersphere model for classification. If the spectral feature vector of the test sample is within the optimal hypersphere model, the spectral category of the test sample is determined to be a known category, otherwise, it is an unknown category. The result display and alarm module is used to display the recognition results, including the recognition results of known devices and the alarm information of unknown devices, to help users detect potential threats in a timely manner. The data storage and management module is used to store and manage spectral data, feature vectors and recognition results, provide query and analysis functions, and support the long-term operation and optimization of the system.

[0093] It should be noted that the LED spectrum fingerprint open set recognition system provided in the embodiment of the present invention is to implement the above method. Its specific functions can be referred to the above method embodiments, which will not be repeated here.

[0094] The system provided by the embodiment of the present invention can efficiently identify and detect different categories of LED light sources in an actual environment, and provide early warning and classification for LED light sources of unknown categories.

[0095] The method and system of the present invention can be applied to the following application scenarios:

[0096] (1) Security of VLC system:

[0097] In a visible light communication system, the LED spectrum fingerprint recognition technology of the present invention can effectively identify and detect unauthenticated or untrusted LED devices, thereby ensuring the security of the communication system.

[0098] (2) Smart Home and Internet of Things:

[0099] In smart homes and Internet of Things devices, the fingerprint recognition function of the LED light source of the system of the present invention can be used to realize automatic recognition and authentication of devices, prevent illegal devices from accessing the network, and improve the security of the system.

[0100] (3) Public places and indoor positioning:

[0101] In public places (such as airports, shopping malls, etc.) and indoor positioning systems, more accurate positioning services and equipment management can be provided by identifying and managing LED light sources in different areas.

[0102] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor (processor) 701, a communication interface (Communications Interface) 702, a memory (memory) 703 and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704. The processor 701 can call the logic instructions in the memory 703 to execute the LED spectrum fingerprint open set recognition method, the method comprising: step 1: collecting light signals emitted by at least one LED device and converting the light signals into spectral data, and dividing the spectral data into a training set and a test set; step 2: inputting the training set into a preset feature extraction network for network training to learn and obtain a spectral feature vector; wherein the feature extraction network comprises a Transformer branch, a CNN branch and a feature interaction module; the Transformer branch extracts global features of the spectral data, and the CNN branch extracts local features of the spectral data. , the global feature and the local feature are fused through the feature interaction module to obtain the spectral feature vector; step 3: based on the spectral feature vector of the training set, a hypersphere model is constructed using the SVDD algorithm, and the parameters of the hypersphere model are optimized to obtain the optimal hypersphere model; step 4: the test sample in the test set is input into the trained feature extraction network to obtain the corresponding spectral feature vector, and the spectral feature vector of the test sample is input into the optimal hypersphere model for classification. If the spectral feature vector of the test sample is within the optimal hypersphere model, the spectral category of the test sample is determined to be a known category, otherwise, it is an unknown category.

[0103] In addition, when the logic instructions in the above-mentioned memory 703 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0104] The embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments, for example, including: Step 1: Collecting a light signal emitted by at least one LED device and converting the light signal into spectral data, and dividing the spectral data into a training set and a test set; Step 2: Inputting the training set into a preset feature extraction network for network training to learn and obtain a spectral feature vector; wherein the feature extraction network includes a Transformer branch, a CNN branch and a feature interaction module; Transformer The er branch extracts the global features of the spectral data, and the CNN branch extracts the local features of the spectral data. The global features and the local features are fused through the feature interaction module to obtain the spectral feature vector; Step 3: Based on the spectral feature vector of the training set, a hypersphere model is constructed using the SVDD algorithm, and the parameters of the hypersphere model are optimized to obtain the optimal hypersphere model; Step 4: The test samples in the test set are input into the trained feature extraction network to obtain the corresponding spectral feature vector, and the spectral feature vector of the test sample is input into the optimal hypersphere model for classification. If the spectral feature vector of the test sample is within the optimal hypersphere model, the spectral category of the test sample is determined to be a known category, otherwise, it is an unknown category.

[0105] The embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method provided by the above-mentioned method embodiments is implemented, for example, including: step 1: collecting light signals emitted by at least one LED device and converting the light signals into spectral data, and dividing the spectral data into a training set and a test set; step 2: inputting the training set into a preset feature extraction network for network training to learn and obtain a spectral feature vector; wherein the feature extraction network includes a Transformer branch, a CNN branch and a feature interaction module; the Transformer branch extracts global features of the spectral data, and the CNN branch extracts global features of the spectral data; The branch extracts the local features of the spectral data, and the global features and the local features are fused through the feature interaction module to obtain the spectral feature vector; Step 3: Based on the spectral feature vector of the training set, a hypersphere model is constructed using the SVDD algorithm, and the parameters of the hypersphere model are optimized to obtain the optimal hypersphere model; Step 4: The test samples in the test set are input into the trained feature extraction network to obtain the corresponding spectral feature vector, and the spectral feature vector of the test sample is input into the optimal hypersphere model for classification. If the spectral feature vector of the test sample is within the optimal hypersphere model, the spectral category of the test sample is determined to be a known category, otherwise, it is an unknown category.

[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An open set identification method for LED spectrum fingerprint based on Transformer and support vector data description, characterized in that: include: Step 1: Collecting a light signal emitted by at least one LED device and converting the light signal into spectral data, and dividing the spectral data into a training set and a test set; Step 2: Input the training set into a preset feature extraction network for network training to learn and obtain a spectral feature vector; wherein the feature extraction network includes a Transformer branch, a CNN branch and a feature interaction module; the Transformer branch extracts the global features of the spectral data, the CNN branch extracts the local features of the spectral data, and the global features and the local features are fused through the feature interaction module to obtain the spectral feature vector; Step 3: Based on the spectral feature vector of the training set, a hypersphere model is constructed using the SVDD algorithm, and the parameters of the hypersphere model are optimized to obtain an optimal hypersphere model; Step 4: Input the test samples in the test set into the trained feature extraction network to obtain the corresponding spectral feature vector, and input the spectral feature vector of the test sample into the optimal hypersphere model for classification. If the spectral feature vector of the test sample falls within the optimal hypersphere model, the spectral category of the test sample is determined to be a known category, otherwise, it is an unknown category.

2. The LED spectrum fingerprint open set recognition method based on Transformer and support vector data description according to claim 1 is characterized in that: The Transformer branch adopts a Transformer encoder, the CNN branch includes two first convolutional layers, and the feature interaction module includes two second convolutional layers, a downsampling layer, and an upsampling layer; Correspondingly, the Transformer branch extracts the global features of the spectral data, and the CNN branch extracts the local features of the spectral data. The global features and the local features are fused through the feature interaction module to obtain the spectral feature vector, which specifically includes: Using one of the first convolutional layers to divide the input spectral data into several segments, for each segment of spectral data, concatenating information from different channels to obtain a corresponding first local feature, thereby obtaining several first local features; The plurality of the first local features are sequentially passed through a second convolutional layer and a downsampling layer to obtain a first intermediate feature; Convert the input spectral data into a sequence, fuse the sequence with the first intermediate feature, and input the sequence into a Transformer encoder to extract a global feature; The global feature passes through another second convolutional layer and an upsampling layer in sequence to obtain a second intermediate feature; The second intermediate feature is fused with a plurality of the first local features and then input into another first convolutional layer to obtain a second local feature; The second local feature and the global feature are summed to obtain the spectral feature vector.

3. The LED spectrum fingerprint open set recognition method based on Transformer and support vector data description according to claim 1 is characterized in that: In step 2, during the network training process, a combined loss function consisting of center loss and cross entropy loss is adopted.

4. The LED spectrum fingerprint open set recognition method based on Transformer and support vector data description according to claim 1 is characterized in that: In step 3, a particle swarm optimization algorithm is used to optimize the parameters of the hypersphere model to obtain the optimal hypersphere model; wherein a particle represents a set of parameters of the hypersphere model, and the classification accuracy of the hypersphere model under the parameters is used as the fitness of the particle.

5. The LED spectrum fingerprint open set recognition method based on Transformer and support vector data description according to any one of claims 1 to 4, characterized in that: In step 1, when collecting the light signal emitted by one of the LED devices, there is at least one other LED device that is also emitting light at the same time.

6. The LED spectrum fingerprint open set recognition method based on Transformer and support vector data description according to claim 5 is characterized in that: For the LED device currently being collected, light signals emitted by the LED device are collected at different distances and different angles.

7. The LED spectrum fingerprint open set recognition method based on Transformer and support vector data description according to any one of claims 1 to 4, characterized in that: In step 2 or step 4, before inputting the spectral data into the feature extraction network, it also includes: preprocessing the spectral data; the preprocessing includes: denoising and / or normalization.

8. An LED spectrum fingerprint open set recognition system based on Transformer and support vector data description, characterized in that: include: A spectrum acquisition module, used for acquiring a light signal emitted by at least one LED device and converting the light signal into spectrum data, and dividing the spectrum data into a training set and a test set; A feature extraction module is used to input the training set into a preset feature extraction network for network training to learn and obtain a spectral feature vector; and input the test sample in the test set into the trained feature extraction network to obtain the corresponding spectral feature vector; wherein the feature extraction network includes a Transformer branch, a CNN branch and a feature interaction module; the Transformer branch extracts the global features of the spectral data, the CNN branch extracts the local features of the spectral data, and the global features and the local features are fused through the feature interaction module to obtain the spectral feature vector; A classification and recognition module is used to construct a hypersphere model based on the spectral feature vector of the training set using the SVDD algorithm, and optimize the parameters of the hypersphere model to obtain an optimal hypersphere model; and input the spectral feature vector of the test sample into the optimal hypersphere model for classification. If the spectral feature vector of the test sample is within the optimal hypersphere model, the spectral category of the test sample is determined to be a known category, otherwise, it is an unknown category.

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

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Face similarity recognition method and system based on multiple one-class SVMs

    CN103886310A

  • Fabric defect detection method based on deep learning and support vector data description

    CN108010029A

  • Ultra-short wave threat signal sensing method based on support vector data description

    CN111597873A

  • Micro LED chip defect detection method based on MLTT-YOLO

    CN115908344A

  • Method and system for recognizing and tracking three-dimensional fluorescence spectrogram water sample discharge source based on DSIFT and EVM

    CN117054386A

Cited By

  • LED spectrum fingerprint feature individual identification method and device based on linear attention network

    CN119995946A

  • LED spectrum fingerprint feature individual identification method and device based on linear attention network

    CN119995946B

  • Training method of spectrum matching model, spectrum matching method, device and equipment

    CN120430365A

  • Optical cable state evaluation and early warning system based on multi-source optical fiber sensing and OTDR fusion

    CN122268471A

  • Optical Cable Status Assessment and Early Warning System Based on Multi-Source Fiber Optic Sensing and OTDR Integration

    CN122268471B