A somatic intelligent robot peripheral device debugging method and system

CN123010525APending Publication Date: 2026-10-30SHANGHAI SAGE INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611041959.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-14
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

问题一:外设调试高度依赖真实硬件设备

Benefits of technology

[0015]本发明的优点具体如下:(1)无需真实外设硬件:完成信号调试和流程验证,大幅降低开发测试成本,缩短项目交付周期50%以上。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123010525A_ABST
    Figure CN123010525A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of AGV / AMR debugging (automatic guided vehicle / autonomous mobile robot), and particularly relates to a kind of body intelligent robot peripheral debugging method and system, and the present application is through the innovative signal polling closed loop check algorithm and task chain self-scheduling mechanism, relies on the signal verification of string accurate matching, the task chain self-scheduling of finite state machine driving, three-level hierarchical station analysis;Solve the technical problem that peripheral debugging relies on real hardware and signal confirmation mechanism loss.This application achieves the expected goal in signal matching success rate, polling response time, task scheduling accuracy, etc., without real peripheral hardware, it can complete high reliability signal simulation debugging, with significant technical innovation and practical value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of AGV / AMR debugging (Automatic Guided Vehicle / Autonomous Mobile Robot) technology, and in particular to a method and system for debugging peripheral devices of an embodied intelligent robot. Background Technology

[0002] In the development and debugging of AGV / AMR systems, the signal interaction between peripheral devices (such as sensors, PLC controllers, RFID readers, photoelectric switches, etc.) and the warehouse management system (WMS) is the core link in achieving automated operations. However, in the actual development and debugging process, the following two prominent technical problems exist: Problem 1: Peripheral device debugging is highly dependent on actual hardware. In the early stages of AGV / AMR system development or on-site implementation, peripheral hardware is often unavailable or insufficient in quantity, hindering development and debugging. The development team must wait for the hardware to arrive before signal interaction debugging can begin, severely impacting project progress. Even when the hardware arrives, debugging requires actual equipment, preventing multiple debugging tasks from being performed concurrently, resulting in low efficiency.

[0003] Question 2: Lack of an effective confirmation mechanism for peripheral signal debugging. Traditional peripheral signal debugging solutions either lack a confirmation mechanism after signal writing, making it impossible to confirm whether the signal has been correctly received and processed, and making it difficult to detect signal loss issues; or they adopt a passive waiting method, requiring debugging personnel to manually observe the signal status, which is inefficient and prone to omissions. Especially in complex debugging scenarios with multiple workstations and multiple rounds, the accuracy and timing of signal interaction are difficult to guarantee, and the reliability of debugging results cannot be verified. Summary of the Invention

[0004] To address the aforementioned issues, this invention proposes a technical solution that solves the technical problems of peripheral debugging relying on real hardware and the lack of signal confirmation mechanisms by constructing a configurable peripheral signal simulation rule engine and a state machine-based automatic scheduling mechanism, thereby achieving highly reliable signal simulation debugging without the need for real peripheral hardware.

[0005] The technical solution of this invention is implemented as follows: The first aspect of this invention discloses a method for debugging peripheral devices of an embodied intelligent robot, the method comprising the following steps: S1. Construct a peripheral device simulation configuration model: Establish a two-level configuration model that includes main configuration and detailed configuration; The main configuration definition includes global parameters such as trigger type, trigger rule, and total number of rounds; Detailed configuration definitions include specific parameters for priority, workstation type, trigger time interval, and signal / material change target; S2. Dual-dimensional task classification: Based on the trigger type dimension, tasks are divided into simultaneous triggering and sequential process triggering; Based on the triggering rules, tasks are divided into fixed-time triggers and cargo release / stay triggers. The two dimensions are combined to form a 2×2 task scheduling matrix, covering four core debugging scenarios.

[0006] S3, Level 3 Workstation Analysis: Employs a hierarchical recursive workstation discovery algorithm, supporting three levels of hierarchical workstation discovery: direct workstation selection, area analysis, and area group analysis. It automatically filters locked workstations and sorts them by priority to select the optimal available workstation. S4. Task chain self-scheduling based on state machine: The finite state machine mechanism is used to control the automatic flow of tasks between different execution stages. By using two Boolean state flags, a write signal flag and a polling flag, clear state transition rules are defined to realize chained scheduling that automatically creates the next task and deletes itself after the task is completed. S5. Signal Polling Closed-Loop Verification: The signal verification algorithm driven by polling-matching-state machine is adopted. The signal status of the remote workstation is read periodically, and the signal verification is performed by string precise matching. Combined with the status monitoring of peripheral devices, a closed-loop control process is formed. S6, Global-Local Dual-Level Switch Control: Set a global switch to uniformly control the start and stop of all peripheral simulations, while also supporting independent start and stop control of individual peripheral configurations, achieving dual control of coarse and fine granularity.

