Base station screening method and system based on dynamic threshold and deep learning

By calculating the standard deviation and dynamic threshold of base station communication data, and screening non-line-of-sight base stations in combination with deep learning models, the problem of low base station positioning accuracy in livestock and poultry breeding is solved, and precise supervision of livestock and poultry position and movement information is achieved.

CN120417023AInactive Publication Date: 2025-08-01南宁桂电电子科技研究院有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510741125.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-08-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In livestock and poultry breeding, the existing technology lacks effective judgment on whether the base station is in a non-line-of-sight state, resulting in low accuracy of wireless positioning results and it is difficult to achieve accurate supervision of livestock and poultry.

Method used

By obtaining the communication data between the base station and the positioning terminal, calculating the data standard deviation and dynamic threshold, filtering out the suspicious base stations, and converting them into image data input pre-trained deep learning line-of-sight state detection model, to determine whether the base station is in a non-line-of-sight state.

Benefits of technology

It improves the accuracy of biological positioning results, eliminates communication data from abnormal base stations, and retains data with small propagation errors, real-time and accurate acquisition of livestock and poultry location and movement information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120417023A_ABST
    Figure CN120417023A_ABST
Patent Text Reader

Abstract

The invention relates to a base station screening method and system based on a dynamic threshold value and deep learning, and the method comprises the steps: obtaining communication data of a plurality of base stations according to the positioning communication between the plurality of base stations and a positioning terminal; the positioning terminal is used for outputting positioning information of the positioning terminal carried by a target object; obtaining a data standard deviation and a dynamic threshold value of a plurality of base station combinations according to the communication data of the plurality of base stations; obtaining a suspicious base station according to the data standard deviation and the dynamic threshold; converting the base station communication data of the suspicious base station into image data; and inputting the image data into a pre-trained deep learning line-of-sight state detection model to obtain an abnormal base station in a non-line-of-sight state. Therefore, the user can conveniently screen the base station communication data according to the abnormal base station so as to eliminate the base station communication data of the abnormal base station and reserve the base station communication data with small propagation error, thereby improving the accuracy of a biological positioning result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of base station screening, and particularly to a base station screening method and system based on dynamic threshold and deep learning. Background Art

[0002] In the modern livestock and poultry breeding industry, achieving precise supervision of livestock and poultry is crucial for improving breeding efficiency, ensuring animal health, and optimizing breeding management. Traditional livestock and poultry breeding supervision methods mostly rely on manual inspections, which not only consume a large amount of manpower and time but also make it difficult to obtain the location and movement information of livestock and poultry in real time and accurately. With the development of the Internet of Things technology, wireless positioning technology has gradually been applied to the livestock and poultry breeding field, but it faces many challenges in practical applications.

[0003] The livestock and poultry breeding environment is complex, and there are a large number of buildings, breeding facilities, and livestock and poultry themselves in the breeding farm, which will seriously interfere with the propagation of wireless signals. The non-line-of-sight (NLOS) propagation problem is particularly prominent. NLOS means that when the signal propagation path between the base station and the positioning terminal used for biological positioning is blocked by obstacles, it will increase the error of the propagation data, resulting in a large deviation in the positioning result. However, the existing technology lacks technical means to judge whether the base station is in the non-line-of-sight state, resulting in the technical defect of low accuracy of the biological positioning result obtained through the base station. Summary of the Invention

[0004] Based on this, the purpose of the present application is to provide a base station screening method and system based on dynamic threshold and deep learning, which can overcome the deficiencies of the existing technology.

[0005] In order to achieve the above purpose, the technical solution adopted by the present application is as follows:

[0006] The first embodiment of the present application provides a base station screening method based on dynamic threshold and deep learning, including:

[0007] According to the positioning communication between multiple base stations and the positioning terminal, multiple base station communication data are obtained; the positioning terminal is used to output the positioning information of the positioning terminal carried by the target object;

[0008] According to the multiple base station communication data, the data standard deviation and dynamic threshold of multiple base station combinations are obtained;

[0009] According to the data standard deviation and the dynamic threshold, suspicious base stations are obtained;

[0010] Convert the base station communication data of the suspicious base stations into image data;

[0011] Input the image data into a pre-trained deep learning line-of-sight state detection model to obtain abnormal base stations in the non-line-of-sight state.

[0012] Compared with the traditional technology, the beneficial effects of the present application are as follows:

[0013] The base station screening method based on dynamic threshold and deep learning of the present application obtains the data standard deviation and dynamic threshold of the base station according to the base station communication data, then obtains the suspicious base stations according to the data standard deviation and dynamic threshold, and then converts the base station communication data of the suspicious base stations into image data and inputs it into a pre-trained deep learning line-of-sight state detection model to determine whether the suspicious base station is an abnormal base station in a non-line-of-sight state. The base station communication data can be screened according to the abnormal base stations to eliminate the base station communication data of the abnormal base stations and retain the base station communication data with small propagation errors, thereby improving the accuracy of the biological positioning result.

