An energy consumption knowledge graph and large model fusion energy-saving optimization method and system for an industrial environmental control system

CN122927679APending Publication Date: 2026-10-16CLP ZHIWEI (SHANGHAI) TECH CO LTD +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611407363.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

该类方案不依赖精确物理模型,但存在训练数据需求量大、策略可解释性差、生成参数缺乏安全边界校验等问题,在工业现场落地时存在设备安全风险

Benefits of technology

[0008] The beneficial technical effects of this application are as follows: It collects operating data from chiller/heater units, water pumps/fans, and terminal air conditioners using multiple protocols such as Modbus, BACnet, and OPCUA; constructs a three-level time-series data pool (equipment, system, and plant area) via an edge gateway; performs resampling and alignment, 3σ anomaly removal, and interpolation completion on the multi-source data; calculates real-time COP, transmission and distribution temperature difference loss rate, and partial load rate; clusters and labels operating conditions; and outputs a standardized feature matrix; and uses rules combined with BERT naming from equipment ledgers, maintenance manuals, and historical work orders. Entity recognition extracts four types of entities and relationships, and after entity disambiguation, an energy consumption knowledge graph is constructed. A retrieval enhancement generation framework is built, and constraints and strategies are retrieved from the graph according to the operating conditions and injected into the large model. After the candidate parameters are verified for safety boundaries by the IF-THEN rule engine, the large model parameters guide the particle swarm to solve for the optimal combination of water outlet temperature, water pump and fan frequency, and fresh air ratio. Optimization instructions are issued and executed through the edge gateway, and the energy saving and comfort compliance rate are calculated by comparing with the baseline. The effect samples are written back to the graph and accumulated as model fine-tuning samples, forming a closed-loop management of the entire process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122927679A_ABST
    Figure CN122927679A_ABST
Patent Text Reader

Abstract

The application provides an energy consumption knowledge graph and large model fusion energy saving optimization method and system for an industrial environment control system, and applies to the cross technical field of industrial environment control system energy saving optimization and industrial artificial intelligence. Through industrial protocol acquisition of cold and heat sources, transmission and distribution and terminal equipment data, a three-level data pool is constructed through an edge gateway, resampling, abnormality elimination and interpolation completion are performed on the data, energy efficiency indexes are calculated and working conditions are clustered and labeled, and a feature matrix is output; entity relationships are extracted from multiple source documents, a knowledge graph is constructed by combining rules with BERT, a retrieval enhancement generation framework is built, a large model is constrained and injected according to the working condition retrieval graph, and candidate parameters are verified and corrected by a rule engine; taking comfort and equipment safety as constraints and energy consumption minimization as a target, a large model guided particle swarm is used to solve optimal parameters and output in layers; after the instruction is issued, the energy saving amount and the compliance rate are calculated, the effect is written back to the graph and accumulated as a fine tuning sample, and a closed loop control is formed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy-saving optimization of industrial environmental control systems and industrial artificial intelligence, and in particular to an energy-saving optimization method and system that integrates energy consumption knowledge graphs and large models for industrial environmental control systems. Background Technology

[0002] Energy-saving optimization of existing industrial environmental control systems mainly adopts the following three types of technical solutions. The first type is a control scheme based on fixed rules and human experience. Maintenance personnel set parameters such as outlet water temperature, pump frequency, and fresh air ratio based on seasonal and load experience, or use a proportional-integral-derivative controller to automatically adjust according to set values. This type of scheme is simple to implement but relies on human experience, has conservative parameter settings, cannot dynamically optimize based on real-time operating conditions, and does not fully release its energy-saving potential. The second type is an optimization scheme based on physical models. This involves establishing thermodynamic and fluid dynamic models of chiller / heater units, distribution networks, and terminal equipment to solve for optimal operating parameters with the goal of minimizing energy consumption. This type of scheme has high theoretical accuracy, but factors such as equipment aging in industrial environmental control systems, changes in network resistance, and outdoor weather disturbances cause physical model parameter drift, resulting in high modeling costs and difficult maintenance. The optimization effect decreases significantly under complex operating conditions. The third type is a data-driven optimization scheme that uses machine learning or reinforcement learning to learn energy consumption patterns from historical operating data and generate control strategies. This type of solution does not rely on an accurate physical model, but it has problems such as large training data requirements, poor policy interpretability, and lack of safety boundary verification for generated parameters, which pose equipment safety risks when implemented in industrial sites.

[0003] Furthermore, existing environmental control systems generally suffer from data silos. Multi-source, heterogeneous data, such as equipment runtime sequence data, equipment ledgers, maintenance manuals, historical work orders, and energy-saving strategies, are scattered across different systems, lacking a unified knowledge representation and association mechanism. This makes it difficult to quickly retrieve equipment constraints, historical strategies, and fault correlation information during optimization decisions. Simultaneously, existing large language models exhibit illusions when applied in industrial control scenarios, generating operating parameters that may exceed equipment rated capabilities or violate process constraints, lacking a reliable verification mechanism that integrates with domain knowledge. Existing energy-saving effect assessments also lack standardized baseline calculation methods. Energy-saving calculations are greatly affected by factors such as outdoor temperature and production load fluctuations, resulting in high measurement uncertainty and making it difficult to objectively quantify energy-saving effectiveness. The optimization execution and effect feedback in existing systems are disconnected. Post-optimization operational data and energy-saving effects cannot be automatically written back to the knowledge base and model training set, resulting in a lack of closed-loop capability for continuous iterative optimization. Over long-term operation, the optimization effect gradually diminishes. Summary of the Invention

[0004] According to one aspect of this application, an energy-saving optimization method for industrial environmental control systems is provided, which integrates an energy consumption knowledge graph with a large model. The method includes: collecting operating frequencies, valve position currents, component energy consumption, temperature and humidity, and process loads of chiller / heater units, pumps / fans, and terminal air conditioners via Modbus / BACnet / OPCUA, and writing these data into a time-series database via an edge gateway to construct a three-level data pool of equipment, system, and plant area; performing resampling alignment, 3σ anomaly removal, and interpolation completion on the multi-source time-series data; calculating real-time COP, transmission and distribution temperature difference loss rate, and partial load rate based on rated parameters; clustering and labeling cooling / heating / high / low load operating modes to output a standardized feature matrix; extracting equipment, operating conditions, energy consumption, fault entities, and their connections, functions, and constraints from equipment ledgers, maintenance manuals, and historical work orders; using a rule-based approach combined with BERT named entity recognition; and storing the results in a graph database after entity disambiguation and alignment to construct an energy consumption knowledge graph containing equipment topology and energy flow direction. Consumption knowledge graph; construct a retrieval-enhanced generation framework, retrieve related equipment paths, energy consumption constraints, and historical strategies from the graph according to the current operating conditions, inject them into the large model for hints, and after the large model generates candidate parameters, it is verified by the graph rule engine to see if it violates the equipment safety boundary and process constraints. Conflict items are corrected or rolled back to the safety baseline; with comfort range, equipment rated capacity, minimum start-stop interval as constraints, and minimum total energy consumption as the goal, the large model parameter scheme and graph verification results are integrated. The large model parameters are used as the initial solution or search direction guide for particle swarm optimization. Particle swarm optimization is used to solve for the optimal combination of water outlet temperature setting, water pump and fan frequency, and fresh air ratio, and outputs equipment-level and system-level optimization instructions in a hierarchical manner; the optimization instructions are sent to PLC or building automation system for execution through the edge gateway, and the data after execution is continuously collected. The energy saving, payback period and comfort compliance rate are calculated by comparing with the baseline. The effect samples are written back to the graph and accumulated as model fine-tuning samples, and the results of the entire process of energy-saving optimization digital management are output.

[0005] Another aspect of this application is an energy-saving optimization system that integrates energy consumption knowledge graphs and large models for industrial environmental control systems, used to execute executable instructions to perform the aforementioned energy-saving optimization method that integrates energy consumption knowledge graphs and large models for industrial environmental control systems.

[0006] According to another aspect of this application, an electronic device includes: a first processor; and a memory for storing executable instructions of the first processor; wherein the first processor is configured to execute the energy consumption knowledge graph and large model fusion energy-saving optimization method for industrial environmental control systems as described above by executing the executable instructions.

[0007] According to another aspect of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a second processor, implements the above-described energy-saving optimization method for the fusion of energy consumption knowledge graphs and large models for industrial environmental control systems.

[0008] The beneficial technical effects of this application are as follows: It collects operating data from chiller / heater units, water pumps / fans, and terminal air conditioners using multiple protocols such as Modbus, BACnet, and OPCUA; constructs a three-level time-series data pool (equipment, system, and plant area) via an edge gateway; performs resampling and alignment, 3σ anomaly removal, and interpolation completion on the multi-source data; calculates real-time COP, transmission and distribution temperature difference loss rate, and partial load rate; clusters and labels operating conditions; and outputs a standardized feature matrix; and uses rules combined with BERT naming from equipment ledgers, maintenance manuals, and historical work orders. Entity recognition extracts four types of entities and relationships, and after entity disambiguation, an energy consumption knowledge graph is constructed. A retrieval enhancement generation framework is built, and constraints and strategies are retrieved from the graph according to the operating conditions and injected into the large model. After the candidate parameters are verified for safety boundaries by the IF-THEN rule engine, the large model parameters guide the particle swarm to solve for the optimal combination of water outlet temperature, water pump and fan frequency, and fresh air ratio. Optimization instructions are issued and executed through the edge gateway, and the energy saving and comfort compliance rate are calculated by comparing with the baseline. The effect samples are written back to the graph and accumulated as model fine-tuning samples, forming a closed-loop management of the entire process.

[0009] This application employs a retrieval-enhanced generation architecture that integrates knowledge graphs and large-scale models. It injects equipment safety boundaries, process constraints, and historical strategies as context into the large-scale model, effectively suppressing the "large-scale model illusion" phenomenon and improving the domain compliance of generated parameters. An IF-THEN rule engine is configured to perform six types of checks on candidate parameters of the large-scale model, including equipment rated frequency, upper and lower temperature limits, current thresholds, comfort range, and minimum start-stop interval. Violating parameters are automatically pruned to the boundary or reverted to the current operating parameters, ensuring equipment operational safety from a mechanism perspective.

[0010] Using large model candidate parameters as the initial population mean and search direction guide for the particle swarm optimization, combined with graph verification and a three-layer initialization based on historical best results, the convergence iteration steps are reduced by 30%, significantly improving optimization efficiency and adapting to the real-time requirements of industrial environmental control systems. An energy consumption knowledge graph is constructed, comprising four types of entities—equipment, operating conditions, energy consumption, and faults—and four types of relationships—connected to, acting upon, causing, and constraining—breaking down data silos between equipment runtime sequence data and maintenance documents and historical work orders, achieving unified representation and rapid retrieval of multi-source heterogeneous knowledge.

[0011] The energy savings are calculated using a whole-building metering method based on international energy-saving performance measurement and verification procedures, combined with weather-corrected cooling days. Measurement uncertainty is controlled within 10%, ensuring objective and quantifiable energy-saving performance and avoiding interference from outdoor temperature and load fluctuations in energy-saving assessment. A closed-loop mechanism is established for the entire process, including optimization execution, performance evaluation, graph writing back, and model fine-tuning. Performance samples are automatically accumulated into a LoRA low-rank adaptation fine-tuning training set, allowing for continuous iterative optimization and preventing performance degradation due to equipment aging and operating condition drift over long-term operation. Attached Figure Description

[0012] Figure 1 This document illustrates a flowchart of an energy-saving optimization method for industrial environmental control systems that integrates an energy consumption knowledge graph with a large model, provided in an embodiment of this application. Figure 2 This illustration shows a schematic diagram of an energy consumption knowledge graph and large model fusion energy-saving optimization system for industrial environmental control systems, provided in an embodiment of this application. Detailed Implementation

[0013] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0014] In one implementation, Figure 1 The diagram illustrates a flowchart of an energy-saving optimization method for industrial environmental control systems that integrates an energy consumption knowledge graph with a large model, according to an embodiment of this application.

[0015] S101 collects the operating frequency, valve position current, sub-item power consumption, temperature and humidity, and process load of chiller and heat source units, water pumps and fans, and terminal air conditioners through Modbus / BACnet / OPCUA, and writes them into the time series library through the edge gateway to build a three-level data pool of equipment-system-plant area.

[0016] In one implementation, three industrial protocols—Modbus, BACnet, and OPCUA—are used to interface with devices from different manufacturers. The Modbus protocol is used to collect register data such as operating frequency, valve opening, and compressor current of the chiller / heater unit, with a collection cycle of 10 seconds. The BACnet protocol is used to collect object attribute data such as temperature and humidity, fan speed, and damper opening of the terminal air conditioners, with a collection cycle of 30 seconds. The OPCUA protocol is used to collect node data such as operating frequency, current, power, and process load of water pumps and fans, with a collection cycle of 5 seconds. Each protocol's acquisition thread runs independently, and a network time protocol synchronization mechanism ensures consistency of the time base for multi-source data. Each piece of acquired data includes four basic fields: device number, location name, value, and acquisition timestamp. For example, a chiller unit supports the Modbus RTU protocol and connects to an edge gateway via an RS485 interface. The gateway reads 12 register address data points—outlet water temperature, return water temperature, compressor operating frequency, and condensing pressure—from the unit every 10 seconds. Each piece of data includes a gateway reception timestamp and a unique device number identifier.

[0017] The edge gateway performs three layers of processing on the collected multi-protocol raw data: protocol parsing, unit unification, and format conversion. The protocol parsing layer converts Modbus register values, BACnet object attributes, and OPCUA node values ​​into floating-point numbers. The unit unification layer unifies temperature values ​​to degrees Celsius, power values ​​to kilowatts, and flow rates to cubic meters per hour. The format conversion layer encapsulates each data entry into a structured record containing the device number, location name, value, timestamp, and data quality identifier. Simultaneously, the edge gateway performs preliminary data quality checks, using a range check algorithm to detect out-of-limit data. Based on the device's rated parameters, a reasonable value range is set for each location; data exceeding this range is marked as abnormal and its original value is retained. A rate-of-change check algorithm detects abrupt data jumps, calculating the ratio of the difference between two adjacent collected values ​​to the time interval; data with a rate of change exceeding a preset threshold is marked as suspicious. For example, if a temperature sensor collects a value of 150 degrees Celsius, which exceeds the reasonable range of 0 to 100 degrees Celsius set for that location, the range verification algorithm marks the data as abnormal, sets the data quality flag to 0, and records the abnormality type as exceeding the limit. The data is still written to the cache to await further processing by the subsequent preprocessing module.