[0007] Furthermore, step S5 includes: S5.1 Initialize polling-related parameters, including polling interval, matching success flag, and peripheral device enabled status; S5.2 Execute polling loop: Enter a continuously executing polling loop. The loop continues under the following conditions: signal matching fails and peripheral configuration is started. S5.3 Workstation Status Query: In each polling iteration, the remote communication service interface is called to query the current workstation status information from the remote workstation, and the matching key data is extracted from the returned data to determine whether the data is abnormal or empty; If data anomalies or empty data occur, mark the match as failed in this round of polling and execute the next round of polling; otherwise, proceed to S5.4. S5.4 Signal matching check: Obtain preset matching key data and compare it with the current matching key data. If the error between the two exceeds the preset value, the matching is considered to have failed. S5.5 Matching result processing: If the signal is successfully matched, record the successful matching log, end the polling and proceed to S5.8; If signal matching fails, proceed to S5.6; S5.6, Peripheral Status Monitoring: Checks whether the peripheral configuration is enabled; if the status is disabled, it sets the peripheral startup flag to off. S5.7, Polling Interval Waiting: If the signal matching fails and the peripheral configuration is still enabled, the system calls the thread sleep method to make the current thread sleep for the preset polling interval. After the hibernation period ends, the next round of polling iteration begins; S5.8 Polling termination handling.

[0008] Furthermore, in S5.8, there are two cases where the polling loop terminates: If the loop terminates due to a successful signal match, update the task status, record the successful match log, and determine whether to create the next task based on the business rules. If the loop terminates due to the peripheral device being disabled, a cleanup operation will be performed, including recording the polling termination log, releasing related resources, and deleting the current scheduled task.

[0009] Furthermore, the workstation status information includes the current signal value of the workstation, the current material value of the workstation, the workstation lock status, and the workstation running status; The key matching information includes the current signal value and the current material value at the workstation.

[0010] Furthermore, step S5.4 includes: Obtain the preset target signal value and target material value; The actual target signal value and the expected target signal value are compared for string equality; if the two strings are completely equal, the signal value is determined to be a successful match. Perform an exact string match comparison between the actual target material value and the expected target material value; if the two strings are completely equal, the match is considered successful. A comprehensive judgment is made: if both the signal value and the material value are successfully matched, the signal matching is considered successful; otherwise, the signal matching is considered unsuccessful.

[0011] Furthermore, step S4 includes: S4.1, Status Flag Definition: Define two Boolean status flag fields, including a write signal flag and a polling flag; The write signal marker is used to distinguish whether the current task is in the write signal stage or the advance ride-hailing stage; The polling flag is used to distinguish whether the current task is in the write signal phase or the polling signal phase; S4.2 Definition of State Transition Rules: S4.2.1 Write signal state: The task executes a write signal operation. After the write is completed, it will transition to the polling state or the next stage according to the business logic. S4.2.2 Polling State: When the task enters the signal polling waiting stage, it queries the current signal and material status of the workstation once per second and performs a string matching with the expected target. If the match is successful, it moves to the matching success state; if the match fails, it continues polling. S4.2.2 Matching Success Status: Signal matching is successful. The task executes the round update operation and decides whether to create the next timed task based on whether there is a next round or the next process. S4.3 Chained Task Creation: After the current task is completed, the next operation is determined based on the business status; S4.4 Task Self-Deletion: After each scheduled task is completed, it first obtains the scheduler instance of the current task, then constructs a task key and trigger key based on the unique identifier of the task, and calls the scheduler's cancel scheduling method and delete task method to remove the current task from the scheduler.

[0012] Furthermore, step S4.3 includes: For tasks with fixed-time trigger rules, if the current details are configured with the advance booking function, calculate the actual trigger time and create a new fixed-time scheduled task. For tasks that trigger cargo release pause rules, first set the polling flag to true, then create an immediately executed scheduled task to quickly put the task into the polling waiting phase; For tasks triggered by sequential process rules, check if the current detail is the last detail. If it is not the last detail, obtain the configuration of the next detail, set the write signal flag of the next detail to true, and then create the timed task for the next detail.

