Ontology agent self-reflection optimization method and device for complex task iteration, equipment and medium
By combining text slicing of the initial task interaction text with a large language processing model, a self-reflective optimization mechanism is constructed, which solves the problem of environmental disturbances in complex scenarios for intelligent agents and improves the adaptability and success rate of task execution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING DECK SMART TECH CO LTD
- Filing Date
- 2026-05-12
- Publication Date
- 2026-07-28
AI Technical Summary
Existing intelligent agents struggle to cope with environmental disturbances when performing tasks in complex scenarios and lack a dynamic reconstruction mechanism for instruction structures, resulting in low scenario adaptability and low task execution success rate.
By slicing the initial task interaction text to generate a set of text vectors, a large language processing model is used to construct an initial prompt word workflow. Combined with the collection of running status data by environmental awareness nodes, the status differences are calculated and the prompt word workflow is optimized to achieve self-reflective optimization.
It improves the agent's resilience and success rate in task iteration under complex environments, and enhances its adaptability to environmental disturbances and sensitivity to task execution.
Smart Images

Figure CN122472210A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of artificial intelligence and data processing technology, and more specifically, to an ontology intelligent agent self-reflection optimization method for complex task iteration, an ontology intelligent agent self-reflection optimization device for complex task iteration, an electronic device, and a computer-readable storage medium. Background Technology
[0002] With the rapid development of artificial intelligence and large language model technology, intelligent agents are being used more and more widely in complex scenarios such as cultural and tourism parks, public management, and smart fitness. To meet the diverse needs of public space operation and intelligent management, ontological intelligent agents need to engage in deep scene interaction with multimodal physical or digital environments and execute complex long-sequence task instructions.
[0003] In existing intelligent agent task execution schemes, a static instruction issuance and unidirectional open-loop execution architecture is typically employed. First, the control system parses the user-input natural language task instructions and, combined with a locally pre-set fixed logic mapping table, generates a complete sequence of operation scripts, which is then sent to the intelligent agent execution end. Subsequently, the intelligent agent execution end sequentially calls the underlying driver components to perform mechanical or logical operations according to the predetermined sequence of operation scripts. Finally, after all script steps have been executed, the control system uniformly receives the final set of operation results returned by the execution end to determine whether the task is complete.
[0004] However, this one-way open-loop execution architecture has significant technical drawbacks. Due to the highly dynamic and unpredictable nature of the interaction scenarios faced by the agent, a single statically generated control script struggles to cope with state drift caused by environmental disturbances during execution, making it easy for the actual running state to deviate from the expected trajectory. Simultaneously, the lack of a real-time perception and comparison closed-loop for the state during task execution, and the absence of a dynamic reconstruction mechanism for the instruction's working structure at the source, prevents the system from adaptively generating correction strategies when local deviations are detected. Consequently, when handling complex tasks requiring continuous iteration, the agent exhibits low scenario adaptability and a low final task execution success rate. Summary of the Invention
[0005] This application provides an ontology agent self-reflection optimization method for complex task iteration, an ontology agent self-reflection optimization device for complex task iteration, an electronic device, and a computer-readable storage medium, to at least alleviate the above-mentioned technical problems.
[0006] A self-reflective optimization method for ontology-based intelligent agents for iterative complex tasks includes: Perform text slicing on the acquired initial task interaction text to obtain multiple initial text fragments; Multiple initial text fragments are mapped to embedded vector spaces to generate the first set of text vectors; Based on the first set of text vectors, an index comparison operation is performed in the local vector storage space to generate a first feature index set; Construct the initial prompt word workflow based on the first feature index set; The initial prompt word workflow is input into a pre-trained large language processing model to generate the first task execution logic; The control agent executes scene interaction operations according to the first task execution logic to control the environmental perception node to collect the first running state dataset; Perform a difference calculation operation between the first running state dataset and the preset baseline constraints to generate a state difference description; Based on the state difference description, calculate the deviation feature vector; The initial prompt word workflow is optimized based on the deviation feature vector to generate the updated prompt word workflow; The updated prompt word workflow is input again into the large language processing model to generate the second task execution logic, which controls the ontology agent to continue to perform scene interaction operations according to the second task execution logic.
[0007] A self-reflective optimization device for ontological intelligent agents oriented towards iterative processing of complex tasks, comprising: The text slicing module is used to perform text slicing operations on the acquired initial task interaction text to obtain multiple initial text fragments; The vector mapping module is used to map multiple initial text fragments to the embedded vector space respectively, generating the first set of text vectors; The index comparison module is used to perform index comparison operations in the local vector storage space based on the first text vector set to generate a first feature index set; The workflow construction module is used to construct the initial prompt word workflow based on the first feature index set; The first logic generation module is used to input the initial prompt word workflow into the pre-trained large language processing model to generate the first task execution logic; The interactive perception and control module is used to control the ontological intelligent agent to perform scene interaction operations according to the first task execution logic, so as to control the environmental perception node to collect the first running state dataset. The state difference calculation module is used to perform a difference calculation operation between the first running state dataset and the preset benchmark constraints to generate a state difference description. The deviation feature extraction module is used to calculate the deviation feature vector based on the state difference description; The workflow optimization module is used to optimize the initial prompt word workflow based on the deviation feature vector to generate an updated prompt word workflow; The iterative execution module is used to input the updated prompt word workflow back into the large language processing model to generate the second task execution logic, so as to control the ontology agent to continue to execute the scene interaction operation according to the second task execution logic.
[0008] An electronic device includes at least one processor and a memory connected to the processor, wherein: Memory is used to store computer programs; The processor is used to execute computer programs to enable electronic devices to implement the above-mentioned ontological intelligent agent self-reflective optimization method for iterative complex tasks.
[0009] A computer-readable storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the above-described ontological intelligent agent self-reflective optimization method for iterative complex task.
[0010] The technical advantages of the technical solution provided in this application are: This application presents a self-reflective optimization method for ontology-based intelligent agents in complex task iterations. Addressing the technical shortcomings of existing unidirectional open-loop execution architectures, which suffer from low scenario adaptability due to their inability to cope with environmental disturbances and lack of instruction structure reconstruction mechanisms, this method slices and maps the acquired initial task interaction text to generate a first set of text vectors. Based on index comparison, a first feature index set is generated to construct an initial prompt word workflow, which is then input into a pre-trained large language processing model to generate the first task execution logic. This solves the problem in traditional solutions where single static scripts struggle to understand deep contextual intent. Compared to traditional methods that rely on pre-set fixed mapping tables to directly generate execution instructions, this application constructs a prompt word workflow through vector retrieval to drive a large model, significantly improving the relevance and completeness of the business intent generated from the initial task logic.
[0011] Based on the first task execution logic, this application controls the ontology agent to perform scene interaction operations. During this process, it controls the environmental perception node to collect a first running state dataset, and then performs a difference calculation operation between this dataset and preset benchmark constraints to generate a state difference description. This solves the problem of traditional solutions passively waiting for final result feedback and lacking dynamic perception and evaluation of the execution state during the process. Compared with the blind-end execution architecture of traditional solutions, this application continuously introduces multimodal perception data to verify hard constraints while the interaction operation is in progress, which greatly improves the timeliness and computational sensitivity of capturing whether the agent's running state has deviated.
[0012] Finally, this application calculates the deviation feature vector based on the state difference description, and optimizes the initial prompt word workflow based on the deviation feature vector to generate an updated prompt word workflow. The updated prompt word workflow is then input into the large language processing model to generate the second task execution logic, thereby controlling the ontology agent to continue executing scene interaction operations. This solves the technical defect of traditional execution systems that cannot correct and reconstruct instructions from the source when deviations occur. Compared to traditional solutions that can only mechanically report errors or interrupt processes when encountering deviations, this application feeds back the deviation features captured at the bottom layer to the prompt word node level for self-reflection and optimization, dynamically driving the large model to reconstruct and output the corrected execution logic. This establishes a technical closed loop of "instruction understanding - execution perception - difference comparison - reflection and reconstruction," greatly improving the ontology agent's task iteration resilience and final execution success rate when facing complex environmental disturbances. Attached Figure Description
[0013] Figure 1 This application provides an embodiment of an ontology-based intelligent agent self-reflection optimization scenario for iterative complex tasks. Figure 2 This application provides an embodiment of an ontology-based intelligent agent self-reflection optimization method for iterative complex tasks.
[0014] Figure 3 This application provides an embodiment of an ontology-based intelligent agent self-reflection optimization device for iterative complex tasks.
[0015] Figure 4 This is an electronic device according to an embodiment of the present application. Detailed Implementation
[0016] like Figure 1 As shown, this is an embodiment of the present application illustrating a self-reflective optimization scenario for an ontology intelligent agent oriented towards complex task iteration; as Figure 2 As shown in the figure, this application provides an embodiment of an ontology agent self-reflection optimization method for complex task iteration. The ontology agent self-reflection optimization method for complex task iteration includes the following steps: Perform text slicing on the acquired initial task interaction text to obtain multiple initial text fragments; The multiple initial text fragments are mapped to the embedded vector space respectively to generate the first text vector set; Based on the first set of text vectors, an index comparison operation is performed in the local vector storage space to generate a first feature index set; Construct an initial prompt word workflow based on the first feature index set; The initial prompt word workflow is input into a pre-trained large language processing model to generate the first task execution logic; The control agent executes scene interaction operations according to the first task execution logic to control the environmental perception node to collect the first running state dataset; Perform a difference calculation operation between the first running state dataset and the preset benchmark constraints to generate a state difference description; Based on the state difference description, the deviation feature vector is calculated; The initial prompt word workflow is optimized based on the deviation feature vector to generate an updated prompt word workflow; The updated prompt word workflow is input again into the large language processing model to generate a second task execution logic, so as to control the ontology agent to continue to execute the scene interaction operation according to the second task execution logic.
[0017] Optionally, mapping the plurality of initial text fragments to an embedded vector space to generate a first text vector set includes: Obtain preset slice control parameters, wherein the slice control parameters include a slice overlap length setting value and a recall correlation setting value; Based on the fragment overlap length setting value, perform a boundary overlap recombination operation on the multiple initial text fragments to obtain multiple target recombined fragments; The multiple target recombined fragments are input into a preset semantic embedding network to calculate the multidimensional feature vector corresponding to each target recombined fragment; Calculate the global semantic tensor of the initial task interaction text; Calculate the feature cosine similarity value between each of the multidimensional feature vectors and the global semantic tensor; The feature cosine similarity value is compared with the recall correlation set value, and multidimensional feature vectors whose feature cosine similarity value is less than the recall correlation set value are removed. The remaining multidimensional feature vectors after the elimination operation are combined sequentially to generate the first set of text vectors.
[0018] Upon verification, inconsistencies in technical terminology, the occasional appearance of certain noun technical features, and insufficient source information were found in some cases. These issues have been addressed and optimized as follows, without simplifying the content: Preferably, the specific implementation process of mapping the multiple initial text fragments to the embedded vector space to generate the first text vector set is as follows: First, read the knowledge base configuration record, prompt word engineering configuration record, and agent resource configuration record corresponding to the ontology agent. Extract the fragmentation parameter record from the knowledge base configuration record, extract the prompt word engineering categories corresponding to role definition, target setting, table structure definition, constraint conditions, workflow, and user question from the prompt word engineering configuration record, and extract the resource call relationship between the configured large language processing model, knowledge base, database, and toolset from the agent resource configuration record. Then, determine the fragment overlap length setting value according to the block size parameter and block overlap size parameter in the fragmentation parameter record, and determine the recall relevance setting value according to the recall score, recall type, and recall sorting range in the fragmentation parameter record. The block size parameter is used to limit the text capacity of each initial text fragment formed by the text slicing operation, and the block overlap size parameter is used to limit the boundary text capacity that is allowed to be repeatedly retained between adjacent initial text fragments. The block size parameter and the block overlap size parameter jointly participate in the configuration of the fragment overlap length setting value, so that the fragment overlap length setting value can match the text capacity of the initial text fragment. The recall score is used to limit the lower limit of relevance for multi-dimensional feature vectors to enter the first text vector set. The recall type is used to limit the recall judgment method corresponding to the lower limit of relevance. The recall ranking range is used to limit the range of multi-dimensional feature vectors that can be retained after meeting the lower limit of relevance. The recall score, the recall type, and the recall ranking range jointly participate in the configuration of the recall relevance setting value, so that the recall relevance setting value can simultaneously reflect semantic relevance requirements and candidate retention requirements. The technical essence of the segment overlap length setting value is to limit the text width that adjacent initial text segments should jointly retain at the semantic boundary, so that the role definition, resource call relationship, database query intent, robot execution intent, and environmental perception intent separated by text slicing operation can continue to form contextual connections at the boundary position. The technical essence of the recall relevance setting value is to limit the minimum degree of relevance between multi-dimensional feature vectors and the overall semantics of the initial task interaction text, so that initial text segments that are not related to complex task iteration do not enter the subsequent index comparison operation, thereby reducing the interference of irrelevant semantics on the first feature index set.
[0019] Preferably, the fragment overlap length setting is not a fixed length, but is adapted and configured according to the prompt word engineering category to which the initial task interaction text belongs. When the prompt word engineering category includes role definitions and constraints, the fragment overlap length setting is used to cover the role definition boundary text and constraint boundary text between adjacent initial text fragments, so that the role definition text features and workflow constraint text features are not separated during subsequent semantic mapping; when the prompt word engineering category includes table structure definitions and user questions, the fragment overlap length setting is used to cover the table structure definition boundary text and user question boundary text, so that the table structure definition text features and the query objects in the user questions can form a corresponding relationship in the target reconstructed fragment; when the prompt word engineering category includes workflows, the fragment overlap length setting is used to cover the workflow boundary text between adjacent operation nodes, so that the workflow constraint text features retain the order of processing in the target reconstructed fragment. The role definition boundary text originates from the boundary position corresponding to the role definition in adjacent initial text segments. The constraint condition boundary text originates from the boundary position corresponding to the constraint condition in adjacent initial text segments. The table structure definition boundary text originates from the boundary position corresponding to the table structure definition in adjacent initial text segments. The user question boundary text originates from the boundary position corresponding to the user question in adjacent initial text segments. The workflow boundary text originates from the boundary position corresponding to the workflow in adjacent initial text segments. Through this configuration method, the segment overlap length setting can adapt to scenarios where large language processing models, knowledge bases, databases, and prompt words jointly participate in task processing in the intelligent agent service platform at the text slicing level, rather than being used only for mechanical character overlap in ordinary text retrieval.
[0020] Preferably, the recall relevance setting value is configured together based on the recall score, recall type, and recall ranking range. The recall score is used to limit the lower limit of relevance of the multidimensional feature vectors entering the first text vector set. The recall type is used to limit the lower limit of relevance to at least one of the recall methods, namely semantic similarity, keyword matching, or resource call intent matching. The recall ranking range is used to limit the range of the number of candidates retained in the multidimensional feature vectors that meet the lower limit of relevance. For complex task iteration scenarios, the recall relevance setting is also configured in conjunction with the resource call relationships in the agent's resource configuration record. When the initial task interaction text contains a request for park anomaly monitoring and analysis, the recall relevance setting imposes higher entry requirements on the knowledge base call dimension, database call dimension, and toolset call dimension, ensuring that the multi-dimensional feature vectors corresponding to the park anomaly monitoring and analysis request are preferentially retained in the first text vector set. When the initial task interaction text contains a request for robot inspection, voice interaction, or multimodal scene analysis, the recall relevance setting imposes higher entry requirements on the robot execution dimension, environmental perception dimension, and toolset call dimension, ensuring that the multi-dimensional feature vectors corresponding to the robot inspection, voice interaction, or multimodal scene analysis request are preferentially retained in the first text vector set. Thus, the recall relevance setting not only represents the ordinary similarity screening threshold but also the task adaptation threshold between the initial task interaction text and the resources that the agent can call.
[0021] Preferably, when performing boundary overlap recombination operations on the multiple initial text segments according to the segment overlap length setting, firstly, a segment order mark is configured for each initial text segment according to the order in which the text slicing operations were generated, and the preceding and following initial text segments are determined according to the segment order mark; then, the starting boundary text corresponding to the segment overlap length setting is extracted from the starting boundary of each initial text segment, and the ending boundary text corresponding to the segment overlap length setting is extracted from the ending boundary of each initial text segment; subsequently, the ending boundary text of the preceding initial text segment, the current initial text segment, and the starting boundary text of the following initial text segment are concatenated according to the segment order mark to form a target recombination segment corresponding to the current initial text segment. The technical essence of the target recombination segment is that it is a task semantic segment with the current initial text segment as the core, carrying the ending boundary text of the preceding initial text segment and the starting boundary text of the following initial text segment, so that the role definition, table structure definition, workflow constraints, and user questions distributed across segments in the initial task interaction text can be read in the same target recombination segment. The target reconstructed fragment is then used as input to a preset semantic embedding network, enabling the preset semantic embedding network to read the current initial text fragment and its adjacent semantic boundaries in the same input object.
[0022] Preferably, during the boundary overlap reorganization operation, boundary source markers are configured for the starting boundary text, the current initial text segment, and the ending boundary text. These boundary source markers indicate that the text content originates from a preceding initial text segment, the current initial text segment, or a subsequent initial text segment. The boundary source markers are entered into a preset semantic embedding network along with the target reorganized segment, enabling the preset semantic embedding network to distinguish between the main semantic components and the contextual connection components when calculating the multidimensional feature vector. Specifically, the text content corresponding to the current initial text segment is used to form the main semantic components in the multidimensional feature vector, while the ending boundary text of the preceding initial text segment and the starting boundary text of the subsequent initial text segment are used to form the contextual connection components in the multidimensional feature vector. The main semantic components express the core content of the task in the current initial text segment, and the contextual connection components express the execution order relationship between the current initial text segment and adjacent initial text segments. The main semantic components and the contextual connection components jointly participate in the generation of the multidimensional feature vector. Through the above processing, the target recombined fragment retains both the core content of the current initial text fragment and the execution order relationship between the current initial text fragment and adjacent initial text fragments, thus avoiding the disassembly of task instructions that should be understood continuously into isolated vector records when generating the first text vector set later.
[0023] Preferably, when the multiple target reconstructed fragments are input into a preset semantic embedding network, the preset semantic embedding network includes a text normalization channel, a fragment source identification channel, a task semantic encoding channel, a resource-directed projection channel, and a vector output calibration channel. The text normalization channel uniformly processes line breaks, table separators, speech-to-text pauses, and redundant whitespace in the target reconstructed fragments to form normalized target reconstructed fragments. These normalized fragments retain key technical terms from role definitions, table structure definitions, workflow constraints, and user questions. The fragment source identification channel reads boundary source markers from the normalized target reconstructed fragments to generate fragment source weight records, which are used to distinguish between main semantic components and contextual coherence components. The task semantic encoding channel performs semantic encoding on the normalized target reconstructed fragments based on the fragment source weight records to form fragment semantic expressions oriented towards complex task iterations. The resource-directed projection channel maps the fragment semantic expressions to the resource call dimensions corresponding to large language processing models, knowledge bases, databases, and toolsets to form resource-directed semantic expressions. The vector output calibration channel performs uniform numerical range processing on the resource-directed semantic expressions to calculate the multi-dimensional feature vector corresponding to each target reconstructed fragment. The normalized target reconstructed fragment serves as the input to the fragment source identification channel, the fragment source weight record serves as the weight basis for the task semantic encoding channel, the fragment semantic expression serves as the mapping object for the resource pointing projection channel, and the resource pointing semantic expression serves as the calibration object for the vector output calibration channel, thereby enabling continuous data transmission relationships between the various channels in the preset semantic embedding network.
[0024] Preferably, the multidimensional feature vector does not merely represent the word similarity of the target reconstructed fragment, but is composed of numerical components of multiple semantic dimensions arranged in a fixed dimensional order. These multiple semantic dimensions include at least the role definition dimension, goal setting dimension, table structure definition dimension, constraint dimension, workflow dimension, user question dimension, knowledge base call dimension, database call dimension, toolset call dimension, environmental awareness dimension, and robot execution dimension. Specifically, the role definition dimension indicates whether the target reconstructed fragment involves the task identity limitation of the ontology agent; the goal setting dimension indicates whether the target reconstructed fragment involves the task goal limitation of the ontology agent; the table structure definition dimension indicates whether the target reconstructed fragment involves database fields or query result structures; the constraint dimension indicates whether the target reconstructed fragment involves task execution boundaries; and the workflow dimension indicates whether the target reconstructed fragment involves the task identity limitation of the ontology agent. The dimensions of the target reconstructed fragment are organized as follows: whether the fragment involves task execution order; user question dimension to indicate whether the fragment involves user-input task requests; knowledge base call dimension to indicate whether the fragment needs to retrieve semantic data from the knowledge base; database call dimension to indicate whether the fragment needs to read or write structured data; toolset call dimension to indicate whether the fragment needs to call tools such as date judgment, data calculation, data analysis, or chart generation; environmental perception dimension to indicate whether the fragment involves multi-camera analysis, voice interaction, or multimodal scene analysis; and robot execution dimension to indicate whether the fragment involves automatic path planning, automatic obstacle avoidance, obstacle stopping, or robot inspection. Through this dimensional organization, the multi-dimensional feature vector can express the natural language intent, prompt word engineering category, and agent resource call direction of the target reconstructed fragment within the same data structure. The natural language intent originates from the user question and workflow in the fragment, the prompt word engineering category originates from the prompt word engineering configuration record, and the agent resource call direction originates from the resource call relationship in the agent resource configuration record.
[0025] Preferably, when calculating the global semantic tensor of the initial task interaction text, the multidimensional feature vectors corresponding to all target reconstructed fragments in the initial task interaction text are first read and arranged according to the fragment order of the target reconstructed fragments in the initial task interaction text to form a fragment semantic arrangement record; then, based on the fragment semantic arrangement record, the occurrence intensity, continuous distribution state, and resource call direction of each semantic dimension in the initial task interaction text are statistically analyzed to form a global semantic tensor. The occurrence intensity is used to represent the numerical distribution density of the same semantic dimension in all target reconstructed fragments, the continuous distribution state is used to represent whether the same semantic dimension appears continuously between adjacent target reconstructed fragments, and the resource call direction is used to represent the correspondence between the multidimensional feature vectors corresponding to the target reconstructed fragments and the knowledge base call dimension, database call dimension, toolset call dimension, environmental perception dimension, and robot execution dimension. The technical essence of the global semantic tensor is a multi-axis semantic data structure used to describe the overall task meaning of the initial task interaction text. One data axis represents the sequential position of the target recombined fragment within the initial task interaction text; another represents the dimensions of role definition, target setting, table structure definition, constraints, workflow, and user question; and a third represents the dimensions of knowledge base invocation, database invocation, toolset invocation, environmental awareness, and robot execution. Each element in the global semantic tensor represents the correlation strength of a target recombined fragment under a certain semantic dimension and a certain resource invocation dimension, enabling the overall task structure of the initial task interaction text to be directly read by the subsequent feature cosine similarity numerical calculation process.
[0026] Preferably, after generating the global semantic tensor, a dimension alignment process is performed on the global semantic tensor to form a global semantic reference vector with the same dimensional order as the multidimensional feature vector. The dimension alignment process first reads the elements corresponding to each semantic dimension in the global semantic tensor according to the fixed dimensional order of the multidimensional feature vector, and then weights and summarizes the elements according to the fragment order markers of the target reconstructed fragments to form the corresponding numerical components in the global semantic reference vector. Specifically, the target reconstructed fragment located at the beginning of the initial task interaction text and used to define the task role, task objective, and constraints has a higher summarization weight for the role definition dimension, objective setting dimension, and constraint dimension; the target reconstructed fragment located at the end of the initial task interaction text and used to express user questions, resource calls, and execution requests has a higher summarization weight for the user question dimension, knowledge base call dimension, database call dimension, toolset call dimension, environmental perception dimension, and robot execution dimension. Each corresponding numerical component in the global semantic reference vector originates from the summarization result of elements with the same semantic dimension in the global semantic tensor, and the corresponding numerical components are arranged according to the fixed dimensional order of the multidimensional feature vector. Therefore, the global semantic comparison vector can be compared with each multidimensional feature vector in the same dimension in terms of numerical dimension, avoiding the inconsistency of scale between the multi-axis data in the global semantic tensor and the multidimensional feature vector.
[0027] Preferably, when calculating the feature cosine similarity value between each of the multidimensional feature vectors and the global semantic tensor, the multidimensional feature vector corresponding to the current target reconstructed segment is first read, and the global semantic reference vector formed by dimension alignment processing of the global semantic tensor is also read. Then, in the same dimensional order, each numerical component in the multidimensional feature vector is multiplied and accumulated with the corresponding numerical component in the global semantic reference vector to obtain the dimension association accumulation value. Subsequently, the vector length values of the multidimensional feature vector and the global semantic reference vector are calculated respectively, and the feature cosine similarity value is calculated based on the dimension association accumulation value, the vector length value of the multidimensional feature vector, and the vector length value of the global semantic reference vector. The above calculation process is performed on each multidimensional feature vector, so that each target reconstructed segment obtains a corresponding feature cosine similarity value. The feature cosine similarity value is used to represent the degree of directional consistency between the target reconstructed segment and the overall task structure of the initial task interaction text, rather than representing the text length or word repetition number of the target reconstructed segment. The feature cosine similarity value is then used in a numerical comparison operation and serves as the basis for determining whether the corresponding multidimensional feature vector is retained in the first text vector set.
[0028] Preferably, when comparing the feature cosine similarity value with the recall correlation setting value, the feature cosine similarity value and the recall correlation setting value are first processed to unify their numerical ranges, ensuring they fall within the same normalized numerical range. Then, each feature cosine similarity value is read sequentially according to the segment order label of the target recombined fragment, and each feature cosine similarity value is compared with the recall correlation setting value. When the feature cosine similarity value is less than the recall correlation setting value, the multidimensional feature vector corresponding to that feature cosine similarity value is deleted, and the segment order label and boundary source label corresponding to that multidimensional feature vector are also deleted simultaneously. When the feature cosine similarity value is greater than or equal to the recall correlation setting value, the multidimensional feature vector corresponding to that feature cosine similarity value is retained, and the segment order label and boundary source label corresponding to that multidimensional feature vector are also retained. Through the above comparison method, the elimination operation not only deletes multidimensional feature vectors whose feature cosine similarity value is less than the recall relevance setting value, but also simultaneously deletes the segment sequence marker and boundary source marker corresponding to the multidimensional feature vector, so as to prevent the target recombined segment corresponding to the multidimensional feature vector from continuing to participate in subsequent index comparison operations; the retention operation not only retains multidimensional feature vectors whose feature cosine similarity value is greater than or equal to the recall relevance setting value, but also simultaneously retains the segment sequence marker and boundary source marker corresponding to the multidimensional feature vector, so that the multidimensional feature vector can participate in the generation of the first text vector set according to the original semantic order.
[0029] Preferably, when combining the remaining multidimensional feature vectors after the removal operation, the original arrangement order of the remaining multidimensional feature vectors in the initial task interaction text is first restored according to the retained fragment order labels. Then, each multidimensional feature vector is bound to its corresponding boundary source label, feature cosine similarity value, and prompt word engineering category to form a vector sequence unit. Subsequently, the multiple vector sequence units are written into a unified vector sequence table according to their original arrangement order to generate the first text vector set. The vector sequence table is used to record the arrangement relationship between the multiple vector sequence units. The arrangement relationship in the vector sequence table is consistent with the retained fragment order labels, so that the first text vector set can retain the semantic sequence relationship in the initial task interaction text. The technical essence of the first text vector set is an ordered vector data structure used to carry the effective task semantics in the initial task interaction text. Each vector sequence unit in the first text vector set contains not only the multidimensional feature vector itself, but also the target recombination fragment from which the multidimensional feature vector originates, the degree of correlation between the multidimensional feature vector and the global semantic tensor, and the prompt word engineering category to which the multidimensional feature vector belongs. Therefore, the first set of text vectors can directly participate in the index comparison operation in the local vector storage space, and provide an orderly data entry point for the subsequent extraction of role definition text features, table structure definition text features, and workflow constraint text features.
[0030] Preferably, in a scenario where the initial task interaction text simultaneously contains a park anomaly monitoring and analysis request, a database query request, and a robot inspection request, the text slicing operation will distribute these requests across different initial text segments. After performing a boundary overlap reorganization operation based on the segment overlap length setting, the target reorganized segment containing the database query request can carry the park anomaly monitoring and analysis request from the preceding initial text segment, and the target reorganized segment containing the robot inspection request can carry the database query request from the preceding initial text segment. The preset semantic embedding network then maps the aforementioned target reorganized segments into multi-dimensional feature vectors containing database call dimensions, toolset call dimensions, environmental perception dimensions, and robot execution dimensions, respectively. The global semantic tensor forms the overall task structure of the initial task interaction text based on all target reorganized segments. The feature cosine similarity value is used to filter out multi-dimensional feature vectors that are irrelevant to the overall task structure. The first text vector set retains vector sequence units that can express the technical correlation between the park anomaly monitoring and analysis request, the database query request, and the robot inspection request, enabling the extraction of continuous workflow constraint text features from the first feature index set when constructing the initial prompt word workflow.
[0031] Optionally, the workflow for constructing the initial prompt word based on the first feature index set includes: Extract role definition text features, table structure definition text features, and workflow constraint text features from the first feature index set; The character definition text features are tagged to generate a first control node; The table structure definition text features are formatted to generate a second control node; The workflow constraint text features are subjected to temporal processing to generate a third control node; The first control node, the second control node, and the third control node are associated and arranged according to the preset directed acyclic graph structure to generate the initial prompt word workflow.
[0032] Preferably, the specific implementation process of constructing the initial prompt word workflow based on the first feature index set is as follows: First, read multiple first feature index items in the first feature index set. Each first feature index item contains a corresponding target recombination fragment, prompt word project category, resource call relationship, fragment order mark, and feature cosine similarity value. Then, according to the prompt word project category, the multiple first feature index items are categorized to form role definition candidate index items, table structure definition candidate index items, and workflow constraint candidate index items. Subsequently, according to the feature cosine similarity value and the fragment order mark, the role definition candidate index items, the table structure definition candidate index items, and the workflow constraint candidate index items are respectively subjected to same-type index filtering to form role definition filtering results, table structure definition filtering results, and workflow constraint filtering results. Then, extract role definition text features from the role definition filtering results, extract table structure definition text features from the table structure definition filtering results, and extract workflow constraint text features from the workflow constraint filtering results. The role definition text features, the table structure definition text features, and the workflow constraint text features all originate from the first feature index set and continue to carry the corresponding resource call relationships and fragment order markers, so that the semantic source, resource call relationships, and execution order in the initial task interaction text can be preserved when the initial prompt word workflow is subsequently constructed.
[0033] Preferably, when extracting the role definition text features from the first feature index set, firstly, candidate index items for role definition in the prompt word project category are read, and task identity limiting text, output range limiting text, and resource call range limiting text are identified from the target recombination fragments corresponding to the candidate index items for role definition; then, the task identity of the ontology agent in the current complex task is determined according to the task identity limiting text, the output range that the ontology agent should follow when calling the large language processing model to generate the first task execution logic is determined according to the output range limiting text, and the large language processing model, knowledge base, database, and toolset that the ontology agent can call in the current task is determined according to the resource call range limiting text; subsequently, the task identity limiting text, the output range limiting text, and the resource call range limiting text are combined according to the fragment order to form the role definition text features. The technical essence of the role definition text features is a text control feature used to constrain the task identity, output range, and resource call range of the ontology agent in the initial prompt word workflow, so that the subsequent first control node can provide a task identity constraint entry point before the large language processing model receives the initial prompt word workflow.
[0034] Preferably, when extracting the table structure definition text features from the first feature index set, firstly, candidate index items for table structure definitions with the prompt word project category of table structure definition are read, and database field description text, query condition description text, return result description text, and display format description text are extracted from the target reorganization fragment corresponding to the candidate index items for table structure definition. Then, based on the database field description text, the readable data fields in the target database are determined; based on the query condition description text, the filtering conditions to be used in the subsequent generation of the structured query statement text are determined; based on the return result description text, the data content that the processing result data package returned by the remote data storage unit should contain is determined; and based on the display format description text, the display arrangement of the processing result data package on the front-end service terminal is determined. Subsequently, the database field description text, the query condition description text, the return result description text, and the display format description text are organized according to the field source relationship to form the table structure definition text features. The technical essence of the table structure definition text features is to convert the query object, database field, and return result structure in natural language into structured description features that can be read by the initial prompt word workflow, so that the subsequent second control node can provide field constraints for the generation of structured query statement text in the first task execution logic.
[0035] Preferably, when extracting the workflow constraint text features from the first feature index set, firstly, read the workflow constraint candidate index items whose prompt word project category is workflow or constraint condition, and extract the preceding operation description text, current operation description text, subsequent operation description text, resource call condition description text, and exception handling description text from the target reorganization fragment corresponding to the workflow constraint candidate index item; then, determine the task steps that need to be completed before the current operation description text based on the preceding operation description text, determine the processing content that the ontology agent needs to perform in the current task step based on the current operation description text, determine the subsequent task step that should be entered after the current task step is completed based on the subsequent operation description text, determine the resource call order of the large language processing model, knowledge base, database, toolset, or environment awareness node based on the resource call condition description text, and determine the deviation processing entry point that needs to be entered after the state difference description appears based on the exception handling description text; then, organize the preceding operation description text, the current operation description text, the subsequent operation description text, the resource call condition description text, and the exception handling description text in a temporal order according to the fragment order label to form the workflow constraint text features. The technical essence of the workflow constraint text features is that they are text control features used to describe the sequential dependencies, resource call order, and deviation processing entry points between different task stages in a complex task, enabling subsequent third control nodes to convert discrete task descriptions into arrangeable execution order constraints.
[0036] Preferably, when performing tagging processing on the role definition text features, the task identity limitation text, output range limitation text, and resource call range limitation text in the role definition text features are first read, and task identity tags, output range tags, and resource call range tags are generated respectively; then, the task identity tags, output range tags, and resource call range tags are matched with the agent resource configuration records of the ontology agent to verify whether the ontology agent corresponding to the task identity tag has a large language processing model, knowledge base, database, and toolset consistent with the resource call range tag; subsequently, the verified task identity tags, output range tags, and resource call range tags are written into the same node text carrier to generate the first control node. The node text carrier is used to carry the tagged content transformed from the role definition text features, and the first control node participates in the association arrangement of the initial prompt word workflow based on the node text carrier. The technical essence of the first control node is a task identity control node formed by the transformation of role definition text features. The first control node is used to limit the task identity that the ontology agent should use to call the large language processing model, knowledge base, database and toolset in the initial prompt word workflow, and to limit the output range of the large language processing model when generating the first task execution logic.
[0037] Preferably, the first control node does not simply copy the role definition text features, but rather decomposes them into node control information that can participate in the initial prompt word workflow association arrangement. The node control information includes a node type tag, a task identity tag, an output range tag, a resource call range tag, and a node exit tag. Specifically, the node type tag indicates that the first control node originates from the role definition text features; the task identity tag defines the agent's task identity in the current task; the output range tag defines the output range of the large language processing model's first task execution logic; the resource call range tag defines the large language processing model, knowledge base, database, and toolset that the first control node can pass to the second and third control nodes; and the node exit tag defines that the first control node can point to the second and third control nodes. The node type tag, task identity tag, output range tag, resource call range tag, and node exit tag are all written into the node text carrier, enabling the node text carrier to be read by a preset directed acyclic graph structure. Through the above tagging process, the first control node can convert the role definition text features from natural language descriptions into entry constraints in the initial prompt word workflow, so that the subsequent second control node generation process and the third control node generation process are both carried out under the same task identity.
[0038] Preferably, when performing formatting processing on the table structure definition text features, the database field description text, query condition description text, return result description text, and display format description text in the table structure definition text features are first read. The database field description text is then formatted by field name to form a field name record. Next, the query condition description text is formatted by condition category to form a query condition record. Subsequently, the return result description text is formatted by result field to form a return result record, and the display format description text is formatted by display arrangement to form a display format record. Finally, the field name record, the query condition record, the return result record, and the display format record are combined according to their field source relationships to generate a second control node. The technical essence of the second control node is a data structure control node formed by transforming the table structure definition text features. The second control node is used to limit the field source, query conditions, return content, and display arrangement of the structured query statement text in the initial prompt workflow, enabling the first task execution logic to form a data access description matching the target database when calling the database.
[0039] Preferably, the field name record, query condition record, return result record, and display format record in the second control node are not independent text fragments, but rather a data structure description with upstream and downstream relationships formed according to the field source relationship. The field name record provides filterable fields for the query condition record, the query condition record determines the data filtering range based on the field name record, the return result record determines the data content that can be returned based on the query condition record, and the display format record determines the arrangement description that can be read by the front-end service terminal based on the return result record. The above-mentioned field source relationship also corresponds to the database resources in the intelligent agent resource configuration record, enabling the second control node to convert the natural language query intent in the user's question into data access constraints that match the database resources in the initial prompt word workflow. Through the above formatting process, the second control node can reduce the ambiguity of the table structure definition text features when generating structured query statement text in the subsequent process, ensuring that the database call content in the first task execution logic is consistent with the table structure definition text features.
[0040] Preferably, when performing temporal processing on the workflow constraint text features, the preceding operation description text, current operation description text, subsequent operation description text, resource call condition description text, and exception handling description text in the workflow constraint text features are first read, and an operation sequence record is generated based on the preceding operation description text and the subsequent operation description text; then, the current operation node content is generated based on the current operation description text, a resource call order record is generated based on the resource call condition description text, and a deviation handling entry record is generated based on the exception handling description text; subsequently, the operation sequence record, the current operation node content, the resource call order record, and the deviation handling entry record are arranged according to the segment order marker to generate a third control node. The technical essence of the third control node is a temporal control node formed by converting the workflow constraint text features. The third control node is used to limit the sequential relationship of task processing links, the resource call order, and the deviation handling entry after a state deviation occurs in the initial prompt word workflow.
[0041] Preferably, the operation sequence record in the third control node is used to constrain the arrangement of each task step before and after the ontology agent performs scene interaction operations. The resource call sequence record is used to constrain the resource call order between the large language processing model, knowledge base, database, toolset, and environment perception node. The deviation processing entry record is used to provide a locatable node entry for subsequent optimization of the initial prompt word workflow based on deviation feature vectors after the first running state dataset and the baseline constraint conditions form a state difference description. The operation sequence record, the resource call sequence record, and the deviation processing entry record are jointly embedded in the third control node, so that the third control node not only describes the task execution order, but also describes the technical correlation between the resource call conditions and the deviation processing entry. Through the above temporal processing, the workflow constraint text features can be converted from sequential descriptions in natural language into temporal control nodes in the initial prompt word workflow, so that the dependencies between task steps can be read when the first task execution logic is generated.
[0042] Preferably, the preset directed acyclic graph structure is pre-configured based on the prompt word engineering configuration record and the agent resource configuration record. Specifically, firstly, the order of prompt word engineering categories among role definition, goal setting, table structure definition, constraints, workflow, and user question is read from the prompt word engineering configuration record, and a node type arrangement record is generated according to the prompt word engineering category order; then, the resource call relationship between the large language processing model, knowledge base, database, and toolset is read from the agent resource configuration record, and a directed edge configuration record is generated according to the resource call relationship; subsequently, a duplicate back-pointing check is performed on the node type arrangement record and the directed edge configuration record, deleting directed edge configuration records that would cause subsequent nodes to re-point to previous nodes, thus forming the preset directed acyclic graph structure. The duplicate back-pointing check is used to check whether the directed edge configuration record causes the first control node, the second control node, or the third control node to form a circular pointing. The directed edge configuration records retained after the duplicate back-pointing check continue to participate in the configuration of the preset directed acyclic graph structure. The technical essence of the preset directed acyclic graph structure is a data arrangement structure used to constrain the flow between the first control node, the second control node, and the third control node to only follow the direction of task identity constraints, data structure constraints, and execution timing constraints, thereby avoiding the occurrence of node loop calls in the initial prompt word workflow before the large language processing model is called.
[0043] Preferably, the preset directed acyclic graph structure includes a node type arrangement record, a directed edge configuration record, and a node entry / exit record. The node type arrangement record defines the node type positions of the first, second, and third control nodes in the initial prompt word workflow. The directed edge configuration record defines the pointing relationships between the first and second control nodes, between the first and third control nodes, and between the second and third control nodes. The node entry / exit record defines the data content that each control node can receive and output. The node type arrangement record originates from the prompt word project configuration record, the directed edge configuration record originates from the agent resource configuration record, and the node entry / exit record is configured based on both the node type arrangement record and the directed edge configuration record. The node entry / exit record also reads the node exit marker in the first control node and determines the data content that the first control node can output to the second and third control nodes based on the node exit marker. Through this preset method, the preset directed acyclic graph structure can simultaneously reflect the prompt word project category order and resource call relationships, ensuring that the arrangement of the initial prompt word workflow has a readable data source.
[0044] Preferably, when arranging the first control node, the second control node, and the third control node according to a preset directed acyclic graph structure, the first control node is first written into the entry node position of the preset directed acyclic graph structure, and the task identity label, output range label, and resource call range label in the first control node are passed to the second and third control nodes; then, the second control node is written into the data structure node position of the preset directed acyclic graph structure, so that the second control node selects the field name record, query condition record, return result record, and display format record corresponding to the database resource according to the resource call range label passed by the first control node; subsequently, the third control node is written into the time sequence node position of the preset directed acyclic graph structure, so that the third control node arranges the operation sequence record, resource call sequence record, and deviation processing entry record according to the task identity label passed by the first control node and the data structure description in the second control node. The entry node position is derived from the node type arrangement record, the data structure node position is derived from the node type arrangement record, and the timing node position is derived from the node type arrangement record. After the first control node, the second control node, and the third control node write their corresponding node positions, they continue to establish pointing relationships through directed edge configuration records. Through the above-mentioned associated arrangement, the first control node is responsible for providing task identity constraints, the second control node is responsible for providing data structure constraints, and the third control node is responsible for providing execution timing constraints. These three types of constraints form a continuous technical processing relationship in the preset directed acyclic graph structure according to the directed edge configuration records.
[0045] Preferably, after the first control node, the second control node, and the third control node are associated and arranged, node content assembly processing is performed on the first control node, the second control node, and the third control node to generate the initial prompt word workflow. The node content assembly processing first reads the task identity label, output range label, and resource call range label from the first control node, and places the task identity label, the output range label, and the resource call range label at the entry position of the initial prompt word workflow; then it reads the field name record, query condition record, return result record, and display format record from the second control node, and places the field name record, the query condition record, the return result record, and the display format record at the data structure constraint position of the initial prompt word workflow; subsequently, it reads the operation sequence record, the resource call sequence record, and the deviation processing entry record from the third control node, and places the operation sequence record, the resource call sequence record, and the deviation processing entry record at the timing constraint position of the initial prompt word workflow. The technical essence of the initial prompt word workflow is that it is an ordered prompt word data structure formed by transforming the role definition text features, table structure definition text features, and workflow constraint text features respectively. This structure is used to transmit the natural language task intent, database access constraints, and scene interaction order in the initial task interaction text to the large language processing model.
[0046] Preferably, the initial prompt word workflow is not a long text formed by directly concatenating role definition text features, table structure definition text features, and workflow constraint text features, but rather a node-based prompt word data structure organized according to a preset directed acyclic graph structure. The node-based prompt word data structure includes a first control node, a second control node, a third control node, and directed edge configuration records between the first, second, and third control nodes. The first control node defines the task identity, output range, and resource call range when the large language processing model is invoked; the second control node defines the database fields, query conditions, return results, and display format; and the third control node defines the task execution order, resource call order, and deviation processing entry point. The node-based prompt word data structure also retains fragment order markers and resource call relationships in the first feature index set. The fragment order markers are used to maintain the semantic sequence relationship between the first, second, and third control nodes, and the resource call relationships are used to maintain the call correspondence between the first, second, and third control nodes and the large language processing model, knowledge base, database, and toolset. Because the node-based prompt word data structure retains the segment sequence markings and resource call relationships in the first feature index set, after the initial prompt word workflow is input into the large language processing model, the large language processing model can generate the first task execution logic based on the same task identity, the same output range, the same resource call range, the same data structure constraints, and the same execution timing constraints.
[0047] Preferably, in a scenario where the initial task interaction text includes a park anomaly monitoring and analysis request, a database query request, and a robot inspection request, the role definition candidate index items in the first feature index set are used to extract role definition text features for the park anomaly monitoring and analysis request and the robot inspection request. The table structure definition candidate index items in the first feature index set are used to extract table structure definition text features corresponding to the database query request. The workflow constraint candidate index items in the first feature index set are used to extract workflow constraint text features between the park anomaly monitoring and analysis request, the database query request, and the robot inspection request. After performing tagging processing on the role definition text features, a first control node is generated; after performing formatting processing on the table structure definition text features, a second control node is generated; and after performing temporal processing on the workflow constraint text features, a third control node is generated. Then, according to a preset directed acyclic graph structure, the first control node, the second control node, and the third control node are associated and arranged so that the initial prompt word workflow can first limit the task identity, output scope, and resource call scope of the ontology agent, then limit the data structure constraints corresponding to the database query request, and finally limit the execution sequence between the park anomaly monitoring and analysis request and the robot inspection request. This processing method enables the initial prompt word workflow to organize the scattered text features in the first feature index set into an ordered prompt word data structure that can be read by a large language processing model.
[0048] Optionally, the control environment sensing node collects a first operating status dataset, including: Activate the multi-channel image sensing nodes and audio acquisition nodes arranged in the target space; The multi-channel image sensing nodes are used to acquire multiple real-time video streams of the target space. The real-time voice dialogue stream of the target space is acquired through the audio acquisition node; Frame extraction is performed on the multiple real-time video streams to obtain the target image sequence; Target recognition processing is performed on the target image sequence to output first environmental visual data; The real-time voice dialogue stream is processed to convert speech to text, and the first ambient acoustic text is output. The first environmental visual data and the first environmental acoustic text are encapsulated to generate the first running state dataset.
[0049] Preferably, the specific implementation process of controlling the environmental perception node to collect the first running state dataset is as follows: First, read the agent resource configuration record corresponding to the agent, and extract the perception node configuration record, the acquisition task configuration record, and the resource call relationship from the agent resource configuration record; the perception node configuration record includes the image node connection record of the multi-channel image perception node and the audio node connection record of the audio acquisition node; the acquisition task configuration record includes the real-time acquisition mode record and the frame-skipping acquisition mode record; the resource call relationship is used to limit the order in which the agent calls the multi-channel image perception node, the audio acquisition node, the knowledge base, the database, and the toolset. Subsequently, according to the scene interaction operation in the first task execution logic, read the image node connection record and the audio node connection record in the perception node configuration record to generate an acquisition task start message for the target space; then send the acquisition task start message to the multi-channel image perception node and the audio acquisition node respectively, so that the multi-channel image perception node enters the image acquisition state according to the real-time acquisition mode record, and the audio acquisition node enters the audio acquisition state according to the real-time acquisition mode record. The technical essence of the acquisition task start message is that the acquisition control data generated based on the first task execution logic, the perception node configuration record and the acquisition task configuration record is used to convert the scene interaction operation into executable image acquisition action and audio acquisition action. The image acquisition action is executed by multiple image perception nodes and the audio acquisition action is executed by audio acquisition nodes.
[0050] Preferably, when activating the multiple image sensing nodes and audio acquisition nodes arranged in the target space, the acquisition task first initiates message execution node addressing processing to read the node address, video stream channel identifier, acquisition area identifier, and image acquisition mode of each image sensing node from the image node connection record, and reads the node address, audio stream channel identifier, sampling format identifier, and voice acquisition mode of the audio acquisition node from the audio node connection record; then, a connection establishment request is sent to the corresponding multiple image sensing nodes and audio acquisition nodes according to the node address, and image node response data returned by the multiple image sensing nodes and audio node response data returned by the audio acquisition nodes are received; subsequently, an image channel status record is generated according to the image node response data, video stream channel identifier, acquisition area identifier, and image acquisition mode, and an audio channel status record is generated according to the audio node response data, audio stream channel identifier, sampling format identifier, and voice acquisition mode. The image channel status record is used to indicate whether the multi-channel image sensing nodes have established a data connection with the subject intelligence agent capable of transmitting multiple real-time video streams, and to record the image acquisition mode adopted when the multi-channel image sensing nodes enter the image acquisition state; the audio channel status record is used to indicate whether the audio acquisition node has established a data connection with the subject intelligence agent capable of transmitting real-time voice dialogue streams, and to record the sampling format identifier and voice acquisition mode adopted when the audio acquisition node enters the audio acquisition state; the image channel status record and the audio channel status record jointly participate in the data encapsulation of the subsequent first running state dataset.
[0051] Preferably, the technical essence of the multi-channel image sensing nodes is that they are image data acquisition terminals arranged within the target space and corresponding to the acquisition area identifiers. Each image sensing node is used to acquire image frame data within the target space from one acquisition perspective, and writes the image frame data into the corresponding video stream channel according to the video stream channel identifier to form multiple real-time video streams. The multiple image sensing nodes together cover different acquisition areas in the target space, enabling the first environmental visual data to simultaneously express passenger flow statistics, area population statistics, area dwell time, fall detection, fire detection, area intrusion, non-motorized vehicle detection, garbage detection, and other identification categories recorded in the management and maintenance identification category record for different acquisition areas within the target space. The management and maintenance identification category record originates from the toolset configuration content in the intelligent agent resource configuration record and serves as the basis for target category identification during target recognition processing. The target category identification basis is used to constrain the target category identifier in the visual target recognition record. The visual target recognition record then participates in the generation of the first environmental visual data, which enters the first operating state dataset, enabling subsequent state difference descriptions to identify changes in the visual operating state in the target space.
[0052] Preferably, the technical essence of the audio acquisition node is a voice data acquisition terminal deployed within the target space and corresponding to the audio stream channel identifier. The audio acquisition node is used to acquire real-time voice dialogue streams related to the interactive operations of the agent within the target space, and writes the real-time voice dialogue streams into an audio transmission buffer record according to the audio stream channel identifier. The audio transmission buffer record is used to temporarily carry continuous sound sampling data from the real-time voice dialogue stream, and performs format preservation processing on the continuous sound sampling data according to the sampling format identifier in the audio channel status record, and then sends the format-preserved continuous sound sampling data to the speech-to-text conversion processing. The technical essence of the real-time voice dialogue stream is an audio data stream formed in the order of acquisition time. The real-time voice dialogue stream includes an audio stream channel identifier, an acquisition timestamp, and continuous sound sampling data. The audio stream channel identifier indicates which audio acquisition node the real-time voice dialogue stream originates from, the acquisition timestamp indicates the acquisition time of the continuous sound sampling data in the target space, and the continuous sound sampling data expresses the voice interaction content in the target space.
[0053] Preferably, when acquiring multiple real-time video streams of the target space through the multi-channel image sensing nodes, the process first reads the multi-channel image sensing nodes that have entered the image acquisition state according to the image channel status record, and controls each image sensing node to acquire image frame data according to the image acquisition mode in the image channel status record; then, the image frame data acquired by each image sensing node is written into the corresponding video stream channel, and the image frame data in the video stream channel is configured with a video stream channel identifier, acquisition area identifier, acquisition timestamp, and image frame sequence mark to form multiple real-time video streams. The technical essence of the multiple real-time video streams is that they consist of image frame data transmitted in parallel by multiple video stream channels. Each real-time video stream can express the visual operating state of an acquisition area over continuous time, and the multiple real-time video streams together express the visual operating state of the target space in multiple acquisition areas. The multiple real-time video streams then enter a frame extraction operation, enabling the target image sequence to extract image frame data related to the execution logic of the first task from the image frame data.
[0054] Preferably, when acquiring the real-time voice dialogue stream of the target space through the audio acquisition node, the audio acquisition node that has entered the audio acquisition state is first read according to the audio channel status record, and the audio acquisition node is controlled to acquire continuous sound sampling data according to the voice acquisition mode and sampling format identifier in the audio channel status record; then, the audio acquisition node writes the continuous sound sampling data in the target space into the audio stream channel, and configures the audio stream channel identifier, acquisition timestamp, and audio segment sequence mark for the continuous sound sampling data in the audio stream channel to form a real-time voice dialogue stream. The technical essence of the real-time voice dialogue stream is the voice time sequence data synchronously formed when interacting with the subject intelligent agent in the scene. The real-time voice dialogue stream can express the voice content related to user questions, on-site feedback, or execution confirmation in the target space. The real-time voice dialogue stream then enters the voice-to-text conversion processing, so that the first environmental acoustic text can extract the text content related to the scene interaction operation from the continuous sound sampling data.
[0055] Preferably, when performing frame extraction on the multiple real-time video streams, the frame extraction mode record in the acquisition task configuration record is read first, and the frame extraction time interval, frame extraction trigger condition, and video stream channel selection range are determined according to the frame extraction mode record; then, each real-time video stream within the video stream channel selection range is read according to the video stream channel identifier, and image frame data that meets the frame extraction time interval or frame extraction trigger condition is extracted from each real-time video stream according to the acquisition timestamp and image frame sequence mark; subsequently, the extracted image frame data is arranged according to the video stream channel identifier, acquisition area identifier, and acquisition timestamp to form a target image sequence. The frame extraction trigger condition is configured according to the scene interaction operation in the first task execution logic. When the first task execution logic includes a park anomaly monitoring and analysis request, a robot inspection request, or an area status viewing request, the frame extraction trigger condition is used to prioritize the video stream channel associated with the above request to enter the frame extraction operation. Through the above processing, the frame extraction operation can reduce redundant input of image frame data and retain the target image sequence related to the scene interaction operation.
[0056] Preferably, the technical essence of the target image sequence is an ordered image data structure formed by frame extraction operations from multiple real-time video streams. Each image frame in the target image sequence carries a video stream channel identifier, a capture area identifier, a capture timestamp, and an image frame sequence marker. The video stream channel identifier indicates which image sensing node the image frame data originates from; the capture area identifier indicates which capture area in the target space the image frame data corresponds to; the capture timestamp indicates the capture time of the image frame data; and the image frame sequence marker maintains the temporal order of the image frame data within the corresponding video stream channel. The target image sequence then serves as input for target recognition processing, enabling the target recognition processing to identify visual object records, visual quantity records, and visual state records in the target space according to the capture area and capture time. The visual object records, visual quantity records, and visual state records continue to participate in the generation of visual target recognition records.
[0057] Preferably, when performing target recognition processing on the target image sequence, image preprocessing is first performed on each image frame data in the target image sequence to generate preprocessed image frame data. The image preprocessing includes image size unification processing, image brightness equalization processing, and image noise suppression processing. The preprocessed image frame data retains the video stream channel identifier, acquisition area identifier, acquisition timestamp, and image frame sequence marker. Subsequently, based on the maintenance identification category record in the intelligent agent resource configuration record, visual target localization processing is performed on the preprocessed image frame data to generate target candidate area records. Then, category recognition processing and quantity statistics processing are performed on the target candidate area records to generate visual target recognition records. The visual target recognition record includes a target category identifier, target quantity value, target location record, target status marker, video stream channel identifier, acquisition area identifier, and acquisition timestamp. The target category identifier is generated based on the visual object record and maintenance identification category record, the target quantity value is generated based on the visual quantity record, and the target location record and target status marker are generated based on the visual status record. The visual target recognition record then participates in the generation of the first environmental visual data.
[0058] Preferably, the first environmental visual data is generated based on the visual target recognition records. Specifically, multiple visual target recognition records are first merged according to video stream channel identifiers and acquisition area identifiers to form regional visual state records; then, the regional visual state records are arranged chronologically according to acquisition timestamps to form target space visual state records; subsequently, the target space visual state records are used as the first environmental visual data. The regional visual state records are used to express the target category identifier, target quantity value, target location record, and target status marker within the same acquisition area, and the target space visual state records are used to express the visual operating status of multiple acquisition areas at different acquisition timestamps. The technical essence of the first environmental visual data is structured visual data used to describe the visual operating status of the target space during the current scene interaction operation; the first environmental visual data includes at least acquisition area identifiers, target category identifiers, target quantity values, target location records, target status markers, and acquisition timestamps. The first environmental visual data can provide the visual source of actual passenger flow statistics and actual path coordinate sequences in subsequent difference calculation operations, enabling the state difference description to establish a data correspondence with the changes in the visual operating status in the target space.
[0059] Preferably, when performing speech-to-text conversion processing on the real-time speech dialogue stream, continuous sound sampling data from the real-time speech dialogue stream is first read, and speech preprocessing is performed on the continuous sound sampling data to generate preprocessed speech segment records. The speech preprocessing includes silence removal, background noise suppression, and speech energy equalization. The preprocessed speech segment records continue to carry audio stream channel identifiers, acquisition timestamps, and audio segment sequence markers. Subsequently, speech segmentation processing is performed on the preprocessed speech segment records to form multiple speech segment records. Then, phoneme recognition and word combination processing are performed on each speech segment record to generate speech segment text. Finally, the multiple speech segment texts are concatenated according to the audio segment sequence markers to form the first environmental acoustic text. The speech segment records serve as the source of the speech segment text, and the speech segment text serves as the component of the first environmental acoustic text. The first environmental acoustic text continues to participate in the data encapsulation of the first running state dataset, thereby enabling a continuous data processing relationship between the real-time speech dialogue stream and the first environmental acoustic text.
[0060] Preferably, the technical essence of the first environmental acoustic text is text state data formed by converting real-time speech dialogue streams and used to express the speech interaction content in the target space. The first environmental acoustic text includes an audio stream channel identifier, a collection timestamp, an audio segment sequence marker, and speech segment text; wherein, the audio stream channel identifier indicates which audio acquisition node the first environmental acoustic text originates from, the collection timestamp indicates the speech acquisition time corresponding to the speech segment text, the audio segment sequence marker maintains the sequential order among multiple speech segment texts, and the speech segment text expresses the speech content in the target space. The first environmental acoustic text can subsequently express the operational state of scene interaction operations together with the first environmental visual data in the first operational state dataset, enabling the ontological agent to not only read the visual operational state changes in the target space but also the speech feedback in the target space.
[0061] Preferably, when encapsulating the first environmental visual data and the first environmental acoustic text, the following steps are taken: first, the acquisition area identifier, target category identifier, target quantity value, target location record, target status marker, and acquisition timestamp are read from the first environmental visual data; second, the audio stream channel identifier, acquisition timestamp, audio segment sequence marker, and speech segment text are read from the first environmental acoustic text. Then, the first environmental visual data and the first environmental acoustic text are time-aligned according to the acquisition timestamp to generate a multimodal time-aligned record. Subsequently, the multimodal time-aligned record is source-merged according to the acquisition area identifier and audio stream channel identifier to generate a multimodal source-merged record. Finally, the multimodal source-merged record, along with the image channel status record, audio channel status record, and acquisition task configuration record, are written into the running state encapsulation record to generate the first running state dataset. The multimodal time alignment record is used to express the correspondence between the first environmental visual data and the first environmental acoustic text within the same time range. The multimodal source merging record is used to express which acquisition area and which audio acquisition node the first environmental visual data and the first environmental acoustic text originate from, respectively. The running state encapsulation record is used to carry the internal data arrangement relationship of the first running state dataset. The first running state dataset is formed based on the running state encapsulation record and then proceeds to the difference calculation operation.
[0062] Preferably, the technical essence of the first operational state dataset is scene operational state data jointly formed by first environmental visual data, first environmental acoustic text, image channel state records, audio channel state records, and acquisition task configuration records. The first operational state dataset is not simply a storage of multiple real-time video streams and real-time voice dialogue streams. Instead, it aligns the first environmental visual data (formed by frame extraction and target recognition processing from multiple real-time video streams) with the first environmental acoustic text (formed by speech-to-text conversion processing from real-time voice dialogue streams) in time and merges their sources. This allows the first operational state dataset to express the visual operational state, voice state, acquisition channel state, and acquisition task state in the target space during the execution of the first task execution logic by the ontological agent. The first operational state dataset then undergoes a difference calculation operation and is compared with preset benchmark constraints to generate a state difference description.
[0063] Preferably, in a scenario, when the first task execution logic includes a park anomaly monitoring and analysis request and a robot inspection request, firstly, based on the intelligent agent resource configuration record, multiple image sensing nodes corresponding to the inspection area within the target space are activated, and audio acquisition nodes corresponding to the voice interaction area are activated; wherein, the inspection area originates from the acquisition area identifier in the image node connection record, and the voice interaction area originates from the binding relationship between the audio stream channel identifier in the audio node connection record and the target space. The multiple image sensing nodes acquire multiple real-time video streams of the inspection area, and the audio acquisition nodes acquire the real-time voice dialogue stream of the voice interaction area. Subsequently, frame extraction is performed on the multiple real-time video streams to extract target image sequences from different acquisition areas; then, target recognition processing is performed on the target image sequences to output first environmental visual data including passenger flow statistics, area number statistics, area stay, and abnormal status markers; simultaneously, speech-to-text conversion processing is performed on the real-time voice dialogue stream to output first environmental acoustic text including user questions, on-site feedback, and execution confirmation. Finally, the first environmental visual data and the first environmental acoustic text are encapsulated to generate a first running state dataset, which can provide visual and audio sources for subsequent state difference descriptions.
[0064] Optionally, the step of performing a difference calculation operation between the first running state dataset and preset benchmark constraints to generate a state difference description includes: Extract standard passenger flow statistics and standard path coordinate sequences from the preset baseline constraints; Extract actual passenger flow statistics and actual path coordinate sequences from the first operational status dataset; Calculate the first absolute difference between the standard passenger flow statistics and the actual passenger flow statistics; Calculate the second absolute difference between each coordinate point in the standard path coordinate sequence and the corresponding coordinate point in the actual path coordinate sequence; A two-dimensional data table is constructed using the first absolute difference and multiple second absolute differences, and the two-dimensional data table is used as a description of the state difference.
[0065] Preferably, the specific implementation process of performing a difference calculation operation on the first running state dataset and preset benchmark constraints to generate a state difference description is as follows: First, read the agent resource configuration record, acquisition task configuration record, and local database configuration record corresponding to the agent, and determine the multi-channel image perception nodes, audio acquisition nodes, knowledge base, database, and toolset that the agent can call when performing scene interaction operations in the target space according to the agent resource configuration record; then, determine the acquisition area identifier, video stream channel identifier, and acquisition timestamp range that need to participate in the difference calculation operation in the target space according to the acquisition task configuration record; subsequently, read the passenger flow statistics benchmark record and path coordinate benchmark record corresponding to the acquisition area identifier according to the local database configuration record, and combine the passenger flow statistics benchmark record and the path coordinate benchmark record into the preset benchmark constraints. The technical essence of the preset benchmark constraints is a benchmark data structure used to describe the passenger flow quantity benchmark and path location benchmark that the target space should satisfy during the execution of the first task logic by the ontology intelligent agent; wherein, the passenger flow statistics benchmark record is used to provide standard passenger flow statistics values, the path coordinate benchmark record is used to provide standard path coordinate sequences and target space coordinate benchmarks, and the standard passenger flow statistics values, the standard path coordinate sequences, and the target space coordinate benchmarks jointly participate in subsequent difference calculation operations.
[0066] Preferably, the preset benchmark constraints are not temporary, ordinary comparison text, but are pre-configured based on the target space's collection area identifier, the scene interaction operations in the first task execution logic, and the resource call relationships of the ontological agent. Specifically, firstly, corresponding passenger flow statistics benchmark records are configured for each collection area in the target space according to the collection area identifier, and the standard passenger flow statistics values allowed for the corresponding collection area under the scene interaction operations in the first task execution logic are recorded in the passenger flow statistics benchmark records; then, according to the ontological agent's inspection route, guide route, or docking route, corresponding path coordinate benchmark records are configured for the path sampling positions in the target space, and the standard path coordinate sequence and target space coordinate benchmark that the ontological agent should traverse are recorded in the path coordinate benchmark records; subsequently, the passenger flow statistics benchmark records, the path coordinate benchmark records, the collection area identifier, and the collection timestamp range are bound together to form the preset benchmark constraints. Through the above preset method, the preset benchmark constraints can establish a correspondence with the collection area identifier and collection timestamp in the first running state dataset, enabling subsequent difference calculation operations to perform data comparison within the same collection area and the same collection timestamp range.
[0067] Preferably, the target spatial coordinate reference is derived from the path coordinate reference record and is used to uniformly represent the coordinate positions in the standard path coordinate sequence and the actual path coordinate sequence. The target spatial coordinate reference includes a horizontal coordinate direction and a vertical coordinate direction corresponding to the target spatial ground plane. The horizontal coordinate direction represents the lateral position change in the target space, and the vertical coordinate direction represents the longitudinal position change in the target space. Standard coordinate points in the standard path coordinate sequence record standard horizontal and standard vertical coordinate values according to the target spatial coordinate reference, and actual coordinate points in the actual path coordinate sequence record actual horizontal and actual vertical coordinate values according to the same target spatial coordinate reference. Therefore, when subsequently calculating the second absolute difference, the standard horizontal coordinate value and the actual horizontal coordinate value belong to the same coordinate dimension, and the standard vertical coordinate value and the actual vertical coordinate value belong to the same coordinate dimension, avoiding incompatible data calculations between different coordinate dimensions.
[0068] Preferably, when extracting standard passenger flow statistics from the preset benchmark constraints, the passenger flow statistics benchmark record in the preset benchmark constraints is first read, and the passenger flow statistics benchmark record corresponding to the current collection area is located according to the collection area identifier in the first running state dataset; then, the standard passenger flow statistics value corresponding to the current collection area and the current collection timestamp range is extracted from the passenger flow statistics benchmark record. The technical essence of the standard passenger flow statistics value is to represent the passenger flow quantity benchmark corresponding to a certain collection area in the target space during the scene interaction operation in the first task execution logic. The standard passenger flow statistics value has the same quantity dimension as the target quantity value in the first environmental visual data and can be numerically compared with the actual passenger flow statistics value. The standard passenger flow statistics value does not represent arbitrary management rules, but rather quantity benchmark data indexed by the collection area identifier and the collection timestamp range. This quantity benchmark data participates in the calculation as benchmark data in the subsequent first absolute difference calculation.
[0069] Preferably, when extracting the standard path coordinate sequence from the preset benchmark constraints, the path coordinate benchmark record in the preset benchmark constraints is first read, and the path coordinate benchmark record corresponding to the current task of the agent is determined according to the scene interaction operation in the first task execution logic; then, the standard path coordinate sequence is extracted from the path coordinate benchmark record. The technical essence of the standard path coordinate sequence is a plurality of standard coordinate points arranged according to the path sampling order that the agent should traverse in the target space. Each standard coordinate point in the standard path coordinate sequence includes a collection area identifier, a path sampling order marker, a standard horizontal coordinate value, a standard vertical coordinate value, and a corresponding collection timestamp range. The standard horizontal coordinate value and the standard vertical coordinate value are used to represent the planar position of the standard coordinate point in the target space coordinate benchmark, the path sampling order marker is used to maintain the sequential order among the multiple standard coordinate points, and the collection timestamp range is used to establish a time correspondence with the actual coordinate points in the actual path coordinate sequence.
[0070] Preferably, when extracting actual passenger flow statistics from the first operating state dataset, the first environmental visual data in the first operating state dataset is first read, and the acquisition area identifier, target category identifier, target quantity value, target status marker, and acquisition timestamp are extracted from the first environmental visual data. Then, visual target recognition records corresponding to passenger flow statistics are filtered according to the target category identifier, and the target quantity values in the filtered visual target recognition records are merged according to the acquisition area identifier and acquisition timestamp to form actual passenger flow statistics. The technical essence of the actual passenger flow statistics is target space passenger flow quantity status data calculated from the first environmental visual data in the first operating state dataset. The actual passenger flow statistics correspond to the same acquisition area as the standard passenger flow statistics, and the acquisition timestamp corresponding to the actual passenger flow statistics falls within the range of the acquisition timestamp corresponding to the standard passenger flow statistics. Since the actual passenger flow statistics originate from multiple real-time video streams acquired by multiple image sensing nodes and are formed through frame extraction and target recognition processing, the actual passenger flow statistics can be used as visual quantity data in the first operating state dataset to participate in the calculation of the first absolute difference.
[0071] Preferably, when extracting the actual path coordinate sequence from the first running state dataset, the first environmental visual data in the first running state dataset is first read, and the target position record, target state marker, acquisition area identifier, and acquisition timestamp are extracted from the first environmental visual data. Then, according to the scene interaction operation in the first task execution logic, the target position record corresponding to the movement position of the agent is selected from the target position record, and the selected target position records are arranged according to the acquisition timestamp to form the actual path coordinate sequence. The technical essence of the actual path coordinate sequence is the actual movement trajectory data of the agent formed based on the target position record in the first environmental visual data. Each actual coordinate point in the actual path coordinate sequence includes an acquisition area identifier, a path sampling order marker, an actual horizontal coordinate value, an actual vertical coordinate value, and an acquisition timestamp. The actual horizontal coordinate value and the actual vertical coordinate value are used to represent the planar position of the actual coordinate point in the target spatial coordinate reference. The path sampling order marker is used to correspond to the path sampling order marker in the standard path coordinate sequence, and the acquisition timestamp is used to correspond to the acquisition timestamp range in the standard path coordinate sequence.
[0072] Preferably, when calculating the first absolute difference between the standard passenger flow statistics and the actual passenger flow statistics, the standard passenger flow statistics and the actual passenger flow statistics are first matched according to the collection area identifier and the collection timestamp range to form a passenger flow statistics comparison record. Wherein, when the collection timestamp corresponding to the actual passenger flow statistics falls within the collection timestamp range corresponding to the standard passenger flow statistics, the actual passenger flow statistics and the standard passenger flow statistics are written into the same passenger flow statistics comparison record. Then, the standard passenger flow statistics and the actual passenger flow statistics under the same collection area and the same collection timestamp range are read from the passenger flow statistics comparison record, and a difference calculation is performed on the standard passenger flow statistics and the actual passenger flow statistics. Subsequently, the absolute value of the difference calculation result is processed to form the first absolute difference. The technical essence of the first absolute difference is a non-negative value used to represent the degree of deviation of the actual passenger flow statistics in the corresponding collection area in the target space from the standard passenger flow statistics. The first absolute difference is further written into the passenger flow difference field in the subsequent two-dimensional data table. Since both the standard passenger flow statistics and the actual passenger flow statistics are quantitative data, they have the same quantitative dimensions and can be directly used for difference calculation and absolute value processing.
[0073] Preferably, before calculating the second absolute difference between each standard coordinate point in the standard path coordinate sequence and the corresponding actual coordinate point in the actual path coordinate sequence, coordinate correspondence processing is performed on the standard path coordinate sequence and the actual path coordinate sequence. The coordinate correspondence processing first reads the path sampling sequence marker, standard horizontal coordinate value, standard vertical coordinate value, and acquisition timestamp range for each standard coordinate point in the standard path coordinate sequence; then it reads the path sampling sequence marker, actual horizontal coordinate value, actual vertical coordinate value, and acquisition timestamp for each actual coordinate point in the actual path coordinate sequence. Subsequently, based on the path sampling sequence marker and acquisition timestamp, each standard coordinate point is matched with its corresponding actual coordinate point to form a path coordinate comparison record. Wherein, if the path sampling sequence marker of the actual coordinate point is consistent with the path sampling sequence marker of the standard coordinate point, and the acquisition timestamp of the actual coordinate point falls within the acquisition timestamp range of the standard coordinate point, the actual coordinate point and the standard coordinate point are written into the same path coordinate comparison record. The technical essence of the standard coordinate point is that it is a data unit in the standard path coordinate sequence used to express the path sampling position that the agent should traverse; the technical essence of the actual coordinate point is that it is a data unit in the actual path coordinate sequence used to express the path sampling position that the agent actually traverses. The path coordinate comparison record is used to place the standard coordinate points and actual coordinate points marked with the same path sampling order in the same comparison object, so as to avoid the incorrect comparison of coordinate points marked with different path sampling orders.
[0074] Preferably, when calculating the second absolute difference, the standard coordinate points and actual coordinate points under the same path sampling sequence mark are first read from the path coordinate comparison record. The standard horizontal coordinate value and standard vertical coordinate value of the standard coordinate point, and the actual horizontal coordinate value and actual vertical coordinate value of the actual coordinate point are then read respectively. Next, the difference between the standard horizontal coordinate value and the actual horizontal coordinate value is calculated and absolute value processing is performed to form the horizontal coordinate absolute difference. Similarly, the difference between the standard vertical coordinate value and the actual vertical coordinate value is calculated and absolute value processing is performed to form the vertical coordinate absolute difference. Finally, the horizontal coordinate absolute difference and the vertical coordinate absolute difference are combined to form the second absolute difference under the corresponding path sampling sequence mark. The technical essence of the second absolute difference is coordinate difference data used to represent the degree of deviation of the actual coordinate point from the standard coordinate point under the same target spatial coordinate reference. The horizontal coordinate absolute difference represents the degree of positional deviation in the horizontal coordinate dimension, and the vertical coordinate absolute difference represents the degree of positional deviation in the vertical coordinate dimension. Through the above processing, the second absolute difference does not directly perform dimensional calculations on the two coordinate points as a whole, but instead performs difference calculations and absolute value processing on the coordinate values of the same coordinate dimension separately.
[0075] Preferably, when constructing a two-dimensional data table using the first absolute difference and multiple second absolute differences, row index records for the two-dimensional data table are first generated based on the collection area identifier, collection timestamp range, and path sampling order marker, and column index records for the two-dimensional data table are generated based on the difference categories. The difference categories include passenger flow difference categories, horizontal coordinate difference categories, vertical coordinate difference categories, difference source categories, and difference association categories. These difference categories are used to configure the field types in the column index records. The row index records represent the collection area identifier, collection timestamp range, and path sampling order marker corresponding to the first absolute difference and multiple second absolute differences, respectively. The column index records represent the passenger flow difference field, horizontal coordinate difference field, vertical coordinate difference field, difference source field, and difference association field that need to be recorded in the two-dimensional data table. Subsequently, the first absolute difference is written into the cell corresponding to the passenger flow difference field in the two-dimensional data table. The horizontal coordinate absolute difference of each second absolute difference is written into the cell corresponding to the horizontal coordinate difference field, and the vertical coordinate absolute difference of each second absolute difference is written into the cell corresponding to the vertical coordinate difference field. Then, based on the comparison between the standard passenger flow statistics and the actual passenger flow statistics for the first absolute difference, and the comparison between the standard coordinate points and the actual coordinate points for the second absolute difference, a difference source field is generated. Subsequently, based on the source relationship between the first absolute difference and the target quantity value in the first environmental visual data, and the source relationship between the second absolute difference and the target location record in the first environmental visual data, a difference association field is generated. Thus, each row in the two-dimensional data table can express the difference calculation result under a collection area identifier or a path sampling order marker.
[0076] Preferably, the technical essence of the two-dimensional data table is a structured difference data table used to carry the degree of deviation in passenger flow and path location. The rows of the two-dimensional data table are arranged according to the collection area identifier, collection timestamp range, and path sampling order. The columns of the two-dimensional data table include a passenger flow difference field, a horizontal coordinate difference field, a vertical coordinate difference field, a difference source field, and a difference association field. Specifically, the passenger flow difference field records the first absolute difference; the horizontal and vertical coordinate difference fields record the second absolute difference; the difference source field records the standard passenger flow statistics and actual passenger flow statistics corresponding to the first absolute difference, as well as the standard coordinate point and actual coordinate point corresponding to the second absolute difference; and the difference association field records the source relationship between the first and second absolute differences and the first environmental visual data in the first operating status dataset. This two-dimensional data table enables the state difference description to simultaneously carry the degree of deviation in passenger flow and path location, rather than only outputting a single anomaly judgment result.
[0077] Preferably, when using the two-dimensional data table as the state difference description, the row index records, column index records, first absolute difference, and multiple second absolute differences in the two-dimensional data table are not changed. Instead, the two-dimensional data table is bound to the collection area identifier, collection timestamp, target category identifier, target quantity value, and target location record in the first running state dataset to form a state difference description. The technical essence of the state difference description is that it is a structured deviation description data expressed by the two-dimensional data table, used to describe the deviation of the target space's running state from preset baseline constraints during the execution of the first task logic by the ontology agent. The first absolute difference in the state difference description expresses the degree of deviation in passenger flow quantity, the second absolute difference expresses the degree of deviation in path location, and the difference source field and difference association field in the state difference description enable subsequent deviation feature vectors to be traced back to the corresponding first environmental visual data source in the first running state dataset.
[0078] Preferably, the state difference description continues to participate in the calculation of the deviation feature vector. Specifically, when calculating the deviation feature vector based on the state difference description, the first absolute difference, multiple second absolute differences, the difference source field, and the difference association field can be read from the state difference description. The degree of deviation in passenger flow is determined based on the first absolute difference, the degree of deviation in path location is determined based on the multiple second absolute differences, and the source and association fields determine which acquisition area identifier, acquisition timestamp, and target location record in the first environmental visual data the deviation data originates from. Thus, the state difference description not only records the degree of deviation in passenger flow between the standard and actual passenger flow statistics, but also records the degree of deviation in path location between the standard and actual path coordinate sequences, providing a readable data entry point for subsequent optimization of the initial prompt word workflow based on the deviation feature vector.
[0079] Preferably, in a scenario, when the first task execution logic includes a park anomaly monitoring and analysis request and a robot inspection request, the preset baseline constraints first configure passenger flow statistics baseline records and path coordinate baseline records based on the inspection area in the target space, and extract standard passenger flow statistics values from the passenger flow statistics baseline records and standard path coordinate sequences from the path coordinate baseline records; wherein, the inspection area originates from the collection area identifier in the first operating state dataset and establishes a corresponding relationship with the passenger flow statistics baseline records and path coordinate baseline records. The first operating state dataset then extracts the actual passenger flow statistics values and actual path coordinate sequences corresponding to the inspection area from the first environmental visual data. Subsequently, the standard passenger flow statistics values and actual passenger flow statistics values under the same inspection area and the same collection timestamp range are subjected to difference calculation and absolute value processing to form a first absolute difference; then, each standard coordinate point in the standard path coordinate sequence is compared with the corresponding actual coordinate point in the actual path coordinate sequence in the same dimension to form multiple second absolute differences; finally, a two-dimensional data table is constructed using the first absolute difference and multiple second absolute differences, and the two-dimensional data table is used as a description of state differences. Through the above processing, the state difference description can simultaneously express the degree of deviation of the number of passengers in the inspection area and the degree of deviation of the path position of the agent.
[0080] Optionally, optimizing the initial prompt word workflow based on the deviation feature vector to generate an updated prompt word workflow includes: The deviation feature vector is input into a preset causal inference network to determine the candidate prompt word node identifier that causes the state abnormality; The prompt word node to be replaced is located in the initial prompt word workflow based on the candidate prompt word node identifier; Retrieve the compensation execution logic text for the deviation feature vector from the locally pre-stored business tool instruction set; The compensation execution logic text is used to perform a text overwrite operation on the prompt word node to be replaced, so as to update the initial prompt word workflow to the updated prompt word workflow.
[0081] Preferably, the specific implementation process of optimizing the initial prompt word workflow based on the deviation feature vector to generate the updated prompt word workflow is as follows: First, read the state difference description and extract a first absolute difference, multiple second absolute differences, a difference source field, and a difference association field from the state difference description; then, generate a passenger flow quantity deviation component based on the first absolute difference, generate a path location deviation component based on the multiple second absolute differences, and generate a deviation source component based on the difference source field and the difference association field; subsequently, arrange the passenger flow quantity deviation component, the path location deviation component, and the deviation source component according to the deviation vector dimension order corresponding to the first control node, the second control node, and the third control node in the initial prompt word workflow to form the deviation feature vector. The deviation vector dimension order is used to make the passenger flow quantity deviation component correspond to the data structure constraints of the second control node, the path location deviation component correspond to the execution timing constraints of the third control node, and the deviation source component correspond to the resource call range constraints of the first control node. The technical essence of the aforementioned deviation feature vector is to convert the degree of deviation in passenger flow quantity, the degree of deviation in path location, and the corresponding first environmental visual data source in the state difference description into vectorized deviation information that can be read by a preset causal inference network. This enables the subsequent preset causal inference network to establish a correspondence between the operational state deviation in the target space and the first control node, the second control node, and the third control node in the initial prompt word workflow.
[0082] Preferably, before inputting the deviation feature vector into the preset causal inference network, the first control node, the second control node, and the third control node in the initial prompt word workflow are read. The task identity label, output range label, and resource call range label are read from the first control node; the field name record, query condition record, return result record, and display format record are read from the second control node; and the operation sequence record, resource call sequence record, and deviation processing entry record are read from the third control node. Then, the task identity label, the output range label, the resource call range label, the field name record, the query condition record, the return result record, the display format record, the operation sequence record, the resource call sequence record, and the deviation processing entry record are organized into a node status reference record. The node status reference record represents the task identity constraints, data structure constraints, and execution timing constraints configured in the initial prompt word workflow before generating the first task execution logic. The node status reference record and the deviation feature vector are input into the preset causal inference network, enabling the preset causal inference network to determine the correlation between the deviation in the running state corresponding to the deviation feature vector and the first control node, the second control node, or the third control node.
[0083] Preferably, the preset causal inference network is pre-configured based on the agent resource configuration record of the ontology agent, the nodeized prompt word data structure of the initial prompt word workflow, and the field structure describing the state difference. The preset causal inference network includes a deviation input parsing channel, a node association mapping channel, a causal strength evaluation channel, and a candidate node output channel. The deviation input parsing channel reads the passenger flow quantity deviation component, path location deviation component, and deviation source component from the deviation feature vector, and converts these components into deviation parsing records. The node association mapping channel reads node status reference records and maps the deviation parsing records to the node dimensions corresponding to the first control node, second control node, and third control node, respectively, to form node deviation association records. The node dimensions include a first control node dimension, a second control node dimension, and a third control node dimension. The first control node dimension carries resource call scope constraint association information, the second control node dimension carries data structure constraint association information, and the third control node dimension carries execution timing constraint association information. The causal strength evaluation channel evaluates the association strength between the deviation feature vector and the first, second, and third control nodes based on the node deviation association records, to form node causal strength records. The candidate node output channel outputs candidate prompt word node identifiers based on the node causal strength records. Therefore, the pre-defined causal inference network does not only classify the deviation feature vectors, but also performs a corresponding analysis between the deviation feature vectors and the node-based prompt data structure in the initial prompt workflow.
[0084] Preferably, when the deviation input parsing channel parses the deviation feature vector, it first reads the passenger flow quantity deviation component and determines which collection area identifier and which collection timestamp the passenger flow quantity deviation originates from based on the difference source field corresponding to the passenger flow quantity deviation component; then it reads the path location deviation component and determines which target location record and which path sampling order marker the path location deviation originates from based on the difference association field corresponding to the path location deviation component; subsequently, it reads the deviation source component and determines whether the passenger flow quantity deviation and the path location deviation originate from the same collection area identifier or the same collection timestamp range based on the deviation source component, thus forming a deviation parsing record. The deviation parsing record continues to retain the passenger flow quantity deviation component, the path location deviation component, and the deviation source component, so that the subsequent node association mapping channel can determine, based on the deviation parsing record, that the deviation in the running status is closer to a data structure constraint error, an execution timing constraint error, or a resource call range constraint error.
[0085] Preferably, when the node association mapping channel performs node association mapping based on the deviation analysis record and the node status reference record, it first maps the passenger flow quantity deviation component in the deviation analysis record to the field name record, query condition record, and return result record in the second control node to form a data structure association record; then, it maps the path position deviation component in the deviation analysis record to the operation sequence record, resource call sequence record, and deviation processing entry record in the third control node to form an execution time sequence association record; subsequently, it maps the deviation source component in the deviation analysis record to the resource call range label in the first control node to form a resource call range association record. The data structure association record indicates whether the passenger flow quantity deviation is associated with the field name record, query condition record, or return result record; the execution time sequence association record indicates whether the path position deviation is associated with the operation sequence record or resource call sequence record; and the resource call range association record indicates whether the running status deviation is associated with the resource call range label defined by the first control node. The data structure association record, the execution time sequence association record, and the resource call range association record jointly participate in the formation of subsequent node causality strength records.
[0086] Preferably, the causal strength assessment channel forms node causal strength records based on data structure association records, execution time sequence association records, and resource call range association records. Specifically, the causal strength assessment channel first reads the data structure association records and determines the data structure causal strength corresponding to the second control node based on whether the passenger flow deviation component continuously corresponds to the same field name record, the same query condition record, or the same return result record; then it reads the execution time sequence association records and determines the execution time sequence causal strength corresponding to the third control node based on whether the path position deviation component continuously corresponds to the same operation sequence record, the same resource call sequence record, or the same deviation processing entry record; subsequently, it reads the resource call range association records and determines the resource call range causal strength corresponding to the first control node based on whether the deviation source component continuously corresponds to the same resource call range label in the first control node. The node causal strength record includes data structure causal strength, execution time sequence causal strength, and resource call range causal strength, and the node causal strength record is used to provide numerical basis for the candidate node output channel to determine the candidate prompt word node identifier.
[0087] Preferably, when the candidate node output channel determines the candidate prompt word node identifier that causes the deviation in the running state based on the node causality strength record, it first reads the data structure causality strength, execution time causality strength, and resource call range causality strength, and arranges these causality strengths according to the corresponding first control node, second control node, and third control node; then, it selects the control node with the highest causality strength and a source-corresponding relationship with the deviation source component as the candidate control node; subsequently, it reads the node position, node type marker, and node entry / exit records of the candidate control node in the initial prompt word workflow to form the candidate prompt word node identifier. The technical essence of the candidate prompt word node identifier is a data identifier used to indicate the position of the control node that needs to be checked or replaced in the initial prompt word workflow. The candidate prompt word node identifier includes at least a node position identifier, a node type marker, and a field identifier to be replaced; wherein, the node position identifier is used to locate the first control node, second control node, or third control node; the node type marker is used to indicate the control node type corresponding to the candidate prompt word node identifier; and the field identifier to be replaced is used to indicate the text field in the corresponding control node that needs to be compensated for by the execution logic text.
[0088] Preferably, when locating the prompt word node to be replaced in the initial prompt word workflow based on the candidate prompt word node identifier, the node position identifier in the candidate prompt word node identifier is first read, and the corresponding first control node, second control node, or third control node is located in the nodeized prompt word data structure of the initial prompt word workflow according to the node position identifier; then, the node type marker in the candidate prompt word node identifier is read, and it is verified whether the node type marker is consistent with the node type marker of the located control node; subsequently, the field identifier to be replaced in the candidate prompt word node identifier is read, and the node text region corresponding to the field identifier to be replaced is determined in the located control node to form the prompt word node to be replaced. The technical essence of the prompt word node to be replaced is the node text region in the initial prompt word workflow that has a causal relationship with the deviation feature vector and needs to be text-overwritten. The prompt word node to be replaced still retains the node position, node type marker, node entry and exit records, and directed edge configuration records of the control node it belongs to, so that the subsequent text-overwritten operation will not change the node connection relationship in the initial prompt word workflow.
[0089] Preferably, when the candidate prompt word node identifier points to the first control node, the prompt word node to be replaced is the node text area corresponding to the resource call range label in the first control node; when the candidate prompt word node identifier points to the second control node, the prompt word node to be replaced is the node text area corresponding to the query condition record, return result record, or display format record in the second control node; when the candidate prompt word node identifier points to the third control node, the prompt word node to be replaced is the node text area corresponding to the operation sequence record, resource call sequence record, or deviation processing entry record in the third control node. Through the above positioning method, the prompt word node to be replaced can establish a correspondence with the passenger flow quantity deviation component, path location deviation component, and deviation source component in the deviation feature vector, avoiding the complete replacement of the first, second, or third control node that is unrelated to the operational status deviation.
[0090] Preferably, the locally pre-stored business tool instruction set is pre-organized based on the tool set configuration content in the agent resource configuration record, the business rule text in the knowledge base configuration record, and the data access configuration content in the local database configuration record. Specifically, firstly, the tool set configuration content is read from the agent resource configuration record, and tool instruction items are generated based on the tool set configuration content; then, the business rule text related to scene interaction operations is read from the knowledge base configuration record, and the business rule text is written into the corresponding tool instruction item to form rule compensation content; subsequently, the data access configuration content related to structured query statement text is read from the local database configuration record, and the data access configuration content is written into the corresponding tool instruction item to form data access compensation content; finally, multiple tool instruction items containing rule compensation content and data access compensation content are arranged according to deviation category to form the locally pre-stored business tool instruction set. The technical essence of the locally pre-stored business tool instruction set is a data set pre-stored in the local environment and used to provide compensation execution logic text for deviation feature vectors. Each tool instruction item in the locally pre-stored business tool instruction set can establish a correspondence with the field identifier to be replaced in the first control node, the second control node, or the third control node.
[0091] Preferably, the tool instruction item includes at least a deviation category marker, an adaptation control node marker, a field to be replaced marker, tool execution action text, and compensation execution logic text. The deviation category marker indicates which type of deviation information the tool instruction item corresponds to: passenger flow quantity deviation component, path location deviation component, or deviation source component. The adaptation control node marker indicates whether the tool instruction item is applicable to a first control node, a second control node, or a third control node. The field to be replaced marker indicates which field the tool instruction item can cover: task identity label, resource call range label, query condition record, return result record, operation sequence record, resource call sequence record, or deviation processing entry record. The tool execution action text indicates the knowledge base, database, toolset, or environmental awareness node that the ontology agent needs to call in subsequent scene interaction operations. The compensation execution logic text is written into the prompt word node to be replaced. The deviation category marker, the adaptation control node marker, and the field to be replaced marker together serve as the retrieval basis for the business tool instruction set, and the tool execution action text and the compensation execution logic text together serve as the source of replacement content for the business tool instruction set. By organizing the tool instructions as described above, the locally pre-stored business tool instruction set can convert the replacement relationship between the deviation feature vector and the prompt word node to be replaced into searchable data records.
[0092] Preferably, when retrieving the compensation execution logic text for the deviation feature vector from the locally pre-stored business tool instruction set, deviation retrieval records are first generated based on the passenger flow quantity deviation component, path location deviation component, and deviation source component in the deviation feature vector; then, node retrieval records are generated based on the node type marker and the field to be replaced marker in the candidate prompt word node identifier; subsequently, the deviation retrieval records and the node retrieval records are used together to retrieve the locally pre-stored business tool instruction set to determine the tool instruction item that matches the deviation feature vector and the prompt word node to be replaced; finally, the compensation execution logic text is read from the matched tool instruction item. The technical essence of the compensation execution logic text is that it is an executable prompt word text used to replace the original node text in the prompt word node to be replaced. The compensation execution logic text is used to convert the running state deviation represented by the deviation feature vector into a correction execution requirement in the update prompt word workflow. The compensation execution logic text also maintains a correspondence with the tool execution action text, so that after the compensation execution logic text is written into the prompt word node to be replaced, it can continue to point to the corresponding knowledge base, database, toolset, or environment-aware node in the second task execution logic.
[0093] Preferably, when the deviation feature vector represents a high degree of deviation in passenger flow, the retrieved compensation execution logic text is used to supplement or replace the query condition record, return result record, or display format record in the second control node, so that the update prompt word workflow can reconstrain the data fields, filtering conditions, and return content required for passenger flow statistics when generating the second task execution logic in the subsequent process; when the deviation feature vector represents a high degree of deviation in path location, the retrieved compensation execution logic text is used to supplement or replace the operation order record, resource call order record, or deviation processing entry record in the third control node, so that the update prompt word workflow can reconstrain the path execution order and resource call order of the ontology agent when generating the second task execution logic in the subsequent process; when the deviation feature vector represents a deviation source component related to the resource call range label, the retrieved compensation execution logic text is used to supplement or replace the resource call range label in the first control node, so that the update prompt word workflow can re-limit the call range of the large language processing model, knowledge base, database, and toolset when generating the second task execution logic in the subsequent process.
[0094] Preferably, when performing a text overwrite operation on the prompt word node to be replaced using the compensation execution logic text, the original node text, node position identifier, node type marker, field identifier to be replaced, and node entry / exit records in the prompt word node to be replaced are read first, and the original node text is written into the node text record before replacement; then, the compensation execution logic text is read, and the node text area to which the compensation execution logic text should be written is determined according to the field identifier to be replaced; subsequently, the compensation execution logic text is written into the node text area to overwrite the original node text, and a node text record after replacement is generated; finally, the node text record after replacement is written back to the first control node, second control node, or third control node where the prompt word node to be replaced is located. The node text record before replacement is used to retain the original node text of the prompt word node before the text overwrite operation, and the node text record after replacement is used to participate in the generation of the prompt word update workflow. The node entry / exit records and directed edge configuration records remain unchanged during the text overwrite operation.
[0095] Preferably, the text overwrite operation does not rewrite the initial prompt word workflow entirely. Instead, it partially replaces the text region of the node corresponding to the prompt word node to be replaced, while retaining the node positions, node type markers, node entry and exit records, and directed edge configuration records in the initial prompt word workflow. If the prompt word node to be replaced is located in the first control node, the text overwrite operation only replaces the task identity label, output range label, or resource call range label corresponding to the field identifier to be replaced in the first control node. If the prompt word node to be replaced is located in the second control node, the text overwrite operation only replaces the field name record, query condition record, return result record, or display format record corresponding to the field identifier to be replaced in the second control node. If the prompt word node to be replaced is located in the third control node, the text overwrite operation only replaces the operation sequence record, resource call sequence record, or deviation processing entry record corresponding to the field identifier to be replaced in the third control node. Through the above partial replacement method, updating the prompt word workflow can retain the node content in the initial prompt word workflow that has not experienced any deviation in running state, while correcting the text region of the node that has a causal relationship with the deviation feature vector.
[0096] Preferably, when updating the initial prompt word workflow to the updated prompt word workflow, the first control node, the second control node, and the third control node after the text overlay operation are first read, and the first control node, the second control node, and the third control node are reassembled according to a preset directed acyclic graph structure; then, the node entry and exit records and directed edge configuration records that remain unchanged during the text overlay operation are read to maintain the node connection relationship in the updated prompt word workflow; subsequently, the replaced node text record, node entry and exit record, directed edge configuration record, and deviation feature vector are written into the same prompt word workflow update record to generate the updated prompt word workflow. The prompt word workflow update record is used to record the node position identifier, the field to be replaced identifier, and the replaced node text record of the updated prompt word workflow relative to the initial prompt word workflow after the text overlay operation. The technical essence of the updated prompt word workflow is an ordered prompt word data structure formed by locally overlaying the prompt word nodes to be replaced in the initial prompt word workflow based on the deviation feature vector. The updated prompt word workflow is used to be input again into the large language processing model to generate the second task execution logic.
[0097] Preferably, the updated prompt word workflow retains the configuration records of the first, second, and third control nodes and the directed edges between them from the initial prompt word workflow, and writes compensation execution logic text at the prompt word node to be replaced in the first, second, or third control node. After entering the updated prompt word workflow, the compensation execution logic text, along with task identity tags, output range tags, resource call range tags, field name records, query condition records, return result records, display format records, operation order records, resource call order records, and deviation processing entry records, participates in the generation of the second task execution logic. Thus, the updated prompt word workflow can, without changing the overall node arrangement of the initial prompt word workflow, pass the deviation in the running state reflected by the state difference description to the subsequent task execution logic generation process of the large language processing model.
[0098] Preferably, in one scenario, the state difference description characterizes the degree of deviation of the actual passenger flow statistics in the inspection area from the standard passenger flow statistics, and the degree of deviation of the actual path coordinate sequence from the standard path coordinate sequence, the deviation feature vector simultaneously includes both the passenger flow quantity deviation component and the path position deviation component. The pre-defined causal inference network first determines that the query condition record or return result record in the second control node is associated with the operational state deviation based on the passenger flow quantity deviation component. Then, it determines that the operation sequence record or resource call sequence record in the third control node is associated with the operational state deviation based on the path position deviation component, and outputs the corresponding candidate prompt word node identifier. Subsequently, based on the candidate prompt word node identifier, it locates the prompt word node to be replaced in the initial prompt word workflow and retrieves the compensation execution logic text corresponding to the passenger flow quantity deviation component and the path position deviation component from the locally pre-stored business tool instruction set. Finally, it uses the compensation execution logic text to perform a text overwrite operation on the prompt word node to be replaced to generate an updated prompt word workflow. This allows the updated prompt word workflow to simultaneously reconstrain the passenger flow statistics reading method and the ontology agent path execution order when generating the second task execution logic in the subsequent process.
[0099] Optionally, after the updated prompt word workflow is input again into the large language processing model to generate the second task execution logic, the ontology agent self-reflective optimization method for complex task iteration further includes: Extract the hardware resource call request table of the second task execution logic; Determine whether the number of concurrent operations requested by the hardware resource call request table exceeds the preset single-unit execution limit; When the number of concurrent operations exceeds the single-entity execution limit, multiple auxiliary intelligent agent nodes that are in a dormant state are activated according to the hardware resource call request table. The second task execution logic is divided into multiple sub-execution logics; The multiple sub-execution logics are respectively distributed to the main body intelligent agent and the multiple auxiliary intelligent agent nodes to control the main body intelligent agent and the multiple auxiliary intelligent agent nodes to collaboratively execute the scene interaction operation.
[0100] Preferably, after the update prompt word workflow is input again into the large language processing model to generate the second task execution logic, the specific implementation process of extracting the hardware resource call request table of the second task execution logic is as follows: First, read the second task execution logic and extract the execution action text, resource call text, execution time text, and execution object text related to the scene interaction operation from the second task execution logic; then, determine the scene interaction action that the ontology agent needs to execute based on the execution action text, determine the hardware resources that the ontology agent needs to call and the resource access channels associated with the hardware resources based on the resource call text, determine the execution order of the scene interaction actions based on the execution time text, and determine the target space identifier, acquisition area identifier, or physical execution component identifier corresponding to the scene interaction action based on the execution object text; then, write the scene interaction action, the hardware resources, the resource access channels, the execution order, and the target space identifier, acquisition area identifier, or physical execution component identifier into the same resource request record to form a hardware resource call request table. The technical essence of the hardware resource call request table is that it is structured resource request data transformed by the second task execution logic. It is used to describe which hardware resources the second task execution logic needs to occupy when continuing to execute the scenario interaction operation, which resource access channels need to be called, under what execution order each hardware resource and each resource access channel is called, and the target space identifier, collection area identifier or physical execution component identifier corresponding to each hardware resource and each resource access channel.
[0101] Preferably, the hardware resource request table is not a plain text extract of the second task execution logic, but rather a conversion of the natural language execution content in the second task execution logic into schedulable resource request records. The resource request record includes at least a resource category identifier, a resource node identifier, an execution action identifier, an execution time window identifier, a target space identifier, a data acquisition area identifier, a physical execution component identifier, a resource occupancy level, and a resource release condition. Specifically, the resource category identifier indicates that the called object belongs to a physical execution component of the ontology intelligent agent, a multi-channel image perception node, an audio acquisition node, a database access channel, a knowledge base access channel, or a toolset invocation channel; the resource node identifier indicates the resource node of the called object in the intelligent agent resource configuration record; the execution action identifier indicates the data acquisition, path movement, voice interaction, image analysis, or result feedback action that the resource node needs to perform; the execution time window identifier limits the execution time range of the resource request record in the second task execution logic; the target space identifier indicates the target space corresponding to the resource request record; the data acquisition area identifier indicates the data acquisition area corresponding to the resource request record; the physical execution component identifier indicates the physical execution component corresponding to the resource request record; the resource occupancy level indicates the intensity of the resource request record's occupancy of hardware resources or resource access channels; and the resource release condition indicates the condition under which the corresponding hardware resource or resource access channel enters a reassignable state after completing the scene interaction action. The resource request record continues to participate in the calculation of the number of concurrent operations, enabling the subsequent judgment process to be executed based on structured data rather than on natural language text.
[0102] Preferably, when determining whether the number of concurrent operations requested by the hardware resource call request table exceeds a preset single-unit execution limit, multiple resource request records in the hardware resource call request table are first read, and the multiple resource request records are merged according to the execution time window identifier to form a time window resource request record; then, the number of resource request records that are simultaneously occupied in each time window resource request record is counted to form the number of concurrent operations. The technical essence of the number of concurrent operations is the number of scene interaction actions that need to be executed or managed simultaneously by the main body intelligent agent within the same execution time window. The number of concurrent operations includes both the number of calls to physical execution components and the number of calls to multi-channel image perception nodes, audio acquisition nodes, database access channels, knowledge base access channels, and toolset call channels. Subsequently, the preset single-unit execution limit is read, and the number of concurrent operations is compared with the preset single-unit execution limit; when the number of concurrent operations is less than or equal to the preset single-unit execution limit, the second task execution logic continues to be executed by the main body intelligent agent; when the number of concurrent operations exceeds the preset single-unit execution limit, the auxiliary intelligent agent node activation process is initiated.
[0103] Preferably, the preset single-entity execution limit is pre-configured based on the agent resource configuration record corresponding to the main agent. Specifically, firstly, the physical execution components, multi-channel image perception nodes, audio acquisition nodes, database access channels, knowledge base access channels, and toolset invocation channels that the main agent can directly call are read from the agent resource configuration record; then, based on the resource occupancy level, task queue capacity, and resource release conditions of each hardware resource and each resource access channel within the same execution time window, a single-entity resource carrying record is generated; subsequently, the single-entity resource carrying record is configured to correspond with the scene interaction operation type of the main agent to form the preset single-entity execution limit. The technical essence of the preset single-entity execution limit is to describe the upper limit data of the number and types of resource request records that the main agent can simultaneously carry without calling auxiliary agent nodes. Through the above-mentioned preset method, the preset single-entity execution limit corresponds to the actual resource configuration of the main agent, avoiding the confusion between resource request records involving only database access channels and resource request records involving physical execution components.
[0104] Preferably, when the number of concurrent operations exceeds the preset single-unit execution limit, the specific implementation process of activating multiple dormant auxiliary agent nodes according to the hardware resource call request table is as follows: First, read the time window resource request records in the hardware resource call request table, and filter out resource request records that exceed the preset single-unit execution limit from the time window resource request records to form overflow resource request records; then, according to the resource category identifier, resource node identifier, execution action identifier, target space identifier, acquisition area identifier, and physical execution component identifier in the overflow resource request record, search for auxiliary agent nodes that are dormant and match the overflow resource request record in the agent resource configuration record; subsequently, send an auxiliary agent node activation message to the matched auxiliary agent node, and receive the auxiliary agent node response record returned by the auxiliary agent node, so as to switch the dormant auxiliary agent node to a collaborative waiting-to-execute state. The auxiliary agent node activation message carries a resource category identifier, a resource node identifier, an execution action identifier, a target space identifier, a collection area identifier, a physical execution component identifier, and an execution time window identifier. The auxiliary agent node response record indicates that the auxiliary agent node has entered a collaborative execution state and is able to receive the corresponding sub-execution logic.
[0105] Preferably, the technical essence of the auxiliary agent node is a schedulable agent node pre-created and stored in the agent service runtime container according to the agent resource configuration record. The auxiliary agent node and the main agent have the same unified agent service interface record. This unified agent service interface record is pre-configured according to the agent resource configuration record to define the data interface format for the main agent and auxiliary agent nodes to receive sub-execution logic, return sub-execution results, and provide feedback on the auxiliary agent node's running status. The auxiliary agent node receives sub-execution logic, returns sub-execution results, and provides feedback on its running status through the unified agent service interface record. The difference between the auxiliary agent node and the main agent is that the auxiliary agent node is in a dormant state when not activated and does not participate in the direct execution of the second task execution logic. When the number of concurrent operations exceeds the preset single-unit execution limit, the auxiliary agent node enters a collaborative waiting-to-execute state based on the auxiliary agent node activation message. After the auxiliary agent node enters the collaborative execution state, it continues to retain its resource call relationship in the agent resource configuration record, so that subsequent sub-execution logic can call multiple image perception nodes, audio acquisition nodes, database access channels, knowledge base access channels or toolset call channels according to the resource call relationship.
[0106] Preferably, when the second task execution logic is split into multiple sub-execution logics, firstly, task boundary identification processing is performed on the second task execution logic based on the resource request records, execution time window identifiers, and resource release conditions in the hardware resource call request table to form multiple task boundary records; then, the second task execution logic is divided into multiple candidate sub-logic texts based on the task boundary records, and the resource category identifier, resource node identifier, execution action identifier, target space identifier, acquisition area identifier, and physical execution component identifier corresponding to each candidate sub-logic text are read; subsequently, resource adaptation processing is performed on the multiple candidate sub-logic texts based on the resource call relationship between the main agent and multiple auxiliary agent nodes to form multiple sub-execution logics. The technical essence of the sub-execution logic is that it is a local execution logic formed by splitting the second task execution logic and can be independently executed by the main agent or auxiliary agent nodes. The sub-execution logic still retains the execution time window identifier, resource release conditions, and result feedback requirements in the second task execution logic, so that multiple sub-execution logics can be re-aggregated into a scene interaction execution result corresponding to the second task execution logic after being executed separately.
[0107] Preferably, the task boundary record is generated based on the resource occupancy relationship and execution sequence relationship between scene interaction actions. Specifically, when two adjacent scene interaction actions call hardware resources or resource access channels corresponding to different resource category identifiers, and there is no input result dependency relationship between the two adjacent scene interaction actions, the position between the two adjacent scene interaction actions is recorded as a separable boundary; when two adjacent scene interaction actions call hardware resources or resource access channels corresponding to the same resource node identifier, or when the latter scene interaction action needs to read the execution result of the former scene interaction action, the position between the two adjacent scene interaction actions is recorded as an indivisible boundary. The separable boundary is used to form different candidate sub-logic texts, and the indivisible boundary is used to keep scene interaction actions with input result dependency relationships in the same candidate sub-logic text. Through the above task boundary identification processing, the sub-execution logic will not disrupt the resource call relationship that should be executed continuously in the second task execution logic, nor will it split scene interaction actions that need to be executed continuously with the same hardware resource or the same resource access channel into different intelligent agent nodes.
[0108] Preferably, after multiple sub-execution logics are formed, execution subject allocation processing is performed on the multiple sub-execution logics. The execution subject allocation processing first reads the ontological resource occupancy status record of the ontological agent and the auxiliary resource occupancy status records of multiple auxiliary agent nodes. Then, based on the resource category identifier, resource node identifier, execution action identifier, execution time window identifier, target space identifier, acquisition area identifier, and physical execution component identifier in each sub-execution logic, the resource compatibility degree between each sub-execution logic and the ontological agent and multiple auxiliary agent nodes is calculated, and the resource compatibility degree is written into the sub-execution logic allocation record. Subsequently, based on the sub-execution logic allocation record, the corresponding execution subject is determined for each sub-execution logic. The ontological resource occupancy status record is used to indicate the hardware resources currently occupied by the ontological agent, the occupied resource access channels, the hardware resources to be released, and the resource access channels to be released. The auxiliary resource occupancy status record is used to indicate the hardware resources currently available for call by the auxiliary agent node, the resource access channels currently available for call, and the sub-execution logic to be received. The sub-execution logic allocation record is used to indicate whether each sub-execution logic should be executed by the ontological agent or by the corresponding auxiliary agent node.
[0109] Preferably, when multiple sub-execution logics are distributed to the main body intelligent agent and multiple auxiliary intelligent agent nodes, a sub-execution logic distribution message is first generated according to the sub-execution logic allocation record. The sub-execution logic, execution subject identifier, execution time window identifier, resource node identifier, resource release condition, and result feedback requirement are written into the sub-execution logic distribution message. Then, the sub-execution logic distribution message with the execution subject identifier pointing to the main body intelligent agent is written into the main body intelligent agent's main body execution queue, and the sub-execution logic distribution message with the execution subject identifier pointing to the auxiliary intelligent agent node is sent to the corresponding auxiliary intelligent agent node's auxiliary execution queue. Subsequently, the main body queue reception record returned by the main body execution queue and the auxiliary queue reception record returned by the auxiliary execution queue are received. The main body queue reception record and the auxiliary queue reception record together indicate that multiple sub-execution logics have entered the corresponding execution queues according to the sub-execution logic allocation record. The main body queue reception record and the auxiliary queue reception record continue to participate in task synchronization during the collaborative execution process.
[0110] Preferably, when controlling the main body intelligent agent and multiple auxiliary intelligent agent nodes to collaboratively execute the scene interaction operation, a collaborative task synchronization record is first generated based on the main body queue receiving record and the auxiliary queue receiving record, and the collaborative task synchronization record is written to the main body intelligent agent and multiple auxiliary intelligent agent nodes respectively; then, the main body intelligent agent executes the corresponding sub-execution logic according to the main body execution queue, and multiple auxiliary intelligent agent nodes execute the corresponding sub-execution logic according to their respective auxiliary execution queues; subsequently, according to the result feedback requirements in each sub-execution logic, the main body sub-execution result returned by the main body intelligent agent and the auxiliary sub-execution results returned by the multiple auxiliary intelligent agent nodes are received. The collaborative task synchronization record is used to limit the execution time window identifier, resource release conditions, and result feedback requirements between the main body intelligent agent and multiple auxiliary intelligent agent nodes, and the main body sub-execution result and the auxiliary sub-execution result are used to express the local execution results after the completion of multiple sub-execution logics.
[0111] Preferably, the collaborative execution is not a simple distribution of the second task execution logic to multiple agent nodes for parallel execution, but rather an ordered collaboration of multiple sub-execution logics based on execution time window identifiers, resource release conditions, and result feedback requirements. Specifically, when the sub-execution logic executed by an auxiliary agent node needs to read the main agent's sub-execution result, the auxiliary agent node waits for the main agent's sub-execution result to be written into the result shared cache record according to the collaborative task synchronization record, and then reads the main agent's sub-execution result from the result shared cache record and continues to execute the corresponding sub-execution logic; when the sub-execution logic executed by the main agent needs to read the auxiliary agent node's auxiliary sub-execution result, the main agent waits for the auxiliary sub-execution result to be written into the result shared cache record according to the collaborative task synchronization record, and then reads the auxiliary sub-execution result from the result shared cache record and continues to execute the corresponding sub-execution logic. The result shared cache record is used to temporarily carry the main agent's sub-execution result and the auxiliary sub-execution result. The result shared cache record also records the source of each sub-execution result according to the execution time window identifier and the execution subject identifier, so that subsequent execution result aggregation processing can determine the sub-execution logic corresponding to each sub-execution result.
[0112] Preferably, after the main agent and multiple auxiliary agent nodes complete collaborative execution, the main agent sub-execution results and auxiliary sub-execution results are further processed for summary processing. The summary processing first reads the main agent sub-execution results, auxiliary sub-execution results, execution time window identifiers, and execution subject identifiers from the result shared cache record, and then arranges the main agent sub-execution results and auxiliary sub-execution results according to the execution order in the second task execution logic to form a collaborative execution result record. Next, the main agent resource occupancy status record and auxiliary agent resource occupancy status record are updated according to the resource release conditions in the collaborative execution result record, causing the main agent or auxiliary agent node that has completed the sub-execution logic to release the corresponding hardware resources or corresponding resource access channels. Subsequently, the collaborative execution result record is written into the scene interaction execution result corresponding to the second task execution logic. The collaborative execution result record is used to express the overall execution result after the main agent and multiple auxiliary agent nodes jointly execute the scene interaction operation. The scene interaction execution result continues to be fed back to the front-end service terminal, or continues to enter subsequent running status collection and difference calculation operations.
[0113] Preferably, in a scenario, when the second task execution logic simultaneously includes robot inspection path adjustment, multi-channel image perception node anomaly verification, audio acquisition node voice prompts, and database access channel record write-back, the hardware resource call request table will simultaneously contain multiple resource request records corresponding to the physical execution components, multi-channel image perception nodes, audio acquisition nodes, and database access channels. If the number of concurrent operations within the same execution time window exceeds the preset single-unit execution limit, multiple dormant auxiliary intelligent agent nodes are activated according to the hardware resource call request table, and the second task execution logic is split into sub-execution logic corresponding to robot inspection path adjustment, multi-channel image perception node anomaly verification, audio acquisition node voice prompts, and database access channel record write-back. Subsequently, the sub-execution logic corresponding to robot inspection path adjustment is sent to the main intelligent agent, and the sub-execution logic corresponding to multi-channel image perception node anomaly verification, audio acquisition node voice prompts, and database access channel record write-back are sent to multiple auxiliary intelligent agent nodes respectively, enabling the main intelligent agent and multiple auxiliary intelligent agent nodes to synchronously record and jointly complete the scene interaction operation according to the collaborative task.
[0114] Optionally, the control agent performs scene interaction operations according to the first task execution logic, including: Extract the structured query statement text from the execution logic of the first task; Retrieve the local database configuration record and extract the network address, verification username, and verification password of the target database from the local database configuration record; A unified access interface protocol is constructed based on the network address, the verification username, and the verification password. The structured query text is sent to the remote data storage unit for data processing via the unified access interface protocol. The system receives the processing result data packet returned by the remote data storage unit and drives the physical execution components of the ontological intelligent agent based on the processing result data packet.
[0115] Preferably, the specific implementation process of controlling the ontology agent to perform scene interaction operations according to the first task execution logic is as follows: First, read the first task execution logic and identify query intent fragments, query object fragments, query condition fragments, return field fragments, and result usage fragments related to database access from the first task execution logic; then, determine the data category that the ontology agent needs to read from the remote data storage unit according to the query intent fragment, determine the target data table or target data view in the target database according to the query object fragment, determine the data conditions for filtering the target data table or target data view according to the query condition fragment, determine the data fields that the remote data storage unit needs to return according to the return field fragment, and determine the execution basis required when the processing result data packet subsequently drives the physical execution component of the ontology agent according to the result usage fragment; then, structure and organize the query intent fragments, query object fragments, query condition fragments, return field fragments, and result usage fragments to form a structured query statement text. The technical essence of the structured query statement text is that it is a database access text transformed from the natural language query content in the first task execution logic. The structured query statement text is used to transform the scenario interaction requirements in the first task execution logic into data query requests that can be read by the remote data storage unit. The data query requests continue to participate in subsequent data processing operations as query payload records in the unified access interface protocol.
[0116] Preferably, when extracting the structured query text from the first task execution logic, it is not a direct extraction of natural language sentences from the first task execution logic, but rather a field alignment process performed in conjunction with the second control node in the initial prompt workflow. Specifically, the field name record, query condition record, return result record, and display format record in the second control node are first read, and the field name record is mapped to the query object fragment to determine the target data table or target data view and its readable fields in the structured query text; then, the query condition record is mapped to the query condition fragment to determine the filtering conditions in the structured query text; subsequently, the return result record is mapped to the return field fragment to determine the return fields in the structured query text, and the display format record is mapped to the result usage fragment to determine the data arrangement in the processing result data packet. Through the above field alignment process, the structured query text can inherit the data structure constraints in the initial prompt workflow, ensuring that the database access content sent by the subsequent unified access interface protocol remains consistent with the scenario interaction operation in the first task execution logic. The data structure constraints also continue to participate in the generation of field access range records.
[0117] Preferably, the local database configuration record is pre-generated based on the agent resource configuration record, the business category identifier of the front-end service terminal, and the database resource registration record. Specifically, after the agent is loaded into its independent running memory space, the database resource call relationship in the agent resource configuration record is read first, and the database resources that the agent can call are determined based on the database resource call relationship; then, based on the business category identifier of the front-end service terminal, the target database resource corresponding to the current scene interaction operation is filtered from the database resource registration record, and the database connection description text, database authentication description text, database table structure description text, and database return field description text corresponding to the target database resource are read; subsequently, the database connection description text is organized into the network address of the target database, the database authentication description text is organized into the verification username and verification password, the database table structure description text and the database return field description text are organized into a field access range record, and the network address of the target database, the verification username, the verification password, and the field access range record are written into the same local configuration data carrier to form the local database configuration record. The local configuration data carrier is used to carry the network address, verification username, verification password and field access range record of the target database. The technical essence of the local database configuration record is database access configuration data used to limit the connection location, authentication information and field access range required when the agent accesses the target database.
[0118] Preferably, when retrieving the local database configuration record, the corresponding database resource identifier is first read according to the query object fragment in the first task execution logic, and the target database configuration unit is located in the local database configuration record according to the database resource identifier; then, the network address, verification username, and verification password of the target database are extracted from the target database configuration unit, and the field access range record, query timeout control record, and return data parsing record in the target database configuration unit are read; subsequently, the network address, verification username, verification password, field access range record, query timeout control record, and return data parsing record of the target database are written together into the database access preparation record. The database access preparation record is used to provide a readable target database network address, verification username, verification password, field access range record, query timeout control record, and return data parsing record before constructing the unified access interface protocol, so that the subsequent unified access interface protocol can establish a connection, authenticate access, send queries, and receive results based on the same local database configuration record.
[0119] Preferably, when constructing a unified access interface protocol based on the network address, the verification username, and the verification password, a connection addressing record is first generated based on the network address. This connection addressing record is used to limit the access location of the remote data storage unit. Then, an access authentication record is generated based on the verification username and the verification password. This access authentication record is used to limit the identity verification content required for the ontology agent to access the target database. Subsequently, the structured query statement text, field access range record, query timeout control record, and returned data parsing record are read. The structured query statement text is encapsulated as a query payload record, the field access range record is encapsulated as a field constraint record, the query timeout control record is encapsulated as an access time limit record, and the returned data parsing record is encapsulated as a response parsing record. Finally, the connection addressing record, access authentication record, query payload record, field constraint record, access time limit record, and response parsing record are arranged in the order of access to form a unified access interface protocol. The technical essence of the unified access interface protocol is a data interaction protocol used to define the connection, authentication, query, reception, and parsing order when the ontology agent and the remote data storage unit access the database.
[0120] Preferably, the unified access interface protocol is not a simple connection string representing the network address, username, and password of the target database, but rather interface protocol data used to carry structured query text and access control information. The unified access interface protocol includes connection addressing records, access authentication records, query payload records, field constraint records, access time limit records, and response parsing records. Specifically, the connection addressing record determines the access path to the remote data storage unit; the access authentication record enables the remote data storage unit to verify the agent's access based on the username and password; the query payload record carries the structured query text; the field constraint record limits the data fields accessible to the structured query text; the access time limit record limits the time range for the agent to wait for the remote data storage unit to return the processing result data packet; and the response parsing record limits which data fields should be parsed after the processing result data packet is returned. Through this organization, the unified access interface protocol can combine the structured query text with the connection authentication content in the local database configuration record into an executable data access request, which is then sent to the remote data storage unit via the connection addressing record and the access authentication record.
[0121] Preferably, when sending the structured query text to the remote data storage unit for data processing via the unified access interface protocol, a connection request is first sent to the remote data storage unit according to the connection addressing record in the unified access interface protocol, and a verification username and password are sent to the remote data storage unit according to the access authentication record. After the remote data storage unit returns an authentication success record, the query payload record and field constraint record in the unified access interface protocol are read, and the structured query text in the query payload record is checked for consistency with the field access range record in the field constraint record. When the query field in the structured query text belongs to the field access range record, the structured query text is sent to the remote data storage unit for data processing. When the query field in the structured query text does not belong to the field access range record, a query field correction record is generated according to the field constraint record, and the field range of the structured query text is corrected using the query field correction record before the corrected structured query text is sent to the remote data storage unit for data processing. The authentication is recorded to trigger the reading of query payload records and field constraint records. The query field correction record is used to ensure that the query fields in the structured query statement text are consistent with the field access range records. Through the above sending method, the structured query statement text can establish a correspondence with the field access range records in the local database configuration records before sending, avoiding the ontology agent from sending field requests that are not related to the current scene interaction operation to the remote data storage unit.
[0122] Preferably, after receiving the structured query text, the remote data storage unit first reads the corresponding data storage area according to the target data table or target data view in the structured query text, and then filters the data records in the data storage area according to the filtering conditions in the structured query text to form candidate data records. Subsequently, according to the returned fields in the structured query text, it extracts the returned field data related to the scene interaction operation from the candidate data records, and organizes the returned field data into a processing result data packet according to the response parsing record in the unified access interface protocol. The technical essence of the remote data storage unit is that it is a data storage terminal associated with the target database, used to receive the structured query text according to the unified access interface protocol, and to perform filtering, reading and encapsulation processing on the data records in the target database according to the structured query text. The candidate data records serve as the source of the returned field data, and the returned field data serves as the component content of the processing result data packet. After the processing result data packet is returned to the ontology intelligent agent by the remote data storage unit, it continues to participate in the driving processing of the physical execution components.
[0123] Preferably, the technical essence of the processing result data packet is structured result data generated by the remote data storage unit after performing data processing operations based on the structured query statement text. The processing result data packet includes at least query result field records, result source identifiers, result timestamps, result status markers, and execution mapping field records. Specifically, the query result field records carry the return field data extracted by the remote data storage unit based on the returned fields; the result source identifier indicates which target data table or target data view in the target database the query result field record originates from; the result timestamp indicates the data reading time corresponding to the processing result data packet; the result status marker indicates whether the processing result data packet meets the query conditions corresponding to the first task execution logic; and the execution mapping field record indicates which fields in the query result field records need to participate in the physical execution component driving of the ontology intelligent agent. The processing result data packet is not merely a regular query result for display, but rather structured result data that can provide data sources for the subsequent generation of execution control instructions by the physical execution components.
[0124] Preferably, when receiving the processing result data packet returned by the remote data storage unit, the system first parses the query result field record, result source identifier, result timestamp, result status flag, and execution mapping field record in the processing result data packet according to the response parsing record in the unified access interface protocol to generate a result field parsing record; then, it determines whether the processing result data packet meets the scenario interaction operation requirements in the first task execution logic based on the result status flag in the result field parsing record; when the processing result data packet meets the scenario interaction operation requirements in the first task execution logic, it extracts the target execution parameters required for driving the physical execution component from the query result field record according to the execution mapping field record; when the processing result data packet does not meet the scenario interaction operation requirements in the first task execution logic, it generates a data re-query request record according to the result status flag, and resends the structured query statement text corresponding to the data re-query request record to the remote data storage unit through the unified access interface protocol. The result field parsing record serves as the basis for extracting target execution parameters, and the data re-query request record serves as the trigger for resending the structured query statement text. Through the above receiving process, the processing result data packet can first undergo field parsing and status judgment before participating in the driving process of the physical execution component, avoiding the direct use of processing result data packets that do not meet the requirements of scene interaction operation for execution control.
[0125] Preferably, when driving the physical execution component of the ontology agent according to the processing result data packet, the execution mapping field record is first read from the result field parsing record, and the query result field record that needs to participate in the driving process is determined according to the execution mapping field record; then, the query result field record is converted into target execution parameters, which include target space identifier, acquisition area identifier, physical execution component identifier, execution action identifier, and execution condition identifier; subsequently, the corresponding physical execution component is located in the physical execution component configuration record of the ontology agent according to the physical execution component identifier, and an execution control instruction is generated according to the execution action identifier and the execution condition identifier; finally, the execution control instruction is written into the execution queue corresponding to the physical execution component, so that the physical execution component executes the scene interaction action corresponding to the first task execution logic according to the execution queue. The target execution parameter comes from the query result field record in the processing result data packet, the execution control instruction comes from the target execution parameter, and the execution control instruction continues to enter the execution queue of the physical execution component, thereby forming a continuous data processing relationship between the processing result data packet, the target execution parameter, the execution control instruction, and the physical execution component.
[0126] Preferably, the technical essence of the physical execution component is a controllable execution end within the ontological intelligent agent used to convert data processing results into perceptible scene interaction actions. The physical execution component includes a motion execution component, a voice interaction execution component, a display interaction execution component, or a mechanical operation execution component; wherein, the motion execution component is used to adjust the movement direction, movement distance, or stopping state of the ontological intelligent agent in the target space according to execution control commands; the voice interaction execution component is used to output voice content related to scene interaction operations according to execution control commands; the display interaction execution component is used to display query result field records in the processing result data packet according to execution control commands; and the mechanical operation execution component is used to perform opening, closing, indicating, or triggering actions related to device interaction within the target space according to execution control commands. The physical execution component establishes a correspondence with the physical execution component configuration record of the ontological intelligent agent through a physical execution component identifier, enabling the processing result data packet to drive the corresponding physical execution component according to the physical execution component identifier, rather than performing general control of the ontological intelligent agent.
[0127] Preferably, the physical execution component configuration record is pre-generated based on the agent resource configuration record. Specifically, firstly, physical execution components that the agent can directly invoke are read from the agent resource configuration record, and each physical execution component is configured with a physical execution component identifier, executable action record, execution parameter range record, and execution feedback field record; then, the physical execution component identifier is mapped to the execution mapping field record in the processing result data packet to form a result-driven mapping record; subsequently, the physical execution component identifier, executable action record, execution parameter range record, execution feedback field record, and result-driven mapping record are written into the same configuration carrier to form the physical execution component configuration record. The physical execution component configuration record is used to convert the query result field record into an execution control instruction matching the physical execution component after the processing result data packet is returned, enabling the agent to perform the corresponding scene interaction operation based on the data processing result returned by the remote data storage unit; the result-driven mapping record continues to participate in the correspondence and positioning between the execution mapping field record and the physical execution component identifier.
[0128] Preferably, after generating the execution control instruction based on the processing result data packet, an execution adaptation process is also performed on the execution control instruction. The execution adaptation process first reads the execution parameter range record from the physical execution component configuration record and matches the target execution parameter in the execution control instruction with the execution parameter range record. When the target execution parameter falls within the executable range corresponding to the execution parameter range record, the execution control instruction is written to the execution queue corresponding to the physical execution component. When the target execution parameter exceeds the executable range corresponding to the execution parameter range record, a boundary transformation is performed on the target execution parameter according to the execution parameter range record to generate a boundary transformation execution control instruction, which is then written to the execution queue corresponding to the physical execution component. The boundary transformation execution control instruction still retains the result source identifier and result timestamp from the processing result data packet, enabling the physical execution component to establish a source correspondence between the execution feedback data and the corresponding processing result data packet after executing the boundary transformation execution control instruction. The execution feedback data continues to participate in the generation of the physical execution feedback record.
[0129] Preferably, after the physical execution component executes the execution control instruction, it continues to generate a physical execution feedback record. The physical execution feedback record includes a physical execution component identifier, an execution action identifier, an execution start timestamp, an execution end timestamp, and an execution status flag. The physical execution component identifier indicates which physical execution component executes the execution control instruction; the execution action identifier indicates which type of scene interaction action the physical execution component performed; the execution start timestamp and execution end timestamp indicate the execution time range of the scene interaction action; and the execution status flag indicates whether the scene interaction action is completed. The execution feedback data is organized into a physical execution feedback record according to the physical execution component identifier, execution action identifier, execution start timestamp, execution end timestamp, and execution status flag. This physical execution feedback record is then written into a first running state dataset. The first running state dataset is then compared with preset baseline constraints to perform a difference calculation operation to generate a state difference description. Thus, the physical execution feedback record formed after the processing result data packet drives the physical execution component can continue to participate in the subsequent running state evaluation process.
[0130] Preferably, in a scenario where the first task execution logic includes a park anomaly monitoring and analysis request and a robot inspection request, the structured query statement text for querying the inspection area status, anomaly category, and inspection path is first extracted from the first task execution logic. Then, the local database configuration record is retrieved, and the network address, verification username, and verification password of the target database are extracted from the local database configuration record. Subsequently, a unified access interface protocol is constructed based on the network address, verification username, and verification password, and the structured query statement text is sent to the remote data storage unit for data processing operations via the unified access interface protocol. The processing result data packet returned by the remote data storage unit includes the inspection area identifier, anomaly category identifier, suggested path point record, and voice prompt content record. The agent generates execution control instructions corresponding to the mobile execution component based on the inspection area identifier and suggested path point record, and generates execution control instructions corresponding to the voice interaction execution component based on the anomaly category identifier and voice prompt content record. These execution control instructions are then executed through the physical execution component, enabling the database access results to be transformed into scene interaction actions of the agent in the target space.
[0131] Optionally, before the controlling ontology agent executes the scene interaction operation according to the first task execution logic, the ontology agent self-reflection optimization method for complex task iteration further includes: Receive the intelligent agent loading request message sent by the front-end service terminal; Perform message parsing operation on the intelligent agent loading request message to extract the business category identifier to which the front-end service terminal belongs; The business category identifier is mapped to a preset intelligent agent service runtime container, and a corresponding independent runtime memory space is allocated; The entity intelligence agent is loaded into the independent running memory space; A bidirectional communication link is established between the ontological intelligent agent and the front-end service terminal to receive the initial task interaction text sent by the front-end service terminal through the bidirectional communication link, and to provide real-time feedback to the front-end service terminal on the first running status dataset generated by executing the scene interaction operation.
[0132] Preferably, before the control agent performs scene interaction operations according to the first task execution logic, the specific implementation process of receiving the agent loading request message sent by the front-end service terminal is as follows: First, listen to the terminal access channel corresponding to the front-end service terminal, and after receiving the loading request data in the terminal access channel, perform message boundary identification processing on the loading request data to intercept the complete agent loading request message; then read the message header field group and message body field group in the agent loading request message. The message header field group includes the terminal access identifier, message sequence identifier, and session establishment marker. The message body field group includes the business category description text, interface capability description text, and loading target description text; then write the message header field group and the message body field group into the loading request cache record, so that subsequent message parsing operations can extract the business category identifier of the front-end service terminal based on the same loading request cache record. The technical essence of the agent loading request message is that the front-end service terminal sends structured access data before requesting to load the agent body. The agent loading request message is used to convert the access source, service scenario, interface capabilities and loading target of the front-end service terminal into data entry that can be read by the agent body loading process. The data entry continues to participate in message parsing operations, agent service running container mapping, independent running memory space allocation and bidirectional communication link establishment.
[0133] Preferably, the agent loading request message is not a regular connection request text, but a loading control message used to trigger the loading of the agent entity, the mapping of the agent service runtime container, the allocation of independent runtime memory space, and the establishment of a bidirectional communication link. The terminal access identifier indicates which front-end service terminal the agent loading request message originates from; the message sequence identifier maintains the receiving order among multiple agent loading request messages; the session establishment flag indicates whether the front-end service terminal requests to establish a bidirectional communication link with the agent entity; the service category description text expresses the service scenario type requested by the front-end service terminal; the interface capability description text expresses the data format and feedback frequency that the front-end service terminal can receive; and the loading target description text expresses the type of agent entity to be loaded. The terminal access identifier, message sequence identifier, session establishment flag, service category description text, interface capability description text, and loading target description text jointly participate in the message parsing operation, enabling the agent loading request message to be converted from a connection request text into an executable loading basis. This loading basis is then used to determine the service category identifier to which the front-end service terminal belongs.
[0134] Preferably, when performing message parsing on the agent loading request message, the message header field group is first read from the loading request cache record, and message source verification processing is performed according to the terminal access identifier and message sequence identifier to generate a message source verification record; then, the message body field group is read from the loading request cache record, and field segmentation processing is performed on the business category description text, interface capability description text, and loading target description text to form a field segmentation record; subsequently, the field segmentation records are filtered for validity according to the message source verification record, and the field content in the field segmentation records that fail the message source verification record is removed, and the business category description text that passes the validity filter is mapped to the business category identifier to which the front-end service terminal belongs. The technical essence of the message parsing operation is to perform structured reading and parsing processing on the terminal access identifier, business category description text, interface capability description text, and loading target description text in the agent loading request message. The message source verification record and the field segmentation record together form the basis for extracting the business category identifier to which the front-end service terminal belongs, and the business category identifier to which the front-end service terminal belongs continues to participate in the mapping processing of the agent service runtime container.
[0135] Preferably, the technical essence of the business category identifier to which the front-end service terminal belongs is a routing identifier used to describe the correspondence between the service scenario requested by the front-end service terminal, the interface capability description text, and the intelligent agent resource group record. Specifically, after field segmentation processing, the business category description text forms a service scenario field, an interaction method field, and a data feedback field. The service scenario field indicates the type of scenario interaction operation requested by the front-end service terminal; the interaction method field indicates whether the front-end service terminal needs to interact via text, voice, image, or status data; and the data feedback field indicates which type of data the front-end service terminal needs to receive: the initial task interaction text processing result, the first running status dataset, or the scenario interaction operation feedback result. The scenario interaction operation feedback result is subsequently transmitted through the outbound status feedback record in the bidirectional communication link. The service scenario field, interaction method field, and data feedback field are then combined to form the business category identifier to which the front-end service terminal belongs. The business category identifier to which the front-end service terminal belongs subsequently participates in the mapping processing of the intelligent agent service runtime container, enabling the ontology intelligent agent to be loaded into an independent runtime memory space corresponding to the service scenario requested by the front-end service terminal.
[0136] Preferably, the intelligent agent service runtime container is pre-configured based on the intelligent agent resource configuration record, container template configuration record, and business category mapping record. Specifically, firstly, the large language processing model, knowledge base, database, toolset, environment-aware nodes, and physical execution components that the ontology intelligent agent can call are read from the intelligent agent resource configuration record, and these components are organized into an intelligent agent resource group record; then, the memory isolation method, interface routing method, message caching method, and state caching method are read from the container template configuration record, and these components are organized into a container runtime template record; subsequently, based on the business category mapping record, the business category identifier of the front-end service terminal is bound to the corresponding intelligent agent resource group record and container runtime template record to form the preset intelligent agent service runtime container. The technical essence of the preset intelligent agent service runtime container is that it is an isolated runtime carrier used to carry the loading of the ontology intelligent agent, resource invocation, message sending and receiving, and state caching. The preset intelligent agent service runtime container establishes a correspondence with the business category identifier of the front-end service terminal through the business category mapping record, and limits the range of resources that the ontology intelligent agent can invoke in subsequent scene interaction operations through the intelligent agent resource group record.
[0137] Preferably, when mapping the business category identifier of the front-end service terminal to a preset intelligent agent service runtime container, the process involves first reading the business category identifier of the front-end service terminal and then querying the business category mapping record using the business category identifier as an index to locate the intelligent agent service runtime container corresponding to the business category identifier of the front-end service terminal. Next, the intelligent agent resource group record and container runtime template record in the intelligent agent service runtime container are read, and the large language processing model, knowledge base, database, toolset, environment awareness node, and physical execution component that the ontology intelligent agent can call in subsequent scene interaction operations are determined based on the intelligent agent resource group record. Subsequently, a container assembly record is generated based on the container runtime template record, enabling the container assembly record to express the interface routing method, message caching method, and state caching method of the ontology intelligent agent in the intelligent agent service runtime container. Through the above mapping process, the business category identifier of the front-end service terminal is not merely a text label, but a technical routing basis used to drive the selection of the intelligent agent service runtime container, the reading of the intelligent agent resource group record, and the generation of the container assembly record.
[0138] Preferably, when allocating the corresponding independent running memory space, the memory isolation method and message caching method in the container assembly record are read first, and the memory address range corresponding to the agent intelligent body is divided in the agent service running container according to the memory isolation method; then, according to the message caching method, a task text cache area, a state data cache area, a resource handle cache area, and a communication message cache area are configured within the memory address range; subsequently, the memory address range, task text cache area, state data cache area, resource handle cache area, and communication message cache area are written into the independent running memory space allocation record. The technical essence of the independent running memory space is that it is a running data carrying area separately allocated for the current agent intelligent body within the agent service running container. This independent running memory space is used to carry the initial task interaction text, the first task execution logic, the first running state dataset, resource call handles, and communication messages of the bidirectional communication link, enabling the agent intelligent body loading process triggered by different front-end service terminals to be distinguished from each other in terms of data storage range.
[0139] Preferably, the independent running memory space is not an ordinary data cache, but a running isolated space that corresponds to the business category identifier of the front-end service terminal, the intelligent agent service running container, and the ontology intelligent agent loading process. The task text cache area stores the initial task interaction text sent by the front-end service terminal through a bidirectional communication link; the state data cache area stores the first running state dataset generated by the ontology intelligent agent performing scene interaction operations; the resource handle cache area stores the resource call handles needed by the ontology intelligent agent when calling the large language processing model, knowledge base, database, toolset, environment awareness node, and physical execution component; and the communication message cache area stores the communication messages transmitted between the ontology intelligent agent and the front-end service terminal. The task text cache area, state data cache area, resource handle cache area, and communication message cache area together constitute the internal data arrangement relationship of the independent running memory space, enabling the independent running memory space to continuously participate in the reception of the initial task interaction text and the feedback of the first running state dataset after the ontology intelligent agent is loaded.
[0140] Preferably, when loading the ontology agent into the independent running memory space, the independent running memory space allocation record and the agent resource group record are read first, and the memory address range corresponding to the ontology agent is determined according to the independent running memory space allocation record; then, the identity control configuration, database access configuration, tool invocation configuration, environment awareness node configuration, and physical execution component configuration corresponding to the ontology agent are read according to the agent resource group record, and the identity control configuration, database access configuration, tool invocation configuration, environment awareness node configuration, and physical execution component configuration are written into the resource handle cache area; subsequently, the running instance of the ontology agent is written into the memory address range, and an ontology agent loading status record is generated. The ontology agent loading status record is used to indicate that the ontology agent has established a correspondence with the independent running memory space, the agent service running container, and the agent resource group record, and the ontology agent loading status record continues to participate in the bidirectional communication link establishment process.
[0141] Preferably, the ontology agent loading status record includes an ontology agent identifier, a memory address range identifier, a business category identifier of the front-end service terminal, a resource handle write status, a task text cache area status, a status data cache area status, and a communication message cache area status. The ontology agent identifier represents the currently loaded ontology agent; the memory address range identifier represents the location of the ontology agent in its independent running memory space; the business category identifier of the front-end service terminal represents the service scenario requested by the front-end service terminal corresponding to the ontology agent; the resource handle write status indicates whether the ontology agent has obtained a resource call handle; the task text cache area status indicates whether the initial task interaction text receiving location is available; the status data cache area status indicates whether the feedback location of the first running status dataset is available; and the communication message cache area status indicates whether the message cache location of the bidirectional communication link is available. The ontology agent loading status record provides a basis for the completion of loading for the subsequent establishment of the bidirectional communication link, enabling the bidirectional communication link to establish a correspondence with the already loaded ontology agent.
[0142] Preferably, when establishing a bidirectional communication link between the ontology agent and the front-end service terminal, the ontology agent identifier, memory address range identifier, and communication message cache area status are first read from the ontology agent loading status record, and the terminal access identifier, session establishment flag, and interface capability description text are read from the agent loading request message. Then, a link session identifier is generated based on the ontology agent identifier and terminal access identifier, and the receiving format of the initial task interaction text and the feedback format of the first running status dataset are determined based on the interface capability description text. Subsequently, inbound message cache records and outbound status feedback records are configured in the communication message cache area, and the link session identifier, inbound message cache records, and outbound status feedback records are written into the bidirectional communication link configuration record. The technical essence of the bidirectional communication link is a session data channel between the ontology agent and the front-end service terminal for bidirectional transmission of initial task interaction text, status feedback messages, and the first running status dataset. The bidirectional communication link establishes a correspondence between the link session identifier and the ontology agent loading status record.
[0143] Preferably, the bidirectional communication link is not a regular connection channel that receives requests from the front-end service terminal in one direction, but rather a bidirectional session structure that simultaneously has inbound message cache records and outbound status feedback records. The inbound message cache records are used to receive the initial task interaction text sent by the front-end service terminal and write the initial task interaction text into the task text cache area; the outbound status feedback records are used to read the first running status dataset from the status data cache area and feed the first running status dataset back to the front-end service terminal; the link session identifier is used to bind the inbound message cache records and the outbound status feedback records to the same front-end service terminal and the same ontology agent. Through the above bidirectional session structure, the initial task interaction text sent by the front-end service terminal can enter the subsequent text slicing operation of the ontology agent, and the first running status dataset generated by the scene interaction operation can also be returned to the front-end service terminal along the same bidirectional communication link.
[0144] Preferably, when receiving the initial task interaction text sent by the front-end service terminal through the bidirectional communication link, the corresponding inbound message cache record is first located according to the link session identifier, and the task interaction message sent by the front-end service terminal is read from the inbound message cache record; then, text field extraction processing is performed on the task interaction message to extract the task description text, resource call description text, and output requirement description text; subsequently, the task description text, resource call description text, and output requirement description text are arranged into the initial task interaction text according to the receiving time order, and the initial task interaction text is written into the task text cache area. The task interaction message serves as the message source of the initial task interaction text, and the task description text, resource call description text, and output requirement description text serve as the components of the initial task interaction text. The initial task interaction text continues to enter subsequent text slicing operations to generate multiple initial text fragments.
[0145] Preferably, when providing real-time feedback to the front-end service terminal on the first running state dataset generated during the execution of the scene interaction operation, the first running state dataset is first read from the state data cache area, and the first environmental visual data, first environmental acoustic text, image channel status record, audio channel status record, and acquisition task configuration record are extracted from the first running state dataset. Then, according to the feedback format in the bidirectional communication link configuration record, the first environmental visual data, first environmental acoustic text, image channel status record, audio channel status record, and acquisition task configuration record are organized into a state feedback message. Subsequently, the state feedback message is written into the outbound state feedback record according to the link session identifier, and the state feedback message is sent to the front-end service terminal through the outbound state feedback record. The state feedback message is used to carry the transmissible representation of the first running state dataset, and the state feedback message has a source correspondence with the first running state dataset, enabling the front-end service terminal to read the running state data generated during the execution of the scene interaction operation by the ontology intelligent agent through the bidirectional communication link.
[0146] Preferably, during continuous transmission on the bidirectional communication link, session consistency verification is performed on the inbound message cache record and the outbound status feedback record based on the link session identifier. The session consistency verification process first reads the task interaction message sequence in the inbound message cache record and the status feedback message sequence in the outbound status feedback record. Then, it determines whether the task interaction message sequence and the status feedback message sequence correspond to the same link session identifier based on the message sequence identifier. When the task interaction message sequence and the status feedback message sequence correspond to the same link session identifier, the initial task interaction text continues to be received and the first running status dataset is fed back. When the task interaction message sequence and the status feedback message sequence do not correspond to the same link session identifier, the inbound message cache record and the outbound status feedback record are relocated based on the link session identifier. Through the above session consistency verification process, the receiving path of the initial task interaction text and the feedback path of the first running status dataset can be kept within the same bidirectional communication link, reducing status feedback confusion between different front-end service terminals.
[0147] Preferably, in one scenario, when the agent loading request message sent by the front-end service terminal contains business category description text for park anomaly monitoring and analysis requests and robot inspection requests, the agent loading request message is first received, and a message parsing operation is performed on the agent loading request message to extract the business category identifier to which the front-end service terminal belongs; then, the business category identifier to which the front-end service terminal belongs is mapped to the agent service runtime container corresponding to the park anomaly monitoring and analysis request and the robot inspection request, and an independent runtime memory space is allocated in the agent service runtime container; subsequently, the agent body is loaded into the independent runtime memory space, and a bidirectional communication link is established between the agent body and the front-end service terminal. After the front-end service terminal sends the initial task interaction text through the bidirectional communication link, the agent body reads the initial task interaction text from the task text cache area and enters the subsequent text slicing operation; after the agent body performs the scene interaction operation to generate the first running status dataset, it feeds back the first running status dataset to the front-end service terminal through the outbound status feedback record, so that the agent loading, task reception and status feedback form a continuous data processing relationship.
[0148] like Figure 3 As shown, this embodiment of the present application provides a self-reflective optimization device for ontology agents oriented towards complex task iteration. The self-reflective optimization device for ontology agents oriented towards complex task iteration includes: The text slicing module is used to perform text slicing operations on the acquired initial task interaction text to obtain multiple initial text fragments; The vector mapping module is used to map the multiple initial text fragments to the embedded vector space respectively, generating a first set of text vectors; The index comparison module is used to perform index comparison operations in the local vector storage space based on the first text vector set to generate a first feature index set; The workflow construction module is used to construct an initial prompt word workflow based on the first feature index set; The first logic generation module is used to input the initial prompt word workflow into a pre-trained large language processing model to generate the first task execution logic; The interactive perception control module is used to control the ontological intelligent agent to perform scene interaction operations according to the first task execution logic, so as to control the environmental perception node to collect the first running state dataset. The state difference calculation module is used to perform a difference calculation operation between the first running state dataset and the preset benchmark constraints to generate a state difference description. The deviation feature extraction module is used to calculate the deviation feature vector based on the state difference description; The workflow optimization module is used to optimize the initial prompt word workflow based on the deviation feature vector to generate an updated prompt word workflow; The iterative execution module is used to input the updated prompt word workflow back into the large language processing model to generate a second task execution logic, so as to control the ontology agent to continue to execute the scene interaction operation according to the second task execution logic.
[0149] like Figure 4 As shown, an electronic device according to an embodiment of this application includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the ontological intelligent agent self-reflection optimization method for complex task iteration as described in any one of the claims of this application.
[0150] This application provides a computer-readable storage medium carrying one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device implements the ontology intelligent agent self-reflection optimization method for complex task iteration as described in any one of this application.
[0151] The above Figures 3-4 For an exemplary description, please refer to the above. Figure 1 This will not be elaborated upon here.
Claims
1. A self-reflective optimization method for ontology-based intelligent agents oriented towards iterative complex tasks, characterized in that, include: Perform text slicing on the acquired initial task interaction text to obtain multiple initial text fragments; The multiple initial text fragments are mapped to the embedded vector space respectively to generate the first text vector set; Based on the first set of text vectors, an index comparison operation is performed in the local vector storage space to generate a first feature index set; Construct an initial prompt word workflow based on the first feature index set; The initial prompt word workflow is input into a pre-trained large language processing model to generate the first task execution logic; The control agent executes scene interaction operations according to the first task execution logic to control the environmental perception node to collect the first running state dataset; Perform a difference calculation operation between the first running state dataset and the preset benchmark constraints to generate a state difference description; Based on the state difference description, the deviation feature vector is calculated; The initial prompt word workflow is optimized based on the deviation feature vector to generate an updated prompt word workflow; The updated prompt word workflow is input again into the large language processing model to generate a second task execution logic, so as to control the ontology agent to continue to execute the scene interaction operation according to the second task execution logic.
2. The ontology-based intelligent agent self-reflection optimization method for complex task iteration as described in claim 1, characterized in that, The step of mapping the plurality of initial text fragments to an embedded vector space to generate a first text vector set includes: Obtain preset slice control parameters, wherein the slice control parameters include a slice overlap length setting value and a recall correlation setting value; Based on the fragment overlap length setting value, perform a boundary overlap recombination operation on the multiple initial text fragments to obtain multiple target recombined fragments; The multiple target recombined fragments are input into a preset semantic embedding network to calculate the multidimensional feature vector corresponding to each target recombined fragment; Calculate the global semantic tensor of the initial task interaction text; Calculate the feature cosine similarity value between each of the multidimensional feature vectors and the global semantic tensor; The feature cosine similarity value is compared with the recall correlation set value, and multidimensional feature vectors whose feature cosine similarity value is less than the recall correlation set value are removed. The remaining multidimensional feature vectors after the elimination operation are combined sequentially to generate the first set of text vectors.
3. The ontology-based intelligent agent self-reflection optimization method for iterative complex tasks according to claim 2, characterized in that, The workflow for constructing initial prompt words based on the first feature index set includes: Extract role definition text features, table structure definition text features, and workflow constraint text features from the first feature index set; The character definition text features are tagged to generate a first control node; The table structure definition text features are formatted to generate a second control node; The workflow constraint text features are subjected to temporal processing to generate a third control node; The first control node, the second control node, and the third control node are associated and arranged according to the preset directed acyclic graph structure to generate the initial prompt word workflow.
4. The ontology-based intelligent agent self-reflection optimization method for complex task iteration as described in claim 1, characterized in that, The control environment sensing node collects a first operating status dataset, including: Activate the multi-channel image sensing nodes and audio acquisition nodes arranged in the target space; The multi-channel image sensing nodes are used to acquire multiple real-time video streams of the target space. The real-time voice dialogue stream of the target space is acquired through the audio acquisition node; Frame extraction is performed on the multiple real-time video streams to obtain the target image sequence; Target recognition processing is performed on the target image sequence to output first environmental visual data; The real-time voice dialogue stream is processed to convert speech to text, and the first ambient acoustic text is output. The first environmental visual data and the first environmental acoustic text are encapsulated to generate the first running state dataset.
5. The ontology-based intelligent agent self-reflection optimization method for complex task iteration as described in claim 1, characterized in that, The step of performing a difference calculation operation between the first running state dataset and preset benchmark constraints to generate a state difference description includes: Extract standard passenger flow statistics and standard path coordinate sequences from the preset baseline constraints; Extract actual passenger flow statistics and actual path coordinate sequences from the first operational status dataset; Calculate the first absolute difference between the standard passenger flow statistics and the actual passenger flow statistics; Calculate the second absolute difference between each coordinate point in the standard path coordinate sequence and the corresponding coordinate point in the actual path coordinate sequence; A two-dimensional data table is constructed using the first absolute difference and multiple second absolute differences, and the two-dimensional data table is used as a description of the state difference.
6. The ontology-based intelligent agent self-reflection optimization method for complex task iteration according to claim 1, characterized in that, The optimization of the initial prompt word workflow based on the deviation feature vector to generate an updated prompt word workflow includes: The deviation feature vector is input into a preset causal inference network to determine the candidate prompt word node identifier that causes the state abnormality; The prompt word node to be replaced is located in the initial prompt word workflow based on the candidate prompt word node identifier; Retrieve the compensation execution logic text for the deviation feature vector from the locally pre-stored business tool instruction set; The compensation execution logic text is used to perform a text overwrite operation on the prompt word node to be replaced, so as to update the initial prompt word workflow to the updated prompt word workflow.
7. The ontology-based intelligent agent self-reflection optimization method for iterative complex tasks according to claim 1, characterized in that, After the updated prompt word workflow is input again into the large language processing model to generate the second task execution logic, the ontology agent self-reflection optimization method for complex task iteration further includes: Extract the hardware resource call request table of the second task execution logic; Determine whether the number of concurrent operations requested by the hardware resource call request table exceeds the preset single-unit execution limit; When the number of concurrent operations exceeds the single-entity execution limit, multiple auxiliary intelligent agent nodes that are in a dormant state are activated according to the hardware resource call request table. The second task execution logic is divided into multiple sub-execution logics; The multiple sub-execution logics are respectively distributed to the main body intelligent agent and the multiple auxiliary intelligent agent nodes to control the main body intelligent agent and the multiple auxiliary intelligent agent nodes to collaboratively execute the scene interaction operation.
8. A self-reflective optimization device for ontological intelligent agents oriented towards iterative complex tasks, characterized in that, The ontology-based intelligent agent self-reflection optimization device for complex task iteration includes: The text slicing module is used to perform text slicing operations on the acquired initial task interaction text to obtain multiple initial text fragments; The vector mapping module is used to map the multiple initial text fragments to the embedded vector space respectively, generating a first set of text vectors; The index comparison module is used to perform index comparison operations in the local vector storage space based on the first text vector set to generate a first feature index set; The workflow construction module is used to construct an initial prompt word workflow based on the first feature index set; The first logic generation module is used to input the initial prompt word workflow into a pre-trained large language processing model to generate the first task execution logic; The interactive perception control module is used to control the ontological intelligent agent to perform scene interaction operations according to the first task execution logic, so as to control the environmental perception node to collect the first running state dataset. The state difference calculation module is used to perform a difference calculation operation between the first running state dataset and the preset benchmark constraints to generate a state difference description. The deviation feature extraction module is used to calculate the deviation feature vector based on the state difference description; The workflow optimization module is used to optimize the initial prompt word workflow based on the deviation feature vector to generate an updated prompt word workflow; The iterative execution module is used to input the updated prompt word workflow back into the large language processing model to generate a second task execution logic, so as to control the ontology agent to continue to execute the scene interaction operation according to the second task execution logic.
9. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the ontological intelligent agent self-reflective optimization method for complex task iteration as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium carries one or more computer programs that, when executed by an electronic device, cause the electronic device to implement the ontological intelligent agent self-reflection optimization method for complex task iteration as described in any one of claims 1 to 7.