A method and system for gun power trend analysis
By constructing a feature matrix and using a graph attention network model to predict the load risk and aging of gun batteries, the problem of the inability to predict dynamic failure of gun batteries in existing technologies is solved, and accurate analysis and efficient management of battery health are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG ANBANG SECURITY TECH SERVICE CO LTD
- Filing Date
- 2026-02-04
- Publication Date
- 2026-06-02
AI Technical Summary
Existing gun battery management technologies only monitor static voltage or charge percentage, and cannot provide early warning of dynamic battery failures, which can cause the battery to suddenly shut down at low temperatures or during aging, affecting mission execution and personnel safety. Furthermore, they lack analysis and prediction of battery health degradation trends.
By acquiring multidimensional data from historical delivery missions, including mission data, battery data, and environmental data, a feature matrix is constructed. Graph attention network models and large models are used to predict the load risk, status, and usage habits of gun batteries, predict future battery aging and risks, and provide predictive analysis at multiple time scales.
It improves the accuracy of gun battery power trend analysis, enables early warning of statically charged but dynamically failed batteries, ensures successful mission execution and personnel safety, and reduces operation and maintenance costs.
Smart Images

Figure CN122132732A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of big data technology, specifically to a method and system for analyzing the battery power trend of firearms. Background Technology
[0002] In special industries such as escort and security, electronic firearms such as stun guns are key equipment, and their battery management is directly related to the success of the mission and the safety of personnel.
[0003] However, existing gun battery management technologies typically only monitor the battery's static voltage or charge percentage, resulting in a limited monitoring dimension. Furthermore, the voltage percentage is measured under the gun battery's standby micro-current, failing to provide early warning of dynamic battery failure. For example, a gun battery aged or operating in low-temperature environments might show a static voltage percentage of 15%, but upon triggering, its voltage could plummet below the shutdown threshold, rendering it unable to fire despite having power, thus impacting mission execution and personnel safety. Summary of the Invention
[0004] To overcome the problems existing in the related technologies, this disclosure provides a method and system for analyzing the electrical charge trend of firearms, thereby addressing the deficiencies in the related technologies.
[0005] According to a first aspect of the present disclosure, a method for analyzing the electrical charge trend of firearms is provided, comprising:
[0006] Obtain target data related to the battery level of firearms from historical delivery missions, and convert the target data into a feature matrix. The target data includes mission data of the historical delivery missions, battery data of the firearms, usage data of the firearms, and environmental data of the environment in which the firearms are located. The rows in the feature matrix correspond to the delivery missions, and the columns in the feature matrix correspond to the feature types.
[0007] Based on the feature matrix and the task data, the battery load risk of the firearm is determined, and based on the battery data, the battery status of the firearm is determined. Based on the usage data and the battery data, the usage habit information of the firearm is determined, wherein the battery load risk characterizes the degree of mismatch between the battery output capacity of the firearm and the historical delivery tasks.
[0008] Based on at least the battery load risk, battery status, and usage habit information, a large model is used to predict the battery aging of the firearm in the first preset time period, the battery risk of the firearm in the second preset time period, and the daily battery risk of the firearm in the second preset time period.
[0009] According to a second aspect of the present disclosure, a system for analyzing the battery charge trend of a firearm is provided, including a sensor module mounted on the firearm, a local terminal deployed in the vehicle to which the firearm belongs, and a cloud platform;
[0010] The sensor module is used to collect battery data of the gun and environmental data of the environment in which the gun is located, and to send the battery data and the environmental data to the local terminal;
[0011] The local terminal is used to upload the battery data and the environmental data to the cloud platform;
[0012] The cloud platform is used to execute the method for firearm battery power trend analysis described in the first aspect.
[0013] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0014] The method for analyzing firearm battery power trends provided in this disclosure collects and integrates multi-dimensional data, including mission data, battery data, usage data, and environmental data, for analysis. This provides a reliable data foundation for subsequent analysis, thereby improving the accuracy of firearm battery power trend analysis. By analyzing battery load risk, the dynamic output capacity of the battery can be quantitatively matched with specific mission requirements, effectively providing early warning of firearm battery risks such as static charging and dynamic failure, ensuring the successful execution of related missions and the safety of relevant personnel.
[0015] Furthermore, by using a large-scale model to predict the battery aging of firearms over a first preset time period, the future degradation trend of firearm battery performance can be clearly identified. By predicting the battery risk and daily battery risk over a second preset time period, high-risk firearms and high-risk dates can be identified in advance. Thus, providing multi-timescale predictive analysis results transforms firearm battery trend analysis from a passive response to proactive prevention, thereby improving the efficiency of firearm battery trend analysis and reducing firearm battery maintenance costs. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0017] Figure 1 This is a flowchart illustrating a method for analyzing the electrical charge trend of a firearm, as shown in an exemplary embodiment of this disclosure;
[0018] Figure 2 This is a schematic diagram of the structure of a system for analyzing the electrical charge trend of a firearm, as illustrated in an exemplary embodiment of this disclosure. Detailed Implementation
[0019] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.
[0020] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” used in this disclosure are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more associated listed items. It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of this disclosure, and similarly, second information may also be referred to as first information.
[0021] As mentioned in the background section, existing gun battery management technologies typically only monitor the battery's static voltage or charge percentage, resulting in a single monitoring dimension. Furthermore, the voltage percentage is measured under the gun battery's standby micro-current, which cannot provide early warning of dynamic battery failure.
[0022] Furthermore, for a convoy with hundreds of firearms, it's not enough to simply know which gun has low battery; it's also crucial to understand the overall aging status of the batteries, which guns' batteries require priority replacement rather than simple charging, and the approximate number of guns likely to experience problems in the coming week. However, current firearm battery management technologies only improve the instantaneous state of the batteries through voltage or charge percentage, lacking the ability to analyze and predict battery health degradation trends. This makes it impossible to scientifically formulate battery replacement and maintenance plans, resulting in reactive responses to faults, high maintenance costs, and potential safety hazards.
[0023] Based on this, in a first aspect, at least one embodiment of this disclosure provides a method for analyzing the electrical charge trend of firearms. Please refer to the appendix. Figure 1 It illustrates the process of the method, including steps S101 to S103.
[0024] In step S101, target data related to the battery level of the firearms from historical delivery missions is acquired and converted into a feature matrix. The target data includes mission data from historical delivery missions, firearm battery data, firearm usage data, and environmental data of the firearms' location. Rows in the feature matrix correspond to delivery missions, and columns correspond to feature types.
[0025] In step S102, the battery load risk of the firearm is determined based on the feature matrix and task data, the battery status of the firearm is determined based on battery data, and the usage habit information of the firearm is determined based on usage data. The battery load risk characterizes the degree of mismatch between the firearm's battery output capacity and its historical delivery tasks.
[0026] In step S103, the large model is used to predict the battery aging of the gun in the first preset time period, the battery risk of the gun in the second preset time period, and the daily battery risk of the gun in the second preset time period, based at least on battery load risk, battery status, and usage habit information.
[0027] Therefore, collecting and integrating multi-dimensional data, including mission data, battery data, usage data, and environmental data, provides a reliable data foundation for subsequent analysis, thereby improving the accuracy of firearm battery power trend analysis. By analyzing battery load risk, the dynamic output capacity of the battery and its match with specific mission requirements can be quantified, effectively providing early warning of firearm battery risks such as static charging and dynamic failure, ensuring the successful execution of related missions and the safety of relevant personnel.
[0028] Furthermore, by using a large-scale model to predict the battery aging of firearms over a first preset time period, the future degradation trend of firearm battery performance can be clearly identified. By predicting the battery risk and daily battery risk over a second preset time period, high-risk firearms and high-risk dates can be identified in advance. Thus, providing multi-timescale predictive analysis results transforms firearm battery trend analysis from a passive response to proactive prevention, thereby improving the efficiency of firearm battery trend analysis and reducing firearm battery maintenance costs.
[0029] To facilitate understanding, the steps described above will be further explained below.
[0030] For example, mission data may include the location, stops, mission schedule, site geofences, and electronic waybill information of the vehicles to which the firearms belong in historical delivery missions. Electronic waybill information may include mission type (e.g., cash transport, escort, etc.) and waybill status information. Waybill status information may include waybill statuses such as outbound, en route, arrived at the destination, and returned to the warehouse, along with the corresponding time information.
[0031] For example, battery data can include voltage and current response curves under pulsed load, characteristic parameters of the complete charge and discharge process (such as total charging capacity, CC / CV (Constant Current / Constant Voltage) phase duration during charging), resting open-circuit voltage and self-discharge rate, and AC impedance spectroscopy. Specifically, the voltage and current response curves under pulsed load can be used to evaluate the high power output capability and dynamic internal resistance of the gun battery; the characteristic parameters of the complete charge and discharge process can track the battery's capacity decay and changes in charging behavior; the resting open-circuit voltage and self-discharge rate can calibrate the battery's charge level and detect early faults such as internal micro-short circuits; and the AC impedance spectroscopy can be used to diagnose the aging mode of the gun battery's internal chemical system. Therefore, through multi-dimensional battery data, the battery's condition and aging status can be more accurately determined.
[0032] For example, the data used may include trigger pull pressure sensor readings, frequency of changes in the gun's attitude angle, etc. Environmental data may include temperature and humidity sensor data within the holster, as well as the vehicle's air conditioning logs, etc.
[0033] In some embodiments, in step S101, all data in the target data can be labeled with a unified timestamp, and based on the first time point corresponding to the first task boundary of the historical transportation task, the data can be traced back to the second time point corresponding to the second task boundary. All data between the first and second time points is encapsulated into multi-dimensional data segments that correspond to a specific task stage and are temporally continuous. Matrix processing is then performed on the multi-dimensional data segments to obtain a feature matrix. The task boundary of the historical transportation task is determined based on at least one of the following: the electronic waybill status of the historical transportation task, the key geofence associated with the historical transportation task, and the gun attitude information in the historical transportation task. The second task boundary is the previous task boundary of the first task boundary.
[0034] In some embodiments, the task data includes the electronic waybill status of historical delivery tasks and the location information of delivery vehicles carrying firearms in historical delivery tasks, and the task boundaries of historical delivery tasks are determined by at least one of the following methods:
[0035] When the electronic waybill status changes, the task boundary that triggers the historical delivery task is determined;
[0036] The location information of the transport vehicle is compared with the preset key geofence to obtain the comparison result. When the comparison result indicates that the transport vehicle enters or leaves the key geofence, the task boundary that triggers the historical transport task is determined. The key geofence includes the vault area and the escort network area.
[0037] Based on the comparison results, the task stage of the historical transportation mission is determined, and the status of the firearm in the historical transportation mission is identified. When the firearm status changes from a carried state to a handheld state and the task stage is not in the branch handover stage, the task boundary that triggers the historical transportation mission is determined. The task stage includes the vault operation stage, the transportation in transit stage, and the branch handover stage.
[0038] In other words, the data sequence can be segmented based on the natural boundaries of the cash transport mission, thereby dividing the continuous data stream into independent analysis units with clear physical meaning according to the actual stage transition of the transport mission, ensuring that the subsequent large model identifies the gun battery behavior patterns that are strongly correlated with the specific mission.
[0039] For example, when the electronic waybill status changes from "en route" to "arrived at the destination," a natural boundary is triggered. All multi-source data collected since the point of departure or the previous boundary (such as the location and trajectory of the transport vehicle, the battery voltage of the firearm, and the temperature of the holster) are aligned and encapsulated into a multi-dimensional data segment, labeled as {Stage: Transportation}. Thus, based on the change in the electronic waybill status, continuous spatiotemporal data is segmented and labeled into independent stage segments with clear business semantics.
[0040] For example, the cash transport task process is as follows: loading into the vault, road transport, handover at bank branch A, road transport, and return to the vault. Two key geofences are preset: fence_G (vault area) and fence_B_A (bank branch A area). When the cash transport vehicle carrying firearms leaves fence_G (vault), it indicates that the previous stage (operations within the vault) has ended. Therefore, a natural boundary is triggered, and based on this natural boundary, the continuous spatiotemporal data stream is segmented and labeled into independent stage segments with clear business semantics.
[0041] For example, a vehicle carrying firearms is en route to a target location (the current stage is marked as the transit stage), and has not yet reached the location's geofence. At this point, the firearms are in a long-term stationary state. By analyzing the firearms' three-axis accelerometer and gyroscope data, it can be determined that the firearms' state has changed from a long-term stationary state to a continuously active state. Furthermore, based on the comparison results of the transport vehicle entering or leaving the key geofence, it is determined that the vehicle is in the transit stage, i.e., not yet in the location handover stage, thus triggering a natural boundary. Therefore, by observing the changes in the physical state of the firearms themselves, the continuous spatiotemporal data stream can be segmented and labeled into independent stage segments with clear business semantics.
[0042] It should be understood that during the branch handover phase, the movement and patrolling of escort personnel may inadvertently trigger data segmentation. Therefore, this embodiment of the disclosure needs to determine whether the task phase is within the branch handover phase. Furthermore, it should be understood that the above methods for determining natural boundaries can be combined according to actual circumstances, and this embodiment of the disclosure does not limit this. For example, location data and electronic waybill status can be used preferentially to determine natural boundaries; if there are problems or inaccuracies in the location data and electronic waybill status, natural boundaries can be determined by changes in the physical state of the firearm itself.
[0043] In some embodiments, the task data includes vehicle information of the vehicles to which the firearms belong in historical delivery tasks, as well as task coordination information and attribute information of the firearms in historical delivery tasks. Accordingly, in step S102, a weighted undirected graph representing the topological relationships of firearms in historical delivery tasks can be constructed based on the task data. In this graph, nodes correspond to individual firearms, and edges represent attribute relationships and / or task relationships between firearms. The attention layer of the graph attention network model performs feature aggregation based on the weighted undirected graph and the feature matrix to obtain a new feature representation for each node in the weighted undirected graph. The regression prediction layer of the graph attention model calculates a scalar value within a preset continuous range as the battery load risk score for the firearm based on the new feature representation of each node.
[0044] For example, the preset continuous range can be 0-1 or 0-100.
[0045] For example, a graph attention network model includes an input layer, a core graph attention layer (i.e., a hidden layer), and a regression prediction layer (i.e., an output layer). The input layer receives a weighted undirected graph (e.g., topology, edge weights) representing the topological relationships of firearms in historical delivery missions, and a matrix of node features. The core graph attention layer performs message passing and feature aggregation, generating high-order feature representations of nodes that incorporate neighborhood information. The regression prediction layer maps the updated node features to a scalar value (i.e., a load risk score).
[0046] For example, the training process of the graph attention model includes: extracting multiple snapshots of the delivery fleet status at various time points from a historical database as training samples. Each sample includes a node feature matrix generated based on the aggregation of historical task fragments, a graph structure and edge weights constructed based on historical scheduling relationships, and node labels generated based on subsequent battery performance or fault records. Using the node feature matrix and graph structure as input, and the node labels as the supervision target, the graph attention network model is trained using the backpropagation algorithm and gradient descent optimizer until its prediction error converges.
[0047] For example, if two guns are deployed on the same transport vehicle to perform a task, a spatially co-located edge is established between the corresponding nodes, and a first weight value (e.g., 0.8) is assigned. If the two guns are assigned to the same task group to perform a collaborative task, a task collaboration edge is established between the corresponding nodes, and a second weight value (e.g., 0.5) is assigned. If the two guns belong to the same product batch and model, a model-same edge is established between the corresponding nodes, and a third weight value (e.g., 0.3) is assigned.
[0048] For example, for each node in a weighted undirected graph, the attention coefficient between it and all its neighboring nodes can be calculated. This attention coefficient can be determined by the features of the neighboring nodes, the weights of the edges, and the learnable parameter matrix. Then, based on this attention coefficient, the features of all neighboring nodes are weighted and summed to obtain aggregated neighbor features. Finally, the features of the target node itself are combined with the aggregated neighbor features, and an updated feature representation of the target node is generated through a non-linear activation function.
[0049] For example, the armored truck convoy has four stun guns: G-101, G-102, G-201, and G-202. G-101 and G-102 are permanently deployed in vehicle V1, while G-201 and G-202 are permanently deployed in vehicle V2. Furthermore, G-101 and G-201 were assigned to the same task force twice last week for coordinated escort operations. All firearms are of the same model.
[0050] First, a weighted undirected graph is constructed based on the preset association rules. This weighted undirected graph includes four nodes, corresponding to guns G-101, G-102, G-201, and G-202. Since G-101 and G-102 are in the same vehicle, and G-201 and G-202 are in the same vehicle, a spatial co-location edge is established, with a weight of 0.8 for each. Since G-101 and G-201 have a collaborative history, a task collaboration edge is established, with a weight of 0.5. All guns are of the same model, so a model-same edge is established between every two guns, with a weight of 0.3.
[0051] Then, target data related to battery level for each gun over the past 24 hours is acquired. After feature transformation, the respective feature matrices are obtained as the initial attributes of the corresponding nodes. The weighted undirected graph and the node feature matrices are input into a pre-trained graph attention network model. Taking node G-101 as an example, the model calculates the attention coefficients between G-101 and all its neighboring nodes (G-102, G-201, and G-202 connected via model edges). For example, the attention coefficient between G-101 and G-102 is 0.6, the attention coefficient between G-101 and G-201 is 0.3, and the attention coefficient between G-101 and G-202 is 0.1. Then, based on the attention coefficients, the feature vectors of the neighboring nodes are weighted and summed to generate the aggregated neighbor features of G-101. Finally, G-101's own feature vector and the aggregated neighbor features are concatenated and then subjected to a nonlinear transformation to generate the updated feature representation of G-101. Therefore, the updated feature representation of a node not only includes its own historical battery load information, but also incorporates the battery load patterns of other guns closely related to it.
[0052] Finally, the updated feature representation of each node is input into the regression prediction layer of the graph attention network model to obtain the quantified load risk score for each gun. For example, the battery load risk score of G-101 is 82, that of G-102 is 35, that of G-201 is 75, and that of G-202 is 40.
[0053] By using the above method and modeling the correlation between guns through graph attention networks, the propagation of battery load risk among guns can be simulated, generating a load risk assessment that is more in line with real-world collaborative operation scenarios. Compared with the method of assessing each gun in isolation, this can improve the accuracy and comprehensiveness of gun battery early warning.
[0054] In some embodiments, in step S102, a node whose battery load risk score exceeds a preset risk threshold is taken as the initial risk node. A random walk simulation is performed based on the edge weights between nodes in the weighted undirected graph to obtain a simulated propagation path. Based on the simulated propagation path and the total number of simulations, the risk propagation probability from the initial risk node to other nodes in the weighted undirected graph is obtained. Based on the risk propagation probability, the battery load risk path of the gun is obtained. The probability of walking from the first node to the adjacent second node is proportional to the edge weight between the first node and the second node.
[0055] Using the example above, the battery load risk scores for the four guns, obtained through a graph attention network model, are: G-101=82, G-102=35, G-201=75, and G-202=40, with a preset risk threshold of 70. First, the initial risk nodes G-101 and G-201 are identified. Then, on the weighted undirected graph, a weighted random walk simulation is performed on each initial risk node to obtain the risk propagation probability.
[0056] Taking the initial risk node G-101 as an example, we set the number of random walks L=3 (i.e., simulating 3 hops of risk propagation) and the number of random walks N=10000, and define the probability of walking from the current node to any of its neighboring nodes as proportional to the edge weight connecting the two. G-101 has three edges, leading to G-102 (edge weight = 0.8), to G-201 (edge weight = 0.5), and to G-202 (edge weight = 0.3). Therefore, the probability of walking to G-102 is: 0.8 / (0.8+0.5+0.3)=0.5. Similarly, the probability of walking to G-201 is 0.31, and the probability of walking to G-202 is 0.19.
[0057] It should be understood that converting edge weights into walk probabilities between nodes makes the simulation process not unbiased randomness, but a random process guided by actual data. This ensures that the risk propagation paths and probabilities output later can truly reflect the inherent laws of the spread of high-risk battery loads in specific business relationship networks, thereby improving the accuracy of the risk propagation paths of gun battery loads.
[0058] Then, based on the walk probabilities between nodes, 10,000 random walks are performed starting from G-101. Each walk randomly selects a neighboring node, and a total of 3 steps are taken. The destination node of each walk path is recorded, and the frequency of each destination node in all walk paths is counted. If, in the 10,000 3-step walks starting from G-101, the destination node G-102 appears 4,200 times, then the propagation probability is: 4,200 / 10,000 = 0.42. Similarly, if the destination node G-201 appears 3,500 times, then the propagation probability is 0.35; if the destination node G-202 appears 2,000 times, then the propagation probability is 0.20; and if the destination node G-101 still appears 300 times, then the propagation probability is 0.03.
[0059] Finally, based on the descending order of propagation probabilities, the most probable risk propagation path is generated for each initial risk source node. For example, for the initial risk source node G-101, based on the highest propagation probability of 0.42, the walkthrough data is backtracked to find all paths ending at G-102 with the highest frequency, which is G-101-G-102 (direct propagation). Therefore, the first propagation path is generated: G-101-G-102, with a propagation probability of 0.42. Next, for the second highest propagation probability of 0.35, the high-frequency path G-101-G-201 is obtained through backtracking, generating the second path: G-101-G-201 (task collaboration), with a propagation probability of 0.35. Similarly, for the lowest propagation probability of 0.20, the third path is generated: G-101-G-202 (same model), with a propagation probability of 0.20.
[0060] Therefore, by predicting the battery load propagation path, we can proactively reveal the potential spread direction and chain of high-risk battery modes. For example, we can clearly warn that there is a 42% probability that the high load risk of G-101 will directly affect G-102 in the same vehicle. This allows us to more accurately and timely prevent the spread of gun battery load risks and improve the safety and reliability of gun batteries.
[0061] In some embodiments, in step S102, graph clustering can be performed on the weighted undirected graph based on the new feature representation of all nodes to obtain multiple groups, and the average value of the battery load risk score of all nodes in each group can be calculated. Target groups whose average value exceeds the overall average value are identified, and vehicles to which the guns belong in the target groups are identified as vehicles with battery load risk. The overall average value is the average value of the battery load risk score of all target nodes, and the target node is the node in which the corresponding gun is in normal use.
[0062] For example, normal use status indicates that the firearm is not in a state of being turned off, under maintenance, or in storage.
[0063] Using the example above, in the weighted undirected graph, there is an edge with a weight of 0.8 between G-101 and G-102 (spatial co-location), an edge with a weight of 0.8 between G-201 and G-202 (spatial co-location), and an edge with a weight of 0.5 between G-101 and G-201 (task collaboration).
[0064] First, the Louvain community detection algorithm is used to perform cluster analysis on the weighted undirected graph with the optimization objective of maximizing modularity, resulting in multiple communities (i.e., groups). Among these, the edge weight (0.8) between nodes G-101 and G-102 is identified as higher than the edge weights between them and other nodes (e.g., 0.5), indicating a close connection between them. Similarly, a close connection is also formed between G-201 and G-202. Therefore, the four nodes are divided into two communities: community C1 (containing nodes G-101 and G-102) and community C2 (containing nodes G-201 and G-202).
[0065] Then, the average battery load risk score within community C1 is calculated as (82+35) / 2 = 58.5, the average battery load risk score within community C2 is calculated as (75+40) / 2 = 57.5, and the overall average is calculated as (82+35+75+40) / 4 = 58.0. Next, based on the identification rule that the average load risk score exceeds the overall average, the transport vehicles belonging to community C1 (i.e., the gun group consisting of G-101 and G-102) are identified as load hotspot areas (i.e., vehicles with battery load risks).
[0066] Therefore, a systematic pattern of firearm battery risk aggregation can be extracted from discrete individual firearm risk assessments, guiding firearm battery management to upgrade from point-to-point response for individual firearms to batch response for specific vehicles or groups. This improves the allocation efficiency of firearm battery maintenance resources and enables intelligent upgrades of firearm battery power trend analysis from individual firearms to groups of firearms.
[0067] It should be understood that after obtaining the battery load risk score of the firearm, it is possible to predict only the battery load risk path of the firearm, or only the battery load risk vehicle, or both the battery load risk path and the battery load risk vehicle of the firearm at the same time. This disclosure does not limit this.
[0068] In some embodiments, the battery status may include the battery's state of charge, state of charge (SOC), etc., which can be calculated based on battery data.
[0069] In some embodiments, firearm usage habit information includes the firearm's operating modes and a habit aging correlation model. This habit aging correlation model characterizes the association between firearm usage habits and battery aging. Based on usage data and battery data, determining firearm usage habit information includes: extracting multiple operation segments from usage data and battery data based on a preset time window, and converting each operation segment into an operation feature vector; performing cluster analysis on the operation feature vectors to obtain clusters, and parsing the centroid vectors of the clusters; adding operation mode labels with business semantics to the clusters based on the matching relationship between the values of each feature dimension in the centroid vectors and a preset feature threshold range, wherein the operation mode label represents one of cautious mode, training mode, and inappropriate mode; based on the operation mode label, determining the habit intensity index of the firearm in historical delivery tasks, and obtaining the firearm's battery aging index; using the habit intensity index as the independent variable and the battery aging index as the dependent variable, fitting the firearm's habit aging correlation model through regression analysis, wherein the battery aging index is the battery capacity decay rate or the battery internal resistance growth rate.
[0070] For example, the following synchronous timing data can be continuously collected and recorded using the firearm's built-in sensors and battery management unit: trigger operation sequence data, firearm attitude motion data, and battery charge / discharge event data. The trigger operation sequence data records the precise timestamp of each trigger pull, the analog (or digital) input of the pressing stroke, and the duration. For firearm attitude motion data, the built-in six-axis inertial measurement unit (IMU) can collect the firearm's three-axis acceleration and three-axis angular velocity data at a frequency of 100Hz, and then calculate the firearm's attitude angles, trajectory, and vibration intensity based on this data. For battery charge / discharge event data, the start and end times of each charge, the total charging capacity, the CC / CV phase switching point and duration, and the instantaneous discharge current and voltage waveforms corresponding to each firing event can be recorded.
[0071] Taking each trigger pull event as the core, a time window of 4 seconds (2 seconds before and after the trigger pull) is defined, from which an independent operation segment is extracted. For the multi-source data within this segment, a six-dimensional operation feature vector is calculated, including: trigger pull duration (i.e., the length of time the trigger is effectively pressed), pre-trigger attitude stability (i.e., the standard deviation of the gun's pitch and roll angles within 1 second before trigger pull), peak discharge current (i.e., the maximum value of the battery discharge current during trigger pull), current pulse width (i.e., the cumulative time for the discharge current to exceed 50% of the rated current), post-firing attitude disturbance (i.e., the root mean square value of the composite acceleration within 1 second after trigger pull), and adjacent firing interval (i.e., the time interval between the previous firing event and the previous firing event).
[0072] For example, threshold ranges corresponding to different operation modes can be preset for the feature dimensions in the operation feature vector. For instance, for the feature dimension of trigger duration, the threshold range for the cautious mode is preset to (0, 0.3], the threshold range for the training mode is preset to (0.3, 1.0], and the threshold range for the inappropriate mode is preset to (1.0, +∞). If the values of all feature dimensions fall within the threshold range of the same mode, then a label for that mode can be added to the cluster. If the values of feature dimensions fall within the threshold ranges of different modes, then an importance weight can be preset for each feature dimension (e.g., trigger duration and firing interval have a greater impact on battery aging, so they are given higher weights), and then a weighted statistical analysis is performed based on the matching results to select the mode with the highest total weight. Thus, by preset feature threshold ranges and the values of each feature dimension in the centroid vector, operation mode labels with business semantics can be added to the cluster.
[0073] For example, the habit strength index is a quantitative value obtained by statistically calculating based on operating patterns. For instance, training mode and inappropriate mode are defined as high-intensity operating modes. The percentage of high-intensity operating segments for each gun out of the total number of operating segments is calculated as the habit strength index for that gun. For example, if we statistically analyze all operating segments of a gun within a preset period (e.g., the past 90 days), with training mode accounting for 10% and inappropriate mode accounting for 0%, the habit strength index would be: 10% + 0% = 0.10 (i.e., 10%). Alternatively, we can assign a basic weight to each operating mode (e.g., cautious mode 0.8, training mode 1.5, inappropriate mode 2.0), and then calculate a weighted average of the percentages of all operating modes for that gun's operating segments.
[0074] For example, using the habituation intensity index (H) as the independent variable and the capacity decay rate (C) and internal resistance growth rate (R) as dependent variables, a linear regression analysis can be performed to establish a capacity decay model: C = 2.05 + 16.33 × H. This indicates that for every 0.1 increase in the habituation intensity index (i.e., a 10% increase in high-intensity use), the quarterly capacity decay rate is expected to increase by approximately 1.63 percentage points on average. Similarly, an internal resistance growth model can be established: R = 6.80 + 37.22 × H. This indicates that for every 0.1 increase in the habituation intensity index H, the quarterly growth rate of the battery's DC internal resistance is expected to increase by approximately 3.72 percentage points on average.
[0075] Therefore, by using regression analysis to quantify the relationship between usage habits and gun battery aging, a tool for predicting gun battery aging can be provided, thereby improving the efficiency and accuracy of gun battery power trend analysis.
[0076] For example, in step S103, a large model can be used to directly predict the battery aging of the firearm within a first preset time period, the battery risk of the firearm within a second preset time period, and the daily battery risk of the firearm within the second preset time period, based on battery load risk, battery status, and usage habit information. Alternatively, to ensure the normal use of the firearm battery in future planned tasks, a large model can also be used to predict the battery aging of the firearm within a first preset time period, the battery risk of the firearm within a second preset time period, and the daily battery risk of the firearm within the second preset time period, based on battery load risk, battery status, usage habit information, and future planned tasks.
[0077] In some embodiments, in step S103, feature fusion can be performed based on battery load risk, battery status, and usage habit information to obtain a fused feature vector; based on the fused feature vector, the battery aging status of the gun battery in the first preset time period is obtained through a large model; and based on the fused feature vector and the planned tasks of the gun in the second preset time period, a reliability prediction sequence of the gun in the second preset time period is obtained; based on the reliability prediction sequence, the battery risk of the gun in the second preset time period and the daily battery risk of the gun in the second preset time period are determined; wherein, the reliability prediction sequence is a list of estimated probabilities that the battery performance of the gun will meet the requirements in future tasks.
[0078] For example, the first and second preset durations can be set according to needs, and this disclosure does not limit them. For example, the first preset duration can be set to 30 days and the second preset duration can be set to 7 days.
[0079] For example, the training data for the large model includes a fusion feature sequence of the firearm aggregated daily within a historical window (e.g., the past 90 days) and a sequence describing the conditions of the planned future tasks. The supervision labels include the actual battery health status values for each day within a future period (e.g., 30 days) continuous with the historical window, and the actual task execution results (i.e., probabilistic representations of success or failure) corresponding to the planned future tasks. During training, using the historical sequence and task conditions as input, and the future health status sequence and task result labels as joint supervision objectives, the parameters of the large model are optimized by minimizing the loss function. Thus, the large model can learn the intrinsic correlation between long-term battery degradation patterns and short-term task stress responses, thereby ensuring logical consistency between long-term trend prediction and short-term risk warning, and improving overall prediction accuracy.
[0080] In some embodiments, based on the fused feature vector and the planned tasks of the firearm within a second preset time period, a reliability prediction sequence for the firearm within a second preset time period is obtained, including:
[0081] Based on fused feature vectors, a probabilistic battery model incorporating parameter uncertainty distribution is constructed. Task information for the planned tasks of the firearm within a second preset time period is obtained, including task type, planned execution time, and associated environmental condition parameters. For each planned task, a standard current load profile is determined according to the task type. Using the battery state before the planned task execution as the initial condition, and based on the environmental condition parameters, the probabilistic battery model is driven to perform multiple simulations. If the firearm's battery output voltage remains above a preset minimum voltage threshold within a third preset time period during the simulation, the simulation is considered successful. The number of successful simulations is counted, and the ratio of the number of successful simulations to the total number of simulations is taken as the success probability of the planned task. Based on the execution sequence of each planned task, the success probabilities of each planned task are arranged into a reliability prediction sequence.
[0082] For example, the construction process of a probabilistic battery model includes: using the battery health state and internal resistance estimate from the fused feature vector as the core parameters of the model, and assigning a probability distribution to at least one of the core parameters based on historical error analysis or a preset confidence interval to characterize its uncertainty. For example, the probability distribution can be a normal distribution, a uniform distribution, or a triangular distribution, and this disclosure does not limit it.
[0083] For example, a standard current load profile is a pre-defined, typical curve used to describe the change in current required by the gun battery over time during the execution of a specific type of task. It can be obtained based on statistical learning of a large amount of historical task data and may include a time axis, current values, and key feature points (such as peak current, peak duration, etc.).
[0084] For example, multiple simulations can be achieved using the Monte Carlo method.
[0085] For example, for the first planned task, its initial battery state is defined by the fused feature vector. For the subsequent Nth planned task (N is an integer greater than 1), its initial battery state is inherited from the battery state after completing the simulation of the (N-1)th planned task. For instance, the remaining battery power after completing the simulation of the planned task can be obtained as follows: After completing the Monte Carlo probability simulation of the (N-1)th task, the arithmetic mean of the battery power consumption in all simulation instances is calculated, i.e., the average power consumption. Then, the average power consumption is subtracted from the battery power before executing the (N-1)th task, and the result is the remaining battery power after completing the task, which, along with other state parameters, is passed to the Nth task as its initial condition.
[0086] For example, the instantaneous output voltage under a standard current load profile can be calculated at each time step of the simulation. If the instantaneous output voltage at all time steps is higher than the minimum operating voltage threshold throughout the entire mission duration, it indicates that the gun's battery performance meets the requirements for future missions, thus confirming the success of the simulation. Finally, the result of dividing the number of successful simulations by the total number of simulations is taken as the success probability of the planned mission.
[0087] Therefore, the reliability of firearm batteries under specific mission scenarios can be quantitatively assessed. By introducing parameter uncertainty distribution and simulation, the performance uncertainty caused by individual battery differences, aging conditions, and environmental fluctuations can be effectively quantified. Furthermore, the reliability prediction sequence provides risk foresight down to each mission time point, supporting an upgrade in decision-making from battery monitoring to mission success rate prediction. This enables a shift from general early warning to precise intervention, enhancing the proactivity and safety of firearm-related mission planning and battery management.
[0088] In some embodiments, determining the battery risk of a firearm within a second preset duration and the daily battery risk of the firearm within the next second preset duration based on a reliability prediction sequence includes: selecting the minimum success probability from the reliability prediction sequence as a first reliability value, and comparing the first reliability value with a preset first risk level threshold to obtain the battery risk level of the firearm within the second preset duration; grouping the planned tasks in the reliability prediction sequence according to the planned execution date, and for each planned execution date, taking the minimum success probability of all planned tasks in the group corresponding to the planned execution date as a second reliability value, and comparing the second reliability value with a preset second risk level threshold to obtain the daily battery risk level of the firearm within the next second preset duration.
[0089] For example, the first risk level threshold includes a first high-risk threshold and a first low-risk threshold, which can be obtained by analyzing the correlation distribution between the predicted success probability and the actual occurrence of failure in historical data. For instance, the first high-risk threshold can be set to 0.65, and the first low-risk threshold can be set to 0.80. Therefore, if the first reliability value is less than 0.65, the battery risk level of the firearm within the second preset time period is high-risk; if the first reliability value is greater than or equal to 0.65 and less than 0.80, the battery risk level of the firearm within the second preset time period is medium-risk; and if the first reliability value is greater than or equal to 0.80, the battery risk level of the firearm within the second preset time period is low-risk. Thus, the battery risk level of the firearm within the second preset time period can be obtained.
[0090] For example, the second risk level threshold includes a second high-risk threshold and a second low-risk threshold, which are determined in a similar manner to the first risk level threshold. For instance, historical data is aggregated daily to calculate a representative reliability value (i.e., the second reliability value) for each day and whether any failures occurred that day. The correlation between the representative reliability value and daily failures is analyzed, and the second high-risk threshold is set to 0.70, and the second low-risk threshold is set to 0.80. Therefore, if the second reliability value is less than 0.70, it is considered a high-risk day; if the second reliability value is greater than or equal to 0.70 and less than 0.85, it is considered a medium-risk day; and if the second reliability value is greater than or equal to 0.85, it is considered a low-risk day. Thus, the daily risk level of the gun battery within a second preset time period can be obtained.
[0091] The above method can transform a one-dimensional reliability prediction sequence into multi-dimensional risk level information that can directly support decision-making. It not only provides a qualitative conclusion and precise location of the overall risk of the cycle through the minimum value, but also generates a risk evolution calendar through daily aggregation. Thus, it can grasp information such as the high risk of firearm G-202 next week, and also clarify the timing of risks such as the main risk being concentrated on the afternoon of the 25th, thereby improving the accuracy and initiative of firearm power trend analysis.
[0092] In some embodiments, to avoid the risk of statically charged but dynamically depleted gun batteries, the instantaneous voltage drop during firing can be simulated or monitored, and an estimate of the remaining reliable firing count can be given based on this. For example: "15% charge, estimated to fire 2 more times at full power." Alternatively, the low charge threshold can be dynamically adjusted based on the battery's SOH (State of Health), temperature, and load characteristics. For example, the threshold baseline can be set to 20% (alert), 10% (warning), and 5% (critical), and the threshold can be increased when the temperature is low or the SOH decreases. Correspondingly, a three-level alarm can be implemented. For example, Level 1 alert: SOC < 20%, charging recommended; Level 2 warning: SOC < 10% and estimated firing count < 5; Level 3 critical: SOC < 5% or self-test determines that a complete firing cannot be completed. Furthermore, the alarm information is not only displayed on the gun's LED but also pushed to the dispatch center and fleet management backend via the 4G network, enabling remote early warning.
[0093] According to a second aspect of the present disclosure, a system for analyzing the electrical charge trend of firearms is provided. Please refer to the appendix. Figure 2 The system 200 for analyzing the battery charge trend of firearms includes a sensor module 201 mounted on the firearm, a local terminal 202 deployed in the vehicle to which the firearm belongs, and a cloud platform 203.
[0094] The sensor module 201 is used to collect battery data of the gun and environmental data of the environment in which the gun is located, and send the battery data and the environmental data to the local terminal 202;
[0095] Local terminal 202 is used to upload battery data and environmental data to cloud platform 203;
[0096] The cloud platform is used to execute any of the above methods for analyzing gun battery power trends.
[0097] For example, sensor module 201 can be configured based on the data to be collected, such as voltage, current, and temperature sensors. The local terminal has a built-in processor that can collect data such as the voltage, current, and ambient temperature of the gun battery in real time and upload it to the cloud platform via HTTPS / MQTT. The cloud platform executes any of the methods described above for gun battery power trend analysis, analyzes and processes the received data, and provides battery health reports, historical trend graphs, alarm statistics, etc. A visual interface allows the dispatch center to monitor the battery status of the entire fleet corresponding to the gun in real time.
[0098] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.
[0099] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.
[0100] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.
Claims
1. A method for analyzing the electrical charge trend in firearms, characterized in that, include: Obtain target data related to the battery level of firearms from historical delivery missions, and convert the target data into a feature matrix. The target data includes mission data of the historical delivery missions, battery data of the firearms, usage data of the firearms, and environmental data of the environment in which the firearms are located. The rows in the feature matrix correspond to the delivery missions, and the columns in the feature matrix correspond to the feature types. Based on the feature matrix and the task data, the battery load risk of the firearm is determined, and based on the battery data, the battery status of the firearm is determined. Based on the usage data and the battery data, the usage habit information of the firearm is determined, wherein the battery load risk characterizes the degree of mismatch between the battery output capacity of the firearm and the historical delivery tasks. Based on at least the battery load risk, battery status, and usage habit information, a large model is used to predict the battery aging of the firearm in the first preset time period, the battery risk of the firearm in the second preset time period, and the daily battery risk of the firearm in the second preset time period.
2. The method for analyzing the electrical charge trend of firearms according to claim 1, characterized in that, The step of converting the target data into a feature matrix includes: All data in the target data are labeled with a unified timestamp, and the first time point corresponding to the first task boundary of the historical transportation task is used as a reference to trace back to the second time point corresponding to the second task boundary. The task boundary of the historical transportation task is determined based on at least one of the electronic waybill status of the historical transportation task, the key geofence associated with the historical transportation task, and the gun posture information in the historical transportation task. The second task boundary is the previous task boundary of the first task boundary. All data between the first time point and the second time point are encapsulated into multi-dimensional data fragments that correspond to a specific task stage and are time-continuous. The multidimensional data fragments are processed by matrix operations to obtain the feature matrix.
3. The method for analyzing the electrical charge trend of firearms according to claim 2, characterized in that, The task data includes the electronic waybill status of the historical delivery tasks and the location information of the delivery vehicles carrying firearms in the historical delivery tasks. The task boundaries of the historical delivery tasks are determined by at least one of the following methods: When the electronic waybill status changes, the task boundary that triggers the historical delivery task is determined; The location information of the transport vehicle is compared with a preset key geofence to obtain a comparison result. When the comparison result indicates that the transport vehicle enters or leaves the key geofence, the task boundary that triggers the historical transport task is determined. The key geofence includes the vault area and the escort network area. Based on the comparison results, the task stage of the historical transportation task is determined, and the status of the firearm in the historical transportation task is identified. When the firearm status changes from a carried state to a handheld state and the task stage is not in the branch handover stage, the task boundary that triggers the historical transportation task is determined. The task stage includes the vault operation stage, the transportation in transit stage, and the branch handover stage.
4. The method for analyzing the electrical charge trend of firearms according to any one of claims 1-3, characterized in that, The task data includes vehicle information of the vehicles to which the firearms belong in the historical delivery tasks, as well as task coordination information and attribute information of the firearms in the historical delivery tasks. The step of determining the battery load risk of the firearms based on the feature matrix and the task data includes: Based on the task data, a weighted undirected graph is constructed to represent the topological relationships of firearms in the historical delivery tasks. In the weighted undirected graph, each node corresponds to a single firearm, and the edges in the weighted undirected graph represent the attribute associations and / or task associations between firearms. The attention layer of the graph attention network model performs feature aggregation based on the weighted undirected graph and the feature matrix to obtain a new feature representation for each node in the weighted undirected graph. The regression prediction layer of the graph attention model calculates a scalar value within a preset continuous range based on the new feature representation of each node, which is then used as the battery load risk score for the gun.
5. The method for analyzing the electrical charge trend of firearms according to claim 4, characterized in that, Also includes: Using nodes whose battery load risk scores exceed a preset risk threshold as initial risk nodes, a random walk simulation is performed based on the edge weights between nodes in the weighted undirected graph to obtain a simulated propagation path. Based on the simulated propagation path and the total number of simulations, the risk propagation probability from the initial risk node to other nodes in the weighted undirected graph is obtained. Based on the risk propagation probability, the battery load risk path of the gun is obtained, wherein the probability of walking from the first node to the adjacent second node is proportional to the edge weight between the first node and the second node; and / or, Based on the new feature representations of all nodes, graph clustering is performed on the weighted undirected graph to obtain multiple groups. The average battery load risk score of all nodes in each group is calculated. Target groups whose average score exceeds the overall average are identified, and vehicles to which the firearms belong in the target groups are identified as vehicles with battery load risk. The overall average score is the average battery load risk score of all target nodes, and the target node is the node where the corresponding firearm is in normal use.
6. The method for analyzing the electrical charge trend of firearms according to any one of claims 1-3, characterized in that, The firearm usage habit information includes the firearm's operating mode and a habit aging correlation model. The habit aging correlation model characterizes the relationship between the firearm's usage habits and battery aging. Determining the firearm's usage habit information based on the usage data and the battery data includes: Multiple operation segments are extracted from the usage data and battery data based on a preset time window, and each operation segment is converted into an operation feature vector; Cluster analysis is performed on the operation feature vector to obtain clusters, and the centroid vector of the clusters is parsed. Based on the matching relationship between the values of each feature dimension in the centroid vector and the preset feature threshold range, operation mode labels with business semantics are added to the clusters. The operation mode label represents one of the cautious mode, training mode and inappropriate mode. Based on the operating mode label, the habit intensity index of the firearm in the historical transportation mission is determined, and the battery aging index of the firearm is obtained. Using the habit intensity index as the independent variable and the battery aging index as the dependent variable, the habit aging correlation model of the firearm is obtained by regression analysis. The battery aging index includes the battery capacity decay rate and / or the battery internal resistance growth rate.
7. The method for analyzing the electrical charge trend of firearms according to any one of claims 1-3, characterized in that, The method of using a large model to predict the battery aging of the firearm over a first preset time period, the battery risk of the firearm over a second preset time period, and the daily battery risk of the firearm over the second preset time period, based at least on the battery load risk, the battery status, and the usage habit information, includes: Based on the battery load risk, battery status, and usage habit information, feature fusion is performed to obtain a fused feature vector; Based on the fused feature vector, the battery aging status of the gun battery in the first preset time period is obtained by the large model. Based on the fused feature vector and the planned tasks of the gun in the second preset time period, the reliability prediction sequence of the gun in the second preset time period is obtained. Based on the reliability prediction sequence, the battery risk of the gun in the second preset time period and the daily battery risk of the gun in the second preset time period are determined. The reliability prediction sequence is a list of estimated probabilities that the battery performance of the gun will meet the requirements in future missions.
8. The method for analyzing the electrical charge trend of firearms according to claim 7, characterized in that, The step of obtaining a reliability prediction sequence for the firearm within a second preset time period based on the fused feature vector and the firearm's planned tasks within that period includes: Based on the fused feature vector, a probabilistic battery model containing parameter uncertainty distribution is constructed; Obtain task information for the planned mission of the firearm within a second preset time period in the future, the task information including task type, planned execution time and associated environmental condition parameters; For each planned task, a standard current load profile is determined according to the task type. The battery state before the planned task is executed is used as the initial condition. Based on the environmental condition parameters, the probabilistic battery model is driven to perform multiple simulations. If the battery output voltage of the gun is continuously higher than the preset minimum voltage threshold within a third preset time period during the simulation, the simulation is determined to be successful. The number of successful simulations is counted, and the ratio of the number of successful simulations to the total number of simulations is used as the success probability of the planned task. Based on the execution sequence of each planned task, the success probabilities of each planned task are arranged into a reliability prediction sequence.
9. The method for analyzing the electrical charge trend of firearms according to claim 7, characterized in that, The determination of the battery risk of the firearm within the second preset time period and the daily battery risk of the firearm within the next second preset time period based on the reliability prediction sequence includes: The minimum success probability is selected from the reliability prediction sequence as the first reliability value, and the first reliability value is compared with a preset first risk level threshold to obtain the battery risk level of the gun within the second preset time period. According to the planned execution date, the planned tasks in the reliability prediction sequence are grouped. For each planned execution date, the minimum success probability of all planned tasks in the group corresponding to the planned execution date is taken as the second reliability value. The second reliability value is compared with the preset second risk level threshold to obtain the daily risk level of the gun battery within the next second preset time period.
10. A system for analyzing the electrical charge trend of firearms, characterized in that, This includes sensor modules mounted on the firearm, local terminals deployed in the vehicle to which the firearm belongs, and a cloud platform; The sensor module is used to collect battery data of the gun and environmental data of the environment in which the gun is located, and to send the battery data and the environmental data to the local terminal; The local terminal is used to upload the battery data and the environmental data to the cloud platform; The cloud platform is used to execute the method for analyzing the battery power trend of firearms as described in any one of claims 1-9.