[0013] Furthermore, step S3 includes: S3.1 Workstation Type Judgment: Based on the workstation type field in the peripheral device details configuration, determine which parsing strategy to use; The workstation types include direct workstation selection, region resolution, and region group resolution. S3.2, Layered parsing execution: For the direct selection type of workstation, query workstation information based on the workstation ID list; For the region resolution type, query the region information based on the region ID list, then extract the list of site group IDs contained in the region information, then query the site group information based on the site group ID list, and finally extract the list of workstation IDs contained in the site group information to query the workstation information. For the area group parsing type, query the area group information based on the area group ID list, then extract the list of area IDs contained in the area group information, and then perform two-level parsing according to the area parsing process to finally obtain the workstation information; S3.3 Locked workstation filtering: Check the status of all parsed workstations, filter out workstations that are locked, and keep only available workstations; S3.4 Priority Sorting: Sort available workstations in ascending order according to the priority field; S3.5 Optimal workstation selection: Select the first workstation after sorting as the optimal available workstation for subsequent signal simulation operations.

[0014] The second aspect of this invention discloses a peripheral debugging system for an embodied intelligent robot, the system comprising a configuration management layer, a business logic layer, and an execution communication layer; The configuration management layer includes a peripheral configuration management module and a peripheral configuration entity model; The business logic layer includes a business logic processing module and a timed task scheduling module; The execution communication layer includes a task execution engine and a remote communication module.

[0015] The advantages of the present invention are as follows: (1) No real peripheral hardware is required: signal debugging and process verification are completed, significantly reducing development and testing costs and shortening the project delivery cycle by more than 50%.

[0016] (2) Closed-loop confirmation mechanism: Through the signal polling verification algorithm, the accuracy and reliability of signal processing are ensured, and the signal matching success rate reaches more than 99.8%.

[0017] (3) Automated scheduling: Based on the state machine, the task chain self-scheduling mechanism can automatically complete multiple rounds and multiple workstation signal simulation debugging without manual intervention, reducing manual intervention by 80%.

[0018] (4) Multi-scenario coverage: Through the configurable rule engine, it flexibly supports a variety of trigger strategy combinations (simultaneous / sequential × fixed time / delivery stay), and new scenarios can be adapted by simply configuring parameters.

[0019] (5) Timing correctness guarantee: In the sequential process trigger mode, the process is executed strictly in the priority order to ensure that the timing correctness of the process flow reaches 100%.

[0020] (6) Efficient use of resources: timely deletion of completed tasks to avoid task accumulation in the scheduler, reduce system resource consumption, and support concurrent signal interaction of more than 50 workstations. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only one embodiment of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 Flowchart for signal polling closed-loop verification: showing the complete closed-loop control process of "write-query-match-confirm"; Figure 2 Here is a flowchart of a task chain self-scheduling process based on a state machine: illustrating the process of controlling task flow using a finite state machine mechanism; Figure 3 The flowchart for the three-level workstation analysis shows three paths: direct workstation selection, area analysis, and area group analysis. Detailed Implementation

[0023] The technical solutions of the present invention will now be clearly and completely described with reference to the embodiments and accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] Unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains; the terminology used in the detailed description is for the purpose of describing particular embodiments only and is not intended to limit the invention; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0025] In the description of specific embodiments of the present invention, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present invention, "multiple" means two or more, unless otherwise explicitly defined.

[0026] In this invention, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this invention can be combined with other embodiments.

[0027] In the description of the embodiments of this invention, the term "and / or" is merely a description of the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, in this invention, the character " / " generally indicates that the preceding and following associated objects have an "or" relationship.

[0028] To address the shortcomings of existing AGV / AMR (Automatic Guided Vehicle / Autonomous Mobile Robot) debugging technologies, this invention proposes a technical solution. By constructing a configurable peripheral signal simulation rule engine and a state machine-based automatic scheduling mechanism, it solves the technical problems of peripheral debugging relying on real hardware and the lack of signal confirmation mechanisms, thus achieving highly reliable signal simulation debugging without the need for real peripheral hardware.

[0029] The technical solution of this invention is implemented as follows: A state machine-driven AGV / AMR peripheral signal simulation and debugging system is described in the table below, with its system architecture and module functions as follows:

