Multi-scene power bank integrated anti-lost positioning intelligent alarm real-time guarding method and system
By constructing a spatiotemporal correlation matrix of the population through a cloud-based big data analysis platform and utilizing graph neural network algorithms, the problem of judgment failure of power bank anti-loss technology in high-density crowd scenarios was solved, and accurate anti-loss judgment and graded early warning were achieved in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN REFLYING ELECTRONICS CO LTD
- Filing Date
- 2026-04-27
- Publication Date
- 2026-07-31
AI Technical Summary
Existing anti-loss technologies for power banks fail to distinguish between environmental interference and genuine anomalies in high-density crowds due to wireless signal obstruction and interference.
By collecting real-time location sequences and Bluetooth connection status data of multiple power banks and smartphones through a cloud-based big data analysis platform, a spatiotemporal correlation matrix of the group is constructed. The graph neural network algorithm is used to extract the baseline features of the group behavior, and the residual value is calculated to determine abnormal separation and generate graded early warning instructions.
In high-density crowd scenarios, it effectively distinguishes between environmental interference and real anomalies, reduces redundant alarms, and improves the accuracy and efficiency of anti-loss judgment.
Smart Images

Figure CN122493616A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of big data analytics technology and discloses a method and system for real-time protection with integrated anti-loss positioning and intelligent alarm for multi-scenario power banks. Background Technology
[0002] Existing anti-loss technologies for power banks generally employ a point-to-point wireless communication signal measurement scheme. A short-range wireless connection is established between the power bank and the smartphone, and the system continuously measures the received signal strength or calculates the straight-line physical distance between them. When the measured signal strength is lower than a preset fixed signal threshold, or the calculated straight-line physical distance exceeds a preset fixed distance threshold, the smartphone triggers an anti-loss alarm. This type of scheme relies entirely on real-time communication data between a single paired device, representing an isolated, single-point judgment mode.
[0003] In densely populated areas, numerous moving people physically obstruct wireless signals, causing non-line-of-sight propagation and multipath effects. Simultaneously, the overlapping electromagnetic waves from numerous nearby electronic devices operating on the same frequency band generate co-channel interference. The combined effect of these environmental factors leads to drastic and irregular fluctuations in the received signal strength indication and the line-of-sight physical distance. Existing technologies using isolated, single-point judgment modes only acquire real-time data from a single pair of devices, failing to distinguish whether signal fluctuations are caused by environmental interference or by genuine abnormal separation, resulting in the failure of anti-loss judgment in complex crowd distribution scenarios. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for real-time protection of power banks with integrated anti-loss positioning and intelligent alarm in multiple scenarios, which can effectively solve the problems in the background art mentioned above.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for real-time protection of power banks with integrated anti-loss positioning and intelligent alarm in multiple scenarios, the method comprising: a cloud big data analysis platform continuously collecting real-time location sequences and Bluetooth connection status data of multiple power banks and multiple smartphone pairing groups within a set geographical area; The cloud-based big data analysis platform constructs a spatiotemporal correlation matrix of the population based on the real-time location sequence and the Bluetooth connection status data; The cloud-based big data analysis platform uses a graph neural network algorithm to process the spatiotemporal correlation matrix of the group. Taking the smartphone as a node and the relative distance change rate between the smartphone and the power bank as the edge weight, it extracts the baseline features of the group behavior of the power bank and smartphone maintaining a connection state within the geographical area. The cloud-based big data analysis platform inputs the rate of change of the relative distance between the target smartphone and the target power bank into the graph neural network to calculate the residual value between the current input feature and the baseline feature of the group behavior; If the residual value exceeds the preset abnormal boundary, the cloud-based big data analysis platform determines that the target pairing group has abnormally separated, and generates a graded early warning instruction based on the abnormal separation status and sends it to the target smartphone to execute the corresponding level of early warning operation.
[0006] Preferably, the construction of the group spatiotemporal correlation matrix includes: the cloud big data analysis platform divides the set geographical area into multiple spatial grids, and performs slice processing on the real-time location sequence of the multiple power banks and multiple smartphone pairing groups according to a set time window; For any spatial grid within the set time window, the cloud-based big data analysis platform calculates the Euclidean distance between the smartphone and the power bank in each pairing group falling within the spatial grid, and divides the difference between the Euclidean distance in the current set time window and the Euclidean distance in the previous set time window by the length of the time window to generate the relative distance change rate. The cloud-based big data analysis platform uses the relative distance change rate of all pairing groups within the spatial grid as matrix elements to generate an initial correlation matrix with pairing groups as row and column indices. It then uses the connection stability index in the Bluetooth connection status data as a mask matrix and performs a Hadamard product operation with the initial correlation matrix to generate the group spatiotemporal correlation matrix.
[0007] Preferably, the step of processing the group spatiotemporal correlation matrix using a graph neural network algorithm includes: the graph neural network algorithm comprising a graph convolutional layer and a graph attention network layer connected in sequence; The graph convolutional layer receives the group spatiotemporal correlation matrix and aggregates the feature vectors of adjacent nodes according to the edge weights to generate node-level aggregated features. The graph attention network layer receives the node-level aggregated features, calculates the attention coefficients between nodes, performs a weighted summation of the node-level aggregated features, and outputs a hidden layer feature vector containing global spatial topological dependencies. The cloud-based big data analysis platform inputs the hidden layer feature vector into a fully connected layer for nonlinear mapping, outputs a set of feature representations for all paired groups within the geographical region, and determines the mean vector of the feature representation set as the baseline feature of the group behavior.
[0008] Preferably, the extraction of baseline features of group behavior in which power banks and smartphones remain connected within the geographical area includes: the cloud-based big data analysis platform maintains a circular buffer queue, which stores feature representation sets corresponding to multiple consecutive set time windows; Within the currently set time window, the cloud-based big data analysis platform stores the feature representation set of the current moment into the circular buffer queue and removes the feature representation set of the earliest initial moment stored in the circular buffer queue. The cloud-based big data analysis platform performs time-dimensional mean pooling on all feature representation sets stored in the circular buffer queue to generate a dynamic baseline vector. The cloud-based big data analysis platform performs a weighted fusion of the dynamic baseline vector and the historical default baseline vector, wherein the fusion weight is determined by the fill rate of the circular buffer queue, and updates the fused vector with the group behavior baseline features.
[0009] Preferably, the calculation of the residual value between the current input feature and the group behavior baseline feature includes: the cloud big data analysis platform obtains the target feature vectors of the target smartphone and the target power bank within the current set time window, calculates the Mahalanobis distance between the target feature vector and the group behavior baseline feature, and determines the Mahalanobis distance as the residual value; The cloud-based big data analysis platform obtains a historical sample set consisting of Mahalanobis distances of all paired groups within a set historical time period, and uses a Gaussian mixture model to fit the probability density of the historical sample set. Based on the probability density fitting results, the cloud-based big data analysis platform calculates the quantiles of the historical sample set at a preset confidence level, and sets the product of the quantiles and a preset amplification factor as the anomaly boundary.
[0010] Preferably, the step of generating a graded early warning instruction based on the abnormal separation state includes: the cloud-based big data analysis platform calculating the ratio of the difference between the residual value and the abnormal boundary, and dividing the ratio of the difference into three continuous intervals; When the difference ratio is in the first range, the cloud-based big data analysis platform generates a low-frequency vibration command as the graded early warning command; When the difference ratio is in the second interval, the cloud-based big data analysis platform generates a combination of high-frequency vibration command and screen flashing command as the graded early warning command. When the difference ratio is in the third interval, the cloud big data analysis platform generates a combination of an audible and visual alarm command and a location broadcast command sent to a preset emergency contact terminal as the graded early warning command. The target smartphone receives the graded warning command and executes the corresponding operations in the order of low-frequency vibration, high-frequency vibration and screen flashing, and sound and light alarm and location broadcast.
[0011] Preferably, generating the spatiotemporal correlation matrix of the group further includes: for the null elements in the initial correlation matrix caused by the lack of Bluetooth connection status data, the cloud big data analysis platform extracts the relative distance change rate sequence of the corresponding pairing group within three consecutive set time windows before the missing time. The cloud-based big data analysis platform uses a cubic spline interpolation algorithm to fit the relative distance change rate sequence, predicts the interpolation change rate at missing times, and fills the missing element positions of the initial correlation matrix with the interpolation change rate. Meanwhile, the cloud-based big data analysis platform extracts the variance of the received signal strength indicator value fluctuation from the Bluetooth connection status data, uses the variance of the received signal strength indicator value fluctuation as an additional edge feature, and concatenates it with the relative distance change rate to generate an expanded group spatiotemporal correlation matrix.
[0012] Preferably, the graph neural network algorithm further includes a temporal convolutional network layer, which is disposed between the graph attention network layer and the fully connected layer; The temporal convolutional network layer receives the feature vectors from the hidden layer and arranges them in temporal order according to the set time window to form a feature vector sequence; The temporal convolutional network layer uses multi-scale dilated convolution kernels to perform one-dimensional convolution operations on the feature vector sequence to extract local temporal feature maps at different time spans. The temporal convolutional network layer concatenates the local temporal feature maps of different time spans along the channel dimension to generate a spatiotemporal fusion feature vector. The cloud-based big data analysis platform inputs the spatiotemporal fusion feature vector into the fully connected layer for nonlinear mapping and outputs an updated feature representation set.
[0013] Preferably, the setting of the abnormal boundary further includes: the cloud big data analysis platform acquiring environmental covariate data within the set geographical area, the environmental covariate data including regional population density indicators and base station load indicators; The cloud-based big data analysis platform constructs a linear regression correction model that takes the environmental covariate data as input and the anomaly boundary as output. When the environmental covariate data for the current moment is received, the cloud-based big data analysis platform inputs the environmental covariate data for the current moment into the linear regression correction model to calculate the boundary correction value; The cloud-based big data analysis platform adds the boundary correction value to the product of the quantile and the preset amplification factor, and resets the sum as the abnormal boundary.
[0014] A multi-scenario integrated anti-loss positioning intelligent alarm real-time protection system for power banks, comprising a cloud-based big data analysis platform, multiple power banks, and multiple smartphones; The multiple power banks are used to collect real-time location sequences and Bluetooth connection status data; The multiple smartphones are used to collect real-time location sequences and Bluetooth connection status data; The cloud-based big data analysis platform is used to continuously collect real-time location sequences and Bluetooth connection status data of the multiple power banks and multiple smartphone pairing groups within a set geographical area, and to construct a group spatiotemporal correlation matrix based on the real-time location sequences and Bluetooth connection status data; The cloud-based big data analysis platform is also used to process the spatiotemporal correlation matrix of the group using a graph neural network algorithm. Taking the smartphone as a node and the relative distance change rate between the smartphone and the power bank as the edge weight, the platform extracts the baseline features of the group behavior of the power bank and smartphone maintaining a connection state within the geographical area. The cloud-based big data analysis platform is also used to input the relative distance change rate between the target smartphone and the target power bank into the graph neural network, calculate the residual value between the current input feature and the group behavior baseline feature, and if the residual value exceeds the preset abnormal boundary, it is determined that the target pairing group has abnormally separated, and a graded early warning instruction is generated according to the abnormal separation state. The target smartphone is also used to receive the graded warning instructions and execute the corresponding level of warning operation.
[0015] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention constructs a spatiotemporal correlation matrix of a group by collecting real-time location sequences and connection status data of multiple paired groups within a defined geographical area. Using smartphones as nodes and relative distance change rates as edge weights, a graph neural network algorithm is employed to extract baseline features of group behavior that include global spatial topological dependencies. The relative distance change rate of the target paired group is input into the graph neural network to calculate the residual value between the residual value and the baseline features of group behavior. Based on the comparison between the residual value and the abnormal boundary, anomaly separation is determined, and a tiered early warning instruction is generated. This scheme places the anti-loss judgment of individual devices within the spatial topological correlation rules of surrounding group devices, filtering out interference from individual signal fluctuations caused by local crowd congestion or unidirectional movement, and overcoming the judgment failure problem caused by non-line-of-sight propagation and co-frequency interference in high-density crowd scenarios.
[0016] 2. This invention stores the feature representation set of continuous time windows through a circular buffer queue and performs mean pooling. It then weights and fuses this set with the historical default baseline vector to update the baseline features of group behavior, making the baseline features adapt to the temporal changes in environmental conditions. It uses Mahalanobis distance to calculate the residual value between the target feature vector and the baseline features of group behavior, and uses a Gaussian mixture model to fit the probability density of the historical sample set to determine the anomaly boundary, eliminating statistical bias under different data distributions. Based on the ratio of the difference between the residual value and the anomaly boundary, it divides the interval and issues graded early warning commands such as low-frequency vibration, high-frequency vibration and screen flicker, audible and visual alarms and location broadcasts. It executes the corresponding graded operations in the anomaly separation state, reducing the occupation of network communication resources by redundant alarms. Attached Figure Description
[0017] Figure 1 This is the main flowchart of the present invention; Figure 2 A flowchart for constructing a group spatiotemporal correlation matrix for this invention; Figure 3 This is a flowchart of the matrix processing sub-process of the graph neural network algorithm of this invention; Figure 4 This invention provides a flowchart for dynamically updating the baseline characteristics of group behavior. Figure 5 This is a flowchart of the sub-process for calculating residual values and setting abnormal boundaries in this invention; Figure 6 This is a flowchart of the generation and execution of hierarchical early warning instructions in this invention. Detailed Implementation
[0018] Please refer to the attached document. Figure 1 This embodiment provides a geographical area defined as the entire indoor and outdoor area of a core urban commercial complex. Multiple shared power bank devices are deployed within this area, each equipped with a built-in Bluetooth communication module, satellite positioning module, and mobile communication module. Each shared power bank device is paired with a corresponding smartphone to form a pairing group. A cloud-based big data analytics platform establishes data communication links with all shared power bank devices and smartphones within the area via a mobile communication network, continuously collecting real-time location sequences and Bluetooth connection status data from multiple pairing groups within the area.
[0019] Both smartphones and shared power bank devices in the paired group output their real-time location coordinates at a fixed acquisition frequency. These coordinates use latitude, longitude, and elevation data in a geodetic coordinate system. The coordinates from multiple consecutive acquisition times are arranged chronologically to form a real-time location sequence for each device. The smartphones and shared power bank devices in the paired group maintain a continuous connection via Bluetooth. Bluetooth connection status data includes connection status identifier, connection duration, received signal strength indicator, signal-to-noise ratio, and packet loss rate. A cloud-based big data analytics platform assigns a unique identifier to each paired group and timestamps the real-time location sequences and Bluetooth connection status data of smartphones and shared power banks within the same paired group, storing them in a distributed time-series database.
[0020] Table 1. Field Definitions and Collection Specifications for Data Collected from Paired Groups The cloud-based big data analytics platform constructs a group spatiotemporal correlation matrix based on real-time location sequences and Bluetooth connection status data. The rows and columns of the group spatiotemporal correlation matrix correspond to paired groups within the region, and the matrix elements characterize the degree of spatiotemporal correlation between paired groups. Using smartphones as nodes and the relative distance change rate between smartphones and power banks within a paired group as edge weights, an undirected graph structure is constructed, and the group spatiotemporal correlation matrix is the adjacency matrix of this undirected graph.
[0021] The cloud-based big data analytics platform uses a graph neural network algorithm to process the spatiotemporal correlation matrix of a group, extracting baseline features of group behavior where power banks and smartphones maintain a connection within a region. The graph neural network algorithm takes a constructed undirected graph as input, with nodes representing smartphones in paired groups and edge weights representing the relative distance change rate between corresponding paired groups. Through multi-layer feature aggregation and mapping, it outputs the feature representation of each node. The statistical features of the feature representations of all nodes maintaining a normal Bluetooth connection constitute the baseline features of group behavior.
[0022] The cloud-based big data analytics platform inputs the relative distance change rate between the target smartphone and the target power bank into a graph neural network to calculate the residual value between the current input features and the baseline features of group behavior. The target pairing group is the pairing group to be detected. The relative distance change rate of the target pairing group is used as the weight of the corresponding edge and input into the trained graph neural network. The output is the target feature vector corresponding to the target pairing group. The difference between the target feature vector and the baseline features of group behavior is calculated, which is the residual value.
[0023] If the residual value exceeds a preset anomaly boundary, the cloud-based big data analysis platform determines that the target pairing group has experienced abnormal separation. Based on the abnormal separation status, it generates a tiered warning command and sends it to the target smartphone to execute the corresponding level of warning operation. The anomaly boundary is a pre-set statistical threshold. When the residual value exceeds this threshold, it indicates that the relative distance change behavior of the target pairing group deviates from the normally connected group behavior within the area, and is judged as abnormal separation. This means that the target power bank and the target smartphone have separated beyond the normal usage range, posing a risk of loss. The cloud-based big data analysis platform generates a corresponding level of warning command based on the degree to which the residual value exceeds the anomaly boundary, and sends it to the target smartphone via the mobile communication network. Upon receiving the warning command, the target smartphone invokes its vibration module, display module, and audio module to execute the corresponding warning operation.
[0024] This embodiment replaces the existing single-point judgment mode with a group spatiotemporal correlation analysis mode. It judges the behavior of the target pairing group by placing it in the topological correlation of group behavior in the region. This can effectively distinguish between signal fluctuations caused by environmental interference and real abnormal separation behavior, and solve the problem of anti-loss judgment failure in high-density scenarios.
[0025] refer to Figure 2 In one optional embodiment, when constructing a group spatiotemporal correlation matrix, the cloud-based big data analysis platform first divides the designated geographical area into multiple spatial grids, and then slices the real-time location sequences of multiple paired groups according to a set time window. Using an equal latitude and longitude grid division method, the designated geographical area is divided into several equally spaced grid units along both the longitude and latitude directions. The actual geographical distance corresponding to each grid unit is a preset fixed value, and each grid unit is assigned a unique grid number. The time window is a preset fixed duration, and each time window is assigned a unique timestamp. The cloud-based big data analysis platform slices the continuously collected real-time location sequences according to the start and end times of the time window, with the location data within each time window constituting a slice unit.
[0026] For any spatial grid within a set time window, the cloud-based big data analytics platform calculates the Euclidean distance between the smartphone and the power bank in each pairing group falling within that grid. It then divides the difference between the Euclidean distance in the current set time window and the Euclidean distance in the previous set time window by the time window length to generate the relative distance change rate. For each pairing group... During the time window Inside, the smartphone's location coordinates are The location coordinates of the power bank are First, convert the latitude and longitude coordinates to Cartesian coordinates. The converted smartphone Cartesian coordinates are: The power bank's planar coordinates are Then the paired group In the time window Euclidean distance within The calculation formula is: Pairing group In the time window Rate of change of relative distance within The calculation formula is: The length of the time window, For paired groups In the preceding time window Euclidean distance within -1.
[0027] The cloud-based big data analytics platform uses the relative distance change rate of all pairing groups within the spatial grid as matrix elements to generate an initial correlation matrix with pairing groups as row and column indices. It then uses the connection stability index from Bluetooth connection status data as a mask matrix and performs a Hadamard product operation with the initial correlation matrix to generate a population spatiotemporal correlation matrix. (Initial correlation matrix) ,in This represents the number of pairing groups within the current spatial grid. The row and column indices of the matrix correspond to unique identifiers for each pairing group, and the diagonal elements... For paired groups rate of change of relative distance Off-diagonal elements For paired groups With paired groups The covariance of the rate of change of the relative distance between the two pairs characterizes the degree of behavioral association between them. Connection stability. The value is calculated from the packet loss rate, signal-to-noise ratio, and fluctuation range of the received signal strength indicator in the Bluetooth connection status data. The value ranges from 0 to 1; the more stable the connection, the closer the value is to 1. Mask matrix. It is a diagonal matrix, with diagonal elements All off-diagonal elements are 1. (Group spatiotemporal correlation matrix) The calculation formula is: in, This is the Hadamard product operator.
[0028] For null elements in the initial association matrix caused by missing Bluetooth connection status data, the cloud-based big data analytics platform extracts the relative distance change rate sequence for the corresponding pairing group within three consecutive set time windows before the missing time. It then uses a cubic spline interpolation algorithm to fit the relative distance change rate sequence, predicts the interpolated change rate at the missing time, and fills the null element positions in the initial association matrix with the interpolated change rate. For the missing time... Pairing groups The sequence of relative distance change rates for its preceding three time windows is as follows: Construct a cubic spline interpolation function ,satisfy Where k=1,2,3, and the first and second derivatives of the interpolation function are continuous within the interval, the coefficients of the interpolation function are obtained by solving the three bending moment equations, and then the missing time points are calculated. interpolation rate of change , used as the fill value for empty elements.
[0029] The cloud-based big data analytics platform extracts the variance of the received signal strength indicator (RSI) fluctuation from the Bluetooth connection status data. This variance is then used as an additional edge feature and concatenated with the relative distance change rate to generate an expanded population spatiotemporal correlation matrix. (Received signal strength indicator variance) For paired groups In the current time window The variance of the received signal strength indication values at all acquisition times will With relative distance change rate By concatenating the channels, each matrix element is expanded from a scalar to a two-dimensional vector, generating an expanded group spatiotemporal correlation matrix with dimensions of [missing information]. .
[0030] Table 2 Spatial Mesh Generation and Temporal Window Slicing Parameter Configuration Table Spatial grid cell size 3m-10m The actual geographic side length corresponding to a single spatial grid cell, in meters. The higher the population density within a region, the smaller the grid cell size; the value is larger in open outdoor areas than in enclosed indoor areas. Time window length 5s-30s Duration of a single time window, in seconds. The faster people move within the area, the smaller the time window length; the higher the base station load, the larger the time window length. Coordinate transformation datum WGS84 / GCJ02 The geodetic coordinate system reference used to convert latitude and longitude coordinates to plane rectangular coordinates Match the corresponding reference according to the coordinate system type of the positioning equipment in the area. Null value filling trigger condition Single-window data missing rate ≤30% Maximum missing data percentage that triggers cubic spline interpolation fill When the data missing rate exceeds the trigger condition, the corresponding paired group data will not be included in the initial association matrix. Feature expansion dimensions 2D Number of feature channels of the expanded matrix elements The dimensionality can be adjusted based on the number of additional side features, which include the variance of the received signal strength indication value fluctuation and the mean signal-to-noise ratio. This embodiment decomposes global group data into associated data within local spatiotemporal units through spatial grid partitioning and temporal window slicing, reducing the computational load of matrix operations and improving the real-time performance of data processing. The Hadamard product operation of the connection stability mask matrix filters out interference from unstable paired data groups on the association matrix. Cubic spline interpolation fills in missing data, ensuring the integrity of the association matrix. The concatenation of additional edge features enriches the feature dimensions of the association matrix, improving the accuracy of subsequent graph neural network feature extraction.
[0031] refer to Figure 3 and 4In one optional embodiment, the graph neural network algorithm used by the cloud-based big data analytics platform includes a graph convolutional layer, a graph attention network layer, a temporal convolutional network layer, and a fully connected layer connected in sequence. The graph convolutional layer receives the spatiotemporal correlation matrix of the group and aggregates the feature vectors of adjacent nodes according to the edge weights to generate node-level aggregated features.
[0032] The graph convolutional layer employs a mean-aggregated graph convolution operation for each node in the undirected graph. Its initial eigenvector The feature vector is the concatenation of the relative distance change rate of the corresponding pairing groups and the additional edge features, with dimension [missing information]. The formula for calculating the feature aggregation process of the convolutional layer is as follows: in, The number of layers in the graph convolutional layer. For nodes In the The output feature vector of the layer, It is a ReLU nonlinear activation function. For the first The trainable weight matrix of the layer, For feature splicing operations, It is an aggregate function. For nodes The set of adjacent nodes is determined by the non-zero value of the corresponding edge weight in the spatiotemporal correlation matrix of the group.
[0033] The aggregation function used is the mean aggregation function with edge weights, and the calculation formula is as follows: in, For nodes The number of adjacent nodes, For nodes With nodes The edge weights between them are the relative distance changes of the corresponding pairing groups.
[0034] The graph attention network layer receives node-level aggregated features, calculates the attention coefficients between nodes, and performs a weighted summation of these features to output a hidden layer feature vector containing global spatial topological dependencies. Relative to node The formula for calculating the attention coefficient is: in, The normalized attention coefficient. For the shared linear transformation weight matrix, This represents the weight vector of a single-layer feedforward neural network. For a leaky linear rectified activation function, For nodes The set of adjacent nodes, containing nodes itself.
[0035] The graph attention network layer performs a weighted summation of the features of neighboring nodes and outputs the node. The hidden layer feature vector is calculated using the following formula: in, For nodes The hidden layer feature vectors output by the graph attention network layer, together with the hidden layer feature vectors of all nodes, constitute the hidden layer feature matrix. , is the dimension of the hidden layer feature vectors.
[0036] The temporal convolutional network layer is positioned between the graph attention network layer and the fully connected layer. This layer receives feature vectors from the hidden layers, arranges them sequentially according to a defined time window to form a feature vector sequence, and uses multi-scale dilated convolution kernels to perform one-dimensional convolution operations on the feature vector sequence, extracting local temporal feature maps at different time spans. These local temporal feature maps are then concatenated along the channel dimension to generate a spatiotemporal fusion feature vector. For continuous... Hidden layer feature matrix for each time window The feature vector sequence is formed by arranging them in chronological order. For each node Extract its corresponding time-series feature sequences The temporal convolutional network layer uses three one-dimensional dilated convolutional kernels with different dilation coefficients of 1, 2, and 4, respectively. The kernel size is 3, and the padding method is causal padding to ensure that the convolution operation does not leak information from future moments.
[0037] For an expansion coefficient of The formula for calculating the output features of a one-dimensional dilated convolution is as follows: in, The weight parameters of the convolution kernel, For the current time index, Coefficient of expansion The corresponding convolution operation at time 1 The output value.
[0038] The convolutional output features with three different dilation coefficients are concatenated along the channel dimension to obtain the node. spatiotemporal fusion feature vector The spatiotemporal fusion feature vectors of all nodes constitute the spatiotemporal fusion feature matrix. ,in is the dimension of the spatiotemporal fusion feature vector.
[0039] The cloud-based big data analytics platform inputs the spatiotemporal fusion feature vector into a fully connected layer for nonlinear mapping, outputting an updated set of feature representations. The fully connected layer contains two linear transformation layers and a ReLU activation function. The first fully connected layer maps the spatiotemporal fusion feature vector into a feature vector of intermediate dimensions, and the second fully connected layer maps the intermediate-dimensional feature vector into the final feature representation vector with dimensions [missing information]. For nodes Its final feature representation vector The calculation formula is: in, , This is the weight matrix of the fully connected layer. , This is the bias vector of the fully connected layer. The ReLU activation function is used. The feature representation vectors of all nodes constitute the feature representation set. .
[0040] When extracting baseline features of group behavior, the cloud-based big data analytics platform maintains a circular buffer queue. This circular buffer queue stores feature representation sets corresponding to multiple consecutive defined time windows. The maximum length of the circular buffer queue is... That is, the maximum storage The feature representation set is a continuous time window, and the queue adopts a first-in-first-out read / write rule. In the current set time window, the cloud big data analysis platform stores the feature representation set of the current moment into a circular buffer queue and removes the feature representation set of the earliest initial moment stored in the circular buffer queue.
[0041] The cloud-based big data analytics platform performs time-dimensional mean pooling on all feature representations stored in the circular buffer queue to generate a dynamic baseline vector. The formula for mean pooling is: in, For dynamic baseline vectors, The number of feature representation sets currently stored in the circular buffer queue. For the first Each feature represents the number of nodes in the set. For the first The feature represents the set of features. The feature representation vector of each node.
[0042] The cloud-based big data analytics platform performs a weighted fusion of the dynamic baseline vector and the historical default baseline vector. The fusion weights are determined by the fill rate of the circular buffer queue. The fused vector is then updated with the group behavior baseline features. The formula for calculating the fusion weights of the dynamic baseline vector is: in, The fusion weights for the dynamic baseline vectors, The number of feature representation sets currently stored in the circular buffer queue. This represents the maximum length of the circular buffer queue. The historical default baseline vector. The baseline feature vector is obtained by pre-training with a large amount of sample data from normally connected states. The fused baseline features of group behavior. The calculation formula is: Table 3 shows the structural parameters and operational logic of each layer of the neural network. This embodiment achieves feature aggregation of adjacent nodes through graph convolutional layers, capturing the behavioral association features of paired groups in the local space; it achieves weighted aggregation of different adjacent nodes through graph attention network layers, highlighting associated nodes that have a greater impact on the behavior of the target node and capturing global spatial topological dependencies; it extracts temporal features of different time spans through temporal convolutional network layers, realizing the fusion of spatial and temporal features; and it achieves dynamic updating of the baseline features of group behavior through a circular buffer queue and weighted fusion mechanism, enabling the baseline features to adapt to the temporal changes of environmental states and improving the adaptability of anomaly detection.
[0043] refer to Figure 5 and 6 In one optional embodiment, when the cloud-based big data analysis platform calculates the residual value between the current input features and the baseline features of group behavior, it first obtains the target feature vectors of the target smartphone and the target power bank within the currently set time window, calculates the Mahalanobis distance between the target feature vectors and the baseline features of group behavior, and determines the Mahalanobis distance as the residual value. The formula for calculating the Mahalanobis distance is: in, This refers to the Mahalanobis distance, i.e., the residual value. The target feature vector corresponding to the target pairing group. Baseline characteristics of group behavior Let be the covariance matrix of all eigenvectors in the eigenvalue set. is the inverse of the covariance matrix. Mahalanobis distance calculation considers the correlation between different dimensions of the eigenvectors, eliminating the influence of differences in the dimensions of different dimensions, and can measure the degree of deviation between the target eigenvector and the baseline characteristics of group behavior.
[0044] The cloud-based big data analytics platform acquires a historical sample set consisting of Mahalanobis distances for all paired groups within a specified historical time period. A Gaussian mixture model is then used to fit the probability density function of this historical sample set. The Gaussian mixture model is a linear combination of multiple Gaussian distributions, and its probability density function is calculated using the following formula: in, Mahalanobis distance The probability density function, Let be the number of components in the Gaussian distribution. For the first The weighting coefficients of the Gaussian components satisfy the following conditions: , The mean is variance is The model uses a one-dimensional Gaussian distribution. The expectation-maximization algorithm is employed to solve for the parameters of the Gaussian mixture model, obtaining the optimal weight coefficients, mean, and variance parameters, thus completing the probability density fitting.
[0045] The cloud-based big data analytics platform calculates the quantiles of the historical sample set at a preset confidence level based on probability density fitting results. The product of these quantiles and a preset amplification factor is then defined as the outlier boundary. The quantiles corresponding to the preset confidence level are... That is, the Mahalanobis distance of the corresponding proportions in the historical sample set is less than or equal to The preset magnification factor is Values greater than 1 indicate the basic anomaly boundary. The calculation formula is: .
[0046] The cloud-based big data analytics platform acquires environmental covariate data within a defined geographical area. This covariate data includes regional population density and base station load metrics. The regional population density metric is the ratio of the number of people in the defined geographical area at the current moment to the area's area, calculated using pedestrian flow statistics from video surveillance equipment within the area and data on the number of terminal devices connected to base stations. The base station load metric is the current resource utilization rate of mobile communication base stations within the area, including physical resource block utilization and signaling channel load rate data.
[0047] The cloud-based big data analytics platform constructs a linear regression correction model that takes environmental covariate data as input and outlier boundaries as output. The calculation formula for the linear regression correction model is: in, This is the boundary correction value. For the intercept term, , For regression coefficients, As an indicator of regional population density, This represents the base station load index. The regression coefficients are obtained by least-squares fitting of historical environmental covariate data with the corresponding optimal outlier boundary data.
[0048] Upon receiving the environmental covariate data for the current moment, the cloud-based big data analytics platform inputs this data into a linear regression correction model, calculates the boundary correction value, adds the boundary correction value to the product of the quantile and a preset amplification factor, and resets the sum as the anomaly boundary. This is the final anomaly boundary. .
[0049] The cloud-based big data analytics platform calculates the ratio of the difference between the residual value and the outlier boundary, and divides this ratio into three continuous intervals. (Difference Ratio) The calculation formula is: ,in The residual value, This represents an abnormal boundary. The three consecutive intervals are the first interval, the second interval, and the third interval, with the first interval being... The second interval is The third interval is ,in , This is a preset ratio threshold.
[0050] When the difference ratio is in the first interval, the cloud-based big data analysis platform generates a low-frequency vibration command as a tiered warning command; when the difference ratio is in the second interval, the cloud-based big data analysis platform generates a combination of a high-frequency vibration command and a screen flashing command as a tiered warning command; when the difference ratio is in the third interval, the cloud-based big data analysis platform generates a combination of an audible and visual alarm command and a location broadcast command to a preset emergency contact terminal as a tiered warning command. The target smartphone receives the tiered warning commands and executes the corresponding operations in the following order: low-frequency vibration, high-frequency vibration and screen flashing, and audible and visual alarm and location broadcast. The low-frequency vibration command has a vibration frequency of 1Hz, a vibration duration of 500ms, and an interval of 2000ms; the high-frequency vibration command has a vibration frequency of 5Hz, a vibration duration of 200ms, and an interval of 300ms; the screen flashing command controls the smartphone screen to switch between on and off at a frequency of 2Hz; the sound and light alarm command controls the smartphone to play a preset alarm audio at maximum volume while simultaneously controlling the flashlight to flash continuously; the location broadcast command sends the real-time location information and abnormal separation status information of the target smartphone and the target power bank to the preset emergency contact terminal via SMS or instant messaging application.
[0051] Table 4. Correspondence between the interval division and execution actions of the graded early warning instructions. 0<r≤0.2 Level 1 warning Low-frequency vibration command Smartphone vibration module The vibration frequency is 1Hz, the duration of a single vibration is 500ms, the interval is 2000ms, and the duration is 10s. 0.2<r≤0.5 Level II Warning High-frequency vibration command + screen flashing command Smartphone vibration module, display module Vibration frequency 5Hz, single vibration duration 200ms, interval duration 300ms; screen on / off switching frequency 2Hz, duration 15s. r>0.5 Level III Warning Audible and visual alarm commands + location broadcast commands Smartphone vibration module, audio module, flash module, mobile communication module The alarm audio plays at maximum volume, the flashlight flashes continuously, and the location and abnormal status information are simultaneously sent to preset emergency contacts for 30 seconds. The multi-scenario integrated anti-loss positioning smart alarm real-time protection system for power banks includes a cloud-based big data analysis platform, multiple power banks, and multiple smartphones. Each power bank has a built-in Bluetooth communication module, satellite positioning module, mobile communication module, and microcontroller unit. The microcontroller unit is electrically connected to each of these modules to control data acquisition and transmission. The Bluetooth communication module establishes a Bluetooth communication link with the paired smartphone and collects Bluetooth connection status data. The satellite positioning module collects real-time location data from the power bank and generates a real-time location sequence. The mobile communication module establishes a communication link with the cloud-based big data analysis platform, uploading the collected real-time location sequence and Bluetooth connection status data to the platform, while also receiving commands from the platform.
[0052] Multiple smartphones are equipped with built-in Bluetooth communication modules, satellite positioning modules, mobile communication modules, vibration modules, display modules, audio modules, and flash modules. These modules are used to establish a Bluetooth communication link with paired power banks, collect their own real-time location sequence and Bluetooth connection status data, and upload them to a cloud-based big data analysis platform. Simultaneously, they receive tiered early warning commands from the cloud-based big data analysis platform and invoke the corresponding modules to execute early warning operations.
[0053] The cloud-based big data analytics platform adopts a distributed cloud architecture, including a data access module, a data storage module, a matrix construction module, a graph neural network calculation module, an anomaly detection module, and an early warning command generation module. The data access module establishes communication links with multiple power banks and smartphones, continuously collecting real-time location sequences and Bluetooth connection status data of paired groups within a defined geographical area. The data storage module stores the collected time-series data, intermediate calculation results, model parameters, and baseline feature data. The matrix construction module constructs a group spatiotemporal correlation matrix based on the collected real-time location sequences and Bluetooth connection status data. The graph neural network calculation module runs graph neural network algorithms to process the group spatiotemporal correlation matrix, extract baseline features of group behavior, and calculate the feature vector and residual values of the target paired groups. The anomaly detection module compares the residual values with anomaly boundaries to determine whether an abnormal separation has occurred in the target paired groups. The early warning command generation module generates tiered early warning commands based on the abnormal separation status and sends them to the corresponding target smartphones.
[0054] This embodiment calculates residual values using Mahalanobis distance, eliminating the influence of feature dimension correlation and dimensional differences, and improving the accuracy of deviation calculation. It fits the probability density distribution of historical samples using a Gaussian mixture model and determines the anomaly boundary using pre-set confidence levels, eliminating statistical bias under different data distributions. A linear regression correction model is constructed using environmental covariates to dynamically correct the anomaly boundary, allowing it to adapt to different environmental conditions and further reducing misjudgments caused by environmental interference. By dividing three continuous intervals using difference ratios, corresponding level-based early warning commands are generated and executed, enabling differentiated early warnings based on the severity of anomaly separation. This reduces the consumption of network communication resources by redundant alarms and improves the effectiveness of anti-loss early warnings.
Claims
1. A multi-scene power bank integrated anti-lost positioning intelligent alarm real-time guardian method, characterized in that, The method includes: a cloud-based big data analysis platform continuously collecting real-time location sequences and Bluetooth connection status data of multiple power banks and multiple smartphone pairing groups within a set geographical area; The cloud-based big data analysis platform constructs a spatiotemporal correlation matrix of the population based on the real-time location sequence and the Bluetooth connection status data. The cloud-based big data analysis platform uses a graph neural network algorithm to process the spatiotemporal correlation matrix of the group. Taking the smartphone as a node and the relative distance change rate between the smartphone and the power bank as the edge weight, it extracts the baseline features of the group behavior of the power bank and smartphone maintaining a connection state within the geographical area. The cloud-based big data analysis platform inputs the rate of change of the relative distance between the target smartphone and the target power bank into the graph neural network to calculate the residual value between the current input feature and the baseline feature of the group behavior; If the residual value exceeds the preset abnormal boundary, the cloud-based big data analysis platform determines that the target pairing group has abnormally separated, and generates a graded early warning instruction based on the abnormal separation status and sends it to the target smartphone to execute the corresponding level of early warning operation. 2.The multi-scene power bank integrated anti-lost positioning and intelligent alarm real-time guarding method according to claim 1, characterized in that, The construction of the spatiotemporal correlation matrix of the group includes: the cloud big data analysis platform divides the set geographical area into multiple spatial grids, and performs slicing processing on the real-time location sequence of the multiple power banks and multiple smartphone pairing groups according to the set time window; For any spatial grid within the set time window, the cloud-based big data analysis platform calculates the Euclidean distance between the smartphone and the power bank in each pairing group falling within the spatial grid, and divides the difference between the Euclidean distance in the current set time window and the Euclidean distance in the previous set time window by the length of the time window to generate the relative distance change rate. The cloud-based big data analysis platform uses the relative distance change rate of all pairing groups within the spatial grid as matrix elements to generate an initial correlation matrix with pairing groups as row and column indices. It then uses the connection stability index in the Bluetooth connection status data as a mask matrix and performs a Hadamard product operation with the initial correlation matrix to generate the group spatiotemporal correlation matrix. 3.The multi-scene power bank integrated anti-lost positioning and intelligent alarm real-time guarding method according to claim 1, characterized in that, The process of using a graph neural network algorithm to process the spatiotemporal correlation matrix of the population includes: the graph neural network algorithm comprises a graph convolutional layer and a graph attention network layer connected in sequence; The graph convolutional layer receives the group spatiotemporal correlation matrix and aggregates the feature vectors of adjacent nodes according to the edge weights to generate node-level aggregated features. The graph attention network layer receives the node-level aggregated features, calculates the attention coefficients between nodes, performs a weighted summation of the node-level aggregated features, and outputs a hidden layer feature vector containing global spatial topological dependencies. The cloud-based big data analysis platform inputs the hidden layer feature vector into a fully connected layer for nonlinear mapping, outputs a set of feature representations for all paired groups within the geographical region, and determines the mean vector of the feature representation set as the baseline feature of the group behavior.
4. The multi-scenario integrated anti-loss positioning intelligent alarm real-time protection method for power banks according to claim 1, characterized in that, The extraction of baseline features of group behavior in which power banks and smartphones remain connected within the geographical area includes: the cloud-based big data analysis platform maintains a circular buffer queue, which stores feature representation sets corresponding to multiple consecutive set time windows; Within the currently set time window, the cloud-based big data analysis platform stores the feature representation set of the current moment into the circular buffer queue and removes the feature representation set of the earliest initial moment stored in the circular buffer queue. The cloud-based big data analysis platform performs time-dimensional mean pooling on all feature representation sets stored in the circular buffer queue to generate a dynamic baseline vector. The cloud-based big data analysis platform performs a weighted fusion of the dynamic baseline vector and the historical default baseline vector, wherein the fusion weight is determined by the fill rate of the circular buffer queue, and updates the fused vector with the group behavior baseline features.
5. The multi-scenario integrated anti-loss positioning intelligent alarm real-time protection method for power banks according to claim 1, characterized in that, The calculation of the residual value between the current input feature and the group behavior baseline feature includes: the cloud big data analysis platform obtains the target feature vectors of the target smartphone and the target power bank within the current set time window, calculates the Mahalanobis distance between the target feature vector and the group behavior baseline feature, and determines the Mahalanobis distance as the residual value; The cloud-based big data analysis platform obtains a historical sample set consisting of Mahalanobis distances of all paired groups within a set historical time period, and uses a Gaussian mixture model to fit the probability density of the historical sample set. Based on the probability density fitting results, the cloud-based big data analysis platform calculates the quantiles of the historical sample set at a preset confidence level, and sets the product of the quantiles and a preset amplification factor as the anomaly boundary.
6. The multi-scenario integrated anti-loss positioning intelligent alarm real-time protection method for power banks according to claim 1, characterized in that, The step of generating a graded early warning instruction based on the abnormal separation state includes: the cloud-based big data analysis platform calculating the ratio of the difference between the residual value and the abnormal boundary, and dividing the ratio of the difference into three continuous intervals; When the difference ratio is in the first range, the cloud-based big data analysis platform generates a low-frequency vibration command as the graded early warning command; When the difference ratio is in the second interval, the cloud-based big data analysis platform generates a combination of high-frequency vibration command and screen flashing command as the graded early warning command. When the difference ratio is in the third interval, the cloud big data analysis platform generates a combination of an audible and visual alarm command and a location broadcast command sent to a preset emergency contact terminal as the graded early warning command. The target smartphone receives the graded warning command and executes the corresponding operations in the order of low-frequency vibration, high-frequency vibration and screen flashing, and sound and light alarm and location broadcast.
7. The multi-scenario integrated anti-loss positioning intelligent alarm real-time protection method for power banks according to claim 2, characterized in that, The generation of the spatiotemporal correlation matrix of the group further includes: for the null elements in the initial correlation matrix caused by the lack of Bluetooth connection status data, the cloud big data analysis platform extracts the relative distance change rate sequence of the corresponding pairing group within three consecutive set time windows before the missing time. The cloud-based big data analysis platform uses a cubic spline interpolation algorithm to fit the relative distance change rate sequence, predicts the interpolation change rate at missing times, and fills the missing element positions of the initial correlation matrix with the interpolation change rate. Meanwhile, the cloud-based big data analysis platform extracts the variance of the received signal strength indicator value fluctuation from the Bluetooth connection status data, uses the variance of the received signal strength indicator value fluctuation as an additional edge feature, and concatenates it with the relative distance change rate to generate an expanded group spatiotemporal correlation matrix.
8. The multi-scenario integrated anti-loss positioning intelligent alarm real-time protection method for power banks according to claim 3, characterized in that, The graph neural network algorithm further includes a temporal convolutional network layer, which is disposed between the graph attention network layer and the fully connected layer; The temporal convolutional network layer receives the feature vectors from the hidden layer and arranges them in temporal order according to the set time window to form a feature vector sequence; The temporal convolutional network layer uses multi-scale dilated convolution kernels to perform one-dimensional convolution operations on the feature vector sequence to extract local temporal feature maps at different time spans. The temporal convolutional network layer concatenates the local temporal feature maps of different time spans along the channel dimension to generate a spatiotemporal fusion feature vector. The cloud-based big data analysis platform inputs the spatiotemporal fusion feature vector into the fully connected layer for nonlinear mapping and outputs an updated feature representation set.
9. The multi-scenario integrated anti-loss positioning intelligent alarm real-time protection method for power banks according to claim 5, characterized in that, The setting of the abnormal boundary also includes: the cloud big data analysis platform acquiring environmental covariate data within the set geographical area, the environmental covariate data including regional population density indicators and base station load indicators; The cloud-based big data analysis platform constructs a linear regression correction model that takes the environmental covariate data as input and the anomaly boundary as output. When the environmental covariate data for the current moment is received, the cloud-based big data analysis platform inputs the environmental covariate data for the current moment into the linear regression correction model to calculate the boundary correction value; The cloud-based big data analysis platform adds the boundary correction value to the product of the quantile and the preset amplification factor, and resets the sum as the abnormal boundary.
10. A multi-scenario integrated anti-loss positioning intelligent alarm real-time protection system for power banks, characterized in that: The system includes a cloud-based big data analysis platform, multiple power banks, and multiple smartphones; The multiple power banks are used to collect real-time location sequences and Bluetooth connection status data; The multiple smartphones are used to collect real-time location sequences and Bluetooth connection status data; The cloud-based big data analysis platform is used to continuously collect real-time location sequences and Bluetooth connection status data of the multiple power banks and multiple smartphone pairing groups within a set geographical area, and to construct a group spatiotemporal correlation matrix based on the real-time location sequences and Bluetooth connection status data; The cloud-based big data analysis platform is also used to process the spatiotemporal correlation matrix of the group using a graph neural network algorithm. Taking the smartphone as a node and the relative distance change rate between the smartphone and the power bank as the edge weight, the platform extracts the baseline features of the group behavior of the power bank and the smartphone maintaining a connection state within the geographical area. The cloud-based big data analysis platform is also used to input the relative distance change rate between the target smartphone and the target power bank into the graph neural network, calculate the residual value between the current input feature and the group behavior baseline feature, and if the residual value exceeds the preset abnormal boundary, it is determined that the target pairing group has abnormally separated, and a graded early warning instruction is generated according to the abnormal separation state. The target smartphone is also used to receive the graded warning instructions and execute the corresponding level of warning operation.