A method and system for detecting anomalies in collaborative operations of multiple robot dogs
Through the methods of layered anomaly detection and federated learning, the problem of high missed detection and false detection rate in collaborative operations of robot dogs is solved, and the rapid and accurate handling of anomalies and the stable operation of the system are achieved, adapting to complex environments.
Patent Information
- Application Number
- CN202511028410.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-07-25
AI Technical Summary
The existing methods for detecting anomalies in collaborative robot operations have the problems of missed detection and high false detection rates, lack of hierarchical response strategies, and difficulty in dealing with unknown anomalies, which affects the stability and continuity of operations.
A multi-level anomaly detection method is adopted, through layered detection of the master control node and individual robot dogs, combined with federated learning to update the global detection model, to achieve hierarchical response and zero-sample learning, ensuring the comprehensiveness and rapid handling of abnormal information.
Significantly reduce the probability of missed detection and false detection, adapt to complex environments, ensure stable system operation, quickly and accurately handle anomalies through hierarchical response strategies, effectively deal with unknown anomalies, and ensure the continuous stability of the multi-robot dog system.
Smart Images

Figure CN120541728B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot dog anomaly detection, and in particular to a method and system for detecting anomalies in the collaborative operation of multiple robot dogs. Background Art
[0002] The robot dog, scientifically known as a quadruped robot, is a representative of leg-and-foot bionic robots. Its development history integrates technological breakthroughs and innovations in multiple disciplines. It has gone through more than 60 years of exploration in the process of moving from academic research to widespread commercial application.
[0003] Dating back to the mid-20th century, the conception of robotic pets in science fiction reflected humanity's early aspirations for the fusion of artificial intelligence and biomimetic technology. In the 1960s, MIT successfully developed the world's first quadruped robot, "Walk-Man." While its appearance and functionality differed significantly from modern robot dogs, it laid the foundation for subsequent research. At the time, computer technology was still in its infancy, with limited microprocessor performance. Robot control relied primarily on simple logic circuits and mechanical design, resulting in relatively simple movement patterns and limited flexibility and environmental adaptability.
[0004] Entering the 21st century, rapid technological advancements across multiple fields have propelled robot dogs toward maturity. In terms of sensor technology, the integrated application of multiple sensors, including LiDAR, high-precision inertial measurement units (IMUs), visual cameras, and pressure sensors, has significantly enhanced robot dogs' environmental perception capabilities. LiDAR scans the surrounding environment in real time, building precise three-dimensional maps and enabling autonomous navigation in complex terrain. IMUs precisely monitor the robot's posture changes, ensuring it maintains balance during movement. Visual cameras, combined with advanced computer vision algorithms, enable it to identify obstacles, targets, and specific environmental features, enabling intelligent obstacle avoidance and task execution. Complex tasks require the coordinated efforts of multiple robot dogs. However, when working collaboratively, various anomalies can occur, disrupting the coordinated operation. Therefore, it is crucial to detect and address these anomalies.
[0005] Conventional anomaly detection methods for collaborative robot operations often employ a single detection mode, relying heavily on a central node for global detection. This results in significant blind spots in anomaly identification, high rates of missed and false detections, and difficulty comprehensively covering all types of anomalies. Furthermore, these methods lack a tiered response strategy for anomaly results with varying confidence levels. The resulting handling methods are simple and crude, failing to precisely implement policies based on the severity of the anomaly. Furthermore, existing technologies lack effective emergency response mechanisms when faced with unknown anomaly types, making it extremely easy for unknown anomalies to paralyze the entire collaborative operation system, severely impacting the continuity and stability of operations.
[0006] In order to solve the above-mentioned defects in the existing technology, this technical solution proposes a method and system for detecting anomalies in the collaborative operation of multiple robot dogs. Summary of the Invention
[0007] The present invention provides a method and system for detecting anomalies in the collaborative operation of multiple robot dogs, so as to solve the defects in the prior art.
[0008] In one aspect, the present invention provides a method for detecting anomalies in collaborative operations of multiple robot dogs, comprising:
[0009] S1: Establish connections between multiple robot dogs and the master node. The master node assigns initial roles, synchronizes the global map and task list, and outputs initial state data.
[0010] S2: Preprocess and fuse the initial state data to output multi-dimensional collaborative state features;
[0011] S3: Performs layered anomaly detection based on multi-dimensional collaborative state features. The master node performs global detection, individual robot dogs perform independent detection, and the robot dogs perform collaborative detection to output multi-layered anomaly information.
[0012] S4: Upload abnormal events of each robot dog to the master control node, which aggregates the data. Based on the aggregated data, a global detection model is established. The global detection model is updated through federated learning, and the optimized detection model is output.
[0013] S5: Input multi-level anomaly information into the optimized detection model for anomaly detection, output real-time anomaly detection results, take different measures for real-time anomaly detection results with different confidence levels, and output the final response instruction;
[0014] S6: If the anomaly type in the real-time anomaly detection result is not covered in the training set of the global detection model, zero-shot learning is started, an emergency strategy is generated based on physical rules, and processing instructions are output.
[0015] According to a method for detecting anomalies in collaborative operations of multiple robot dogs provided by the present invention, in step S1, the step of outputting initial state data includes:
[0016] S1.1: Multiple robot dogs generate connection request packets containing unique device identifiers and output connection requests;
[0017] S1.2: The master node receives the connection request data packet, verifies the legitimacy of the device's unique identifier, and outputs the verification result;
[0018] S1.3: If the verification is successful, the master control node generates a response data packet containing the communication port number and outputs a response instruction;
[0019] S1.4: Each robot dog receives the response command, parses the communication port number, establishes an encrypted communication link, and outputs a connection success signal;
[0020] S1.5: Based on the connection success signal, the master control node synchronizes the global map and task list to each robot dog and outputs the initial state data.
[0021] According to a method for detecting anomalies in collaborative operations of multiple robot dogs provided by the present invention, in step S2, the step of outputting multi-dimensional collaborative state features includes:
[0022] S2.1: Receive initial state data, use the Kalman filter algorithm to smooth the sensor noise data, and output the denoised state data;
[0023] S2.2: Detect missing values in the denoised state data, complete the data based on the time series interpolation method, and output the complete state data set;
[0024] S2.3: Normalize the complete state data set, map different dimensional features to fixed intervals, and output standardized feature data;
[0025] S2.4: Use the attention mechanism to perform weighted fusion on the standardized feature data to generate a multi-dimensional collaborative state feature vector and output the multi-dimensional collaborative state feature.
[0026] According to a method for detecting anomalies in collaborative operations of multiple robot dogs provided by the present invention, in step S2.4, the step of generating a multi-dimensional collaborative state feature vector includes:
[0027] S2.4.1: Based on the standardized feature data, construct a feature correlation matrix, calculate the mutual information value between different features, and output the feature mutual information matrix;
[0028] S2.4.2: Based on the feature mutual information matrix, assign dynamic weights to the motion state, environment perception, and communication quality features, and output the weight vector;
[0029] S2.4.3: Perform a dot product operation on the normalized feature data and the weight vector to output a multi-dimensional collaborative state feature vector.
[0030] According to a method for detecting anomalies in collaborative operations of multiple robot dogs provided by the present invention, in step S3, the steps of collaborative detection between the robot dogs include:
[0031] S3.1: Encapsulate the individual anomaly information obtained by the robot dog's individual detection into a collaborative detection data packet containing a timestamp and location coordinates, and output it to other robot dogs within the communication range;
[0032] S3.2: Receive collaborative detection data packets from a preset number of adjacent robot dogs, parse the anomaly flags therein, and output an anomaly flag set;
[0033] S3.3: Perform voting statistics on the anomaly identification set. When the number of occurrences of the same anomaly identification exceeds half, output the collaborative verification result.
[0034] S3.4: Compare the collaborative verification results with the individual anomaly information of the node. If the matching degree exceeds the preset threshold, the collaborative anomaly information is updated and output to the master control node.
[0035] According to a method for detecting anomalies in collaborative operations of multiple robot dogs provided by the present invention, in step S4, the step of establishing a global detection model includes:
[0036] S4.1: The robot dog packages the abnormal event according to a preset fixed format and outputs the abnormal event data packet;
[0037] S4.2: The master control node receives all abnormal event data packets of the robot dogs, classifies and stores them according to the abnormality type, and outputs the classified data set;
[0038] S4.3: Perform feature extraction and data cleaning on the classification data set and output the training sample set;
[0039] S4.4: Initialize the global detection model based on the training sample set and output the initial model parameters.
[0040] According to a method for detecting anomalies in collaborative operations of multiple robot dogs provided by the present invention, in step S4, the step of outputting the optimized detection model includes:
[0041] S4.5: Use the federated learning framework to distribute the initial model parameters to each robot dog and output model distribution instructions;
[0042] S4.6: The robot dog updates the model parameters based on the individual anomaly information and outputs the local parameter update amount;
[0043] S4.7: The master node aggregates all local parameter updates, calculates the optimal global parameter update using a weighted average method, and outputs the global updated parameter.
[0044] S4.8: Load the global updated parameters into the global detection model and output the optimized detection model.
[0045] According to a method for detecting anomalies in collaborative operations of multiple robot dogs provided by the present invention, in step S4.7, the step of calculating the global parameter update amount includes:
[0046] S4.7.1: Extract the gradient information from the local parameter update of each robot dog and output the gradient data set;
[0047] S4.7.2: Set weight coefficients based on the proportion of the robot dog's local parameters and output the weight coefficient set;
[0048] S4.7.3: Perform a weighted sum operation on the gradient data set and the weight coefficient set, and output the global gradient value;
[0049] S4.7.4: Use the stochastic gradient descent algorithm to optimize the global gradient value and output the optimal global parameter update.
[0050] According to a method for detecting anomalies in collaborative operations of multiple robot dogs provided by the present invention, in step S5, the step of outputting a final response instruction includes:
[0051] S5.1: The master control node converts the multi-faceted anomaly information into a feature vector that conforms to the input format of the optimized detection model and outputs standardized anomaly features.
[0052] S5.2: Input the standardized anomaly features into the optimized detection model, calculate the confidence value of the anomaly through model reasoning, and output real-time anomaly detection results including the anomaly type and corresponding confidence value;
[0053] S5.3: Perform hierarchical judgment on the confidence values in the real-time anomaly detection results and output high-priority response instructions, medium-priority response instructions, and low-priority response instructions;
[0054] S5.4: Distribute the high-priority response instruction, the medium-priority response instruction, and the low-priority response instruction to the corresponding robot dogs and related nodes, and output the final response instruction.
[0055] The present invention also provides a system for detecting anomalies in collaborative operations of multiple robot dogs, comprising:
[0056] The role assignment module is used to establish connections between multiple robot dogs and the master control node. The master control node assigns initial roles, synchronizes the global map and task list, and outputs initial state data.
[0057] Data preprocessing and feature fusion module, used to preprocess and fuse features of initial state data and output multi-dimensional collaborative state features;
[0058] The layered anomaly detection module is used to perform layered anomaly detection based on multi-dimensional collaborative state characteristics. The master node performs global detection, individual robot dogs perform independent detection, and robot dogs perform collaborative detection to output multi-level anomaly information.
[0059] The model training and optimization module is used to upload abnormal events of each robot dog to the master control node, which aggregates the data. Based on the aggregated data, a global detection model is established, which is updated through federated learning and output as an optimized detection model.
[0060] The exception response and instruction generation module is used to input multi-level exception information into the optimized detection model for anomaly detection, output real-time anomaly detection results, take different measures for real-time anomaly detection results with different confidence levels, and output the final response instructions;
[0061] The emergency strategy generation module starts zero-shot learning if the anomaly type in the real-time anomaly detection results is not covered in the training set of the global detection model, generates an emergency strategy based on physical rules, and outputs processing instructions;
[0062] The cross-validation and collaborative decision-making module is used to realize the interaction of intermediate results of anomaly detection among robot dogs. The individual anomaly detection results are cross-validated through a voting mechanism. When more than half of the robot dogs determine that a robot dog has an anomaly, the individual anomaly is upgraded to a group-level collaborative anomaly, and the verified collaborative anomaly information is output to the main control node.
[0063] The present invention provides a method and system for detecting anomalies in collaborative operations involving multiple robot dogs. This system employs a hierarchical model consisting of global detection, individual detection, and collaborative detection. The master control node controls global anomalies, while the robot dogs autonomously detect individual anomalies. Collaborative anomaly confirmation is achieved through voting verification between adjacent robot dogs. This system covers anomaly types at multiple levels, significantly reducing the probability of missed and false detections and ensuring the comprehensiveness of anomaly information. By leveraging a federated learning framework, the global detection model is updated by aggregating the abnormal event data of each robot dog while protecting the privacy of the robot dog's local data. Global parameters are calculated using a weighted average method, enabling the model to be dynamically optimized based on actual operation scenarios, continuously improving its ability to detect various anomalies and adapting to complex and changing collaborative operation environments. By adopting a hierarchical response strategy for anomaly results with different confidence levels, rapid and accurate handling of anomalies is achieved. For uncovered anomaly types, zero-shot learning is initiated to generate emergency strategies based on physical rules, effectively addressing unknown anomalies, minimizing the impact of anomalies on collaborative operations, and ensuring the continuous and stable operation of the multi-robot dog system. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0065] Figure 1 This is a flow chart of a method for detecting anomalies in collaborative operations of multiple robot dogs provided by an embodiment of the present invention;
[0066] Figure 2This is a structural diagram of a system for detecting anomalies in collaborative operations of multiple robot dogs provided by an embodiment of the present invention;
[0067] Figure 3 A flowchart of anomaly detection in an anomaly detection system for collaborative operation of multiple robot dogs provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0068] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0069] Example 1:
[0070] The following combination Figure 1-Figure 3 The present invention describes a method and system for detecting anomalies in collaborative operations of multiple robot dogs.
[0071] like Figure 1 As shown, an embodiment of the present invention provides a method for detecting anomalies in collaborative operations of multiple robot dogs, including:
[0072] S1: Establish connections between multiple robot dogs and the master node. The master node assigns initial roles, synchronizes the global map and task list, and outputs initial state data. The specific steps include:
[0073] S1.1: Multiple robot dogs generate connection request packets containing their unique device identifiers and output connection requests. The unique device identifier (DUID) consists of a multi-digit string containing the manufacturer code, device model, factory serial number, and a checksum to ensure global uniqueness. The connection request packet also includes the robot dog's current battery level and hardware version number, allowing the master node to initially determine the device's status.
[0074] S1.2: The master node receives the connection request packet, verifies the legitimacy of the device's unique identifier, and outputs the verification result. The master node verifies legitimacy using a "whitelist + dynamic verification" mechanism. It first checks whether the DUID is on the pre-registered whitelist. If not, the request is rejected. If it is, the packet signature (signed by the robot dog's private key and verified by the master node's public key) is further verified using asymmetric encryption (RSA-2048) to prevent tampering. The final verification result is "passed" or "rejected (including the reason: unregistered / invalid signature)."
[0075] S1.3: If verification is successful, the master node generates a response packet containing the communication port number and outputs a response instruction. In addition to the communication port number, the response packet also contains the session key, detection period, and data transmission frame rate to ensure consistent communication parameters.
[0076] S1.4: Each robot receives the response command, resolves the communication port number, establishes an encrypted communication link, and outputs a connection success signal. Once the encrypted communication link is established, the robot sends a "link test frame," which the master node receives and returns a "test response frame." If the round-trip time is less than 100ms and there is no packet loss, the connection is confirmed successful and a connection success signal containing the link ID is output.
[0077] S1.5: Upon receiving the successful connection signal, the master control node synchronizes the global map and task list to each robot dog and outputs the initial state data. The global map uses the OctoMap 3D grid format, an octree-based 3D probabilistic grid map representation method widely used in robot navigation and 3D environment modeling. It includes static obstacles, dynamic obstacle warning zones, and task areas. The task list is in JSON format and contains subtask IDs, execution coordinates, start / end times, and dependencies. The initial state data integrates the robot dog's initial position, battery level, and sensor self-test results.
[0078] S2: Preprocess and fuse the initial state data to output multi-dimensional collaborative state features. The specific steps include:
[0079] S2.1: Receive initial state data, apply the Kalman filter algorithm to smooth sensor noise data, and output denoised state data. The core of the Kalman filter is to dynamically correct measured values through a "prediction-update" cycle. This involves predicting the robot's state at the next moment based on its motion model, then updating the state estimate based on actual sensor data. The final output is smoothed motion state data such as velocity, acceleration, and angular velocity, as well as environmentally sensed data such as obstacle distance and light intensity.
[0080] S2.2: Detect missing values in the denoised state data and perform data completion using time series interpolation to output a complete state dataset. Missing value detection uses a sliding window approach. Missing data for three consecutive timestamps is considered "continuous missing," while missing data for one or two discrete timestamps is considered "discrete missing." Time series interpolation uses linear interpolation for discrete missing values and cubic spline interpolation for continuous missing values to ensure that the completed data conforms to the time series trend.
[0081] S2.3: Normalize the complete state dataset, mapping features of different dimensions to a fixed interval and outputting standardized feature data. Velocity features in motion are mapped to [0, 1] using a min-max mapping scheme, and light intensity in environmental perception is normalized using a Z-score to eliminate dimensionality differences. Min-max mapping is a commonly used feature scaling method. Its core function is to linearly transform the raw data according to its minimum (min) and maximum (max) values, ultimately mapping the data to a specified interval.
[0082] S2.4: Use the attention mechanism to perform weighted fusion on the standardized feature data, generate a multi-dimensional collaborative state feature vector, and output the multi-dimensional collaborative state feature. The core of the attention mechanism is to give higher weight to key features such as communication quality in complex environments and motion status in high-speed movements.
[0083] In step 2.4, the steps of generating a multi-dimensional collaborative state feature vector include:
[0084] S2.4.1: Based on the standardized feature data, construct a feature association matrix, calculate the mutual information between different features, and output the feature mutual information matrix. The feature association matrix is constructed by calculating the mutual information between any two features. For example, the higher the mutual information between "speed" and "communication delay", the stronger the correlation between the two.
[0085] S2.4.2: Based on the feature mutual information matrix, assign dynamic weights to the motion state, environmental perception, and communication quality features, and output a weight vector. Dynamic weight assignment is integrated with real-time scenarios. For example, for the "formation march" mission, the motion state weight is increased to 0.4, the communication quality weight to 0.3, and the environmental perception weight to 0.3. For the "environmental exploration" mission, the environmental perception weight is increased to 0.4.
[0086] S2.4.3: Perform a dot product operation on the normalized feature data and the weight vector to output a multi-dimensional collaborative state feature vector.
[0087] S3: Performs layered anomaly detection based on multi-dimensional collaborative state features. The master node performs global detection, individual robot dogs perform independent detection, and robot dogs perform collaborative detection to output multi-level anomaly information.
[0088] When performing global detection, an autoencoder model is used based on global multi-dimensional collaborative state features. The input is the fused features of all robot dogs, and the output is the reconstruction error. When the reconstruction error exceeds a threshold (such as the mean + 3 times the standard deviation), it is determined to be a global anomaly.
[0089] When the robot dog performs individual detection, it uses the isolation forest algorithm to detect individual abnormalities based on its own motion status and sensor data.
[0090] The steps for collaborative detection between robot dogs include:
[0091] S3.1: Encapsulate the individual abnormality information obtained by the robot dog individual detection into a collaborative detection data packet containing a timestamp and location coordinates, and output it to other robot dogs within the communication range.
[0092] S3.2: Receive collaborative detection data packets from a preset number of adjacent robot dogs, parse the abnormality flags therein, and output an abnormality flag set.
[0093] S3.3: Perform voting statistics on the anomaly identification set. When the number of occurrences of the same anomaly identification exceeds half, output the collaborative verification result.
[0094] S3.4: Compare the collaborative verification results with the individual anomaly information of the node. If the matching degree exceeds the preset threshold, the collaborative anomaly information is updated and output to the master control node.
[0095] For example, robot dog A detects "anomaly in the distance to the left obstacle" and sends this information (including timestamp and location) to multiple adjacent robot dogs within communication range. If two or more of them also detect the same anomaly ("anomaly in the distance to the left obstacle"), it is verified as a true anomaly through voting. If only A detects it, it is judged as a "sensor false alarm."
[0096] S4: Upload abnormal events from each robot dog to the master control node, which aggregates the data. Based on the aggregated data, a global detection model is established. This global detection model is updated through federated learning, and the optimized detection model is output.
[0097] The steps to build a global detection model include:
[0098] S4.1: The robot dog packages the abnormal event in a preset fixed format and outputs an abnormal event data packet. The abnormal event data packet includes: abnormality type code, abnormality duration, associated sensor raw data, and state characteristics before and after the abnormality.
[0099] S4.2: The master control node receives all robot dog exception event data packets, categorizes and stores them by exception type, and outputs a classified data set. The master control node stores the data in a three-dimensional classification system: "Anomaly Type - Severity - Occurrence Area." For example, "M01 - Severe - Area A" corresponds to a motor failure that affects task execution, facilitating subsequent targeted model training.
[0100] S4.3: Perform feature extraction and data cleaning on the classified dataset to output a training sample set. Feature extraction focuses on key features of abnormal events, including the current change rate of motor failures and the signal strength decay rate of communication packet loss. Data cleaning removes noise samples, ultimately forming a training set consisting of normal samples (70%) and abnormal samples (30%).
[0101] S4.4: Initialize the global detection model based on the training sample set and output the initial model parameters. The initial global detection model uses a CNN-LSTM hybrid model. The CNN extracts spatial features (such as anomaly patterns in the location distribution of multiple machines), while the LSTM extracts temporal features (such as trends in state changes before an anomaly occurs). The output layer is a softmax classifier, which outputs the probability of the anomaly type. The softmax classifier is a machine learning model widely used for multi-classification problems. It is an extension of logistic regression for multi-classification scenarios. Its core concept is to convert the model's prediction score for each class into a probability distribution, such that the sum of the probabilities of all classes is 1, making it easier to determine the most likely class for a sample.
[0102] In step S4, the step of outputting the optimized detection model includes:
[0103] S4.5: Using a federated learning framework, the initial model parameters are distributed to each robot dog, and model distribution instructions are output. The choice of federated learning framework depends on the communication bandwidth and computing power of the robot dog cluster. The FedAvg framework is preferred. If data heterogeneity exists (e.g., the distribution of abnormal samples varies significantly between different robot dogs), the FedProx framework is used, using a proximal term to constrain the deviation between local updates and the global model. The FedAvg (Federated Averaging) framework is the most classic distributed model training framework in federated learning. Its core concept is to achieve collaborative model training on distributed data by aggregating local training on edge devices (clients) with server models, while protecting data privacy. This avoids the need to upload the original dataset to the server, thereby protecting data privacy. FedProx is an improved federated learning framework proposed in 2018, primarily designed to address the performance challenges of federated learning in scenarios with non-independent and identically distributed (Non-IID) data and system heterogeneity (e.g., differences in client computing power). It alleviates the slow convergence and model performance degradation problems of traditional FedAvg in these scenarios by introducing the proximal term to optimize the objective function.
[0104] Initial model parameters include the convolutional layer weight matrix, recurrent layer bias terms, and fully connected layer activation function parameters. These parameters are encapsulated in a compressed tensor format to reduce the amount of data transmitted. Model distribution instructions include the model version number, parameter validity period, and a checksum (usually calculated based on SHA-256 to ensure parameter transmission has not been tampered with).
[0105] S4.6: The robot dog updates the model parameters based on the individual anomaly information and outputs the local parameter update amount. The training set consists of abnormal samples and normal samples in a ratio of 1:3. Normal samples are randomly selected from historical anomaly-free periods. Mini-batch gradient descent is used (adapted to the robot dog's memory), and the loss function is cross-entropy loss, expressed as:
[0106]
[0107] Among them, y is the true abnormal label, To predict the model's probability, iterate 5-10 times to prevent overfitting. The gradient of each layer's parameters is calculated using the backpropagation algorithm. The gradient change in the last iteration is used as the local parameter update, which is then packaged into a data packet containing the robot dog's ID and the update timestamp.
[0108] S4.7: The master node aggregates all local parameter updates, calculates the optimal global parameter update using a weighted average method, and outputs the global updated parameters. Before aggregating all local parameter updates, the master node needs to perform a validity check on the local parameter updates, including parameter dimension matching, timestamp validity, and gradient range rationality.
[0109] The steps to calculate the global parameter update amount include:
[0110] S4.7.1: Extract the gradient information from each robot dog's local parameter update and output the gradient dataset. First, parse the gradient tensors of each model layer from the local parameter update, and then perform L2 norm clipping on the gradient to prevent gradient explosion. Norm clipping is expressed as:
[0111]
[0112] Among them, G' is the norm clipped gradient, G is the gradient tensor, θ is the clipping threshold, usually θ=5, is the L2 norm, expressed as: , which is the square root of the sum of the squares of all gradient elements. i are the elements in the global gradient value G.
[0113] Missing layer gradients (e.g., some robot dogs do not update a certain layer parameter) are filled with 0. Finally, the data is stored in a dictionary with the key being "layer name + parameter type" and the value being the gradient list for each robot dog.
[0114] S4.7.2: Set the weight coefficient according to the proportion of the robot dog's local parameters. The larger the data volume, the higher the weight coefficient. Output the weight coefficient set.
[0115] First, the amount of local data, that is, the number of valid samples used by the robot dog to update the model, is recorded as n i .
[0116] Secondly, in addition to the amount of data, the data quality factor is introduced , the modified weight is expressed as:
[0117]
[0118] Among them, w i To correct the weight, N is the total number of robot dogs, j represents the index of the robot dog participating in federated learning, and n j is the local data volume of the jth robot dog participating in federated learning, and i is the index representing the robot dog, which is used to distinguish different robot dog individuals in the cluster.
[0119] S4.7.3: Perform a weighted sum operation on the gradient data set and the weight coefficient set, and output the global gradient value. The formula is:
[0120]
[0121] in, is the global gradient of the convolution layer, is the convolutional layer gradient of the i-th robot dog. After weighted summation, the dimensions of the global gradient exactly match the dimensions of the model layer parameters. For example, if the convolutional layer gradient is a 3×3×64 tensor, the global gradient still maintains this dimension.
[0122] S4.7.4: Use the stochastic gradient descent algorithm to optimize the global gradient value and output the optimal global parameter update amount. When optimizing the parameter setting, the learning rate η adopts the cosine annealing strategy, and each round of iteration is based on Attenuation, t is the current round, T is the total round, and γ is the momentum parameter used to accelerate convergence. The global parameter update amount is expressed as:
[0123]
[0124] Among them, ΔΘ is the global parameter update amount, ΔΘ prev is the global update amount of the previous round, G global Represents the global gradient. Iterate multiple times until the gradient change rate .
[0125] S4.8: Load the globally updated parameters into the global detection model, replacing them with an exact match of "layer name + parameter type" to output the optimized detection model. After loading, test the model on an independent validation set. If the accuracy improves by ≥5%, save the optimized detection model; otherwise, discard the current update and retain the previous model.
[0126] S5: Input the multi-level anomaly information into the optimized detection model for anomaly detection, output the real-time anomaly detection results, take different measures for the real-time anomaly detection results with different confidence levels, and output the final response instructions. The specific steps include:
[0127] S5.1: The master node converts multi-faceted anomaly information into feature vectors that conform to the input format of the optimized detection model and outputs standardized anomaly features. This includes extracting global, individual, and collaborative anomaly information, totaling 20-30 basic features. Non-numeric features are encoded, such as the anomaly type, using one-hot encoding; timestamps are converted to relative time, i.e., seconds since the task start; and location coordinates are normalized to the global map coordinate system. Feature selection is used to compress feature dimensions to the model input layer dimensions, and standardized anomaly features with consistent dimensions are output.
[0128] S5.2: Input the standardized anomaly features into the optimized detection model. Model inference is used to calculate the confidence level of anomaly occurrences, and real-time anomaly detection results are output, including the anomaly type and corresponding confidence level. The model inference process proceeds as follows: the standardized anomaly features are forward-propagated through the model, sequentially passing through the CNN layer to extract spatial correlations, the LSTM layer to extract time series features, and finally, through the softmax activation function to output the probability distribution of each anomaly type. When calculating the mean confidence level, the maximum value in the probability distribution is taken as the confidence level of the anomaly occurrence, and the corresponding anomaly type is the predicted result.
[0129] S5.3: Perform graded judgments on the confidence values in the real-time anomaly detection results and output high-priority response instructions, medium-priority response instructions, and low-priority response instructions. The judgment criteria are based on historical false alarm rates. The high-priority threshold corresponds to a false alarm rate of ≤1%, ensuring that no urgent anomalies are missed; the medium-priority threshold corresponds to a false alarm rate of 5%-10%, balancing response efficiency and resource consumption; and the low-priority threshold corresponds to a false alarm rate of >10%, reducing ineffective responses. For example:
[0130] High priority (confidence ≥ 0.8): For example, "motor short circuit (confidence 0.92)" corresponds to the command "immediately stop + cut off power supply".
[0131] Medium priority (0.5 ≤ confidence level < 0.8): For example, if the communication packet loss rate is 30% (confidence level 0.65), the corresponding command is to switch the communication channel and reduce the data transmission frequency.
[0132] Low priority (confidence level < 0.5): For example, "single lidar ranging deviation (confidence level 0.3)" corresponds to the command "continuous monitoring + reporting status every 10 seconds".
[0133] S5.4: Distribute high-priority, medium-priority, and low-priority response commands to the corresponding robot dogs and related nodes, and output the final response command. High-priority commands are distributed to the abnormal robot dog and its collaborative robot dogs within a 10-meter range to avoid collisions. Medium-priority commands are distributed only to the abnormal robot dog; low-priority commands are synchronized only to the master node's log system. High-priority commands utilize a multi-path redundant transmission strategy, sending them simultaneously via the primary and backup communication links to ensure a ≥99% reception success rate. Medium- and low-priority commands are transmitted via a single link with a checksum (CRC32) to ensure integrity. After receiving a command, the robot dog returns an execution confirmation within 1 second, including statuses such as "Received" and "Executing." If no feedback is received within 3 seconds, the master node resends the command (up to 3 times) and ultimately consolidates the execution results into a final response command (including execution status and exception handling progress).
[0134] S6: If the anomaly type in the real-time anomaly detection results is not covered by the global detection model's training set, zero-shot learning is initiated, and an emergency response strategy is generated based on physical rules, outputting processing instructions. Processing instructions include emergency instructions, adjustment instructions, and observation instructions. Emergency instructions are executed immediately, interrupting the current task. Adjustment instructions are dynamically adjusted during the execution of the current task. Observation instructions do not affect the main task and are executed in the background.
[0135] Among them, the trigger conditions for unknown anomaly detection include: the confidence of all anomaly types output by the model is lower than the threshold, and the difference between the highest confidence and the second highest confidence is <0.1, indicating that there is no clear matching type; the cosine similarity between the anomaly feature vector and the known anomaly cluster is lower than the threshold, and the K-nearest neighbor algorithm is used to determine whether it is an outlier; the physical parameters when the anomaly occurs violate the preset constraints, such as speed > maximum design speed 2m / s, temperature <-20℃.
[0136] Unknown anomalies include: hardware anomalies, such as motor speed fluctuations exceeding mechanical tolerances; environmental anomalies, such as sudden changes in light intensity causing visual positioning failure; interaction anomalies, such as sudden distance violations during multi-machine collaboration; and algorithmic anomalies, such as cumulative SLAM mapping errors exceeding a threshold. SLAM (Simultaneous Localization and Mapping) is a core technology in fields such as robotics, autonomous driving, and augmented reality (AR). Its goal is to enable devices (such as robots and drones) to estimate their position in unknown environments and build maps in real time. These two interdependent and iterative optimizations are essential.
[0137] Physics rules include kinematics, dynamics, communication, and environmental interaction rules. When an unknown anomaly is detected, the anomaly signature is used to match the preconditions in the rule base. The Drools rule engine is used for rule matching, supporting fuzzy matching and priority sorting, such as dynamics > kinematics. Drools is a Java-based open source rule engine that separates business rules from application code. It uses a declarative rule language (rather than hard-coded rules) to define and execute complex business logic. It uses the RETE algorithm (Real-Time Efficient Rule Matching Algorithm).
[0138] Finally, the feature vector of the unknown anomaly, the environmental parameters of the occurrence, and the processing process are recorded as a new sample. Meta-learning is used to quickly adapt to the new sample, update the model's meta-parameters, and then integrate the new sample into the global model through federated learning.
[0139] like Figure 2-Figure 3 As shown, the present invention also provides a system for detecting anomalies in collaborative operations of multiple robot dogs, comprising:
[0140] The role allocation module is used to establish connections between multiple robot dogs and the master node. The master node allocates initial roles and synchronizes the global map and task list, and outputs initial state data.
[0141] The data preprocessing and feature fusion module is used to preprocess and fuse the initial state data and output multi-dimensional collaborative state features.
[0142] The layered anomaly detection module is used to perform layered anomaly detection based on multi-dimensional collaborative state characteristics. The master control node performs global detection, individual robot dogs perform individual detection independently, and robot dogs perform collaborative detection to output multi-level anomaly information.
[0143] The model training and optimization module is used to upload abnormal events of each robot dog to the master control node, which aggregates the data. Based on the aggregated data, a global detection model is established. The global detection model is updated through federated learning and output as an optimized detection model.
[0144] The exception response and instruction generation module is used to input multi-level exception information into the optimized detection model for anomaly detection, output real-time anomaly detection results, take different measures for real-time anomaly detection results with different confidence levels, and output the final response instructions.
[0145] The emergency strategy generation module starts zero-shot learning if the anomaly type in the real-time anomaly detection results is not covered in the training set of the global detection model, generates an emergency strategy based on physical rules, and outputs processing instructions.
[0146] The cross-validation and collaborative decision-making module is used to realize the interaction of intermediate results of anomaly detection among robot dogs. The individual anomaly detection results are cross-validated through a voting mechanism. When more than half of the robot dogs determine that a robot dog has an anomaly, the individual anomaly is upgraded to a group-level collaborative anomaly, and the verified collaborative anomaly information is output to the main control node.
[0147] In summary, the present invention provides a method and system for detecting anomalies in collaborative operations involving multiple robot dogs. This system utilizes a hierarchical model consisting of global detection, individual detection, and collaborative detection. The master control node controls global anomalies, while the robot dogs autonomously detect individual anomalies. Collaborative anomaly confirmation is achieved through voting verification between adjacent robot dogs. This system covers anomaly types at multiple levels, significantly reducing the probability of missed detection and false detection, and ensuring the comprehensiveness of anomaly information. By leveraging a federated learning framework, the global detection model is updated by aggregating the abnormal event data of each robot dog while protecting the privacy of the robot dog's local data. Global parameters are calculated using a weighted average method, enabling the model to be dynamically optimized based on the actual operation scenario, continuously improving its ability to detect various anomalies and adapting to complex and changing collaborative operation environments. By adopting a hierarchical response strategy for anomaly results with different confidence levels, rapid and accurate handling of anomalies is achieved. For uncovered anomaly types, zero-shot learning is initiated to generate emergency strategies based on physical rules, effectively responding to unknown anomalies, minimizing the impact of anomalies on collaborative operations, and ensuring the continuous and stable operation of the multi-robot dog system.
[0148] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for detecting anomalies in collaborative operations of multiple robot dogs, characterized in that: include: S1: Establish connections between multiple robot dogs and a master control node, which assigns initial roles, synchronizes the global map and task list, and outputs initial state data; S2: Preprocessing and feature fusion of the initial state data to output multi-dimensional collaborative state features, including: S2.1: Receive the initial state data, smooth the sensor noise data using a Kalman filter algorithm, and output denoised state data; S2.2: Detect missing values in the denoised state data, complete the data based on a time series interpolation method, and output a complete state data set; S2.3: Normalizing the complete state data set, mapping different dimensional features to fixed intervals, and outputting standardized feature data; S2.4: Using an attention mechanism to perform weighted fusion on the standardized feature data to generate a multi-dimensional collaborative state feature vector, and outputting the multi-dimensional collaborative state feature; In step S2.4, the steps of generating a multi-dimensional collaborative state feature vector include: S2.4.1: Construct a feature correlation matrix based on the standardized feature data, calculate mutual information values between different features, and output a feature mutual information matrix; S2.4.2: Assign dynamic weights to the motion state, environment perception, and communication quality features based on the feature mutual information matrix, and output a weight vector; S2.4.3: Perform a dot product operation on the standardized feature data and the weight vector to output a multi-dimensional collaborative state feature vector; S3: Perform hierarchical anomaly detection based on the multi-dimensional collaborative state features. The master control node performs global detection, individual robot dogs perform independent detection, and the robot dogs perform collaborative detection to output multi-level anomaly information. In step S3, the steps of collaborative detection between robot dogs include: S3.1: Encapsulate the individual anomaly information obtained by the robot dog's individual detection into a collaborative detection data packet containing a timestamp and location coordinates, and output it to other robot dogs within the communication range; S3.2: Receive the collaborative detection data packets of a preset number of adjacent robot dogs, parse the abnormality flags therein, and output an abnormality flag set; S3.3: Voting statistics are performed on the set of anomaly identifiers. When the number of occurrences of the same anomaly identifier exceeds half, the collaborative verification result is output; S3.4: Compare the collaborative verification result with the individual anomaly information of the node itself. If the matching degree exceeds a preset threshold, update the collaborative anomaly information and output it to the master control node. S4: Uploading abnormal events of each of the robot dogs to the master control node, which aggregates the data; and establishing a global detection model based on the aggregated data, updating the global detection model through federated learning, and outputting an optimized detection model; S5: Inputting the multi-level anomaly information into the optimized detection model to perform anomaly detection, outputting real-time anomaly detection results, taking different measures for the real-time anomaly detection results with different confidence levels, and outputting a final response instruction; S6: If the anomaly type in the real-time anomaly detection result is not covered in the training set of the global detection model, zero-shot learning is initiated, an emergency strategy is generated according to physical rules, and processing instructions are output.
2. The method for detecting anomalies in collaborative operations of multiple robot dogs according to claim 1, characterized in that: In step S1, the step of outputting initial state data includes: S1.1: Multiple robot dogs generate connection request data packets containing unique device identifiers and output connection requests; S1.2: The master control node receives the connection request data packet, verifies the legitimacy of the device unique identifier, and outputs a verification result; S1.3: If the verification is successful, the master control node generates a response data packet including the communication port number and outputs a response instruction; S1.4: Each of the robot dogs receives the response instruction, parses the communication port number, establishes an encrypted communication link, and outputs a connection success signal; S1.5: Based on the connection success signal, the master control node synchronizes the global map and task list to each of the robot dogs and outputs initial state data.
3. The method for detecting anomalies in collaborative operation of multiple robot dogs according to claim 1, characterized in that: In step S4, the steps of establishing a global detection model include: S4.1: The robot dog packages the abnormal event according to a preset fixed format and outputs an abnormal event data packet; S4.2: The master control node receives the abnormal event data packets of all robot dogs, classifies and stores them according to the abnormality type, and outputs the classified data set; S4.3: Perform feature extraction and data cleaning on the classification data set, and output a training sample set; S4.4: Initialize a global detection model based on the training sample set and output initial model parameters.
4. The method for detecting anomalies in collaborative operation of multiple robot dogs according to claim 3, characterized in that: In step S4, the step of outputting the optimized detection model includes: S4.5: Using a federated learning framework, distribute the initial model parameters to each robot dog and output a model distribution instruction; S4.6: The robot dog updates the model parameters based on the individual abnormality information and outputs a local parameter update amount; S4.7: The master control node aggregates all the local parameter updates, calculates the optimal global parameter update using a weighted average method, and outputs the global update parameter. S4.8: Load the global updated parameters into the global detection model, and output the optimized detection model.
5. The method for detecting anomalies in collaborative operation of multiple robot dogs according to claim 4, characterized in that: In step S4.7, the step of calculating the global parameter update amount includes: S4.7.1: Extracting the gradient information from the local parameter update of each robot dog and outputting a gradient data set; S4.7.2: Set weight coefficients based on the proportion of the robot dog's local parameters and output the weight coefficient set; S4.7.3: Perform a weighted sum operation on the gradient data set and the weight coefficient set, and output a global gradient value; S4.7.4: Use a stochastic gradient descent algorithm to optimize the global gradient value and output an optimal global parameter update amount.
6. The method for detecting anomalies in collaborative operation of multiple robot dogs according to claim 1, characterized in that: In step S5, the step of outputting the final response instruction includes: S5.1: The master control node converts the multi-level anomaly information into a feature vector in the input format of the optimized detection model and outputs a standardized anomaly feature; S5.2: Input the standardized anomaly features into the optimized detection model, calculate the confidence value of the anomaly occurrence through model reasoning, and output the real-time anomaly detection result including the anomaly type and the corresponding confidence value; S5.3: Performing hierarchical judgment on the confidence value in the real-time anomaly detection result, and outputting a high-priority response instruction, a medium-priority response instruction, and a low-priority response instruction; S5.4: Distribute the high-priority response instruction, the medium-priority response instruction, and the low-priority response instruction to the corresponding robot dogs and related nodes, and output a final response instruction.
7. A system for detecting anomalies in collaborative operations of multiple robot dogs, which adopts a method for detecting anomalies in collaborative operations of multiple robot dogs as claimed in any one of claims 1 to 6, characterized in that: include: A role assignment module is used to establish connections between multiple robot dogs and a master control node. The master control node assigns initial roles, synchronizes the global map and task list, and outputs initial state data. A data preprocessing and feature fusion module is used to preprocess and fuse the initial state data and output multi-dimensional collaborative state features; A layered anomaly detection module is used to perform layered anomaly detection based on the multi-dimensional collaborative state characteristics. The master control node performs global detection, individual robot dogs perform individual detection independently, and robot dogs perform collaborative detection to output multi-level anomaly information; A model training and optimization module is used to upload abnormal events of each of the robot dogs to the master control node, which aggregates the data; and based on the aggregated data, establish a global detection model, update the global detection model through federated learning, and output an optimized detection model; An exception response and instruction generation module, configured to input the multi-faceted exception information into the optimized detection model for exception detection, output real-time exception detection results, take different measures for the real-time exception detection results with different confidence levels, and output a final response instruction; An emergency strategy generation module, which initiates zero-shot learning if the anomaly type in the real-time anomaly detection result is not covered in the training set of the global detection model, generates an emergency strategy based on physical rules, and outputs processing instructions; The cross-validation and collaborative decision-making module is used to realize the interaction of intermediate results of anomaly detection among robot dogs. The individual anomaly detection results are cross-validated through a voting mechanism. When more than half of the robot dogs determine that a robot dog has an anomaly, the individual anomaly is upgraded to a group-level collaborative anomaly, and the verified collaborative anomaly information is output to the main control node.
Citation Information
Patent Citations
Indoor wall plastering robot remote monitoring system based on Internet of Things
CN112653737A
Federal comparative confrontation knowledge distillation machine account detection method and device
CN117252204A