[0014] As an implementation manner, the step of obtaining the data standard deviation and dynamic threshold of multiple base station combinations according to the multiple base station communication data includes:

[0015] Obtain the data standard deviation of the corresponding base station according to the multiple base station communication data and a preset standard deviation calculation formula;

[0016] Obtain the dynamic threshold of the base station according to the data mean of the multiple base station communication data, the data standard deviation, and the environmental complexity parameter.

[0017] In this embodiment, according to the multiple base station communication data in the base station communication data, the data standard deviation and dynamic threshold of the corresponding base station can be obtained efficiently and accurately.

[0018] As an implementation manner, the step of obtaining the data standard deviation of the corresponding base station according to the multiple base station communication data and a preset standard deviation calculation formula includes:

[0019] Obtain the data standard deviation through the following formula: ;

[0020] Wherein, is the data standard deviation, is the total number of the base stations; is the th base station communication data; is the data mean of the multiple base station communication data of the same base station communication data; dividing the sum of squares by is the Bessel correction operation in the sample standard deviation calculation, aiming to unbiasedly estimate the population standard deviation.

[0021] In this embodiment, through the above formula, the data standard deviation of the base station can be accurately obtained.

[0022] As an implementation manner, the step of obtaining the dynamic threshold of the base station according to the data mean value, the data standard deviation, and the environmental complexity parameter of the communication data of the multiple base stations includes:

[0023] Obtain the dynamic threshold through the following formula: ;

[0024] where, is the dynamic threshold, is the data mean value, is the environmental complexity parameter, is the data standard deviation.

[0025] In this embodiment, through the above formula, the dynamic threshold of the base station can be accurately obtained.

[0026] As an implementation manner, the step of obtaining the suspicious base station according to the data standard deviation and the dynamic threshold includes:

[0027] Determine the base stations in the base station combination where the data standard deviation is greater than the dynamic threshold as the suspicious base stations.

[0028] In this embodiment, by comparing the data standard deviation and the dynamic threshold, it can be quickly determined whether the base station corresponding to the data is a suspicious base station.

[0029] As an implementation manner, the base station communication data includes the signal arrival time sequence, the signal strength, and the communication distance between the base station and the positioning terminal;

[0030] The step of converting the base station communication data of the suspicious base station into image data includes:

[0031] Use the short-time Fourier transform method to convert the signal arrival time sequence into a time-frequency spectrogram;

[0032] Obtain a signal heat map according to the signal strength and the communication distance;

[0033] Generate three-channel image data according to the time-frequency spectrogram, the signal heat map, and the environmental parameter mask of the communication environment.

[0034] In this embodiment, according to the time-frequency spectrogram, the signal heat map, and the environmental parameter mask, three-channel image data including signal time-series characteristics, signal strength characteristics, and environmental characteristics can be accurately obtained.

[0035] As an implementation manner, the deep learning line-of-sight state detection model includes an input layer, a feature extraction module, a feature fusion module, and an output layer;

[0036] The step of inputting the image data into a pre-trained deep learning line-of-sight state detection model to obtain abnormal base stations in a non-line-of-sight state includes:

[0037] Input the image data through the input layer, and perform feature extraction processing on the image data through the feature extraction module to obtain multiple image features;

[0038] Perform fusion processing on the multiple image features through the feature fusion module to obtain a fusion feature;

[0039] Perform activation processing on the fusion feature through the output layer to obtain a base station line-of-sight state detection result;

[0040] Determine the base stations with a non-line-of-sight state in the base station line-of-sight state detection result as the abnormal base stations.

[0041] In this embodiment, through the input layer, feature extraction module, feature fusion module, and output layer of the deep learning line-of-sight state detection model, the base station line-of-sight state detection result can be accurately obtained.

[0042] The second embodiment of the present application provides a base station screening system based on dynamic thresholds and deep learning, including:

[0043] A communication data acquisition module, configured to obtain multiple base station communication data according to the positioning communication between multiple base stations and a positioning terminal; the positioning terminal is used to output the positioning information of the positioning terminal carried by the target object;

[0044] A data processing module, configured to obtain the data standard deviation and dynamic threshold of multiple base station combinations according to the multiple base station communication data;

[0045] A suspicious base station acquisition module, configured to acquire suspicious base stations according to the data standard deviation and the dynamic threshold;

[0046] An image data acquisition module, configured to convert the base station communication data of the suspicious base station into image data;

[0047] An abnormal base station acquisition module, configured to input the image data into a pre-trained deep learning line-of-sight state detection model to obtain abnormal base stations in a non-line-of-sight state.

[0048] Compared with the traditional technology, the beneficial effects of the present application are:

[0049] The base station screening system based on dynamic threshold and deep learning of the present application obtains the data standard deviation and dynamic threshold of the base station according to the base station communication data, and then obtains the suspicious base stations according to the data standard deviation and dynamic threshold. Then, the base station communication data of the suspicious base stations is converted into image data and input into the pre-trained deep learning line-of-sight state detection model to determine whether the suspicious base station is an abnormal base station in the non-line-of-sight state. The base station communication data can be screened according to the abnormal base stations to eliminate the base station communication data of the abnormal base stations and retain the base station communication data with small propagation errors, thereby improving the accuracy of the biological positioning result.

