Metal mine metallogenic lithology intelligent identification method based on Swinin-Transform model

By introducing the sliding window self-attention mechanism and pyramid-type hierarchical architecture of the Swin-Transformer model, Vision-Transformer's problems of high global computing complexity and insufficient local modeling capabilities in metal ore-based lithogenesis classification are solved, and efficient and automated lithogenesis identification and classification are achieved, which is suitable for the on-site deployment of edge computing equipment.

CN120408290APending Publication Date: 2025-08-01QINGHAI THIRD GEOLOGICAL SURVEY INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510384240.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing Vision-Transformer model has problems with high global computational complexity and lack of local modeling capabilities in metal ore-based lithogenetic classification, which can only give full play to its advantages on large data sets and cannot meet the needs of efficient lithogenetic classification.

Method used

Using the Swin-Transformer model, the local-global information fusion under linear computing complexity is realized by introducing the sliding window self-attention mechanism and pyramid-type hierarchical architecture, which improves the model's local feature learning ability and classification accuracy.

Benefits of technology

It realizes efficient and automated identification of metal ore-forming lithologic classification, improves classification accuracy, and meets the high-throughput intelligent analysis needs of mineral exploration, reduces manual intervention, and is suitable for on-site deployment of edge computing equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408290A_ABST
    Figure CN120408290A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of geophysical exploration, and particularly discloses a metal mine metallogenic lithology intelligent identification method based on a Swinin-Transform model, so as to break through the global calculation bottleneck of Vision Transform and enhance the local-global information fusion capability while achieving linear calculation complexity. According to the method, micro-scale structure variation in a radar map can be accurately captured, abstract graphical expression of mineral lithology can be deeply deconstructed, full-chain automatic operation from data collection to lithology identification is realized while the classification accuracy of metallogenic lithology of metal ores is improved, end-to-end efficient identification can be realized without manual intervention, and the method is suitable for popularization and application. And the extreme requirement of mineral exploration on high-flux intelligent analysis is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of geophysical exploration technology, and specifically discloses an intelligent recognition method for metallogenic lithology of metal mines based on the Swin-Transformer model. Background Art

[0002] In the field of geophysical exploration, abstracting the physical parameters of metal minerals into radar charts is an effective method for classifying metallogenic lithology, and the machine vision ore identification method coupled with Vision-Transformer has been tested in the industry.

[0003] However, Vision-Transformer (ViT) adopts a global attention mechanism, which needs to match the correlation patch by patch and has exponential computational complexity. At the same time, ViT lacks local modeling ability and does not have the local inductive bias ability like convolutional neural networks. These prior limitations lead to ViT being able to exert its advantages only on large datasets such as JFT-300M. Therefore, the present invention provides an intelligent recognition method for metallogenic lithology of metal mines based on the Swin-Transformer model to solve the above problems. Summary of the Invention

[0004] The purpose of the present invention is to break through the global computing bottleneck of ViT, enhance the local-global information fusion ability while achieving linear computational complexity, and thus improve the classification accuracy of metallogenic lithology of metal mines.

[0005] To achieve the above purpose, the basic solution of the present invention provides an intelligent recognition method for metallogenic lithology of metal mines based on the Swin-Transformer model, including the following steps:

[0006] Step 1: Collect metallogenic lithology data of metal mines and preprocess the data;

[0007] Step 2: Draw standard radar charts and radar charts to be classified for metallogenic lithology of metal mines;

[0008] Step 3: Train the Swin-Transformer model based on the standard radar chart;

[0009] Step 4: Classify the radar charts to be classified based on the Swin-Transformer model;

[0010] Step 5: Evaluate the performance of the Swin-Transformer model and perform iterative optimization;

[0011] Step 6: Deploy and apply the Swin-Transformer model on-site.

[0012] Further, in step 1, Min-Max normalization is used to linearly transform the collected data so that the result values are mapped between [0, 1].

[0013] Further, in step 2, the angular interval of the radar chart is:

[0014]

