Task scheduling and state switching method for inspection robot of quantitative state machine

By using a quantized state machine model and intelligent decision-making methods, the problems of state switching and task priority evaluation for inspection robots in complex environments were solved, achieving precise state switching control and autonomous decision-making, thereby improving task completion rate and execution efficiency.

CN121635356APending Publication Date: 2026-03-10ANHUI XINLI GONGQING TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing inspection robots suffer from insufficient quantification and precision in state switching conditions, a single method for evaluating task priorities, a simplified energy consumption prediction model, and an imperfect anomaly handling mechanism. This results in their inability to make autonomous decisions in complex environments and their untimely emergency response, increasing the risk of return failure.

Method used

By employing a quantized state machine model and combining neural networks, deep neural networks, and fuzzy logic reasoning systems, we can achieve precise state switching control, intelligent task priority evaluation, accurate energy consumption prediction, and adaptive anomaly recovery. Real-time monitoring and decision-making are achieved through multi-objective optimization and event-driven architecture.

Benefits of technology

It improves the autonomous operation capability and task completion rate of inspection robots, ensures the accuracy and reliability of state switching, increases the response speed of emergency tasks, reduces the risk of return failure, and improves the efficiency of inspection task execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121635356A_ABST
    Figure CN121635356A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of robot intelligent control, and discloses an inspection robot task scheduling and state switching method for quantifying a state machine, which comprises the following steps: acquiring state machine operation configuration data; performing health degree evaluation on the sensor, navigation, communication and battery systems in an initial state; in the idle state, a segmented charging strategy is adopted, and task priorities are calculated through a neural network; a breakpoint resume and event-driven architecture is adopted to execute tasks in the inspection state; in a warehouse returning state, a deep neural network is adopted to predict return flight energy consumption, and a path is re-planned through multi-objective optimization when the electric quantity is insufficient; processing a control instruction by adopting speed limitation in a manual or mapping state, and starting an SLAM module in the mapping state; and in an abnormal state, a fuzzy logic reasoning system is adopted to calculate an abnormal grade, and recovery waiting, degradation protection or alarm is executed according to the grade. According to the invention, autonomous operation and intelligent decision making of the inspection robot in a complex dynamic environment can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of robot intelligent control, more particularly, it relates to a kind of quantitative state machine's inspection robot task scheduling and state switching method. BACKGROUND

[0002] With the rapid development of urban infrastructure construction, the demand for intelligent inspection robots in underground comprehensive pipe gallery, substation, chemical plant and other scenarios is increasing. Inspection robots need to run autonomously for a long time in complex environments without human intervention, complete equipment monitoring, data collection, anomaly identification and other tasks. However, the existing inspection robots have many shortcomings in task scheduling and state switching.

[0003] The existing inspection robots usually adopt a simple state machine model, and the state switching conditions are not quantified and accurate enough, which leads to the robot being unable to make reasonable decisions when facing power shortage, task conflict, equipment anomaly and other complex situations. The task priority evaluation method is single and cannot be dynamically adjusted according to the system state, which leads to delayed emergency task response. The energy consumption prediction model is too simplified and does not consider the nonlinear influence of environmental factors and robot state, which increases the risk of return failure. The abnormal handling mechanism is imperfect and lacks hierarchical identification and adaptive recovery capability, and once a fault occurs, manual intervention is often required.

[0004] Therefore, there is an urgent need for a quantitative state machine's inspection robot task scheduling and state switching method that can achieve accurate state switching control, intelligent task priority evaluation, accurate energy consumption prediction and adaptive anomaly recovery, thereby improving the autonomous operation capability and task completion rate of the inspection robot. SUMMARY

[0005] The present application provides a quantitative state machine's inspection robot task scheduling and state switching method, which solves the technical problems of insufficient quantification and accuracy of state switching conditions, single task priority evaluation method and inability to dynamically adjust

[0006] .

[0007] The present application provides a quantitative state machine's inspection robot task scheduling and state switching method, which includes the following steps:

[0008] S1, obtain state machine running configuration data, read and merge the state machine running configuration data by configuration file loading method to obtain a parameter set;

[0009] S2, receive the parameter set, and in the initial state, evaluate the health of the sensor, navigation, communication and battery system, and determine the next target state in combination with the current position;

[0010] S3, if entering the idle state, adopt the segmented charging strategy and start task monitoring, calculate the task priority through the neural network, and determine the next target state;

[0011] S4, if entering the patrol state, adopt the breakpoint continuation and event-driven architecture to execute tasks, dynamically evaluate the priority through time series prediction, and introduce the switching cost mechanism;

[0012] S5, if entering the back-to-warehouse state, adopt the deep neural network to predict the return energy consumption, and re-plan the path through multi-objective optimization when the power is insufficient, and monitor the return process in real time;

[0013] S6, if entering the manual or mapping state, adopt speed limit processing to control the instruction, start the SLAM module in the mapping state, detect the control timeout and execute state switching;

[0014] S7, if entering the abnormal state, adopt the fuzzy logic reasoning system to calculate the abnormal level, execute waiting for recovery, degradation protection or alarm according to the abnormal level, and continuously monitor the power and execute data synchronization.

[0015] In a preferred embodiment, the step of evaluating the health of sensors, navigation, communication and battery system in the initial state in S2 comprises:

[0016] Set a first timeout value, mark the sensor state as normal or abnormal according to whether data is received within the first timeout, and combine the state values of all sensors into a sensor state vector;

[0017] Define a set of key sensors and a set of non-key sensors, calculate the key sensor health, and set the fatal exception flag to true if the key sensor health is less than a preset threshold;

[0018] Load the pre-stored map file and initialize the positioning algorithm, estimate the robot position using the adaptive Monte Carlo localization method, and set the navigation exception flag to true if the map loading fails or the position confidence is less than a set threshold;

[0019] Set a second timeout value, set the communication state flag according to whether a response is received; read the real-time data of the battery management system, compare the current power percentage with the forced hibernation threshold to set the power critical flag; and adopt the decision tree method to determine the target state based on the above self-test results.

[0020] In a preferred embodiment, the step of calculating the task priority through the neural network in S3 comprises:

[0021] Extract five feature dimensions, task urgency feature, time pressure feature, space convenience feature, and energy consumption matching degree feature, calculate the difference between the current power and the task estimated energy consumption; historical execution success rate feature;

[0022] The weight adjustment neural network model is constructed, the input layer receives the feature vector, the hidden layer contains a preset number of neurons adopting the ReLU activation function, and the output layer corresponds to the weight of the five feature dimensions; the five feature values are multiplied by the corresponding weights and then added to obtain a feature weighted sum, and the addition result is multiplied by a preset task type basic priority to obtain a task comprehensive priority score.

[0023] In a preferred embodiment, the step of executing tasks in S4 using the breakpoint continuation and event-driven architecture comprises:

[0024] An event monitoring bus is constructed using the publish-subscribe mode, and power change events, manual control request events, navigation state change events, sensor abnormal event, task queue update events, network state change events, and timeout events are defined; a corresponding event handler is registered for each type of event;

[0025] The priority score at the future time is predicted using the exponential smoothing method, a first exponential smoothing value, a second exponential smoothing value, and a trend item are calculated, the predicted priority of the current task is compared with the maximum predicted priority of all tasks in the queue, and if the difference is greater than the priority switching threshold, a task switching decision is triggered.

[0026] In a preferred embodiment, the step of predicting the return energy consumption in S5 using a deep neural network comprises:

[0027] For each road segment on the path, environmental features, robot state features, and battery state features are extracted and preprocessed; the preprocessed features are combined into a feature vector; a deep neural network model is constructed, the input layer receives the feature vector, the hidden layer is responsible for extracting primary nonlinear combination patterns, identifying interactions between feature dimensions, and performing high-level fusion and compression, all of which adopt the ReLU activation function; the output layer adopts a linear activation function to output the predicted energy consumption value of the road segment;

[0028] The predicted energy consumption of all road segments is accumulated to obtain the total predicted energy consumption, the total predicted energy consumption is multiplied by a safety coefficient, and the return estimated energy consumption is output.

[0029] In a preferred embodiment, the safety coefficient is dynamically adjusted according to the model prediction confidence, specifically comprising:

[0030] The Monte Carlo Dropout technique is used to estimate the prediction uncertainty, the same road segment feature vector is forward propagated multiple times in the prediction phase, part of the neurons are randomly discarded each time, the prediction mean and standard deviation are calculated after obtaining multiple prediction results, the prediction coefficient of variation is obtained by dividing the prediction standard deviation by the prediction mean, the prediction confidence is obtained by subtracting one from the prediction coefficient of variation, and the average confidence of the overall path is obtained by averaging the prediction confidence of all road segments on the path.

[0031] The setting of the safety factor is based on statistical analysis of historical operation data, a mapping relationship between confidence and safety margin is established by comparing the deviation rate of actual energy consumption and predicted energy consumption, when the average confidence is greater than a first confidence threshold, the safety factor takes a first safety factor value, when the average confidence is between a second confidence threshold and the first confidence threshold, the safety factor takes a second safety factor value, and when the average confidence is less than the second confidence threshold, the safety factor takes a third safety factor value.

[0032] In a preferred embodiment, the step of re-planning the path by multi-objective optimization when the power is insufficient in S5 includes:

[0033] A multi-objective optimization problem is defined, the objective function includes three dimensions of energy consumption target, time target and safety target, and the optimization targets are all minimized;

[0034] A non-dominated sorting genetic algorithm is used to solve the multi-objective optimization problem, the population is initialized, each individual represents a candidate path from the current position to the charging bin, three objective function values are calculated for each individual and non-dominated sorting is performed, the individuals are divided into different Pareto front levels, selection, crossover and mutation genetic operations are performed to generate a new generation of population, and the Pareto optimal solution set is obtained by iterative evolution for a preset number of generations;