[0030] The model design of the peripheral main configuration entity (Peripheral) in the peripheral configuration entity model is shown in the table below:

[0031] The model design of the PeripheralDetail configuration entity in the Peripheral Configuration Entity Model is shown in the table below:

[0032] Based on the above system, this invention discloses a state machine-driven method for simulating and debugging peripheral signals of AGV / AMR, comprising the following steps: S1. Construct a peripheral device simulation configuration model: Establish a two-level configuration model that includes main configuration and detailed configuration. The main configuration defines global parameters such as trigger type, trigger rules, and total number of rounds; the detailed configuration defines specific parameters such as priority, workstation type, trigger time interval, and signal / material change target.

[0033] S2. Dual-dimensional task classification: Based on the trigger type dimension, tasks are divided into two categories: "simultaneous trigger" and "sequential process trigger"; based on the trigger rule dimension, tasks are divided into two categories: "fixed time trigger" and "goods release and stay trigger"; the two dimensions are combined to form a 2×2 task scheduling matrix, covering four core debugging scenarios.

[0034] S3, Level 3 Workstation Analysis: Employs a hierarchical recursive workstation discovery algorithm, supporting three levels of hierarchical workstation discovery: "direct workstation selection," "regional analysis," and "regional group analysis." It automatically filters locked workstations and sorts them by priority to select the optimal available workstation.

[0035] S4. Task chain self-scheduling based on state machine: The finite state machine mechanism is used to control the automatic flow of tasks between different execution stages. By using two Boolean state flags, a write signal flag and a polling flag, clear state transition rules are defined to realize chained scheduling that automatically creates the next task and deletes itself after the task is completed.

[0036] S5. Signal Polling Closed-Loop Verification: The signal verification algorithm driven by polling-matching-state machine is adopted. The signal status of the remote workstation is read periodically, and the signal verification is performed by string precise matching. Combined with the status monitoring of peripheral devices, a closed-loop control process of "write-query-matching-confirmation" is formed.

[0037] S6, Global-Local Dual-Level Switch Control: Set a global switch to uniformly control the start and stop of all peripheral simulations, while also supporting independent start and stop control of individual peripheral configurations, achieving dual control of coarse and fine granularity.

[0038] The core algorithm of this invention will now be described in detail: I. Signal Polling Closed-Loop Verification Algorithm: This algorithm is the core verification mechanism of the AGV / AMR peripheral signal simulation and debugging system. By periodically polling the workstation signal status and using precise string matching for signal verification, combined with peripheral activation status monitoring, a closed-loop control process of "write-verify-confirm" is formed to ensure the accuracy and reliability of peripheral signal simulation.

[0039] The principle of this algorithm is that during the simulation and debugging of AGV / AMR peripheral signals, after a signal is written, it is necessary to confirm whether the workstation has correctly received and processed the signal. Traditional solutions either lack a confirmation mechanism, resulting in undetected signal loss, or adopt a passive waiting method, which is inefficient. This invention proposes an active polling-matching-state machine driven closed-loop verification algorithm, which achieves efficient and reliable signal verification through fixed-frequency polling, precise string matching, and peripheral status monitoring.

[0040] like Figure 1 As shown: The specific implementation steps of this algorithm are as follows: Step 1: Polling Parameter Initialization The system first initializes the polling parameters: Polling interval: Set to 1000 milliseconds (i.e., 1 second). This parameter can be adjusted according to actual business needs. The polling interval should not be too short to avoid putting too much pressure on the remote service; nor should it be too long to avoid excessive response latency.

[0041] Match success flag: Initialized to false, used to indicate whether the signal has been successfully matched.

[0042] Peripheral enable status: Initialized to true, used to indicate whether the peripheral configuration is still enabled.

[0043] Step 2: Enter the polling loop The system enters a continuously executing polling loop, which continues under the following conditions: a successful match is marked as false and the peripheral device is enabled as true. The loop continues as long as no match has been found and the peripheral device remains enabled.

[0044] Step 3: Check Workstation Status In each polling iteration, the system first calls the remote communication service interface to query the current workstation status information from the remote workstation. The query request contains the unique identifier of the target workstation, and the remote service returns the current status data of the workstation, including the current signal value, current material value, workstation lock status, workstation running status, and other information.