[0018] Structured data, after being transformed and initially cleaned by the edge gateway, is uploaded to a message middleware deployed on the factory server via a message queue telemetry transmission protocol. The message middleware stores data in partitions by device number and topic, ensuring message persistence and at-least-once semantics. On the time-series database side, independent consumer processes subscribe to corresponding topics and batch-write the consumed structured records into the time-series database, completing the protocol conversion from message protocol to time-series data write interface. The time-series database uses a measurement name design combining device number and location name. Each record uses a timestamp as the primary index, with numerical values ​​and data quality identifiers as fields. Data writing employs a batch commit strategy; the consumer process triggers a batch write every 100 accumulated records or every 5 seconds to reduce database write pressure. The time-series database is configured with a data retention policy: raw data at the device level is retained for 3 years, aggregated data at the system level is retained for 5 years, and statistical data at the factory level is permanently stored. The database automatically performs downsampling aggregation operations, calculating the average, maximum, and minimum values ​​of the raw data hourly to generate hourly aggregated data, and calculating the daily average value of the hourly data daily to generate daily aggregated data. For example, a water pump operating frequency point is collected at a 5-second cycle, generating 17,280 raw records per day. The edge gateway sends these records to the corresponding topic in the message middleware via the message queue telemetry transmission protocol. After the consumer process subscribes to the topic, it writes the records into the time-series database in batches of 100. The database automatically calculates the average frequency, maximum frequency, and minimum frequency of the point every hour to generate one hourly record. Each day, it calculates the daily average frequency based on 24 hourly records to generate one daily record. The raw data is automatically archived after 3 years.

[0019] The time-series database is organized according to a three-tiered architecture: equipment layer, system layer, and plant layer. A multi-source heterogeneous energy consumption data pool covering the entire environmental control chain is constructed. The equipment layer data pool stores the raw time-series data and derived indicator data for all points of each device, with each device assigned a unique device number as the data pool index key. The system layer data pool aggregates the cold and heat source systems, distribution systems, and terminal air conditioning systems at the environmental control subsystem level, storing subsystem-level statistics such as total energy consumption, average energy efficiency, and operating status. The plant layer data pool stores macro-level statistics such as total plant energy consumption, the energy consumption ratio of each system, and overall energy efficiency ranking, covering the entire plant. The three-tiered data pools are linked using a metadata mapping table, which is stored in a relational database. Each record contains three foreign key fields: equipment number, system number, and plant number, as well as descriptive fields such as equipment name, system type, and plant name. The equipment-level time-series data obtains its system number and plant number by associating the equipment number with the metadata mapping table. This supports layer-by-layer queries, from macro-level indicators of the plant area down to the equipment level and then to specific locations, through the system number. During the query, the relational database returns the hierarchical mapping relationship, and the time-series database returns the indicator data to complete the result assembly. For example, a factory area contains 29 pieces of equipment, including 2 chiller units, 3 chilled water pumps, 4 cooling water pumps, and 20 terminal air conditioners. The relational database metadata mapping table records a record for each piece of equipment, including the equipment number, system number, and factory area number. The system numbers of the 2 chiller units and 4 cooling water pumps are marked as cold and heat source systems, the 3 chilled water pumps are marked as distribution systems, and the 20 terminal air conditioners are marked as terminal systems. The time-series data of the equipment layer is stored in the time-series database according to the equipment number. When a user queries the energy consumption of the entire factory, the relational database is first used to obtain the mapping between all system numbers and equipment numbers under the factory area. Then, the energy consumption data of the corresponding equipment is read in batches from the time-series database and aggregated layer by layer. Finally, the complete drilling path from the total energy consumption of the factory area to the real-time operating frequency of a certain chiller unit is displayed.

[0020] S102 performs resampling alignment, 3σ anomaly removal, and interpolation completion on multi-source time-series data. Based on rated parameters, it calculates real-time COP, transmission and distribution temperature difference loss rate, and partial load rate. After clustering and labeling the cooling / heating / high and low load operating modes, it outputs a standardized feature matrix.

[0021] In one implementation, multi-source time-series data from heat and cold sources, water pumps / fans, and terminal air conditioners are linearly resampled and aligned at a uniform granularity of 1 minute. A sliding window 3σ criterion is used to eliminate single-point anomalies, which are then filled in using spline interpolation. A dual criterion of data integrity rate and sampling period consistency is introduced. The effective sampling rate of each source is calculated, and periods with more than 30% consecutive missing data are marked as invalid. A data quality verification standard is established, and a basis for time-series cleaning decisions is constructed. For multi-source time-series data from heat and cold source units, water pumps / fans, and terminal air conditioners with inconsistent acquisition periods, linear resampling and alignment are performed at a uniform time granularity of 1 minute. The linear resampling algorithm uses the original acquisition timestamp as a node, linearly distributing the values ​​between two adjacent acquisition points to integer moments within a 1-minute interval according to the time distance ratio. The target moment value is equal to the difference between the previous acquisition point value and the subsequent acquisition point value minus the previous acquisition point value, multiplied by the time difference between the target moment and the previous acquisition point, divided by the time interval between adjacent acquisition points. During the resampling process, the timestamps and values ​​of the original data are retained for subsequent anomaly detection reference. The resampling output is a unified time-series sequence for each record, containing four fields: device number, location name, 1-minute integer timestamp, and resampled value. For example, the outlet water temperature of a chiller unit is collected in 10-second cycles, with 6 original collection points within 1 minute. The linear resampling algorithm uses these 6 points as nodes to calculate the values ​​at the 0th and 60th seconds. The value at the 0th second is equal to the original collection value at the 0th second, and the value at the 60th second is equal to the difference between the collection value at the 50th second and the collection value at the 60th second, multiplied by 10 seconds and divided by 10 seconds. Finally, a unified time-series record of 1 record per minute for that location is output.

[0022] A sliding window 3σ criterion is used to perform single-point anomaly detection and removal on the unified time series after resampling and alignment. The sliding window size is set to 31 points, including 15 data points before and after the target. The window slides along the time axis with a step size of 1 point. The arithmetic mean and standard deviation of the data within each window are calculated. If the value of the center point of the current window is less than the mean minus 3 times the standard deviation or greater than the mean plus 3 times the standard deviation, it is marked as an outlier. Outliers are not directly deleted, but their values ​​are set to null while retaining their timestamp position, awaiting processing in subsequent interpolation completion steps. At the same time, the anomaly type is recorded as 3σ limit violation and the time of anomaly occurrence. The sliding window 3σ algorithm adapts to the trend changes of time series data and avoids misjudgments caused by global statistics due to changes in operating conditions. For example, the normal operating frequency of a water pump fluctuates between 35 and 45 Hz. At a certain moment, the collected value suddenly changes to 80 Hz. The average value of the 31-point sliding window at that moment is 40 Hz, the standard deviation is 2 Hz, three times the standard deviation is 6 Hz, and the upper limit for judgment is 46 Hz. Since 80 Hz is greater than 46 Hz, this point is marked as abnormal and set to a null value. The abnormality type is recorded as 3σ exceeding the limit, and interpolation is awaited to complete.

[0023] For null values ​​resulting from 3σ anomaly removal and those from missing data in the original acquisition, cubic spline interpolation is performed for completion. The cubic spline interpolation algorithm divides the entire time series into multiple sub-intervals between adjacent nodes in chronological order. A cubic polynomial function is constructed within each sub-interval, requiring that the function values, first derivatives, and second derivatives of adjacent sub-intervals at the nodes be continuous. The polynomial coefficients for each sub-interval are obtained by solving the three-moment equation system. The completed values ​​are then calculated by substituting the corresponding polynomials based on the time position of the null value. After interpolation completion, a dual judgment mechanism of data integrity rate and sampling period consistency is introduced. A judgment period is defined as 60 one-minute data points per hour. The data integrity rate is calculated as the number of valid data points in that period divided by 60 and multiplied by 100%. The sampling period consistency is calculated as the deviation rate between the actual acquisition interval and the nominal acquisition interval. If more than 18 consecutive points are missing within a certain period (i.e., the missing ratio exceeds 30%), that period is marked as invalid. Data within invalid periods are not included in subsequent energy efficiency calculations and feature extraction; the interpolated completed values ​​are only used for curve display. For example, a terminal air conditioner temperature and humidity monitoring point is missing for 20 consecutive minutes due to a communication interruption. This 20 minutes spans two 1-hour judgment periods. In the first period, 20 points are missing, with a completeness rate of 66.7%, and the continuous missing rate is 33.3%, which exceeds the 30% threshold. This period is marked as invalid. In the second period, 0 points are missing and it is marked as valid. Cubic spline interpolation is used to calculate the complete value using normal data before and after the interruption. However, the complete value in the invalid period is not included in the subsequent energy efficiency index calculation.

[0024] Standardize energy efficiency calculation methods, using COP = Real-time Cooling Capacity / Input Power and Cooling Capacity = Water Flow Rate × Supply and Return Water Temperature Difference × Specific Heat to calculate real-time COP. Calculate derived indicators using Temperature Difference Loss Rate = (Design Temperature Difference - Actual Temperature Difference) / Design Temperature Difference and Load Rate = Real-time Load / Rated Load. A review is triggered when the loss rate exceeds 20%. K-Means is used to cluster and label temperature, humidity, load rate, and seasonal characteristics for cooling / heating / transitional seasons and high / low load conditions, generating detailed feature calculation and labeling rules. Standardize the calculation methods for energy efficiency indicators, calculating real-time COP, distribution temperature difference loss rate, and part-load rate based on pre-processed effective time-series data. The real-time COP calculation formula is the real-time cooling capacity divided by the input power. The real-time cooling capacity calculation formula is water flow rate multiplied by the supply and return water temperature difference multiplied by the specific heat of water multiplied by the density of water. The density parameter is supplemented because water flow rate is usually measured as volumetric flow rate, which needs to be multiplied by density to convert it to mass flow rate before multiplying by the specific heat to obtain the heat. The unit for water flow rate is cubic meters per second, the unit for supply and return water temperature difference is degrees Celsius, the specific heat of water is taken as 4.186 kJ / kg / degree Celsius, and the density of water is taken as 1000 kg / m³. The input power is the total active power of the chiller and heat source unit in kilowatts. The calculated COP is a dimensionless value. The distribution temperature difference loss rate calculation formula is the difference between the design temperature difference and the actual temperature difference, divided by the design temperature difference multiplied by 100%. The design temperature difference is taken as the nominal supply and return water temperature difference on the equipment nameplate, and the actual temperature difference is taken as the measured value of the supply and return water temperature difference at the current moment. A manual verification flag is triggered when the temperature difference loss rate exceeds 20%. The partial load rate is calculated as real-time load divided by rated load multiplied by 100%. Real-time load is the actual cooling capacity at the current moment, and rated load is the rated cooling capacity on the equipment nameplate. All three energy efficiency indicators are calculated at 1-minute intervals and aligned with the time sequence of basic operating parameters. For example, a chiller unit currently has a chilled water flow rate of 50 cubic meters per hour (0.0139 cubic meters per second), a supply water temperature of 7 degrees Celsius, a return water temperature of 12 degrees Celsius, and a supply-return water temperature difference of 5 degrees Celsius. The calculated cooling capacity is 0.0139 multiplied by 5 multiplied by 4.186 multiplied by 1000, which equals 290.9 kilowatts. The unit's input power is 85 kilowatts, and the real-time COP is 290.9 divided by 85, which equals 3.42. The unit's design temperature difference is 5 degrees Celsius, the actual temperature difference is 5 degrees Celsius, and the temperature difference loss rate is 0%. The rated cooling capacity is 350 kilowatts, and the partial load rate is 290.9 divided by 350 multiplied by 100%, which equals 83.1%. All three indicators are marked as valid and written into the feature record at this moment.

[0025] The K-Means clustering algorithm was used to label the preprocessed time-series data with operating conditions. The input feature vector contained four dimensions: current indoor temperature, indoor humidity, partial load factor, and the seasonal code of the current month. The seasonal codes were 1 to 4, corresponding to spring, summer, autumn, and winter, respectively. The K-Means algorithm set the number of clusters K to 6, corresponding to six modes: high load in the cooling season, low load in the cooling season, high load in the heating season, low load in the heating season, transition season, and shutdown. The shutdown mode was added because the original high and low load modes only covered the equipment operating status. When the partial load factor was 0 or the equipment operating frequency was 0, it needed to be classified separately to avoid confusion with the low load mode. The initialization method used the K-Means addition algorithm to select the initial cluster centers to avoid local optima. Euclidean distance was used as the distance metric. The iteration termination condition was that the distance moved by the cluster center was less than 0.001 or the maximum number of iterations (100) was reached. The model training process involves first randomly selecting 10,000 4D feature samples from historical valid time-series data. Six cluster centers are initialized using K-Means. The Euclidean distance from each sample to the center is iteratively calculated, and cluster labels are reassigned. Each cluster center is updated to the mean of the samples within the cluster. This iteration is repeated until the centers converge or reach 100 iterations. The six cluster center vectors are saved for online annotation. For the cold start of new equipment, a pre-trained model from the same type and capacity equipment is directly transferred for annotation during the initial deployment. After accumulating 7 days of valid data, samples are re-selected to train a dedicated model, replacing the transferred model. After clustering, a corresponding operating condition label is assigned to each 1-minute time-series data point. This operating condition label serves as the basis for operating condition matching in the subsequent retrieval enhancement generation module and for constraint selection in the particle swarm optimization module. For example, if at a certain moment the indoor temperature is 26 degrees Celsius, the indoor humidity is 60%, the partial load rate is 85%, and the current month is July (corresponding to summer code 2), this 4-dimensional feature vector is input into the trained K-Means model to calculate the Euclidean distance to the 6 cluster centers. The closest distance to the high load center during the cooling season is 1.2, and this moment is marked as a high load condition during the cooling season. This label is written into the corresponding row of the standardized feature matrix, and the historical energy-saving strategies under this condition will be matched first when the large model is searched in the future.

[0026] Integrating preprocessed data, energy efficiency indicators, and operating condition labels, range standardization is used to unify the dimensions of multiple indicators, preserving the temporal fluctuation trends and operating condition switching boundaries of operating frequency, valve opening, temperature, and humidity. The output is a standardized feature matrix containing basic parameters, energy efficiency indicators, and operating condition labels. Integrating these three types of data—basic operating parameters, energy efficiency indicators, and operating condition labels—an original feature matrix is ​​constructed by aligning them at a 1-minute time granularity. Each row of the matrix corresponds to a 1-minute time point, and each column corresponds to a feature dimension, including seven types of features: equipment operating frequency, valve opening, ambient temperature and humidity, real-time COP, transmission and distribution temperature difference loss rate, partial load rate, and operating condition labels. Range standardization is performed on numerical features other than operating condition labels. The range standardization formula is: the standardized value equals the difference between the original value and the minimum value of the feature, divided by the difference between the maximum value and the minimum value of the feature. After standardization, all numerical features have a uniform value range of 0 to 1. Operating condition labels retain their original integer encoding and are not included in the standardization process. During the standardization process, the minimum and maximum values ​​of each feature are calculated separately according to the equipment number to avoid standardization deviations caused by differences in the rated parameters of different equipment.