[0035] The energy consumption weight, time weight and safety weight are dynamically adjusted according to the current power condition, the weighted comprehensive score of each path in the Pareto optimal solution set is calculated, and the path with the lowest score is selected as the optimal path.

[0036] In a preferred embodiment, the step of starting the SLAM module in the mapping state in S6 includes:

[0037] The SLAM module uses a laser radar SLAM algorithm to process laser radar scan data and odometry data in real time, the laser radar outputs scan data at a preset frequency, and each frame includes a preset number of distance measurement values;

[0038] The SLAM module performs feature extraction on each frame of data, identifies corner and line segment geometric features in the environment, performs feature matching operations to associate the features of the current frame with the features of historical frames to establish a feature correspondence relationship, and performs pose optimization based on the feature correspondence relationship to estimate the motion trajectory of the robot by minimizing the re-projection error;

[0039] The map is updated according to the estimated motion trajectory and laser radar measurement data, and the newly observed environmental information is fused into the map;

[0040] The map data is periodically saved to the local storage, and if a control timeout is detected, the map saving operation is performed, the current constructed map data is written into the local storage, and is marked as an unfinished map in the map meta information.

[0041] In a preferred embodiment, the step of calculating the abnormality level in S7 using a fuzzy logic inference system comprises:

[0042] Three fuzzy input variables, abnormality severity, system health, and environmental risk, are defined, and each input variable is fuzzified, with a triangular membership function converting the precise value into a fuzzy set, with the abnormality severity, system health, and environmental risk each divided into three fuzzy sets of low, medium, and high.

[0043] A fuzzy inference rule base is constructed, with the rules using the Mamdani inference method to calculate the rule activation degree through a minimum operator, and the outputs of all rules aggregated using a maximum operator, with the defuzzification calculating the precise abnormality level value using the barycenter method.

[0044] In a preferred embodiment, the step of executing the waiting for recovery, degradation protection, or alarm according to the abnormality level in S7 comprises:

[0045] If the abnormality level is level one, a waiting for recovery sub-process is started, with the robot remaining stationary at the current position, and an abnormality monitoring thread is started to periodically re-detect whether the abnormality condition still exists, with the target state set to the initial state if the abnormality is detected to have been eliminated, and the abnormality level raised to level two if the waiting timer value is greater than the level one abnormality recovery waiting duration and the robot has not yet recovered.

[0046] If the abnormality level is level two, a degradation protection sub-process is started, with the abnormality source type determined, and a sensor degradation operation strategy executed if the abnormality source is a non-critical sensor fault, with a fault sensor list read and a list of affected detection items queried, a degradation task generated and continued to be executed, and an electric quantity protection strategy executed if the abnormality source is insufficient electric quantity, with the robot entering a low-power mode to shut down unnecessary modules.

[0047] If the abnormality level is level three, an alarm sub-process is started, with an emergency alarm message sent to the cloud platform through the communication module, and the robot entering a deep sleep mode after the message is sent.

[0048] The present application has the following advantages:

[0049] By constructing a refined seven-state machine model and quantifying all state switching conditions, precise state switching control is achieved, with the decision tree method used to comprehensively determine the target state based on multi-dimensional self-checking results, improving the accuracy and reliability of state switching; the neural network model is used to calculate the task priority, with five characteristic dimensions of task urgency, time pressure, spatial convenience, energy consumption matching degree, and historical success rate extracted, and an adaptive weight distribution mechanism used to dynamically adjust the weights, achieving intelligent task priority evaluation and improving the response speed of emergency tasks.

[0050] The return path is re-planned through a multi-objective optimization method, three targets of energy consumption, time and safety are comprehensively considered, a non-dominated sorting genetic algorithm is used to generate a Pareto optimal solution set, the weight is dynamically adjusted according to the current power condition to select the optimal path, and the return success rate under the condition of insufficient power is improved; through the event-driven asynchronous monitoring architecture and the time sequence prediction model, the real-time state perception and intelligent task switching decision are realized, the switching cost evaluation mechanism is introduced to avoid the efficiency loss caused by frequent switching, and the execution efficiency of the inspection task and the overall performance of the system are improved. BRIEF DESCRIPTION OF DRAWINGS

[0051] Figure 1 is a flowchart of a quantitative state machine inspection robot task scheduling and state switching method of the application. DETAILED DESCRIPTION

[0052] The application will now be further described in detail with reference to the drawings. These drawings are all simplified schematic diagrams, and only schematically show the basic structure of the application, and therefore only show the configurations related to the application.

[0053] In at least one embodiment of the application, a quantitative state machine inspection robot task scheduling and state switching method is disclosed, as shown in Figure 1 The method comprises the following steps:

[0054] S1, obtain state machine running configuration data, read and merge the state machine running configuration data by using a configuration file loading method to obtain a parameter set;

[0055] The state machine running configuration data is loaded by using a JSON format configuration file, including: power management configuration data, including a charging trigger threshold, an emergency return threshold, a forced hibernation threshold and a charging target threshold; timeout management configuration data, including a manual control timeout duration, a back-to-bay timeout duration, a charging abnormality timeout duration, an abnormality self-checking period and a patrol task timeout coefficient; position determination configuration data, including a charging bay position coordinate, an arrival distance threshold, a maximum linear speed and angular speed in mapping mode; abnormality grading configuration data, including a first-level abnormality recovery waiting duration, a second-level abnormality degradation processing flag and a third-level abnormality alarm trigger flag; energy consumption prediction model configuration data, including a reference energy consumption, an environmental influence coefficient matrix and a battery aging coefficient calculation parameter, wherein the battery aging coefficient calculation method is to multiply the battery cycle number by 0.0001 and then add 1; task priority configuration data, including a task type priority mapping table, an emergency degree weight, a deadline time weight and a distance weight; the above six types of configuration data are combined into a complete parameter set, loaded into a shared memory storage area of the state machine control module and backed up to a local persistent storage, and system initialization is completed.

[0056] S2, receive the parameter set, in the initial state, evaluate the health of sensors, navigation, communication and battery system, determine the next target state combined with the current location;

[0057] Based on the complete parameter set output by S1, in the initial state, use a multi-module parallel self-checking method to evaluate the health of each key subsystem of the robot, and determine the next target state switched from the initial state according to the self-checking result and the current location information; Specifically, the following steps are included:

[0058] S21, start the sensor self-checking sub-process; the robot is equipped with multiple sensors for environment perception and data acquisition, including laser radar, camera, inertial measurement unit, gas sensor, temperature and humidity sensor; data acquisition test is performed on each sensor in turn, data request instruction is sent to the sensor driver program, the first timeout value is set, the default value is 2s; if valid data meeting the format requirements can be received within the first timeout time, the sensor state is marked as normal, and the value is 1; if no data is received or the received data format is incorrect, the sensor state is marked as abnormal, and the value is 0; the state values of all sensors are combined into a sensor state vector;

[0059] S22, classify the importance of sensors to the core function of the robot; define a set of key sensors, which includes laser radar and inertial measurement unit; define a set of non-key sensors, which includes gas sensor, temperature and humidity sensor, and part of camera. Calculate the health of key sensors, specifically, add the state values of all sensors in the key sensor set to get the total, divide the total by the number of key sensors to get the health of key sensors; if the health of key sensors is less than 1.0, it means there is a key sensor failure, set the fatal exception flag to true; if the health of key sensors is equal to 1.0, it means all key sensors are normal, set the fatal exception flag to false;

[0060] S23, start the navigation module self-checking sub-process; load the pre-stored map file from local storage, which stores the occupancy information of the environment in raster map format; check the integrity of the map file, verify the file header information and data checksum; if the map is loaded successfully, initialize the positioning algorithm, which uses the adaptive Monte Carlo localization method to estimate the robot position by randomly distributing particles in the map and iteratively updating the particle weight according to the sensor observation data; execute a position estimation to obtain the current position coordinates and position confidence; if the map fails to load or the position confidence is less than the set threshold, set the navigation exception flag to true; otherwise, set the navigation exception flag to false;

[0061] S24, start the communication module self-checking sub-process; try to establish a TCP connection with the cloud platform, the connection target address and port are read from the configuration file; if the connection is successfully established, send a heartbeat packet to the cloud platform; start the receiving thread to wait for the cloud response, set the second timeout value, the default value is 5s; if the cloud's heartbeat response packet is received within the second timeout time, set the communication state flag to true; otherwise, set the communication state flag to false;

[0062] S25, read the real-time data of the battery management system to read the current power percentage, battery temperature, and charging state flag; compare the current power percentage with the forced hibernation threshold in the power management configuration data obtained from S1, if the current power percentage is less than the forced hibernation threshold, set the power critical flag to true; otherwise, set the power critical flag to false;

[0063] S26, based on the above self-checking results, determine the target state using the decision tree method; check the fatal exception flag, navigation exception flag, and power critical flag, if any of the three is true, set the target state to the abnormal state; if all the above three flags are false, calculate the Euclidean distance between the current position and the charging bay position in the position determination configuration data obtained from S1; compare the calculated Euclidean distance with the arrival threshold in the position determination configuration data obtained from S1, if the Euclidean distance is less than or equal to the arrival threshold, set the target state to the idle state; if the Euclidean distance is greater than the arrival threshold, set the target state to the return bay state;

[0064] S27, take the target state as the output, trigger the state switching event; after the state machine control module receives the event flag, perform state transition operation, update the current state to the target state; complete the processing flow of the initial state;

[0065] S3, if entering the idle state, use the segmented charging strategy and start task monitoring, calculate the task priority through the neural network, determine the next target state;

[0066] If the target state is the idle state, execute this step after entering the idle state, use the segmented charging strategy and task priority dynamic evaluation method to realize battery health management and efficient task response, determine the next target state after switching from the idle state; specifically including the following steps:

[0067] S31, after entering the idle state, check the charging state flag; if the charging state flag is false, start the charging exception timer and initialize it to 0; if the charging state flag is true, reset the charging exception timer to 0;