[0015] where θ i is the angular interval of the radar chart, and the values of each dimension of the radar chart respectively correspond to the preprocessed resistivity, polarizability, magnetic susceptibility, remanent magnetization intensity, and density.

[0016] Further, in step 3, the following sub-steps are also included:

[0017] Step 301: Divide the radar chart into patches, use the standard radar chart data as the training input of the Swin-Transformer model, divide the image into multiple pixel blocks, flatten the pixel blocks, and obtain the initial feature embedding representation through linear mapping;

[0018] Step 302: Extract features from the radar chart based on a sliding window, divide the feature map into several local windows, calculate the multi-head self-attention within the window, encode the local information, and shift the adjacent layer windows relatively to capture the global dependencies across windows, thereby realizing the fusion of local and global features;

[0019] Step 303: Calculate the multi-head self-attention of the sliding window, perform an affine transformation on the input features to obtain the query matrix, key matrix, and value matrix, calculate the attention weights and outputs on each attention head, splice the outputs of multiple attention heads and project them through the output weight matrix to obtain the multi-head self-attention result;

[0020] Step 304: Set the loss function, and the expression is as follows:

[0021]

[0022] In the formula, represents the probability that the Swin-Transformer model predicts the sample as class c; y c is the indicator value of the true label.

[0023] Step 305: Set the training hyperparameters, set the initial learning rate, and gradually reduce the learning rate during training in conjunction with the learning rate decay strategy, and use the Adam optimizer for gradient update.

[0024] Further, in step 3, the training of the Swin-Transformer model includes:

[0025] Input the radar chart samples into the Swin-Transformer model, calculate the forward propagation to obtain the predicted output and the corresponding loss function;

[0026] Calculate the gradient through the backpropagation algorithm;

[0027] Use the optimizer to adjust the parameters of the Swin-Transformer model according to the set learning rate;

[0028] When all rounds of training are completed, the trained Swin-Transformer model is obtained.

[0029] Furthermore, in step 4, the following sub-steps are also included:

[0030] Step 401: Calculate the embedded feature vector obtained by the standard radar chart through the Swin-Transformer model;

[0031] Step 402: Input the original data of the sample to be classified, calculate the embedded feature vector of the sample to be classified through the trained Swin-Transformer model, and calculate the similarity between the embedded feature vector of the sample to be classified and the embedded feature vector of the standard radar chart;

[0032] Step 403: Compare the similarities of all categories, find the category corresponding to the maximum similarity, and determine the lithology category and return the classification result.

[0033] Furthermore, in step 403, a similarity threshold is set to determine the classification confidence.

[0034] Furthermore, in step 5, the following sub-steps are included:

[0035] Step 501: Comprehensively use accuracy, precision, recall, and F1-score to evaluate the performance of the Swin-Transformer model;

[0036] Step 502: Iteratively optimize the Swin-Transformer model through evaluation-diagnosis-improvement-retraining.

[0037] Furthermore, in step 502, it includes:

[0038] Evaluate the indicators of the Swin-Transformer model on the validation set and newly collected data, and locate the misjudgment situations and error patterns of the Swin-Transformer model in the lithology category through the confusion matrix;

[0039] Then analyze the causes of misjudgment and diagnose whether it is due to insufficient samples, insufficient features, or overfitting / underfitting of the model;

[0040] Improve the Swin-Transformer model by adopting the above data augmentation, regularization, hyperparameter adjustment or model structure strategies;

[0041] Apply the improvement scheme to the model, retrain or fine-tune the Swin-Transformer model and evaluate the performance again;

[0042] Iteratively perform the above operations until the Swin-Transformer model meets the expected requirements in all evaluation metrics.

[0043] Furthermore, in step 6, the following sub-steps are included:

[0044] Step 601: Deployment scheme adaptation;

[0045] Step 602: Edge computing optimization;

[0046] Step 603: On-site deployment stability evaluation.

[0047] The principle and effect of this solution are as follows:

[0048] 1. The Swin-Transformer model introduces a sliding window self-attention mechanism, which limits the calculation of self-attention within local non-overlapping windows, achieving linear computational complexity. At the same time, it adopts a pyramid-style hierarchical architecture to gradually merge the patches divided from the image, enabling the model to learn both fine-grained local features and integrate global semantics across windows. On benchmark tasks such as COCO object detection and ADE20K semantic segmentation, the Swin-Transformer model scores significantly better than CNN or ViT.

[0049] 2. This invention breaks through the global computational bottleneck of ViT, enhances the local-global information fusion ability while achieving linear computational complexity. It can accurately capture the micro-scale structural variations in radar images, deeply deconstruct the abstract graphical expressions of mineral lithologies, improve the classification accuracy of ore-forming lithologies in metal mines, and realize end-to-end automated operations from data collection to lithology recognition, enabling high-throughput intelligent analysis in mineral exploration without manual intervention, meeting the extreme requirements for high-throughput intelligent analysis in mineral exploration. Brief Description of the Drawings

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0051] Figure 1Shows the flow chart of an intelligent recognition method for metallogenic lithology of metal mines based on the Swin-Transformer model proposed in the embodiments of the present application;

[0052] Figure 2 Shows the schematic diagram of the standard radar chart and the radar chart to be classified in the intelligent recognition method for metallogenic lithology of metal mines based on the Swin-Transformer model proposed in the embodiments of the present application, where (a) is the ideal radar chart, and (b)-(i) are the radar charts to be classified of different samples respectively;

[0053] Figure 3 Shows the schematic diagram of the overhead comparison between the intelligent recognition method for metallogenic lithology of metal mines based on the Swin-Transformer model proposed in the embodiments of the present application and ViT. Detailed implementation manners

[0054] To further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following combines the drawings and preferred embodiments to detail the specific implementation manners, structures, features and their effects according to the present invention as follows.

[0055] An intelligent recognition method for metallogenic lithology of metal mines based on the Swin-Transformer model, as shown in the embodiments Figure 1 as follows: It includes the following steps:

[0056] Step 1: Collection and preprocessing of metallogenic lithology data of metal mines;

[0057] Step 2: Drawing the radar chart of metallogenic lithology of metal mines;

[0058] Step 3: Training of the Swin-Transformer model based on the standard radar chart;

[0059] Step 4: Classification of the radar chart based on the Swin-Transformer model;

[0060] Step 5: Model performance evaluation and iterative optimization;

[0061] Step 6: On-site deployment and application.

[0062] Step 1 is specifically as follows:

[0063] Step 101: Collection of metallogenic lithology data of metal mines;

[0064] Conduct exploration in a polymetallic skarn mine in Qinghai to obtain ρ, η, κ, Jr, σ data. Among them, ρ is the resistivity, with the unit of Ω·m; η is the polarizability, dimensionless; κ is the magnetic susceptibility, with the unit of 4π×10 -6 SI; Jr is the remanent magnetization intensity, with the unit of 10 -3A / m; σ is the density, with the unit of g / cm 3 。

[0065] Step 102: Data preprocessing;

[0066] Use Min - Max normalization, i.e., deviation normalization, to perform a linear transformation on the original data so that the result values are mapped between [0, 1].

[0067] The lithology dataset is shown in the following table:

[0068] Table 1 Lithology dataset

[0069]

[0070] Step 2 is as follows:

[0071] Step 201: Define the parameter set of all samples. Denote the parameter set of all samples as:

[0072] X = {ρ, η, κ, Jr, σ}

[0073] Step 202: Draw the radar chart of the lithology for metallic mineralization. Take the angular interval of the radar chart as:

[0074]

[0075] where θ i is the angular interval of the radar chart. The values of each dimension of the radar chart respectively correspond to ρ, η, κ, Jr, and σ after preprocessing.

[0076] Among the collected data samples, first, define the radar chart corresponding to the samples with clearly known lithology as the standard radar chart. Second, denote the samples to be classified as:

[0077] X' = {ρ', η', κ', Jr', σ'}

[0078] The values of each dimension of the samples to be classified respectively correspond to ρ', η', κ', Jr', and σ'. Draw the radar chart to be classified in the same way.