[0050] For better understanding and implementation, the present application will be described in detail below with reference to the accompanying drawings. Brief Description of the Drawings

[0051] Figure 1 It is a step diagram of the base station screening method based on dynamic threshold and deep learning according to an embodiment of the present application;

[0052] Figure 2 It is a module flowchart of the base station screening method based on dynamic threshold and deep learning according to an embodiment of the present application;

[0053] Figure 3 It is a flowchart of data collection and preprocessing of the base station screening method based on dynamic threshold and deep learning according to an embodiment of the present application;

[0054] Figure 4 It is a standard deviation processing flowchart of the base station screening method based on dynamic threshold and deep learning according to an embodiment of the present application;

[0055] Figure 5 It is a schematic diagram of adjusting the environmental complexity parameters of the base station screening method based on dynamic threshold and deep learning according to an embodiment of the present application;

[0056] Figure 6 It is a schematic diagram of the model structure of the CNN model of the base station screening method based on dynamic threshold and deep learning according to an embodiment of the present application;

[0057] Figure 7 It is a schematic diagram of module connection of the base station screening method based on dynamic threshold and deep learning according to an embodiment of the present application.

[0058] 10. Communication data acquisition module; 20. Data processing module; 30. Suspicious base station acquisition module; 40. Image data acquisition module; 50. Abnormal base station acquisition module. Detailed Embodiments

[0059] To make the objectives, technical solutions, and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0060] It should be clear that the described embodiments are only a part of the embodiments of this application, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts belong to the scope protected by the embodiments of this application.

[0061] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. In the description of this application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and do not have to be used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances. The singular forms "a", "the", and "said" used in this application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. The word "if" / "when" used herein can be interpreted as "when...", "while...", or "in response to a determination".

[0062] In addition, in the description of this application, unless otherwise specified, "a plurality of" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0063] Please refer to Figure 1 , Figure 1 is a step diagram of the base station screening method based on dynamic threshold and deep learning in the first embodiment of this application, Figure 2 is a module flowchart of the base station screening method based on dynamic threshold and deep learning in the first embodiment of this application. The method includes:

[0064] S1: Obtain a plurality of base station communication data according to the positioning communication between a plurality of base stations and a positioning terminal; the positioning terminal is used to output the positioning information of the target object.

[0065] Please refer to Figure 3 , step S1 includes:

[0066] S101: The data is collected in real - time with a data sampling rate of 10Hz. The transmission protocol uses low - latency transmission based on LoRaWAN or Wi - Fi 6 to ensure data real - time. The three - dimensional coordinates and their confidence levels of the positioning are obtained from the real - time output of the positioning terminal, and the confidence interval is between 90% and 99%. The signal strength (RSSI) is obtained from the radio frequency signal receiver, with a dynamic range from - 120dBm to - 40dBm. The time of arrival (TOA) of the signal is collected from the high - precision clock synchronization module. Finally, the environmental interference parameters are collected, including the metal fence reflection coefficient (0.5 - 0.9) and the animal activity density (the number of moving objects per unit area, monitored by an infrared sensor).

[0067] S102: The improved 3σ criterion is used to detect and remove outliers from the collected data. First, calculate the mean of the data and the original standard deviation . Then, adjust the standard deviation calculation by combining the environmental interference weight. The calculation formula is , where is the adjusted standard deviation, which is only used for outlier judgment in this step, is the scene mode coefficient, set by the user. For example, in the free - range mode, α = 0.3, and in the pen - housing mode, α = 0.7. When the data exceeds the interval, it is regarded as an outlier and the data is removed.

[0068] S103: Normalize the signal strength and time of arrival in the base - station communication data. The data of signal strength (RSSI) and time of arrival (TOA) uses the Min - Max normalization method, ; The positioning coordinate data uses Z - Score normalization to eliminate the dimensional differences of different base stations, .

[0069] The target object can be animals, such as chickens, ducks, geese, pigs, cows, sheep, etc.

[0070] S2: Based on the multiple base - station communication data, obtain the data standard deviation and dynamic threshold of multiple base - station combinations.

[0071] Assume that there are K (K≥4) base stations in the scene. Select K - 1 base stations to participate in the positioning of the positioning terminal simultaneously. Then there are kinds of base - station combination methods.

[0072] Please refer to Figure 4 , Step S2 can use the Spark distributed framework to process the data standard deviation. The steps are as follows:

[0073] S211. Split the combined base stations into N×512 data blocks (N is the number of computing nodes), and each data block contains / (N×512) combinations; Set up dynamic load balancing, and adjust the task assignment in real time according to the number of CPU cores and memory occupancy rate of the nodes. High-performance nodes (such as 16-core CPU and 64GB memory) are assigned 1.5 times the average task volume; Low-performance nodes (such as 4-core CPU and 16GB memory) are assigned 0.8 times the average task volume;