[0068] S32, according to the current power and battery temperature, adopt the segmented charging strategy to select the appropriate charging mode; if the current power is less than 50% and the battery temperature is less than 45 degrees Celsius, select the fast charging mode, set the charging current to the fast charging current value; if the current power is between 50% and 85%, or the battery temperature is greater than or equal to 45 degrees Celsius, select the slow charging mode, set the charging current to the slow charging current value; if the current power is greater than or equal to 85%, select the trickle charging mode, set the charging current to the trickle current value;

[0069] S33, start the periodic monitoring thread, which is executed every 10 seconds; read the real-time data of the battery management system to obtain the current power, actual charging current and actual charging voltage. If the charging state flag is false, increase the charging exception timer by 10 seconds; if the charging exception timer is greater than the charging exception timeout length in the timeout management configuration data obtained from S1, set the target state to the exception state and jump to S38; if the current power is greater than or equal to the charging target threshold in the power management configuration data obtained from S1, determine that the charging is completed, and send a stop charging instruction to the charging management module;

[0070] S34, during the charging process, start the task monitoring thread simultaneously, which is executed every 1 second; check whether the task queue is empty, if the queue is empty, indicating that there is no task to be executed at present, continue to monitor; if the queue is not empty, indicating that there is a task to be executed, perform task priority evaluation and sorting;

[0071] S35, obtain all tasks in the task queue, extract five characteristic dimensions using the analytic hierarchy process, and calculate the adaptive weight vector through the neural network model, calculate the task comprehensive priority score using the weighted summation method and sorting, obtain the sorted task queue and the first task to be executed; dynamically calculate the priority of all tasks in the task queue, using the method of combining the analytic hierarchy process with real-time state feedback, to obtain the task comprehensive priority score;

[0072] Read the basic attribute information of the task; read the task type, task urgency, task deadline, and task inspection point position list; query the basic priority corresponding to the task type from the priority mapping table;

[0073] A multi-dimensional feature vector is constructed for task priority evaluation. Based on the task attributes and the current state of the robot, five key feature dimensions are extracted: the first dimension is the task urgency feature, which is calculated using a nonlinear mapping function. Specifically, the task urgency is multiplied by 5, the negative value is taken, then the natural exponential function value is calculated, and finally the exponential function value is subtracted from 1 to obtain the task urgency feature. The second dimension is the time pressure feature. Specifically, the current system time is obtained, the remaining time is obtained by subtracting the current system time from the task deadline; the result is divided by the reference time constant, the default value is 3600 seconds; the hyperbolic tangent function value of the ratio is calculated to obtain the time pressure feature. The third dimension is the spatial convenience feature. Specifically, the Euclidean distance between the current position and the task starting point is calculated, the distance is squared, divided by the square of the spatial decay parameter (value 50 meters), and the negative value is calculated. The natural exponential function value is obtained to obtain the spatial convenience feature. The fourth dimension is the energy consumption matching degree feature. Specifically, the current power is subtracted from the estimated energy consumption of the task, and the result is divided by the current power to obtain the energy consumption margin ratio. The energy consumption margin ratio is subtracted by 0.3, the result is multiplied by 10, the negative value is calculated. The natural exponential function value is added to 1, and finally the sum is divided by 1 to obtain the energy consumption matching degree feature. The fifth dimension is the historical execution success rate feature, which is directly obtained from the historical success rate of the same type of task in the task execution history database.

[0074] An adaptive weight allocation mechanism is used to calculate the weight of each feature dimension. A system state vector is defined, including four state variables: current power percentage, task queue length, network connection state, and abnormality frequency. A weight adjustment neural network model is constructed, which is a three-layer fully connected network. The input layer receives the system state vector, the hidden layer contains 8 neurons using the ReLU activation function, and the output layer contains 5 neurons corresponding to the weights of the five feature dimensions, using the Softmax activation function to ensure that the weight sum is 1. The neural network model is obtained through offline training, and the training data comes from historical task execution records. The current system state vector is input into the neural network, and the adaptive weight vector is calculated by forward propagation, containing five weight values corresponding to the weights of the five dimensions of urgency, time pressure, spatial convenience, energy consumption matching degree, and historical success rate.

[0075] The task comprehensive priority score is calculated; a weighted summation method is adopted to combine the basic priority and the multi-dimensional features; specifically, the five feature values are multiplied by the corresponding weights respectively, the five products are added to obtain a feature weighted sum; then 1 is added to the feature weighted sum, and finally the added result is multiplied by the task type basic priority to obtain the task comprehensive priority score; this calculation method realizes dynamic amplification of the basic priority, so that tasks with high feature scores obtain more obvious priority improvement; all tasks in the task queue are sorted in descending order according to the priority scores to obtain a sorted task queue; the head task of the sorted queue is selected as the current to-be-executed task.

[0076] In S36, the task executability is evaluated according to the type of the current to-be-executed task and the current power; the task type is read, if the task type is a patrol task, the task estimated power consumption is calculated; the current power is compared with the sum of the task estimated power consumption and the charging trigger threshold in the power management configuration data obtained from S1, if the current power is greater than or equal to the sum of the estimated power consumption and the charging trigger threshold, it is determined that the task is executable, the target state is set to the patrol state and jumps to S38; if the power is insufficient, the charging is continued to wait for the power to rise;

[0077] In S37, if the task type is a mapping task, the energy consumption does not need to be evaluated, the target state is directly set to the mapping state and jumps to S38;

[0078] In S38, the target state is taken as an output to trigger a corresponding state switching event; the idle state processing flow is completed.

[0079] In some embodiments, the battery health degree evaluation method is adopted to optimize the charging strategy. In the charging mode selection process of S32, not only the current power and temperature are considered, but also the health state of the battery; the battery cycle number, battery internal resistance and battery capacity attenuation rate are read from the battery management system; the battery health degree score is calculated, specifically, the battery cycle number is multiplied by 0.0005, the battery capacity attenuation rate is multiplied by 0.1, the two products are added, and finally 1 is subtracted from the added result to obtain the battery health degree score; if the battery health degree score is less than 0.7, the charging strategy is adjusted: the fast charging current is reduced to 0.3 times the rated capacity, the trickle charging stage is entered in advance, and the charging target threshold is reduced to 90%; this method adopts a more gentle charging strategy after the battery is aged.

[0080] In S4, if the patrol state is entered, the task is executed by adopting the breakpoint continuation and event-driven architecture, the priority is dynamically evaluated by time series prediction, and a switching cost mechanism is introduced;

[0081] If the target state is the patrol state, the state switching into the patrol state is performed, and the step is executed, a breakpoint continuation mechanism, an event-driven asynchronous monitoring architecture and a task priority dynamic reevaluation method are adopted, a patrol task is executed and a state change is responded in real time, and the next target state switching from the patrol state is determined; the specific steps include the following steps.

[0082] S41, after entering the patrol state, a current task is extracted from a task queue; a patrol point list of the task is read, the list containing coordinates of a plurality of patrol points; a task progress mark is read, the mark recording a number of completed patrol points of the task; if the task progress mark is greater than 0, it indicates that the task has been interrupted, and this time of execution needs to continue from a breakpoint position; if the task progress mark is equal to 0, it indicates that it is the first execution of the new task;

[0083] S42, a current target patrol point index is set, the task progress mark is added by 1 to obtain the current target patrol point index; the patrol point coordinates corresponding to the index are obtained from the patrol point list; a navigation instruction is sent to a navigation module, and a navigation interface function is called; meanwhile, a patrol timer is started and initialized to 0; a task timeout threshold is calculated, and a patrol task timeout coefficient in timeout management configuration data obtained from S1 is multiplied by a task estimated execution time to obtain the task timeout threshold;

[0084] S43, the patrol timer started in S42 and the task timeout threshold are obtained, an event monitoring bus is constructed by using a publish / subscribe mode, and an event processor is registered for seven types of events, corresponding processing flows are executed according to the event types, and a target state and a state switching event are obtained;

[0085] In an embodiment of the application, an event-driven asynchronous monitoring architecture is adopted to realize real-time state perception and rapid response.

[0086] The event monitoring bus is constructed, the bus is realized by using a publish / subscribe mode, supports asynchronous publishing of events by a plurality of event sources, and supports subscription of interested event types by a plurality of event processors; seven types of key events are defined: a power change event, a manual control request event, a navigation state change event, a sensor exception event, a task queue update event, a network state change event and a timeout event.

[0087] Register the corresponding event handler for each type of event; the power change event handler subscribes to the power change event, and when the battery management system detects that the power change exceeds 1%, the power change event is asynchronously published, and the event carries the current power value; after the event handler receives the event, it immediately judges whether the power is lower than the emergency return threshold in the power management configuration data obtained from S1, and if so, the emergency return process is triggered: the current inspection point index is reduced by 1 and saved as a task progress marker, the current task is reinserted into the task queue, the target state is set to the warehouse return state, the state switching event is published and jumps to S45; if the power is between the emergency return threshold and the charging trigger threshold, the power warning event is published, and the subsequent monitoring frequency is increased;

[0088] The manual control request event handler subscribes to the manual control request event, and when the communication module receives the operator's remote control instruction, the manual control request event is immediately published. After the event handler receives the event, it sends a stop instruction to the navigation module, saves the current inspection point index reduced by 1 as a task progress marker, reinserts the current task into the task queue, sets the target state to the manual state, publishes the state switching event and jumps to S45;

[0089] The navigation state change event handler subscribes to the navigation state change event, and the navigation module asynchronously publishes the event when the state changes, including reaching the target point, path blocking, positioning failure, etc. When the target point reaching event is received, the inspection point detection sub-process is executed: the relevant sensors are started, the camera, gas sensor, and temperature and humidity sensor are selectively started according to the detection requirements of the inspection point. Collect sensor data and perform preliminary processing, store the collected data and detection results to the local database; after completing data collection, the inspection point index is increased by 1; if the inspection point index is greater than the total number of inspection points, it indicates that all inspection points have been completed, the task completion flag is set to true, the task progress marker is cleared to 0, the target state is set to the warehouse return state and jumps to S45; if the inspection point index is less than or equal to the total number of inspection points, the next inspection point coordinates are obtained and a new navigation instruction is sent to the navigation module;

