Anti-loss tracking method and system based on earphone positioning
Through the matching of smartphones and headphones, collecting and processing environmental sound data, constructing acoustic environment maps, solving the problem of low accuracy of headset positioning in the existing technology in complex indoor environments, and achieving higher accuracy and reliable headset positioning.
Patent Information
- Application Number
- CN202411316809.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art has low accuracy in headphone positioning in complex indoor environments, fails to provide accurate headphone positioning, and fails to fully utilize the potential of ambient sound data.
Through smartphones and headphones, collect signal and environmental sound data, conduct pre -processing and data fusion, extract environmental sound data characteristics, build acoustic environment maps, and re -collect environmental sound data for headphones.
It improves the tracking and positioning ability of the headset in the indoor environment, reduces the risk of the loss of the headset, and enhances the accuracy and reliability of the positioning result.
Smart Images

Figure CN119383563A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of indoor positioning technology, and in particular to an anti-lost tracking method and system based on earphone positioning. Background Art
[0002] With the rapid development of modern science and technology, portable electronic devices, especially smart phones and wireless headphones, have become an indispensable part of people's daily life. The development of Bluetooth technology and intelligent positioning technology has made wireless headphones not only limited to playing audio, but gradually equipped with more intelligent functions, such as health monitoring, sports tracking, etc. Although technology is constantly improving, the problem of anti-loss of headphones has not been effectively solved. Traditional anti-loss methods mainly rely on simple sound prompts or the positioning function of mobile phone APP. These methods have low accuracy in complex indoor environments and cannot provide accurate headphone locations. As the pace of life accelerates, users use headphones more frequently, and the probability of headphones being lost also increases. There is an urgent need for a more accurate and reliable headphone anti-loss tracking method.
[0003] The shortcomings of the existing technology are mainly reflected in the following aspects: the positioning method based on a single wireless signal is easily affected by factors such as signal reflection and occlusion in a complex environment, and the positioning accuracy is not high. The existing technology is relatively simple in data fusion processing, and fails to fully utilize the complementarity between multiple signals. The accuracy is low in complex indoor environments and cannot provide accurate headphone positions. The data processing method has not yet fully utilized the potential of ambient sound data. Most existing technologies only use the original signal strength or signal arrival time difference for positioning, and do not build a detailed acoustic environment map to enhance the accuracy and robustness of positioning. Summary of the invention
[0004] The object of the present invention is to provide an anti-lost tracking method and system based on earphone positioning to solve the above-mentioned problem.
[0005] The present invention is achieved through the following technical solutions:
[0006] A method and system for anti-lost tracking based on earphone positioning, comprising:
[0007] Pair the smartphone with the headset and collect signal and ambient sound data, preprocess the collected signal and ambient sound data and fuse the preprocessed signal data; extract the features of the preprocessed ambient sound data and build an acoustic environment map; re-collect ambient sound data for headset positioning, and store the data generated during the collection and analysis process.
[0008] As a preferred solution of the anti-lost tracking method based on headset positioning of the present invention, wherein: the pairing of the headset with the smartphone and the collection of signal and ambient sound data refers to the automatic pairing of the headset with the smartphone via Bluetooth when the headset is turned on indoors;
[0009] The built-in speaker of the headset emits sound wave data, and the built-in microphone of the headset collects the ambient sound data of the room, and transmits the indoor ambient sound data to the smartphone in real time via Bluetooth;
[0010] The smartphone receives indoor sound wave data through the microphone and records the time difference TOF data of the sound wave arrival. At the same time, it receives the Bluetooth signal strength RSSI data sent by the headset through Bluetooth.
[0011] The collected TOF, RSSI and ambient sound data are time-stamped and time-synchronized via the precision time protocol (PTP).
[0012] Use mobile phone cameras to collect indoor wall characteristics data, including the impact of wall materials and structures on sound propagation.
[0013] As a preferred solution of the anti-lost tracking method based on earphone positioning of the present invention, wherein: the preprocessing of the collected signal and ambient sound data and fusing the preprocessed signal data refers to cleaning the collected TOF, RSSI and ambient sound data, using mean filtering technology to remove noise from TOF and ambient sound data, using moving average method to smooth RSSI data, checking the integrity of all data, and deleting incomplete data records;
[0014] Construct a sound propagation model in a closed space based on indoor wall feature data;
[0015] Use Hanning window to divide the pre-processed TOF data into short time frames, perform FFT on the sound data in each window, convert it from time domain to frequency domain, identify the first strong energy peak in the spectrum as the direct sound, and identify the first reflected sound through the amplitude attenuation and time delay of the signal;
[0016] Based on the sound propagation distance and the sound propagation model in a closed space, the direction of the sound source is determined using the triangulation formula:
[0017]
[0018] where d tof is the propagation distance of the direct sound of TOF data, d refl is the propagation distance of the reflected sound of TOF data, and θ is the predicted direction angle of the sound source;
[0019] The collected TOF, RSSI and ambient sound data are converted into a unified data format and include an accurate timestamp. The TOF and RSSI data are used to estimate the position of the headset using the formula:
[0020]
[0021] d tof =TOF×c,
[0022] where d rssi The RSSI data is used to estimate the distance between the headset and the smartphone, n is the path loss index, and p is t is the transmitting power, c is the speed of sound;
[0023] Continuously sample and preprocess TOF and RSSI data under different environmental conditions and distances;
[0024] Use statistical analysis to calculate the mean, variance, and covariance of the preprocessed TOF and RSSI data to construct the covariance matrix C. The formula is:
[0025]
[0026] where μ rssi and μ tof The average values of RSSI and TOF, SNR rssi and SNR tof They are the signal-to-noise ratios of RSSI and TOF respectively;
[0027] The weight coefficient is determined using a method based on the signal-to-noise ratio (SNR). The formula is:
[0028]
[0029]
[0030] where μ rssi and μ tof The average values of RSSI and TOF, SNR rssi and SNR tof They are the signal-to-noise ratios of RSSI and TOF respectively;
[0031] The weight is calculated according to the signal-to-noise ratio, and the formula is:
[0032]
[0033]
[0034] where ω rssi and ω tof are the weights of RSSI and TOF respectively;
[0035] The covariance cross-fusion method is used to combine the covariance matrix of RSSI and TOF to calculate the distance between the smartphone and the headset. The formula is:
[0036]
[0037]
[0038] Where Q is the fused covariance matrix, d guj is the distance between the smartphone and the headset, C -1 rssi and C -1 tof They are the inverse matrices of the RSSI and TOF data covariance matrices respectively;
[0039] Based on the distance d between the smartphone and the headset guj The predicted direction angle θ of the sound source determines the comprehensive position d bad ;
[0040] Get the comprehensive location determined based on the smartphone bad The dimension d at and longitude d lon .
[0041] As a preferred solution of the anti-lost tracking method based on earphone positioning of the present invention, wherein: the extracting the features of the pre-processed ambient sound data refers to converting the pre-processed ambient sound data from the time domain to the frequency domain signal X(n) using the fast Fourier transform FFT;
[0042] Extract the amplitude and corresponding frequency of the frequency domain signal X(n);
[0043] Extract the spectrum centroid B as:
[0044]
[0045] Where |X(n)| is the amplitude of the nth frequency component, f(n) is the frequency corresponding to the amplitude of the nth frequency component, and N is the total number of frequency components;
[0046] The formula for extracting the spectrum broadening S is:
[0047]
[0048] The extracted spectral centroid B and spectral broadening S are combined into the ambient sound feature vector, and the formula is:
[0049] F=[B,S],
[0050] Where F is the merged environmental sound feature vector.
[0051] As a preferred solution of the anti-lost tracking method based on earphone positioning of the present invention, the construction of the acoustic environment map refers to the mapping of each environmental sound feature vector F with the corresponding comprehensive position d bad pair;
[0052] Import the ambient sound feature vector F into the acoustic environment map, where each data point contains the integrated position d bad and the corresponding environmental sound feature vector F;
[0053] Use point layers to visualize data points on a map, where each point represents a measurement location;
[0054] Calculate the location proximity d(v,j) of the comprehensive location between the points and the similarity M(v,j) of the environmental sound feature vector;
[0055] The position proximity d(v, j) of all points and the similarity M(v, j) of the environmental sound feature vector are averaged and used as the global threshold T d and T M ;
[0056] will satisfy d(v,j)<T d , and M(v,j)<T M Establish edges based on the connection conditions of points;
[0057] Use the K-means clustering algorithm to cluster the environmental sound feature vector F, randomly select K initial cluster centers, assign each point to the nearest cluster center, calculate the mean of each cluster and update the cluster center, repeat the assignment and update steps until the cluster center no longer changes;
[0058] For each cluster, calculate the average value d of the similarity M(v,j) of the environmental sound feature vectors of all point pairs in the cluster. o , the formula is:
[0059]
[0060] Where O is the number of all point pairs in the cluster, and clus is the set of points;
[0061] According to the average value d of the environmental sound feature vector similarity M(v,j) o Define the weight increment Δw, the formula is:
[0062]
[0063] Based on the average d o和 Weight increment Δw, set the initial edge weight w old , the formula is:
[0064] w old=Δw,
[0065] where w old is the initial edge weight;
[0066] According to the clustering results of the environmental sound feature vector, if the point pair belongs to the same cluster, the weight of the edge is increased. The formula is:
[0067] w new =w old +Δw;
[0068] If they do not belong to the same cluster, the edge is directly removed;
[0069] The optimized acoustic environment map structure is updated to the acoustic environment map.
[0070] As a preferred solution of the anti-lost tracking method based on earphone positioning described in the present invention, wherein: the re-collection of environmental sound data for earphone positioning refers to collecting indoor and historical environmental sound data from the publicly available sound library Freesound, and pre-processing, using fast Fourier transform FFT to convert the sound signal into the frequency domain, respectively calculating the indoor and historical environmental sound feature vectors F1 and F2, including the spectrum centroid and spectrum broadening, and generating a training set for the indoor environmental sound feature vector F1;
[0071] Construct a long short-term memory network LSTM model, including input layer, LSTM layer, fully connected layer and output layer;
[0072] Define the input layer as the environmental sound feature vector F1;
[0073] Use the training set to train the LSTM model, and use the loss function and Adam optimizer to iteratively optimize the model parameters;
[0074] When the user's earphones are lost, the user re-collects the ambient sound data through the smartphone and pre-processes it, converts the sound signal into the frequency domain using the fast Fourier transform FFT, and calculates the real-time ambient sound feature vector F3, including the spectrum centroid and spectrum broadening;
[0075] The historical environmental sound feature vector F2 is input into the trained long short-term memory network LSTM model for prediction to obtain the predicted environmental sound feature vector F4;
[0076] Update the acoustic environment map based on the predicted ambient sound feature vector F4;
[0077] The distance between the predicted sound feature vector F4 and the real-time collected sound feature vector F3 is calculated using the Euclidean distance, and the position corresponding to the feature with the smallest distance is selected as the final position of the earphone and displayed on the updated acoustic environment map.
[0078] As a preferred solution of the anti-loss tracking method based on headphone positioning described in the present invention, wherein: the storage of data generated during the collection and analysis process refers to storing the collected signals, ambient sounds and indoor wall feature data and the acoustic environment map generated by the analysis in a database, and the database classifies and stores the data collected and analyzed according to timestamp data and implements encryption protection measures, synchronously uploads the stored data to the cloud for backup, and regularly performs integrity checks on the stored data and backup data.
[0079] Another object of the present invention is to provide an anti-lost tracking system based on earphone positioning, which includes a collection and processing module for collecting signal and environmental sound data and performing pre-processing and fusing the signal data;
[0080] Extraction and construction module, used to extract features of environmental sound data and construct an acoustic environment map;
[0081] The positioning storage module is used to re-collect the environmental sound data and compare it with the acoustic environment map to determine the positioning of the headphones, and store the data generated during the collection and analysis process.
[0082] A computer device comprises: a memory and a processor; the memory stores a computer program, and the processor implements the steps of the above-mentioned anti-lost tracking method based on earphone positioning when executing the computer program.
[0083] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned anti-lost tracking method based on earphone positioning.
[0084] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0085] The present invention pairs a smart phone with headphones and collects signals and ambient sound data, builds an acoustic environment map, and re-collects ambient sound data to locate the headphones, thereby reducing errors caused by a single data source, improving the tracking and positioning capabilities of the headphones in indoor environments, reducing the risk of losing the headphones, and enhancing the accuracy and reliability of positioning results in indoor environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0087] Figure 1 A flowchart of an anti-lost tracking method based on earphone positioning;
[0088] Figure 2 The present invention is a schematic diagram of an implementation of an anti-lost tracking method based on earphone positioning;
[0089] Figure 3 This is a structural diagram of an anti-lost tracking system based on earphone positioning. DETAILED DESCRIPTION
[0090] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and drawings. The schematic implementation modes and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention. It should be noted that the present invention is already in the actual development and use stage.
[0091] Embodiment 1, as Figure 1 and Figure 2 As shown, it is the first embodiment of the present invention, which provides a data asset evaluation method based on big data, and the data asset evaluation method based on big data includes:
[0092] S1. Pairing a smartphone with the headset and collecting signal and ambient sound data, preprocessing the collected signal and ambient sound data, and fusing the preprocessed signal data;
[0093] Specifically, pairing the headset with the smartphone and collecting the signal and ambient sound data means that the headset is automatically paired with the smartphone via Bluetooth when the headset is turned on indoors;
[0094] The built-in speaker of the headset emits sound wave data, and the built-in microphone of the headset collects the ambient sound data of the room, and transmits the indoor ambient sound data to the smartphone in real time via Bluetooth;
[0095] The smartphone receives indoor sound wave data through the microphone and records the time difference TOF data of the sound wave arrival. At the same time, it receives the Bluetooth signal strength RSSI data sent by the headset through Bluetooth.
[0096] The collected TOF, RSSI and ambient sound data are time-stamped and time-synchronized via the precision time protocol (PTP).
[0097] Use mobile phone cameras to collect indoor wall characteristics data, including the impact of wall materials and structures on sound propagation.
[0098] Automatic pairing of smartphones and headsets through Bluetooth simplifies the user's operation process and improves the user experience. Automatic pairing technology reduces the time for users to manually connect devices and improves the convenience and ease of use of the system. The built-in microphone of the headset collects environmental sound data and transmits it to the smartphone in real time, which can help users perceive the acoustic information of the surrounding environment in real time. This is especially important in noisy environments. It can help users better understand the surrounding environment and avoid accidents. The microphone of the smartphone receives sound wave data and records the time difference of the sound wave arrival, which can accurately locate the sound source. This technology can be used in indoor positioning systems to provide more accurate location services. The smartphone receives the signal strength data emitted by the headset through Bluetooth. Combined with TOF data, higher-precision positioning can be achieved. This fusion of dual data sources improves the accuracy and reliability of the positioning system. Time synchronization is performed through the PTP protocol, and the collected TOF, RSSI and environmental sound data are timestamped to ensure the timeliness and accuracy of the data. This step is crucial for data analysis and processing, and can improve the overall performance of the system. Using the mobile phone camera to collect indoor wall data can provide more environmental information for the positioning system. These visual data combined with acoustic data and wireless signal data can further improve the accuracy and reliability of positioning.
[0099] Further, the collected signal and environmental sound data are preprocessed and the preprocessed signal data are fused, which means that the collected TOF, RSSI and environmental sound data are cleaned, the noise of TOF and environmental sound data is removed by using mean filtering technology, the RSSI data is smoothed by using moving average method, the integrity of all data is checked, and incomplete data records are deleted;
[0100] Construct a sound propagation model in a closed space based on indoor wall feature data;
[0101] Use Hanning window to divide the pre-processed TOF data into short time frames, perform FFT on the sound data in each window, convert it from time domain to frequency domain, identify the first strong energy peak in the spectrum as the direct sound, and identify the first reflected sound through the amplitude attenuation and time delay of the signal;
[0102] Based on the sound propagation distance and the sound propagation model in a closed space, the direction of the sound source is determined using the triangulation formula:
[0103]
[0104] where d tof is the propagation distance of the direct sound of TOF data, d refl is the propagation distance of the reflected sound of TOF data, and θ is the predicted direction angle of the sound source;
[0105] The collected TOF, RSSI and ambient sound data are converted into a unified data format and include an accurate timestamp. The TOF and RSSI data are used to estimate the position of the headset using the formula:
[0106]
[0107] d tof =TOF×c,
[0108] where d rssi The RSSI data is used to estimate the distance between the headset and the smartphone, n is the path loss index, and p is t is the transmitting power, c is the speed of sound;
[0109] Continuously sample and preprocess TOF and RSSI data under different environmental conditions and distances;
[0110] Use statistical analysis to calculate the mean, variance, and covariance of the preprocessed TOF and RSSI data to construct the covariance matrix C. The formula is:
[0111]
[0112] where σ 2 rssi and σ 2 tof are the variances of RSSI and TOF, σ rssi,tof is the covariance between RSSI and TOF; the weight coefficient is determined using a method based on the signal-to-noise ratio (SNR), and the formula is:
[0113]
[0114]
[0115] where μ rssi and μ tof The average values of RSSI and TOF, SNR rssi and SNR tof They are the signal-to-noise ratios of RSSI and TOF respectively;
[0116] The weight is calculated according to the signal-to-noise ratio, and the formula is:
[0117]
[0118]
[0119] where ω rssi and ω tof are the weights of RSSI and TOF respectively;
[0120] The covariance cross-fusion method is used to combine the covariance matrix of RSSI and TOF to calculate the distance between the smartphone and the headset. The formula is:
[0121]
[0122]
[0123] Where Q is the fused covariance matrix, d guj is the distance between the smartphone and the headset, C -1 rssi and C -1 tof They are the inverse matrices of the RSSI and TOF data covariance matrices respectively;
[0124] Based on the distance d between the smartphone and the headset guj The predicted direction angle θ of the sound source determines the comprehensive position d bad ;
[0125] Get the comprehensive location determined based on the smartphone bad The dimension d at and longitude d lon .
[0126] The collected TOF, RSSI and environmental sound data are cleaned to remove noise to ensure the accuracy and completeness of the data. The mean filtering technology and moving average method can effectively smooth the data, reduce the impact of random errors, and improve the reliability of subsequent analysis. The propagation model in the closed space is constructed based on the indoor wall data, which can simulate the propagation path of sound waves in the indoor environment and help understand and predict the reflection and attenuation behavior of sound waves, which is crucial for accurately locating the sound source and analyzing the acoustic characteristics of the environment. The TOF data is framed using the Hanning window and converted to the frequency domain through FFT, which can accurately identify the direct sound and reflected sound in the spectrum. By analyzing the amplitude attenuation and time delay of the signal, the direct sound and reflected sound can be effectively distinguished, providing reliable data for the subsequent sound source positioning. Based on the sound wave propagation distance and propagation model, the direction of the sound source is calculated using the triangulation formula, which can accurately predict the direction angle θ of the sound source and provide an accurate method for acoustic positioning. To information, all collected TOF, RSSI and ambient sound data are converted into a unified format and accurately timestamped to ensure the consistency and comparability of the data in time. This step is very important for multi-source data fusion and synchronous processing. The TOF and RSSI data are used to estimate the position of the headset. The mean, variance and covariance of the data are calculated through statistical analysis to construct a covariance matrix. This method can provide more robust location information and improve positioning accuracy. The signal-to-noise ratio (SNR)-based method is used to calculate the weight coefficients of RSSI and TOF data. The weight distribution is optimized by SNR, which can better balance the influence of different data sources during data fusion and improve positioning accuracy. The covariance cross-fusion method is used, combined with the covariance matrix of RSSI and TOF data, to calculate the distance between the smartphone and the headset. Based on the comprehensive position and sound source direction angle, the final location information is determined to provide more accurate positioning services.
[0127] S2, extracting the features of the pre-processed environmental sound data and constructing an acoustic environment map;
[0128] Specifically, extracting the features of the pre-processed ambient sound data refers to converting the pre-processed ambient sound data from the time domain to a frequency domain signal X(n) using a fast Fourier transform FFT;
[0129] Extract the amplitude and corresponding frequency of the frequency domain signal X(n);
[0130] Extract the spectrum centroid B as:
[0131]
[0132] Where |X(n)| is the amplitude of the nth frequency component, f(n) is the frequency corresponding to the amplitude of the nth frequency component, and N is the total number of frequency components;
[0133] The formula for extracting the spectrum broadening S is:
[0134]
[0135] The extracted spectral centroid B and spectral broadening S are combined into the ambient sound feature vector, and the formula is:
[0136] F=[B,S],
[0137] Where F is the merged environmental sound feature vector.
[0138] By converting the pre-processed environmental sound data from the time domain to the frequency domain through the fast Fourier transform (FFT), the frequency characteristics of the signal can be observed and analyzed more clearly. Compared with the time domain signal, the frequency domain signal can provide richer frequency information, which is helpful to identify and distinguish different sound sources. By extracting the amplitude and corresponding frequency of the frequency domain signal, the intensity information of each frequency component in the signal can be obtained. This information can be used to further analyze the characteristics of the sound, such as identifying the changing trend of a specific frequency component. The spectral centroid (B) represents the center of gravity of the spectrum and can reflect the average position of the frequency components in the signal. By calculating the spectral centroid, the frequency distribution characteristics of the signal can be understood, such as whether the signal is dominated by high-frequency components or low-frequency components. By calculating the spectral spread, it can be understood whether the frequency distribution of the signal is concentrated in a certain frequency band or distributed in a wider frequency range. The extracted spectral centroid B and spectral spread S are combined into the environmental sound feature vector F, which can fully reflect the spectral characteristics of the environmental sound. Through the comprehensive analysis of the feature vector, different environmental sounds can be more accurately described and identified.
[0139] Furthermore, constructing an acoustic environment map refers to mapping each environmental sound feature vector F with the corresponding integrated position d bad pair;
[0140] Import the ambient sound feature vector F into the acoustic environment map, where each data point contains the integrated position d bad and the corresponding environmental sound feature vector F;
[0141] Use point layers to visualize data points on a map, where each point represents a measurement location;
[0142] The position proximity d(v, j) of the comprehensive position between the calculation points and the similarity M(v, j) of the environmental sound feature vector are calculated as follows:
[0143]
[0144]
[0145] where d at,v and d lon,v are the latitude and longitude of point v, d lon,j and dat,j are the latitude and longitude of point j, respectively, and C v and S v are the spectral centroid and spectral broadening of point v, respectively, j and S j are the spectrum centroid and spectrum broadening of point j respectively;
[0146] The position proximity d(v, j) of all points and the similarity M(v, j) of the environmental sound feature vector are averaged and used as the global threshold T d and T M ;
[0147] will satisfy d(v,j)<T d , and M(v,j)<T M Establish edges based on the connection conditions of points;
[0148] Use the K-means clustering algorithm to cluster the environmental sound feature vector F, randomly select K initial cluster centers, assign each point to the nearest cluster center, calculate the mean of each cluster and update the cluster center, repeat the assignment and update steps until the cluster center no longer changes;
[0149] For each cluster, calculate the average value d of the similarity M(v,j) of the environmental sound feature vectors of all point pairs in the cluster. o , the formula is:
[0150]
[0151] Where O is the number of all point pairs in the cluster, and clus is the set of points;
[0152] According to the average value d of the environmental sound feature vector similarity M(v,j) o Define the weight increment Δw, the formula is:
[0153]
[0154] Based on the average d o和 Weight increment Δw, set the initial edge weight w old , the formula is:
[0155] w old =Δw,
[0156] where w old is the initial edge weight;
[0157] According to the clustering results of the environmental sound feature vector, if the point pair belongs to the same cluster, the weight of the edge is increased. The formula is:
[0158] w new =w old+Δw;
[0159] If they do not belong to the same cluster, the edge is directly removed;
[0160] The optimized acoustic environment map structure is updated to the acoustic environment map.
[0161] Each environmental sound feature vector F is associated with the corresponding integrated position d bad Pairing can accurately locate the environmental sound characteristics of each measurement point. This step provides basic data for building an acoustic environment map and ensures the correspondence between the sound characteristics and geographical location of each measurement point. The environmental sound feature vector F is imported into the acoustic environment map, and the data points are visualized using a point layer, providing an intuitive environmental sound distribution map. This visualization method can help users quickly identify the sound characteristics and change trends of different areas. By calculating the geographic proximity d(v, j) and the environmental sound feature vector similarity M(v, j) between points, the similarity of different measurement points can be evaluated, which is very important for identifying and analyzing the distribution pattern and change law of environmental sounds. According to the clustering results of the environmental sound feature vector, the edge weight of the acoustic environment map is optimized. By increasing the edge weight of point pairs in the same cluster and removing the edges of point pairs in different clusters, the accuracy and reliability of the map can be improved.
[0162] S3, re-collecting environmental sound data for earphone positioning, and storing the data generated during the collection and analysis process;
[0163] Specifically, re-collecting environmental sound data for earphone positioning refers to collecting indoor and historical environmental sound data from the publicly available sound library Freesound, and pre-processing it, using fast Fourier transform FFT to convert the sound signal into the frequency domain, and respectively calculating the indoor and historical environmental sound feature vectors F1 and F2, including the spectrum centroid and spectrum broadening, and generating a training set with the indoor environmental sound feature vector F1;
[0164] Construct a long short-term memory network LSTM model, including input layer, LSTM layer, fully connected layer and output layer;
[0165] Define the input layer as the environmental sound feature vector F1;
[0166] Use the training set to train the LSTM model, and use the loss function and Adam optimizer to iteratively optimize the model parameters;
[0167] When the user's earphones are lost, the user re-collects the ambient sound data through the smartphone and pre-processes it, converts the sound signal into the frequency domain using the fast Fourier transform FFT, and calculates the real-time ambient sound feature vector F3, including the spectrum centroid and spectrum broadening;
[0168] The historical environmental sound feature vector F2 is input into the trained long short-term memory network LSTM model for prediction to obtain the predicted environmental sound feature vector F4;
[0169] Update the acoustic environment map based on the predicted ambient sound feature vector F4;
[0170] The distance between the predicted sound feature vector F4 and the real-time collected sound feature vector F3 is calculated using the Euclidean distance, and the position corresponding to the feature with the smallest distance is selected as the final position of the earphone and displayed on the updated acoustic environment map.
[0171] When the user's earphones are lost, the smartphone can automatically receive the ambient sound data re-collected by the earphones to ensure the real-time and accuracy of the data. This function helps to quickly locate the lost earphones and reduce the searching time. The re-collected ambient sound data is pre-processed and the sound signal is converted into the frequency domain using Fast Fourier Transform (FFT), which can extract richer frequency feature information, reduce noise interference, and improve positioning accuracy. By calculating and predicting the ambient sound feature vector F", including the spectrum centroid and spectrum broadening, the sound characteristics of the current environment can be fully reflected. These feature vectors provide key data for subsequent earphone positioning, ensuring the accuracy and reliability of the positioning results. By calculating the Euclidean distance between F"" and the real-time collected sound feature vector F"' through the matching formula, the most likely location of the earphone can be quickly identified and accurately displayed on the acoustic environment map.
[0172] Furthermore, storing the data generated during the collection and analysis process means storing the collected signals, environmental sounds and indoor wall data, and the acoustic environment map generated by the analysis in a database. The database classifies and stores the data generated by the collection and analysis according to timestamp data and implements encryption protection measures. The stored data is simultaneously uploaded to the cloud for backup, and the integrity of the stored data and backup data is regularly checked.
[0173] The collected signals, environmental sounds, indoor wall feature data, and the acoustic environment map generated by analysis are classified and stored in the database, which can effectively manage and organize data and improve data retrieval efficiency and utilization. Classified storage through timestamp data ensures the timeliness and continuity of data. The stored data is synchronously uploaded to the cloud for backup to prevent data loss and provide a high-availability and elastic data storage solution. Cloud backup has the advantages of fast data recovery, large storage capacity and convenient access, and can effectively deal with local data loss and disaster recovery.
[0174] Embodiment 2, as Figure 3 As shown, this embodiment is different from the previous embodiment and provides a data asset evaluation system based on big data, which includes:
[0175] A collection and processing module is used to collect signal and environmental sound data and perform preprocessing and fusion of signal data;
[0176] Extraction and construction module, used to extract features of environmental sound data and construct an acoustic environment map;
[0177] The positioning storage module is used to re-collect the environmental sound data and compare it with the acoustic environment map to determine the positioning of the headphones, and store the data generated during the collection and analysis process.
[0178] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0179] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0180] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0181] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0182] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for anti-lost tracking based on earphone positioning, comprising: Pairing a smartphone with the headset and collecting signal and environmental sound data, preprocessing the collected signal and environmental sound data, and fusing the preprocessed signal data; Extract the features of pre-processed environmental sound data and construct an acoustic environment map; Re-collect environmental sound data for headphone positioning, and store the data generated during the collection and analysis process.
2. The anti-lost tracking method based on earphone positioning according to claim 1, characterized in that: Pairing the headset with the smartphone and collecting the signal and ambient sound data refers to the headset automatically pairing with the smartphone via Bluetooth when the headset is turned on indoors; The built-in speaker of the headset emits sound wave data, and the built-in microphone of the headset collects the ambient sound data of the room, and transmits the indoor ambient sound data to the smartphone in real time via Bluetooth; The smartphone receives indoor sound wave data through the microphone and records the time difference TOF data of the sound wave arrival. At the same time, it receives the Bluetooth signal strength RSSI data sent by the headset through Bluetooth. The collected TOF, RSSI and ambient sound data are time-stamped and time-synchronized via the precision time protocol (PTP). Use mobile phone cameras to collect indoor wall characteristics data, including the impact of wall materials and structures on sound propagation.
3. The anti-lost tracking method based on earphone positioning according to claim 2, characterized in that: The preprocessing of the collected signal and ambient sound data and fusing the preprocessed signal data refers to cleaning the collected TOF, RSSI and ambient sound data, removing noise from the TOF and ambient sound data using mean filtering technology, smoothing the RSSI data using a moving average method, checking the integrity of all data, and deleting incomplete data records; Construct a sound propagation model in a closed space based on indoor wall feature data; Use Hanning window to divide the pre-processed TOF data into short time frames, perform FFT on the sound data in each window, convert it from time domain to frequency domain, identify the first strong energy peak in the spectrum as the direct sound, and identify the first reflected sound through the amplitude attenuation and time delay of the signal; Based on the sound propagation distance and the sound propagation model in a closed space, the direction of the sound source is determined using the triangulation formula: where d tof is the propagation distance of the direct sound of TOF data, d refl is the propagation distance of the reflected sound of TOF data, and θ is the predicted direction angle of the sound source; Convert the collected TOF, RSSI and ambient sound data into a unified data format with accurate timestamps; The TOF and RSSI data are used to estimate the position of the headset. The formula is: d tof =TOF×c, where d rssi The RSSI data is used to estimate the distance between the headset and the smartphone, n is the path loss index, and p is t is the transmitting power, c is the speed of sound; Continuously sample and preprocess TOF and RSSI data under different environmental conditions and distances; Use statistical analysis to calculate the mean, variance, and covariance of the preprocessed TOF and RSSI data to construct the covariance matrix C. The formula is: where σ 2 rssi and σ 2 tof are the variances of RSSI and TOF, σ rssi,tof is the covariance between RSSI and TOF; The weight coefficient is determined using a method based on the signal-to-noise ratio (SNR). The formula is: where μ rssi and μ tof The average values of RSSI and TOF, SNR rssi and SNR tof They are the signal-to-noise ratios of RSSI and TOF respectively; The weight is calculated according to the signal-to-noise ratio, and the formula is: where ω rssi and ω tof are the weights of RSSI and TOF respectively; The covariance cross-fusion method is used to combine the covariance matrix of RSSI and TOF to calculate the distance between the smartphone and the headset. The formula is: Where Q is the fused covariance matrix, d guj is the distance between the smartphone and the headset, C -1 rssi and C -1 tof They are the inverse matrices of the RSSI and TOF data covariance matrices respectively; Based on the distance d between the smartphone and the headset guj The predicted direction angle θ of the sound source determines the comprehensive position d bad ; Get the comprehensive location determined based on the smartphone bad The dimension d at and longitude d lon .
4. The anti-lost tracking method based on earphone positioning according to claim 3, characterized in that: The extracting of the features of the pre-processed ambient sound data refers to converting the pre-processed ambient sound data from the time domain to a frequency domain signal X(n) using a fast Fourier transform FFT; Extract the amplitude and corresponding frequency of the frequency domain signal X(n); Extract the spectrum centroid B as: Where |X(n)| is the amplitude of the nth frequency component, f(n) is the frequency corresponding to the amplitude of the nth frequency component, and N is the total number of frequency components; The formula for extracting the spectrum broadening S is: The extracted spectral centroid B and spectral broadening S are combined into the ambient sound feature vector, and the formula is: F=[B,S], Where F is the merged environmental sound feature vector.
5. The anti-lost tracking method based on earphone positioning according to claim 4, characterized in that: The construction of the acoustic environment map refers to the process of mapping each environmental sound feature vector F with the corresponding integrated position d bad pair; Import the ambient sound feature vector F into the acoustic environment map, where each data point contains the integrated position d bad and the corresponding environmental sound feature vector F; Use point layers to visualize data points on a map, where each point represents a measurement location; Calculate the location proximity d(v,j) of the comprehensive location between the points and the similarity M(v,j) of the environmental sound feature vector; The position proximity d(v, j) of all points and the similarity M(v, j) of the environmental sound feature vector are averaged and used as the global threshold T d and T M ; will satisfy d(v,j)<T d , and M(v,j)<T M Establish edges based on the connection conditions of points; Use the K-means clustering algorithm to cluster the environmental sound feature vector F, randomly select K initial cluster centers, assign each point to the nearest cluster center, calculate the mean of each cluster and update the cluster center, repeat the assignment and update steps until the cluster center no longer changes; For each cluster, calculate the average value d of the similarity M(v,j) of the environmental sound feature vectors of all point pairs in the cluster. o , the formula is: Where O is the number of all point pairs in the cluster, and clus is the set of points; According to the average value d of the environmental sound feature vector similarity M(v,j) o Define the weight increment Δw, the formula is: Based on the average d o和 Weight increment Δw, set the initial edge weight w old , the formula is: In old =Δw, where w old is the initial edge weight; According to the clustering results of the environmental sound feature vector, if the point pair belongs to the same cluster, the weight of the edge is increased. The formula is: In new =in old +Δw; If they do not belong to the same cluster, the edge is directly removed; The optimized acoustic environment map structure is updated to the acoustic environment map.
6. The anti-lost tracking method based on earphone positioning according to claim 5, characterized in that: The re-collection of environmental sound data for earphone positioning refers to collecting indoor and historical environmental sound data from the publicly available sound library Freesound, and pre-processing, using fast Fourier transform FFT to convert the sound signal into the frequency domain, respectively calculating the indoor and historical environmental sound feature vectors F1 and F2, including the spectrum centroid and spectrum broadening, and generating a training set with the indoor environmental sound feature vector F1; Construct a long short-term memory network LSTM model, including input layer, LSTM layer, fully connected layer and output layer; Define the input layer as the environmental sound feature vector F1; Use the training set to train the LSTM model, and use the loss function and Adam optimizer to iteratively optimize the model parameters; When the user's earphones are lost, the user re-collects the ambient sound data through the smartphone and pre-processes it, converts the sound signal into the frequency domain using the fast Fourier transform FFT, and calculates the real-time ambient sound feature vector F3, including the spectrum centroid and spectrum broadening; The historical environmental sound feature vector F2 is input into the trained long short-term memory network LSTM model for prediction to obtain the predicted environmental sound feature vector F4; Update the acoustic environment map based on the predicted ambient sound feature vector F4; The distance between the predicted sound feature vector F4 and the real-time collected sound feature vector F3 is calculated using the Euclidean distance, and the position corresponding to the feature with the smallest distance is selected as the final position of the earphone and displayed on the updated acoustic environment map.
7. The anti-lost tracking method based on earphone positioning according to claim 6, characterized in that: The data generated during the storage collection and analysis process refers to storing the collected signals, environmental sounds and indoor wall feature data and the acoustic environment map generated by the analysis in a database. The database classifies and stores the data collected and analyzed according to timestamp data and implements encryption protection measures. The stored data is simultaneously uploaded to the cloud for backup, and the stored data and backup data are regularly checked for integrity.
8. An anti-lost tracking system based on earphone positioning based on the anti-lost tracking method based on earphone positioning according to any one of claims 1 to 7, characterized in that: include, A collection and processing module is used to collect signal and environmental sound data and perform preprocessing and fusion of signal data; Extraction and construction module, used to extract features of environmental sound data and construct an acoustic environment map; The positioning storage module is used to re-collect the environmental sound data and compare it with the acoustic environment map to determine the positioning of the headphones, and store the data generated during the collection and analysis process.
9. A computer device comprising: Memory and processor; The memory stores a computer program, characterized in that: when the processor executes the computer program, the steps of the anti-lost tracking method based on earphone positioning described in any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the anti-lost tracking method based on earphone positioning according to any one of claims 1 to 8 are implemented.