[0074] S212. Every time 10% of the computing amount is completed, automatically persist the intermediate results (standard deviation list, task progress) to HDFS in the format of Parquet columnar storage, and set checkpoints;

[0075] S213. When a node fails, the task is automatically reassigned to healthy nodes and the calculation is resumed from the nearest checkpoint; Reconstruct the lost data blocks through the RDD lineage to ensure the integrity of the calculation.

[0076] S214: Obtain the standard deviation of the data through the following formula: ;

[0077] Among them, is the standard deviation of the data, is the total number of the base stations; is the th base station communication data; is the data mean of the multiple base station communication data of the same base station communication data, ; The sum of squares in the formula is divided by is the Bessel correction operation in the sample standard deviation calculation, aiming to unbiasedly estimate the population standard deviation.

[0078] S215: The Map stage is the process in Spark distributed computing of splitting the input data set into small data blocks and having each computing node process the data blocks in parallel. In this stage, each computing node independently processes the assigned data blocks and uses vectorized computing (SIMD instruction set) to accelerate, with a 40% increase in the single-node computing speed;

[0079] S216: The Reduce stage is the process in Spark distributed computing of merging and processing the intermediate results generated by each node in the Map stage. In this stage, summarize the standard deviation calculation results of all nodes, generate a global standard deviation list, and avoid duplicate calculations through the hash merge strategy.

[0080] S3: Obtain the suspicious base stations according to the data standard deviation and the dynamic threshold.

[0081] S4: Convert the base station communication data of the suspected base station into image data.

[0082] S5: Input the image data into a pre-trained deep learning LOS state detection model to obtain abnormal base stations in the non-LOS state.

[0083] Compared with the traditional technology, the beneficial effects of this application are:

[0084] The base station screening method based on dynamic threshold and deep learning in this application obtains the data standard deviation and dynamic threshold of the base station according to the base station communication data, then obtains the suspected base stations according to the data standard deviation and dynamic threshold, and then converts the base station communication data of the suspected base stations into image data and inputs it into a pre-trained deep learning LOS state detection model to determine whether the suspected base station is an abnormal base station in the non-LOS state. The base station communication data can be screened according to the abnormal base stations to eliminate the base station communication data of the abnormal base stations and retain the base station communication data with small propagation errors, thereby improving the accuracy of the biological positioning result.

[0085] As an implementation manner, the step of S2: obtaining the data standard deviation and dynamic threshold of multiple base station combinations according to the multiple base station communication data includes:

[0086] S21: Obtain the data standard deviation of the corresponding base station according to the multiple base station communication data and a preset standard deviation calculation formula.

[0087] S22: Obtain the dynamic threshold of the base station according to the data mean of the multiple base station communication data, the data standard deviation, and the environmental complexity parameter.

[0088] In this embodiment, according to the multiple base station communication data in the base station communication data, the data standard deviation and dynamic threshold of the corresponding base station can be obtained efficiently and accurately.

[0089] As an implementation manner, the step of S21: obtaining the data standard deviation of the corresponding base station according to the multiple base station communication data and a preset standard deviation calculation formula includes:

[0090] In this embodiment, through the above formula, the data standard deviation of the base station can be accurately obtained.

[0091] As an implementation manner, the step of S22: obtaining the dynamic threshold of the base station according to the data mean of the multiple base station communication data, the data standard deviation, and the environmental complexity parameter includes:

[0092] Obtain the dynamic threshold through the following formula: ;

[0093] Where, is the dynamic threshold, is the data mean, is a complex parameter of the environment, is the standard deviation of the data.

[0094] See also Figure 5 , The value range is usually between 0.5 and 2. The value is set to 1. If the environmental interference is serious, the next time the For example, it can be adjusted through an adaptive adjustment mechanism, such as dynamically adjusting the false positive rate (FPR) of the deep learning verification module. , which is calculated as FPR = (number of base stations misjudged as non-line-of-sight status / total number of base stations participating in the verification) × 100%:

[0095] When FPR>8%, increase the next To increase screening stringency: , where 𝛼=0.5 is the adjustment rate factor;

[0096] When FPR is less than 8%, reduce the next To increase screening stringency: .

[0097] In this embodiment, the dynamic threshold of the base station can be accurately obtained through the above formula.

[0098] As an embodiment, the step of S3: obtaining a suspicious base station according to the data standard deviation and the dynamic threshold value includes:

[0099] The base stations in the base station combination whose data standard deviation is greater than the dynamic threshold are determined as the suspicious base stations.

[0100] Among them, there are K (K≥4) base stations in the scene, and K-1 base stations are selected to participate in tag Positioning, then there is Taking the base station combination as an example, If a group of base stations in the base station combination is not blocked, then the The positioning estimates of the base station combination are all equal to the real coordinates of the tag and the standard deviation of the estimate is 0; if a base station in the group If blocked, the distance measurement value will have a positive deviation; traversing the group There will be random deviations in the positioning estimation of the combination of base stations including the blocked base stations. Therefore, if a base station in the group If the The standard deviation of the positioning estimation of this base station combination is not 0.