[0045] The system extracts the current signal value and current material value of the workstation from the returned data. These two values ​​are key data for subsequent matching and comparison. If the remote service returns an error or the data is empty, the system logs the error and marks the matching as failed in this round of polling, then continues to the next round of polling.

[0046] Step 4: Signal Matching Check The system acquires the expected target signal value and the expected target material value, both of which are predefined in the peripheral configuration details. The system uses exact string matching for comparison. First, the system performs a string equality comparison between the actual signal value and the expected signal value. If the actual signal value is empty, it is treated as an empty string for comparison; similarly, if the expected signal value is empty, it is also treated as an empty string. Only when the two strings are completely equal is the signal value considered to be a successful match.

[0047] Secondly, the system performs the same string-based exact match comparison between the actual material value and the expected material value. The matching rules are the same as for the signal value.

[0048] Finally, the system makes a comprehensive judgment: the entire signal is considered to be matched only if both the signal value and the material value are matched successfully. If either value fails to match, the matching is considered to have failed.

[0049] Step 5: Matching Result Processing If the signal match is successful, the system sets the successful match flag to true and records a successful match log, including information such as the matching time, workstation identifier, matched signal value, and material value. Then the system exits the polling loop and proceeds to the next stage of processing.

[0050] If the signal match fails, the system does not set a successful match flag, keeps its value as false, and continues to perform subsequent checks.

[0051] Step 6: Peripheral device status monitoring: In the event of a signal matching failure, the system needs to check whether the peripheral configuration is still enabled. The system queries the current enabled status of the peripheral master configuration; if the status is disabled, the peripheral enable flag is set to false.

[0052] When the peripheral device enable flag is set to false, the loop will terminate during the next round of conditional checks, ending the polling process. This design ensures that when the peripheral device is manually turned off by the user, the polling can respond promptly and terminate, avoiding unnecessary resource consumption.

[0053] Step 7: Polling Interval Waiting: If signal matching fails and the peripheral device remains enabled, the system calls the thread sleep method, causing the current thread to sleep for 1000 milliseconds (i.e., the polling interval). After the sleep period ends, the system enters the next round of polling iteration, repeatedly executing steps such as workstation status query, signal matching check, and peripheral device status monitoring.

[0054] Step 8: Polling Termination Handling: There are two scenarios in which the polling loop terminates: The first scenario is that a successful signal match causes the loop to terminate. In this case, the system performs subsequent operations following the successful match, including updating the task status, recording the successful match log, and deciding whether to create the next task based on business rules.

[0055] The second scenario is that the peripheral device is disabled, causing the loop to terminate. In this case, the system performs cleanup operations, including recording the polling termination log, releasing related resources, and deleting the current scheduled task, to ensure the consistency of the system state.

[0056] The algorithm achieves the following technical effects: Closed-loop control: Forms a complete closed loop of "write-query-match-acknowledge" to ensure the reliability of signal processing. Exact matching: Employs exact string matching to avoid false positives caused by fuzzy matching. Real-time response: Polling once per second to ensure timely acquisition and response to signal status. Error handling: Polling is automatically terminated when a peripheral device is disabled to avoid unnecessary waiting and resource waste. Status monitoring: The polling process is controlled by a dual mechanism of matching success flags and peripheral device enable flags. Improved logging: Records detailed polling logs, including successful match logs and termination logs, facilitating problem tracing and system debugging. Resource-friendly: The reasonable polling interval design ensures real-time performance while avoiding excessive pressure on remote services. II. Task chain self-scheduling algorithm based on state machine: This algorithm is the core execution engine of the peripheral signal simulation scheduling system. It controls the automatic flow of tasks between different execution stages through a finite state machine mechanism, realizing a chained scheduling where the next task is automatically created and the task itself is deleted after the task is completed. It can complete the full multi-round peripheral signal simulation debugging process without external intervention.

[0057] Traditional peripheral signal simulation solutions require manual creation and management of each timed task, which is labor-intensive and error-prone in complex debugging scenarios involving multiple rounds and multiple workstations. This invention proposes a self-driven task chain scheduling mechanism based on a state machine. By constructing a finite state machine using Boolean state tags and defining explicit state transition rules, tasks can automatically determine their next operation based on the current execution stage and matching results, forming a self-driven task execution chain.