[0027] The system preserves the temporal fluctuation trends and operating condition switching boundaries of operating frequency, valve opening, temperature, and humidity by retaining the original 1-minute granular data without smoothing filtering. The final output is a standardized feature matrix containing basic parameters, energy efficiency indicators, and operating condition labels, serving as the unified data foundation for subsequent knowledge graph entity matching, enhanced retrieval of operating conditions, and particle swarm optimization input. For example, if a chiller unit runs continuously for 1440 minutes (24 hours), an original feature matrix of 1440 rows by 7 columns is constructed. The minimum value of the operating frequency column is 20 Hz, and the maximum value is 50 Hz. At a certain moment, the operating frequency is 35 Hz, and the normalized range value is equal to 35 minus 20 divided by 50 minus 20, which equals 0.5. The minimum value of the COP column is 2.5, and the maximum value is 4.2. At a certain moment, the COP is 3.42, and the normalized value is equal to 3.42 minus 2.5 divided by 4.2 minus 2.5, which equals 0.54. The operating condition label column keeps the integer encoding from 1 to 6 unchanged. The final output is a normalized feature matrix of 1440 rows by 7 columns, where each row of timestamps is unique and the features are complete.

[0028] S103 extracts equipment, operating conditions, energy consumption, fault entities, and their connections, functions, and constraints from equipment ledgers, operation and maintenance manuals, and historical work orders. It uses a rule-based approach combined with BERT named entity recognition, and stores the entities in a graph database after entity disambiguation and alignment to construct an energy consumption knowledge graph containing equipment topology and energy flow direction.

[0029] In one implementation, format parsing, sentence-by-sentence segmentation, and unified encoding preprocessing are performed on equipment ledger Excel, maintenance manual PDF, and historical work order Word documents. A dual judgment of entity coverage and relation consistency is introduced. The recognition accuracy is calculated based on the entity confidence score output by BERT-base-chinese combined with sampling annotations. An entity type verification standard is established by combining semantic features of equipment number, operating parameters, energy consumption values, and fault codes, thus constructing the basis for knowledge extraction decisions and entity discrimination criteria. A three-layer preprocessing process—format parsing, sentence-by-sentence segmentation, and unified encoding—is performed on the three heterogeneous document types: equipment ledger Excel, maintenance manual PDF, and historical work order Word. The format parsing layer extracts fields such as equipment number, equipment name, model, rated power, and system affiliation from Excel; it uses a text extraction engine to extract paragraph text such as maintenance procedures, fault handling processes, and parameter thresholds from PDF pages; and it extracts structured fields such as work order number, fault phenomenon, handling measures, and replaced parts from Word documents using paragraph objects. The sentence segmentation layer uses Chinese periods, question marks, and exclamation marks as sentence delimiters to segment the extracted continuous text into independent sentences. Each sentence retains three location fields: source document number, page number or line number, and sentence sequence number. The encoding unification layer converts all text to UTF-8 encoding, removing invisible characters and redundant whitespace to ensure consistent encoding for subsequent BERT model inputs. The preprocessed output is a sentence corpus where each record contains four fields: sentence number, sentence text, source document type, and source location field. For example, an Excel file containing equipment records has 50 rows in one worksheet. The format parsing layer traverses each row and extracts four fields: equipment number, equipment name, model, and rated power. In the 10th row, the equipment number is CH-01, the equipment name is No. 1 chiller unit, the model is centrifugal chiller unit, and the rated power is 85 kilowatts. These four fields are concatenated into a text record and then processed into a sentence by the sentence segmentation layer. The sentence number is set to S001, the source document type is marked as Excel, and the source location field is marked as the 10th row. Finally, the sentence is written into the sentence corpus.

[0030] The BERT-based-Chinese pre-trained model is used as the foundation for named entity recognition. The model structure comprises three modules: an input embedding layer, a 12-layer Transformer encoder, and an output classification layer. The input embedding layer consists of word embeddings, segment embeddings, and position embeddings. The word embedding dimension is 768, the segment embedding is used to distinguish between preceding and following segments, and the position embedding uses absolute position encoding with a maximum length of 512. Each of the 12-layer Transformer encoder layers contains a multi-head self-attention sublayer and a feedforward network sublayer. The multi-head self-attention sublayer has 12 attention heads, each with a dimension of 64. The feedforward network sublayer has a hidden dimension of 3072 and uses Gaussian error linear units as the activation function. Both sublayers are followed by residual connections and layer normalization. The output classification layer takes the 768-dimensional vector output by the encoder corresponding to each input token, and connects it to a fully connected layer to map it to entity label dimensions. Entity labels adopt the BIO annotation system, where B represents the start of an entity, I represents the interior of an entity, and O represents a non-entity. There are four entity categories corresponding to eight labels: B (device), I (device), B (operating condition), I (operating condition), B (energy consumption), I (energy consumption), B (fault), and I (fault), totaling nine categories including the O label. The model training steps are as follows: First, prepare labeled data. 2000 sentences are randomly selected from the sentence corpus to construct the training annotation set. The boundaries and types of the four entity categories (device, operating condition, energy consumption, and fault) are manually labeled using the BIO annotation system. The training annotation set and the sampling annotation set used for subsequent accuracy evaluation are independent and have no overlapping sentences. Second, data preprocessing. The labeled sentences are converted to BERT input format, with each character mapped to a word embedding index and the label mapped to an integer index from 0 to 8. Sequences shorter than 128 are padded with zeros and truncated when longer than 128. Third, model initialization. BE is loaded. The first step involves pre-training weights using RT-base-chinese, initializing the output classification layer weights with a truncated normal distribution and a standard deviation of 0.02. The fourth step is fine-tuning training, using AdamW as the optimizer, with a learning rate of 2e-5, weight decay of 0.01, a batch size of 16, 3 training epochs, a 10% warm-up learning rate, cross-entropy loss, and a dropout rate of 0.1. The fifth step is validation and saving, where 20% of the training annotation set is used as a validation set. After each training epoch, the entity-level F1 score is calculated, and the model with the highest F1 score is saved for subsequent inference. During model inference, the input is a single sentence of text, and the output is a sequence of entity labels corresponding to each character. BIO label decoding yields four fields for the entity: start position, end position, entity type, and entity text. Simultaneously, the confidence score for each entity is output, which is the softmax probability mean of the corresponding label.For example, if the text of a sentence is "When the outlet water temperature of chiller unit 1 is 7 degrees Celsius, the COP is 3.42", the trained BERT model will output the following label sequence: chiller unit 1 corresponds to B Equipment I Equipment I Equipment I Equipment I Equipment, outlet water temperature corresponds to B Operating Condition I Operating Condition, 7 degrees Celsius corresponds to B Energy Consumption I Energy Consumption, and COP of 3.42 corresponds to B Energy Consumption I Energy Consumption I Energy Consumption I Energy Consumption. Decoding yields four entities: equipment entity text is chiller unit 1 with a confidence score of 0.96, operating condition entity text is outlet water temperature with a confidence score of 0.91, energy consumption entity 1 text is 7 degrees Celsius with a confidence score of 0.88, and energy consumption entity 2 text is COP of 3.42 with a confidence score of 0.85. These four entities and their confidence scores are written into the BERT candidate entity list.

[0031] The BERT candidate entity list and the candidate entity list recalled by the regular dictionary rules are subjected to dual quality assessment based on entity coverage and relation consistency. The two results are calculated independently and then summarized into an overall quality index. Entity coverage is calculated as the number of identified entities of a certain type divided by the number of manually annotated baselines for that type of entity in the document, multiplied by 100%. The manually annotated baselines are obtained by manually annotating a sampled annotation set independent of the training annotation set, which is randomly selected from 5% of sentences in each type of document. When the coverage is lower than 80%, model retraining or regular dictionary supplementation is triggered for that document type. Relation consistency is calculated as the matching ratio of entity pairs extracted in the same sentence with a preset relation template. The preset relation template includes four categories: device connected to device, device acting on operating conditions, operating conditions causing failures, and device constraining energy consumption. When the matching ratio is lower than 70%, relation extraction rule optimization is triggered. The recognition accuracy is calculated by combining the entity confidence score from BERT output with an independently sampled annotation set. 100 entities are randomly selected from all recognition results and compared with the sampled annotation set. The accuracy is calculated by dividing the number of accurately recognized entities by 100 and multiplying by 100%. If the accuracy is below 90%, the model needs to be fine-tuned. An entity type verification standard is established based on the semantic features of equipment number, operating parameters, energy consumption value, and fault code. Equipment entities must contain equipment number or model keywords; operating parameter entities must contain parameter keywords such as temperature, pressure, and flow rate; energy consumption entities must contain numerical values ​​plus units or COP power keywords; and fault entities must contain fault codes or abnormal alarm keywords. Entities that do not conform to the semantic features are marked as needing review. This verification standard is uniformly applied to all fused entities after voting fusion. The dual-judgment output includes four quality indicators for each batch of documents: BERT coverage, rule coverage, overall relationship consistency, and recognition accuracy, as well as a list of entities needing review, constructing the basis for knowledge extraction decisions and entity discrimination criteria. For example, a batch contains 20 operation and maintenance manual PDFs. 5% (1 manual) is randomly selected to construct an independent sampling annotation set. The baseline includes 30 device entities, 25 operating condition entities, 20 energy consumption entities, and 15 fault entities. The BERT model identification results include 26 devices, 24 operating conditions, 19 energy consumption entities, and 12 fault entities. The regular expression rule recall results include 28 devices, 22 operating conditions, 18 energy consumption entities, and 14 fault entities. The calculated BERT device coverage is 86.7%, the rule device coverage is 93.3%, and the overall fault coverage, after merging and deduplicating the two types of results, is 93.3%, higher than the 80% threshold. The relation consistency matching ratio is 75%, higher than the 70% threshold. 100 entities are randomly selected from the fusion results and compared with the independent sampling annotation set; 92 are accurate, resulting in an accuracy rate of 92%, higher than the 90% threshold. This batch of documents passes the dual-judgment process and enters the subsequent fusion extraction stage.

[0032] The document standardizes the attribute fields and unique identifiers for four types of entities. For equipment entities, the equipment number is used as the primary key. A voting fusion strategy is established, combining regular expression dictionary rule retrieval with BERTBIO annotation recognition results. Directional constraints and trigger word templates for four types of relationships—connecting to, acting on, causing, and constraining—are established to avoid duplicate entity annotations and confusion of relationship directions. Entity relationship extraction rules and ontology modeling execution details are generated. Specifically, the document defines the attribute fields and unique identifiers for the four types of entities: Equipment entity attributes include six fields: equipment number, equipment name, model, rated power, system, and installation location, with the equipment number as the unique primary key; Operating condition entity attributes include four fields: operating condition name, parameter unit, upper limit of normal range, and lower limit of normal range, with the operating condition name plus the equipment number as the unique identifier; Energy consumption entity attributes include four fields: indicator name, value, unit, and collection time, with the indicator name plus the collection time plus the equipment number as the unique identifier; and Fault entity attributes include four fields: fault code, fault phenomenon, occurrence time, and equipment number, with the fault code plus the occurrence time plus the equipment number as the unique identifier. A voting fusion strategy was established to combine the recall results from the regular dictionary rules with the BERT TIO annotation recognition results. The regular dictionary rules include four dictionaries: device number dictionary, operating condition parameter dictionary, energy consumption index dictionary, and fault code dictionary. Each dictionary stores common keywords and regular expression matching patterns for that type of entity. The regular rules perform pattern matching on sentences to obtain a set of candidate entities for the rules, and the BERT model infers from the same sentence to obtain a set of candidate entities for the model. The entities in the two sets are aligned according to the start and end positions of the entity text in the sentence. A voting fusion rule is adopted: entities identified by both the rules and the model are marked as high-confidence and directly adopted; entities identified by the rules alone are marked as medium-confidence and require further verification; entities identified by the model alone are marked as low-confidence and undergo a second verification based on the context. If the second verification passes, the entity is adopted; otherwise, it is discarded. After fusion, all adopted entities are uniformly subjected to the semantic feature verification standard established in step three. Entities that do not meet the verification standard are downgraded from high-confidence to requiring further verification. The voting fusion strategy effectively reduces the missed detections and false detections of a single method, the regular dictionary ensures the recall rate of known entities, and the BERT model ensures the generalization ability of unknown entities.

[0033] For example, given the sentence "CH-01 chiller unit high water supply temperature alarm E015", the regular expression dictionary rules match CH-01 as the equipment number, water supply temperature as the operating parameter, and E015 as the fault code, resulting in 3 candidate entities. The BERT model identifies CH-01 chiller unit as the equipment, water supply temperature as the operating parameter, high as the operating parameter description, and E015 as the fault, resulting in 4 candidate entities. After alignment, CH-01 chiller unit overlaps with the CH-01 part in the rule, and the voting fusion determines it as the equipment entity with high confidence, thus accepting it. Both parties identified water temperature as a high-confidence operating condition and adopted it. Both parties identified E015 as a high-confidence fault and adopted it. The high-confidence fault was only identified as low-confidence by the model. Based on the context, it was determined that the fault phenomenon description did not belong to an independent entity and was therefore removed. After fusion, semantic verification was uniformly performed on the three adopted entities. CH-01 contains the keyword "equipment number" and meets the equipment verification standard. Water supply temperature contains the keyword "temperature" and meets the operating condition verification standard. E015 contains the keyword "fault code" and meets the fault verification standard. All three entities passed the verification and maintained high confidence. Finally, three fused entities were output.

[0034] Establish directional constraint and trigger word templates for four types of relationships: Connecting to, Acting on, Causing, and Constraining. Connecting to describes the physical topology connection between devices, with a directional constraint from upstream device to downstream device. The trigger word template includes keywords such as connect, access, series, parallel, outlet connection, and inlet connection. The entity pair type is device to device. Acting on describes the adjustment effect of devices on operating parameters, with a directional constraint from device to operating condition. The trigger word template includes keywords such as adjust, control, maintain, set, and output. The entity pair type is device to operating condition. Causing describes the causal relationship between abnormal operating conditions and faults, with a directional constraint from operating condition to fault. The trigger word template includes keywords such as cause, trigger, result, and occur. The entity pair type is operating condition to fault. Constraining describes the limitation of energy consumption indicators by device safety boundaries or process requirements, with a directional constraint from device to energy consumption. The trigger word template includes keywords such as not exceeding, not lower than, limit, rated, upper limit, and lower limit. The entity pair type is device to energy consumption. Relation extraction employs a rule-matching method based on trigger word templates. For each entity pair identified in a sentence, it checks whether a trigger word exists between the two entities to indicate a corresponding relationship. If so, a relation triple is generated, consisting of a head entity, a relation type, and a tail entity. The trigger word and sentence number are recorded as evidence of the relation's origin. Directional constraints are used to verify whether the head and tail entity types of the relation triple match preset types. If they do not match, the relation is marked as having an abnormal direction and is removed. To avoid duplicate entity labeling and confusion regarding relation directions, entity relation extraction rules and ontology modeling execution details are generated.