[0101] Divide K (K≥4) base stations into groups, and statistically analyze the standard deviation of the tag positioning estimation for each group of K-1 base stations. If the standard deviation of each group is less than the threshold (measured when the base stations are unobstructed), then no base station is obstructed; otherwise, among all combinations, only one combination (the combination that does not include the obstructed base station) has the smallest standard deviation of the positioning estimation, that is, the group of base stations including the obstructed base station is searched out to obtain the suspicious base station.

[0102] In this embodiment, by comparing the data standard deviation and the dynamic threshold, it can be quickly determined whether the base station corresponding to the data is a suspicious base station.

[0103] As an implementation manner, the base station communication data includes the signal arrival time sequence, the signal strength, and the communication distance between the base station and the positioning terminal;

[0104] The step S4: converting the base station communication data of the suspicious base station into image data includes:

[0105] S41: Convert the signal arrival time sequence into a time-frequency spectrogram by using the short-time Fourier transform method;

[0106] Among them, the formula for converting the signal arrival time sequence into a time-frequency spectrogram by using the short-time Fourier transform method is 2 , where is the Hamming window function, the time window length is 10 ms, and the overlap rate is 50%, is the value of the signal arrival time sequence at moment, is the frequency, is the time, is the imaginary unit.

[0107] S42: Obtain a signal heat map according to the signal strength and the communication distance;

[0108] Among them, the signal heat map is obtained through the following formula: , where is the signal heat map, represents the base station receives the signal strength value from the positioning terminal , is the base station to the positioning terminal the square of the estimated distance.

[0109] S43: Generate three-channel image data based on the time-frequency spectrogram, the signal heat map, and the environmental parameter mask of the communication environment.

[0110] Among them, step S43 can generate a three-channel image through multi-channel fusion. Channel 1 is the time-frequency spectrogram (the gray value represents the energy intensity), channel 2 is the spatial heat map (the color depth represents the signal intensity), and channel 3 is the environmental parameter mask (the binarized mark represents the metal occlusion area); generate an image with a resolution of 64×64 pixels and a storage format of PNG. Each base station generates approximately 500 images (sampling rate of 10 Hz for 30 seconds).

[0111] In this embodiment, based on the time-frequency spectrogram, the signal heat map, and the environmental parameter mask, three-channel image data including signal timing characteristics, signal intensity characteristics, and environmental characteristics can be accurately obtained.

[0112] As an implementation manner, the deep learning LOS state detection model includes an input layer, a feature extraction module, a feature fusion module, and an output layer;

[0113] The step S5 of inputting the image data into the pre-trained deep learning LOS state detection model to obtain abnormal base stations in the non-LOS state includes:

[0114] S51: Input the image data through the input layer, and perform feature extraction processing on the image data through the feature extraction module to obtain multiple image features;

[0115] [[ID= eighteen]]S52: Perform fusion processing on the multiple image features through the feature fusion module to obtain a fusion feature;

[0116] S53: Perform activation processing on the fusion feature through the output layer to obtain the base station LOS state detection result;

[0117] S54: Determine the base stations with the base station LOS state detection result being in the non-LOS state as the abnormal base stations.

[0118] In this embodiment, through the input layer, the feature extraction module, the feature fusion module, and the output layer of the deep learning LOS state detection model, the base station LOS state detection result can be accurately obtained.

[0119] Among them, the deep learning LOS state detection model is a pre-trained CNN model. The dataset used in the pre-training of the CNN model contains data in different livestock and poultry breeding environments, such as data in different types of breeding places such as chicken coops, pig houses, and cattle sheds.

[0120] Please refer to Figure 6 , the CNN model is composed of an input layer, a feature extraction module, a feature fusion module, and an output layer;

[0121] The input layer can input a three-channel image of 64×64×3 for testing;

[0122] The feature extraction module contains two convolutional layers and two pooling layers; Convolutional layer 1 contains 32 3×3 convolutional kernels, a ReLU activation function, and the output is 62×62×32; Max pooling layer 1 contains a 2×2 window, and the output is 31×31×32; Convolutional layer 2 contains 64 3×3 convolutional kernels, a ReLU activation function, and the output is 29×29×64; Max pooling layer 2 contains a 2×2 window, and the output is 14×14×64;

[0123] In the feature fusion module, convolutional layer 3 contains 128 3×3 convolutional kernels, a ReLU activation function, and the output is 12×12×128; a global average pooling layer, and the output is a 128-dimensional feature vector; a fully connected layer contains 64 neurons, a ReLU activation function; a Dropout layer, where the dropout rate is 0.5 to prevent overfitting;

[0124] The output layer contains a sigmoid activation function, and it determines whether the base station is in the NLOS state through the NLOS probability value.

[0125] To facilitate the understanding of the technical solution of this application, it is described in combination with the modules of the example:

[0126] Data acquisition and preprocessing module:

[0127] Please refer to Figure 3 , first, data acquisition is carried out. In the pig farm, multiple positioning terminals are evenly distributed. These terminals are responsible for obtaining the positioning information of the tags worn by pigs. At the same time, radio frequency signal receivers are deployed to collect the signal strength (RSSI), and a high-precision clock synchronization module is equipped to accurately measure the time of arrival (TOA) of the signal. In addition, devices for monitoring environmental interference parameters are set up, such as monitoring the activity density of pigs per unit area through infrared sensors and measuring the reflection coefficient of the metal fence. The acquisition frequency is set to 10Hz, that is, 10 times of data are acquired per second. A low-latency transmission protocol based on Wi-Fi 6 is adopted to ensure that the data can be transmitted to the central processing system in time, reducing the impact of data transmission delay on positioning real-time performance.

[0128] Then, outlier detection and elimination are carried out. A preliminary review is carried out on the large amount of collected data, and the improved 3 criterion is combined with the environmental interference weight to identify and eliminate outliers. Since the pig farm belongs to the pen mode, the scene coefficient is set to 0.7. For example, in a set of TOA data collected during a certain period, some data differ greatly from the overall data. First, calculate the standard deviation , combined with the shielding density in the pigsty (determined by factors such as the degree of pig aggregation and the distribution of metal facilities), and calculated according to the formula Calculate the adjusted standard deviation. Among them, if a certain TOA data exceeds interval, then determine that this data is an outlier and remove it from the data set to ensure the accuracy of the subsequent calculation data.

[0129] Then perform data normalization processing. For different types of data, different normalization methods are used. For RSSI and TOA data, Min-Max standardization is used. Assuming that the value range of RSSI is between -120dBm and -40dBm, and a certain RSSI data value is x, its normalization formula is . For positioning coordinate data, Z-Score standardization is used to eliminate the dimensional difference of different base stations. If the data of a certain dimension of the positioning coordinate is x, the mean value of this dimension data is , and the standard deviation is , then its normalization formula is , so that different types of data are at the same dimensional level, which is convenient for subsequent analysis and calculation.

[0130] Parallel computing optimization module:

[0131] Please refer to Figure 4 , use the Spark distributed framework to calculate and process all base station combinations in the pig farm. Assuming that there are K base stations in the farm, groups of base station combinations are split into N×512 data blocks (here it is assumed that the number of computing nodes N = 20), and each data block contains / (N×512) combinations. According to the hardware performance of each computing node, implement a dynamic load balancing strategy. For high-performance nodes, such as nodes equipped with 16-core CPUs and 64GB of memory, allocate 1.5 times the average task volume; for low-performance nodes, such as nodes with only 4-core CPUs and 16GB of memory, allocate 0.8 times the average task volume. This can make full use of the cluster resources and improve the overall computing efficiency.

[0132] Then calculate the standard deviation. Suppose there are base stations in each base station combination. For each base station combination, we have a set of data on signal strength . For example, for a combination containing 5 base stations, its signal strength data are respectively = -80dBm, = -82dBm, = -78dBm, = -85dBm, = -81dBm. By calculating the mean value through the mean formula, the data mean value ; Then calculate the sum of squared deviations of each data point from the mean, with the formula ; For the above example, = (-80 + 81.2)2 + (-82 + 81.2)2 + (-78 + 81.2)2 + (-85 + 81.2)2 + (-81 + 81.2)2 = 1.44 + 0.64 + 10.24 + 14.44 + 0.04 = 26.8; Finally, calculate the standard deviation based on the sum of squared deviations, with the formula . For this example .

[0133] During the calculation process, every time 10% of the calculation amount is completed, the system automatically persists the intermediate results (standard deviation list, task progress, etc.) to HDFS (Hadoop Distributed File System) in the Parquet columnar storage format, which is conducive to efficient data storage and query. At the same time, checkpoints are set so that the calculation can be quickly resumed in case of an exception during the calculation process. For example, when a certain calculation node fails and shuts down, the task will be automatically reassigned to other healthy nodes, and the lost data blocks will be reconstructed based on the RDD lineage, and the calculation will be resumed from the nearest checkpoint to ensure the integrity and continuity of the entire calculation task.

[0134] When calculating the standard deviation, vectorized calculation (SIMD instruction set) is used to improve the calculation speed. In the Map stage, each calculation node independently processes the assigned data blocks, and the data is processed in parallel through the SIMD instruction set, and the single-node calculation speed can be increased by 40%. In the Reduce stage, the standard deviation calculation results of all nodes are aggregated to generate a global standard deviation list, and a hash merge strategy is used to avoid duplicate calculations, further improving the calculation efficiency.

[0135] Dynamic threshold generation module:

[0136] Please refer to Figure 5 , conduct an in-depth analysis of the calculated standard deviation distribution, and dynamically generate thresholds in combination with the environmental complexity of the pig farm. Considering the interference of metal railings, equipment, etc. in the pigsty to the signal, as well as the activity of the pig group, determine the initial value of the environmental complexity parameter k. Assume that the current environmental interference degree in the pigsty is medium, set k = 1.2, and calculate the threshold according to the formula where is the mean of the standard deviation, is the standard deviation. As the algorithm runs, the k value is adaptively adjusted according to the false positive rate (FPR) feedback by the deep learning verification module. If the FPR is greater than 8%, according to the formula Increase the value of k to improve the screening strictness; if the FPR is less than 8%, then appropriately reduce the value of k to balance the screening accuracy and recall rate, making the threshold more adaptable to the actual environmental changes.

