A Multi-Protocol Building Equipment Automation Control Method and System Based on AI
By constructing a capability abstract model for building equipment and using a large AI model for semantic reasoning, the problem of separating control logic for multi-protocol devices is solved, enabling efficient and flexible automated control and adaptive optimization.
Patent Information
- Application Number
- CN202611438074.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-11-17
AI Technical Summary
The lack of a unified abstraction layer for multi-protocol devices in existing building automation systems means that control logic needs to be written separately for different protocols. Automation rules rely on manual configuration, which is inefficient and difficult to adjust flexibly. Static rule engines cannot adaptively optimize.
An AI-based multi-protocol building equipment automation control method is constructed. By building a capability abstract model for each device, using a large AI model for semantic reasoning to generate control intentions, and automatically matching and executing the action item list, unified control of cross-protocol devices is achieved.
It reduces the development difficulty and maintenance cost of multi-protocol device control, improves the efficiency and accuracy of rule generation, and realizes adaptive optimization and unified control execution across protocol devices.
Smart Images

Figure CN123113567A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of equipment control technology, specifically to an AI-based multi-protocol building equipment automation control method and system. Background Technology
[0002] With the rapid development of IoT technology, the number and types of devices in building automation systems are increasing day by day. These devices often operate based on different communication protocols, including Matter, KNX, Modbus, BACnet, and Zigbee. In order to achieve coordinated linkage and unified management among subsystems such as lighting, HVAC, and security in buildings, it is necessary to build an automated control method that is compatible with devices using multiple protocols, so as to reduce the complexity of system integration and improve overall operating efficiency.
[0003] Currently, existing methods typically involve engineers writing device control logic for each communication protocol and manually configuring the linkage conditions and actions between devices one by one based on fixed rule tables or script files, forming a static set of automated rules. When new devices need to be added or scenarios need to be modified, engineers need to rewrite or adjust the corresponding rule configurations and manually encapsulate the control commands according to the message format specified by each protocol before sending them to the corresponding gateway. The data models of devices with different protocols vary greatly and lack a unified abstraction layer, which means that device control logic needs to be written separately for different protocols; automation rules rely on manual configuration one by one, which is inefficient and difficult to adjust flexibly in multi-device scenarios; static rule engines cannot adaptively optimize based on the actual user behavior, and the system lacks self-learning and self-optimization capabilities. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the present invention aims to provide an AI-based multi-protocol building equipment automation control method and system, thereby solving the technical problems in the prior art where the lack of a unified abstraction layer for multi-protocol devices leads to the need to write control logic separately for different protocols, automation rules rely on manual configuration of each rule which is inefficient and difficult to adjust flexibly, and static rule engines cannot adaptively optimize based on actual user behavior.
[0005] This invention provides an AI-based multi-protocol building equipment automation control method, comprising: Model construction steps: Obtain equipment information for multi-protocol building equipment, extract capability features from the equipment information, and construct a capability abstract model for each building equipment based on the capability features; the capability abstract model includes protocol bindings and mapping tables for each building equipment; Intent resolution steps: Obtain environmental context information and user request; extract device capability summary from the capability abstract model based on the user request; perform semantic reasoning on the environmental context information, user request, and device capability summary through AI big data model to generate control intent; Intent matching step: Match the control intent with the capability abstract model to determine the target building equipment; generate an action item list based on the target building equipment and the action description in the control intent; and generate automation rules based on the action item list. Rule execution steps: Obtain the trigger event; if the trigger event matches the automation rule, extract the action item list from the automation rule; extract the protocol binding and mapping table from the capability abstract model based on the action item list; and encode the abstract actions in the action item list into target protocol messages based on the protocol binding and the mapping table and send them down for execution.
[0006] By constructing a capability abstract model containing protocol bindings and mapping tables for each building device, the control logic of devices with different protocols is uniformly abstracted into capability characteristics, so that all subsequent control operations are based on this unified model. This eliminates the differences in data models between different protocols, and developers do not need to write control logic separately for each protocol, which greatly reduces the development difficulty and maintenance cost of multi-protocol building device control. By using large AI models to perform semantic reasoning on environmental context information, user requests, and device capability summaries to generate control intentions, users can express their needs in a scenario without needing to master professional control knowledge, simply through natural language or simple operations, thus reducing the technical threshold for rule configuration. By matching control intent with capability abstraction model to determine target building equipment and generating action item list and automation rules, the fully automated conversion from user intent to executable rules is realized, eliminating the need for manual configuration of linkage logic item by item and improving rule generation efficiency. By extracting protocol bindings and mapping tables from the capability abstract model during rule execution, encoding abstract actions into target protocol messages, and sending them out for execution, the same automation rule can be automatically adapted to the corresponding protocol message format according to the actual protocol type of the target device, thus realizing unified control execution across protocol devices.
[0007] In some embodiments of the present invention, the model construction step specifically includes: The protocol configuration information and executable actions of each building device are extracted from the device data to obtain the capability characteristics. Based on a preset capability template, the protocol configuration information in the capability features is mapped to a protocol binding, and the executable actions in the capability features are mapped to a mapping table. The capability abstract model is generated by combining the protocol binding and the mapping table.
[0008] By extracting protocol configuration information and executable actions from device data as capability features, and mapping them to protocol bindings and mapping tables based on preset capability templates, the construction process of the capability abstraction model has standardized data sources and mapping rules. This ensures that the capability description format of devices from different manufacturers and with different protocols is uniform and can be automatically parsed by the system, thereby improving the standardization and automation of model construction.
[0009] In some embodiments of the present invention, the intent parsing step specifically includes: Obtain the user's input scenario requirements, and standardize the scenario requirements to obtain the user request; Detect the online status of equipment in each building and obtain a preset event directory; The user request, the device online status, the preset event directory, the device capability summary, and the environmental context are input into the AI big model; The AI big model performs semantic reasoning based on the capability abstract model as constraints to generate the control intent.
[0010] By inputting user requests, device online status, preset event catalog, device capability summary, and environmental context into the AI big model, and using the capability abstract model as a constraint to generate control intentions through semantic reasoning, the output of the AI big model is limited to the executable range defined by the capability abstract model. This not only utilizes the semantic understanding capabilities of AI, but also avoids the model generating invalid control intentions that are unexecutable or exceed the device's capabilities.
[0011] In some embodiments of the present invention, the intent matching step specifically includes: The target building equipment is obtained by matching the target selector in the control intent with the capability abstract model; Based on the target building equipment, the action description in the control intent is converted into the action item list; The trigger conditions in the control intent are matched with the preset event directory to obtain the trigger; Based on the environmental context information and the constraint hints in the control intent, a precondition expression is generated; The automation rule is generated by combining the action item list, the trigger, and the precondition expression.
[0012] By matching and transforming the target selector, action description, triggering condition, and constraint hints in the control intent with the capability abstract model, preset event catalog, and environmental context, a structured list of action items, triggers, and precondition expressions are generated. This achieves a complete transformation link from natural language scenario requirements to executable automated rules, eliminating the need for manual configuration of each linkage logic and significantly improving rule generation efficiency.
[0013] In some embodiments of the present invention, the rule execution step specifically includes: The event is listened to by an event listener to obtain an event object, and the event object is matched with the trigger in the automation rule. If the event object matches the trigger and satisfies the precondition expression, then the action item list is extracted from the automation rule, and an abstract action is generated based on the action item list.
[0014] By listening for triggered events through event listeners and matching event objects with triggers in automation rules, the list of action items is extracted and abstract actions are generated only when the event object matches the trigger and the precondition expression is satisfied. This gives the rule execution condition awareness, avoids the rule being triggered erroneously under unsuitable environmental or time conditions, and improves the accuracy and safety of automated control.
[0015] In some embodiments of the present invention, the rule execution step further includes: Iterate through each action item in the action item list and extract the protocol binding of the target building equipment corresponding to each action item from the capability abstract model; Based on the protocol binding, the corresponding mapping entry is retrieved from the mapping table, and the abstract action is encoded into the target protocol message based on the mapping entry.
[0016] By traversing each action item in the action item list, the protocol binding of the target device corresponding to each action item is extracted from the capability abstract model, and the mapping entries in the mapping table are queried to encode the abstract action into the target protocol message. This enables the same abstract action to be automatically adapted to the corresponding protocol message format according to the actual protocol type of the target device, realizing unified control execution across protocol devices without having to write execution logic separately for different protocol devices.
[0017] In some embodiments of the present invention, the method further includes: Feedback optimization steps: Obtain the user's manual adjustment record after the target protocol message is executed, calculate the deviation vector based on the manual adjustment record, generate optimization parameters based on the deviation vector, and update the automation rule based on the optimization parameters.
[0018] By acquiring the user's manual adjustment records after the execution of the target protocol message and calculating the deviation vector to generate optimization parameters to update the automation rules, the system can learn preferences from the user's actual operation behavior and automatically adjust the rule parameters, realizing adaptive optimization of the control strategy. The system behavior can gradually approach the user's usage habits without manual intervention.
[0019] In some embodiments of the present invention, the feedback optimization step specifically includes: Calculate the deviation vector based on the parameter types in the manual adjustment record; The number of manual adjustment records corresponding to the same action item under the unified automation rules is counted, and the average deviation is calculated based on the deviation vector. If the number of times exceeds the number threshold and the average deviation exceeds the deviation threshold, the optimization parameters are generated based on the deviation vector.
[0020] By calculating the deviation vector based on the parameter types in the manual adjustment records and statistically analyzing the number of adjustments and the average deviation for the same action item under the same automated rule, optimization parameters are generated only when both the number of adjustments and the average deviation exceed the threshold. This ensures that rule optimization is triggered by stable and consistent user preferences, avoids unreasonable impacts of single accidental operations on the rules, and improves the reliability of self-learning.
[0021] In some embodiments of the present invention, the method further includes: Cache establishment steps: Obtain the draft scenario rules generated by the AI big model when generating the control intent, and obtain the execution instance generated after the target protocol message is executed; Multiple types of fields are extracted from the scenario rule draft, the execution case and the automation rule, and the multiple types of fields are vectorized to obtain a comprehensive scenario vector. The comprehensive scenario vector is then stored in a vector index library. The search results are obtained by retrieving historical records through the vector index library and used as reference information when the AI big model generates the control intent.
[0022] By extracting multiple types of fields from scenario rule drafts, execution instances, and automation rules and vectorizing them to obtain a comprehensive scenario vector, which is then stored in a vector index library, historical scenarios and rules can be stored and retrieved in a structured vector form. The historical records retrieved through the vector index library can then be used as reference information when the AI large model generates control intentions, thus realizing the reuse of historical experience and improving the accuracy and efficiency of control intention generation.
[0023] Some embodiments of the present invention further provide an AI-based multi-protocol building equipment automation control system, comprising: The model building module acquires equipment information for multi-protocol building devices, extracts capability features from the equipment information, and builds a capability abstract model for each building device based on the capability features; the capability abstract model includes protocol bindings and mapping tables for each building device; The intent parsing module obtains environmental context information and user requests, extracts device capability summaries from the capability abstract model based on the user requests, and performs semantic reasoning on the environmental context information, user requests, and device capability summaries using an AI big data model to generate control intents. The intent matching module matches the control intent with the capability abstract model to determine the target building equipment. Based on the target building equipment and the action description in the control intent, it generates a list of action items and generates automation rules based on the list of action items. The rule execution module obtains a trigger event. If the trigger event matches the automation rule, it extracts the action item list from the automation rule, extracts the protocol binding and mapping table from the capability abstract model based on the action item list, and encodes the abstract actions in the action item list into target protocol messages based on the protocol binding and the mapping table and sends them down for execution.
[0024] By setting up a model building module, an intent parsing module, an intent matching module, and a rule execution module, a complete process is executed, including building a capability abstract model, generating control intents through AI semantic reasoning, converting control intents into automated rules, and encoding and issuing protocol messages for execution. This forms a full-link automated control system architecture that goes from device abstraction to intent understanding to rule execution. The modules are connected through standardized data structures, achieving a high degree of automation and intelligence in the control of multi-protocol building equipment. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 A flowchart illustrating an AI-based multi-protocol building equipment automation control method provided in this embodiment of the invention; Figure 2 A flowchart of a model construction step provided in an embodiment of the present invention; Figure 3 A flowchart of an intent parsing step provided in an embodiment of the present invention; Figure 4 A flowchart of an intent matching step provided in an embodiment of the present invention; Figure 5 A flowchart of rule execution steps provided in an embodiment of the present invention; Figure 6 A flowchart of a feedback optimization step provided in an embodiment of the present invention; Figure 7 This is a structural diagram of an AI-based multi-protocol building equipment automation control system provided in an embodiment of the present invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0028] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations according to this application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. Furthermore, it should be understood that the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or apparatus.
[0029] With the rapid development of IoT technology, the number and types of devices in building automation systems are increasing day by day. These devices often come from different manufacturers and operate based on different communication protocols, including Matter, KNX, Modbus, BACnet, and Zigbee. In the field of intelligent buildings and building automation, achieving coordinated linkage and unified management among numerous subsystems such as lighting systems, HVAC systems, security systems, and curtain control systems has become an important technical problem that urgently needs to be solved. Therefore, it is necessary to build an automated control method that can be compatible with multi-protocol devices to reduce the complexity of system integration and improve the overall operating efficiency and management level of the building. Existing building automation systems generally use rule definition methods based on manual configuration to achieve equipment control. Engineers need to write equipment control logic for each communication protocol. For example, the Matter protocol uses a cluster command attribute model, the KNX protocol uses a group address communication model, and the Modbus protocol uses a register read / write model. Engineers need to write corresponding control programs according to the data format and communication mechanism specified by each protocol. When it is necessary to achieve linkage control between devices across protocols, engineers also need to manually configure the trigger conditions and execution actions between each device, and write these linkage logics into a static set of automation rules through fixed rule tables or script files; When new equipment needs to be added to a building or existing scenarios need to be modified, engineers need to rewrite or adjust the corresponding rule configurations and manually encapsulate the control commands according to the message format specified by each protocol before sending them to the corresponding protocol gateway. The gateway will then forward the control commands to the target device for execution. However, the above-mentioned existing technical solutions have many technical defects in practical applications. Due to the significant differences in device data models of different protocols, developers must write different control logic for each protocol, which makes it impossible to achieve cross-protocol reuse, resulting in high development threshold and huge maintenance costs in the later stage. The creation of automated rules relies entirely on manual configuration of each rule. As the types and number of devices in a building continue to increase, the configuration process becomes extremely complex and time-consuming. For example, in a typical scenario where a meeting room is automatically prepared after booking, it is necessary to manually configure the linkage rules of multiple devices such as lights, curtains, air conditioners, and projectors, involving dozens of parameter settings. Traditional rule engines can only execute predefined static rules. They cannot automatically adjust parameters according to users' actual usage habits, nor can they learn from user feedback and improve rules. For example, user actions such as manually adjusting air conditioning temperature or light brightness cannot be captured by the system and used for rule optimization. The collaborative control of multi-protocol devices requires the deployment of independent gateways and controllers for each protocol, resulting in a bloated and complex system architecture, high response latency, and difficulty in achieving real-time linkage across protocol scenarios. Furthermore, the format and content of control messages need to be manually written for each device protocol, making it impossible to automatically generate control messages that conform to standard protocol specifications. This further increases the difficulty of system integration and the risk of errors. The existence of these problems seriously affects the deployment efficiency, user experience, and overall intelligence level of building automation systems. Therefore, there is an urgent need for a control mechanism that can support unified modeling and automated rule generation for multi-protocol devices, while also possessing self-learning and self-optimization capabilities, in order to reduce manual configuration costs and improve the system's adaptability.
[0030] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0031] The technical solution of the present invention will be described in detail below with reference to specific embodiments and accompanying drawings.
[0032] like Figure 1 As shown, this invention provides an AI-based multi-protocol building equipment automation control method, comprising: Model building step S1: Obtain equipment information for multi-protocol building equipment, extract capability features from the equipment information, and build a capability abstract model for each building equipment based on the capability features; the capability abstract model includes the protocol binding and mapping table for each building equipment; In some embodiments, model construction step S1 specifically includes: The capability characteristics are obtained by extracting the protocol configuration information and executable actions of each building device from the device data; Based on the preset capability template, the protocol configuration information in the capability features is mapped to the protocol binding, and the executable actions in the capability features are mapped to the mapping table. The capability abstract model is generated by combining the protocol binding and the mapping table.
[0033] By extracting protocol configuration information and executable actions from device data as capability features, and mapping them to protocol bindings and mapping tables based on preset capability templates, the construction process of the capability abstraction model has standardized data sources and mapping rules. This ensures that the capability description format of devices from different manufacturers and with different protocols is uniform and can be automatically parsed by the system, thereby improving the standardization and automation of model construction.
[0034] Furthermore, such as Figure 2 As shown, the equipment information includes one or more of the following: building equipment access list, engineering point list, equipment manual, protocol description file, and gateway discovery results; First, the input device data is normalized, and key fields are extracted. These key fields include Device_Instance_ID, Space_ID, Device_Type, Function_Name, Parameter_Name, State_Name, Operation_Name, Protocol_Profile_ID, Endpoint_ID, Address_Path, Unit, Value_Range, and Access_Mode. Among them, Device_Instance_ID identifies the physical device or gateway virtual point, derived from the building device access list or gateway discovery results; Space_ID identifies the spatial location of the device, derived from the engineering point table or building space configuration file; Device_Type identifies the type of device, derived from the device manual or engineering point table; Function_Name identifies the function provided by the device, derived from the device manual; Parameter_Name and State_Name identify the readable and writable parameters and readable states of the device, derived from the engineering point table or protocol description file; Operation_Name identifies the operations that the device can perform, derived from the device manual or protocol description file; Protocol_P... `rofile_ID` identifies standard protocol families and their versions such as Matter, KNX, Modbus, and BACnet, and is derived from the protocol description file or gateway discovery results; `Endpoint_ID` identifies the protocol endpoint, group address, register area, or object instance, and is derived from the protocol description file or engineering point table; `Address_Path` identifies the specific address of the device in the protocol, and is derived from the engineering point table or gateway discovery results; `Unit` and `Value_Range` identify the physical unit and value range of the parameter or status, and are derived from the device manual or engineering point table; `Access_Mode` identifies the read / write attribute of the parameter or status, and is derived from the protocol description file or engineering point table, with values including `read`, `write`, and `read_write`; if unknown, manual confirmation is allowed before reading and writing by default. The extracted fields are then mapped to a capability abstract model Capability_Object={Capability_ID,Device_Instance_ID,Space_ID,Capability_Type,State_Set,Action_Set,Constraint_Set,Protocol_Binding,Mapping_Table,Version} according to the capability contract template, and the capability abstract models of each building device are stored as a capability model library. The Capability_ID is generated by combining or hashing the Building_ID, Space_ID, Device_Instance_ID, and Capability_Type. The Building_ID is the building identifier, which comes from the building equipment list, project configuration file, or building management platform. If a single project corresponds to only one building, a default Building_ID can be generated during system initialization. Device type (Device_Type) and function name (Function_Name) are mapped to capability type (Capability_Type) via a type dictionary, including types such as Lighting, HVAC, Curtain, Projector, Sensor, and Switch; State name (State_Name) and parameter name (Parameter_Name) are mapped to state set (State_Set), retaining data types such as numeric, enumerated, and boolean, unit (Unit), value range (Value_Range), resolution, read / write attributes, and default values; Operation name (Operation_Name) is mapped to action set (Action_Set), recording input parameters and execution... The pre-state, post-execution state, and whether readback confirmation is required; parameter range, interlocking conditions, power consumption limit, security boundary, and device mutual exclusion relationship are mapped to the constraint set Constraint_Set; protocol configuration identifier Protocol_Profile_ID, endpoint identifier Endpoint_ID, and address path Address_Path are mapped to action-level or state-level mapping items in the mapping table Mapping_Table; Version is the capability object version number, initially set to 1.0; the version number is incremented when State_Set, Action_Set, Constraint_Set, Protocol_Binding, or Mapping_Table changes, and historical versions are retained for rule compatibility verification.
[0035] The State_Set records the states in which the device can be read or written. Each State_Item includes the State_Name, Data_Type, Unit, Value_Range, Enum_Domain, Default_Value, Access_Mode, and Readback_Path. Enum_Domain is the enumeration value range, which comes from the enumeration value description in the equipment manual, protocol template library or engineering point table; if no data is provided, candidate enumerations are filled in according to the equipment type template, and if it is still impossible to determine, leave it blank and require manual confirmation. Default_Value is the default value, which comes from the device manual, building policy template, or administrator configuration; if it does not exist, leave it blank, and this field should not be relied upon as a mandatory parameter when generating rules. Data types Data_Type include at least numeric, enum, boolean, and string types; for example, lighting capabilities include power:boolean, brightness:numeric[0,100]%, color_temp:numeric[2700,6500]K; air conditioning capabilities include power:boolean, mode:enum{cool,heat,fan,auto}, setpoint_temp:numeric[16,30]℃; The Readback_Path is derived from the device manual, protocol template library, engineering point table, or gateway discovery results; if it does not exist, the Ack_Rule uses Immediate_Ack or Delayed_Verify, and the status closed-loop readback is not performed. The Action_Set records the executable actions of the device. Each Action_Item includes the Action_Name, Input_Schema, Pre_State_Requirement, Post_State_Effect, Idempotent_Flag, and Ack_Mode; for example, turn_on(), turn_off(), set_brightness(level), set_temperature(temp), set_mode(mode), and set_position(pos); the action parameters must be able to be mapped to the state or protocol command fields in the State_Set. The input parameter schema (Input_Schema) is generated based on Operation_Name, Parameter_Name, Data_Type, Unit, Value_Range, and Enum_Domain. For example, the Input_Schema for set_brightness(level) is level:numeric[0,100]%; The Pre_State_Requirement and Post_State_Effect parameters are derived from the device manual, action template, or Constraint_Set. For example, the requirement before setting brightness is power=on, and the requirement after setting brightness is brightness=level. If no information is provided, these parameters can be left blank. The idempotent flag `Idempotent_Flag` indicates whether repeated execution of an action produces additional side effects, and is derived from the protocol template library or the default rules for the action type; `set_temperature` is usually true, while `toggle` type actions are usually false. The Ack_Mode indicates the action confirmation method, which is derived from the protocol template library or device manual. The values include Immediate_Ack, Readback_Match, and Delayed_Verify; if not specified, the default is Immediate_Ack.
[0036] Action parameters must be able to map to state or protocol command fields in the State_Set. The Constraint_Set={Device_Instance_ID,Protocol_Profile_ID,Endpoint_ID,Gateway_ID,Active_Flag,Priority,Health_State} records operation restrictions and rule constraints, including range constraints, dependency constraints, mutual exclusion constraints, security constraints, rate constraints, and priority constraints; for example, power should be on before setting brightness; air conditioner setpoint_temp must not exceed [16℃,30℃]; mode cannot be both cool and heat at the same time; fire protection linkage and security linkage have higher priority than user preferences and energy-saving strategies. Among them, the range constraint is generated by State_Set.Value_Range, the parameter range of the equipment manual, the upper and lower limits of the engineering point table or the building policy threshold. For example, setpoint_temp:16-30 generates setpoint_temp which must not exceed 16℃ to 30℃. Dependency constraints are generated from interlocking conditions in the device manual, Action_Set.Pre_State_Requirement, or action templates. For example, "the device must be powered on before temperature can be adjusted" generates power=on->set_temperature. Mutual exclusion constraints are generated by enumerating the mutual exclusion values of states, device operating mode descriptions, or building policies. For example, an air conditioner's mode cannot be both "cool" and "heat" at the same time. Safety constraints are generated by safety boundaries, fire alarm linkage, security strategies, and equipment protection conditions. For example, when fire_alarm=true, emergency lighting is prohibited from being turned off. The power consumption limit constraint is generated by the device's rated power, the loop power limit, and the configuration of the energy management system or administrator. For example, the total power of devices in the same loop must not exceed P_max. Rate constraints are generated from device protection requirements or protocol templates; for example, motor-driven curtains require an interval of T seconds between continuous opening and closing. Priority constraints are generated from a global policy table, such as fire alarm linkage > security policy > manual operation > automation rules > energy-saving rules. Protocol_Binding includes Device_Instance_ID, Protocol_Profile_ID, Endpoint_ID, Gateway_ID, Active_Flag, Priority, and Health_State. The Gateway ID, derived from the gateway discovery results or the gateway registry, is used to identify the gateway that executes the protocol messages. The Active_Flag is initially set to true, and becomes false when the gateway is offline, the device is unbound, or the administrator disables it. Priority is derived from administrator configuration, protocol path type, or system default value, with a default value of 1; Health_State is derived from network heartbeats, online device detection, and recent execution results, and its values include normal, degraded, and fault. The same device can have multiple protocol bindings. For example, a physical device may be exposed simultaneously via the native protocol and the gateway bridging protocol. The system selects the currently valid binding based on the active flag Active_Flag, priority, and health status Health_State. When multiple protocol bindings exist for the same target device Target_Device_ID, the system executes a protocol path selection algorithm. First, it filters protocol bindings with an active flag (Active_Flag) that is false or a health status (Health_State) that is faulty. Second, it filters by matching the protocol configuration identifier (Protocol_Profile_ID) with the protocol families supported by the mapping entry (MapEntry). Finally, it calculates the path score based on priority, gateway load (Gateway_Load), last acknowledgment delay (Last_Ack_Latency), and security level (Security_Level). Among them, Gateway_Load is the current load of the gateway, which comes from the gateway's running status report, such as CPU usage, queue length, or number of messages to be sent; The most recent acknowledgment delay (Last_Ack_Latency) is the delay of the most recent protocol acknowledgment, derived from the Execution_Record statistics. The Security Level (Security_Level) is the security level of the protocol path, which is derived from the protocol type, encryption and authentication capabilities, and administrator configuration. The path score (Binding_Score) is calculated as follows: Binding_Score=Priority Wp+Health_Score Wh+Security_Level Ws-Gateway_Load Wg-Last_Ack_Latency Wl; Health_Score is obtained by mapping Health_State, for example, normal=1, degraded=0.5, fault=0; The system selects the protocol binding with the highest path score as the current execution path. When the highest-scoring path fails to execute and the number of retries (Retry_Count) reaches the threshold, the system selects the next candidate binding and re-queries the mapping entry (MapEntry). This allows the same capability action to switch between native protocols, gateway bridging protocols, or redundant links without having to regenerate the automation rule (Rule). The mapping table (Mapping_Table) consists of multiple mapping entries (MapEntry). Each mapping entry (MapEntry) includes the mapping identifier (Map_ID), device instance identifier (Device_Instance_ID), capability identifier (Capability_ID), member type (Member_Type), member name (Member_Name), protocol configuration identifier (Protocol_Profile_ID), endpoint identifier (Endpoint_ID), address path (Address_Path), command template (Command_Template), value encoding method (Value_Codec), readback path (Readback_Path), acknowledgment rule (Ack_Rule), and retry policy (Retry_Policy). Taking the light-on action turn_on as an example, under the Matter protocol, it corresponds to the start command of the cluster identifier Cluster 0x0006 and the command identifier Cmd 0x01; under the KNX protocol, it corresponds to the group address GA 1 / 0 / 1 with the value 1 written; under the Modbus protocol, it corresponds to the coil address Coil 100 with the value 1 written; and under the BACnet protocol, it corresponds to the binary output object BO 1 with the active state Active written. Taking the turn-off action as an example, under the Matter protocol, it corresponds to the turn-off command with the cluster identifier Cluster 0x0006 and the command identifier Cmd 0x00. Under the KNX protocol, it corresponds to the value 0 written to the group address GA 1 / 0 / 1. Under the Modbus protocol, it corresponds to the value 0 written to the coil address Coil 100. Under the BACnet protocol, it corresponds to the inactive state written to the binary output object BO 1. Taking the brightness setting action `set_brightness` as an example, under the Matter protocol, it corresponds to the dimming command with cluster identifier `Cluster0x0008` and command identifier `Cmd 0x04`. Under the KNX protocol, it corresponds to writing the brightness value `level` to group address `GA 1 / 0 / 2`, with a brightness value range of 0 to 255. Under the Modbus protocol, it corresponds to writing the brightness value `level` to holding register `HoldingReg 200`. Under the BACnet protocol, it corresponds to writing the brightness percentage `level%` to analog output object `AO 1`. Taking the temperature setting action `set_temperature` as an example, under the Matter protocol, it corresponds to the cluster identifier `Cluster0x0201` and the attribute identifier `Attr 0x0012`; under the KNX protocol, it corresponds to the group address `GA 2 / 0 / 1` where the temperature value `temp` is written; under the Modbus protocol, it corresponds to the holding register `HoldingReg 300` where the temperature value `temp` is written; and under the BACnet protocol, it corresponds to the analog value object `AV 1` where the temperature value `temp` is written. The Mapping_Table uses a combination of Device_Instance_ID, Capability_ID, Member_Type, Member_Name, Protocol_Profile_ID, and Endpoint_ID as the lookup key. Member_Type takes either State or Action, and Member_Name is the specific State or Action name. To further restrict the executability of Mapping_Table, each MapEntry may also include the following auxiliary fields: Codec_Type, Scale_Factor, Offset_Value, Enum_Map, Bool_Map, Endian, Bit_Offset, Write_Mode, Read_Mode, Timeout_ms, Retry_Count; Among them, Codec_Type indicates the encoding type, including at least Linear, Enum, Bool, BitField, and Raw; Scale_Factor and Offset_Value are used for linear conversion between numerical engineering quantities and protocol payloads; Enum_Map is used for one-to-one mapping between enumeration values and protocol enumeration codes; Bool_Map is used for mapping between Boolean values and protocol switch codes; Endian and Bit_Offset are used for byte order and bit offset of registers, bit fields, or multi-byte fields; Write_Mode indicates the write mode, and Read_Mode indicates the readback mode. The encoding rules of Value_Codec can be expressed as follows: Protocol_Value=Encode(Engineering_Value,Codec_Type,Scale_Factor,Offset_Value,Enum_Map,Bool_Map,Endian,Bit_Offset); The decoding rules for Value_Codec can be expressed as follows: Engineering_Value=Decode(Protocol_Value,Codec_Type,Scale_Factor,Offset_Value,Enum_Map,Bool_Map,Endian,Bit_Offset); Among them, Command_Template comes from a pre-built protocol template library or device manufacturer protocol description, and is used to define fixed fields and parameter placeholders for protocol messages. For example, Matter's turn_on corresponds to Cluster=0x0006 and Command=0x01. Value_Codec originates from a pre-built encoding rule library, engineering point table, and protocol description, and includes fields such as Codec_Type, Scale_Factor, Offset_Value, Enum_Map, Bool_Map, Endian, Bit_Offset, and Bit_Length. Readback_Path is derived from the protocol template library, engineering point table, or device manual, and is used to define the status readback address after execution; Ack_Rule is derived from the action confirmation method, protocol template, or administrator configuration, and defaults to Immediate_Ack; Retry_Policy is derived from the protocol template or system default policy, and defaults to 3 retries with a 1-second interval between each retrieval.
[0037] Through the above fields, the abstract parameters output by the AI large model will not be used directly as the protocol payload, but must be transformed by the encoder defined in MapEntry, thereby avoiding protocol field errors caused by the large language model directly generating the underlying message; For example, in the Matter path, `set_brightness(level)`'s `Address_Path` includes `Endpoint_ID`, `Cluster_ID=0x0008`, and `Command_ID=0x04`, and `Value_Codec` converts levels from 0-100% to levels from 0-254; in the KNX path, `Address_Path` includes `GroupAddress` and `DPT5.001`, and `Value_Codec` encodes the percentage as a 1-byte scale value; in the Modbus path, `Address_Path` includes `Slave_ID`, `Function_Code=0x06`, and `Register_Address`, and `Value_Codec` converts the percentage to a register integer. Therefore, the mapping relationship from key entities to capability objects is as follows: device type and function entities generate Capability_Type; device instance, space, and capability type generate Capability_ID; parameter and state entities generate State_Set; operation and command entities generate Action_Set; value range, dependency, security policy, and mutual exclusion relationship generate Constraint_Set; protocol, endpoint, address, command, encoding, and readback entities generate Mapping_Table.
[0038] Intent parsing step S2: Obtain environmental context information and user request; extract device capability summary from capability abstraction model based on user request; perform semantic reasoning on environmental context information, user request and device capability summary through AI big model to generate control intent; In some embodiments, the intent parsing step S2 specifically includes: Obtain the user's input scenario requirements, and standardize the scenario requirements to obtain the user request; Detect the online status of equipment in each building and obtain a preset event directory; Input user requests, device online status, preset event catalog, device capability summary, and environmental context into the AI big model; The AI big model uses the capability abstraction model as a constraint to perform semantic reasoning and generate control intentions.
[0039] By inputting user requests, device online status, preset event catalog, device capability summary, and environmental context into the AI big model, and using the capability abstract model as a constraint to generate control intentions through semantic reasoning, the output of the AI big model is limited to the executable range defined by the capability abstract model. This not only utilizes the semantic understanding capabilities of AI, but also avoids the model generating invalid control intentions that are unexecutable or exceed the device's capabilities.
[0040] Furthermore, such as Figure 3 As shown, the AI big model is deployed on the building edge gateway or local server as an AI Agent. The AI Agent does not directly output control messages from the underlying devices, but outputs structured control intentions under the constraints of the capability contract. After a user inputs their scenario requirements through a natural language interface or a graphical interface, the system first standardizes the input to obtain the User Request. The User Request includes the text, the user ID, the space reference, the time reference, the explicit device, and the preference words. Here, Text represents the raw text content input by the user, derived from the natural language input box of the low-code platform, speech recognition results, or text descriptions generated by the graphical rule editor; User_ID is the user's identity identifier, derived from the platform login session, access token, or local user permission table. If not logged in, it is marked as a Guest and only allowed to generate rules pending confirmation; Space_Reference is a spatial reference, derived from the result of matching the room, floor, and area names in Text with the space alias table after entity recognition, for example, "office" is mapped to Space_ID=office_01; Time_Reference is a time reference. The `Explicit_Device` parameter is derived from parsing time expressions such as "weekday," "after get off work," and "8 AM every day" in the `Text` object and is converted into a weekday marker, time interval, or periodic time condition. The `Explicit_Device` parameter explicitly specifies the device, derived from device aliases, device numbers, or device objects selected in the graphical interface from the `Text` object, and is converted into a device instance identifier `Device_Instance_ID` through a device alias mapping table. The `Preference_Words` parameter is derived from matching results of keywords or synonyms such as "comfortable," "energy-saving," "fast," "quiet," and "bright" in the `Text` object, and is used to generate constraint hints `Constraint_Hints` or parameter candidate values. Read the summary of available device capabilities in the current space from the capability model library, which is a summary of the capability abstract model, and obtain the event catalog, device online status, and environment context C; The device capability summary is a summary of available capability abstract objects (Capability_Object) read from the capability model library based on the space, device alias, and capability type (Capability_Type), excluding offline devices, unauthorized devices, or devices that do not support the target action; The environmental context C includes Time, Space ID, Occupancy, Illuminance, Temperature, Humidity, Energy Policy, and Security State. Among them, Time is the current system time, which comes from the edge gateway or server clock; Space_ID is the space identifier, which comes from the Space_Reference parsing result, the space where the triggering event is located, or the user interface selection area; Occupancy is the occupancy status, which comes from the presence sensor, access control system, meeting reservation system, or building real-time status database, and the value can be occupied, unoccupied, or unknown; Illuminance, Temperature, and Humidity are illuminance, temperature, and humidity, respectively, which come from the corresponding sensor or building real-time status database. If the sensor is offline, it is marked as unknown and the confidence of the relevant preconditions is reduced; Energy_Policy is the energy policy, which comes from the building energy management system or administrator configuration, and the value can be normal, saving, or peak_limit; Security_State is the security state, which comes from the security system, fire protection system, or access control status, and the value can be normal, armed, or fire_alarm. The AI Agent uses a constrained JSON Schema to generate control intents, which include an intent ID (Intent_ID), a scene scope (Scene_Scope), trigger candidates (Trigger_Candidates), target selectors (Target_Selectors), a desired state set (Desired_State_Set), action slots (Action_Slots), constraint hints (Constraint_Hints), confidence level (Confidence), and missing slots (Missing_Slots). Among them, the Trigger Candidates are mapped from trigger expressions such as "when I enter the office", "meeting starts", and "lighting is below the threshold"; the Target Selectors are determined by space references, device aliases and capability types. For example, "office lighting" is mapped to a set of devices with Space_ID=office and Capability_Type=Lighting; the Desired State Set is mapped from target state expressions such as "on", "adjust to 26℃", and "close curtains"; the Action Slots record the action name, parameter type, parameter value and unit; and the Constraint Hints record constraints such as "weekday", "when people are present", "when lighting is insufficient", and "energy saving priority". The AI Agent outputs control intents in JSON Schema. All action names and parameter types must come from the Action Set and the State Set. Missing_Slots is used to record fields that are missing or have insufficient confidence when generating control intents from user requests, including missing trigger conditions, missing targets, missing actions, missing parameters, and missing preconditions. Missing_Slots originates from slot validation results. When the Trigger_Candidates, Target_Selectors, Action_Slots, or parameter values output by the AI Agent are empty, or the Confidence is lower than a preset threshold, the corresponding fields are written into Missing_Slots. For missing slots, the system first generates candidate completions based on the environment context C, historical rule preference configuration files, and building policy templates; if completion is still not possible, a clarification question is generated and the rule is marked as pending confirmation. For example, if a user simply says to adjust it to a more comfortable level, the system will provide candidate parameters based on temperature, humidity, the user's condition, and the user's preference profile; if the confidence level is below the threshold, a clarification question or a rule to be confirmed will be generated. Therefore, the mapping from user input to control intent is a combined process of semantic parsing, capability constraint verification, slot completion, and confidence judgment, and the output is still a protocol-independent intent object. Instead of directly outputting underlying device control messages, the AI Agent outputs structured control intentions under the constraints of capability contracts, thereby avoiding protocol field errors caused by large language models directly generating underlying messages.
[0041] Taking the user input "Automatically turn on the lights, set the air conditioner to cooling at 26 degrees Celsius, and open the curtains when I enter the office" as an example, the system outputs the following control intents: Trigger Candidates: the presence of office personnel changes to occupied; Target Selectors: office lighting, office HVAC, and office curtains; Action Slots: turn on (light), set air conditioner mode to cooling (hvac, cool), set air conditioner temperature to 26 degrees Celsius (hvac, 26°C), and set curtain position to 100% (curtain, 100%); Constraint Hints: occupancy=true and security_state=normal. The Event_Catalog is a predefined table of event types that can be extended by the device access process. It records various event sources, event types, event value types, and available predicates. The Event_Catalog includes at least the PresenceEvent, DoorEvent, ScheduleEvent, SensorThresholdEvent, DeviceStateEvent, and ManualTriggerEvent.
[0042] Intent matching step S3: Match the control intent with the capability abstract model to determine the target building equipment. Based on the target building equipment and the action description in the control intent, generate a list of action items. Generate automation rules based on the list of action items. In some embodiments, the intent matching step S3 specifically includes: The target building equipment is obtained by matching the target selector in the control intent with the capability abstract model; Based on the target building equipment, the action description in the control intent is converted into a list of action items; The trigger conditions in the control intent are matched with the preset event catalog to obtain the trigger; Based on environmental context information and constraint hints in the control intent, generate precondition expressions; Combine the action list, triggers, and precondition expressions to generate automation rules.
[0043] By matching and transforming the target selector, action description, triggering condition, and constraint hints in the control intent with the capability abstract model, preset event catalog, and environmental context, a structured list of action items, triggers, and precondition expressions are generated. This achieves a complete transformation link from natural language scenario requirements to executable automated rules, eliminating the need for manual configuration of each linkage logic and significantly improving rule generation efficiency.
[0044] Furthermore, such as Figure 4 As shown, the target selector Target_Selectors is first expanded into a defined set of devices Device_Set, and then offline devices, devices with insufficient permissions, and devices that do not support the target capabilities are filtered out. Device filtering includes online status filtering, permission filtering, and capability support filtering. Online status filtering determines whether the device instance identifier (Device_Instance_ID) is online by checking the device's real-time status database or network access skip table. Permission filtering queries the permission table by checking the user identifier (User_ID) to determine whether the user has control permissions for the target space and the target device. Capability support filtering determines whether the target device supports the action set (Action_Set) and state set (State_Set) required by the capability abstract object (Capability_Object). Match the Trigger Candidates with the Event Catalog to form a Trigger; A trigger consists of an event source (Event_Source), an event type (Event_Type), an event predicate (Event_Predicate), and a debounce time (Debounce_Time). Among them, Event_Source is the source of the triggering event, which comes from sensors, scheduling systems, changes in device status, or manual triggering by the user; Event_Type is the event type, which comes from the event catalog Event_Catalog; Event_Predicate is the event judgment predicate, including status changes to occupied, value less than 300 lux, time within range, etc.; Debounce_Time is the debounce time, which comes from the default value of the event catalog Event_Catalog or the administrator configuration, and is used to prevent the same event from being triggered repeatedly in a short period of time; The desired state set Desired_State_Set and action slots Action_Slots are converted into an action list Action_List. Each action item is an Action_Item, which includes the target device identifier Target_Device_ID, capability identifier Capability_ID, action name Action_Name, parameter set Param_Set, dependency relationship Dependency, and execution mode Execution_Mode. Among them, Dependency represents the action dependency, which comes from the pre-execution state requirement Pre_State_Requirement in the Action_Set, the dependency constraints in the Constraint_Set, and the action order template. For example, setting brightness depends on turning on the light, i.e., set_brightness depends on turn_on. Execution_Mode represents the action execution mode, which comes from the Action_Set, device capability configuration, or user preferences. Values include sequential execution, parallel execution, delayed execution, and conditional execution. When not specified, actions that do not depend on each other are executed in parallel by default, and actions that depend on each other are executed sequentially by default. The precondition expression `Precondition_Expr` is generated jointly by the environmental context and constraint hints. The system selects context fields related to the trigger and action from the current environmental context `C`, including time, weekday, presence of personnel, indoor lighting, indoor temperature, security status, fire status, electricity price period, and equipment occupancy status. Then, it combines the user's explicit expression and the building policy template to generate a typed predicate, including time in [08:00, 19:00], weekday=true, occupancy=true, lighting <300 lux, security_state=normal, and fire_alarm=false. For threshold-based preconditions, the threshold sources include explicit user values, device constraint ranges, current environmental values plus tolerances, and user preference profiles, and the source and confidence level are recorded. The final rule structure is the Automation Rule, which includes the Rule ID, Scene ID, Trigger, Precondition Expression, Action List, Priority, Conflict Policy, Version, and Audit Info. The precondition expression Precondition_Expr is stored using Boolean expressions or predicate trees. The nodes of the precondition expression Precondition_Expr include field name, comparison operator, threshold, unit, threshold source, and confidence level, for example, {field:Illuminance, op:<, value:300, unit:lux, source:policy_template,confidence:0.8}. Conflict_Policy is the conflict handling policy, derived from building-wide policy, spatial policy, user preferences, or rule templates. Values include Reject, Auto_Adjust, Priority_Override, and Need_User_Confirm. If not specified, the default is Need_User_Confirm. Audit_Info is the audit information, derived from system records during the rule generation process, including Creator_User_ID, Creation Time, Intent_ID, Model_Version, Capability_Model_Version, Confirm_State, and Last_Modify_Time. The Action_List only references the Capability_ID, Action_Name, and Param_Set, and does not store the specific protocol messages, thereby achieving complete decoupling between rules and protocols; After the automated rules are generated, the system performs execution capability support verification, parameter type verification, and constraint and conflict detection; if they pass, they are written to the rule base; if they fail, candidate modification schemes are generated. Constraint and conflict detection includes conflicts within a single rule, cross-rule conflicts, action dependency conflicts, device state mutual exclusion conflicts, security boundary conflicts, and circular dependency conflicts.
[0045] For each action in the Action_List, the automatic message generation process is as follows: Read the Action_Item; Query the Capability_Object and verify whether the Action_Name belongs to the Action_Set, the Param_Set and whether the Input_Schema and Constraint_Set satisfy the Input_Schema and Constraint_Set; Query the Protocol_Binding to determine the Protocol_Profile_ID, Endpoint_ID and Gateway_ID; Query the MapEntry using the combination of Target_Device_ID, Capability_ID, Action type, Action_Name, Protocol_Profile_ID and Endpoint_ID as the union key; Convert the engineering parameters into protocol payloads using the Value_Codec in the MapEntry, and generate the Protocol_Message using the Command_Template in the MapEntry. The value encoding method, Value_Codec, performs different encodings based on the parameter data type. For numeric parameters, a linear conversion is performed according to the scale factor Scale_Factor and the offset value Offset_Value, and clamping is performed according to the value range Value_Range. The protocol load value Protocol_Value is equal to the engineering quantity value Engineering_Value minus the offset value Offset_Value, divided by the scale factor Scale_Factor, and rounded down. The expression is: Protocol_Value=Round((Engineering_Value-Offset_Value) / Scale_Factor); For enumerated parameters, the capability layer enumeration values are mapped to protocol enumeration codes according to the enumeration mapping Enum_Map. The protocol payload value Protocol_Value is equal to the corresponding engineering quantity value Engineering_Value in the enumeration mapping Enum_Map, as expressed in the following expression: Protocol_Value = Enum_Map[Engineering_Value]; For Boolean parameters, the Boolean mapping `Bool_Map` maps true or false values to protocol switch codes or bit values. The protocol payload value `Protocol_Value` is equal to the corresponding value of the engineering quantity value in the Boolean mapping `Bool_Map`, expressed as follows: Protocol_Value=Bool_Map[Engineering_Value]; For bit-field parameters, the specified bits are written to the register or payload according to the bit offset (Bit_Offset) and bit length (Bit_Length). The protocol payload value (Protocol_Value) is equal to the output of the setBits function, which takes the original value (Original_Value), bit offset (Bit_Offset), bit length (Bit_Length), and encoded value (Encoded_Value) as input. The expression is: Protocol_Value = SetBits(Original_Value, Bit_Offset, Bit_Length,Encoded_Value); If the parameter type, unit, or value range in the parameter set Param_Set does not match the value encoding method Value_Codec in the mapping entry MapEntry, the protocol conversion layer refuses to generate the protocol message Protocol_Message and returns an encoding mismatch error Codec_Mismatch to the rule engine. The protocol message Protocol_Message is sent through the protocol gateway corresponding to the gateway identifier Gateway_ID, and the execution result is confirmed according to the acknowledgment rule Ack_Rule and the readback path Readback_Path; The `Ack_Rule` defines the conditions for successful protocol execution, including at least the following three categories: `Immediate_Ack`, indicating that a write acknowledgment returned by the gateway or protocol stack is the success condition; `Readback_Match`, indicating that success is determined when the target state is read back through the `Readback_Path` and the readback value meets the tolerance condition; and `Delayed_Verify`, indicating that the action needs a delay to take effect, and the system initiates one or more readback acknowledgments after the delay time `Delay_ms`. For readback-match acknowledgments, the system uses a distance function to determine whether the execution was successful. The execution result `Ack_Result` is equal to the distance function `Distance`, whose output (with the decoded readback value `Decoded_Readback_Value` and the expected value `Expected_Value` as input) is less than or equal to the tolerance `Tolerance`. Among them, the decoded readback value Decoded_Readback_Value is obtained by decoding the value encoding method Value_Codec of the mapping entry MapEntry corresponding to the readback path Readback_Path, and the tolerance Tolerance is given by the state set State_Set or the constraint set Constraint_Set; If the execution result is false, the system will retry according to the retry policy Retry_Policy; if it still fails, an execution error Execution_Error will be generated and the alternative protocol binding Protocol_Binding selection will be triggered. Taking the brightness action set_brightness(80) as an example, the capability layer parameter is Engineering_Value, which is 80, and the unit is percentage. Under the Matter protocol path, MapEntry.Codec_Type=Linear, Scale_Factor=100 / 254, Offset_Value=0, therefore Level=Round(80 / (100 / 254))=203, generating a protocol message with ClusterID 0x0008, CommandID 0x04, and a payload including brightness level Level 203 and transition time TransitionTime 0; Under the KNX protocol path, MapEntry.Codec_Type=Linear, DPT=5.001, encoded as a 1-byte scale value of 204; Under the Modbus protocol path, MapEntry.Codec_Type=Linear, Scale_Factor=1, Register_Address=40021, and the register value is 80; All three protocol payloads mentioned above are generated from the same capability action and different mapping entries (MapEntry).
[0046] Taking the setting mode action set_mode(cool) as an example, the capability layer parameter is the engineering value, which is equal to cooling (cool), and the data type is enumeration type enum. Under the BACnet protocol path, Enum_Map={cool:3, heat:4, fan:5, auto:1}, therefore Present_Value=3; Under the Modbus protocol path, Enum_Map={cool:1, heat:2, fan:3, auto:0}, therefore the register value is 1; Therefore, the enumeration parameters are not converted through numerical subtraction or natural language inference, but are determined by the enumeration mapping Enum_Map in the mapping entry MapEntry; Taking the turn_on action as an example, the capability layer parameter is that the Engineering_Value is true and the data type is boolean. In the Matter protocol path, Bool_Map={true:OnCommand, false:OffCommand}, in the KNX path, Bool_Map={true:1, false:0} and write it to the DPT1.001 address group, in the Modbus path, Bool_Map={true:0xFF00, false:0x0000} and write it to the coil; Therefore, the same Boolean action can be mapped to different protocol implementations such as command, bit value, or coil write.
[0047] In some embodiments, the multi-protocol building equipment automation control method further includes: Cache establishment steps: Obtain the draft scenario rules generated by the AI large model when generating control intent, and obtain the execution instance generated after the target protocol message is executed; Extract multiple types of fields from the scenario rule draft, execution cases and automation rules, vectorize the multiple types of fields to obtain a comprehensive scenario vector, and store the comprehensive scenario vector in the vector index library; By retrieving historical records through a vector index library, the search results are obtained and used as reference information when the AI large model generates control intentions.
[0048] By extracting multiple types of fields from scenario rule drafts, execution instances, and automation rules and vectorizing them to obtain a comprehensive scenario vector, which is then stored in a vector index library, historical scenarios and rules can be stored and retrieved in a structured vector form. The historical records retrieved through the vector index library can then be used as reference information when the AI large model generates control intentions, thus realizing the reuse of historical experience and improving the accuracy and efficiency of control intention generation.
[0049] Furthermore, the system saves user input, rule drafts, confirmed rules, and execution instances as raw records and typed vector records, respectively; The raw records include User_Request, Intent, Rule, Environment_Context, Execution_Record, and Feedback_Record; Vector generation includes: one user input corresponds to one Scene_Draft to be confirmed; one or more automated rules are generated after user confirmation or platform review; one trigger event corresponds to one execution instance of an existing rule, which does not mean that a new scene is created; the system only creates a new Scene_Draft when the trigger event cannot match an existing rule or when the user explicitly requests to add a scene. The system generates vectors for the Scene_Draft, the Automation Rule, and the Execution_Instance, respectively. Specifically, the text field uses a local text embedding model to obtain the text vector Text_Embedding; the Capability_Type, Action_Name, Protocol_Profile_ID, and Space_ID use dictionary numbering or hash embedding; the numeric context field is normalized according to the device or building policy range; the enumeration field uses enumeration numbering, optional ontology distance, or one-hot encoding; the Boolean field is encoded as 0 or 1; and the time field is encoded as a weekday marker and periodic sine / cosine features. The above sub-vectors are concatenated according to their weights to form a comprehensive scene vector V. The comprehensive vector V includes a text vector V_text, a capability vector V_capability, a context vector V_context, an action vector V_action, and a space-time vector V_space_time. Among them, V_text comes from User_Request.Text, scene name and rule description, and is generated by local text embedding model; V_capability comes from Capability_Type, Capability_ID and Device_Type, and is generated by dictionary encoding or hash embedding; V_context comes from temperature, light, personnel occupancy, energy policy and security status in C, and is generated by normalization, enumeration encoding or Boolean encoding. V_action is derived from Action_Name, Param_Name, Data_Type, and target parameter value; V_space_time is derived from Space_ID, floor, region, Time_Reference, weekday marker, and daily period sin / cos features; The comprehensive scene vector V can be specifically represented as: V_scene=Wt V_text||Wc V_capability||We V_environment||Wa V_action||Ws V_space_time; Where || represents concatenation, and Wt, Wc, We, Wa, and Ws are configurable weights. Similarity calculation uses weighted cosine similarity or segmented similarity. Text similarity is only included in the ranking when Capability_Type, Action_Name, and Space_ID meet the minimum matching conditions.
[0050] The minimum matching criteria refer to the hard conditions that candidate historical rules must meet before entering the similarity ranking. These include identical Capability_Type, identical Action_Name or belonging to the same action family, identical Space_ID or belonging to the same parent space, identical target Data_Type, and user permissions meeting the target device control requirements. Historical rules that do not meet the minimum matching criteria will not participate in the Top-K ranking. The scene vector V is written together with the rule identifier Rule_ID, scene identifier Scene_ID, version number Version, and timestamp Timestamp into the vector index; When there is new user input or a triggering event that cannot be matched, the system uses weighted similarity to retrieve the historical scene rule draft (Scene_Draft) and automated rule (Rule), where the weights of ability type, action type, and spatial range are greater than those of natural language similarity. The search results are only used to provide candidate rules, default parameter values, and conflict warnings; executable rules still need to pass the capability model, constraint detection, and user confirmation. When the AI big model generates protocol messages based on the Action_List and Mapping_Table, it only does so after the rules are confirmed or before execution, avoiding the direct use of historical big language model responses as the basis for control. The top K historical automated rules retrieved are only used as candidate references. The system will not directly use historical large language model responses as current control instructions; candidate rules must undergo capability verification, constraint detection, and necessary user confirmation.
[0051] Furthermore, the system performs constraint and conflict detection during both the rule generation and execution phases. The detection targets include conflicts within a single rule, cross-rule conflicts, action dependency conflicts, device state mutual exclusion conflicts, security boundary conflicts, and circular dependency conflicts. The process of internal detection for a single rule is as follows: an action list (Action_List) in the automation rule (Rule) is created and written to a set according to the target device identifier (Target_Device_ID) and the state name (State_Name); If two Action_Items within the same rule are written to the same state in the same execution window and their target values are inconsistent, a Same_State_Conflict is generated; if the target value exceeds the value range Value_Range in the State_Set or does not belong to the Enum_Domain, a Range_Conflict or an Enum_Conflict is generated. The process of cross-rule detection is to search the rule base for rule pairs where the trigger time windows overlap, the precondition expression Precondition_Expr can be true at the same time, and they apply to the same device state key Device_State_Key. If two rules make opposite requirements for the same state, including one rule requiring the power state to be on while the other requires the power state to be off, or the temperature setting difference exceeds a threshold, then a cross-rule conflict (Cross_Rule_Conflict) is generated. The process of dependency and cycle detection is as follows: Action dependencies are represented as a directed graph G, which consists of action items (Action_Item) and dependency edges (Dependency_Edge). If setting brightness depends on turning on the light, there is an edge where the light-on action (turn_on) points to the brightness-setting action (set_brightness). The system performs a topological sort on the directed graph G. If a cycle exists, a cycle dependency conflict (Cycle_Dependency_Conflict) is generated. If a dependent action is missing, a prerequisite action is automatically inserted or the user is prompted for confirmation. The process of safety and policy testing involves converting policies such as fire protection, security, equipment protection, and energy consumption limits into inviolable predicates. For example, when the fire alarm is true (fire_alarm=true), emergency lighting must not be turned off, and the HVAC setpoint_temp temperature must not be lower than the equipment protection lower limit. Violations of safety predicate rules result in direct rejection or downgrading to pending review. The conflict record format is Conflict_Record, which includes the conflict identifier Conflict_ID, conflict type Conflict_Type, rule identifier set Rule_IDs, action identifier set Action_IDs, device state key Device_State_Key, severity Severity, detection phase Detected_Phase, evidence Evidence, and candidate resolution solution set Candidate_Resolutions; Among them, the conflict identifier `Conflict_ID` is a unique identifier for the conflict record, generated by the system; the conflict type `Conflict_Type` is the conflict type, derived from the conflict detection algorithm, with values including Same_State_Conflict, Cross_Rule_Conflict, Range_Conflict, Enum_Conflict, Cycle_Dependency_Conflict, and Safety_Conflict; the rule identifier set `Rule_IDs` is the set of rule identifiers that have caused the conflict; and the action identifier set `Acti`... `on_IDs` is the set of conflict actions; `Device_State_Key` consists of the target device identifier `Target_Device_ID` and the state name `State_Name`; `Severity` represents the severity level, derived from the security policy and conflict type; `Detected_Phase` represents the detection phase, with values including `rule_generation` for the rule generation phase and `rule_execution` for the rule execution phase; `Evidence` represents the fields, rules, actions, and values that triggered the conflict; `Candidate_Resolutions` is the set of candidate resolution solutions. During resolution, the system calculates the priority score, Priority_Score, using the following formula: Priority_Score=Safety_Level Ws+Manual_Override Wu+Rule_Specificity Wr+Recency Wt+Energy_Policy We; Among them, Safety_Level is derived from the security level of the rule or device constraint; Manual_Override indicates whether the rule is manually confirmed or controlled by the user; Rule_Specificity indicates the specificity of the space, device, and conditions to which the rule applies; Recency indicates how recent the rule's confirmation or modification time is; Energy_Policy is derived from the current energy policy; Weights Ws, Wu, Wr, Wt, and We are configured by the administrator or are the system's default weights; the system prioritizes retaining rules with high safety level, manual confirmation level, more specific space, and most recent confirmation. Candidate resolution schemes include: retaining high-priority rules and disabling low-priority actions; adjusting the time window or preconditions of low-priority rules; serializing the execution of two actions; clamping numerical parameters to a safe range; and generating a binary confirmation item for enumeration or Boolean conflicts. The system outputs a resolution proposal, which includes options such as Keep, Disable, Modify Precondition, Adjust Param, Serialize, and Need User Confirm. Among them, Keep means retaining high-priority rules or actions; Disable means disabling low-priority rules or actions; Modify_Precondition means adjusting the preconditions of low-priority rules; Adjust_Param means adjusting the parameter to a safe or compatible range; Serialize means changing conflicting actions to be executed serially; Need_User_Confirm means returning user confirmation when automatic resolution is not possible; Resolution_Proposal is written to the rule base after automatic policy or user confirmation.
[0052] Rule execution step S4: Obtain the trigger event. If the trigger event matches the automation rule, extract the action item list from the automation rule. Based on the action item list, extract the protocol binding and mapping table from the capability abstract model. Based on the protocol binding and mapping table, encode the abstract actions in the action item list into target protocol messages and send them down for execution.
[0053] Based on the above-mentioned multi-protocol building equipment automation control method, by constructing a capability abstract model containing protocol binding and mapping table for each building equipment, the control logic of different protocol equipment is uniformly abstracted into capability characteristics, so that all subsequent control operations are based on this unified model, eliminating the data model differences between different protocols. Developers do not need to write control logic separately for each protocol, which greatly reduces the development difficulty and maintenance cost of multi-protocol building equipment control. By using large AI models to perform semantic reasoning on environmental context information, user requests, and device capability summaries to generate control intentions, users can express their needs in a scenario without needing to master professional control knowledge, simply through natural language or simple operations, thus reducing the technical threshold for rule configuration. By matching control intent with capability abstraction model to determine target building equipment and generating action item list and automation rules, the fully automated conversion from user intent to executable rules is realized, eliminating the need for manual configuration of linkage logic item by item and improving rule generation efficiency. By extracting protocol bindings and mapping tables from the capability abstract model during rule execution, encoding abstract actions into target protocol messages, and sending them out for execution, the same automation rule can be automatically adapted to the corresponding protocol message format according to the actual protocol type of the target device, thus realizing unified control execution across protocol devices.
[0054] In some embodiments, rule execution step S4 specifically includes: Listen for the triggered events using an event listener to obtain the event object, and then match the event object with the triggers in the automation rules. If the event object matches the trigger and satisfies the precondition expression, then the list of action items is extracted from the automation rule, and an abstract action is generated based on the list of action items.
[0055] By listening for triggered events through event listeners and matching event objects with triggers in automation rules, the list of action items is extracted and abstract actions are generated only when the event object matches the trigger and the precondition expression is satisfied. This gives the rule execution condition awareness, avoids the rule being triggered erroneously under unsuitable environmental or time conditions, and improves the accuracy and safety of automated control.
[0056] In some embodiments, rule execution step S4 further includes: Iterate through each action item in the action item list and extract the protocol binding of the target building equipment corresponding to each action item from the capability abstraction model; Based on protocol binding, the corresponding mapping entry is retrieved from the mapping table, and the abstract action is encoded into the target protocol message based on the mapping entry.
[0057] By traversing each action item in the action item list, the protocol binding of the target device corresponding to each action item is extracted from the capability abstract model, and the mapping entries in the mapping table are queried to encode the abstract action into the target protocol message. This enables the same abstract action to be automatically adapted to the corresponding protocol message format according to the actual protocol type of the target device, realizing unified control execution across protocol devices without having to write execution logic separately for different protocol devices.
[0058] Furthermore, such as Figure 5 As shown, when an automation rule is triggered, the system does not directly convert natural language control commands through the brand's proprietary protocol adaptation matrix, but instead executes action-level mappings according to the confirmed protocol-independent automation rules. The event listener outputs a trigger event E, which includes the event identifier Event_ID, the source device identifier Source_Device_ID, the event type Event_Type, the event value Event_Value, the timestamp Timestamp, and the space identifier Space_ID, thus obtaining the event object; The rule engine obtains the rule identifier Rule_ID by matching the trigger in the automation rule Rule with the event object. If the precondition expression Precondition_Expr evaluates to true, then the abstract action A is generated according to the action list Action_List. The capability model layer verifies the legality of the action based on the target device identifier Target_Device_ID, capability identifier Capability_ID, action name Action_Name, and parameter set Param_Set in the abstract action A; the protocol conversion layer reads the protocol binding Protocol_Binding to obtain the target device's currently valid protocol configuration identifier Protocol_Profile_ID, endpoint identifier Endpoint_ID, and gateway identifier Gateway_ID, and then queries the mapping table Mapping_Table to obtain the mapping entry MapEntry.
[0059] MapEntry includes Address_Path, Command_Template, Value_Codec, Readback_Path, Ack_Rule, and Retry_Policy; For Matter devices, the Address_Path includes Fabric_ID, Node_ID, Endpoint_ID, Cluster_ID, and Command_ID; For KNX devices, the address path includes the group address (GroupAddress) and the data type identifier (DPT). For Modbus devices, the address path includes slave_ID, function_Code, register_Address, and register_Length. For BACnet devices, the address path includes the device instance (Device_Instance), object type (Object_Type), object instance (Object_Instance), and property identifier (Property_ID). The protocol conversion layer uses the value_codec encoding method to encode engineering units into protocol payloads, including percentage brightness to Matter brightness level values, temperature setpoints to Modbus register values, and enumeration modes to the current BACnet value Present_Value. After the control message is sent, the system performs confirmation according to the confirmation rule Ack_Rule; actions that require immediate confirmation read the protocol response, actions that require state closure read the state through the readback path Readback_Path, and actions that require a delay to take effect are written into the pending confirmation queue and retried or alarmed when timeout occurs. The execution result is saved as an execution record (Execution_Record). The execution record (Execution_Record) includes the rule identifier (Rule_ID), action identifier (Action_ID), map identifier (Map_ID), protocol message identifier (Protocol_Message_ID), acknowledgment result (Ack_Result), readback value (Readback_Value), error code (Error_Code), and timestamp (Timestamp). Among them, the rule identifier (Rule_ID) comes from the triggered rule record; the action identifier (Action_ID) comes from the sequence number or unique identifier of the currently executed action in the Action_List of the automation rule (Rule); the mapping identifier (Map_ID) comes from the actual hit mapping entry (MapEntry); the protocol message identifier (Protocol_Message_ID) is assigned by the protocol conversion layer or gateway when generating the message; the acknowledgment result (Ack_Result) comes from the execution result of the acknowledgment rule (Ack_Rule); the readback value (Readback_Value) comes from the engineering value after being read back from the readback path (Readback_Path) and decoded by the value encoding method (Value_Codec); the error code (Error_Code) comes from the error code returned by the protocol conversion layer, gateway, or device; and the timestamp (Timestamp) is the system time when the message is generated, sent, or acknowledged. The execution record (Execution_Record) is used for auditing and subsequent optimization. The protocol message generation and execution process maintains a traceable link from rules to protocol messages; the action identifier Action_ID in the execution record Execution_Record points to the action in the action item list Action_List in the automation rule Rule, the mapping identifier Map_ID points to the actual mapping entry MapEntry used, the protocol message identifier Protocol_Message_ID points to the specific message sent by the gateway, and the acknowledgment result Ack_Result and readback value Readback_Value record the execution result; Therefore, when the device protocol binding changes, the gateway is switched, or the protocol execution fails, the system can pinpoint whether the error is due to rule generation error, mapping item error, encoding error, gateway abnormality, or device execution abnormality. The same automation rule does not contain any protocol-private message fields, so there is no need to re-invoke the AI large model generation rule when the protocol binding or gateway path changes; the protocol message is generated by the mapping entry MapEntry and the numerical encoding method Value_Codec, which reduces the risk of the large language model generating non-executable messages; the readback path Readback_Path and the acknowledgment rule Ack_Rule provide closed-loop acknowledgment, making the control results of cross-protocol devices verifiable, rollbackable and auditable; In some embodiments, the multi-protocol building equipment automation control method further includes: Feedback optimization steps: Obtain the user's manual adjustment records after the target protocol message is executed, calculate the deviation vector based on the manual adjustment records, generate optimization parameters based on the deviation vector, and update the automation rules based on the optimization parameters.
[0060] By acquiring the user's manual adjustment records after the execution of the target protocol message and calculating the deviation vector to generate optimization parameters to update the automation rules, the system can learn preferences from the user's actual operation behavior and automatically adjust the rule parameters, realizing adaptive optimization of the control strategy. The system behavior can gradually approach the user's usage habits without manual intervention.
[0061] In some embodiments, the feedback optimization step specifically includes: Calculate the deviation vector based on the parameter types in the manually adjusted records; The system counts the number of manual adjustments recorded for the same action item under the unified automation rules, and calculates the average deviation based on the deviation vector. If the number of adjustments exceeds the threshold and the average deviation exceeds the deviation threshold, optimization parameters are generated based on the deviation vector.
[0062] By calculating the deviation vector based on the parameter types in the manual adjustment records and statistically analyzing the number of adjustments and the average deviation for the same action item under the same automated rule, optimization parameters are generated only when both the number of adjustments and the average deviation exceed the threshold. This ensures that rule optimization is triggered by stable and consistent user preferences, avoids unreasonable impacts of single accidental operations on the rules, and improves the reliability of self-learning.
[0063] Furthermore, such as Figure 6 As shown, the system continuously monitors the user's manual adjustment records after the execution of automated rules, and divides the feedback into three categories: rule parameter feedback, trigger condition feedback, and knowledge prompt feedback. Rule parameter feedback is used to quickly update the RulePreferenceProfile of automation rules, for example, if a user repeatedly adjusts the meeting room temperature from 24℃ to 22℃; trigger condition feedback is used to adjust the precondition expression Precondition_Expr, for example, if a user frequently turns off the automatic light-on rule when the light is high; knowledge hint feedback is only entered into the AI big model's knowledge data retrieval and update process when the device capability description, alias, or scene template changes stably over a long period of time. During user behavior tracking, the system continuously monitors the manual adjustment records (Feedback_Record) after the execution of automated rules. The manual adjustment records (Feedback_Record) include the scene identifier (Scene_ID), rule identifier (Rule_ID), capability identifier (Capability_ID), action name (Action_Name), parameter name (Param_Name), data type (Data_Type), rule value (Rule_Value), user value (User_Value), context, timestamp, and manual source (Manual_Source). Among them, Scene_ID comes from the scene draft or confirmed scene; Rule_ID comes from the triggering rule; Capability_ID and Action_Name come from the capabilities and actions affected by the user's manual adjustment; Param_Name is the name of the parameter being adjusted; Data_Type comes from the State_Set or Input_Schema; Rule_Value is the original output value of the rule; User_Value is the value after the user's manual adjustment; Context is the environmental context when the adjustment occurred; Timestamp is the time the feedback was recorded; Manual_Source is the feedback source, including dashboard, application, voice, or human backend. In the process of calculating categorized deviations, for numerical parameters, the formula for calculating the deviation δ_num is: δ_num=(User_Value-Rule_Value) / (Max-Min); For enumerated parameters, if the enumeration is ordered, such as wind speed low / mid / high, the distance is calculated by normalizing according to the sequence number; if it is not ordered, such as cool / heat / fan, the deviation δ_enum is calculated by using one-hot or enumerating the distance of the body. For Boolean parameters, a deviation δ_bool of 0 indicates consistency, while a deviation δ_bool of 1 indicates that the user executes the opposite switch. The system encodes different types of deviations into a Deviation Vector. The Deviation Vector includes the parameter name Param_Name, data type Data_Type, encoded rule value Encoded_Rule_Value, encoded user value Encoded_User_Value, distance Distance, and direction. Among them, the parameter name Param_Name and data type Data_Type are derived from the feedback record Feedback_Record; the encoded rule value Encoded_Rule_Value and the encoded user value Encoded_User_Value are the rule value and user value encoded according to the data type; Distance is the distance between the two, with normalized difference for numerical types, ordinal distance, one-hot distance or enumerated body distance for enumerated types, and zero-one difference for boolean types; Direction indicates the adjustment direction, including increasing, decreasing, switching to switch_to or the opposite; During the rule parameter optimization process, rule optimization is triggered when the number of the most recent N manual adjustment records under the same scene identifier Scene_ID, capability identifier Capability_ID, action name Action_Name, and parameter name Param_Name exceeds the threshold and the conflict detection passes. The update formula used for numerical parameters is: Rule_Value_new=Clip(Rule_Value_old+α mean(User_Value-Rule_Value),Value_Range); For ordered enumeration, the Encode-Update-Decode method is used to select the closest new enumeration value; for unordered enumeration and Boolean parameters, the majority voting or probability distribution with time decay is used to update the target value and select the target value with a confidence level exceeding the threshold. During the hierarchical update sequence, rule parameter updates first occur in the rule preference configuration file RulePreferenceProfile or the rule parameter set Rule.Param_Set, recording the version number and rollback point. Only when similar stable feedback continues to appear after the rule parameters are updated, or when the administrator confirms that the preference can be generalized to new scenarios, will the system write the alias, default parameters, or scenario template into the retrieval knowledge data of the AI big model. The parameters of the large language model are not directly fine-tuned based on a single user feedback. If the user continues to manually adjust the rules after optimization, the system first increases the preference instability of the rule and rolls it back or reduces the automatic update weight. Only after a stable pattern is formed through multiple executions will the rule be entered into the knowledge data update queue. During the closed-loop learning process, the optimized rules are re-executed for constraint detection and conflict resolution. If successful, the rule base and vector index are updated. If unsuccessful, a resolution proposal (Resolution_Proposal) is generated for user confirmation, forming a closed loop of execution, feedback, typification bias, rule optimization, and low-frequency updates of knowledge data.
[0064] like Figure 7 As shown, this embodiment of the invention also provides an AI-based multi-protocol building equipment automation control system, including: The model building module acquires equipment information for multi-protocol building devices, extracts capability features from the equipment information, and builds a capability abstract model for each building device based on the capability features; the capability abstract model includes the protocol binding and mapping table for each building device; The intent parsing module obtains environmental context information and user requests, extracts device capability summaries from the capability abstraction model based on user requests, and performs semantic reasoning on environmental context information, user requests, and device capability summaries through a large AI model to generate control intents. The intent matching module matches control intents with the capability abstract model to determine the target building equipment. Based on the target building equipment and the action descriptions in the control intent, it generates a list of action items and generates automation rules based on the list of action items. The rule execution module obtains the trigger event. If the trigger event matches the automation rule, it extracts the action item list from the automation rule, extracts the protocol binding and mapping table from the capability abstract model based on the action item list, and encodes the abstract actions in the action item list into target protocol messages based on the protocol binding and mapping table and sends them down for execution.
[0065] By setting up a model building module, an intent parsing module, an intent matching module, and a rule execution module, a complete process is executed, including building a capability abstract model, generating control intents through AI semantic reasoning, converting control intents into automated rules, and encoding and issuing protocol messages for execution. This forms a full-link automated control system architecture that goes from device abstraction to intent understanding to rule execution. The modules are connected through standardized data structures, achieving a high degree of automation and intelligence in the control of multi-protocol building equipment.
[0066] It should be noted that the above is a reference method for a multi-protocol building equipment automation control method and system based on AI, and the present invention is not limited thereto.
[0067] The embodiments of this invention realize unified capability abstract modeling of multi-protocol building equipment, automatic parsing of natural language control intentions based on AI large model, protocol-independent automated rule generation, cross-protocol device action-level mapping execution, and self-learning optimization based on user feedback. It solves the technical problems in the prior art where the lack of a unified abstraction layer for different protocol devices leads to the need to write control logic for each protocol separately, automated rules rely on manual configuration of each rule which is inefficient and difficult to adjust flexibly, and static rule engines cannot adaptively optimize according to actual user behavior.
[0068] Finally, it should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0069] The above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them; although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications can still be made to the specific implementation of the present invention or equivalent substitutions can be made to some technical features without departing from the spirit of the technical solutions of the present invention, and all such modifications and substitutions should be covered within the scope of the technical solutions claimed in the present invention.
Claims
1. A multi-protocol building equipment automation control method based on AI, characterized in that, include: Model building steps: Obtain equipment data for multi-protocol building equipment, extract capability features from the equipment data, and build a capability abstract model for each building equipment based on the capability features; The capability abstract model includes protocol bindings and mapping tables for each building device; Intent resolution steps: Obtain environmental context information and user request; extract device capability summary from the capability abstract model based on the user request; perform semantic reasoning on the environmental context information, user request, and device capability summary through AI big data model to generate control intent; Intent matching step: Match the control intent with the capability abstract model to determine the target building equipment; generate an action item list based on the target building equipment and the action description in the control intent; and generate automation rules based on the action item list. Rule execution steps: Obtain the trigger event; if the trigger event matches the automation rule, extract the action item list from the automation rule; extract the protocol binding and mapping table from the capability abstract model based on the action item list; and encode the abstract actions in the action item list into target protocol messages based on the protocol binding and the mapping table and send them down for execution.
2. The AI-based multi-protocol building equipment automation control method according to claim 1, characterized in that, The specific steps for building the model are as follows: The protocol configuration information and executable actions of each building device are extracted from the device data to obtain the capability characteristics. Based on a preset capability template, the protocol configuration information in the capability features is mapped to a protocol binding, and the executable actions in the capability features are mapped to a mapping table. The capability abstract model is generated by combining the protocol binding and the mapping table.
3. The AI-based multi-protocol building equipment automation control method according to claim 1, characterized in that, The intent parsing steps are specifically as follows: Obtain the user's input scenario requirements, and standardize the scenario requirements to obtain the user request; Detect the online status of equipment in each building and obtain a preset event directory; The user request, the device online status, the preset event directory, the device capability summary, and the environmental context are input into the AI big model; The AI big model performs semantic reasoning based on the capability abstract model as constraints to generate the control intent.
4. The AI-based multi-protocol building equipment automation control method according to claim 3, characterized in that, The intent matching step is specifically as follows: The target building equipment is obtained by matching the target selector in the control intent with the capability abstract model; Based on the target building equipment, the action description in the control intent is converted into the action item list; The trigger conditions in the control intent are matched with the preset event directory to obtain the trigger; Based on the environmental context information and the constraint hints in the control intent, a precondition expression is generated; The automation rule is generated by combining the action item list, the trigger, and the precondition expression.
5. The AI-based multi-protocol building equipment automation control method according to claim 4, characterized in that, The specific steps for executing the rule are as follows: The event is listened to by an event listener to obtain an event object, and the event object is matched with the trigger in the automation rule. If the event object matches the trigger and satisfies the precondition expression, then the action item list is extracted from the automation rule, and an abstract action is generated based on the action item list.
6. The AI-based multi-protocol building equipment automation control method according to claim 5, characterized in that, The rule execution steps also include: Iterate through each action item in the action item list and extract the protocol binding of the target building equipment corresponding to each action item from the capability abstract model; Based on the protocol binding, the corresponding mapping entry is retrieved from the mapping table, and the abstract action is encoded into the target protocol message based on the mapping entry.
7. The AI-based multi-protocol building equipment automation control method according to claim 1, characterized in that, The method further includes: Feedback optimization steps: Obtain the user's manual adjustment record after the target protocol message is executed, calculate the deviation vector based on the manual adjustment record, generate optimization parameters based on the deviation vector, and update the automation rule based on the optimization parameters.
8. The AI-based multi-protocol building equipment automation control method according to claim 7, characterized in that, The feedback optimization steps are specifically as follows: Calculate the deviation vector based on the parameter types in the manual adjustment record; The number of manual adjustment records corresponding to the same action item under the unified automation rules is counted, and the average deviation is calculated based on the deviation vector. If the number of times exceeds the number threshold and the average deviation exceeds the deviation threshold, the optimization parameters are generated based on the deviation vector.
9. The AI-based multi-protocol building equipment automation control method according to any one of claims 1 to 8, characterized in that, The method further includes: Cache establishment steps: Obtain the draft scenario rules generated by the AI big model when generating the control intent, and obtain the execution instance generated after the target protocol message is executed; Multiple types of fields are extracted from the scenario rule draft, the execution case and the automation rule, and the multiple types of fields are vectorized to obtain a comprehensive scenario vector. The comprehensive scenario vector is then stored in a vector index library. The search results are obtained by retrieving historical records through the vector index library and used as reference information when the AI big model generates the control intent.
10. An AI-based multi-protocol building equipment automation control system, characterized in that, include: The model building module acquires equipment data of multi-protocol building equipment, extracts capability features from the equipment data, and builds a capability abstract model for each building equipment based on the capability features; The capability abstract model includes protocol bindings and mapping tables for each building device; The intent parsing module obtains environmental context information and user requests, extracts device capability summaries from the capability abstract model based on the user requests, and performs semantic reasoning on the environmental context information, user requests, and device capability summaries using an AI big data model to generate control intents. The intent matching module matches the control intent with the capability abstract model to determine the target building equipment. Based on the target building equipment and the action description in the control intent, it generates a list of action items and generates automation rules based on the list of action items. The rule execution module obtains a trigger event. If the trigger event matches the automation rule, it extracts the action item list from the automation rule, extracts the protocol binding and mapping table from the capability abstract model based on the action item list, and encodes the abstract actions in the action item list into target protocol messages based on the protocol binding and the mapping table and sends them down for execution.