[0035] For example, a sentence might read: "The outlet of chiller unit 1 is connected to the inlet of the chilled water pump. The chilled water pump regulates the water supply pressure. If the water supply pressure is too low, an insufficient flow alarm will be triggered. The rated power of chiller unit 1 does not exceed 85 kilowatts." Entity recognition identifies two equipment entities: chiller unit 1 and chilled water pump; one operating condition entity: water supply pressure; one fault entity: insufficient flow alarm; and one energy consumption entity: 85 kilowatts. Trigger word matching detects a connection keyword between chiller unit 1 and chilled water pump, generating a "connected to" triplet with the head entity "chiller unit 1" and the tail entity "chilled water pump." The direction is from device to device conforming to the constraint; there is a regulating keyword between the chilled water pump and the water supply pressure, generating a triplet relationship with the head entity chilled water pump, the relationship with, and the tail entity water supply pressure; there is a causing keyword between the water supply pressure and the insufficient flow alarm, generating a triplet relationship with the head entity water supply pressure, the relationship causing, and the tail entity insufficient flow alarm; there is an not exceeding keyword between chiller unit 1 and 85 kW, generating a constraint triplet relationship with the head entity chiller unit 1, the relationship constraint, and the tail entity 85 kW. All four triplet relationships are written into the relationship set after passing the direction verification.

[0036] The system integrates extracted entity attributes and relation triples, and uses a disambiguation module based on precise matching of device IDs and attribute cosine similarity to merge synonymous entities and resolve attribute conflicts. It employs the Neo4j graph database, storing nodes with labeled attributes and edges with relational types, preserving device topology connections and energy flow paths, and outputting an energy consumption knowledge graph containing four types of entities and their relationships. The disambiguation module, based on precise matching of device IDs and attribute cosine similarity, merges synonymous entities across data sources and resolves attribute conflicts. The disambiguation module comprises two layers: a precise matching layer and a similarity calculation layer. The precise matching layer uses the device ID as a unique key to perform precise matching of device entities from different documents; entities with identical IDs are considered the same device and merged directly. Non-device entities (operating condition, energy consumption, and fault) lack unique IDs and are processed in the similarity calculation layer. The similarity calculation layer concatenates the attribute field text of entities into attribute description strings. Using a bag-of-words model combined with inverse document frequency weights, it converts the attribute description strings into high-dimensional sparse vectors. It then calculates the cosine similarity between two entity attribute vectors. The cosine similarity formula is the dot product of the two vectors divided by the product of their magnitudes. The similarity value ranges from 0 to 1, with a similarity threshold of 0.85. Entities with similarities exceeding 0.85 are considered synonyms and merged; those below 0.85 are considered different entities and retained. The attribute conflict resolution rules are as follows: when merging synonymous entities, for numerical attributes, the value from the equipment ledger is used as the baseline value, the value from the maintenance manual as the reference value, and the value from historical work orders as a temporary value. If the baseline value and the reference value are inconsistent, the baseline value is used, and the reference value is recorded as a note. Temporary values ​​are only used for fault records and do not overwrite the baseline value. For textual attributes, the longest description is used as the merged attribute value, while retaining the text from each source as the attribute's historical version. The disambiguation module outputs the merged entity set and attribute conflict handling logs, ensuring that there are no duplicate entities in the knowledge graph and that attribute values ​​are authoritative and consistent.For example, in the equipment ledger Excel file, the entity attribute for equipment number CH-01 is: Equipment Name: Chiller Unit 1, Rated Power: 85 kW, System Cold / Heat Source. The centrifugal chiller unit mentioned in the maintenance manual PDF file has no equipment number, but its attribute description is: Centrifugal Chiller Unit 1, Cooling Capacity: 350 kW, Power: 85 kW. In the historical work order Word file, when CH-01 malfunctioned, the attribute was recorded as abnormal outlet water temperature and power fluctuation. The precise matching layer directly merges equipment ledger CH-01 with work order CH-01 if their numbers match. The centrifugal chiller unit No. 1 in the operation and maintenance manual has no number and enters the similarity calculation. The cosine similarity between its attribute description vector and the attribute description vector of the merged CH-01 is 0.91, which exceeds the threshold of 0.85. It is judged as a synonym entity and merged. When resolving attribute conflicts, the rated power of 85 kW is consistent among the three parties and the benchmark value is taken. The equipment name is taken as the longest description of centrifugal chiller unit No. 1. The cooling capacity of 350 kW is taken as the reference value from the operation and maintenance manual. The abnormal outlet water temperature is taken as the temporary value from the work order and recorded as the fault history. After merging, a single equipment entity node without duplicates is generated.

[0037] The Neo4j graph database is used to store disambiguated entity and relation data using nodes with labeled attributes and edges with relation types. The node storage rule is one node per entity. Node labels are set to one of four entity types: equipment, operating condition, energy consumption, and fault. Node attributes store key-value pairs of all attribute fields for the entity. Equipment nodes additionally have an equipment number attribute as a unique constraint index. Operating condition nodes have a combined index of operating condition name and associated equipment number. Energy consumption nodes have a combined index of indicator name, collection time, and associated equipment number. Fault nodes have a combined index of fault code, occurrence time, and associated equipment number. These indexes are used to accelerate subsequent graph retrieval queries. The edge storage rule is one directed edge per relation triple, with the starting point being the head entity node and the ending point being the tail entity node. Edge types are set to one of four relation types: connect to, act on, cause, and constraint. Edge attributes store three evidence fields: trigger word, source sentence number, and source document number. Data import employs a batch submission method, triggering a transaction commit every 500 nodes or 500 edges. Upon completion, node uniqueness and connectivity checks are performed to ensure no duplicate nodes or isolated relationships. Equipment topology connections and energy flow paths are preserved. Connections and edges between devices constitute the physical topology network. The energy flow path, from the chiller / heater unit through pumps and fans to the terminal air conditioner, is obtained through graph query language traversal. The final output is an energy consumption knowledge graph containing four types of entities: equipment, operating conditions, energy consumption, and faults, and four types of relationships: connection to, action on, cause, and constraint. This graph serves as the knowledge data source for subsequent retrieval enhancement generation modules.

[0038] For example, after the knowledge graph of a certain factory area is imported, it contains 729 nodes in total, including 29 equipment nodes, 120 operating condition nodes, 500 energy consumption nodes, and 80 fault nodes. It also contains 274 edges, including 45 connecting edges, 120 acting edges, 80 causing edges, and 29 constraint edges. The node uniqueness verification confirms that the equipment numbers of the 29 equipment nodes are unique and without duplicates. The relational connectivity verification confirms that the starting and ending points of all edges have corresponding nodes. The graph query traversal starts from the No. 1 chiller unit node and follows the connecting relational edges to reach the chilled water pump node and then to the terminal air conditioning node. This path is the cooling energy flow path. When searching the graph, the associated equipment path and energy consumption constraint nodes can be quickly located according to the current operating condition.

[0039] S104: Construct a search enhancement generation framework. Based on the current operating conditions, retrieve related equipment paths, energy consumption constraints, and historical strategies from the graph and inject them into the large model for hints. After the large model generates candidate parameters, it is verified by the graph rule engine to see if it violates the equipment safety boundary and process constraints. Conflict items are corrected or rolled back to the safety baseline.

[0040] In one implementation, the current work condition features are encoded using Sentence-BERT and then subjected to cosine similarity matching and 2-hop graph traversal path retrieval with the knowledge graph entity vectors. The retrieval results are uniformly formatted as JSON and assembled according to the prompt word template, suppressing irrelevant paths and strengthening associated equipment and constraint features. The Sentence-BERT model is used to encode the current work condition feature text and the knowledge graph entity description text separately. The Sentence-BERT model adopts a dual-tower shared weight structure, containing two identical BERT-base encoders. Each encoder consists of an input embedding layer, a 12-layer Transformer encoder, and a mean pooling layer. The input embedding layer has a dimension of 768, the 12 Transformer layers each have 12 attention heads, and the feedforward network has a dimension of 3072. The mean pooling layer takes the arithmetic mean of all token vectors output by BERT to obtain a 768-dimensional sentence embedding vector. The two encoders share all weight parameters. During inference, they receive query text and candidate text inputs respectively, and output two 768-dimensional embedding vectors. Cosine similarity is used to calculate the matching score, which is calculated as the dot product of the two vectors divided by the product of their magnitudes. The score range is -1 to 1. The model uses publicly pre-trained Chinese Sentence-BERT weights for direct inference. If domain adaptation is required, contrastive learning can be used for fine-tuning. The fine-tuning training steps are as follows: First, prepare training data by constructing positive sample pairs (work condition description and corresponding entity description) and negative sample pairs (work condition description and random unrelated entity description) from historical work condition records and graph entity pairings, with a positive-to-negative sample ratio of 1:3. Second, use the contrastive loss function (triple loss) for training. The loss function formula is positive sample distance minus negative sample distance plus margin, with the maximum value compared to 0. The margin is set to 0.5. Third, the optimizer uses AdamW with a learning rate of 2e-5, a batch size of 32, 2 training epochs, and a maximum sequence length of 128. Fourth, save the fine-tuned model weights for inference. The current operating condition feature input is set to concatenate the equipment number, operating condition label, indoor temperature, indoor humidity, partial load factor, and real-time COP into a natural language description text. Graph entity vectors are pre-calculated offline and stored in a vector database. The description text for each graph entity includes the entity name, attribute fields, and a summary of relationships. After offline encoding, these are stored in the vector database to create an index. During online inference, the current operating condition description text is input into the Sentence-BERT encoder to obtain the query vector. The top 50 graph entities with the highest cosine similarity are retrieved from the vector database as the initial screening results.

[0041] For example, if the current operating condition description text at a certain moment is "Chiller Unit 1, high load during the cooling season, indoor temperature 26 degrees Celsius, humidity 60%, load rate 85%", after Sentence-BERT encoding, a 768-dimensional query vector is obtained. The top 50 entities with the highest cosine similarity are retrieved from the vector database. The entity ranked first is the Chiller Unit 1 equipment node with a similarity of 0.94, the entity ranked second is the outlet water temperature operating condition node with a similarity of 0.88, and the entity ranked third is the rated power 85 kilowatts energy consumption constraint node with a similarity of 0.82. These 50 initially screened entities enter the subsequent 2-hop graph traversal stage.

[0042] The top 50 entity nodes obtained from the initial vector matching screening are subjected to 2-hop graph traversal path retrieval. The 2-hop traversal algorithm starts with the initially screened entity nodes and expands outwards along the relation edges in the knowledge graph by two layers of neighboring nodes. The first layer of traversal obtains the 1-hop neighboring nodes directly connected to the starting point and their relation types. The second layer of traversal continues to expand from each 1-hop neighboring node to obtain 2-hop neighboring nodes and their relation types. During the traversal, the complete path is recorded, including the starting node, first-layer relation, 1-hop node, second-layer relation, and 2-hop node. Paths whose relation types do not belong to the four categories of "connect to," "act on," "cause," and "constraint" are filtered out. After the traversal is complete, all paths are deduplicated and sorted by weighted average of the number of constraint-type relations and the number of historical strategy-type nodes contained in the path. The weight of constraint relations is set to 2, the weight of historical strategy nodes is set to 1, and the weight of device topology relations is set to 0.5. Higher scores result in higher rankings. The search results are uniformly in JSON structured format. Each result contains six fields: path number, starting entity name, path node list, path relationship list, path score, and source graph node ID. These fields are assembled into contextual text fragments according to the prompt word template requirements. Irrelevant paths are suppressed, i.e., paths with a path score below the threshold of 0.3 are directly removed. Paths with associated equipment and constraint features are strengthened, i.e., paths containing equipment rated parameters and comfort constraints are preferentially retained.

[0043] For example, starting with the chiller unit node 1 in the initial screening of the top 50 entities, a 2-hop traversal is performed. The first layer goes to the chilled water pump node along the connection relationship, to the rated frequency 20 to 50 Hz constraint node along the constraint relationship, and to the outlet water temperature condition node along the action relationship. The second layer goes to the terminal air conditioning node from the chilled water pump node along the connection relationship, to the current threshold 120 amp constraint node from the rated frequency constraint node along the constraint relationship, and to the low supply water temperature fault node from the outlet water temperature condition node along the cause relationship. A total of 6 2-hop paths are obtained. After deduplication, they are sorted by weight. The path containing the rated frequency constraint and the current threshold constraint has the highest score of 4.5 and is retained. The path containing only the equipment topology connection has a score of 1.0 which is lower than the threshold and is removed. Finally, 4 highly relevant paths are retained. Each path is assembled into a JSON structured result and converted into natural language context fragments. For example, chiller unit 1 is connected to chilled water pump, chiller unit 1 is constrained to rated frequency 20 to 50 Hz and current threshold 120 amp.

[0044] The three-layer progressive injection is performed based on the priority of equipment topology association, energy consumption constraint boundary, and historical energy-saving strategy. The equipment topology layer performs subgraph traversal retrieval, the energy consumption constraint layer performs parallel attribute threshold extraction, and the historical strategy layer performs similarity sorting and Top-K filtering. This reduces the retrieval complexity from full graph scanning to subgraph-oriented retrieval, constructing a low-complexity retrieval enhancement generation basis and hierarchical injection discrimination criteria. The three-layer progressive injection is performed sequentially, with the output of the previous layer serving as the filtering condition for the input of the next layer. The first layer, the equipment topology layer, performs subgraph traversal retrieval. Centered on the core equipment node associated with the current operating condition, it traverses the connection and relationship edges within a 1-hop range to obtain the upstream and downstream equipment topology subgraph. The maximum number of subgraph nodes is set to 20. If the number is exceeded, the nodes are filtered and retained according to their importance, i.e., cold and heat source equipment has the highest weight, followed by water pumps and fans, and then terminal air conditioners. The output of the equipment topology layer is a list of associated equipment and text of topology connection relationships. The second energy consumption constraint layer performs parallel attribute threshold extraction. For each device node output from the first layer, it queries the constraint-type relationship edges and energy consumption-type attributes of the device in parallel, extracting four safety boundary parameters: rated frequency upper and lower limits, temperature upper and lower limits, current threshold, and power upper limit, as well as two process constraint parameters: comfort range and minimum start-stop interval. The output of the energy consumption constraint layer is a dictionary text of device constraint parameters. The third historical strategy layer performs similarity sorting and Top-K filtering. In the set of historical energy-saving strategy nodes, the cosine similarity is calculated between the current operating condition feature vector and the operating condition label vector of the historical strategy. The nodes are sorted in descending order of similarity, and the top K are selected, i.e., K is set to 3 historical strategies. The output of the historical strategy layer is a text of historical energy-saving parameter schemes under similar operating conditions. The three-layer progressive injection reduces the retrieval complexity from the high complexity of full graph scanning (i.e., traversing all nodes and edges) to the low complexity of subgraph-oriented retrieval (i.e., traversing only the nodes and edges within the 2-hop range of the core equipment). The number of nodes in the subgraph is much smaller than the number of nodes in the full graph, which builds the basis for low-complexity retrieval enhancement generation and the criteria for hierarchical injection discrimination.

