A robot battery table operation decision-making method based on knowledge graph forward and backward reasoning and electronic equipment thereof
By establishing a knowledge graph-based forward and reverse reasoning mechanism, the reliability and safety of decision-making in complex environments and abnormal situations of robot meter swapping operations are solved, achieving efficient action screening and anomaly recovery, and improving the robustness and maintainability of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUDAN UNIVERSITY
- Filing Date
- 2026-05-21
- Publication Date
- 2026-06-19
AI Technical Summary
Existing robotic meter swapping operations struggle to guarantee the reliability of decision-making, the safety of execution, and the continuity of operations in complex environments and abnormal situations. In particular, when faced with environmental changes and uncertainties in state recognition, existing technologies suffer from rigid rules and weak anomaly recovery capabilities.
By adopting a knowledge graph-based forward and reverse reasoning mechanism, a four-dimensional knowledge graph of "action-tool-object-scenario" is established. Combining forward and reverse reasoning, knowledge constraints, action selection, risk verification, and anomaly recovery are achieved for the robot's meter-changing operation. This forms a closed loop of state perception-knowledge reasoning-behavior adjustment, improving the reliability and safety of decision-making.
It significantly enhances the decision-making reliability, execution safety, and operational continuity of robotic meter swapping operations in complex environments and abnormal working conditions, reduces the probability of non-compliant and high-risk actions, and improves the robustness and maintainability of the system.
Smart Images

