Search

CN-121979572-A - Natural language instruction analysis and structured execution method for complex equipment cluster

CN121979572ACN 121979572 ACN121979572 ACN 121979572ACN-121979572-A

Abstract

The invention relates to the technical field of intelligent control and the Internet of things, and discloses a natural language instruction analysis and structuring execution method for complex equipment clusters, which comprises the steps of cleaning and space mapping original data of the equipment clusters, and constructing an equipment semantic vector index; the method comprises the steps of analyzing a natural language instruction into a structured intermediate instruction by using a large language model, searching candidate equipment through a multi-level similarity matching and threshold screening mechanism, carrying out conflict resolution and disambiguation by combining batch processing identifiers, determining target equipment, generating and issuing a structured control instruction based on equipment attributes, and carrying out consistency verification by using execution feedback. The invention solves the problems of space ambiguity and object confusion in complex scenes through a multidimensional semantic alignment and cascade retrieval mechanism, realizes the accurate analysis of unstructured instructions and the closed-loop verification of physical control, and ensures the accuracy and reliability of operation.

Inventors

  • PING YIWEI
  • Jia Zhengmiao
  • GONG SHUNMING
  • YANG HECHENG
  • ZHOU XIN
  • BAI JIE
  • WEI JINBO
  • LI RIYAN

Assignees

  • 中国建筑第八工程局有限公司

Dates

Publication Date
20260505
Application Date
20251222