[0045] For example, in the current operating condition, the core equipment is chiller unit 1. The first-layer equipment topology layer traverses the 1-hop connections to obtain 5 equipment nodes: chilled water pump, cooling water pump, and 3 terminal air conditioners. All nodes are retained as they do not exceed the 20-node limit. The output topology text is: chiller unit 1 is connected to chilled water pump and cooling water pump, and the chilled water pump is connected to 3 terminal air conditioners. The second-layer energy consumption constraint layer queries the constraint attributes of 6 devices in parallel, extracting the rated frequency (20-50 Hz), outlet water temperature (7-12 degrees Celsius), current threshold (120 amps), and power consumption of chiller unit 1. The maximum power output is 85 kW, the rated frequency of the chilled water pump is 20 to 50 Hz, the minimum start-stop interval is 300 seconds, the comfort range of the terminal air conditioner is 24 to 28 degrees Celsius, and the humidity is 40% to 70%. The output constraint parameter dictionary text is used. The third layer, the historical strategy layer, calculates the cosine similarity among 120 historical strategies and takes the top 3, which are the cooling season high load outlet water temperature of 8 degrees Celsius, the cooling season high load water pump frequency of 35 Hz, and the cooling season high load fresh air ratio of 30%. The injection results of the three layers together constitute the search context of the prompt words.

[0046] The system standardizes the logic for constructing prompt terms, validating the rule engine, and resolving conflicts. It establishes a four-part template: system prompts, search context, conditional input, and output format constraints. The search results are used as a triple embedding of contextual constraints, few-shot examples, and output format limitations. After the large model outputs candidate parameters in JSON format, the IF-THEN rule engine validates the equipment's rated frequency, temperature upper and lower limits, current threshold, comfort range, and minimum start-stop interval. It sets a handling standard for prioritizing the removal of non-compliant parameters to within the boundaries, and reverting to the current operating parameters when removal is not possible. This generates detailed execution rules for search injection, rule validation, and conflict resolution. The system prompt is structured as a role definition and task description, stating that the user is an energy-saving optimization expert for industrial environmental control systems. Based on given equipment constraints and historical strategies, the user should output energy-saving optimization parameter suggestions for the current operating conditions, ensuring the parameters are within the equipment's safety boundaries. The second part, the search context, is assembled from the three-layer progressive injection results of step three, including equipment topology relationships, safety constraint parameters, and the first three historical energy-saving strategies, each separated by a clear delimiter. The third input segment, the operating condition input, is the real-time operating condition data at the current moment, including seven fields: equipment number, operating condition label, indoor temperature, indoor humidity, partial load factor, real-time COP, and current operating parameters, filled in using natural language descriptions. The fourth output format constraint explicitly requires the large model to output in JSON format, including four parameter fields: outlet water temperature setting, pump frequency setting, fan frequency setting, and fresh air distribution ratio. Each field is numerical, and a text field explaining the reason for parameter adjustments is also output. A three-tiered embedding method is established, using search results as contextual constraints, few-shot examples, and output format limitations. The first layer of contextual constraint embedding involves writing the retrieved equipment safety boundaries and process constraints into the system prompts and search context segment, serving as hard constraints that the large model must adhere to during generation. The second layer of few-shot example embedding involves writing the first three historical energy-saving strategies as examples into the search context segment, each example including operating conditions and corresponding parameter schemes, guiding the large model to generate based on historical strategies. The third layer of output format limitation embedding involves writing the JSON field requirements into the output format constraint segment, forcing the large model to output according to a specified structure for easier subsequent parsing. The total length of the prompt words is controlled within 4096 tokens. If it exceeds this, the system prompts and output format constraints are retained first, then the constraint parameters are retained, and finally the historical strategy examples are truncated.For example, after the prompt word is assembled at a certain moment, the system prompt segment will say: "You are an industrial environmental control and energy-saving expert. Please output the energy-saving parameters within the safety constraints." The search context segment includes six constraint parameters such as the topology of the chiller unit's connection to the chilled water pump and cooling water pump, and the rated frequency of 20 to 50 Hz, as well as three historical strategies such as the high-load outlet water temperature of 8 degrees Celsius during the cooling season. The operating condition input segment is the current indoor temperature of chiller unit 1 during the high-load cooling season: 26 degrees Celsius, humidity 60%, load rate 85%, COP 3.42, and current outlet water temperature 7 degrees Celsius. The output format constraint segment requires outputting the outlet water temperature setting, water pump frequency setting, fan frequency setting, fresh air ratio, and adjustment reason in JSON format. The total length is approximately 1200 tokens, which is within the limit. All three embeddings are included, and this prompt word is used for inference in the large model.

[0047] The large-scale model uses an open-source Chinese large language model as an optional example. The model structure is a Transformer decoder architecture, with 7 billion parameters and a context window length of 8192 tokens. In actual deployment, it can be replaced with a model of the same architecture but with different parameter counts, depending on edge computing power or cloud resources. Greedy decoding is used during inference, selecting the token with the highest probability at each step. The temperature parameter is set to 0.1 to reduce generation randomness and improve parameter stability, and the maximum generation length is set to 512 tokens. The large-scale model's input is the four-segment prompt assembled in step four, and the output is a JSON structure wrapped in natural language text. After output, a JSON parsing process is executed. The first step uses regular expression matching to extract the content between the first left curly brace and the last right curly brace as a JSON string. The second step uses a JSON parsing library to convert the string into a key-value pair dictionary. The third step verifies whether the dictionary contains four required fields: outlet water temperature setting, water pump frequency setting, fan frequency setting, and fresh air ratio. Missing fields are marked as generation anomalies, triggering regeneration, with a maximum of 3 retries. After successful parsing, a candidate parameter dictionary is obtained, with each parameter value being a floating-point number. Simultaneously, a text field explaining the adjustment reason is extracted for subsequent log recording. The integration of large model generation with business logic lies in the fact that the constraint parameters and historical strategies in the prompt words are retrieved from the knowledge graph in real time. The generated results must be verified by the subsequent rule engine before they can be distributed. The large model is only responsible for generating parameter candidates and does not directly control the device.

[0048] For example, after receiving the prompt words, the large model outputs JSON content with the following settings: water outlet temperature set to 9 degrees Celsius, water pump frequency set to 32 Hz, fan frequency set to 28 Hz, fresh air ratio 25%, and the reason for adjustment is that the current load rate is 85% and that appropriately increasing the water outlet temperature can reduce the power consumption of the compressor. The JSON parsing extracts the four required fields, which are all present. This is converted into a candidate parameter dictionary: water outlet temperature 9, water pump frequency 32, fan frequency 28, fresh air ratio 0.25. The reason for adjustment is saved simultaneously, and the candidate parameters enter the rule engine verification stage.

[0049] The IF-THEN rule engine is used to perform safety boundary and process constraint verification on the candidate parameters output by the large model. The rule engine consists of four components: a parameter prediction module, a rule base, an inference engine, and a conflict resolution module. The parameter prediction module trains three types of linear regression prediction models based on historical equipment operating data. The first type, current prediction model, takes pump frequency and fan frequency as input and outputs the estimated total current. The training data is frequency-current paired data from the past three months of normal operation, and the least squares method is used for fitting. The model form is: estimated current equals a constant term plus the pump frequency coefficient multiplied by the pump frequency plus the fan frequency coefficient multiplied by the fan frequency. The second type, power prediction model, takes outlet water temperature setting and pump frequency as input and outputs the estimated total power, also using linear regression fitting. The third type, room temperature prediction model, takes fresh air ratio and outdoor temperature as input and outputs the estimated indoor temperature, also using linear regression fitting. All three prediction models are trained offline and deployed on the rule engine before rule verification, and are invoked in real time during verification. The rule base stores validation rules in the form of IF condition THEN conclusion. Each rule contains four fields: rule number, condition expression, conclusion type, and action. The rule base has six pre-defined validation rule types: The first type is equipment rated frequency validation: IF pump frequency setting is less than 20 or greater than 50, THEN conclusion is frequency over-limit, action is trimming to the boundary; the second type is temperature upper and lower limit validation: IF outlet water temperature setting is less than 7 or greater than 12, THEN conclusion is temperature over-limit, action is trimming to the boundary; the third type is current threshold validation: IF parameter estimation module output estimated current is greater than 1... The first category, "20THEN," indicates current over-limit, and the action is to roll back the current parameters. The second category, "Power Limit Verification," indicates that if the estimated power output by the IF parameter estimation module is greater than 85, the conclusion is power over-limit, and the action is to roll back the current parameters. The third category, "Comfort Range Verification," indicates that if the estimated room temperature output by the IF parameter estimation module is less than 24 or greater than 28, the conclusion is comfort level exceeding the limit, and the action is to adjust the fresh air ratio. The fourth category, "Minimum Start-Stop Interval Verification," indicates that if the device's start-stop time since the last start-stop is less than 300 seconds and the candidate parameters involve start-stop, the conclusion is insufficient start-stop interval, and the action is to maintain the current state. The inference engine matches candidate parameters sequentially according to rule numbers. When each rule condition is met, the corresponding conclusion and action are triggered, and the violation rule number and violation parameter value are recorded. The conflict resolution module sets a standard for prioritizing the removal of non-compliant parameters to within the specified boundaries, and reverting to the current operating parameters when removal is not possible. The removal algorithm replaces parameters with the lower limit if the value is below it, and replaces them with the upper limit if the value is above it. In cases where removal is not possible (i.e., parameters involving device start / stop or indirect current / power overflow without clear boundaries), the current actual operating parameter value is used as the fallback. All resolution actions are logged, including the original value, the value after resolution, the reason for resolution, and the trigger rule number. After verification, a compliant parameter dictionary and verification resolution log are output, and the compliant parameters are then incorporated into the subsequent particle swarm optimization process. Detailed execution rules for retrieval injection, rule verification, and conflict resolution are generated.

[0050] For example, candidate parameters are: outlet water temperature 9 degrees Celsius, pump frequency 32 Hz, fan frequency 28 Hz, and fresh air ratio 25%. The parameter estimation module calls three types of models to calculate the estimated current of 95 amps, estimated power of 78 kilowatts, and estimated room temperature of 26.5 degrees Celsius. The rule engine verifies each parameter: the first type of frequency verification (32 Hz pump frequency) passes within the range of 20 to 50 amps, and the second type of temperature verification (outlet water temperature 9 degrees Celsius) passes within the range of 7 to 12 amps; the third type of current verification (estimated current 95 amps) passes within the range of 120 amps; the fourth type of power verification (estimated power 78 kilowatts) passes within the range of 85 amps; the fifth type of comfort verification (estimated room temperature 26.5 degrees Celsius) passes within the range of 24 to 28 amps; and the sixth type of start-stop interval verification (equipment has been running for more than 1200 seconds, greater than 300 seconds, and parameters do not involve start-stop) passes. All six rules pass without violation, the candidate parameters maintain their original values, the compliance dictionary is output, and the handling log records all pass without adjustment. If the candidate parameter outlet water temperature is 15 degrees Celsius, the second type of temperature check will trigger an over-limit. The trimming algorithm will replace 15 with the upper limit of 12 degrees Celsius. The handling log will record the original value 15, the value after handling 12, the handling reason of temperature exceeding the upper limit, and the trigger rule number R02.

[0051] S105 takes comfort range, rated equipment capacity, minimum start-stop interval as constraints, and minimum total energy consumption as objectives. It integrates large model parameter schemes and graph verification results, uses large model parameters as initial solutions or search directions for particle swarm optimization, and uses particle swarm optimization to solve for the optimal combination of water temperature setting, water pump and fan frequency, and fresh air ratio, and outputs equipment-level and system-level optimization instructions in a hierarchical manner.

[0052] In one implementation, a unified mathematical model is performed on the comfort range, equipment rated capacity, minimum start-stop interval constraints, and the total energy consumption minimization objective. The outlet water temperature (7-12°C), pump / fan frequency (20-50Hz), and fresh air ratio (0-100%) are encoded as particle position vectors and a unified search interval is established to suppress infeasible solutions. This unified mathematical model formalizes the energy-saving optimization problem into a constrained single-objective minimization problem. The objective function is to minimize the system's total energy consumption. Total energy consumption is calculated as the integral sum of the energy consumption of the chiller / heater unit, the pump / fan energy consumption, and the terminal air conditioning energy consumption over the optimization period. The optimization period is set to 15 minutes (900 seconds), and each decision variable takes a constant value within the period. The decision variables include four dimensions: outlet water temperature setting, pump frequency setting, fan frequency setting, and fresh air ratio. These four-dimensional decision variables are encoded as particle position vectors, which are ordered combinations of values ​​for outlet water temperature, pump frequency, fan frequency, and fresh air ratio. Each particle corresponds to a set of candidate energy-saving parameter schemes. The unified search interval is set as follows: outlet water temperature 7 to 12 degrees Celsius, pump frequency 20 to 50 Hz, fan frequency 20 to 50 Hz, and fresh air ratio 0 to 100%. The boundary of the search interval is taken from the equipment rated parameters and process requirements. Solutions outside the interval are marked as infeasible. The mathematical modeling input includes the equipment rated parameters, comfort requirements, start-stop interval constraints, and real-time load data under the current operating conditions. The output is a standardized optimization problem definition including four parts: objective function, decision variable dimensions, variable search interval, and constraint set.

[0053] For example, the optimization cycle of chiller unit No. 1 in a certain factory is 15 minutes. The decision variables are 4 dimensions: outlet water temperature search range of 7 to 12 degrees Celsius, water pump frequency of 20 to 50 Hz, fan frequency of 20 to 50 Hz, and fresh air ratio of 0 to 100%. A certain particle's position vector is 9, 32, 28, 25, which means an outlet water temperature of 9 degrees Celsius, a water pump frequency of 32 Hz, a fan frequency of 28 Hz, and a fresh air ratio of 25%. All dimensions are marked as feasible solutions within the search range. If the outlet water temperature of a certain particle is 15 degrees Celsius, it exceeds the upper limit and is marked as an infeasible solution, which is then suppressed.