Figure CN122242778A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of knowledge graph reasoning and power operation and maintenance automation technology. Specifically, it relates to a robot meter swapping operation decision-making method based on knowledge graph forward and backward reasoning and its electronic equipment. Background Technology
[0002] Meter replacement is a typical high-frequency, high-risk, and highly consistent type of power work. This type of work is not a single step, but a long-term process consisting of multiple stages including perception, judgment, operation, and verification. It is characterized by multiple stages, frequent tool switching, complex operating conditions, and significant differences in the on-site environment. When performing meter replacement, the robot must not only identify the location and status of key objects such as meter boxes, terminals, and latches, but also select appropriate tools and actions according to different stages, maintaining safety and feasibility under conditions such as live conditions, low light, obstruction, misalignment, and jamming.
[0003] Existing robot decision-making solutions commonly fall into two categories. The first category is based on fixed processes, fixed rules, or explicit state machines. These methods are simple to implement when the process is clear and the environment is stable, but they are prone to problems such as rigid rules, weak anomaly recovery capabilities, and high expansion and maintenance costs when facing complex environmental changes, uncertainties in state recognition, and sudden anomalies. The second category is based on end-to-end models or large models that directly output action sequences. These methods have strong generalization potential, but in high-risk, high-precision scenarios such as meter swapping, without knowledge constraints and rule verification, they are prone to problems such as non-compliant actions, unexplainable behavior, and unclear recovery strategies in abnormal situations. Relying solely on end-to-end models or fixed process control is insufficient to guarantee stability and safety under complex environmental changes and abnormal conditions. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this application aims to propose a knowledge-driven decision-making method for robotic meter swapping operations. This method enables electronic devices to perform knowledge constraints, action selection, risk verification, anomaly localization, and recovery path generation based on a four-dimensional knowledge graph of "action-tool-object-scenario" during the meter swapping process. The method maps the current state, target task, tool constraints, object attributes, and work scenario onto a unified knowledge graph. Through forward reasoning, it generates a set of compliant candidate actions, and through backward reasoning, it locates the causes of anomalies and generates a sequence of recovery actions, thereby improving decision reliability, execution safety, and anomaly recovery capabilities. This ultimately enhances the decision reliability, execution safety, and operational continuity of the meter swapping robot in complex environments and abnormal operating conditions.
[0005] This application focuses on a four-dimensional knowledge association of "action-tool-object-scenario" to establish a reasonable knowledge graph for meter swapping operations. It employs a dual reasoning mechanism combining forward and backward reasoning to support routine task planning and anomaly recovery decisions, respectively. Through standardized interfaces, knowledge reasoning is decoupled from the underlying control code, forming a closed loop of state awareness, knowledge reasoning, and behavior adjustment. During the meter swapping decision-making process, real-time filtering of action availability, compliance, and security is performed, improving execution stability in complex scenarios. The technical solution of this application is described in detail below.
[0006] This application provides a robot-based decision-making method for battery meter swapping operations based on knowledge graph-based forward and reverse reasoning, including the following steps:
[0007] Step 1: Establish a reasonable knowledge graph for meter swapping operations, with the four-dimensional knowledge association of "action-tool-object-scenario" as the core.
[0008] Step 2: Receive real-time status information from the robot and convert it into a unified battery swapping operation status vector;
[0009] Step 3: After obtaining the current state vector, perform forward reasoning for the task planning and regular execution phases. Before action generation, perform knowledge-based screening and constraints on candidate behaviors to generate a set of candidate actions.
[0010] Step 4: After obtaining the set of candidate actions, score the candidate actions according to the task stage, risk rules, and execution cost, and output the target action;
[0011] Step 5: Receive the target action execution results in real time and send them to the robot behavior planning module or execution control module as input for the next step of reverse reasoning;
[0012] Step Six: When an action fails to execute, deviation exceeds limits, object state does not meet expectations, or abnormal risks occur, reverse reasoning is initiated to locate the cause of the anomaly.
[0013] Step 7: After obtaining the most likely cause of the anomaly, generate a recovery path and update the decision based on the anomaly recovery rules;
[0014] Step 8: After the current task instance ends or a phase action is completed, record the current state vector, candidate action set, target action, abnormal phenomenon, abnormal cause, and recovery path for subsequent model evaluation, system backtracking, and knowledge rule optimization.
[0015] In this application, the method for establishing a reasonable knowledge graph of meter swapping operations in step one includes:
[0016] Step 1) Establish an atomic operation unit system for battery swapping operations.
[0017] An atomic operation unit system is established based on the meter swapping operation process. The atomic operation unit system takes the entire meter swapping operation process as the object, standardizes and quantifies the operation behavior, and forms an atomic action library covering the entire operation chain. The atomic action library includes basic action types including approach, detection, grasp, insertion, rotation, extraction and release.
[0018] Step 2) Construct a four-dimensional relationship model of "action-tool-object-scene".
[0019] After the atomic operation unit system is established, a four-dimensional correlation model is constructed around each atomic operation unit. The four-dimensional correlation model is used to describe whether a certain atomic operation unit is executable under specific tool, target object and operation scenario conditions, and the engineering constraints that should be met when it is executed.
[0020] Step 3) Establish a reasoning rule base and process verification rules.
[0021] The four-dimensional related knowledge is further transformed into executable reasoning rules to establish a reasoning rule base; the reasoning rule base includes routine process reasoning rules, object attribute constraint rules, tool adaptation rules, scenario restriction rules, risk rules, and anomaly recovery rules.
[0022] In this application, in step 2), the four-dimensional relation is encoded into a set of triples. Each triple is written as:
[0023]
[0024] In the formula, As the main node, it represents one of the following: action, tool, object, or scene; These are relational predicates, indicating relational types such as "need," "act on," "be limited to," and "applicable to." For object nodes, they represent tool, object, or scene nodes associated with the subject; for a given atomic operation The association rule is written as:
[0025]
[0026] In the formula, This represents the set of permitted tools associated with this atomic operation. Represents the set of object properties that are allowed to function. This represents the set of allowed scene attributes. This represents the set of engineering constraints that must be met when performing this action; object attributes include meter type, terminal status, latch status, and installation status; scene attributes include weather conditions, lighting conditions, installation location type, road section type, obstruction status, and energized status; tool attributes include gripper type, insulated tool type, and unpacking tool type.
[0027] In this application, in step 3), each rule in the reasoning rule base... It is represented as:
[0028]
[0029] In the formula, The rule antecedent is a set of conditions consisting of stage state, object attribute, tool state, and scene state; For rule consequents, it represents the set of allowed actions, the set of prohibited actions, the set of preferred actions, or the set of recovery paths.
[0030] In this application, step four, which involves scoring candidate actions based on task stage, risk rules, and execution cost, and then outputting the target action, includes the following methods:
[0031] For each candidate action Define the comprehensive scoring function:
[0032]
[0033] In the formula, Indicates candidate actions Represents the current state vector The overall score below; This indicates the degree of match between the action and the current task objective and stage; This indicates that the action is consistent with the constraints of the tool, object, and scene; This indicates the priority of the action compared to historically successful strategies or priority rules; This indicates the risk and cost of the action; , , , Preset weights;
[0034] The final output is the target action with the highest score at the current moment.
[0035] In this application, in step five, the target action is passed to the robot's behavior planning module or execution control module through a standardized interface to avoid directly embedding the rule logic into the underlying control code; the execution result includes whether the action is successful, whether there is a deviation, whether the object state meets expectations, whether risk rules are triggered, and whether any abnormal phenomena occur.
[0036] In this application, step seven includes a recovery path that includes rollback, re-detection, posture fine-tuning, tool switching, re-insertion, or re-grabbing.
[0037] This application also provides an electronic device for executing the above-described robot battery swapping operation decision-making method based on knowledge graph forward and reverse reasoning, which includes a state perception unit, a knowledge graph management unit, a reasoning decision-making unit, an action generation unit, and an execution feedback unit;
[0038] The state perception unit is used to receive real-time state information from the robot perception module, behavior planning module and execution control module, and convert it into a unified state vector for the battery swapping operation.
[0039] The knowledge graph management unit is used to build and maintain the knowledge graph of the meter swapping operation, store the four-dimensional relationship and reasoning rule base, and provide knowledge query results to the reasoning decision unit.
[0040] The reasoning and decision-making unit is used to perform forward reasoning based on the current state vector and task objective to generate a set of candidate actions and calculate the ranking results of the candidate actions. In case of abnormality, it performs reverse reasoning based on execution feedback to locate the cause of the abnormality and outputs the action decision result or recovery path corresponding to the target action.
[0041] The action generation unit is used to convert the action decision results output by the reasoning and decision-making unit into target actions or recovery actions, and output them to the behavior planning module or execution control module through a standardized interface.
[0042] The execution feedback unit is used to receive the execution results returned by the behavior planning module and the execution control module, form execution feedback information, and send it to the reasoning and decision-making unit for anomaly judgment, reverse reasoning, and decision update.
[0043] Compared with the prior art, this application has the following technical effects:
[0044] First, by constructing a four-dimensional knowledge relationship of "action-tool-object-scenario" and applying it to the decision-making of meter swapping operations, this application can screen candidate behaviors for compliance, feasibility and risk constraints before the action is generated, thereby reducing the probability of non-compliant actions and high-risk actions being invoked.
[0045] Second, by introducing a dual reasoning mechanism that combines forward and backward reasoning, this application can not only meet the needs of process planning and strategy recommendation in the normal stage, but also locate the causes of execution deviations, environmental changes and emergencies and generate recovery paths in the abnormal stage, thereby significantly enhancing the robustness of the system.
[0046] Third, by decoupling the knowledge reasoning module from the perception module, behavior planning module, and execution control module through a standardized interface, this application can achieve knowledge-enhanced decision-making without significantly modifying the underlying control code, thereby improving system maintainability and subsequent scenario expansion capabilities.
[0047] Fourth, because the knowledge graph explicitly models factors such as energized state, illumination conditions, object attributes, and tool adaptability, this application can reduce the execution risks caused by environmental changes, uncertainty in state recognition, and insufficient model generalization, providing key support for the stable operation and safe control of meter swapping operations.
[0048] Fifth, this application helps to transform the scattered empirical rules, semantic constraints, and anomaly handling logic in meter swapping operations into a knowledge system that is reasonable, verifiable, and sustainably evolving, thereby providing a unified foundation for subsequent model optimization, process review, and system evolution. Attached Figure Description
[0049] Figure 1 A diagram illustrating the four-dimensional relationship model.
[0050] Figure 2 This is a schematic diagram of the inference engine module integration. Detailed Implementation
[0051] The technical solution of this application will be described in detail below with reference to the accompanying drawings and embodiments.
[0052] This application involves inference engines and the following key terms:
[0053] Inference engine: refers to the logic decision-making module deployed in the robot control system. It is connected to the perception module, behavior planning module and execution control module through standardized interfaces. It is used to call knowledge graphs and inference rules, perform forward and backward inference on the current state, and output the target action or recovery path.
[0054] Atomic operation unit: refers to the smallest indivisible execution unit in the meter replacement operation, including basic actions such as approach, detection, grasp, insertion, rotation, pull-out, and release.
[0055] Four-dimensional relationship: refers to the "action-tool-object-scenario" relationship model, which describes whether an action is executable under specific tool, target object and work scenario conditions and the constraints that should be met.
[0056] Forward reasoning: refers to a reasoning method that uses the current state and task objective as input to deduce the set of actions that are executable and compliant under the current conditions from top to bottom.
[0057] Reverse reasoning: refers to a reasoning method that uses anomalies or execution deviations as input to deduce potential causes and generate recovery paths from the bottom up. This definition is a methodological expression of the "reasoning mechanism combining forward and reverse reasoning" mentioned in the document.
[0058] Electricity meter replacement operation status: refers to the combination of the current stage status, object status, tool status, and scene status of the robot.
[0059] Candidate action set: refers to the set of atomic operation units or action sequences that are allowed to be invoked at a certain moment after being filtered by forward reasoning.
[0060] Recovery path: refers to the sequence of actions generated after reverse reasoning is completed in order to eliminate the cause of the anomaly and restore normal operation.
[0061] RDF triples: refers to a data structure that expresses the relationships in a knowledge graph in the form of (subject, predicate, object).
[0062] This application is executed by an electronic device, which includes a state perception unit, a knowledge graph management unit, a reasoning and decision-making unit, an action generation unit, and an execution feedback unit. These units can be deployed on the same industrial control computer, edge computing device, or multiple interconnected computer devices, but logically they jointly complete the meter-swapping operation decision based on knowledge graph-based forward and reverse reasoning. The overall process is as follows: the state perception unit obtains the current state and execution feedback from the robot perception module, behavior planning module, and execution control module; the knowledge graph management unit provides four-dimensional relationships and a reasoning rule base; the reasoning and decision-making unit performs forward reasoning to generate a set of candidate actions, and performs reverse reasoning to locate the cause and generate a recovery path in abnormal situations; the action generation unit converts the action decision results into target actions or recovery actions and outputs them to the behavior planning module or execution control module; the execution feedback unit summarizes the action execution results and sends them back to the reasoning and decision-making unit, thus forming a closed-loop operation mechanism of "state perception - knowledge reasoning - behavior adjustment".
[0063] This application provides a robot-based decision-making method for battery meter swapping operations based on knowledge graph-based forward and reverse reasoning, comprising the following steps:
[0064] Step S1: Establish an atomic operation unit system for battery swapping operations
[0065] First, the knowledge graph management unit establishes an atomic operation unit system based on the battery swapping operation process. This atomic operation unit system focuses on the entire battery swapping operation process, standardizing and quantifying operational behaviors to form an atomic action library covering the entire operation chain. Preferably, the atomic action library includes at least basic action types such as approach, detection, grasp, insertion, rotation, extraction, and release. By decomposing the long-process battery swapping task into standardized atomic operation units, a unified expression of action granularity can be achieved in the subsequent knowledge graph, establishing a reasonable bridge between high-level planning and low-level control. The document clearly states that atomic operations, as the smallest indivisible execution unit in the skill knowledge graph, are a key bridge connecting high-level task planning and low-level action control.
[0066] The purpose of this step is to standardize the minimum action granularity of the decision-making method. Without a unified atomic operation unit system, subsequent knowledge representation, rule writing, action selection, and anomaly recovery will lack unified semantic units, leading to inconsistent naming of the same action in different modules or difficulty in reusing constraints.
[0067] Step S2: Construct a four-dimensional relationship model of "action-tool-object-scene".
[0068] After the atomic operation unit system is established, the knowledge graph management unit constructs a four-dimensional relational model around each atomic operation unit. For example... Figure 1 As shown, the four-dimensional relational model describes whether a specific atomic operation unit is executable under certain tool, target object, and operational scenario conditions, and the engineering constraints that must be met during execution. Object attributes include meter type, terminal status, latch status, and installation status; scenario attributes include weather conditions, lighting conditions, installation location type, road section type, obstruction status, and energized status; tool attributes include gripper type, insulated tool type, and unpacking tool type. The document explicitly states that object attribute constraints prevent actions from being invoked under incompatible object states, and incorporates weather, lighting, installation location, and energized status into scenario-dimensional constraints. For example, in energized scenarios, only atomic actions associated with insulated tools are allowed to be invoked, and in low-light scenarios, detection and verification actions should be prioritized.
[0069] To facilitate computer implementation, the knowledge graph management unit encodes four-dimensional relations as a set of triples. Each triple is written as:
[0070]
[0071] in, As the main node, it represents one of the following: action, tool, object, or scene; These are relational predicates, indicating relational types such as "need," "act on," "be limited to," and "applicable to." For object nodes, represent tool, object, or scene nodes associated with the subject. For a given atomic operation... Its association rule can be written as:
[0072]
[0073] in, This represents the set of permitted tools associated with this atomic operation. Represents the set of object properties that are allowed to function. This represents the set of allowed scene attributes. This represents the set of engineering constraints that must be satisfied when performing this action. All four quantities mentioned above are sets of known knowledge generated by the knowledge graph management unit based on prior rules and structured knowledge.
[0074] The purpose of this step is to transform the action from an "isolated action" into an "action within a complete operational context," thereby providing subsequent reasoning with clear tools, objects, and scenario constraints.
[0075] Step S3: Establish a reasoning rule base and process verification rules
[0076] After the four-dimensional relational model is established, the knowledge graph management unit generates a reasoning rule base. This rule base includes regular process reasoning rules, object attribute constraint rules, tool adaptation rules, scenario restriction rules, risk rules, and anomaly recovery rules. Regular process reasoning rules describe the legitimate transition relationships between stages; object attribute constraint rules restrict actions to only applicable object states; tool adaptation rules restrict the type of tool required for action invocation; scenario restriction rules handle special conditions such as electrification, low light, occlusion, and outdoor environments; risk rules identify high-risk action combinations or non-compliant operations; and anomaly recovery rules generate rollback, detection, retry, or alternative actions after an anomaly occurs. The knowledge graph stores operational logic, execution constraints, and risk rules, which the reasoning engine uses for behavior planning and risk control.
[0077] Preferably, each rule in the reasoning rule base It can be represented as:
[0078]
[0079] in, The antecedent of a rule is a set of conditions consisting of stage state, object attribute, tool state, and scene state; The consequent represents the set of allowed actions, prohibited actions, preferred actions, or recovery paths. Both the antecedent and consequent are known knowledge items, predefined by the knowledge graph management unit. Through this rule expression, subsequent reasoning and decision-making units can perform rapid matching and conditional triggering on the current state.
[0080] The purpose of this step is to further transform four-dimensional related knowledge into executable reasoning rules, enabling the knowledge graph to move from being "storeable" to being "reasonable".
[0081] Step S4: Receive the current status and form the meter swapping operation status vector.
[0082] During system operation, the state perception unit receives real-time state information from the robot perception module, behavior planning module, and execution control module, and converts it into a unified state vector for the meter swapping operation. This state information includes at least: the current operation stage, the current target object state, the current available tool state, the current scene state, the current task objective, and the most recent execution feedback information. The document explicitly states that the inference engine uses the current state and target task identified by the perception module as input to participate in behavior planning and strategy selection.
[0083] Preferably, the current time The state vector for the meter swapping operation is defined as follows:
[0084]
[0085] in, Indicates the current status of the operation phase. Indicates the state of the target object. Indicates the tool status. Indicates the scene state. Indicates the current task objective. This represents the feedback information from the most recent execution. All six quantities mentioned above are known quantities read and processed by the state-aware unit from external modules. By uniformly representing heterogeneous states as state vectors, consistent input can be provided for subsequent forward and backward reasoning.
[0086] The purpose of this step is to unify the scattered real-time states into a structured input suitable for knowledge matching, thereby avoiding the complexity of the interface and the ambiguity of reasoning caused by directly processing the original heterogeneous states in the subsequent reasoning process.
[0087] Step S5: Perform forward reasoning and generate a set of candidate actions.
[0088] Obtaining the current state vector Then, the reasoning and decision-making unit performs forward reasoning. Forward reasoning is geared towards the task planning and routine execution phases; its core role is to perform knowledge-based screening and constraint of candidate behaviors before action generation. The reasoning and decision-making unit combines the current state vector... Task Objectives Furthermore, the four-dimensional association rules in the knowledge graph deduce the set of executable and compliant actions under the current conditions from top to bottom. This logic is consistent with the statement in the document that "the forward reasoning mechanism is mainly aimed at the task planning and routine execution stages, and performs knowledge-based screening and constraints on candidate behaviors before action generation."
[0089] Preferably, the candidate action set Defined as:
[0090]
[0091] in, Indicates the first One atomic operation unit; A matching function representing the action with the current stage state and task objective; This represents the adaptation function between the action and the current tool state; An adaptation function representing the action and the object's state; These represent the adaptation functions between actions and scene states. The outputs of the four matching functions are binary values: 1 indicates that the condition is met, and 0 indicates that the condition is not met. The current state vector and each constraint rule are known quantities, and the candidate action set is also provided. The result is yet to be solved.
[0092] The purpose of this step is to narrow down "all possible actions" into "the set of actions that are allowed and compliant in the current scenario," thereby fundamentally reducing the probability of non-compliant, risky, and invalid actions entering the decision-making chain.
[0093] Step S6: Score the candidate action set and output the target action.
[0094] In obtaining the candidate action set Then, the reasoning and decision-making unit scores the candidate actions based on the task stage, risk rules, and execution cost, and the action generation unit outputs the target action. For ease of automatic selection, it is preferable to assign each candidate action... Define the comprehensive scoring function:
[0095]
[0096] in, Indicates candidate actions In the current state vector The overall score below; This indicates the degree of match between the action and the current task objective and stage; This indicates that the action is consistent with the constraints of the tool, object, and scene; This indicates the priority of the action compared to historically successful strategies or priority rules; This indicates the risk and cost of the action; The weights are preset and are all known quantities; All are calculated by the reasoning and decision-making unit based on the knowledge graph and the current state. The final target action. Choose the one with the highest score:
[0097]
[0098] in, The target action at the current moment is output by the action generation unit, and the variable to be solved is denoted as .
[0099] The purpose of this step is to further narrow down the "set of possible actions" obtained through forward reasoning into the "optimal target action," thereby ensuring that the decision-making process is not only compliant but also prioritizes safer actions that are more suitable for the current task stage. Although the document does not directly provide a scoring formula, it clearly states that knowledge graphs support strategy recommendation, process verification, and dynamic adjustment. Therefore, using a scoring method to implement strategy recommendation is a concretization of this approach.
[0100] Step S7: Send the target action to the behavior planning module or execution control module and receive execution feedback.
[0101] After the motion generation unit outputs the target motion, it sends the target motion to the behavior planning module via a standardized interface. The behavior planning module converts the target motion into a trajectory, pose constraint, or control parameters and sends them to the execution control module. The execution control module then drives the robot arm and end effector to complete the corresponding operation. This is consistent with... Figure 2 The integration relationship shown is consistent with that of the "Inference Engine - Behavior Planning Module - Execution Control Module", which also avoids embedding rule logic directly into the underlying control code.
[0102] During the execution of the target action, the perception module continuously outputs the object state and the scene state, while the execution control module continuously outputs the action completion flag, deviation information, torque or contact feedback, and risk trigger information. The execution feedback unit summarizes the above information, forms execution feedback information, and returns it to the reasoning decision unit as the input basis for the next step of anomaly judgment and reverse reasoning.
[0103] Step S8: Perform reverse reasoning and locate the cause in abnormal situations.
[0104] When the execution feedback unit detects an action execution failure, excessive deviation, object status not meeting expectations, or an abnormal risk, the inference decision unit initiates reverse inference. The document explicitly states that execution deviations, environmental changes, and sudden abnormal situations are unavoidable during meter replacement operations; therefore, the inference engine employs a dual inference mechanism combining forward and reverse reasoning.
[0105] Preferably, the goal of reverse reasoning is to examine the set of anomalies. Given the given information, determine the most likely cause of the anomaly. Let the set of candidate reasons be... The reasoning and decision-making unit can then be calculated as follows:
[0106]
[0107] in, Indicates the first One candidate abnormal reason, This represents the set of anomalous phenomena observed at the current moment. Indicates the set of abnormal phenomena Under certain conditions, abnormal causes The posterior probability, The most likely cause of the anomaly is the quantity to be solved.
[0108] For ease of implementation, the posterior probability can be further approximated by the rule matching score:
[0109]
[0110] in, Indicates the first An abnormal phenomenon. This indicates the weight of the anomaly. Indicates abnormal phenomena With reason The degree of matching in the exception rule base. For pre-defined known quantities, This is the quantity calculated by the reasoning and decision-making unit based on the anomaly rule base.
[0111] The purpose of this step is to transform "observing an anomaly" into "locating the cause of the anomaly," enabling the system to select a more appropriate recovery path based on the nature of the anomaly, rather than blindly retrying.
[0112] Step S9: Generate a recovery path and update the decision based on the cause of the anomaly.
[0113] In order to obtain the most likely cause of the anomaly Then, the reasoning and decision-making unit generates a recovery path based on the anomaly recovery rules. The recovery path consists of a set of atomic operation units, such as rollback, re-detection, attitude fine-tuning, tool switching, re-insertion, or re-grabbing. Preferably, the recovery path can be represented as:
[0114]
[0115] in, Indicates the recovery path. Indicates the first in the recovery path One atomic operation unit, Indicates the number of actions contained in the recovery path. Reason for the exception. Once known, restore the path. The result is to be solved. The reasoning and decision-making unit returns the restored path to the action generation unit, which then outputs the restored actions in sequence or recalculates the new target actions.
[0116] This step aims to create a closed loop from "anomaly localization" to "anomaly recovery," enabling the system to execute a knowledge-driven recovery process without manual intervention when issues such as alignment deviations, poor contact, or scene changes occur. The document explicitly states that the knowledge graph and inference engine possess dynamic adjustment capabilities and are used for behavior planning, strategy recommendation, and risk control.
[0117] Step S10: Record the inference results and participate in subsequent model evaluation and system backtracking.
[0118] Upon completion of the current task instance or a phase action, the knowledge graph management unit and execution feedback unit jointly record the current state vector, candidate action set, target action, anomalies, causes of anomalies, and recovery path. This information is used for subsequent model evaluation, system backtracking, and knowledge rule optimization. The document explicitly states that new and old data can coexist for model comparison and evaluation, and system backtracking analysis; the replay analysis module is also used for anomaly behavior identification. Although this step does not directly participate in the current action decision, it helps improve the sustainable evolution capability of the knowledge graph and the system's traceability.
[0119] The following is a specific implementation method to illustrate how the method of this application works in a real-world battery swapping scenario.
[0120] The current task is "install the new meter into the target meter position and lock it." The state awareness unit identifies the following: the current stage is "installation stage," the current target object status is "old meter removed, new meter to be inserted," the current tool status is "insulating clamping tool ready," the current scene status is "energized, low illumination," and the current task objective is "complete insertion and locking." Based on the four-dimensional association rules, the knowledge graph management unit determines that in an energized scene, only atomic operations associated with the insulating tool are allowed; in a low illumination scene, detection and confirmation actions should be prioritized. Therefore, the reasoning and decision-making unit performs forward reasoning, obtaining a candidate action set of {detection, approach, insertion}. Then, based on a comprehensive scoring function, "detection" is selected as the current target action. After detection is completed, the system outputs the "approach" and "insert" actions sequentially.
[0121] If, during the insertion process, the execution feedback unit detects that the object state does not meet expectations and the torque of the key joints of the robotic arm changes abruptly, then the abnormal phenomenon set... This includes issues such as "insertion failure," "torque mutation," and "target object not in place." After the inference decision unit performs reverse reasoning, it identifies the most likely cause as "alignment deviation" or "poor contact." Subsequently, a recovery path is generated based on the anomaly recovery rules: rollback → re-detection → posture fine-tuning → re-insertion. In this way, the system can complete closed-loop recovery based on the knowledge graph, without simply repeating the original actions. The documentation, in the behavioral data acquisition and force configuration sections, points out that torque mutations during terminal insertion and removal often indicate alignment deviation or poor contact, serving as a crucial signal for determining the success of the operation. The inference engine section also clearly states that the system must handle execution deviations, environmental changes, and sudden anomalies.
Claims
1. A robot-based decision-making method for battery meter swapping based on knowledge graph-based forward and reverse reasoning, characterized in that, Includes the following steps: Step 1: Establish a reasonable knowledge graph for meter swapping operations, with the four-dimensional knowledge association of "action-tool-object-scenario" as the core. Step 2: Receive real-time status information from the robot and convert it into a unified battery swapping operation status vector; Step 3: After obtaining the current state vector, perform forward reasoning for the task planning and regular execution phases. Before action generation, perform knowledge-based screening and constraints on candidate behaviors to generate a set of candidate actions. Step 4: After obtaining the set of candidate actions, score the candidate actions according to the task stage, risk rules, and execution cost, and output the target action; Step 5: Receive the target action execution results in real time and send them to the robot behavior planning module or execution control module as input for the next step of reverse reasoning; Step Six: When an action fails to execute, deviation exceeds limits, object state does not meet expectations, or abnormal risks occur, reverse reasoning is initiated to locate the cause of the anomaly. Step 7: After obtaining the most likely cause of the anomaly, generate a recovery path and update the decision based on the anomaly recovery rules; Step 8: After the current task instance ends or a phase action is completed, record the current state vector, candidate action set, target action, abnormal phenomenon, abnormal cause, and recovery path for subsequent model evaluation, system backtracking, and knowledge rule optimization.
2. The robot meter-swapping operation decision-making method according to claim 1, characterized in that, In step one, the methods for establishing a reasonable knowledge graph for meter swapping operations include: Step 1) Establish an atomic operation unit system for battery swapping operations. An atomic operation unit system is established based on the meter swapping operation process. The atomic operation unit system takes the entire meter swapping operation process as the object, standardizes and quantifies the operation behavior, and forms an atomic action library covering the entire operation chain. The atomic action library includes basic action types including approach, detection, grasp, insertion, rotation, extraction and release. Step 2) Construct a four-dimensional relationship model of "action-tool-object-scene". After the atomic operation unit system is established, a four-dimensional correlation model is constructed around each atomic operation unit. The four-dimensional correlation model is used to describe whether a certain atomic operation unit is executable under specific tool, target object and operation scenario conditions, and the engineering constraints that should be met when it is executed. Step 3) Establish a reasoning rule base and process verification rules. The four-dimensional related knowledge is further transformed into executable reasoning rules to establish a reasoning rule base; the reasoning rule base includes routine process reasoning rules, object attribute constraint rules, tool adaptation rules, scenario restriction rules, risk rules, and anomaly recovery rules.
3. The robot meter-swapping operation decision-making method according to claim 2, characterized in that, In step 2), the four-dimensional relation is encoded into a set of triples. Each triple is written as: ; In the formula, As the main node, it represents one of the following: action, tool, object, or scene; As a relational predicate, it indicates "needs", "acts on", "is limited to", or "applies to" the relation type. For object nodes, they represent tool, object, or scene nodes associated with the subject; for a given atomic operation The association rule is written as: ; In the formula, This represents the set of permitted tools associated with this atomic operation. Represents the set of object properties that are allowed to function. This represents the set of allowed scene attributes. This represents the set of engineering constraints that must be satisfied when performing this action.
4. The robot meter-swapping operation decision-making method according to claim 3, characterized in that, Object attributes include meter type, terminal status, latch status, and installation status; scene attributes include weather conditions, lighting conditions, installation location type, road section type, obstruction status, and energized status. Tool attributes include gripper type, insulated tool type, and unpacking tool type.
5. The robot meter-swapping operation decision-making method according to claim 2, characterized in that, In step 3), each rule in the reasoning rule base It is represented as: ; In the formula, The rule antecedent is a set of conditions consisting of stage state, object attribute, tool state, and scene state; For rule consequents, it represents the set of allowed actions, the set of prohibited actions, the set of preferred actions, or the set of recovery paths.
6. The robot meter-swapping operation decision-making method according to claim 1, characterized in that, In step four, the methods for scoring candidate actions based on task stage, risk rules, and execution cost, and then outputting the target action, include: For each candidate action Define the comprehensive scoring function: ; In the formula, Indicates candidate actions Represents the current state vector The overall score below; This indicates the degree of match between the action and the current task objective and stage; This indicates that the action is consistent with the constraints of the tool, object, and scene; This indicates the priority of the action compared to historically successful strategies or priority rules; This indicates the risk and cost of the action; , , , Preset weights; The final output is the target action with the highest score at the current moment.
7. The robot meter-swapping operation decision-making method according to claim 1, characterized in that, In step five, the target action is passed to the robot's behavior planning module or execution control module through a standardized interface to avoid embedding the rule logic directly into the underlying control code; the execution results include whether the action was successful, whether there was a deviation, whether the object state met expectations, whether risk rules were triggered, and whether any abnormal phenomena occurred.
8. The robot meter-swapping operation decision-making method according to claim 1, characterized in that, In step seven, the recovery path includes rollback, re-detection, posture fine-tuning, tool switching, re-insertion, or re-grabbing.
9. An electronic device for implementing the robot battery meter swapping operation decision-making method based on knowledge graph forward and reverse reasoning as described in any one of claims 1-8, characterized in that, It includes a state awareness unit, a knowledge graph management unit, a reasoning and decision-making unit, an action generation unit, and an execution feedback unit; The state perception unit is used to receive real-time state information from the robot and convert it into a unified state vector for the battery swapping operation. The knowledge graph management unit is used to build and maintain the knowledge graph of the meter swapping operation, store the four-dimensional relationship and reasoning rule base, and provide knowledge query results to the reasoning decision unit. The reasoning and decision-making unit is used to perform forward reasoning based on the current state vector and task objective to generate a set of candidate actions and calculate the ranking results of the candidate actions. In case of abnormality, it performs reverse reasoning based on execution feedback to locate the cause of the abnormality and outputs the action decision result or recovery path corresponding to the target action. The action generation unit is used to convert the action decision results output by the reasoning and decision-making unit into target actions or recovery actions, and output them to the behavior planning module or execution control module through a standardized interface. The execution feedback unit is used to receive the execution results returned by the behavior planning module and the execution control module, form execution feedback information, and send it to the reasoning and decision-making unit for anomaly judgment, reverse reasoning, and decision update.