[0090] When the path blocking or positioning failure event is received, the abnormal handling sub-process is started; try local re-planning, call the re-planning interface of the navigation module; if the re-planning is successful, the navigation module returns a new path and continues to execute; if the re-planning fails, record the number of consecutive failures, if the number of consecutive failures is less than 3 times, wait for 10 seconds and try re-planning again; if the number of consecutive failures reaches 3 times, it is determined as a secondary abnormality, the current inspection point index is reduced by 1 and saved as a task progress marker, the target state is set to the warehouse return state and jumps to S45;

[0091] The timeout event processor subscribes to a timeout event, the inspection timer runs in an independent thread, and when the timer value reaches the task timeout threshold, the timeout event is asynchronously published; after the event processor receives the event, it is determined that the task is timed out, the current inspection point index is reduced by 1 and saved as a task progress marker, the target state is set to the warehouse state and jumps to S45;

[0092] S44, get task queue update event, predict future priority score using exponential smoothing method and calculate task switching cost and benefit, only when the benefit is greater than the cost, execute task switching, get new current task or continue to execute original task decision;

[0093] In an embodiment of the application, a time series prediction model is introduced to identify tasks with possible significant priority changes in advance, and to make more intelligent task switching decisions:

[0094] Maintain the priority time series for each task in the task queue; during the inspection execution process, recalculate the priority score of all tasks in the task queue every 60 seconds, using the method in S35; record the priority score obtained each time to the priority time series of the task, and the time series uses a sliding window to store the priority scores of the last 10 time points;

[0095] Trend prediction is performed on the priority time series of each task; the exponential smoothing method is used to predict the priority score at the future time; calculate the first exponential smoothing value, specifically, multiply the priority score at the current time by the smoothing coefficient, and multiply the smoothing value at the last time by 1 minus the smoothing coefficient; add the two products to get the first exponential smoothing value at the current time; calculate the second exponential smoothing value, specifically, multiply the first exponential smoothing value at the current time by the smoothing coefficient, and multiply the second smoothing value at the last time by 1 minus the smoothing coefficient; add the two products to get the second exponential smoothing value at the current time; calculate the trend item, specifically, subtract the second exponential smoothing value from the first exponential smoothing value, multiply the result by the smoothing coefficient divided by 1 minus the smoothing coefficient, to get the trend item. Finally, predict the priority score at the future time, specifically, multiply the trend item by the predicted time step, add the first exponential smoothing value at the current time, to get the predicted future priority score;

[0096] Compare the predicted priority of the task currently being executed with the maximum predicted priority of all tasks in the queue; subtract the predicted priority of the current task from the maximum predicted priority in the queue, and if the difference is greater than the priority switching threshold, it indicates that there will be a more important task in the queue in the future, and the task switching decision is triggered in advance; save the current patrol point index minus 1 as a task progress marker, and reinsert the current task into the task queue; extract the task with the highest predicted priority from the queue as the new current task; determine the type of the new task, if it is a patrol task, continue to execute in the patrol state, and start from S41; if it is a mapping task, set the target state to the mapping state and jump to S45;

[0097] A task switching cost evaluation mechanism is introduced to avoid efficiency loss caused by frequent switching. The task switching cost is defined, including three components: current task interruption cost, new task startup cost, and path switching cost;

[0098] The current task interruption cost is specifically calculated by dividing the number of completed patrol points by the total number of patrol points, multiplying by the total estimated duration of the task, to obtain the time cost of the lost task; the new task startup cost is a fixed value, usually 30 seconds, representing the time overhead of task initialization and resource preparation; the path switching cost is specifically calculated by dividing the distance from the current position to the starting point of the new task by the average speed of the robot, to obtain the time cost of moving to the starting position of the new task; calculate the total switching cost, specifically, add the interruption cost, startup cost and path switching cost to obtain the total switching cost; calculate the task switching benefit, subtract the predicted priority of the current task from the maximum predicted priority in the queue, multiply the difference by the average execution duration of the task, to obtain the task switching benefit. Only when the switching benefit is greater than the switching cost, the task switching is executed, otherwise the current task is continued to be executed;

[0099] S45, before outputting the target state, execute the state switching transactional guarantee sub-process to ensure the data consistency and atomicity of the state switching process;

[0100] A state switching transaction object is created, the current state is recorded as the inspection state, the target state is recorded, the current task progress marker is recorded, and the current timestamp is recorded; the state of the transaction object is set to in progress; resource release operations are executed in turn; a stop interface of the navigation module is called, and the interface return state is checked. Secondly, a stop interface of the sensor module is called; again, a close interface of the data recording module is called; after each operation is executed, the return state is checked, and if any operation fails, the failure information is recorded to the transaction log and a rollback operation is attempted; a data persistence operation is performed; the current task progress marker is written to the local database, which is implemented using SQLite and supports transactional writing; the collected but not uploaded inspection data is written to the local storage, and the data is stored in JSON format; the state transition log is written to the log file; a write-then-sync mechanism is used, and a synchronization function of the file system is called to ensure that the data is completely written to the disk; the state flag is updated; the current state flag of the state machine control module is updated to the target state; the transaction completion is marked, and a transaction commit method is called; if an exception occurs during the transaction execution process, a rollback operation is performed, and a transaction rollback method is called; the target state is taken as the output, and the corresponding state switching event is triggered; the processing flow of the inspection state is completed.

[0101] In some embodiments, a multi-sensor fusion defect recognition method is used; in the inspection point detection sub-flow, the data of multiple sensors are fused for comprehensive judgment; for example, in the pipeline water leakage detection scene, camera images, temperature and humidity sensor data, and sound sensor data are collected simultaneously; the camera images are processed for image processing, and the visual detection confidence is calculated; the temperature and humidity data are analyzed, and the humidity anomaly confidence is calculated. The sound data is analyzed for frequency spectrum, and the acoustic detection confidence is calculated; a weighted fusion method is used to calculate the comprehensive confidence, specifically, the visual detection confidence is multiplied by 0.5, the humidity anomaly confidence is multiplied by 0.3, the acoustic detection confidence is multiplied by 0.2, and the three products are added to obtain the comprehensive confidence; if the comprehensive confidence is greater than the threshold 0.7, it is determined that a water leakage defect is detected.

[0102] S5, if the return-to-bay state is entered, a deep neural network is used to predict the return energy consumption, and when the power is insufficient, a multi-objective optimization is used to re-plan the path and monitor the return process in real time;

[0103] If the target state is the return-to-bay state, this step is executed after the state switching enters the return-to-bay state, a deep learning-based energy consumption prediction model and a dynamic path optimization mechanism are used to guide the robot to safely return to the charging bay, and the next target state after switching from the return-to-bay state is determined; specifically, the following steps are included:

[0104] S51, after entering the warehouse state, the return flight feasibility evaluation is performed; the current position of the robot and the charging bin position in the position determination configuration data obtained from S1 are read, the global planning interface of the path planning module is called, and the actual planning path from the current position to the charging bin is obtained; the path is represented as a sequence of path points, the first path point in the sequence is the current position, and the last path point is the charging bin position. The method for calculating the total length of the path is: for each two adjacent path points on the path, the Euclidean distance between them is calculated, and the distances between all adjacent path points are summed to obtain the total length of the path;

[0105] S52, the planning path and the total length of the path output by S51 are obtained, the environment features, the robot state features and the battery state features are preprocessed by using the one-hot encoding and the min-max normalization method to construct a 15-dimensional feature vector, the five-layer fully connected deep neural network model is input, the predicted energy consumption of each section is calculated and accumulated, the Monte Carlo Dropout technology is used to calculate the prediction confidence and dynamically adjust the safety coefficient, and the return estimated energy consumption is obtained;

[0106] In an embodiment of the present application, the traditional line energy consumption prediction model cannot accurately capture the nonlinear influence of complex environmental factors and robot state on energy consumption; this step introduces a deep neural network model to achieve high-precision energy consumption prediction;

[0107] Specifically, an energy consumption prediction feature vector is constructed; for each section on the path, multi-dimensional features are extracted and data preprocessing is performed; the first type is environmental features, the ground type, slope, obstacle density, lighting conditions and temperature of the section are obtained by querying the environmental map database; the ground type is represented by one-hot encoding, which converts the classification variable into a numerical vector. Four categories are defined: smooth ground, rough ground, slippery ground and sandy ground, which are encoded as four-dimensional vectors, with each type being 1 at the corresponding position and 0 at the other positions; the slope is calculated from the elevation information of the map, with a unit of degrees and an original value range of -15 degrees to +15 degrees; the slope is normalized by using the min-max normalization method: the slope value is added by 15 and divided by 30 to obtain the normalized slope value, with a value range of 0 to 1; the obstacle density represents the number of obstacles per unit area, which is obtained by counting the occupied grid of the map; the obstacle density is normalized by dividing the obstacle density by the maximum obstacle density statistically obtained in the history, to obtain the normalized obstacle density, and the maximum obstacle density is usually 10 per square meter; the lighting conditions are represented by a normalized value, with a value range of 0 to 1, 0 indicating complete darkness and 1 indicating sufficient lighting; the temperature is obtained from the environmental monitoring system, with an original unit of degrees Celsius and a value range of -10 degrees Celsius to 40 degrees Celsius; the temperature is normalized by adding 10 to the temperature value and dividing by 50 to obtain the normalized temperature value;

[0108] The second type is the robot state feature, including the current speed, the current acceleration, the current load weight, and the tire wear degree. The speed normalization method is to divide the current speed by the maximum speed. The acceleration normalization method is to divide the current acceleration by the maximum acceleration. The load weight normalization method is to divide the current load weight by the maximum load weight. The tire wear degree is in percentage form, with a value range of 0 to 1.