[0054] A three-layer initialization process is performed based on candidate parameters of the large model, graph verification results, and historical best operating conditions. The large model parameters are generated using Gaussian perturbation to produce initial population mean values. The graph verification layer performs feasibility screening and boundary correction for constraints before initialization. The historical best layer guides the local search direction, reducing the convergence iteration steps by 30% and establishing a low-iteration-cost optimization solution foundation and a criterion for layered initialization. The three types of constraints are formalized into computable constraint expressions. The first type of comfort range constraint requires indoor temperature to be between 24 and 28 degrees Celsius and indoor humidity to be between 40% and 70%. Indoor temperature and humidity are calculated by a linear regression prediction model based on the fresh air ratio and outdoor temperature and humidity. The prediction model inputs are the fresh air ratio and outdoor temperature, and the output is the indoor temperature. The model form is: indoor temperature equals a constant term plus the fresh air ratio coefficient multiplied by the fresh air ratio plus the outdoor temperature coefficient multiplied by the outdoor temperature. Model parameters are obtained by least-squares fitting of historical data. The second type of equipment rated capacity constraint requires that the pump and fan frequencies be within the range of 20 to 50 Hz, the outlet water temperature be within the range of 7 to 12 degrees Celsius, the equipment operating current not exceed 120 amps, and the equipment power not exceed 85 kilowatts. The current and power are calculated by the frequency and outlet water temperature using a parameter prediction model. The third type of minimum start-stop interval constraint requires that the time between the last start-stop action of the equipment not be less than 300 seconds. If the candidate parameters involve equipment start-stop, i.e., there is a switch between the current state and the candidate state, the start-stop interval needs to be verified. The infeasible solution suppression strategy is to perform boundary clamping if any dimension of the particles generated during initialization and iteration exceeds the search range. Dimensions exceeding the upper limit are replaced with the upper limit value, and dimensions below the lower limit are replaced with the lower limit value. After boundary clamping, the frequency and temperature dimensions no longer exceed the limits. Particles that still violate the current, power, or comfort constraints after clamping are marked as high-violation particles and are penalized by a penalty function in the fitness calculation instead of being directly removed, thus preserving population diversity.

[0055] For example, if a particle's position vector is 15, 55, 28, 25, and the outlet water temperature of 15 exceeds the upper limit of 12 and the pump frequency of 55 exceeds the upper limit of 50, the boundary clamp replaces the outlet water temperature with 12 and the pump frequency with 50. After clamping, the vector becomes 12, 50, 28, 25. The parameter prediction model calculates a current of 125 amperes, which exceeds the threshold of 120 amperes. This particle is marked as a high violation particle, and a penalty function is applied during fitness calculation. It is not directly eliminated in order to retain the search direction information.

[0056] The initialization process is performed in three layers, prioritizing candidate parameters of the large model, graph verification results, and historical best operating conditions. These three layers are executed sequentially, with the output of the previous layer serving as the correction condition for the input of the next layer. The first layer initializes the large model parameters. The candidate parameters of the large model, verified by the rule engine, are used as the initial population mean center. Gaussian perturbations are applied to the four-dimensional decision variables to generate an initial population of 50 particles. The mean of the Gaussian perturbation is 0, and the standard deviation is set to 5% of the search interval width for the corresponding dimension. Specifically, the standard deviation for water temperature is 0.25 degrees Celsius, the standard deviation for pump frequency is 1.5 Hz, the standard deviation for fan frequency is 1.5 Hz, and the standard deviation for fresh air ratio is 5%. The Gaussian perturbation ensures that the initial population is distributed around the large model parameters while preserving exploration diversity. The second layer initializes the graph verification results. For each particle in the initial population, a pre-initialization constraint feasibility screening is performed. The device constraint relationships and safety boundary parameters stored in the knowledge graph are called to verify the 4-dimensional variables of each particle one by one. Particles exceeding the boundary are corrected using the same method as the boundary trimming in step two. Simultaneously, it verifies whether the particle parameter combinations have conflicting relationships recorded in the graph, i.e., parameter combinations that historically caused failures. Particles with conflicts are marked as low priority, and their initial velocities are reduced in the initial velocity settings. The third layer initializes the historical optimal operating conditions. The top three historical optimal energy-saving schemes with the highest cosine similarity to the current operating condition are retrieved from the historical operating condition database. The parameter vectors of these historical optimal schemes are used as local search guide points. The initial velocity direction of the 10 particles in the initial population closest to the guide point points to the guide point, and the initial velocity magnitude is set to 10% of the search interval width. Three-layer initialization reduces the number of convergence iterations by 30%. Compared with pure random initialization, which has a mean of the midpoint of the search interval and a standard deviation of 20% of the interval width, three-layer initialization reduces the number of iterations required to reach the same fitness threshold by about 30% because the initial population is concentrated near the high-quality solution and the search direction is guided by the historical best. This forms the basis for low-iteration-cost optimization solutions and the criteria for layered initialization.

[0057] For example, the candidate parameters for the large model are: outlet water temperature 9, pump frequency 32, fan frequency 28, and fresh air ratio 25. The first layer of Gaussian perturbation generates 50 particles, among which a certain particle has the parameters 9.2, 31.5, 28.3, and 24.5. The second layer of graph verification finds that the pump frequency 31.5 is in the range of 20 to 50 and the outlet water temperature 9.2 is in the range of 7 to 12, with no conflicting relationships, and is marked as high priority. The parameters of the scheme with the highest similarity among the historical best schemes in the third layer are 8.5, 35, 30, and 30. The initial velocity directions of the 10 particles closest to this scheme in the initial population are 8.5, 35, 30, and 30. Finally, the initial positions and initial velocities of all 50 particles are generated, and the iterative solution stage begins.

[0058] The particle swarm velocity update, iterative constraint handling, and hierarchical output rules are standardized, explicitly specifying that v=w. v+c1 r1 (pbest-x)+c2 r2 (gbest-x) iterations, w linearly decreases from 0.9 to 0.4, c1=c2=1.5, population size is 50, maximum iterations are 100 generations or terminate after 20 consecutive generations without improvement, establishing a triple embedding of large model parameters as initial population bias, search direction guidance and termination reference, and canonical fitness = energy consumption + α The iterative penalty function rules for constraint violation are implemented, with the violation degree used for velocity correction and particle reset. A dual-layer decoding output standard is set for device-level single parameters and system-level multi-device collaborative parameters, generating corresponding execution rules. The particle swarm velocity update rules are standardized. The particle swarm algorithm includes six loop modules: population initialization, fitness evaluation, velocity update, position update, individual optimal and global optimal update, and termination judgment. These six modules are executed sequentially and iteratively; each completed sequential execution is called a generation. The velocity update formula is: the new generation velocity equals the inertia weight multiplied by the current velocity, plus the cognitive learning factor multiplied by the first random number multiplied by the difference between the individual optimal position and the current position, plus the social learning factor multiplied by the second random number multiplied by the difference between the global optimal position and the current position. The first and second random numbers are uniformly distributed random numbers between 0 and 1, independently generated for each particle in each generation, used to increase search randomness. The parameters are set as follows: the inertia weight w decreases linearly from 0.9 to 0.4, with the decrease method being that w equals 0.9 minus 0.5 multiplied by the current generation and divided by the maximum generation of 100 per generation; the cognitive learning factor c1 equals 1.5 and the social learning factor c2 equals 1.5; the population size is 50, meaning 50 particles are maintained per generation; the maximum iteration is 100 generations, or the process terminates early if there is no improvement in the global optimal fitness for 20 consecutive generations. The position update formula is that the position of the new generation equals the current position plus the velocity of the new generation. If any dimension exceeds the search interval after the position update, boundary clamping is performed, i.e., exceeding the upper limit is set as the upper limit, and falling below the lower limit is set as the lower limit. The terminology for boundary clamping is consistent with step two. The individual optimal pbest update rule is to maintain the historical optimal position of each particle. If the fitness of the new generation position is better than the individual optimal fitness, the individual optimal position is updated to the new generation position. The global optimal gbest update rule is to select the position of the particle with the lowest fitness from all the individual optimal positions of all particles as the global optimal. For example, in the 10th generation, a particle's current position is 9, 32, 28, 25, and its current velocity is 0.2, -0.5, 0.3, -0.2. The inertial weight w equals 0.9 minus 0.5 multiplied by 10 divided by 100, which equals 0.85. The individual optimal position is 8.8, 33, 27, 26, and the global optimal position is 8.5, 35, 30, 30. The first random number is 0.6, the second random number is 0.4, and the velocity update calculation is 0.85 multiplied by the current velocity plus 1.5 multiplied by 0.6 multiplied by the individual optimal position minus the current position plus... Multiply 1.5 by 0.4 by the global optimum and subtract the current position to get new velocities of 0.45, 0.8, 0.95, and 0.6. Update the positions to 9 plus 0.45 equals 9.45, 32 plus 0.8 equals 32.8, 28 plus 0.95 equals 28.95, and 25 plus 0.6 equals 25.6. All dimensions do not need to be constrained within the search interval. If the fitness of the new position is better than the individual optimum, then update the individual optimum. After all 50 particles are updated, update the global optimum, complete the 10th generation iteration and enter the 11th generation.

[0059] In the constraint handling logic of the standard iteration, the penalty function method is used to integrate the constraint violation degree into the fitness calculation. The fitness formula is the total energy consumption plus the penalty coefficient multiplied by the constraint violation degree. The penalty coefficient α is set to 1000, meaning that particles that seriously violate the constraints have a fitness degree much higher than the feasible solution and are thus eliminated in natural selection. The constraint violation degree is calculated as a weighted sum of three types of constraint violation quantities. The first type, comfort violation degree, is equal to the degree exceeding the temperature range plus the percentage exceeding the humidity range. The second type, rated capacity violation degree, is equal to the ampere number exceeding the current threshold plus the kilowatt number exceeding the power threshold. Since the frequency and temperature dimensions have already performed boundary clamping in steps two and four, there will be no direct boundary crossings. Therefore, the rated capacity violation degree only counts indirect boundary crossings such as current and power. The third type, start-stop interval violation degree, is equal to the difference in seconds less than 300 seconds. The weights of the three types of violation degree are set to 10, 5, and 20, respectively. The weight size reflects the strictness of the constraint. Constraint violation is used for both velocity correction and particle reset. The velocity correction rule is that if a particle's constraint violation exceeds a threshold of 10 for three consecutive generations, its velocity direction is adjusted to point towards the current globally optimal feasible solution, and its velocity magnitude is reduced to 50% of its original value, guiding the particle towards the feasible region. The particle reset rule is that if a particle's constraint violation exceeds a threshold of 50 for ten consecutive generations (i.e., severely infeasible), its position is reset to the current globally optimal feasible solution position with a small Gaussian perturbation, the standard deviation of which is 1% of the search interval width. After reset, the particle retains its original particle number and individual optimal record, and its velocity is set to 0 to prevent it from continuing to fly into infeasible regions. Reset is a position replacement, not particle removal, and the population size remains unchanged at 50 particles. The integration point between penalty function constraint processing and business logic lies in the fact that all constraints are derived from the equipment safety boundaries and process requirements in the knowledge graph. The penalty coefficient and weight are adjustable according to the importance of the equipment, with core equipment such as cold and heat source units having higher constraint weights than end-point equipment.

[0060] For example, a particle in generation 30 has positions 12, 50, 28, and 25. After boundary clamping, its frequency and temperature are both within the range. The parameter prediction model calculates a current of 125 amps, exceeding the 120 amps threshold by 5 amps, and a power of 88 kilowatts, exceeding the 85 kilowatts threshold by 3 kilowatts. There are no violations of comfort and start-stop intervals. The constraint violation is 5 x 5 + 3 x 5 = 40. The total energy consumption is calculated to be 75 kilowatt-hours, or 18.75 kilowatt-hours in 15 minutes. The fitness is 18.75 + 1000 x 40 = 400. The particle with a value of 18.75 is much higher than the fitness of the feasible solution (approximately 20), indicating that it ranks low in the population. If the violation rate is greater than 10 for three consecutive generations, the velocity is corrected to point towards the globally optimal feasible solution and the velocity is halved. If the violation rate is greater than 50 for ten consecutive generations, a particle reset is triggered. The position is reset to the globally optimal position of 8.5, 35, 30, 30, with Gaussian perturbations resulting in 8.6, 34.8, 30.2, and 29.7. The original particle number is retained, the velocity is set to 0, the population size remains 50, and the particle rejoins subsequent iterations.

[0061] A dual-layer decoding output standard is established, consisting of single-parameter parameters at the device level and collaborative parameters at the system level. The first layer, device-level decoding, directly maps the 4D optimal position vector obtained from particle swarm optimization to the parameter setpoints of a single chiller / heater unit and its associated pumps and fans. The output is decoded as follows: outlet water temperature as the chiller / heater unit's outlet water temperature setpoint; pump frequency as the chilled water pump's frequency setpoint; fan frequency as the cooling fan's frequency setpoint; and fresh air distribution as the fresh air valve opening percentage. This device-level output is directly sent to the individual device controller. The second layer, system-level decoding, collaboratively combines the optimal particle swarm solutions from multiple chiller / heater units, considering the load distribution ratio among the units and the hydraulic balance of the pump network. The system-level output includes the parameter setpoints of each unit, the load distribution ratio, and the water pressure difference correction value. This system-level output requires coordination by the building automation system before being sent out. A three-tiered embedding method is established, using large model parameters as the initial population bias, search direction guidance, and termination reference. The first tier, the initial population bias, where the large model candidate parameters serve as the initial population mean center, has already been implemented in step three. The second tier, search direction guidance, involves using the position of the large model candidate parameters as an additional guiding point if the global optimum shows no improvement for five consecutive iterations, with some particles velocities pointing towards this guiding point to escape the local optimum. The third tier, termination reference, allows for early termination of iteration when the fitness difference between the global optimum and the large model candidate parameters is less than a 5% threshold, as the large model parameters are close to the optimal solution and no further search is needed. Detailed execution rules for particle swarm optimization are generated, outputting an optimization result report containing five fields: optimal parameter combination, fitness value, iteration count, constraint violation verification result, and large model parameter comparison difference.

[0062] For example, the particle swarm optimization reached global optimal convergence in the 45th generation, with optimal position vectors of 8.5, 35, 30, and 30, a fitness of 19.2 kWh, and a constraint violation rate of 0, meaning all constraints were satisfied. The first-level device-level decoding, which sets the outlet water temperature of chiller unit 1 to 8.5 degrees Celsius, the chilled water pump frequency to 35 Hz, the cooling fan frequency to 30 Hz, and the fresh air valve opening to 30%, was directly sent to the controller of unit 1. The second-level system-level decoding, combined with the optimal solution of chiller unit 2 (9.0, 33, 28, 28), calculated the load distribution: unit 1 bore 60% and unit 2 bore 40%, with a water pressure difference correction of 0.02 MPa. The system-level output was then sent out after coordination by the building automation system. The fitness of the large model candidate parameters was 20.5 kWh, and the global optimal value of 19.2 was 6.3% better than the large model parameters. The termination reference in the triple embedding did not terminate prematurely due to a difference greater than 5%, and the iteration naturally converged in the 45th generation. The final output optimization result report included the above five fields.

[0063] S106 sends optimization instructions to the PLC or building automation system via the edge gateway for execution, continuously collects data after execution, compares the baseline to calculate energy savings, payback period and comfort compliance rate, writes the effect samples back to the graph and accumulates them as model fine-tuning samples, and outputs the digital management and control results of the entire energy-saving optimization process.