[0058] like Figure 2 As shown, the specific implementation steps of this algorithm are as follows: Step 1: Define the state flags: The system defines two key Boolean status flag fields: WriteMessage Flag: This flag distinguishes whether the current task is in the write message stage or the advance dispatch stage. When the flag is true, it indicates that the current task is a write message task, which requires writing materials and signals to the workstation; when the flag is false, it indicates that the current task is an advance dispatch task, which requires writing an advance dispatch signal to the workstation.

[0059] StillSign (polling flag): This flag distinguishes whether the current task is in the write signal phase or the polling signal phase. When the flag is false, it indicates that the current task is a write signal task, and after execution, it needs to enter the polling waiting phase; when the flag is true, it indicates that the current task is a polling signal task, and it needs to continuously poll the workstation signal until a match is found.

[0060] Step 2: Define state transition rules: The system defines three core states and state transition rules: Write signal state (WRITE_SIGNAL): The task executes a signal write operation. After the write is completed, it transitions to the polling state or the next stage according to the business logic.

[0061] Polling: The task enters the signal polling waiting phase, querying the current signal and material status of the workstation once per second, performing a string match with the expected target. If the match is successful, it moves to the match success state; otherwise, it continues polling.

[0062] Match Successful Status (MATCHED): The signal match is successful. The task performs a round update operation and decides whether to create the next scheduled task based on whether there is a next round or a next process.

[0063] Step 3: Creating Chained Tasks After the current task is completed, the system automatically determines the next operation based on the business status. For tasks triggered by fixed-time rules, if the current detail is configured with an advance booking function, the system calculates the actual trigger time (base trigger time minus the advance booking seconds) and creates a new fixed-time scheduled task. For tasks triggered by cargo release and dwell time rules, the system first sets the polling flag to true, then creates an immediately executable scheduled task, allowing the task to quickly enter the polling waiting phase. For tasks triggered by sequential process rules, the system checks if the current detail is the last detail. If it is not the last, it retrieves the configuration for the next detail, sets the write signal flag for the next detail to true, and then creates a scheduled task for the next detail.

[0064] Step 4: Task Self-Delete: After each scheduled task completes, the system first obtains the scheduler instance for the current task. Then, based on the task's unique identifier, it constructs a task key and trigger key, and calls the scheduler's cancel scheduling method and delete task method to remove the current task from the scheduler. This ensures that the scheduler always retains only the next task to be executed, avoiding task backlog and memory leaks.

[0065] III. Three-level hierarchical chemical potential analysis algorithm: This algorithm is the fundamental support mechanism for peripheral signal simulation systems. Through a hierarchical recursive workstation discovery algorithm, it supports three levels of analysis: direct workstation selection, region analysis, and region group analysis. It automatically filters and locks workstations and sorts them by priority, providing a flexible workstation selection strategy for signal simulation.

[0066] like Figure 3 As shown, the specific implementation steps of this algorithm are as follows: Step 1: Determine the workstation type: The system determines which parsing strategy to use based on the workstation type field in the peripheral device details configuration. There are three types of workstations: direct workstation selection (STATION), area parsing (AREA), and area group parsing (AREA_GROUP).

[0067] Step 2: Layered parsing execution: For direct workstation selection, the system directly queries workstation information based on the workstation ID list. For region resolution, the system first queries region information based on the region ID list, then extracts the list of site group IDs contained within the region information, then queries the site group information based on the site group ID list, and finally extracts the list of workstation IDs contained within the site group information to query workstation information. For region group resolution, the system first queries region group information based on the region group ID list, then extracts the list of region IDs contained within the region group information, and then performs two levels of resolution according to the region resolution process to finally obtain workstation information.

[0068] Step 3: Lock the workstation for filtering The system performs a status check on all parsed workstations, filters out workstations that are locked, and retains only available workstations.

[0069] Step 4: Priority sorting The system sorts available workstations in ascending order according to the priority field, with smaller priority values ​​indicating higher priority.

[0070] Step 5: Optimal workstation selection The system selects the first workstation after sorting as the optimal available workstation for subsequent signal simulation operations.

[0071] The technical solution of the present invention and its achievable technical effects will be described in more detail below through examples: Example 1: Single-station signal simulation debugging Configuration parameters: Trigger type = Simultaneous trigger, Trigger rule = Fixed time trigger, Total number of rounds = 5 rounds; Trigger time range: [60s, 120s], Signal change target ID="SIGNAL_001", Material change target ID="MATERIAL_001"; Results: Successfully simulated 5 signal interactions, with an average polling time of 2.3 seconds per session and a 100% signal matching success rate.