Claims (10)

  1. 1. The natural language instruction analysis and structuring execution method for the complex equipment cluster is characterized by comprising the following steps of: s1, preprocessing complex equipment data and a hierarchical structure, namely defining standardized metadata fields, acquiring original data of equipment clusters, cleaning, fusing and normalizing the original data, and generating standardized equipment metadata; S2, constructing a device semantic vector space, namely generating a multi-dimensional natural language description text based on the standardized device metadata, converting the natural language description text into a high-dimensional semantic vector by utilizing an embedded model, and constructing a device semantic vector index; S4, user natural language instruction intention analysis, namely receiving a natural language instruction input by a user, and analyzing the natural language instruction into a structured intermediate instruction containing target description and position description by utilizing a large language model in combination with semantic information in metadata of standardized equipment; s5, multi-dimensional vectorization of a target object, namely respectively vectorizing the position description and the target description in the structured intermediate instruction by using the embedded model which is the same as that in the step S2, and generating an instruction query vector; S6, performing multi-level similarity matching and screening on the instruction query vector and the device semantic vector index to output a candidate device set; S7, performing multi-target conflict resolution and disambiguation processing, namely performing conflict detection on the candidate equipment set, performing disambiguation judgment by using a large language model according to the batch processing identification, and outputting the determined target equipment; S8, generating a structured executable control instruction, namely inquiring the determined attribute parameter definition of the target equipment to generate the structured executable control instruction comprising equipment identification, action type and parameter value; And S9, issuing the structured executable control instruction to physical equipment for execution, acquiring an execution feedback result, and verifying the consistency of the execution feedback result and instruction expectation.
  2. 2. The method for performing natural language instruction parsing and structuring execution for complex device clusters according to claim 1, wherein in step S1, the cleaning, fusing and normalizing the raw data specifically includes: Analyzing space geometric information in a building drawing or a BIM model, judging whether physical coordinate points of equipment are contained in a predefined regional polygon or not by using a calculation geometric algorithm, and mapping the physical coordinates to a standard hierarchical structure; based on a preset synonym library or a rule engine, carrying out semantic expansion on the equipment name to generate an alias list; writing the standard hierarchy and the alias list to the standardized device metadata.
  3. 3. The method for analyzing and structuring a complex device cluster-oriented natural language instruction according to claim 1, wherein in step S2, the generating a multi-dimensional natural language description text and constructing a device semantic vector index specifically includes: substituting the device name, the attribute parameter and the hierarchical relation in the standardized device metadata into a main text template, and generating a main text vector through a semantic embedding model; substituting the area where the standardized equipment metadata is located and the installation position field into a position template, and generating a first position description vector and a second position description vector through a semantic embedding model; Substituting the device names and the alias lists in the standardized device metadata into an object template, and generating a device object definition vector through a semantic embedding model; Inputting the standardized equipment metadata as a prompt word into a large language model, generating enhanced natural language description, and converting the enhanced natural language description into an enhanced description vector; The primary text vector, the first location description vector, the second location description vector, the device object definition vector, and the enhancement description vector are collectively constructed as the device semantic vector index.
  4. 4. The method according to claim 3, wherein the instruction query vectors include a full-scale query vector, a location query vector, and an object query vector, and the multi-level similarity matching and filtering includes performing a one-level global semantic search in step S6: Calculating weighted similarity between the full query vector and the main text vector and the enhanced description vector; calculating a first matching score by adopting a first-stage matching score formula; and screening the first matching score according to a first threshold value to obtain a first candidate set.
  5. 5. The complex device cluster-oriented natural language instruction parsing and structuring execution method according to claim 4, wherein in step S6, the multi-level similarity matching and filtering further comprises performing a two-level spatial constraint matching based on the first candidate set: Verifying spatial attributes of a device using the location query vector within the range of the first candidate set; calculating weighted similarity between the position query vector and the first position description vector and the second position description vector by adopting a second-stage matching score formula to obtain a second matching score; and screening the second matching score according to a second threshold value, and obtaining a second candidate set from the first candidate set.
  6. 6. The complex device cluster-oriented natural language instruction parsing and structuring execution method according to claim 5, wherein in step S5, the multi-level similarity matching and filtering further comprises performing three-level object validation matching based on the second candidate set: Verifying the ontology attribute of the device by using the object query vector in the range of the second candidate set; Calculating the similarity between the object query vector and the equipment object definition vector by adopting a third-level matching score formula to obtain a third matching score; Screening the third matching score according to a third threshold value, and obtaining a final candidate set from the second candidate set; determining the final candidate set as the candidate device set in step S6; Wherein the first, second, and third thresholds satisfy an increasing constraint relationship.
  7. 7. The method according to claim 1, wherein in step S4, the structured middle instruction includes a list of control intention units, the control intention units including: A partial query description field configured to store a text segment in the original input of the user that is directly related to the current instruction logic; a batch processing identification field configured to identify whether a current instruction is batch operated for a group of devices; A full-scale object description field configured to store a complete semantic description containing a location modifier and an object name; A location description field configured to store a spatial location modifier extracted from an instruction; a target object description field configured to store a device ontology reference extracted from an instruction; in step S5, the vectorizing processing using the embedded model specifically includes: and respectively vectorizing the full target description field, the position description field and the target object description field to generate a full query vector, a position query vector and an object query vector, and combining the full query vector, the position query vector and the object query vector into the instruction query vector.
  8. 8. The method for performing natural language instruction parsing and structuring execution for complex device clusters according to claim 7, wherein in step S7, the performing disambiguation judgment using a large language model specifically comprises: Constructing a decision prompt word containing the candidate equipment set, the batch processing identification field and the partial query description field; Inputting the decision prompt word into a large language model for logic judgment; screening out all devices conforming to the semantic logic of the partial query description field if the batch processing identification field is true; If the batch processing identification field is false, identifying the unique device with the best matching semantic meaning or outputting an ambiguity mark when the device cannot be distinguished; and taking the screened or identified device as the determined target device in the step S7.
  9. 9. The method for analyzing and structuring a natural language command for a complex device cluster according to claim 1, wherein step S8 specifically comprises adopting a dual-path command generation mechanism: for a direct control task of a single device, the large language model directly generates the structured executable control instruction according to the attribute parameter definition; For batch equipment or control tasks with complex logic, the large language model generates intermediate Python executing codes; and the Python executing code is submitted to a locally isolated code sandbox for interpretation and execution, and a final batch instruction list is generated as the structured executable control instruction.
  10. 10. The method for analyzing and structuring execution of natural language instructions for a complex device cluster according to claim 1, wherein step S9 specifically comprises: Receiving execution state feedback returned by the physical equipment; Combining the execution state feedback with the original issued structured executable control instruction, and inputting a large language model for consistency verification; If the judging results are inconsistent, the large language model generates a retry instruction or generates an error description text according to the error code analysis reason.