[0064] In one implementation, the device-level and system-level optimization instructions output from the particle swarm optimization solution are sent to a PLC or building automation system via an edge gateway for execution. The edge gateway is responsible for protocol conversion and instruction caching. Device-level instructions are converted into Modbus register write instructions and directly sent to the PLC controllers of chiller / heater units, water pumps / fans, and terminal air conditioners. System-level coordination instructions are converted into BACnet object attribute write instructions and sent to the global controller of the building automation system, which coordinates the synchronous execution of multiple devices. An acknowledgment and retransmission mechanism is used for instruction issuance. After sending an instruction, the edge gateway waits for an execution acknowledgment frame from the PLC. If no acknowledgment is received within 5 seconds, the instruction is retransmitted, up to a maximum of 3 times. If 3 retransmissions fail, the device instruction issuance is marked as abnormal and the parameters are rolled back to the pre-optimization parameters. A smooth transition mode is set for instruction execution. Parameter changes are gradually changed from the current value to the target value over 60 seconds using a ramp-like gradient to avoid sudden shocks to the device. The edge gateway also records an instruction issuance log containing six fields: instruction number, device number, target parameter value, issuance time, acknowledgment status, and execution result. For example, at a certain moment, the particle swarm outputs a target value of 8.5 degrees Celsius for the outlet water temperature of chiller unit 1 and a chilled water pump frequency of 35 Hz. The edge gateway converts the outlet water temperature command into a Modbus write holding register instruction address 40001 with a value of 850 (i.e., amplified by 100 times) and the pump frequency command into a write register address 40002 with a value of 3500. These commands are then sent to the PLC of unit 1. The PLC returns an acknowledgment frame within 2 seconds. The actuator uses a 60-second ramp to gradually change the outlet water temperature from 7 degrees Celsius to 8.5 degrees Celsius and the pump frequency from 30 Hz to 35 Hz. The instruction issuance log records the acknowledgment status as successful and the execution result as executed.

[0065] After the optimization command is executed, continuous collection of post-execution operational and energy consumption data is performed. Data collection utilizes multiple protocol acquisition channels, and the collection points include eight categories: equipment operating frequency, valve opening, current, power, sub-item electrical energy, indoor temperature and humidity, and outdoor temperature and humidity. The collection cycle remains consistent with before optimization: 10 seconds for cold and heat sources, 30 seconds for terminal air conditioners, and 5 seconds for water pumps and fans. The collected data is written to the time-series database via the edge gateway, using the same timestamp and point encoding as the baseline data before optimization. Data alignment employs a time window alignment method starting from the effective time of the optimization command. The post-execution observation window is set to 15 minutes (900 seconds) after the optimization command takes effect, consistent with the optimization cycle length. The collected data within the observation window is resampled and aligned at a 1-minute granularity to generate the post-execution time-series dataset. Simultaneously, outdoor temperature and humidity data for the same period are collected for weather correction. Operational data from the same time period (same hour, same week) within the 30 days prior to optimization are collected as candidate baseline datasets. For example, the optimization command takes effect at 10:00. After execution, the observation window is from 10:00 to 10:15. It continuously collects data from eight types of points, including the outlet water temperature of Unit 1, water pump frequency, current, power, indoor temperature, indoor humidity, outdoor temperature, and outdoor humidity. Within 15 minutes, it collects 180 data points of water pump data at a 5-second cycle and 90 data points of cold and heat source data at a 10-second cycle. After 1 minute of resampling and alignment, it generates a 15-line dataset after execution. At the same time, it extracts 30 sets of daily operating data from 10:00 to 10:15 for the 30 days before optimization as baseline candidates. The outdoor temperature is collected at 32 degrees Celsius for subsequent weather correction.

[0066] Compared to baseline energy savings, the whole-building metering method in the International Code for Measurement and Verification of Energy Efficiency is adopted. The baseline energy consumption calculation uses the average energy consumption of the same period 30 days before optimization, adjusted for weather conditions. The weather adjustment uses the cooling days normalization method, where the cooling days equal the daily average outdoor temperature minus the positive value of 18 degrees Celsius reference temperature. The baseline energy consumption correction formula is: the corrected baseline energy consumption equals the original baseline energy consumption multiplied by the cooling days of the execution day divided by the average cooling days of the baseline period, eliminating the impact of outdoor temperature differences on energy consumption. The energy saving calculation formula is: energy saving equals the corrected baseline energy consumption minus the actual energy consumption after execution. The energy saving rate equals the energy saving divided by the corrected baseline energy consumption multiplied by 100%. Energy saving is calculated at three levels: equipment level, system level, and plant level. Equipment-level energy saving is the difference in energy consumption of a single piece of equipment before and after execution; system-level energy saving is the sum of energy saving of all equipment within a subsystem; and plant-level energy saving is the difference in energy consumption of the total electricity meter of the entire plant before and after execution. The calculation results must meet the uncertainty requirements. The uncertainty of energy saving measurement must be controlled within 10%. If it exceeds 10%, it will be marked as pending verification and the observation window will be extended. For example, if the average energy consumption from 10:00 to 10:15 for the 30 days before optimization is 25 kWh, the average number of cooling days during the baseline period is 10, and the number of cooling days on the execution day is 12, the baseline energy consumption after weather correction is 25 x 12 ÷ 10 = 30 kWh. The actual energy consumption 15 minutes after execution is 24 kWh. The equipment-level energy saving is 30 minus 24 = 6 kWh, and the energy saving rate is 6 ÷ 30 x 100% = 20%. The measurement uncertainty is calculated to be 8%, which is lower than the 10% threshold. The calculation results are marked as valid, and the system-level and plant-level calculations are summarized and calculated simultaneously.

[0067] The investment payback period and comfort compliance rate are calculated as follows: The static investment payback period is calculated as the payback period equals the project's input cost divided by the annual energy savings multiplied by the electricity price. The annual energy savings are extrapolated from the energy savings within a 15-minute observation window, based on a daily operating time of 12 hours and a yearly operating period of 180 days (90 days for the cooling season and 90 days for the heating season). The electricity price is taken as the local average industrial electricity price of 0.8 yuan per kilowatt-hour. The project input cost includes software deployment costs and edge gateway hardware costs. If it is only algorithm optimization without new hardware, the input cost is the annual software license fee. The payback period is calculated in months, and a period exceeding 36 months is marked as a long investment return period. The comfort compliance rate is calculated as the compliance rate equals the number of comfort compliance moments within the observation window divided by the total number of monitoring moments multiplied by 100%. The comfort compliance conditions are an indoor temperature between 24 and 28 degrees Celsius and an indoor humidity between 40% and 70%. Both conditions must be met simultaneously to be considered a compliance moment, and either condition must be met to be considered a non-compliance moment. When the comfort compliance rate is below 90%, the optimization parameters are rolled back to restore the equipment parameters to their pre-optimization values ​​to ensure user experience. Execution data after the rollback time is not included in this energy saving calculation. This optimization is marked as an invalid optimization that failed the comfort test. Only the rollback event is recorded, and no energy-saving strategy nodes or fine-tuning samples are generated. Data collected before the rollback is used for comfort analysis but is not used to calculate energy savings. For example, a 15-minute observation window contains 15 one-minute monitoring moments. At 14 of these moments, the indoor temperature is between 24 and 28 degrees Celsius, and the humidity is between 40% and 70%. At the last moment, the temperature is 28.5 degrees Celsius, exceeding the upper limit. The comfort compliance rate is 14 divided by 15 multiplied by 100%, which equals 93.3%, higher than the 90% threshold. The parameters are maintained without regression. The energy saving is 6 kWh. Extrapolating the annual energy saving every 15 minutes, the annual energy saving is 6 multiplied by 4 multiplied by 12 multiplied by 180, which equals 51,840 kWh. The annual energy saving benefit is 51,840 multiplied by 0.8, which equals 41,472 yuan. The software investment cost is 20,000 yuan, and the static payback period is 20,000 divided by 41,472 multiplied by 12, which equals 5.8 months. A period less than 36 months is marked as a good return on investment. If the comfort compliance rate at a certain window is 80% but less than 90%, the parameters are regressed to the pre-optimization value at the 12th minute. Data from the 12th to 15th minutes is not included in the energy saving calculation, and this optimization is marked as invalid.

[0068] The effect samples are written back to the knowledge graph. Each effect sample contains seven fields: optimization command parameters, post-execution energy consumption, energy saving, energy saving rate, comfort compliance rate, execution time, and operating condition label. The writing process involves adding energy-saving strategy nodes to the knowledge graph and establishing relationships. The new node is labeled as an energy-saving strategy, and its attributes include the seven fields mentioned above. A "suitable" relationship is established between the node and the current operating condition node (meaning the strategy applies to this condition). An "actual" relationship is established between the node and associated equipment nodes (meaning the strategy acts on this equipment). An energy-saving relationship is established between the node and energy consumption indicator nodes (meaning the strategy generates this energy saving). Before writing back, node deduplication is performed using a cosine similarity calculation method with the equipment number, operating condition label, and target parameter four-dimensional vector. The four parameters of the strategy to be written back—outlet water temperature, pump frequency, fan frequency, and fresh air ratio—are normalized and then compared with the cosine similarity of the parameter vectors of existing strategy nodes with the same equipment and operating condition in the graph. If a strategy node with a similarity greater than 0.9 already exists in the graph, the energy saving and comfort attributes of that node are updated instead of creating a new node, avoiding duplicate storage. After writing back, update the historical policy list attributes of the device nodes in the graph, and append the current policy number to the list to support the subsequent retrieval enhancement generation module to quickly match historical policies according to operating conditions. For example, the optimization strategy parameters are: outlet water temperature 8.5 degrees Celsius, pump frequency 35 Hz, fan frequency 30 Hz, and fresh air ratio 30%. After execution, the energy saving is 6 kWh, the energy saving rate is 20%, the comfort compliance rate is 93.3%, and the operating condition label is high load during the cooling season. A new energy-saving strategy node number STR-2026-0827-001 is added to the Neo4j graph database. The attributes include all the above fields. The applicable relationship between this node and the high load operating condition node during the cooling season, the effect relationship between this node and the No. 1 chiller equipment node, and the energy saving relationship between this node and the energy saving 6 kWh energy consumption node are established. After deduplication and verification, the parameter vectors 8.5, 35, 30, and 30 are normalized and the cosine similarity is calculated with the three existing strategies under the high load of the No. 1 chiller in the graph. The highest similarity is 0.72, which is lower than the threshold of 0.9. The node is directly added, and the historical strategy list attribute of the No. 1 chiller equipment node is updated and the number STR-2026-0827-001 is added.

[0069] The effect samples are accumulated into large model fine-tuning samples. The fine-tuning samples adopt the instruction fine-tuning format. Each sample contains three fields: input instruction, retrieval context, and expected output. The input instruction is a description of the current working condition plus an explanation of the energy-saving optimization task. The retrieval context is the equipment constraints and historical strategies retrieved from the graph under this working condition. The expected output is the optimal parameter combination verified by actual execution, which has an energy saving rate of greater than 10% and a comfort compliance rate of greater than 90%, plus the reason for adjustment. Only effect samples that meet the two thresholds are included in the fine-tuning training set. Samples that do not meet the thresholds are included in the analysis set and do not participate in the training. Fine-tuning employs the LoRA low-rank adaptation method. The model structure involves attaching a low-rank adaptation matrix next to the query matrix and value matrix of each layer of the Transformer decoder in the pre-trained large model. The dimension of the low-rank matrix is ​​set to 8, i.e., the rank r equals 8, the scaling factor alpha equals 16, and the dropout equals 0.05. Only the parameters of the low-rank matrix are trained, and all parameters of the pre-trained model are frozen. The estimated number of trained parameters accounts for 0.1% of the total number of parameters. The actual percentage is determined by the number of model layers and the dimension of the hidden layers. For a model with 7 billion parameters, 32 layers, and a hidden dimension of 4096, the actual percentage is approximately 0.03%. The training process consists of four steps: First, data preparation, where the accumulated fine-tuning samples are divided into training, validation, and test sets in an 8:1:1 ratio. Second, model initialization, which loads the pre-trained large model weights and attaches a LoRA low-rank matrix, initialized with a Gaussian standard deviation of 0.02. Third, fine-tuning, using AdamW optimizer, a learning rate of 1e-4, a batch size of 8, 3 training epochs, a maximum sequence length of 512, and cross-entropy loss as the loss function, calculating perplexity on the validation set at the end of each epoch. Fourth, saving and deployment, saving the LoRA weights with the lowest perplexity on the validation set, and merging them with the original pre-trained model for inference or dynamically loading them during deployment. The first fine-tuning is triggered after 500 samples are accumulated, followed by incremental fine-tuning every 200 additional samples, with the model iteration version number incrementing. For example, the energy saving rate of the sample in this study is 20% (greater than 10%) and the comfort compliance rate is 93.3% (greater than 90%). It is included in the fine-tuning training set. The input instruction is: "No. 1 chiller, high load during the cooling season, indoor temperature 26 degrees Celsius, please output energy saving parameters." The retrieval context is constraints such as rated frequency 20 to 50 Hz plus historical strategy STR-2026-0826-003. The expected output is: water temperature 8.5 degrees Celsius, water pump 35 Hz fan, 30 Hz fresh air, 30% reasoning: increasing the water temperature reduces compressor power consumption. After the sample format is converted, it is added to the training set. The current cumulative sample count is 520, exceeding the 500 threshold, triggering the first LoRA fine-tuning. After 3 rounds of training, the perplexity of the validation set decreased from 18 to 12. LoRA weight version v1 is saved and deployed, and the weights are dynamically loaded for subsequent inference.

[0070] The system outputs digital management results for the entire energy-saving optimization process. These results include seven modules: optimization command execution logs, energy-saving calculation reports, investment payback period assessments, comfort compliance rate statistics, knowledge graph update records, model fine-tuning sample accumulation statistics, and abnormal event alarms. These results are displayed in a visual dashboard and support drill-down queries at three levels: equipment, system, and plant area. Simultaneously, an energy-saving audit report is generated, containing energy consumption comparison curves before and after optimization, monthly cumulative energy-saving trends, investment payback period predictions, comfort heatmaps, and an abnormal event list. The report is automatically generated daily and archived in the document management system. An abnormal alarm mechanism is implemented for the management results. Alarms are triggered by four types of events: command issuance failure, energy-saving measurement uncertainty exceeding 10%, comfort compliance rate below 90%, and substandard model fine-tuning sample quality. Alarms are pushed to maintenance personnel via messages. The entire management process forms a closed loop; the execution effect of this optimization serves as historical strategy input and model fine-tuning data source for the next optimization, continuously iterating and improving energy-saving performance. For example, after this optimization is completed, the control results are generated. The dashboard shows that after the implementation, Unit 1's energy consumption is 24 kWh, energy saving is 6 kWh, energy saving rate is 20%, payback period is 5.8 months, comfort compliance rate is 93.3%, one new strategy node is added to the graph, a total of 520 fine-tuning samples are added, and there are no abnormal alarms. Clicking on Unit 1 allows you to drill down to view the 15-minute minute-by-minute energy consumption curve and parameter change curve. The system-level summary shows the total energy saving of the cold and heat source system is 8 kWh, and the plant-level summary shows the total energy saving of the entire plant is 12 kWh. The daily energy saving audit report is automatically generated, which includes all the above data and trend charts. The report is archived to the document system, and the data of this effect is synchronously entered into the historical strategy library for the next round of optimization.