[0072] Example 2: Multi-station sequential process debugging: Configuration parameters: Trigger type = sequential process trigger, trigger rule = release dwell trigger, total number of rounds = 3 rounds; Process parameters: 5-station serial process, each station has a priority of 1-5, and the processing dwell time is [30s, 60s]. Results: The process flow was executed completely in 3 rounds with 100% timing accuracy, and the total time was approximately 8 minutes.

[0073] Example 3: Debugging the scenario of calling a car in advance: Configuration parameters: Trigger type = Simultaneous trigger, Trigger rule = Fixed time trigger, Advance booking = Yes; Time parameters: Trigger time interval [100s, 150s], advance booking time [10s, 20s]; Results: The advance call signal was successfully written, and the actual trigger time was 15 seconds earlier. The signal was ready when the AGV arrived.

[0074] The results of the technical effectiveness verification are shown in the table below:

[0075] This invention solves the technical problems of peripheral debugging relying on real hardware and the lack of signal confirmation mechanisms by using an innovative signal polling closed-loop verification algorithm and a task chain self-scheduling mechanism.

[0076] Through practical verification, the present invention has achieved the expected goals in terms of signal matching success rate, polling response time, and task scheduling accuracy. It can complete highly reliable signal simulation debugging without the need for real peripheral hardware, and has significant technical innovation and practical value.

[0077] It should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for debugging peripheral devices of an embodied intelligent robot, characterized in that, The steps include the following: S1. Construct a peripheral device simulation configuration model: Establish a two-level configuration model that includes main configuration and detailed configuration; The main configuration definition includes global parameters such as trigger type, trigger rule, and total number of rounds; Detailed configuration definitions include specific parameters for priority, workstation type, trigger time interval, and signal / material change target; S2. Dual-dimensional task classification: Based on the trigger type dimension, tasks are divided into simultaneous triggering and sequential process triggering; Based on the triggering rules, tasks are divided into fixed-time triggers and cargo release / stay triggers. S3, Level 3 Workstation Analysis: Employs a hierarchical recursive workstation discovery algorithm, supporting three levels of hierarchical workstation discovery: direct workstation selection, area analysis, and area group analysis. It automatically filters locked workstations and sorts them by priority to select the optimal available workstation. S4. Task chain self-scheduling based on state machine: The finite state machine mechanism is used to control the automatic flow of tasks between different execution stages. By using two Boolean state flags, a write signal flag and a polling flag, clear state transition rules are defined to realize chained scheduling that automatically creates the next task and deletes itself after the task is completed. S5. Signal Polling Closed-Loop Verification: The signal verification algorithm driven by polling-matching-state machine is adopted. The signal status of the remote workstation is read periodically, and the signal verification is performed by string precise matching. Combined with the status monitoring of peripheral devices, a closed-loop control process is formed. S6, Global-Local Dual-Level Switch Control: Set a global switch to uniformly control the start and stop of all peripheral simulations, while also supporting independent start and stop control of individual peripheral configurations, achieving dual control of coarse and fine granularity.

2. The method according to claim 1, characterized in that, Step S5 includes the following steps: S5.1 Initialize polling-related parameters, including polling interval, matching success flag, and peripheral device enabled status; S5.2 Execute polling loop: Enter a continuously executing polling loop. The loop continues under the following conditions: signal matching fails and peripheral configuration is started. S5.3 Workstation Status Query: In each polling iteration, the remote communication service interface is called to query the current workstation status information from the remote workstation, and the matching key data is extracted from the returned data to determine whether the data is abnormal or empty; If data anomalies or empty data occur, mark the match as failed in this round of polling and execute the next round of polling; otherwise, proceed to S5.

4. S5.4 Signal matching check: Obtain preset matching key data and compare it with the current matching key data. If the error between the two exceeds the preset value, the matching is considered to have failed. S5.5 Matching result processing: If the signal is successfully matched, record the successful matching log, end the polling and proceed to S5.8; If signal matching fails, proceed to S5.6; S5.6, Peripheral Status Monitoring: Checks whether the peripheral configuration is enabled; if the status is disabled, it sets the peripheral startup flag to off. S5.7, Polling Interval Waiting: If the signal matching fails and the peripheral configuration is still enabled, the system calls the thread sleep method to make the current thread sleep for a preset polling interval. After the hibernation period ends, the next round of polling iteration begins; S5.8 Polling termination handling.