[0109] The third type is the battery state feature, including the current power percentage, the battery temperature, the battery cycle number, and the battery internal resistance. The power percentage has been normalized to 0 to 1. The battery temperature normalization method is to subtract 20 from the battery temperature and divide by 30, assuming a normal range of 20 to 50 degrees Celsius. The cycle number normalization method is to divide the battery cycle number by the battery rated cycle life. The internal resistance normalization method is to divide the battery internal resistance by the maximum internal resistance. The above-mentioned pre-processed features are combined into a feature vector.

[0110] A deep neural network energy consumption prediction model is constructed. The model is a five-layer fully connected neural network, and the input layer receives the feature vector. The first hidden layer is responsible for extracting the primary nonlinear combination mode of the input features, capturing the basic association between the environmental features, the robot state features, and the battery state features, and introducing a nonlinear transformation capability using the ReLU activation function. The second hidden layer is responsible for further abstraction on the basis of the features extracted by the first hidden layer, identifying the interaction and complex dependence between multiple feature dimensions, such as the joint influence of slope and battery aging degree on energy consumption, and maintaining gradient propagation efficiency using the ReLU activation function. The third hidden layer is responsible for high-level fusion and compression of the abstract features extracted by the previous two layers, forming a compact representation for the energy consumption prediction task, filtering redundant information and strengthening key prediction factors, and using the ReLU activation function to ensure the sparsity of feature expression. The output layer is responsible for mapping high-level features to specific energy consumption prediction values, using a linear activation function to directly output the predicted energy consumption value of the section, with the unit being watt-hour. The neural network model is obtained through offline training, and the training data comes from the historical operation records of the robot, including tens of thousands of paired samples of section features and actual energy consumption. The training uses the mean square error loss function, the optimizer uses the Adam algorithm, the learning rate is set to 0.001, and the training rounds are 100 rounds.

[0111] For each road segment on the path, the feature vector is input into the deep neural network model, and the predicted energy consumption of the road segment is calculated by forward propagation. The predicted energy consumption of all road segments is accumulated to obtain the total predicted energy consumption. Specifically, the total predicted energy consumption is initialized to 0, and the predicted energy consumption of each road segment is accumulated into the total predicted energy consumption by traversing each road segment on the path. After the traversal is completed, the final total predicted energy consumption is obtained. Considering the prediction uncertainty, a safety factor is introduced to calculate the final estimated return energy consumption. Specifically, the total predicted energy consumption is multiplied by the safety factor to obtain the return estimated energy consumption. The safety factor is dynamically adjusted according to the model prediction confidence. When the confidence is high, the value is 1.1, and when the confidence is low, the value is 1.3.

[0112] The prediction confidence is calculated. The deep neural network model uses the Monte Carlo Dropout technique to estimate the prediction uncertainty. In the prediction phase, the feature vector of the same road segment is forward propagated multiple times, and each time a portion of the neurons is randomly discarded. The prediction number is usually 10. After obtaining multiple prediction results, the prediction mean and standard deviation are calculated. The prediction confidence is defined. Specifically, the coefficient of variation is obtained by dividing the prediction standard deviation by the prediction mean. The prediction confidence is obtained by subtracting the coefficient of variation from 1. The average confidence of the overall path is obtained by averaging the prediction confidence of all road segments on the path. The safety factor is dynamically determined according to the average confidence. The safety factor is set based on statistical analysis of historical operation data. By comparing the deviation rate of actual energy consumption and predicted energy consumption, a mapping relationship between confidence and safety margin is established. Specifically, when the average confidence is greater than 0.9, it indicates that the model prediction stability is high, and historical data shows that the deviation of actual energy consumption and predicted energy consumption at this time is usually within 10%. Therefore, the safety factor is 1.1, which reserves a safety margin of 10%. When the average confidence is between 0.7 and 0.9, it indicates that the model prediction has certain fluctuations, and historical data shows that the actual energy consumption deviation at this time may reach 20%. Therefore, the safety factor is 1.2, which reserves a safety margin of 20%. When the average confidence is less than 0.7, it indicates that the model prediction uncertainty is large, and it may be affected by unknown environmental factors. Historical data shows that the actual energy consumption deviation at this time may exceed 30%. Therefore, the safety factor is 1.3, which reserves a safety margin of 30%. This piecewise linear mapping strategy ensures the safety of the return while avoiding excessive conservatism that reduces task execution efficiency.

[0113] S53, read the current power, compare it with the return estimated energy consumption; if the current power is less than the return estimated energy consumption, it is determined that the power is insufficient to support normal return, but it does not immediately enter the abnormal state, but tries the energy saving strategy;

[0114] S54, obtaining the low power signal determined in S53, using the non-dominated sorting genetic algorithm to iteratively evolve for 50 generations to obtain a set of Pareto optimal solutions, dynamically adjusting the weights according to the current power and calculating the weighted comprehensive score of each path to select the optimal path, using a deep neural network model to re-predict the energy consumption of the optimal path, and obtaining an updated path or abnormal state signal

[0115] When the power is low, the traditional method only reduces the speed or selects a shorter path. In this step, a multi-objective optimization method is used to consider the energy consumption, time, and safety of three targets to generate a set of Pareto optimal paths. Specifically, a multi-objective optimization problem is defined. The objective function includes three dimensions: energy consumption target, time target, and safety target. The energy consumption target is equal to the total predicted energy consumption of the path, and the optimization target is to minimize. The time target is equal to the total length of the path divided by the average speed, and the optimization target is to minimize. The safety target is equal to the sum of the risk scores of all road segments on the path, and the risk score is calculated based on factors such as obstacle density, slope, and ground type. The optimization target is to minimize. The non-dominated sorting genetic algorithm is used to solve the multi-objective optimization problem. The population is initialized, and each individual represents a candidate path from the current location to the charging bay. The population size is set to 50. For each individual, calculate the value of the three objective functions, perform non-dominated sorting, and divide the individuals into different Pareto front levels. The first level is the set of Pareto optimal solutions, i.e., there is no other solution that is better than this solution in all objectives. Perform genetic operations, including selection, crossover, and mutation, to generate a new generation of population. The selection operation uses tournament selection, which preferentially selects individuals with low Pareto level. The crossover operation uses single-point crossover, which exchanges the subsequent part of two paths at a certain path point. The mutation operation randomly changes a path point in the path. Iteratively evolve for 50 generations to obtain the final set of Pareto optimal solutions. Select the path that best fits the current situation from the set of Pareto optimal solutions. Define a preference weight vector, which includes three components: energy consumption weight, time weight, and safety weight. Dynamically adjust the weights according to the current power situation. Determine the relationship between the current power and the estimated energy consumption for the return trip: if the current power is less than 1.2 times the estimated energy consumption for the return trip, it indicates that the power is extremely tight, set the energy consumption weight to 0.7, the time weight to 0.2, and the safety weight to 0.1, and prioritize energy consumption; if the current power is between 1.2 times and 1.5 times the estimated energy consumption for the return trip, set the energy consumption weight to 0.5, the time weight to 0.3, and the safety weight to 0.2, balance energy consumption and time; for each path in the set of Pareto optimal solutions, calculate the weighted comprehensive score. The method is as follows: multiply the normalized energy consumption target value by the energy consumption weight, multiply the normalized time target value by the time weight, multiply the normalized safety target value by the safety weight, and add the three products to obtain the weighted comprehensive score. Select the path with the lowest score as the optimal path.

[0116] Re-predict the energy consumption of the optimal path using a deep neural network model; if the predicted energy consumption is less than the current power, update the path to the optimal path and continue to execute the return; if it still cannot meet the energy consumption requirement, set the target state to the abnormal state and jump to S59;

[0117] S55, if the power is sufficient, send a return instruction to the navigation module, and the robot starts to move to the charging bin; at the same time, start the bin return timer and initialize it to 0;

[0118] S56, in the return process, start the state monitoring thread, which is executed every 0.5 seconds; perform the arrival judgment, read the current position of the robot, and calculate the distance between the current position and the charging bin position in the position judgment configuration data obtained from S1; Specifically, obtain the current position coordinates and charging bin position coordinates, calculate the difference between the two coordinates in the horizontal and vertical directions respectively, square the two difference values respectively, add them together, and finally take the square root of the added result to get the Euclidean distance between the current position and the charging bin; compare the calculated distance with the arrival threshold in the position judgment configuration data obtained from S1, if the distance is less than or equal to the arrival threshold, it is judged that the charging bin has been arrived, the target state is set to idle state and jump to S59;

[0119] S57, execute the manual control request detection and timeout detection; check the manual control instruction queue, if the queue is not empty, stop navigation immediately, set the target state to manual state and jump to S59; read the bin return timer, if the timer value is greater than the bin return timeout time in the timeout management configuration data obtained from S1, it is judged that the bin return is timeout; instead of entering the abnormal state immediately, set the abnormal warning flag to true, and send the warning information to the cloud platform through the communication module; continue to execute the navigation, but increase the monitoring frequency to every 0.2 seconds; if the timer value is greater than 2 times the bin return timeout time, it is judged that the timeout is serious, the target state is set to the abnormal state and jump to S59;

[0120] S58, in the return process, real-time monitor the deviation between the actual energy consumption and the predicted energy consumption; read the cumulative discharge of the battery management system every 30 seconds, calculate the distance traveled, and calculate the actual unit distance energy consumption; Specifically, divide the cumulative discharge by the distance traveled to get the actual unit distance energy consumption;

[0121] Calculate the remaining path length, and update the remaining path estimated energy consumption based on the actual energy consumption; Specifically, multiply the remaining path length by the actual unit distance energy consumption, and then multiply by the safety factor to get the remaining path estimated energy consumption; compare the current power with the remaining path estimated energy consumption, if the current power is less than the remaining path estimated energy consumption, it means that the actual energy consumption is higher than the prediction, trigger the emergency energy saving mode: reduce the movement speed to 0.6 times the normal speed, turn off unnecessary sensors, and issue a power critical warning;