[0071] In one implementation, such as Figure 2 As shown, this application also provides an energy-saving optimization system that integrates energy consumption knowledge graphs and large models for industrial environmental control systems, including: The data acquisition module 201 is used to collect operating frequency, valve position current, sub-item power, temperature and humidity and process load data of chiller and heat source units, water pumps and fans and terminal air conditioners through Modbus / BACnet / OPCUA protocol. After edge gateway protocol conversion and data cleaning, the data is written into the time series database and stored according to a three-level architecture of equipment layer, system layer and plant layer to build a multi-source heterogeneous energy consumption data pool covering the entire environmental control link. The data preprocessing module 202 is used to perform unified time granularity resampling alignment, sliding window 3σ criterion outlier removal and missing value spline interpolation completion on multi-source time series data. Based on the rated cooling capacity and rated power parameters of the equipment, it calculates real-time COP, transmission and distribution temperature difference loss rate, and partial load rate derived indicators. K-Means clustering is used to label the cooling / heating / transition season and high and low load operating conditions with temperature, humidity, load rate and seasonal characteristics. It outputs a standardized feature matrix containing basic operating parameters, energy efficiency indicators and operating condition labels. The knowledge graph construction module 203 is used to parse and extract four types of entities—equipment, operating conditions, energy consumption, and faults—and four types of relationships—connection, action, cause, and constraint—from equipment ledger Excel, operation and maintenance manual PDF, and historical work order Word. It adopts a voting fusion strategy that combines regular dictionary rule recall with BERT-base-chinese BIO labeled named entity recognition. After entity disambiguation and alignment by precise matching of equipment number and attribute cosine similarity, it is stored in the Neo4j graph database to construct an energy consumption knowledge graph containing equipment topology connection relationships and energy flow paths. The fusion reasoning module 204 is used to build a retrieval enhancement generation framework. It encodes the current operating condition features using Sentence-BERT and performs cosine similarity matching and 2-hop graph traversal retrieval with the graph entity vectors. It filters the Top-K results according to equipment topology association, energy consumption constraint boundary, and historical energy-saving strategy priority and assembles them into a four-segment prompt word with system prompts, retrieval context, operating condition input, and output format constraints. The large model outputs candidate energy-saving parameters in JSON format and then uses the IF-THEN rule engine to verify the equipment's rated frequency, temperature upper and lower limits, current threshold, comfort range, and minimum start-stop interval. Violating parameters are preferentially clipped to the boundary. If clipping is not possible, the current operating parameters are rolled back. The optimization solution module 205 is used to minimize total energy consumption while constraining comfort range, equipment rated capacity, and minimum start-stop interval. It encodes outlet water temperature (7-12℃), pump / fan frequency (20-50Hz), and fresh air ratio (0-100%) as particle position vectors. Initial population means are generated using large model candidate parameters after Gaussian perturbation. Feasibility screening of pre-initialization constraints is performed by fusing graph verification results, using v=w. v+c1 r1 (pbest-x)+c2 r2 (gbest-x) Iterative solution of the speed update formula, w linearly decreases from 0.9 to 0.4, c1=c2=1.5, population size 50, maximum iteration 100 generations or terminates after 20 consecutive generations without improvement, hierarchical output of device-level single device parameters and system-level multi-device collaborative optimization instructions; The closed-loop management module 206 is used to send optimization instructions to the PLC or building automation system via the edge gateway for execution. It continuously collects the operation data and energy consumption data after execution, compares the actual energy saving, static investment payback period and comfort compliance rate with the baseline before optimization, generates control logs, energy consumption curves and equipment action sequences and archives them in the ledger according to the hierarchy, writes the execution effect samples back to the knowledge graph to update the equipment operating conditions and strategy nodes, and accumulates them into a large model fine-tuning sample set, outputting the digital management and control results of the entire energy-saving optimization process and the energy-saving audit report.

[0072] The computer-readable storage medium provided in the above embodiments of this application and the energy-saving optimization method for industrial environmental control systems by fusing knowledge graphs and large models are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0073] The various embodiments in this application are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for evaluating the energy consumption knowledge graph and large model fusion energy-saving optimization method, electronic device, electronic device, and readable storage medium for industrial environmental control systems are basically similar to the embodiments of the energy consumption knowledge graph and large model fusion energy-saving optimization method for industrial environmental control systems described above, and are therefore described relatively simply. Relevant parts can be referred to in the descriptions of the embodiments of the energy consumption knowledge graph and large model fusion energy-saving optimization method for industrial environmental control systems described above.

Claims

1. A method for energy-saving optimization that integrates energy consumption knowledge graphs and large-scale models for industrial environmental control systems, characterized in that... include: The system collects the operating frequency, valve position current, sub-item power consumption, temperature and humidity and process load of chiller and heat source units, water pumps and fans and terminal air conditioners through Modbus / BACnet / OPCUA, and writes them into the time series database through the edge gateway to build a three-level data pool of equipment-system-plant area. Resampling alignment, 3σ anomaly removal, and interpolation completion are performed on multi-source time-series data. Real-time COP, transmission and distribution temperature difference loss rate, and partial load rate are calculated based on rated parameters. Cooling / heating / high and low load operating mode is labeled by clustering and outputs a standardized feature matrix. Equipment, operating conditions, energy consumption, fault entities, as well as their connections, functions, and constraints, are extracted from equipment ledgers, operation and maintenance manuals, and historical work orders. The data are then stored in a graph database after entity disambiguation and alignment using a rule-based BERT named entity recognition method to construct an energy consumption knowledge graph containing equipment topology and energy flow direction. A search-enhanced generation framework is constructed. Based on the current operating conditions, the path of associated equipment, energy consumption constraints, and historical strategies are retrieved from the graph and injected into the big model for hints. After the big model generates candidate parameters, the graph rule engine verifies whether they violate the equipment safety boundary and process constraints. Conflict items are corrected or rolled back to the safety baseline. With comfort range, rated equipment capacity, minimum start-stop interval as constraints and minimum total energy consumption as the goal, the large model parameter scheme and graph verification results are integrated. The large model parameters are used as the initial solution or search direction guide for particle swarm optimization. Particle swarm optimization is used to solve for the optimal combination of water outlet temperature setting, water pump and fan frequency, and fresh air ratio. The equipment-level and system-level optimization instructions are output in layers. The optimization instructions are sent to the PLC or building automation system via the edge gateway for execution. Data after execution is continuously collected, and the energy saving, payback period and comfort compliance rate are calculated by comparing with the baseline. The effect samples are written back to the graph and accumulated as model fine-tuning samples, and the results of the entire process of energy-saving optimization are output as digital management and control.

2. The method as described in claim 1, characterized in that, Resampling and alignment, 3σ outlier removal, and interpolation completion are performed on multi-source time-series data. Real-time COP, transmission and distribution temperature difference loss rate, and partial load rate are calculated based on rated parameters. Cooling / heating / high and low load operating modes are labeled by clustering, and a standardized feature matrix is ​​output, including: For multi-source time-series data of cold and heat sources, water pumps and fans, and terminal air conditioners, linear resampling and alignment are performed with a uniform granularity of 1 minute. The sliding window 3σ criterion is used to remove single-point anomalies and complete them with spline interpolation. The dual judgment of data integrity rate and sampling period consistency is introduced. The effective sampling rate of each source is calculated. Time periods with continuous missing data exceeding 30% are marked as invalid. Data quality verification standards are established, and the basis for time-series cleaning decision is constructed. Standardize the energy efficiency calculation method. Calculate the real-time COP according to COP = real-time cooling capacity / input power and cooling capacity = water flow × supply and return water temperature difference × specific heat. Calculate derived indicators according to temperature difference loss rate = (design temperature difference - actual temperature difference) / design temperature difference and load rate = real-time load / rated load. Set a trigger for review if the loss rate exceeds 20%. Use K-Means to cluster and label the cooling / heating / transitional season and high and low load conditions based on temperature, humidity, load rate and seasonal characteristics, and generate detailed rules for feature calculation and labeling. By integrating preprocessed data, energy efficiency indicators, and operating condition labels, and using range standardization to unify the dimensions of multiple indicators, the system retains the temporal fluctuation trends and operating condition switching boundaries of operating frequency, valve opening, temperature, and humidity, and outputs a standardized feature matrix containing basic parameters, energy efficiency indicators, and operating condition labels.

3. The method as described in claim 1, characterized in that, Equipment, operating conditions, energy consumption, fault entities, and their connections, functions, and constraints are extracted from equipment ledgers, maintenance manuals, and historical work orders. A rule-based approach combined with BERT named entity recognition is used, and after entity disambiguation and alignment, the data is stored in a graph database to construct an energy consumption knowledge graph containing equipment topology and energy flow direction, including: The equipment ledger Excel, maintenance manual PDF, and historical work order Word documents are subjected to format parsing, sentence segmentation, and unified coding preprocessing. Entity coverage and relationship consistency are dual-judgment. The recognition accuracy is calculated based on the entity confidence output by BERT-base-chinese and sampling annotation. Entity type verification standards are established by combining the semantic features of equipment number, operating parameters, energy consumption value, and fault code. The knowledge extraction decision-making basis and entity discrimination criteria are constructed. Standardize the attribute fields and unique identifiers of four types of entities. The device entity uses the device number as the primary key. Set a voting fusion strategy for regular dictionary rule retrieval and BERTBIO annotation recognition results. Establish directional constraints and trigger word templates for four types of relationships: connect to, act on, cause, and constrain. Avoid duplicate entity annotation and confusion of relationship directions. Generate entity relationship extraction rules and ontology modeling execution details. The system integrates extracted entity attributes and relation triples, and uses a disambiguation module that accurately matches device numbers and uses attribute cosine similarity to merge synonymous entities and resolve attribute conflicts. It uses the Neo4j graph database to store nodes with labeled attributes and edges with relation types, preserves device topology connections and energy flow paths, and outputs an energy consumption knowledge graph containing four types of entities and their relationships.

4. The method as described in claim 1, characterized in that, A retrieval enhancement generation framework is constructed. Based on the current operating conditions, related equipment paths, energy consumption constraints, and historical strategies are retrieved from the graph and injected into the large model for hints. After the large model generates candidate parameters, they are verified by the graph rule engine to determine whether they violate equipment safety boundaries and process constraints. Conflict items are corrected or rolled back to the safety baseline, including: After the current working condition features are encoded by Sentence-BERT, cosine similarity matching and 2-hop graph traversal path retrieval are performed with the graph entity vectors. The retrieval results are uniformly formatted as JSON and assembled according to the prompt word template to suppress irrelevant paths and strengthen associated equipment and constraint features. The three-layer progressive injection is performed according to the priority of equipment topology association, energy consumption constraint boundary, and historical energy saving strategy. The equipment topology layer performs subgraph traversal retrieval, the energy consumption constraint layer performs parallel attribute threshold extraction, and the historical strategy layer performs similarity sorting and screening of Top-K. This reduces the retrieval complexity from full graph scanning to subgraph targeted retrieval, and builds a low-complexity retrieval enhancement generation basis and hierarchical injection discrimination criteria. The system standardizes the construction of prompt terms, the validation of the rule engine, and the conflict resolution logic. It clarifies the four-part template of system prompts, retrieval context processing input, and output format constraints. It establishes a triple embedding of retrieval results as context constraints, few-shot examples, and output format limitations. After the large model outputs candidate parameters in JSON format, the IF-THEN rule engine validates the device's rated frequency, temperature upper and lower limits, current threshold and comfort range, and minimum start-stop interval. It sets the handling standard of prioritizing the pruning of illegal parameters to within the boundary and reverting to the current operating parameters when pruning is not possible. It generates supporting execution rules for retrieval injection, rule validation, and conflict resolution.

5. The method as described in claim 4, characterized in that, With comfort range, rated equipment capacity, minimum start-stop interval as constraints, and minimum total energy consumption as the objective, this approach integrates large-scale model parameter schemes and graph verification results. Using the large-scale model parameters as the initial solution or search direction guide for particle swarm optimization, it employs particle swarm optimization to solve for the optimal combination of outlet water temperature setting, pump / fan frequency, and fresh air ratio. Layered optimization instructions at the equipment and system levels are output, including: A unified mathematical model is performed on the comfort range, equipment rated capacity, minimum start-stop interval constraints and total energy consumption minimum objective. The outlet water temperature of 7 to 12℃, water pump and fan frequency of 20 to 50Hz and fresh air ratio of 0 to 100% are encoded as particle position vectors and the search range is unified to suppress infeasible solutions. The initialization is performed in three layers based on the candidate parameters of the large model, the results of the graph verification, and the priority of the historical best working conditions. The large model parameters are generated by Gaussian perturbation to generate the initial population mean. The graph verification layer performs the feasibility screening and out-of-bounds correction of the constraints before initialization. The historical best layer guides the local search direction, reducing the number of convergence iteration steps by 30%, and constructing a low-iteration-cost optimization solution basis and a hierarchical initialization judgment criterion. The particle swarm velocity update, iterative constraint handling, and hierarchical output rules are standardized, explicitly specifying that v=w. v+c1 r1 (pbest-x)+c2 r2 (gbest-x) iterations, w linearly decreases from 0.9 to 0.4, c1=c2=1.5, population size is 50, maximum iterations are 100 generations or terminate after 20 consecutive generations without improvement, establishing a triple embedding of large model parameters as initial population bias, search direction guidance and termination reference, and canonical fitness = energy consumption + α The penalty function rule in the iterative constraint violation degree is used for velocity correction and particle reset. The dual-layer decoding output standard of device-level single parameter and system-level multi-device collaborative parameter is set to generate the corresponding execution rules.

6. An energy-saving optimization system integrating energy consumption knowledge graphs and large-scale models for industrial environmental control systems, characterized in that, The system is used to execute executable instructions to perform the energy consumption knowledge graph and large model fusion energy-saving optimization method for industrial environmental control systems as described in any one of claims 1 to 5.

7. An electronic device, characterized in that, include: First processor; and memory for storing executable instructions of the first processor; Wherein, the first processor is configured to execute the energy consumption knowledge graph and large model fusion energy-saving optimization method for industrial environmental control systems as described in any one of claims 1 to 5 by executing the executable instructions.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the second processor, it implements the energy-saving optimization method for industrial environmental control systems that integrates knowledge graphs and large models, as described in any one of claims 1 to 5.