Description

Natural language instruction analysis and structured execution method for complex equipment cluster Technical Field The invention relates to the technical field of intelligent control and the Internet of things, in particular to a natural language instruction analysis and structuring execution method for complex equipment clusters. Background With the development of building automation, industrial internet and urban internet of things systems, the equipment scale in scenes such as large buildings, industrial parks and energy station houses is exponentially increased. These devices typically have multiple hierarchies, complex spatial layouts, and highly diverse operational attributes. In order to reduce the threshold of operation and maintenance management and improve interaction efficiency, a large language model is utilized to process natural language instructions so as to control physical equipment to become a current technical trend. However, applying natural language interactions in an actual physical device control scenario still faces multiple technical challenges. First, there is a semantic gap between the heterogeneity of device data and the randomness of user expressions. In real-world systems, the background identification of the device often employs specific coding rules, and the user's natural language instructions often contain spoken descriptions, aliases, or ambiguous spatial designations. The existing technical means based on rule matching or keyword retrieval is difficult to process complicated semantic mapping and hierarchical omission, so that the adaptation capability of a system is poor and the retrieval accuracy is low when facing equipment of different manufacturers or different naming standards. Second, conventional retrieval methods lack deep understanding of spatial geometry information and logic levels in the face of clusters of devices with complex spatial topologies. When a user instruction relates to fuzzy azimuth description or batch operation is required to be carried out on equipment in a specific area, the prior art is difficult to realize accurate positioning and disambiguation processing in a large number of equipment, and error control or operation omission is easy to cause due to target object identification errors. In addition, the generation mechanism of the large language model has a probabilistic characteristic in nature, and non-deterministic output or calculation deviation is easy to generate by directly utilizing the generation mechanism of the large language model for instruction reasoning. The existing solution often lacks a full-flow structure verification mechanism from intention analysis, instruction generation to feedback execution, is difficult to ensure the safety and traceability of a control process, and cannot meet the strict requirements of industrial scenes on the control certainty of physical equipment. Disclosure of Invention Aiming at the defects that complex equipment cluster data are heterogeneous, space orientation in natural language instructions is fuzzy, multi-target control logic is easy to generate ambiguity and execution feedback verification is lacked in the prior art, the invention provides a natural language instruction analysis and structuring execution method for complex equipment clusters, and aims to solve the problems that an unstructured natural language instruction is difficult to accurately understand by a traditional control method and retrieval accuracy is low in a large-scale equipment environment. In order to achieve the above purpose, the invention is realized by the following technical scheme: A natural language instruction analysis and structuring execution method for complex equipment clusters comprises the steps of preprocessing complex equipment data and a hierarchical structure, defining standardized metadata fields, obtaining original data of the equipment clusters, cleaning, fusing and normalizing the original data to generate standardized equipment metadata, constructing an equipment semantic vector space, generating a multi-dimensional natural language description text based on the standardized equipment metadata, converting the natural language description text into a high-dimensional semantic vector by utilizing an embedded model to construct an equipment semantic vector index, executing user natural language instruction intention analysis, receiving natural language instructions input by a user, combining semantic information in the standardized equipment metadata, analyzing the natural language instructions into structured intermediate instructions comprising target description, position description and batch processing identification by utilizing a large language model, performing multi-dimensional vectorization of target objects, performing vectorization processing on the position description and the target description in the structured intermediate instructions by utilizing the embedded model to generate a