[0122] S59, execute the state switching transactional guarantee sub-flow, using the same method as S45, to ensure that the navigation module stops correctly, data is saved completely, and state flags are updated correctly; the target state is taken as the output to trigger the corresponding state switching event; and the process flow of the return-to-bay state is completed.

[0123] In some embodiments, a dynamic speed adjustment strategy is used to balance the return time and energy consumption; during the return process of S55, the robot movement speed is dynamically adjusted according to the remaining power and the remaining distance; the energy consumption margin is periodically calculated, specifically, the estimated energy consumption to reach the charging bay is subtracted from the current power to obtain the energy consumption margin; the movement speed is adjusted according to the energy consumption margin: if the energy consumption margin is greater than 20% of the total capacity of the battery, the movement speed is increased to 1.2 times the normal speed; if the energy consumption margin is between 10% and 20% of the total capacity of the battery, the normal speed is used; if the energy consumption margin is less than 10% of the total capacity of the battery, the speed is reduced to 0.7 times the normal speed; the purpose of this method is to optimize the balance between return time and energy consumption under the premise of ensuring safe return.

[0124] S6, if the manual or mapping state is entered, a speed limit processing control instruction is used, the SLAM module is started in the mapping state, the control timeout is detected, and state switching is performed;

[0125] If the target state is the manual state or the mapping state, this step is performed after the state switching into the corresponding state, the control timeout detection and speed limit mechanism are used to realize safe manual control, and the next target state after switching from the manual or mapping state is determined.

[0126] S61, determine the specific state type entered; if the target state is the manual state, set the speed limit flag to false; if the target state is the mapping state, set the speed limit flag to true, and read the maximum linear speed and the maximum angular speed in the mapping mode from the position determination configuration data obtained from S1, and take these two parameters as the speed limit values of the current state;

[0127] S62, start the control instruction listening thread, which is executed every 0.1 seconds; check whether the manual control instruction queue is empty, if the queue is empty, it means that there is no control instruction currently, continue to wait; if the queue is not empty, extract the latest control instruction, parse the instruction to obtain the target linear speed and the target angular speed as two control parameters;

[0128] S63, if the speed limit flag is true, perform speed limit processing on the control command; limit the linear speed, compare the target linear speed with the maximum linear speed, if the target linear speed is greater than the maximum linear speed, truncate the target linear speed to the maximum linear speed; if the target linear speed is less than or equal to the maximum linear speed, keep the target linear speed unchanged; limit the angular speed, compare the target angular speed with the maximum angular speed, if the target angular speed is greater than the maximum angular speed, truncate the target angular speed to the maximum angular speed; if the target angular speed is less than or equal to the maximum angular speed, keep the target angular speed unchanged; take the processed linear speed and angular speed as the actual control parameters, and send them to the underlying motion control module to drive the robot to move;

[0129] S64, if the speed limit flag is false, directly send the target linear speed and the target angular speed as the actual control parameters to the underlying motion control module, but keep the safety protection mechanism; the safety protection mechanism includes two sub-modules of collision detection and fall detection; the collision detection sub-module monitors the distance of the front obstacle in real time through the laser radar, and after reading the laser radar data each time, finds the minimum distance value in the scanning range, compares the minimum distance value with the safety threshold of 0.3 meters, if the minimum distance value is less than the safety threshold, immediately sends a zero speed instruction to the motion control module to force the robot to stop; the fall detection sub-module monitors the ground height change through the ground detection sensor, continuously reads the sensor data, calculates the height difference value of the adjacent two measurements, if the absolute value of the height difference value is greater than the step detection threshold, it is determined that a step or a pit is detected, and a stop command is immediately sent;

[0130] S65, in the mapping state, start the SLAM mapping module at the same time; the SLAM module adopts the laser radar SLAM algorithm, processes the laser radar scanning data and the odometer data in real time, and constructs or updates the environment map; the laser radar outputs scanning data at a frequency of 10 Hz, each frame contains 360 distance measurement values; the SLAM module performs feature extraction on each frame of data, identifies geometric features such as corners and line segments in the environment; after feature extraction is completed, perform feature matching operation, associate the features of the current frame with the features of the historical frame, and establish the feature correspondence relationship; based on the feature correspondence relationship, perform pose optimization, estimate the motion trajectory of the robot by minimizing the re-projection error; according to the estimated motion trajectory and the laser radar measurement data, update the grid map, and fuse the newly observed environmental information into the map; periodically save the map data to the local storage every 5 seconds, the map file stores the grid data in PGM format and the map meta information in YAML format;

[0131] S66, start a control timeout timer, initialize to 0; each time a valid control instruction is received, reset the timer to 0; start a monitoring thread, perform a check every 1 second, increase the timer value by 1 second, compare the timer value with the manual control timeout duration in the timeout management configuration data obtained from S1; if the timer value is greater than the manual control timeout duration, determine that the control is timed out; immediately send a stop instruction with linear speed 0 and angular speed 0 to the motion control module, and the robot stops moving; set the target state to the warehouse returning state and jump to S67;

[0132] S67, in the mapping state, if control timeout is detected, perform a map saving operation; call the map saving interface of the SLAM module, which performs the following operations: write the currently constructed grid map data to the local storage, mark it as an unfinished map in the map meta information, calculate the mapping progress percentage by dividing the covered area by the total planning area and multiplying by 100, record the mapping progress percentage and the covered area to the meta information file; after the map saving is completed, trigger the state switching; execute the state switching transactional guarantee sub-process, which sequentially performs the following operations: call the stop interface of the SLAM module and check the return state, call the release interface of the motion control module and check the return state, write the map saving state to the local database, and write the state transition log to the log file. Take the target state as the output, trigger the state switching event; complete the processing flow of the manual or mapping state.

[0133] In some embodiments, gesture recognition control method is used to improve operation convenience; in the control instruction receiving process of S62, in addition to receiving traditional remote controller instructions, gesture recognition control based on camera is also supported; the front camera of the robot captures images in real time, and a deep learning model is used to recognize the gesture actions of the operator; five basic gestures are defined: waving hand forward means forward, waving hand backward means backward, waving hand left means left turn, waving hand right means right turn, and clenched fist means stop; the gesture recognition model is implemented using a lightweight convolutional neural network, with an inference time of less than 50 milliseconds; after recognizing the gesture, generate the corresponding speed instruction according to the gesture type: forward gesture generates positive linear speed and zero angular speed, backward gesture generates negative linear speed and zero angular speed, left turn gesture generates zero linear speed and positive angular speed, right turn gesture generates zero linear speed and negative angular speed, and stop gesture generates zero linear speed and zero angular speed. Insert the generated speed instruction into the control instruction queue, and process it according to the process of S63 or S64 subsequently; the purpose of this method is to provide a backup control method in scenarios where the remote controller is not available or inconvenient to use.

[0134] S7, if entering an abnormal state, using a fuzzy logic reasoning system to comprehensively calculate the abnormality level of abnormality severity, system health degree and environmental risk degree, executing waiting for recovery, degradation protection or alarm according to the level, continuously monitoring the power and executing data synchronization;

[0135] If the target state is an abnormal state, this step is executed after entering the abnormal state, using the fuzzy logic-based abnormality grading identification, sensor degradation operation and adaptive self-checking method to realize automatic recovery of the abnormality and determine the next target state switched from the abnormal state; specifically comprising the following steps:

[0136] S71, after entering the abnormal state, executing abnormality grading identification; reading the abnormal trigger source information, which records the specific reasons for entering the abnormal state, including abnormal type, abnormal occurrence time, related sensor or module identification, etc.

[0137] Obtaining the abnormal trigger source information read in S71, using the weighted summation method to calculate the system health degree and the environmental risk degree, using the triangular membership function to fuzzily divide the three input variables into three fuzzy sets of low, medium and high, constructing a fuzzy reasoning rule base of 27 rules, using the Mamdani reasoning method to calculate the rule activation degree and aggregation, using the barycenter method to defuzzify to obtain the final abnormality level.

[0138] In an embodiment of the present application, the conventional method uses a fixed rule table for abnormality grading, which cannot adapt to complex and variable abnormal conditions; this step introduces a fuzzy logic reasoning system to dynamically determine the abnormality level by comprehensively considering multiple factors; the fuzzy input variables are defined; the first input variable is the abnormality severity, and the basic severity value is queried from the predefined table according to the abnormal type, with a value range of 0 to 1; the severity of sensor failure is determined according to the importance of the sensor, with a critical sensor failure severity of 0.9 and a non-critical sensor failure severity of 0.3; the second input variable is the system health degree, which is calculated by comprehensively considering the current power, sensor normal rate and communication state, with a value range of 0 to 1; specifically, the power contribution value is calculated by dividing the current power percentage by 100 and multiplying by the power weight 0.4 to obtain the power contribution value; then the sensor contribution value is calculated by dividing the number of normally working sensors by the total number of sensors and multiplying by the sensor weight 0.4 to obtain the sensor contribution value; then the communication contribution value is calculated by reading the communication state flag, with a value of 1 for a connected normal state and 0 for a disconnected state, and multiplying by the communication weight 0.2 to obtain the communication contribution value; finally, the three contribution values are added to obtain the system health degree. The sum of the weight coefficients is 1, ensuring that the health degree is normalized to the interval of 0 to 1.

[0139] The third input variable is the environmental risk degree, which is evaluated based on the current location, network connection, weather conditions and the like, and has a value range of 0 to 1. Specifically, the location risk contribution value is calculated, and the location risk coefficient is determined according to whether the current location is in a safe area, the safe area being 0 and the dangerous area being 1, multiplied by the location weight 0.5 to obtain the location risk contribution value. Secondly, the network risk contribution value is calculated, the communication state flag is read, and the network disconnection risk is obtained by subtracting the communication state flag from 1, multiplied by the network weight 0.3 to obtain the network risk contribution value. Thirdly, the weather risk contribution value is calculated, and the weather risk coefficient is determined according to the weather conditions, the normal weather being 0 and the severe weather being 1, multiplied by the weather weight 0.2 to obtain the weather risk contribution value; finally, the three contribution values are added to obtain the environmental risk degree.