[0137] Initial screening module:

[0138] Compare the standard deviation of each base station combination with the dynamically generated threshold one by one. If the standard deviation of a certain base station combination is greater than the threshold, then all the base stations in this combination are marked as suspicious base stations. For example, after calculation, it is found that the standard deviation of a certain base station combination exceeds the threshold range, and base stations A, B, C, etc. in this combination are all marked as suspicious base stations. These base stations may be blocked or there are other interference factors, affecting the positioning accuracy and need further verification.

[0139] Deep learning verification module:

[0140] For the marked suspicious base stations, convert their relevant data into image format for input into the deep learning model for analysis. Use the short-time Fourier transform to convert the time series of signal arrival times into a time-frequency spectrogram, set the time window length to 10 ms, and the overlap rate to 50%. Through this transformation, the time series data is converted into a two-dimensional time-frequency representation, highlighting the characteristics of the signal at different times and frequencies. According to the formula , map the base station positions and signal strengths into a two-dimensional heat map, where dij is the estimated distance from base station j to the positioning terminal i, and the metal attenuation factor is determined according to the material and distribution of the metal facilities in the pigsty, reflecting the attenuation effect of the metal on the signal. Use the time-frequency spectrogram as channel 1 (the gray value represents the energy intensity), the spatial heat map as channel 2 (the color depth represents the signal strength), and the environmental parameter mask (binary marking of the metal occlusion area) as channel 3 for multi-channel fusion to generate an image with a resolution of 64×64 pixels and a storage format of PNG. Within 30 seconds, at a sampling rate of 10 Hz, a single base station can generate approximately 500 images, providing rich data samples for the deep learning model.

[0141] Then perform model verification, and use the pre-trained CNN model on different livestock and poultry breeding environments (including data of various types of pigsties) to analyze the generated images. The structure diagram of the pre-trained CNN model is as Figure 5 shown. The structure of this CNN model includes an input layer, a feature extraction module, a feature fusion module, and an output layer. The input layer receives a three-channel image of 64×64×3. After being processed by each module, the output layer uses the sigmoid activation function to output the NLOS probability value. If the probability value is greater than the set threshold (such as 0.5), then it is determined that this base station is in the NLOS state.

[0142] Output result and application module:

[0143] Based on the output results of the deep learning model, determine the final list of NLOS base stations. During the positioning calculation, these NLOS base stations are excluded, and only high-quality signal base stations in the line-of-sight (LOS) state are used for calculation. In this way, the positioning accuracy of the pig's position and movement trajectory is significantly improved. Breeders can use the monitoring system to view the accurate position information of each pig in real time and promptly detect abnormal behaviors of the pigs. For example, if a pig deviates from the normal activity area for a long time, it may indicate that the pig's health is problematic. Breeders can quickly take corresponding measures to achieve refined management of the pig farm, improve breeding efficiency, and enhance animal welfare.

[0144] The second embodiment of the present application provides a base station screening system based on dynamic threshold and deep learning, including:

[0145] A communication data acquisition module 10, configured to obtain multiple base station communication data according to the positioning communication between multiple base stations and a positioning terminal; the positioning terminal is used to output the positioning information of the positioning terminal carried by the target object;

[0146] A data processing module 20, configured to obtain the data standard deviation and dynamic threshold of multiple base station combinations according to the multiple base station communication data;

[0147] A suspicious base station acquisition module 30, configured to obtain suspicious base stations according to the data standard deviation and the dynamic threshold;

[0148] An image data acquisition module 40, configured to convert the base station communication data of the suspicious base station into image data;

[0149] An abnormal base station acquisition module 50, configured to input the image data into a pre-trained deep learning line-of-sight state detection model to obtain abnormal base stations in the non-line-of-sight state.

[0150] It should be noted that when the base station screening device based on dynamic threshold and deep learning provided in the second embodiment of the present application executes the base station screening method based on dynamic threshold and deep learning, only the above-mentioned functional module divisions are used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the base station screening device based on dynamic threshold and deep learning provided in the second embodiment of the present application and the base station screening method based on dynamic threshold and deep learning in the first embodiment of the present application belong to the same concept. The implementation process is detailed in the method embodiment and will not be repeated here.

[0151] The third embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the base station screening method based on dynamic threshold and deep learning as described above are implemented.

[0152] The fourth embodiment of the present application provides a computer device, including a storage, a processor, and a computer program stored in the storage and executable by the processor. When the processor executes the computer program, the steps of the base station screening method based on dynamic threshold and deep learning as described above are implemented.

[0153] The device embodiments described above are merely illustrative. The components described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the present application. Those of ordinary skill in the art can understand and implement it without creative work.

[0154] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take 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.

