Pitch angle prediction model training method and device of base station antenna, equipment and medium
By a drone collecting base station antenna pitch angle images and parameters, combined with multimodal feature extraction training prediction model, the problems of low efficiency and security risks of base station antenna pitch angle measurement in the prior art are solved, and high-precision and low-cost pitch angle prediction are achieved.
Patent Information
- Application Number
- CN202411274737.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-04-04
AI Technical Summary
The prior art is inefficient and costly when measuring the pitch angle of the base station antenna, and relies on manual tower climbing for manual measurement, which poses a safety risk.
The drone is used to take the pitch angle image of the base station antenna, and multimodal feature extraction is performed in combination with the drone parameters, and a pitch angle prediction model is trained to improve prediction accuracy and efficiency.
Through the integration of data acquisition and multimodal features by drone collection, the prediction accuracy of the pitch angle of the base station antenna is significantly improved, the cost and safety risks of manual measurement are reduced, and the working efficiency is improved.
Smart Images

Figure CN119762932A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, device, equipment and medium for training a pitch angle prediction model of a base station antenna. Background Art
[0002] In the field of communications, especially in the field of wireless networks in the telecommunications industry, measuring the elevation angle of base station antennas is a major issue facing companies. The elevation angle of base station antennas plays a vital role in optimizing wireless network coverage and performance.
[0003] With the continuous development of communication technology and the growing demand for user satisfaction, the traditional method of measuring the elevation angle of base station antennas has gradually revealed some limitations. In the past, the measurement of the elevation angle of base station antennas usually relied on experience and simple measurement with a slope meter. This method required workers to climb to the top of the tower to measure, which was time-consuming, labor-intensive, costly and inefficient. Summary of the invention
[0004] The technical problem to be solved by the embodiments of the present application is to provide a method, device, equipment and medium for training a base station antenna elevation angle prediction model, so as to effectively improve the prediction accuracy and efficiency of the base station antenna elevation angle and reduce the cost of base station antenna elevation angle prediction.
[0005] In a first aspect, an embodiment of the present application provides a method for training a pitch angle prediction model of a base station antenna, the method comprising:
[0006] Acquire a model training sample, wherein the model training sample includes: a pitch angle image of a base station antenna taken by a drone, drone encoding parameters corresponding to drone parameters of the drone when taking the pitch angle image, and a real pitch angle label;
[0007] Inputting the model training samples into a pitch angle prediction model to be trained, wherein the pitch angle prediction model to be trained comprises: a feature mapping network layer, an image feature extraction network layer, a multimodal feature extraction network layer and a pitch angle prediction network layer;
[0008] Calling the feature mapping network layer to perform feature mapping processing on the drone encoding parameters to obtain drone features;
[0009] Calling the image feature extraction network layer to perform feature extraction on the pitch angle image to obtain image features;
[0010] Calling the multimodal feature extraction network layer to perform cross-attention calculation on the drone feature and the image feature to obtain a fusion feature;
[0011] Calling the pitch angle prediction network layer to process the fusion feature to obtain a pitch angle prediction result corresponding to the pitch angle image;
[0012] When the loss value calculated based on the elevation angle prediction result indicates that the to-be-trained elevation angle prediction model has converged, the final elevation angle prediction model for predicting the elevation angle of the base station antenna is obtained.
[0013] Optionally, obtaining a model training sample includes:
[0014] Acquire the pitch angle images of the base station antenna taken by the drone at different angles and the drone parameters corresponding to the drone, wherein the drone parameters include: the flight parameters of the drone and the pan / tilt data of the pan / tilt corresponding to the drone;
[0015] One-hot encoding is performed on the drone parameters to obtain the drone encoding parameters;
[0016] The model training sample is constructed based on the pitch angle image, the UAV encoding parameters and the real pitch angle label corresponding to the pitch angle image.
[0017] Optionally, the image feature extraction network layer includes: an image block division layer, a plurality of cascaded first Swin layers, an image block merging layer and a plurality of cascaded second Swin layers,
[0018] The calling of the image feature extraction network layer to extract features from the pitch angle image to obtain image features includes:
[0019] Calling the image block division layer to process the pitch angle image to obtain image block features;
[0020] Calling the first Swin layer to process the image block feature using a self-attention mechanism of a moving window to obtain a first image feature corresponding to the image block feature;
[0021] Calling the image block merging layer to perform merging processing on the first image features to obtain image block merging image features;
[0022] The second Swin layer is called to process the image block merging features using a moving window self-attention mechanism to obtain the image features.
[0023] Optionally, the feature mapping network layer includes: a first feature mapping block and a second feature mapping block, wherein the first feature mapping block and the second feature mapping block have different dimensions.
[0024] The calling of the feature mapping network layer to perform feature mapping processing on the drone encoding parameters to obtain drone features includes:
[0025] Calling the first feature mapping block to perform feature mapping processing on the drone encoding parameters to obtain drone features of a first dimension;
[0026] Calling the second feature mapping block to perform feature mapping processing on the drone encoding parameters to obtain drone features of a second dimension;
[0027] The drone features of the first dimension and the drone features of the second dimension are used as the drone features.
[0028] Optionally, the multimodal feature extraction network layer includes: a first image block merging layer, a plurality of cascaded first Swin fusion layers, a second image block merging layer and a plurality of cascaded second Swin fusion layers,
[0029] The calling of the multimodal feature extraction network layer to perform cross-attention calculation on the drone feature and the image feature to obtain a fusion feature includes:
[0030] Calling the first image block merging layer to merge the image features to obtain a first image block merged feature;
[0031] Calling the first Swin fusion layer to perform feature fusion on the first image block merge feature and the drone feature of the first dimension to obtain an initial fusion feature;
[0032] Calling the second image block merging layer to merge the initial fusion features to obtain second image block merging features;
[0033] The second Swin fusion layer is called to perform feature fusion on the second image block merge feature and the drone feature of the second dimension to obtain the fused feature.
[0034] Optionally, the pitch angle prediction network layer includes: an average pooling layer and a fully connected layer,
[0035] The calling the pitch angle prediction network layer to process the fusion feature to obtain a pitch angle prediction result corresponding to the pitch angle image includes:
[0036] Calling the average pooling layer to downsample the fused features to obtain prediction features;
[0037] Calling the fully connected layer to perform feature mapping processing on the prediction feature to obtain prediction scores of the pitch angle image at different pitch angles;
[0038] The prediction score is processed based on the SoftMax function to obtain the prediction probability corresponding to the pitch angle image.
[0039] Optionally, when the loss value calculated based on the pitch angle prediction result indicates that the to-be-trained pitch angle prediction model has converged, obtaining the final pitch angle prediction model for performing base station antenna pitch angle prediction includes:
[0040] Based on the predicted score and the true pitch angle label, a cross entropy loss value is calculated;
[0041] Based on the predicted probability and the true pitch angle label, a mean square error loss value is calculated;
[0042] When the cross entropy loss value and the mean square error loss value indicate that the pitch angle prediction model to be trained has converged, the pitch angle prediction model is obtained.
[0043] In a second aspect, an embodiment of the present application provides a base station antenna pitch angle prediction model training device, the device comprising:
[0044] A model sample acquisition module is used to acquire model training samples, wherein the model training samples include: a pitch angle image of a base station antenna taken by a drone, drone encoding parameters corresponding to drone parameters of the drone when taking the pitch angle image, and a real pitch angle label;
[0045] A model sample input module, used for inputting the model training sample into a pitch angle prediction model to be trained, wherein the pitch angle prediction model to be trained comprises: a feature mapping network layer, an image feature extraction network layer, a multimodal feature extraction network layer and a pitch angle prediction network layer;
[0046] A drone feature acquisition module is used to call the feature mapping network layer to perform feature mapping processing on the drone encoding parameters to obtain drone features;
[0047] An image feature acquisition module, used for calling the image feature extraction network layer to extract features from the pitch angle image to obtain image features;
[0048] A fusion feature acquisition module, used for calling the multimodal feature extraction network layer to perform cross-attention calculation on the drone feature and the image feature to obtain a fusion feature;
[0049] A prediction result acquisition module, used for calling the pitch angle prediction network layer to process the fusion feature to obtain a pitch angle prediction result corresponding to the pitch angle image;
[0050] The prediction model acquisition module is used to obtain the final pitch angle prediction model for predicting the pitch angle of the base station antenna when the loss value calculated based on the pitch angle prediction result indicates that the pitch angle prediction model to be trained has converged.
[0051] Optionally, the model sample acquisition module includes:
[0052] A drone parameter acquisition unit, used to acquire the pitch angle images of the base station antenna taken by the drone at different angles and drone parameters corresponding to the drone, wherein the drone parameters include: flight parameters of the drone and pan / tilt data of the pan / tilt corresponding to the drone;
[0053] A coding parameter acquisition unit, used for performing one-hot coding processing on the drone parameters to obtain the drone coding parameters;
[0054] The model sample construction unit is used to construct the model training sample based on the pitch angle image, the UAV encoding parameter and the real pitch angle label corresponding to the pitch angle image.
[0055] Optionally, the image feature extraction network layer includes: an image block division layer, a plurality of cascaded first Swin layers, an image block merging layer and a plurality of cascaded second Swin layers,
[0056] The image feature acquisition module comprises:
[0057] An image block feature acquisition unit, used for calling the image block division layer to process the pitch angle image to obtain image block features;
[0058] A first feature acquisition unit is used to call the first Swin layer to process the image block feature using a self-attention mechanism of a moving window to obtain a first image feature corresponding to the image block feature;
[0059] a merge feature acquisition unit, configured to call the image block merging layer to perform a merging process on the first image feature to obtain an image block merging feature;
[0060] The image feature acquisition unit is used to call the second Swin layer to use the self-attention mechanism of the moving window to extract the features of the image block merging features to obtain the image features.
[0061] Optionally, the feature mapping network layer includes: a first feature mapping block and a second feature mapping block, wherein the first feature mapping block and the second feature mapping block have different dimensions.
[0062] The drone feature acquisition module includes:
[0063] A first UAV feature acquisition unit, configured to call the first feature mapping block to perform feature mapping processing on the UAV encoding parameters to obtain UAV features of a first dimension;
[0064] A second UAV feature acquisition unit, configured to call the second feature mapping block to perform feature mapping processing on the UAV encoding parameters to obtain UAV features of a second dimension;
[0065] The drone feature acquisition unit is used to use the drone features of the first dimension and the drone features of the second dimension as the drone features.
[0066] Optionally, the multimodal feature extraction network layer includes: a first image block merging layer, a plurality of cascaded first Swin fusion layers, a second image block merging layer and a plurality of cascaded second Swin fusion layers,
[0067] The fusion feature acquisition module includes:
[0068] A first merge feature acquisition unit, configured to call the first image block merging layer to perform a merging process on the image features to obtain a first image block merging feature;
[0069] an initial fusion feature acquisition unit, configured to call the first Swin fusion layer to perform feature fusion on the first image block merged feature and the drone feature of the first dimension to obtain an initial fusion feature;
[0070] A second merge feature acquisition unit, configured to call the second image block merge layer to merge the initial fusion features to obtain a second image block merge feature;
[0071] The fusion feature acquisition unit is used to call the second Swin fusion layer to perform feature fusion on the second image block merged feature and the second dimension of the drone feature to obtain the fusion feature.
[0072] Optionally, the pitch angle prediction network layer includes: an average pooling layer and a fully connected layer,
[0073] The prediction result acquisition module comprises:
[0074] A prediction feature acquisition unit, used for calling the average pooling layer to perform downsampling processing on the fusion feature to obtain a prediction feature;
[0075] A prediction probability acquisition unit, used for calling the fully connected layer to perform feature mapping processing on the prediction feature to obtain prediction scores of the pitch angle image at different pitch angles;
[0076] The predicted pitch angle acquisition unit is used to process the predicted score based on the SoftMax function to obtain the predicted probability corresponding to the pitch angle image.
[0077] Optionally, the prediction model acquisition module includes:
[0078] A cross entropy loss calculation unit, configured to calculate a cross entropy loss value based on the predicted score and the true pitch angle label;
[0079] A mean square error loss calculation unit, configured to calculate a mean square error loss value based on the predicted probability and the true pitch angle label;
[0080] A prediction model acquisition unit is used to obtain the pitch angle prediction model when the cross entropy loss value and the mean square error loss value indicate that the pitch angle prediction model to be trained has converged.
[0081] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0082] A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for training the elevation angle prediction model of the base station antenna described in any one of the above items is implemented.
[0083] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any of the above-mentioned methods for training a pitch angle prediction model of a base station antenna.
[0084] Compared with the prior art, the embodiments of the present application have the following advantages:
[0085] In an embodiment of the present application, by obtaining a model training sample, the model training sample includes: a pitch angle image of a base station antenna taken by a drone, a drone encoding parameter corresponding to the drone parameters when the drone takes the pitch angle image, and a real pitch angle label. The model training sample is input into the pitch angle prediction model to be trained, and the pitch angle prediction model to be trained includes: a feature mapping network layer, an image feature extraction network layer, a multimodal feature extraction network layer, and a pitch angle prediction network layer. The feature mapping network layer is called to perform feature mapping processing on the drone encoding parameters respectively to obtain drone features. The image feature extraction network layer is called to extract features from the pitch angle image to obtain image features. The multimodal feature extraction network layer is called to perform cross-attention calculation on the drone features and the image features to obtain fusion features. The pitch angle prediction network layer is called to process the fusion features to obtain the pitch angle prediction result corresponding to the pitch angle image. When the loss value calculated based on the real pitch angle label and the pitch angle prediction result is within a preset range, the trained pitch angle prediction model to be trained is used as the final pitch angle prediction model for predicting the pitch angle of the base station antenna. The embodiment of the present application uses a self-attention mechanism of multimodal feature fusion and moving windows, which is not limited to the extraction of pitch angle features in the image, but can also integrate rich drone information such as flight parameters and gimbal data, making the input information features richer, which can reduce the computational cost of the model, thereby improving the prediction accuracy of the base station antenna pitch angle and the reasoning speed and real-time effect of the model. At the same time, it can get rid of the cumbersome process of manually climbing the tower and using a slope meter for manual measurement. Not only is the effect significant, it can save costs and improve work efficiency, but it also greatly reduces the risk and uncertainty of climbing the tower caused by manual operation.
[0086] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 A flowchart of the steps of a method for training a base station antenna elevation angle prediction model provided in an embodiment of the present application;
[0088] Figure 2 A schematic diagram of a pitch angle prediction model structure provided in an embodiment of the present application;
[0089] Figure 3 A schematic diagram of patch division provided in an embodiment of the present application;
[0090] Figure 4 A schematic diagram of a moving window mechanism provided in an embodiment of the present application;
[0091] Figure 5A schematic diagram of a Swin layer structure provided in an embodiment of the present application;
[0092] Figure 6 A schematic diagram of patch merging provided in an embodiment of the present application;
[0093] Figure 7 A schematic diagram of a Swin fusion layer structure provided in an embodiment of the present application;
[0094] Figure 8 A schematic diagram of a training process of a base station antenna elevation angle prediction network model with multimodal attention provided in an embodiment of the present application;
[0095] Fig. 9 A schematic diagram of the structure of a base station antenna elevation angle prediction model training device provided in an embodiment of the present application;
[0096] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0097] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0098] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0099] Reference Figure 1 , shows a flowchart of the steps of a method for training a base station antenna elevation angle prediction model provided in an embodiment of the present application, such as Figure 1 As shown, the base station antenna elevation angle prediction model training method may include: step 101, step 102, step 103, step 104, step 105, step 106 and step 107.
[0100] Step 101: Obtain a model training sample, where the model training sample includes: a pitch angle image of a base station antenna taken by a drone, drone coding parameters corresponding to drone parameters of the drone when taking the pitch angle image, and a real pitch angle label.
[0101] The embodiments of the present application can be applied to scenarios in which the pitch angle of an antenna base station is predicted by combining multimodal data (the pitch angle image of the base station antenna and drone data).
[0102] When training the pitch angle prediction model of the base station antenna, a model training sample can be obtained. The model training sample may include: the pitch angle image of the base station antenna taken by the drone, the drone encoding parameters corresponding to the drone parameters when the drone takes the pitch angle image, and the real pitch angle label. The process of obtaining the model training sample can be described in detail in combination with the following specific implementation method.
[0103] In a specific implementation of the present application, the above step 101 may include:
[0104] Sub-step A1: Acquire the pitch angle images of the base station antenna taken by the drone at different angles and the drone parameters corresponding to the drone, wherein the drone parameters include: the flight parameters of the drone and the gimbal data of the gimbal corresponding to the drone.
[0105] In this embodiment, a drone, also known as an unmanned aerial vehicle, is an aircraft that does not require direct human control and can perform various tasks in the air using advanced remote control technology, autonomous flight control system, and sensor technology.
[0106] In a specific implementation, a drone can be equipped with a camera to capture the pitch angle images of the base station antenna at different angles, and at the same time, the drone parameters when the drone captures images at different angles can be obtained. When the drone captures the base station antenna, the pitch angle images at different angles can be obtained by adjusting the gimbal and the flight attitude of the drone. Specifically, the drone can fly above the base station antenna and capture the front, side or tilt angle images of the antenna by adjusting the pitch angle of the gimbal.
[0107] Among them, flight parameters refer to various performance indicators involved in the flight of the drone, including but not limited to: flight altitude, flight speed, drone direction and other parameters.
[0108] Gimbal data refers to the relevant performance indicators of the gimbal (used to install and stabilize the camera) on the drone, including but not limited to: controllable rotation range, angular jitter, zoom capability and other parameters.
[0109] After obtaining the pitch angle images of the base station antenna taken by the drone at different angles and the drone parameters corresponding to the drone, sub-step A2 is performed.
[0110] Sub-step A2: One-hot encoding is performed on the drone parameters to obtain the drone encoding parameters.
[0111] One-hot encoding, also known as one-bit effective encoding, is a method for converting categorical data into a numerical format that can be processed by machine learning models. The principle is to use an N-bit state register to encode N states, each state has its own independent register bit, and at any time, only one of them is valid, that is, only one bit is 1, and the other bits are 0.
[0112] After obtaining the drone parameters, the drone parameters can be one-hot encoded to obtain the drone encoding parameters.
[0113] After performing one-hot encoding processing on the drone parameters to obtain the drone encoding parameters, sub-step A3 is executed.
[0114] Sub-step A3: constructing the model training sample based on the pitch angle image, the UAV encoding parameters and the real pitch angle label corresponding to the pitch angle image.
[0115] The real elevation angle label refers to the label of the real elevation angle of the base station antenna.
[0116] After the drone parameters are one-hot encoded to obtain the drone encoding parameters, the model training samples can be constructed based on the pitch angle image, the drone encoding parameters and the real pitch angle labels corresponding to the pitch angle image.
[0117] After the model training samples are obtained, step 102 is executed.
[0118] Step 102: input the model training samples into the pitch angle prediction model to be trained, wherein the pitch angle prediction model to be trained includes: a feature mapping network layer, an image feature extraction network layer, a multimodal feature extraction network layer and a pitch angle prediction network layer.
[0119] The pitch angle prediction model to be trained may include: a feature mapping network layer, an image feature extraction network layer, a multimodal extraction network and a pitch angle prediction network layer. Figure 2 As shown, Figure 2 The two feature mapping blocks constitute the feature mapping network layer, the image feature extraction module is the image feature extraction network layer, the multimodal feature extraction module is the multimodal feature extraction network layer, and the pitch angle prediction module is the pitch angle prediction network layer.
[0120] After the model training samples are obtained, the model training samples can be input into the pitch angle prediction model to be trained, and then the subsequent model processing process is performed.
[0121] Step 103: Call the feature mapping network layer to perform feature mapping processing on the drone encoding parameters to obtain drone features.
[0122] After the model training samples are input into the pitch angle prediction model to be trained, the feature mapping network layer can be called to perform feature mapping processing on the drone encoding parameters to obtain the drone features. In this embodiment, the feature mapping network layer can include two feature mapping blocks, namely a first feature mapping block and a second feature mapping block, and the feature mapping processing process of the feature mapping network layer can be: calling the first feature mapping block to perform feature mapping processing on the drone encoding parameters to obtain the drone features of the first dimension. Calling the second feature mapping block to perform feature mapping processing on the drone encoding parameters to obtain the drone features of the second dimension. Furthermore, the drone features of the first dimension and the drone features of the second dimension can be used as drone features. Figure 2 As shown, the drone data can obtain the drone features of the first dimension by passing through the first feature mapping block, and the drone data can obtain the drone features of the second dimension by passing through the second feature mapping block. Figure 2 In which L×4C and L×8C represent the number of feature maps output in the feature mapping block, and C represents the number of channels.
[0123] In this example, after the drone parameters are one-hot encoded, they pass through a feature mapping block consisting of two linear layers and a GELU activation function to map the number of channels of the parameter features to the same number of channels as the image features. The calculation process of the feature mapping block is as follows:
[0124] Z in =W z2 (GELU(W z1 Z))
[0125] in, Wz1 and Wz1 are the learnable parameters of the two linear layers, Z is the drone data after one-hot encoding, Zin is the obtained parameter feature.
[0126] Step 104: calling the image feature extraction network layer to perform feature extraction on the pitch angle image to obtain image features.
[0127] After the model training samples are input into the pitch angle prediction model to be trained, the image feature extraction network layer can be called to extract features from the pitch angle image to obtain image features.
[0128] In this example, the image feature extraction network layer can be composed of an image block division layer, multiple cascaded first Swin layers, an image block merging layer, and multiple cascaded second Swin layers, wherein the image block division layer and the image block merging layer are used to reduce the size of the image and increase the number of channels of the image, and the Swin layer is used to extract the feature information of the image. The process of image feature extraction can be described in detail in conjunction with the following specific implementation method.
[0129] It can be understood that in this embodiment, the Swin network is a Swin Transformer network.
[0130] In a specific implementation of the present application, the above step 104 may include:
[0131] Sub-step B1: calling the image block division layer to process the pitch angle image to obtain image block features.
[0132] In this embodiment, the image block division layer can be called to process the pitch angle image to obtain image block features. Figure 2 As shown, the input image is (H, W are the height and width of the input image respectively) First, input the patch division, using convolution with a step size of 4 and a kernel of 4. The process is as follows Figure 3 As shown. The calculation process can be: F pp =f pp (I in ).
[0133] In the above formula, f pp (·) is the patch merging function, is the output patch feature.
[0134] The image block features (patch) can be obtained by processing the input image through the image block division layer. The size of each patch can be 4×4 or 7×7 pixels, etc.
[0135] After the image block division layer is called to process the pitch angle image and obtain the image block features, sub-step B2 is executed.
[0136] Sub-step B2: calling the first Swin layer to process the image block feature using a self-attention mechanism of a moving window to obtain a first image feature corresponding to the image block feature.
[0137] After calling the image block division layer to process the pitch angle image and obtain the image block features, the first Swin layer can be called to process the image block features using a self-attention mechanism of a moving window to obtain the first image features corresponding to the image block features.
[0138] In this example, the Swin layer is implemented based on the Transformer, and the amount of self-attention calculation in the Transformer is reduced through the moving window mechanism. Each Swin layer divides the input feature map into windows of fixed size and performs self-attention calculation inside the window. By moving the window, the amount of self-attention calculation can be reduced to a linear correlation with the number of pixels in the feature map. Figure 4 As shown in FIG. 1 , the moving window mechanism is that the next Swin layer moves the window divided by the current Swin layer. The moving window mechanism can establish the dependency between windows without increasing the amount of calculation.
[0139] The feature extraction method in the Swin layer can be as follows Figure 5 First, the input features are divided into windows, and three linear mappings are used to obtain query, key and value respectively. The process is as follows:
[0140] Q=LN(X in )W Q K=LN(X in )W K V=LN(X in )W V
[0141] Among them, X in is the input feature map, Q, K and V are the query, key and value respectively, and W Q , W K and W V is the learnable parameter of the linear mapping, and LN(·) is the layer normalization function. Then, using Q, K and V To perform self-attention calculation, the process is:
[0142] X attn =SoftMax(QK T )V+X in
[0143] Among them, SoftMax(·) is the SoftMax function, Xattn is the output feature of the self-attention calculation. After the self-attention calculation, the feature is integrated through a multi-layer perceptron composed of a linear layer, a GELU activation function and a linear layer. The process is:
[0144] X out =(GELU(LN(X attn )W1))W2+X attn
[0145] in, W1 and W2are the learnable parameters of the two linear layers, and GELU(·) is the GELU activation function.
[0146] Sub-step B3: calling the image block merging layer to merge the first image features to obtain image block merging features.
[0147] After the first image features are obtained through multiple cascaded first Swin layers, the image block merging layer can be called to merge the first image features to obtain image block merged features. Figure 2 As shown in the figure, the image block merging layer (patch merging) is used at different stages of the network to reduce the resolution of the feature map and increase the number of channels, similar to the pooling layer in CNN or the convolution layer with a step size greater than 1. The patch merging layer achieves downsampling by merging adjacent patches while keeping the total information content of the feature map unchanged. Figure 6 As shown in the figure, after patch merging, the image size is reduced to half of the original size and the number of channels is doubled.
[0148] After calling the image block merging layer to merge the first image feature to obtain the image block merging feature, sub-step B4 is executed.
[0149] Sub-step B4: calling the second Swin layer to use the self-attention mechanism of the moving window to extract the features of the image block merge to obtain the image features.
[0150] After calling the image block merging layer to merge the first image features to obtain the image block merged features, multiple cascaded second Swin layers can be called to use the self-attention mechanism of the moving window to extract features from the image block merged features to obtain image features.
[0151] It can be understood that the processing method of the second Swin layer is similar to that of the first Swin layer, and this embodiment will not be described in detail here.
[0152] The image feature extraction network layer of the embodiment of the present application adopts Swin Transformer, which adopts a layered structure, divides the input image into multiple small blocks (patches), and then performs Transformer calculations on each small block. This local self-attention calculation method reduces the overall calculation amount and improves processing efficiency.
[0153] Step 105: Call the multimodal feature extraction network layer to perform cross-attention calculation on the drone features and the image features to obtain fusion features.
[0154] After obtaining the drone features and image features, the multimodal feature extraction network layer can be called to perform cross-attention calculations on the drone features and image features to obtain fusion features. In this example, the multimodal feature extraction network layer may include: a first image block merging layer, multiple cascaded Swin fusion layers, a second image block merging layer, and multiple cascaded second Swin fusion layers. The processing process of the multimodal feature extraction network layer on image features and drone features can be described in detail in combination with the following specific implementation method.
[0155] In a specific implementation of the present application, the above step 105 may include:
[0156] Sub-step C1: calling the first image block merging layer to merge the image features to obtain a first image block merged feature.
[0157] In this embodiment, the multimodal feature extraction network layer is mainly composed of patch merging and Swin fusion layers. In the Swin fusion layer, drone data is introduced into the image features.
[0158] After obtaining the features of the drone parameters and the image features, the image features are merged through the first image block merging layer to obtain the first image block merged features.
[0159] After calling the first image block merging layer to merge the image features to obtain the first image block merged features, sub-step C2 is executed.
[0160] Sub-step C2: calling the first Swin fusion layer to perform feature fusion on the first image block merge feature and the drone feature of the first dimension to obtain an initial fusion feature.
[0161] After calling the first image block merging layer to merge the image features and obtain the first image block merged features, the first Swin fusion layer can be called to fuse the first image block merged features and the first dimension of drone features to obtain the initial fusion features. Figure 2 As shown, the image features after patch merging are input into multiple cascaded first Swin fusion layers, and the drone features of the first dimension are fused in each first Swin fusion layer to perform cross attention, thereby obtaining the initial fused features.
[0162] Sub-step C3: calling the second image block merging layer to merge the initial fusion features to obtain second image block merging features.
[0163] After multiple cascaded first Swin fusion layers, the second image block merging layer can be called to merge the initial fusion features to obtain the second image block merging features.
[0164] Sub-step C4: calling the second Swin fusion layer to perform feature fusion on the second image block merge feature and the second dimension drone feature to obtain the fused feature.
[0165] The second image merge feature can be input to multiple cascaded second Swin fusion layers, and the second Swin fusion layer can perform feature fusion on the second image block merge feature and the second dimension drone feature to obtain a fusion feature. Figure 2 As shown, the second image merged features can be input into multiple cascaded second Swin fusion layers, and in each second Swin fusion layer, the drone features of the second dimension can be fused to perform cross-attention calculation, and finally the fused features are obtained.
[0166] In this example, the structure of the Swin fusion layer can be as follows Figure 7 As shown in the figure, the Swin fusion layer first extracts image features from the input through the Swin layer, and then performs cross-attention calculation on the obtained image features and parameter features (i.e., drone features) to obtain fusion features. The query of the cross-attention is obtained from the image features, and the key and value are obtained from the drone features respectively. The process is as follows:
[0167] Q I =LN(X I )W IQ K P =LN(Z P )W PK V P =LN(Z P )W PV
[0168] Among them, Q I is the query of the image feature, K P and V P is the key and value of the parameter feature, where W IQ , W PK and W PV are the learnable parameters of the three linear mappings, X I and Z P are the input image features and parameter features respectively. The calculation process of cross attention is the same as that of self-attention, and the calculation process is as follows:
[0169] X attnf =SoftMax(Q I K P T )V P +X I
[0170] Among them, X attnfThe output features of the cross attention are then integrated through a multi-layer perceptron to obtain the output fusion feature X outf , the process is:
[0171] X outf =f MLP (LN(X attnf ))+X attnf
[0172] Among them, f MLP (·) is the multi-layer perceptron function. Similar to the image feature extraction module, after several cascaded Swin fusion blocks, patch merging is used to reduce the size of the fused features and increase the number of channels of the fused features.
[0173] After calling the multimodal feature extraction network layer to perform cross-attention calculation on the drone features and the image features to obtain fused features, step 106 is executed.
[0174] Step 106: calling the pitch angle prediction network layer to process the fusion feature to obtain a pitch angle prediction result corresponding to the pitch angle image.
[0175] After calling the multimodal feature extraction network layer to perform cross-attention calculation on the drone features and the image features to obtain the fused features, the pitch angle prediction network layer can be called to process the fused features to obtain the pitch angle prediction result corresponding to the pitch angle image. In this example, the pitch angle prediction network layer may include: an average pooling layer and a fully connected layer, such as Figure 2 As shown in the figure, the average pooling layer can downsample the fused features to obtain the predicted features. The fully connected layer can perform feature mapping on the predicted features to obtain the predicted scores of the pitch angle image at different pitch angles. Then, the predicted scores can be processed based on the SoftMax function to obtain the predicted probabilities corresponding to the pitch angle images. The predicted scores and predicted probabilities can be used as the pitch angle prediction results.
[0176] In the specific implementation, the fusion features obtained by the multimodal feature extraction network layer are averaged and pooled to obtain the prediction features, and then pass through the fully connected layer to obtain the final prediction result. The process can be shown as follows:
[0177] X result =f fc (f Ap (X fuse ))
[0178] Among them, f fc (·) is the fully connected layer function, f Ap (·) is the average pooling function, X fuse The input fusion features, For the prediction results.
[0179] After calling the pitch angle prediction network layer to process the fused features to obtain the pitch angle prediction result corresponding to the pitch angle image, step 107 is executed.
[0180] Step 107: When the loss value calculated based on the elevation angle prediction result indicates that the to-be-trained elevation angle prediction model has converged, the final elevation angle prediction model for predicting the elevation angle of the base station antenna is obtained.
[0181] After calling the pitch angle prediction network layer to process the fused features to obtain the pitch angle prediction result corresponding to the pitch angle image, the loss value can be calculated based on the true pitch angle label and the pitch angle prediction result, and when the loss value indicates that the pitch angle prediction model to be trained has converged, the final pitch angle prediction model for predicting the pitch angle of the base station antenna is obtained.
[0182] In this example, the loss value may include two parts, namely, a cross entropy loss and a mean square error loss. Specifically, the cross entropy loss value may be calculated based on the predicted probability and the true pitch angle label. The mean square error loss value may be calculated based on the pitch angle prediction result and the true pitch angle label. When the cross entropy loss value is within the first preset range and the mean square error loss value is within the second preset range, the trained pitch angle prediction model to be trained is used as the pitch angle prediction model.
[0183] Among them, the calculation formula of cross entropy loss can be:
[0184]
[0185] Among them, N is the number of predicted angles, which is 180, and SoftMax(X result ) i is the prediction result after passing through the SoftMax function i prediction scores, true angle labels ytrue After one-hot encoding, i A label value.
[0186] When using MSE loss, first pass the final prediction result through the SoftMax function, multiply it by 1-180 respectively, and then sum it to get the value of the predicted angle. Then compare it with the actual angle label ytrue Perform MSE loss. The calculation formula can be:
[0187]
[0188] In this embodiment, other hyperparameters can also be defined. The model uses the ADAM optimizer with three parameters β1=0.9, β2=0.999, and ε=10 -8 The initial learning rate is set to 2e -4 , a total of 1000 epochs (iteration cycles) were trained. At the 500th, 800th, 900th, and 950th epochs, the learning rate was reduced to half of the original rate.
[0189] After the pitch angle prediction model is trained, the pitch angle prediction model can be used to predict the pitch angle of the base station antenna. The specific prediction process can be: input the pitch angle image to be predicted and the drone parameters corresponding to the pitch angle image to be predicted, the drone parameters are processed by the feature mapping network layer, the pitch angle image to be predicted is processed by the image feature extraction network layer, and the cross-attention calculation is performed in the multimodal feature extraction network layer to obtain the fusion feature. The fusion feature is average pooled to obtain the prediction feature, and then passed through the fully connected layer to obtain the model's prediction result Xresult (prediction score for each angle), and the prediction result is passed through the SoftMax function, multiplied by 1-180 respectively, and the model predicts the pitch angle of the image.
[0190] The embodiment of the present application uses a multimodal attention mechanism, which is not limited to the extraction of pitch angle features in the image, but can also integrate rich drone information such as flight parameters and gimbal data, making the input information features richer, effectively improving the prediction effect of the network model, and thus improving the prediction accuracy of the base station antenna pitch angle. At the same time, it can get rid of the cumbersome process of manually climbing the tower and using a slope meter for manual measurement. Not only is the effect significant, it can save costs and improve work efficiency, but it also greatly reduces the risk and uncertainty of climbing the tower caused by manual operation.
[0191] Next, combine Figure 8 The training process of the pitch angle prediction model and the pitch angle prediction process are described in detail.
[0192] like Figure 8 As shown, the process may include:
[0193] 1. Preprocess the images and drone parameters and create a data set. Crop and downsample the pitch angle images taken by the drone into 224×224 pixel images and perform pixel normalization.
[0194] 2. One-hot encode the drone flight data and gimbal data.
[0195] 3. Pair the images taken by the drone with the drone data one by one, analyze them manually, and mark the pitch angle data as the real label. At the same time, all the data can be divided into training set, validation set and test set according to 8:1:1. Among them, the real label is the angle value of 1-180.
[0196] At the same time, MSE can be selected as the evaluation index of pitch angle prediction, and the specific calculation formula can be:
[0197] MSE=(y true -y predict ) 2
[0198] Among them, y true is the actual pitch angle value, y predict is the pitch angle value predicted by the model.
[0199] 4. Construct image feature extraction module, multimodal feature extraction module and pitch angle prediction module. At the same time, it can include feature mapping blocks for processing drone data.
[0200] (1) Construct an image feature extraction module, which is mainly composed of patch partitioning, patch merging and Swin layer. Patch partitioning and patch merging are used to reduce the size of the image and increase the number of channels of the image. The Swin layer is used to extract the feature information of the image. Input image (H, W are the height and width of the input image respectively) First, it is sent to the patch division and implemented using convolution with a stride of 4 and a kernel of 4.
[0201] Several cascaded Swin layers extract image features. The Swin layer is implemented based on Transformer and uses a moving window mechanism to reduce the amount of self-attention calculation in Transformer. Each Swin layer divides the input feature map into a window of fixed size and performs self-attention calculation inside the window. By moving the window, the amount of self-attention calculation can be reduced to a linear correlation with the number of pixels in the feature map.
[0202] (2) Construct a multimodal feature extraction module, which is mainly composed of patch merging and Swin fusion layer. In the Swin fusion layer, drone data is introduced into image features.
[0203] First, the drone parameters need to be preprocessed. After the drone data is one-hot encoded, it passes through a feature fusion block consisting of two linear layers and a GELU activation function to map the number of channels of the parameter features to the same number of channels as the image features.
[0204] (3) Construct a pitch angle prediction module, which consists of an average pooling layer and a fully connected layer. The fusion features obtained by the hybrid feature extraction module are average pooled to obtain the prediction features, and then passed through the fully connected layer to obtain the final prediction result.
[0205] 5. Define the loss function, evaluation index and other training parameters. The loss function uses cross entropy loss and MSE loss. Define other training parameters. The model uses ADAM optimizer with 3 parameters β1=0.9, β2=0.999, ε=10 -8 The initial learning rate is set to 2e -4 , a total of 1000 epochs were trained, and the learning rate was reduced to half of the original at the 500th, 800th, 900th, and 950th epochs.
[0206] 6. Training parameters, that is, using the model training data set to train the model and continuously adjusting the model parameters until the model converges to obtain the optimal model parameters.
[0207] 7. Save the updated model, that is, save the optimal model parameters, and deploy the pitch angle prediction model to apply it to the pitch angle prediction scenario.
[0208] 8. Input the image of the pitch angle to be predicted. That is, use a drone to take the image of the pitch angle to be predicted of the base station antenna, and at the same time obtain the flight data of the drone and input it into the pitch angle prediction model.
[0209] 9. Output the predicted antenna pitch angle. The drone parameters are processed by the feature mapping network layer, and the image of the pitch angle to be predicted is processed by the image feature extraction network layer. The cross-attention calculation is performed in the multimodal feature extraction network layer to obtain the fusion feature. The fusion feature is averaged and pooled to obtain the prediction feature, and then passed through the fully connected layer to obtain the model's prediction result Xresult (prediction score for each angle). The prediction result is passed through the SoftMax function and multiplied by 1-180 respectively, and the model predicts the pitch angle of the image.
[0210] The pitch angle prediction model training method of the base station antenna provided in the embodiment of the present application obtains model training samples, and the model training samples include: the pitch angle image of the base station antenna taken by the drone, the drone coding parameters corresponding to the drone parameters when the drone takes the pitch angle image, and the real pitch angle label. The model training samples are input into the pitch angle prediction model to be trained, and the pitch angle prediction model to be trained includes: a feature mapping network layer, an image feature extraction network layer, a multimodal feature extraction network layer, and a pitch angle prediction network layer. The feature mapping network layer is called to perform feature mapping processing on the drone coding parameters respectively to obtain drone features. The image feature extraction network layer is called to extract features from the pitch angle image to obtain image features. The multimodal feature extraction network layer is called to perform cross-attention calculation on the drone features and the image features to obtain fused features. The pitch angle prediction network layer is called to process the fused features to obtain the pitch angle prediction result corresponding to the pitch angle image. When the loss value calculated based on the real pitch angle label and the pitch angle prediction result is within the preset range, the trained pitch angle prediction model to be trained is used as the final pitch angle prediction model for predicting the pitch angle of the base station antenna. The embodiment of the present application uses the self-attention mechanism of multimodal feature fusion and moving window, which is not only limited to the extraction of pitch angle features in the image, but also can integrate rich drone information such as flight parameters and gimbal data, so that the input information features are richer, which can reduce the calculation cost of the model, thereby improving the prediction accuracy of the base station antenna pitch angle and the reasoning speed and real-time effect of the model. At the same time, it can get rid of the cumbersome process of manually climbing the tower and using the incline meter for manual measurement in the past, which not only has significant effects, can save costs and improve work efficiency, but also greatly reduces the risks and uncertainties of climbing the tower caused by manual operation.
[0211] Reference Fig. 9 , shows a schematic diagram of the structure of a base station antenna elevation angle prediction model training device provided in an embodiment of the present application, such as Fig. 9 As shown, the base station antenna elevation angle prediction model training device 900 may include the following modules:
[0212] The model sample acquisition module 910 is used to acquire a model training sample, wherein the model training sample includes: a pitch angle image of a base station antenna taken by a drone, drone encoding parameters corresponding to drone parameters of the drone when taking the pitch angle image, and a real pitch angle label;
[0213] A model sample input module 920, used to input the model training sample into a pitch angle prediction model to be trained, wherein the pitch angle prediction model to be trained includes: a feature mapping network layer, an image feature extraction network layer, a multimodal feature extraction network layer and a pitch angle prediction network layer;
[0214] The drone feature acquisition module 930 is used to call the feature mapping network layer to perform feature mapping processing on the drone encoding parameters to obtain drone features;
[0215] An image feature acquisition module 940 is used to call the image feature extraction network layer to extract features from the pitch angle image to obtain image features;
[0216] A fusion feature acquisition module 950 is used to call the multimodal feature extraction network layer to perform cross-attention calculation on the drone feature and the image feature to obtain a fusion feature;
[0217] A prediction result acquisition module 960 is used to call the pitch angle prediction network layer to process the fusion feature to obtain a pitch angle prediction result corresponding to the pitch angle image;
[0218] The prediction model acquisition module 970 is used to obtain the final pitch angle prediction model for predicting the pitch angle of the base station antenna when the loss value calculated based on the pitch angle prediction result indicates that the pitch angle prediction model to be trained has converged.
[0219] Optionally, the model sample acquisition module includes:
[0220] A drone parameter acquisition unit, used to acquire the pitch angle images of the base station antenna taken by the drone at different angles and drone parameters corresponding to the drone, wherein the drone parameters include: flight parameters of the drone and pan / tilt data of the pan / tilt corresponding to the drone;
[0221] A coding parameter acquisition unit, used for performing one-hot coding processing on the drone parameters to obtain the drone coding parameters;
[0222] The model sample construction unit is used to construct the model training sample based on the pitch angle image, the UAV encoding parameter and the real pitch angle label corresponding to the pitch angle image.
[0223] Optionally, the image feature extraction network layer includes: an image block division layer, a plurality of cascaded first Swin layers, an image block merging layer and a plurality of cascaded second Swin layers,
[0224] The image feature acquisition module comprises:
[0225] An image block feature acquisition unit, used for calling the image block division layer to process the pitch angle image to obtain image block features;
[0226] A first feature acquisition unit is used to call the first Swin layer to process the image block feature using a self-attention mechanism of a moving window to obtain a first image feature corresponding to the image block feature;
[0227] a merge feature acquisition unit, configured to call the image block merging layer to perform a merging process on the first image feature to obtain an image block merging feature;
[0228] The image feature acquisition unit is used to call the second Swin layer to use the self-attention mechanism of the moving window to extract the features of the image block merging features to obtain the image features.
[0229] Optionally, the feature mapping network layer includes: a first feature mapping block and a second feature mapping block, wherein the first feature mapping block and the second feature mapping block have different dimensions.
[0230] The drone feature acquisition module includes:
[0231] A first UAV feature acquisition unit, configured to call the first feature mapping block to perform feature mapping processing on the UAV encoding parameters to obtain UAV features of a first dimension;
[0232] A second UAV feature acquisition unit, configured to call the second feature mapping block to perform feature mapping processing on the UAV encoding parameters to obtain UAV features of a second dimension;
[0233] The drone feature acquisition unit is used to use the drone features of the first dimension and the drone features of the second dimension as the drone features.
[0234] Optionally, the multimodal feature extraction network layer includes: a first image block merging layer, a plurality of cascaded first Swin fusion layers, a second image block merging layer and a plurality of cascaded second Swin fusion layers,
[0235] The fusion feature acquisition module includes:
[0236] A first merge feature acquisition unit, configured to call the first image block merging layer to perform a merging process on the image features to obtain a first image block merging feature;
[0237] an initial fusion feature acquisition unit, configured to call the first Swin fusion layer to perform feature fusion on the first image block merged feature and the drone feature of the first dimension to obtain an initial fusion feature;
[0238] A second merge feature acquisition unit, configured to call the second image block merge layer to merge the initial fusion features to obtain a second image block merge feature;
[0239] The fusion feature acquisition unit is used to call the second Swin fusion layer to perform feature fusion on the second image block merged feature and the second dimension of the drone feature to obtain the fusion feature.
[0240] Optionally, the pitch angle prediction network layer includes: an average pooling layer and a fully connected layer,
[0241] The prediction result acquisition module comprises:
[0242] A prediction feature acquisition unit, used for calling the average pooling layer to perform downsampling processing on the fusion feature to obtain a prediction feature;
[0243] A prediction probability acquisition unit, used for calling the fully connected layer to perform feature mapping processing on the prediction feature to obtain prediction scores of the pitch angle image at different pitch angles;
[0244] The predicted pitch angle acquisition unit is used to process the predicted score based on the SoftMax function to obtain the predicted probability corresponding to the pitch angle image.
[0245] Optionally, the prediction model acquisition module includes:
[0246] A cross entropy loss calculation unit, configured to calculate a cross entropy loss value based on the predicted score and the true pitch angle label;
[0247] A mean square error loss calculation unit, configured to calculate a mean square error loss value based on the predicted probability and the true pitch angle label;
[0248] A prediction model acquisition unit is used to obtain the pitch angle prediction model when the cross entropy loss value and the mean square error loss value indicate that the pitch angle prediction model to be trained has converged.
[0249] The pitch angle prediction model training device for the base station antenna provided in the embodiment of the present application obtains model training samples, and the model training samples include: the pitch angle image of the base station antenna taken by the drone, the drone encoding parameters corresponding to the drone parameters when the drone takes the pitch angle image, and the real pitch angle label. The model training samples are input into the pitch angle prediction model to be trained, and the pitch angle prediction model to be trained includes: a feature mapping network layer, an image feature extraction network layer, a multimodal feature extraction network layer, and a pitch angle prediction network layer. The feature mapping network layer is called to perform feature mapping processing on the drone encoding parameters respectively to obtain drone features. The image feature extraction network layer is called to perform feature extraction on the pitch angle image to obtain image features. The multimodal feature extraction network layer is called to perform cross-attention calculation on the drone features and the image features to obtain fused features. The pitch angle prediction network layer is called to process the fused features to obtain the pitch angle prediction result corresponding to the pitch angle image. When the loss value calculated based on the real pitch angle label and the pitch angle prediction result is within the preset range, the trained pitch angle prediction model to be trained is used as the final pitch angle prediction model for predicting the pitch angle of the base station antenna. The embodiment of the present application uses the self-attention mechanism of multimodal feature fusion and moving window, which is not only limited to the extraction of pitch angle features in the image, but also can integrate rich drone information such as flight parameters and gimbal data, so that the input information features are richer, which can reduce the calculation cost of the model, thereby improving the prediction accuracy of the base station antenna pitch angle and the reasoning speed and real-time effect of the model. At the same time, it can get rid of the cumbersome process of manually climbing the tower and using the incline meter for manual measurement in the past, which not only has significant effects, can save costs and improve work efficiency, but also greatly reduces the risks and uncertainties of climbing the tower caused by manual operation.
[0250] An embodiment of the present application also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the above-mentioned base station antenna pitch angle prediction model training method.
[0251] Fig.10 FIG. 1 is a schematic diagram showing the structure of an electronic device 1000 according to an embodiment of the present invention. Fig.10As shown, the electronic device 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 1002 or computer program instructions loaded from a storage unit 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the electronic device 1000 can also be stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0252] Multiple components in the electronic device 1000 are connected to the I / O interface 1005, including: an input unit 1006, such as a keyboard, a mouse, a microphone, etc.; an output unit 1007, such as various types of displays, speakers, etc.; a storage unit 1008, such as a disk, an optical disk, etc.; and a communication unit 1009, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1009 allows the electronic device 1000 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0253] The various processes and processing described above may be performed by the processing unit 1001. For example, the method of any of the above embodiments may be implemented as a computer software program, which is tangibly contained in a computer-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded into the RAM 1003 and executed by the CPU 1001, one or more actions in the method described above may be performed.
[0254] In addition, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned base station antenna elevation angle prediction model training method.
[0255] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0256] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0257] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminals (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0258] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0259] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal so that a series of operating steps are executed on the computer or other programmable terminal to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0260] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0261] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or terminal including the elements.
[0262] The above is a detailed introduction to a base station antenna pitch angle prediction model training method, a base station antenna pitch angle prediction model training device, an electronic device and a computer-readable storage medium provided in the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for training a base station antenna elevation angle prediction model, characterized in that: The method comprises: Acquire a model training sample, wherein the model training sample includes: a pitch angle image of a base station antenna taken by a drone, drone encoding parameters corresponding to drone parameters of the drone when taking the pitch angle image, and a real pitch angle label; Inputting the model training samples into a pitch angle prediction model to be trained, wherein the pitch angle prediction model to be trained comprises: a feature mapping network layer, an image feature extraction network layer, a multimodal feature extraction network layer and a pitch angle prediction network layer; Calling the feature mapping network layer to perform feature mapping processing on the drone encoding parameters to obtain drone features; Calling the image feature extraction network layer to perform feature extraction on the pitch angle image to obtain image features; Calling the multimodal feature extraction network layer to perform cross-attention calculation on the drone feature and the image feature to obtain a fusion feature; Calling the pitch angle prediction network layer to process the fusion feature to obtain a pitch angle prediction result corresponding to the pitch angle image; When the loss value calculated based on the elevation angle prediction result indicates that the to-be-trained elevation angle prediction model has converged, the final elevation angle prediction model for predicting the elevation angle of the base station antenna is obtained.
2. The method according to claim 1, characterized in that The obtaining of model training samples comprises: Acquire the pitch angle images of the base station antenna taken by the drone at different angles and the drone parameters corresponding to the drone, wherein the drone parameters include: the flight parameters of the drone and the pan / tilt data of the pan / tilt corresponding to the drone; One-hot encoding is performed on the drone parameters to obtain the drone encoding parameters; The model training sample is constructed based on the pitch angle image, the UAV encoding parameters and the real pitch angle label corresponding to the pitch angle image.
3. The method according to claim 1, characterized in that The image feature extraction network layer includes: an image block division layer, a plurality of cascaded first Swin layers, an image block merging layer and a plurality of cascaded second Swin layers, The calling of the image feature extraction network layer to extract features from the pitch angle image to obtain image features includes: Calling the image block division layer to process the pitch angle image to obtain image block features; Calling the first Swin layer to process the image block feature using a self-attention mechanism of a moving window to obtain a first image feature corresponding to the image block feature; Calling the image block merging layer to perform merging processing on the first image features to obtain image block merging features; The second Swin layer is called to process the image block merging features using a moving window self-attention mechanism to obtain the image features.
4. The method according to claim 1, characterized in that The feature mapping network layer includes: a first feature mapping block and a second feature mapping block, wherein the dimensions of the first feature mapping block and the second feature mapping block are different, The calling of the feature mapping network layer to perform feature mapping processing on the drone encoding parameters to obtain drone features includes: Calling the first feature mapping block to perform feature mapping processing on the drone encoding parameters to obtain drone features of a first dimension; Calling the second feature mapping block to perform feature mapping processing on the drone encoding parameters to obtain drone features of a second dimension; The drone features of the first dimension and the drone features of the second dimension are used as the drone features.
5. The method according to claim 4, characterized in that The multimodal feature extraction network layer includes: a first image block merging layer, a plurality of cascaded first Swin fusion layers, a second image block merging layer and a plurality of cascaded second Swin fusion layers, The calling of the multimodal feature extraction network layer to perform cross-attention calculation on the drone feature and the image feature to obtain a fusion feature includes: Calling the first image block merging layer to merge the image features to obtain a first image block merged feature; Calling the first Swin fusion layer to perform feature fusion on the first image block merge feature and the drone feature of the first dimension to obtain an initial fusion feature; Calling the second image block merging layer to merge the initial fusion features to obtain second image block merging features; The second Swin fusion layer is called to perform feature fusion on the second image block merge feature and the drone feature of the second dimension to obtain the fused feature.
6. The method according to claim 1, characterized in that The pitch angle prediction network layer includes: an average pooling layer and a fully connected layer, The calling the pitch angle prediction network layer to process the fusion feature to obtain a pitch angle prediction result corresponding to the pitch angle image includes: Calling the average pooling layer to downsample the fused features to obtain prediction features; Calling the fully connected layer to perform feature mapping processing on the prediction feature to obtain prediction scores of the pitch angle image at different pitch angles; The prediction score is processed based on the SoftMax function to obtain the prediction probability corresponding to the pitch angle image.
7. The method according to claim 6, characterized in that The method of obtaining the final pitch angle prediction model for performing base station antenna pitch angle prediction when the loss value calculated based on the pitch angle prediction result indicates that the to-be-trained pitch angle prediction model has converged comprises: Based on the predicted score and the true pitch angle label, a cross entropy loss value is calculated; Based on the predicted probability and the true pitch angle label, a mean square error loss value is calculated; When the cross entropy loss value and the mean square error loss value indicate that the pitch angle prediction model to be trained has converged, the pitch angle prediction model is obtained.
8. A base station antenna pitch angle prediction model training device, characterized in that: The device comprises: A model sample acquisition module is used to acquire model training samples, wherein the model training samples include: a pitch angle image of a base station antenna taken by a drone, drone encoding parameters corresponding to drone parameters of the drone when taking the pitch angle image, and a real pitch angle label; A model sample input module, used for inputting the model training sample into a pitch angle prediction model to be trained, wherein the pitch angle prediction model to be trained comprises: a feature mapping network layer, an image feature extraction network layer, a multimodal feature extraction network layer and a pitch angle prediction network layer; A drone feature acquisition module is used to call the feature mapping network layer to perform feature mapping processing on the drone encoding parameters to obtain drone features; An image feature acquisition module, used for calling the image feature extraction network layer to extract features from the pitch angle image to obtain image features; A fusion feature acquisition module, used for calling the multimodal feature extraction network layer to perform cross-attention calculation on the drone feature and the image feature to obtain a fusion feature; A prediction result acquisition module, used for calling the pitch angle prediction network layer to process the fusion feature to obtain a pitch angle prediction result corresponding to the pitch angle image; The prediction model acquisition module is used to obtain the final pitch angle prediction model for predicting the pitch angle of the base station antenna when the loss value calculated based on the pitch angle prediction result indicates that the pitch angle prediction model to be trained has converged.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the elevation angle prediction model training method for a base station antenna according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the base station antenna elevation angle prediction model training method described in any one of claims 1 to 7.