[0079] The ideal radar chart is as Figure 2 (a) shown. The radar charts to be classified for limestone (C2d), carbonaceous limestone (OQ3), marble (Pt1J), syenogranite (ξγT3), and skarn (weak mineralization) samples are as Figure 2 (b) - Figure 2 (i) shown.

[0080] Step 3 is as follows:

[0081] Step 301: Radar chart patch division;

[0082] Use the standard radar chart data drawn in step 2 as the training input of the Swin-Transformer model. First, divide the image into pixel blocks of size P×P, then flatten the pixel blocks, and obtain the initial feature embedding representation x through linear mapping. p .

[0083] Step 302: Radar chart feature extraction based on a sliding window;

[0084] In the hierarchical structure of the Swin-Transformer model, a window division and sliding window mechanism are adopted to extract radar chart features. At each layer of the model, the feature map is divided into several local windows, and the multi-head self-attention is calculated within the windows to encode the local information. The windows of adjacent layers are shifted relative to each other to capture the global dependencies across windows, thereby realizing the fusion of local and global features.

[0085] Step 303: Calculate the sliding window multi-head self-attention;

[0086] First, perform an affine transformation on the input feature X to obtain the query matrix Q = XW Q , the key matrix K = XW K and the value matrix V = XW V . Then, calculate the attention weights and outputs on each attention head. The outputs of multiple attention heads are concatenated and projected through the output weight matrix W O to obtain the multi-head self-attention result:

[0087] MHA(X) = Concat(head1,...,head h )W O

[0088] where head i = Attention(Q i ,K i ,V i ) corresponds to a set of independent linear transformation parameters (W i Q ,W i K ,W i V ).

[0089] Step 304: Set the loss function:

[0090] After several layers of local attention and hierarchical feature fusion, the model obtains the embedding representation of the high-level features of the radar chart. Then, the cross-entropy loss function is used as the training objective to measure the difference between the predicted class distribution and the true class:

[0091]

[0092] In the formula, represents the probability that the model predicts the sample as class c; y c is the indicator value of the true label (the correct class is 1, and the rest are 0).

[0093] Step 305: Set training hyperparameters:

[0094] Set the initial learning rate to 1×10 -4 , and gradually reduce the learning rate during training in conjunction with the learning rate decay strategy to stabilize the training process.

[0095] Use the Adam optimizer for gradient update, with the parameters set as β1 = 0.9,; β2 = 0.999, ò = 10 -8 . The update rule of the parameters in the t-th round of iteration is where is the bias-corrected estimate of the first-order and second-order cumulative quantities of the gradient.

[0096] Select an appropriate batch size according to the video memory and data scale. In this embodiment, it is set to 32. Set a sufficient number of training rounds to monitor the loss of the validation set and stop training to ensure that the model fully learns without overfitting.

[0097] The specific process of model training is: for each training batch, input the radar chart sample into the model, calculate the forward propagation to obtain the predicted output and the corresponding loss L CE , and then calculate the gradient ▽L through the backpropagation algorithm, and use the optimizer to adjust the model parameters according to the set learning rate to achieve parameter update and model iterative optimization. After completing all rounds of training, a trained Swin-Transformer model is obtained. This model has learned to extract effective feature representations from the radar chart and distinguish different lithology classes.

[0098] Step 4 is specifically as follows:

[0099] Step 401: Calculate the embedded feature vector;

[0100] In this embodiment, a classification strategy based on feature similarity is adopted. Specifically, for each known lithology class, first calculate the embedded feature vector g obtained by the model from the standard radar chart c , where c = 1, 2,..., C represents the class index, and there are C lithology classes in total.

[0101] Step 402: Calculate the similarity;

[0102] For an unknown sample to be classified, input the original data of the sample to be classified (the preprocessed ρ, η, κ, Jr, and σ), draw a radar chart according to the method in step 202, and input it into the trained Swin-Transformer model to calculate the embedded feature vector h of the sample. Then calculate the similarity between h and the standard embeddings g of each category c to determine the category to which the sample belongs. Methods such as cosine similarity or Euclidean distance can be used to measure the similarity. In this invention, cosine similarity is selected:

[0103]

[0104] In the formula, the sample is judged to belong to the category with the highest cosine similarity between h and the standard vector gc of which category

[0105] Step 403: Category determination and result output;

[0106] Compare the similarities (or distances) of all categories, and find the category corresponding to the maximum similarity (or the category corresponding to the minimum distance). Determine the sample as the lithology of the category. If necessary, a similarity threshold τ can be set. When the maximum similarity is lower than τ, it is considered that the classification confidence is insufficient, and classification can be rejected or manual review can be requested to improve decision reliability. Return the classification result (the corresponding lithology category), and the result can be matched with the corresponding standard radar chart, and a radar chart comparison schematic is output to facilitate experts to verify the rationality of the model prediction

[0107] Step 5 is specifically as follows:

[0108] Step 501: Model performance evaluation;

[0109] Comprehensively use accuracy, precision, recall, and F1-score to evaluate the model performance. The expressions of each index are as follows in turn:

[0110]

[0111] In the formula: N correct is the number of samples correctly predicted by the model, and N total is the total number of samples; T p (k) represents the number of samples with the true category k and correctly predicted as k by the model; F p (k) represents the number of samples mispredicted as k but not truly belonging to k; F n (k) represents the number of samples truly belonging to k but predicted as other categories by the model; The F1-score takes into account both precision and recall, and provides an overall evaluation when weighing the two

[0112] Using the above - mentioned metrics, combined with the confusion matrix to analyze the classification performance of the model on each lithology category, find the easily confused category objects and the weak links of the model, so as to provide a basis for subsequent optimization.

[0113] Step 502: Model iterative optimization;

[0114] In this embodiment, an iterative mechanism of "evaluation - diagnosis - improvement - retraining" is established: First, evaluate various metrics of the model on the validation set and newly collected data, and locate the misjudgment situations and error patterns of the model on certain lithology categories through the confusion matrix; then analyze the causes of misjudgment to diagnose whether it is due to insufficient samples, insufficient features, or model overfitting / underfitting; then adopt the above - mentioned strategies such as data augmentation, regularization, adjusting hyperparameters or model structure to improve the model; finally, apply the improvement plan to the model, retrain or fine - tune the model and evaluate the performance again. Iterate in this way until the model meets the expected requirements in all evaluation metrics.

[0115] To quantify the optimization effect of each iteration, the changes in the main metrics before and after iteration can be compared. For example, the accuracy Acc of the model after the i - th iteration (i) compared with the initial Acc (0) the improvement ΔAcc (i) = Acc (i) - Acc (0) , and the corresponding ΔPrecision, ΔRecall, ΔF1, etc. If these improvements gradually decrease and tend to zero, it indicates that the model performance tends to converge, and the iteration can be stopped. Through the above - mentioned evaluation and optimization cycle, an excellent, stable and reliable lithology intelligent recognition model on real data is finally obtained, laying a foundation for subsequent on - site deployment. The lithology recognition results in this embodiment are shown in Table 2:

[0116] Table 2 Lithology Recognition Result Table

[0117]

[0118]

[0119]

[0120]

[0121]

[0122]

[0123]

[0124]

[0125]

[0126]

[0127]

[0128]

[0129]

[0130]

[0131]

[0132]

[0133]

[0134]

[0135]

[0136]

[0137]

[0138]

[0139]

[0140]

[0141] As can be seen from the above table, the accuracy rate of lithology identification in this implementation can reach 95.5%.

[0142] Step 6 is specifically as follows:

[0143] Step 601: Deployment plan adaptation;

[0144] Considering the limitations and requirements of the field site environment, this method selects to deploy the model on edge computing devices to meet the requirements of low latency and low power consumption. In terms of hardware, a high-performance and low-power embedded device can be used, such as an industrial computing box (such as the NVIDIA Jetson series) or a portable workstation equipped with a GPU acceleration module. This device needs to meet the basic computing power and storage requirements to load the Swin-Transformer model parameters and perform real-time inference; at the same time, it should have good environmental adaptability (resistant to high and low temperatures, dust, water, etc.) to ensure long-term stable operation under harsh field conditions.