[0155] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the selected functions in Figure 1 one or more of the flows or multiple flows and / or blocks Figure 1 one or more of the blocks or multiple blocks. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions in Figure 1 one or more of the flows or multiple flows and / or blocksFigure 1 The functions selected in one or more boxes.

[0156] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the selected functions in one or more processes and / or boxes. Figure 1 One or more processes and / or boxes Figure 1 The steps of the functions selected in one or more boxes.

[0157] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.

[0158] The memory may include non-permanent memory in the computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.

[0159] Computer-readable media include permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassette tapes, magnetic disk storage, or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device. As defined herein, computer-readable media do not include transitory media, such as modulated data signals and carrier waves.

[0160] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, commodity or device comprising the element.

[0161] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.

Claims

1. A base station screening method based on dynamic threshold and deep learning, characterized in that Including: Obtaining multiple base station communication data according to the positioning communication between multiple base stations and a positioning terminal; The positioning terminal is used to output the positioning information of the positioning terminal carried by the target object; Obtaining the data standard deviation and dynamic threshold of multiple base station combinations according to the multiple base station communication data; Obtaining suspicious base stations according to the data standard deviation and the dynamic threshold; Converting the base station communication data of the suspicious base stations into image data; Inputting the image data into a pre-trained deep learning LOS state detection model to obtain abnormal base stations in a non-LOS state.

2. The base station screening method based on dynamic threshold and deep learning according to claim 1, characterized in that The step of obtaining the data standard deviation and dynamic threshold of multiple base station combinations according to the multiple base station communication data includes: Obtaining the data standard deviation of the corresponding base station according to the multiple base station communication data and a preset standard deviation calculation formula; Obtaining the dynamic threshold of the base station according to the data mean of the multiple base station communication data, the data standard deviation, and the environmental complexity parameter.

3. The base station screening method based on dynamic threshold and deep learning according to claim 2, wherein The step of obtaining the data standard deviation of the corresponding base station according to the multiple base station communication data and a preset standard deviation calculation formula includes: Obtaining the data standard deviation through the following formula: ; Among them, is the standard deviation of the data, is the total number of the base stations; is the th base station communication data; is the data mean of the multiple base station communication data of the same base station communication data.

4. The base station screening method based on dynamic threshold and deep learning according to claim 2, wherein The step of obtaining the dynamic threshold of the base station according to the data mean of the multiple base station communication data, the data standard deviation, and the environmental complexity parameter includes: Obtaining the dynamic threshold through the following formula: ; Among them, is the dynamic threshold, is the data mean value, is the environmental complexity parameter, is the data standard deviation.

5. The base station screening method based on dynamic threshold and deep learning according to claim 1, wherein The step of obtaining suspicious base stations according to the data standard deviation and the dynamic threshold includes: Determining the base stations in the base station combination where the data standard deviation is greater than the dynamic threshold as the suspicious base stations.

6. The base station screening method based on dynamic threshold and deep learning according to claim 1, characterized in that The base station communication data includes the signal arrival time sequence, signal strength, and the communication distance between the base station and the positioning terminal; The step of converting the base station communication data of the suspicious base stations into image data includes: Converting the signal arrival time sequence into a time-frequency spectrogram by using the short-time Fourier transform method; Obtaining a signal heat map according to the signal strength and the communication distance; Generating three-channel image data according to the time-frequency spectrogram, the signal heat map, and the environmental parameter mask of the communication environment.

7. The base station screening method based on dynamic threshold and deep learning according to claim 1, characterized in that The deep learning LOS state detection model includes an input layer, a feature extraction module, a feature fusion module, and an output layer; The step of inputting the image data into a pre-trained deep learning LOS state detection model to obtain abnormal base stations in a non-LOS state includes: Inputting the image data through the input layer, and performing feature extraction processing on the image data through the feature extraction module to obtain multiple image features; Performing fusion processing on the multiple image features through the feature fusion module to obtain a fusion feature; Performing activation processing on the fusion feature through the output layer to obtain a base station LOS state detection result; Determining the base stations with a non-LOS state in the base station LOS state detection result as the abnormal base stations.

8. A base station screening system based on dynamic threshold and deep learning, characterized in that, Including: A communication data acquisition module, configured to obtain multiple base station communication data according to the positioning communication between multiple base stations and a positioning terminal; The positioning terminal is used to output the positioning information of the positioning terminal carried by the target object; A data processing module, configured to obtain the data standard deviation and the dynamic threshold of multiple base station combinations according to the multiple base station communication data; A suspicious base station acquisition module, configured to acquire suspicious base stations according to the data standard deviation and the dynamic threshold; An image data acquisition module, configured to convert the base station communication data of the suspicious base stations into image data; An abnormal base station acquisition module, configured to input the image data into a pre-trained deep learning line-of-sight state detection model to obtain abnormal base stations in a non-line-of-sight state.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the base station screening method based on a dynamic threshold and deep learning according to any one of claims 1 to 7 are implemented.

10. A computer device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable by the processor. When the processor executes the computer program, the steps of the base station screening method based on a dynamic threshold and deep learning according to any one of claims 1 to 7 are implemented.