[0140] Each input variable is fuzzified; the triangular membership function is used to convert the precise value into a fuzzy set; the abnormal severity is divided into three fuzzy sets of low, medium and high, the low corresponding to the center point of the membership function being 0.2, the medium corresponding to 0.5, and the high corresponding to 0.8; the system health degree is divided into three fuzzy sets of poor, medium and good, the poor corresponding to the center point being 0.2, the medium corresponding to 0.5, and the good corresponding to 0.8; the environmental risk degree is divided into three fuzzy sets of low, medium and high, the low corresponding to the center point being 0.2, the medium corresponding to 0.5, and the high corresponding to 0.8; for the precise value of each input variable, the membership degree in each fuzzy set is calculated, and the triangular function is used for membership degree calculation, the closer to the center point, the higher the membership degree.

[0141] A fuzzy reasoning rule base is constructed; the rule base contains 27 rules covering all combinations of the three input variables; for example, rule 1: if the abnormal severity is high, the system health degree is poor, and the environmental risk degree is high, the abnormal level is level 3; rule 2: if the abnormal severity is low, the system health degree is good, and the environmental risk degree is low, the abnormal level is level 1; the rules use the Mamdani reasoning method, and the rule activation degree is calculated by the minimum value operator, and the specific method is as follows: for each rule, the minimum value of the membership degrees of all antecedent conditions of the rule is taken as the activation degree of the rule.

[0142] performing fuzzy reasoning and de-fuzzification; after calculating the activation degree of all rules, the maximum operator is used to aggregate the outputs of all rules, specifically, for each output fuzzy set, the maximum value of the activation degrees of all rules pointing to the set is taken; the output variable is the abnormality level, which is divided into three fuzzy sets: level 1, level 2 and level 3; the centroid method is used for de-fuzzification to calculate the accurate abnormality level value, the value range is 1 to 3, specifically, for each output fuzzy set, the center point value is multiplied by the corresponding aggregated activation degree, all products are added, and finally divided by the sum of all aggregated activation degrees to obtain the accurate abnormality level value; according to the value, the final abnormality level is determined: if the value is less than 1.5, the abnormality level is 1, if it is between 1.5 and 2.5, the abnormality level is 2, and if it is greater than 2.5, the abnormality level is 3;

[0143] S72, if the output abnormality level is 1, start the waiting for recovery sub-process; the robot keeps the current position still and sends a stop instruction to the motion control module; start the waiting timer, initialize it to 0. Start the abnormality monitoring thread, which is executed every 10 seconds, to re-detect whether the abnormal condition still exists; the detection method is: according to the abnormal trigger source information, re-read the state of the related sensor or module to determine whether the abnormal condition has been eliminated; if it is detected that the abnormality has been eliminated, set the target state to the initial state and jump to S78; if the abnormality has not been eliminated, increase the waiting timer value by 10 seconds, and compare the timer value with the first abnormality recovery waiting time length in the abnormality grading configuration data obtained from S1; if the timer value is greater than the first abnormality recovery waiting time length and still not recovered, the abnormality level is upgraded to 2;

[0144] S73, if the abnormality level is 2, start the degradation protection sub-process; judge the type of the abnormal source, if the abnormal source is a non-critical sensor fault, execute the sensor degradation operation strategy; specifically, read the fault sensor list, which contains the identification of all current fault sensors; query the affected detection item list from the task execution strategy library, the query method is: traverse all detection items of the task, for each detection item, check its dependent sensor list, if the dependent sensor is in the fault sensor list, add the detection item to the affected detection item list;

[0145] modify the execution strategy of the current task, mark the state of the affected detection item as skipped; generate a degraded task, the construction method of the task is: copy the inspection point list and task progress of the original task, remove the affected detection items from the detection item list, keep the unaffected detection items, add a degraded task marker in the task meta information, and record the skipped detection item list and the fault sensor list;

[0146] The degraded task is taken as the current task, and the original task type is determined; if the original task is an inspection task, the target state is set to an inspection state, and the robot will continue to execute the degraded inspection task; if there is no task to be executed or the abnormal source does not support degraded operation, the target state is set to an idle state. Jump to S78;

[0147] S74, if the abnormal level is 2 and the abnormal source is insufficient power, execute the power protection strategy; read the secondary abnormality degradation processing flag from the abnormality grading configuration data obtained from S1, if the flag is true, the robot enters a low-power mode; the execution method of the low-power mode is to close unnecessary modules, including part of the camera, gas sensor, temperature and humidity sensor, etc., only keep the laser radar, inertial measurement unit, navigation module, communication module running; determine the current position of the robot, calculate the distance between the current position and the charging bin position in the position determination configuration data obtained from S1, if the distance is greater than the arrival threshold, it means not in the charging bin, then further determine whether the current power is greater than the minimum energy consumption for return; the minimum energy consumption for return is obtained from the energy consumption prediction model of S5. If the current power is greater than the minimum energy consumption for return, try to execute the return, set the target state to the return-to-bin state and jump to S78; if the power is insufficient to return, stay in place and enter the self-checking cycle of S75;

[0148] S75, if the abnormal level is 3, start the alarm sub-process; read the third abnormality alarm trigger flag from the abnormality grading configuration data obtained from S1, if the flag is true, send an emergency alarm message to the cloud platform through the communication module; the alarm message is encoded in JSON format, including the following fields: robot unique identifier, abnormal type, abnormal level, current position coordinates, current power percentage, timestamp, abnormal detailed description, system health degree, environmental risk degree; after the message is sent, the robot enters a deep sleep mode, all unnecessary modules are closed, only the battery management system and the minimum communication function are retained;

[0149] S76, start the self-checking cycle timer, initialize it to 0; the timer is used to control the triggering time of periodic self-checking; start the timing thread, increase the timer value by 1 every 1 second; compare the timer value with the abnormality self-checking period in the abnormality grading configuration data obtained from S1, when the timer value reaches the abnormality self-checking period, wake up the system to perform self-checking; set the target state to the initial state, trigger the state to the initial state, and execute the device self-checking process of S2; if the self-checking passes, the system will automatically recover to the idle state or the return-to-bin state according to the logic of S2; if the self-checking still fails, re-enter the abnormal state, reset the self-checking cycle timer to 0, and continue the self-checking cycle;

[0150] S77, during the entire process of the abnormal state, continuously monitor the power; start the power monitoring thread, read the current power every 30 seconds; compare the current power with the forced hibernation threshold in the power management configuration data obtained from S1, if the current power is less than the forced hibernation threshold, it is determined that the power has dropped to a dangerous level, and it is necessary to enter deep hibernation to protect the battery; the execution method of deep hibernation is to successively close all modules including the communication module, the navigation module, the sensor module, and only the battery protection function and the minimized wake-up mechanism are retained; record the hibernation reason and the hibernation time to the local persistent storage;

[0151] S78, execute the data synchronization sub-process after network recovery; in the self-checking loop of the abnormal state, every time the network connection state changes is detected, if the communication state flag changes from false to true, it indicates that the network connection is restored, and the data synchronization thread is started; the execution method of data synchronization is to read the local cached data to be synchronized, including inspection data, state transition log, abnormal record, etc. Export the data to JSON format, add data checksum, and pack it into a synchronization data packet; upload the synchronization data packet to the cloud platform through the communication module, set the upload timeout time to 60 seconds. If the cloud upload success confirmation is received within the timeout time, clear the synchronized data in the local cache, and record the synchronization success log. If no confirmation is received within the timeout time, the data is retained in the local cache, waiting for the next synchronization opportunity;

[0152] S79, execute the state switching transactional guarantee sub-process to ensure the data consistency when the abnormal state is switched to other states; the execution method of the sub-process is to create a state switching transaction object, record the current state as the abnormal state, record the target state, and record the current timestamp; successively execute the resource release operation, including stopping the abnormal monitoring thread, stopping the power monitoring thread, and stopping the self-checking loop timer; execute the data persistence operation, write the abnormal processing result to the local database, and write the state transition log to the log file; update the state flag, update the current state flag of the state machine control module to the target state; take the target state as the output, trigger the corresponding state switching event. Complete the processing process of the abnormal state;

[0153] In some embodiments, a remote diagnosis auxiliary method is used to improve the abnormal recovery efficiency; in the three-level abnormal alarm process of S75, in addition to sending the alarm message, remote diagnosis data collection is started; collect system running log, sensor raw data, state transition history, performance monitoring data and other diagnostic information, and pack and upload to the cloud platform; the expert system or operation and maintenance personnel of the cloud platform can analyze the abnormal reason based on the diagnostic data, and issue recovery measures through remote instructions; after the robot receives the remote recovery instruction, the corresponding operation is executed and self-checking is performed again.

[0154] In an embodiment of the present application, an application example is provided: the present application focuses on the field of intelligent inspection of urban underground comprehensive pipe gallery; a city has built an underground comprehensive pipe gallery with a total length of 12 kilometers, in which various pipelines such as power, communication, water supply and gas are laid, and periodic inspection is needed to monitor the pipeline state and environmental parameters; the pipe gallery environment is complex, with multiple branches and nodes, and the network signal is unstable in some areas, manual inspection is low in efficiency and has safety risks; the inspection robot using the method of the present application is deployed in the pipe gallery to realize long-time unattended autonomous operation;

[0155] The pipe gallery inspection robot is equipped with a laser radar, a panoramic camera, an infrared thermal imager, a gas sensor, a temperature and humidity sensor and other sensors, the battery capacity is 200 ampere-hours, the normal working power consumption is 150 watts, and the charging power is 500 watts. Three charging warehouses are arranged in the pipe gallery, located at the entrance, the middle node and the end of the pipe gallery, and the distance between the charging warehouses is about 4 kilometers. 50 inspection points are planned in the pipe gallery, distributed at key equipment locations, pipeline joints and environmental monitoring points.