[0145] Step 602: Edge Computing Optimization;

[0146] When deploying the model on edge devices, to reduce power consumption and improve efficiency, the model can be specially optimized. For example, model quantization technology can be used to compress the weights from 32-bit floating point to 8-bit integer to reduce the computing and storage overhead; model pruning can be used to compress redundant network structures and reduce the model size; or inference engines such as TensorRT and OpenVINO can be used to perform tensor fusion and operator optimization on the model to make full use of the hardware acceleration capabilities. In addition, Swin-Transformer itself uses the window self-attention mechanism to reduce the self-attention computational complexity from O(n 2 ) to O(n) (where n is the number of image patches), which makes the model run more efficiently on edge devices. The optimized model, while ensuring accuracy, significantly reduces the inference latency and energy consumption, meeting the requirements of on-site real-time performance.

[0147] Step 603: On-site Deployment Stability Evaluation.

[0148] The model classification results and the confusion matrix analysis are shown in Table 3 and Table 4 respectively:

[0149] Table 3 Model Classification Results

[0150]

[0151] Table 4 Confusion Matrix Analysis Results

[0152]

[0153] To ensure the application effect of the model in the real environment, in this embodiment, strict stability tests and evaluations are carried out after on-site deployment. In terms of model accuracy, the model classification results are verified on the newly collected lithology data in the wild and compared with the results of manual identification, and indicators such as on-site accuracy and recall are statistically analyzed to ensure that they are comparable to those in the laboratory environment, and the model still maintains high reliability under noise interference. The comparison of the computational overhead between this embodiment and the traditional ViT is as Figure 3 shown. From a system perspective, monitor the resource occupancy (CPU / GPU utilization, memory occupancy), temperature, and battery consumption of the edge device during continuous operation to ensure that the device can run stably for a long time within the expected power consumption range without overheating or crashing. In addition, improve the system robustness through redundant design and anomaly detection mechanisms: for example, when the model prediction output is abnormal (such as extremely low confidence), automatically re-collect data or reset the model inference module to prevent occasional errors from affecting the final result. After testing, the deployed system can run stably on-site and accurately identify the ore-forming lithology of the target mineral, realizing the full-process automation from data collection, real-time analysis to decision support, and greatly improving the efficiency and intelligent level of field exploration operations.

[0154] As described above, it is only the preferred embodiment of the present invention, and it does not impose any form of limitation on the present invention. Although the present invention has been disclosed above with the preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art can make some changes or modifications to equivalent embodiments by using the above-disclosed technical content within the scope of the technical solution of the present invention. However, as long as it does not depart from the content of the technical solution of the present invention, any indirect modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention.

Claims

1. An intelligent recognition method for metallogenic lithology of metal mines based on the Swin-Transformer model, characterized in that, It includes the following steps: Step 1: Collect metallogenic lithology data of metal ores and preprocess the data; Step 2: Draw the standard radar chart and the radar chart to be classified for metallogenic lithology of metal ores; Step 3: Train the Swin-Transformer model based on the standard radar chart; Step 4: Classify the radar chart to be classified based on the Swin-Transformer model; Step 5: Evaluate the performance of the Swin-Transformer model and perform iterative optimization; Step 6: Deploy and apply the Swin-Transformer model on-site.

2. The intelligent recognition method of metallogenic lithology of metal mines based on the Swin-Transformer model according to claim 1, characterized in that, In Step 1, linear transformation is performed on the collected data using Min-Max normalization to map the result values to the range of [0, 1].

3. The intelligent identification method for metallogenic lithology of metal mines based on the Swin-Transformer model according to claim 1, characterized in that In Step 2, the angular interval of the radar chart is: where θ i is the angular interval of the radar chart, and the values of each dimension of the radar chart respectively correspond to the resistivity, polarizability, magnetic susceptibility, remanent magnetization intensity, and density after preprocessing.