3. The method according to claim 2, characterized in that, In S5.8, there are two situations in which the polling loop terminates: If the loop terminates due to a successful signal match, update the task status, record the successful match log, and determine whether to create the next task based on the business rules. If the loop terminates due to a disabled peripheral configuration, a cleanup operation is performed, including recording the polling termination log, releasing related resources, and deleting the current scheduled task.

4. The method according to claim 2, characterized in that, The workstation status information includes the current signal value of the workstation, the current material value of the workstation, the workstation lock status, and the workstation running status; The key matching information includes the current signal value and the current material value at the workstation.

5. The method according to claim 2, characterized in that, The specific process of step S5.4 is as follows: Obtain the preset target signal value and target material value; The actual target signal value and the expected target signal value are compared for string equality; if the two strings are completely equal, the signal value is determined to be a successful match. Perform an exact string match comparison between the actual target material value and the expected target material value; if the two strings are completely equal, the match is considered successful. A comprehensive judgment is made: if both the signal value and the material value are successfully matched, the signal matching is considered successful; otherwise, the signal matching is considered unsuccessful.

6. The method according to claim 1, characterized in that, Step S4 includes: S4.1, Status Flag Definition: Define two Boolean status flag fields, including a write signal flag and a polling flag; The write signal marker is used to distinguish whether the current task is in the write signal stage or the advance ride-hailing stage; The polling flag is used to distinguish whether the current task is in the write signal phase or the polling signal phase; S4.2 Definition of State Transition Rules: S4.2.1 Write signal state: The task executes a write signal operation. After the write is completed, it will transition to the polling state or the next stage according to the business logic. S4.2.2 Polling State: When the task enters the signal polling waiting stage, it queries the current signal and material status of the workstation once per second and performs a string matching with the expected target. If the match is successful, it moves to the matching success state; if the match fails, it continues polling. S4.2.2 Matching Success Status: Signal matching is successful. The task performs a round update operation and decides whether to create the next timed task based on whether there is a next round or a next process. S4.3 Chained Task Creation: After the current task is completed, the next operation is determined based on the business status; S4.4 Task Self-Deletion: After each scheduled task is completed, it first obtains the scheduler instance of the current task, then constructs a task key and trigger key based on the unique identifier of the task, and calls the scheduler's cancel scheduling method and delete task method to remove the current task from the scheduler.

7. The method according to claim 6, characterized in that, Step S4.3 includes: For tasks with fixed-time trigger rules, if the current details are configured with the advance booking function, calculate the actual trigger time and create a new fixed-time scheduled task. For tasks that trigger cargo release pause rules, first set the polling flag to true, then create an immediately executed scheduled task to quickly put the task into the polling waiting phase; For tasks triggered by sequential process rules, check if the current detail is the last detail. If it is not the last detail, obtain the configuration of the next detail, set the write signal flag of the next detail to true, and then create the timed task for the next detail.

8. The method according to claim 1, characterized in that, Step S3 includes: S3.1 Workstation Type Judgment: Based on the workstation type field in the peripheral device details configuration, determine which parsing strategy to use; The workstation types include direct workstation selection, region resolution, and region group resolution. S3.2, Layered parsing execution: For the direct selection type of workstation, query workstation information based on the workstation ID list; For the region resolution type, query the region information based on the region ID list, then extract the list of site group IDs contained in the region information, then query the site group information based on the site group ID list, and finally extract the list of workstation IDs contained in the site group information to query the workstation information. For the area group parsing type, query the area group information based on the area group ID list, then extract the list of area IDs contained in the area group information, and then perform two-level parsing according to the area parsing process to finally obtain the workstation information; S3.3 Locked workstation filtering: Check the status of all parsed workstations, filter out workstations that are locked, and keep only available workstations; S3.4 Priority Sorting: Sort available workstations in ascending order according to the priority field; S3.5 Optimal workstation selection: Select the first workstation after sorting as the optimal available workstation for subsequent signal simulation operations.

9. A method for debugging peripherals of an embodied intelligent robot, characterized in that, This includes the configuration management layer, business logic layer, and execution communication layer; The configuration management layer includes a peripheral configuration management module and a peripheral configuration entity model; The business logic layer includes a business logic processing module and a timed task scheduling module; The execution communication layer includes a task execution engine and a remote communication module.