[0156] The system parameter configuration is shown in Table 1:

[0157] Table 1 System parameter configuration table

[0158]

[0159] The task execution process data record is shown in Table 2:

[0160] Table 2 Task execution process key data record table

[0161]

[0162] From the above data record, it can be seen that the method of the present application can effectively handle complex scenes and realize autonomous and efficient operation of the robot. The robot dynamically adjusts the state according to the change of the electric quantity during the inspection process, makes a reasonable decision through task switching cost-benefit analysis when receiving an emergency task, triggers an emergency return in time when the electric quantity is insufficient, and finally returns to the charging warehouse safely. The whole process embodies the precise control and intelligent decision-making ability of the quantitative state machine.

[0163] The above describes an embodiment of the present application, but the embodiment is not limited to the specific implementation described above, which is only illustrative and not limiting, and those skilled in the art can make more forms of equivalent embodiments under the inspiration of the embodiment, which are all within the protection of the embodiment.

Claims

1. A method for scheduling and switching tasks of a patrol robot of a quantized state machine, characterized in that, The method comprises the following steps: S1, obtaining state machine running configuration data, reading and merging the state machine running configuration data in a configuration file loading mode to obtain a parameter set; S2, receiving the parameter set, performing health degree evaluation on sensors, navigation, communication and battery systems in an initial state, determining a next target state in combination with a current position; S3, if entering an idle state, adopting a segmented charging strategy and starting task monitoring, calculating a task priority through a neural network, and determining a next target state; S4, if entering an inspection state, adopting a breakpoint continuation and event-driven architecture to execute a task, dynamically evaluating a priority through time series prediction, and introducing a switching cost mechanism; S5, if entering a warehouse returning state, adopting a deep neural network to predict a return energy consumption, re-planning a path through multi-objective optimization when the electric quantity is insufficient, and monitoring a return process in real time; S6, if entering a manual or mapping state, adopting a speed limit processing control instruction, starting a SLAM module in a mapping state, detecting a control timeout and executing state switching; S7, if entering an abnormal state, adopting a fuzzy logic reasoning system to calculate an abnormal level, executing waiting for recovery, degradation protection or alarm according to the abnormal level, continuously monitoring an electric quantity and executing data synchronization.

2. The method of claim 1, wherein, The step of performing health degree evaluation on sensors, navigation, communication and battery systems in the initial state in S2 comprises: setting a first timeout value, marking a sensor state as normal or abnormal according to whether data is received within the first timeout, and combining state values of all sensors into a sensor state vector; defining a key sensor set and a non-key sensor set, calculating a key sensor health degree, and setting a fatal abnormal flag to true if the key sensor health degree is less than a preset threshold; loading a pre-stored map file and initializing a positioning algorithm, estimating a robot position by using an adaptive Monte Carlo localization method, and setting a navigation abnormal flag to true if map loading fails or a position confidence is less than a set threshold; setting a second timeout value, setting a communication state flag according to whether a response is received, reading real-time data of a battery management system, comparing a current electric quantity percentage with a forced hibernation threshold to set an electric quantity critical flag, and adopting a decision tree method to determine a target state in combination with the above self-checking results.

3. The method of claim 1, wherein, The step of calculating a task priority through a neural network in S3 comprises: extracting five feature dimensions, a task urgency feature, a time pressure feature, a space convenience feature and an energy consumption matching degree feature, and calculating a historical execution success rate feature according to a difference between a current electric quantity and a task estimated energy consumption; constructing a weight adjustment neural network model, inputting a feature vector into an input layer, containing a preset number of neurons in a hidden layer and adopting a ReLU activation function, and corresponding to weights of the five feature dimensions in an output layer; multiplying the five feature values by the corresponding weights respectively, adding the multiplied results to obtain a feature weighted sum, and multiplying the added result by a preset task type basic priority to obtain a task comprehensive priority score.

4. The method of claim 1, wherein, The step of executing a task by adopting a breakpoint continuation and event-driven architecture in S4 comprises: An event monitoring bus is constructed by using a publish-subscribe mode, and power change events, manual control request events, navigation state change events, sensor abnormality events, task queue update events, network state change events, and timeout events are defined; and a corresponding event processor is registered for each type of event; The exponential smoothing method is used to predict the priority score at a future time, a first exponential smoothing value, a second exponential smoothing value, and a trend item are calculated, a predicted priority of the current task is compared with a maximum predicted priority of all tasks in the queue, and if a difference between them is greater than a priority switching threshold, a task switching decision is triggered.

5. The method of claim 1, wherein, The step of predicting the energy consumption for returning in S5 includes: Extracting environmental features, robot state features and battery state features for each road segment on the path and preprocessing them; combining the preprocessed features into a feature vector; constructing a deep neural network model, the input layer receives the feature vector, the hidden layer is responsible for extracting a primary nonlinear combination mode, identifying interactions between feature dimensions, performing high-level fusion and compression, and all use ReLU activation functions; the output layer uses a linear activation function to output the predicted energy consumption value of the road segment; Accumulating the predicted energy consumption of all road segments to obtain total predicted energy consumption, multiplying the total predicted energy consumption by a safety coefficient, and outputting the estimated energy consumption for returning.

6. The method of claim 5, wherein, The safety coefficient is dynamically adjusted according to the model prediction confidence, specifically including: The Monte Carlo Dropout technique is used to estimate the prediction uncertainty, the same road segment feature vector is forward propagated multiple times in the prediction phase, part of the neurons are randomly discarded each time, the prediction mean and standard deviation are calculated after obtaining multiple prediction results, the coefficient of variation is obtained by dividing the prediction standard deviation by the prediction mean, the prediction confidence is obtained by subtracting one from the coefficient of variation, and the average confidence of the overall path is obtained by averaging the prediction confidence of all road segments on the path; The setting of the safety coefficient is based on statistical analysis of historical operation data, a mapping relationship between confidence and safety margin is established by comparing the deviation rate of actual energy consumption and predicted energy consumption, when the average confidence is greater than a first confidence threshold, the safety coefficient takes a first safety coefficient value, when the average confidence is between a second confidence threshold and the first confidence threshold, the safety coefficient takes a second safety coefficient value, and when the average confidence is less than the second confidence threshold, the safety coefficient takes a third safety coefficient value.

7. The method of claim 1, wherein, The step of re-planning the path through multi-objective optimization when the power is insufficient in S5 includes: Defining a multi-objective optimization problem, the objective function includes three dimensions of energy consumption target, time target and safety target, and all optimization targets are minimized; A non-dominated sorting genetic algorithm is used to solve the multi-objective optimization problem, a population is initialized, each individual represents a candidate path from the current position to the charging bin, three objective function values are calculated for each individual and non-dominated sorting is performed, the individuals are divided into different Pareto front levels, genetic operations of selection, crossover and mutation are performed to generate a new generation population, and the Pareto optimal solution set is obtained by iterative evolution for a preset number of generations; According to the current power condition, the energy consumption weight, the time weight and the safety weight are dynamically adjusted, the weighted comprehensive score of each path in the Pareto optimal solution set is calculated, and the path with the lowest score is selected as the optimal path.

8. The method of claim 1, wherein, The step of starting the SLAM module in the mapping state S6 comprises: The SLAM module adopts a laser radar SLAM algorithm to process laser radar scanning data and odometer data in real time, and the laser radar outputs scanning data at a preset frequency, each frame containing a preset number of distance measurement values; The SLAM module performs feature extraction on each frame of data, identifies corner points and line segment geometric features in the environment, performs feature matching operations to associate the features of the current frame with the features of historical frames to establish a feature correspondence relationship, and performs pose optimization based on the feature correspondence relationship to estimate the motion trajectory of the robot by minimizing the re-projection error; The map is updated according to the estimated motion trajectory and laser radar measurement data, and the newly observed environmental information is fused into the map; Periodically save the map data to the local storage, and if a control timeout is detected, perform a map saving operation to write the currently constructed map data to the local storage and mark it as an unfinished map in the map meta-information.

9. The method of claim 1, wherein, The step of calculating the abnormality level using a fuzzy logic inference system in S7 comprises: Three fuzzy input variables, abnormality severity, system health, and environmental risk, are defined, and each input variable is fuzzified to convert the precise value into a fuzzy set using a triangular membership function. Abnormality severity, system health, and environmental risk are divided into three fuzzy sets: low, medium, and high. A fuzzy inference rule base is constructed, the rules use the Mamdani inference method to calculate the rule activation degree using the minimum operator, and the maximum operator is used to aggregate the outputs of all rules. The barycentric method is used to de-fuzzify the precise abnormality level value.

10. The method of claim 1, wherein, The step of performing waiting for recovery, degradation protection, or alarm according to the abnormality level in S7 comprises: If the abnormality level is level one, start the waiting for recovery sub-process, the robot remains stationary at the current position, and start the abnormality monitoring thread to periodically re-detect whether the abnormal condition still exists. If it is detected that the abnormality has been eliminated, set the target state to the initial state. If the waiting timer value is greater than the level one abnormality recovery waiting time and the robot has not recovered, the abnormality level is raised to level two. If the abnormality level is level two, start the degradation protection sub-process, determine the type of abnormality source, and if the abnormality source is a non-critical sensor fault, execute the sensor degradation operation strategy, read the fault sensor list and query the affected detection item list, generate a degradation task and continue execution. If the abnormality source is power shortage, execute the power protection strategy, and the robot enters a low-power mode to shut down unnecessary modules. If the abnormality level is level three, start the alarm sub-process, send an emergency alarm message to the cloud platform through the communication module, and after the message is sent, the robot enters a deep sleep mode.

Citation Information

Cited By

  • Method and system for task allocation of construction robots in conjunction with charge management

    CN122155327A