4. The intelligent recognition method for metallogenic lithology of metal mines based on the Swin-Transformer model according to claim 1, wherein, In Step 3, it also includes the following sub-steps: Step 301: Divide the radar chart into patches. Use the standard radar chart data as the training input of the Swin-Transformer model. Divide the image into multiple pixel blocks, flatten the pixel blocks, and obtain the initial feature embedding representation through linear mapping; Step 302: Extract features from the radar chart based on a sliding window. Divide the feature map into several local windows. Calculate the multi-head self-attention within the window, encode the local information, and shift the adjacent layer windows relatively to capture the global dependencies across windows, thereby realizing the fusion of local and global features; Step 303: Calculate the sliding window multi-head self-attention, perform an affine transformation on the input features to obtain the query matrix, key matrix, and value matrix, calculate the attention weights and outputs on each attention head, and splice the outputs of multiple attention heads and project them through the output weight matrix to obtain the multi-head self-attention result; Step 304: Set the loss function, and the expression is as follows: wherein, represents the probability that the Swin-Transformer model predicts the sample as class c; y c is the indication value of the true label. Step 305: Set the training hyperparameters, set the initial learning rate, and gradually reduce the learning rate during the training process in cooperation with the learning rate decay strategy. Use the Adam optimizer for gradient update.

5. The intelligent identification method of metallogenic lithology of metal mines based on the Swin-Transformer model according to claim 4, characterized in that, In Step 3, training the Swin-Transformer model includes: Input the radar chart samples into the Swin-Transformer model, calculate the forward propagation to obtain the prediction output and the corresponding loss function; Calculate the gradient through the backpropagation algorithm; Use the optimizer to adjust the parameters of the Swin-Transformer model according to the set learning rate; After completing all rounds of training, obtain the trained Swin-Transformer model.

6. The intelligent identification method of metallogenic lithology of metal mines based on the Swin-Transformer model according to claim 1, characterized in that, In Step 4, it also includes the following sub-steps: Step 401: Calculate the embedded feature vector obtained by the standard radar chart through the Swin-Transformer model; Step 402: Input the original data of the sample to be classified, calculate the embedded feature vector of the sample to be classified through the trained Swin-Transformer model, and calculate the similarity between the embedded feature vector of the sample to be classified and the embedded feature vector of the standard radar chart; Step 403: Compare the similarity degrees of all categories, find out the category corresponding to the maximum similarity degree, so as to determine the lithology category and return the classification result.

7. The intelligent recognition method for metallogenic lithology of metal mines based on the Swin-Transformer model according to claim 6, characterized in that, In the said Step 403, a similarity threshold is set to determine the classification confidence level.

8. The intelligent recognition method of metallogenic lithology of metal ore based on Swin-Transformer model according to claim 1, characterized in that In the said Step 5, the following sub-steps are included: Step 501: Comprehensively utilize accuracy, precision, recall rate and F1-score to evaluate the performance of the Swin-Transformer model; Step 502: Iteratively optimize the Swin-Transformer model through evaluation-diagnosis-improvement-retraining.

9. A method for intelligent identification of metallogenic lithology of metal mines based on the Swin-Transformer model according to claim 8, characterized in that, In the said Step 502, it includes: Evaluate various indicators of the Swin-Transformer model on the validation set and newly collected data, and locate the misjudgment situations and error patterns of the Swin-Transformer model in the lithology category through the confusion matrix; Then analyze the causes of misjudgment and diagnose whether it is caused by insufficient samples, insufficient features or model overfitting / underfitting; Adopt the above strategies of data augmentation, regularization, adjusting hyperparameters or model structure to improve the Swin-Transformer model; Apply the improvement scheme to the model, retrain or fine-tune the Swin-Transformer model and evaluate the performance again; Loop and iterate the above operations until the Swin-Transformer model meets the expected requirements in all evaluation indicators.

10. A method for intelligent identification of metallogenic lithology of metal mines based on the Swin-Transformer model according to claim 1, characterized in that In the said Step 6, the following sub-steps are included: Step 601: Deployment scheme adaptation; Step 602: Edge computing optimization; Step 603: On-site deployment stability evaluation.