# Design and Implementation of Large-Scale Public Building Energy Consumption Monitoring Platform Based on BP Neural Network

Authors: Xiancheng Liu; Congxiang Tian
Journal: Security and Communication Networks
 (2021)

---

## Abstract

With the rapid development of network technology, people are increasingly dependent on the internet. When BP neural network (BNN) performs simulation calculation, it has the advantages of fast training speed, high accuracy, and strong robustness and is widely used in large-scale public (LSP) building energy consumption (BEC) monitoring platforms (LPB). Therefore, the purpose of this paper to study the energy consumption monitoring platform of large public (LP) buildings is to better monitor the energy consumption of public buildings, so as to supplement or remedy at any time. This article mainly uses the data analysis method and the experimental method to carry on the relevant research and the system test to the BNN. The experimental results show that the monitoring system (MS) platform designed in this paper has real-time performance, and its time consumption is between 2 s and 3 s, and the data accords with theory and reality.


---

## Body

## 1. Introduction

BNN can effectively improve office efficiency and reduce costs. At the same time, it can be combined with traditional manual management methods to achieve resource sharing, thereby greatly reducing the burden on staff and the waste of human resources. According to the current energy consumption of LSP buildings, manpower alone cannot solve it. Therefore, this paper uses BNN to design and research LPB, which is of reference significance. As an intelligent information processing system, the core of artificial neural network is algorithm. BP neural network is a multilayer feedforward network trained according to error back propagation (error back propagation for short). Its basic idea is gradient descent method, which uses gradient search technology to minimize the error mean square deviation of the actual output value and expected output value of the network.There are many research results on the design and implementation of LPB based on BNN. For example, for the problem of high energy consumption in LP buildings, Li et al. proposed a LP BEC prediction model combining principal component analysis and BNN [1]. Li and Jiang said that the knowledge span between data mining technology and construction engineering is relatively large, and it is difficult to perfectly integrate the two, and there is also a lack of relevant cases in actual engineering [2]. Aiming at the increasingly serious situation of public BEC, Chen Zhentong proposed a design scheme of a LSP building energy consumption monitoring system (ECMS) [3]. Therefore, this article is also a monitoring platform for studying the energy consumption of LSP buildings and combining the BNN for research. Note that principal component analysis is a multivariate statistical method to investigate the correlation between multiple variables. It studies how to reveal the internal structure of multiple variables through a few principal components, that is, to derive a few principal components from the original variables. Principal component analysis transforms a group of variables that may have correlation into a group of linearly uncorrelated variables through orthogonal transformation. The transformed variables are called principal components.The main research content of this paper includes the basic knowledge of BNN, monitoring related technology, energy consumption analysis model, and the overall design of the MS. In this paper, the function and performance of the designed system are tested, and the corresponding data and results are obtained.


## 2. Design of a Large-Scale Public Building Energy Consumption Monitoring Platform Based on BP Neural Network

### 2.1. Neural Network and Its Algorithm

In the practical application of artificial neural network, most neural network models adopt BP network and its variation form. BP network can be used for function approximation: training a network to approximate a function with input vector and corresponding output vector. Pattern recognition: associate it with the input vector with an undetermined output vector. Classification: classify the appropriate methods defined by the input vector. Data compression: reduce the dimension of output vector for transmission or storage.


#### 2.1.1. BNN Principle

Artificial neural network is a machine designed to simulate the functions of the human brain. It can be implemented with electronic or optoelectronic components, or it can be simulated on a traditional computer with software. It has the ability to acquire knowledge and solve problems through learning [4, 5].BNN is a kind of multilayer anticipatory neural network using backpropagation learning algorithm. The BNN includes an input layer, an output layer, and an intermediate layer between the input layer and the output layer. The middle layer has one or more layers because they have no direct contact with the outside world and are also called hidden layers. Hidden layer neurons are also called hidden units [6, 7].


#### 2.1.2. The Steps of the BNN Algorithm

(1)
Initialize the weights and neuron thresholds of each layer of the network to small random numbers.(2)
Provide training samples, namely, input vectora1,a2,…,ax and output vector b1,b2,…,by.(3)
Calculate the output of themth neuron in each layer of the neural network:(1)bm=ℓ∑n=1xwmnan−ϖn.(4)
x is input vector dimension of the mth neuron in this layer, and ℓ is the Sigmoid function, which is divided into two categories:(2)ℓc=11+exp−λc,ℓc=1−exp−c1+exp−c,whereλ is used to control the slope of the curve.(5)
Calculate the error signal of each neuron in the hidden layer and the output layer:(3)ψm=sm−OmOm1−Om.(6)
Calculate the network output error:(4)Q=∑msm−Om22,where sm and Om, respectively, represent the expected output value and actual output value of the mth neuron in the output layer.Besides, BP neural network has been mature both in network theory and in performance. Its outstanding advantage is that it has strong nonlinear mapping ability and flexible network structure. The number of middle layers and the number of neurons in each layer of the network can be set arbitrarily according to the specific situation, and its performance varies with the difference of structure. However, BP neural network also has the following main defects: slow learning speed; ease to fall into local minimum; no corresponding theoretical guidance for the selection of the number of network layers and neurons; limited network promotion capacity.


### 2.2. Related Technologies

#### 2.2.1. Socket Communication Technology

Socket is a socket used to describe the port and IP address. It is a communication chain handle that sends a response or network request to the network.The whole process of Socket establishment, transmission, and closing is as follows: the client program obtains the server’s IP address and port from the server that is monitoring using the Listen() function through the Socket() function, creates a Socket, and then calls the Connect() function to communicate with the server. To establish a connection, you can choose the Bind() function to bind or configure the Socket, or you can skip this step and call it directly after the connection is successful.Besides, WebSocket is a protocol for full duplex communication over a single TCP connection. Its advantages include less control overhead. When data is exchanged between the server and the client after the connection is created, the header of the data packet used for protocol control is relatively small. It has stronger real-time performance. Compared with HTTP requests, it needs to wait for the client to initiate a request before the server can respond, and the delay is significantly less. WebSocket defines extensions. Users can extend the protocol and implement some custom subprotocols.


#### 2.2.2. Web Service Interface Technology

From the perspective of program application, Web Service is an application that exposes to the outside world that it can call APIs through the use of the web; from the perspective of software development, Web Service is a set of specifications for implementing network service calls and releases [8, 9].


#### 2.2.3. XML Technology

According to the rules of XML, various documents can be written, and data can be exchanged on the web or among many other data sources. In the rules of XML, the XML document is divided into three parts, including XML declaration, XML elements, and optional processing instructions [10, 11].LSP building ECMS is a relatively complex information system integrating software and hardware. Its establishment requires the use of various key technologies such as internet of things technology, communication technology, and system growth technology. These core technologies are discussed below.


#### 2.2.4. B/S Architecture

This technology is a new network structure derived from the growth of the internet and web technologies. It is an improvement to the C/S architecture, and the B/S architecture has more advantages. LSP building ECMSs provide real-time BEC information access services to managers, operation and maintenance personnel, owners, and the public, requiring different management and access rights. The B/S architecture has the characteristics of centralized data processing, flexible access methods, simple development and maintenance, and cross-platform operation [12, 13].


#### 2.2.5. Internet of Things Technology

(1)
The perception layer is the basis of the internet of things to identify objects and information collection and can also be called the sensing layer.(2)
The network layer is the bridge of the entire internet of things. It connects the perception layer and the communication network as a channel for information exchange and transmission to realize the communication system of the internet of things.(3)
As the interface between the internet of things and users, the application layer has a high degree of intelligence and can be well integrated with industry needs. It can complete the functions of information collection, transmission, and aggregation of items and realize the intelligent application of the internet of things [14].(4)
The building ECMS adopts the internet of things technology, which uses various smart meters on site to collect the energy consumption of various electrical equipment in the building.It should be noted that the internet of things refers to connecting any object with the network through information sensing equipment according to the agreed protocol, and the object exchanges and communicates information through the information media. The internet of things is the information transmission and control between things, people, and things. There are the following key technologies in the application of the internet of things: sensor technology, which is also the key technology in computer application. Most computers process digital signals. Since the advent of computers, sensors have been required to convert analog signals into digital signals for computer processing. Embedded system technology: it is a complex technology integrating computer software and hardware, sensor technology, integrated circuit technology, and electronic application technology.


#### 2.2.6. ZigBee Technology

The purpose of ZigBee technology is to perfectly serve the establishment of wireless sensor networks in the industrial field and wireless communication networking in the control field. It has the advantages of strong self-organization, low complexity, low rate transmission, economy, reliability, efficiency, and large capacity. The ZigBee network has three topological structures.ZigBee is a wireless network protocol with low speed and short distance transmission. It mainly relies on wireless network for transmission. It can connect wirelessly in a short distance. Data transmission with large information capacity is the main feature of ZigBee technology. In addition, another advantage of ZigBee technology is its strong compatibility. When operating, it can connect the control network in the home without collision and can be well integrated with the network. The characteristics of ZigBee wireless communication technology are as follows: ZigBee’s energy consumption is significantly lower than that of other wireless communication technologies; the investment cost required for ZigBee R&D and use is low; ZigBee has high safety and reliability.


### 2.3. Building Energy Consumption Analysis Model Based on BNN

#### 2.3.1. Feasibility of Automated Analysis of BEC

(1)
The existing BEC evaluation indicators include:Building energy intensity index: building energy intensity indicators refer to the amount of building energy consumed per unit area of a building, such as lighting power consumption per square meter and air conditioning power consumption per square meter.Building energy efficiency indicators: building energy efficiency indicators refer to the ratio of services provided by energy-consuming equipment to the amount of energy consumed.The data basis of the model analysis in this paper is the green BEC index data. The calculation of the index value is calculated based on the building’s one-day energy consumption data and equipment operation data and is compared with the public building standard value.(2)
The selection of indicator data is mainly based on the following three aspects:Universality: the selected index must be universal and applicable to public buildings.Representativeness: the selected BEC index must meet the attributes that can directly or indirectly derive that the building has energy-saving potential.Hierarchical: the selected index must be able to be divided into levels or subitems, so that the weak links of energy consumption of the building can be specifically located, and the energy-saving potential item can be found.(3)
The energy consumption building analysis model chooses the BNN to process and analyze the BEC indicators for the following reasons:Realize automatic knowledge acquisition. After the BNN is trained and learned, it can realize the automatic acquisition of knowledge and can automatically store the relevant rule knowledge.The interference noise is eliminated. The BNN learned through training can automatically eliminate the noise interference in the BEC index data.Improved analysis speed: in the process of analysis, if simple methods such as rule matching, process recursion, and step backtracking are used to achieve the purpose of reasoning and analysis, the analysis speed is very slow.Note that there are two definitions of building energy consumption: generalized building energy consumption refers to the whole process energy consumption from building material manufacturing, building construction to building use. In a narrow sense, building energy consumption, that is, building operation energy consumption, is people’s daily energy consumption, such as heating, air conditioning, lighting, cooking, laundry and so on. Its main features include: large climate differences between the South and the north, large differences in energy consumption between urban and rural housing, and large differences in energy consumption per unit building area except heating of public buildings of different sizes.


### 2.4. The Overall Design of the Monitoring System

LSP building floors are mainly based on the monitored buildings, and the energy consumption information of these buildings is the main data processing object of this system. Therefore, the demand analysis of LSP building floors needs to be specific to the BEC. Process requirements and analyze the system requirements of the building owner.


#### 2.4.1. Basic Functions of the System

(1)
According to the demand analysis of the real-time MS for BEC, this platform needs to implement the following basic functions in order to achieve the final energy consumption monitoring tasks and goals.(2)
Data collection of BEC: According to the current tasks and main objectives of BEC monitoring, only electric energy data will be collected for the time being, and water, coal, gas, etc. It can be planned in a timely manner according to the situation in the future.(3)
Real-time transmission of energy consumption data at the collecting end: The energy consumption data collector is also responsible for packaging the collected energy consumption data in a prescribed format and remotely transmitting it to the system energy consumption database of the data center. This transmission and control is through the hardware of the data collector and the built-in management and control software to fulfill.(4)
Server-side energy consumption data reception and data analysis and storage. After the server receives the energy consumption data packet uploaded by the collector, it needs to verify the correctness of the data packet, and then split and analyze the energy consumption data of the data packet according to the energy splitting rules of the building.(5)
Statistical analysis of energy consumption data: Data from energy consumption monitoring can be used for optimization calculations.(6)
Upload the data to the superior department in charge: The relevant data of the provincial building ECMS needs to be aggregated and uploaded to the National Data Center in accordance with regulations.


#### 2.4.2. Performance Requirements

(1)
Timeliness requirements: The real-time ECMS emphasizes the real-time nature of data and has strong timeliness. The data required and the results after analysis and processing can reflect the real-time energy consumption in a timely manner.(2)
Security requirements: The security of the ECMS includes the security of system access and data security.(3)
System solution is also required.The specific scheme of this system is shown in Figure1.Figure 1
System solutions.


#### 2.4.3. System Framework

Taking into account the maturity of BNN used in engineering and the real-time requirements in intrusion detection, the system uses BNN as the artificial intelligence part, which works in parallel with the traditional intrusion detection part.The system consists of 3 modules: sniffer module, intrusion detection module, and neural network module. The neural network module is composed of three submodules. The details are shown in Figure2.(1)
The sniffer module is responsible for obtaining data packets from the network.(2)
The intrusion detection module mainly completes the functions of protocol analysis and rule matching.The neural network module and the intrusion detection module work in parallel and complement each other. The neural network module is composed of three parts: preprocessing submodule, BNN submodule, and report submodule.The preprocessing submodule is responsible for the function of numerical conversion-converting network data packets of different protocol layers into corresponding mathematical vectors.(3)
The neural network module includes five neural networks.The report submodule only displays network data that is inconsistent with the intrusion detection module and the neural network module in determining whether it is an attack.Figure 2
BP neural network engineering system framework.Besides, before data analysis in the field of machine learning, it is usually necessary to standardize the data and use the standardized data for data analysis. Different evaluation indicators often have different dimensions and dimensional units, which will affect the results of data analysis. In order to eliminate the dimensional impact between indicators, data standardization is needed to solve the comparability between data indicators. After data standardization, all indicators are in the same order of magnitude, which is suitable for comprehensive comparative evaluation.


### 2.5. Related Technologies for Building Energy Consumption Monitoring

#### 2.5.1. Energy Consumption Data Collection Related Technologies

There are two ways to collect energy consumption data: manual collection and automatic collection. The energy consumption data collection in the building ECMS generally adopts the mode of indirect measurement.


#### 2.5.2. Related Technologies for Energy Consumption Data Transmission

The energy consumption data collector shall remotely transmit the collected energy consumption data to the provincial data center system energy consumption database or public data transfer station. The National Collector Technical Guide has specific regulations on the XML format of data packets for data interaction between building energy collectors and data centers, but there are no technical details for specific implementation. The energy consumption data collector loads the data into the data center energy consumption database through a wired or wireless communication network. Using ADSL for long-distance data transmission, all units can easily realize the construction of long-distance data transmission networks by requesting broadband ADSL data transmission services.


#### 2.5.3. Data Encryption Technology

The data packet sent by the data collector to the data center adopts XML format and is transmitted remotely in the form of text. The AES encryption algorithm is required during transmission to encrypt the XML data packet according to the corresponding document.


### 2.6. Design of Energy Consumption Monitoring Center

#### 2.6.1. Data Center Module

The data center receives the point data collected by the data collector and saves it in the ECMS database. The data center will back up the data collected by the data collector every hour and every day as a backup point and calculate the difference and energy consumption. Its logical structure is divided into three layers, as shown in Figure3.Figure 3
Data center logical structure.At the first layer, each data collector request will extract a thread from the thread pool of the data center for processing. The second layer defines all the functions used for monitoring. The third layer of real-time data storage area is used to save the data passed by the data collector in real time, and the backup data is to save hourly and daily real-time data backup, difference, and energy consumption value.(1)
Software design:The data center module can achieve the following:Authenticate the collector.Send configuration information.Monitor whether the data collector is working properly.Receive and store the data collected by the collector.Back up historical data.Request a data collector.(2)
Message boundary processing:The communication between the data center and the data collector adopts the TCP communication mode. TCP processes the data in a stream mode, and there is no message boundary.In addition, TCP is designed to adapt to the hierarchical protocol hierarchy supporting multinetwork applications. Paired processes in host computers connected to different but interconnected computer communication networks rely on TCP to provide reliable communication services. In order to ensure the reliability of message transmission, TCP gives each packet a sequence number. At the same time, the sequence number also ensures the sequential reception of packets transmitted to the receiving entity. Then, the receiving entity sends back a corresponding acknowledgement to the successfully received bytes. If the sending entity does not receive an acknowledgement within a reasonable round-trip delay, the corresponding data will be retransmitted.(3)
Implementation of database access:ADO.NET technology is used in the realization of database access.(4)
Central database design:The database includes a total of seven tables. The basic configuration table of point information includes fields such as point code, point name, device address, device type, data address, and data type.


#### 2.6.2. Business display module

The application server of the platform software of the energy consumption monitoring center uses Windows Server 2018 as the server operating system.(1)
Functional design:The business display platform uses classified household measurement data for electricity, water, gas, heat, and cold as the basis of comprehensive statistical analysis, comprehensively counts various energy consumption data, and combines the energy use status and equipment operation status of various energy-consuming equipment. Analyze energy efficiency and monitor energy consumption in real time.(2)
Page design:Login page: The user logs in to the system through the access address, user name, and password.Real-time monitoring page: The real-time monitoring page refers to the real-time monitoring/alarm page. The page supports query operations, alarm confirmation operations, and alarm mask operations.Energy consumption information page: The energy consumption information overview page contains two subpages: energy billboards and indicator rankings.Building information page: Building information provides users with an overview of energy-consuming building information, including basic information and additional information.Energy statistics page: The module is divided into five parts: classified energy consumption statistics, itemized energy consumption statistics, time-sharing energy consumption statistics, component energy consumption statistics, and meter energy consumption statistics.


## 2.1. Neural Network and Its Algorithm

In the practical application of artificial neural network, most neural network models adopt BP network and its variation form. BP network can be used for function approximation: training a network to approximate a function with input vector and corresponding output vector. Pattern recognition: associate it with the input vector with an undetermined output vector. Classification: classify the appropriate methods defined by the input vector. Data compression: reduce the dimension of output vector for transmission or storage.


### 2.1.1. BNN Principle

Artificial neural network is a machine designed to simulate the functions of the human brain. It can be implemented with electronic or optoelectronic components, or it can be simulated on a traditional computer with software. It has the ability to acquire knowledge and solve problems through learning [4, 5].BNN is a kind of multilayer anticipatory neural network using backpropagation learning algorithm. The BNN includes an input layer, an output layer, and an intermediate layer between the input layer and the output layer. The middle layer has one or more layers because they have no direct contact with the outside world and are also called hidden layers. Hidden layer neurons are also called hidden units [6, 7].


### 2.1.2. The Steps of the BNN Algorithm

(1)
Initialize the weights and neuron thresholds of each layer of the network to small random numbers.(2)
Provide training samples, namely, input vectora1,a2,…,ax and output vector b1,b2,…,by.(3)
Calculate the output of themth neuron in each layer of the neural network:(1)bm=ℓ∑n=1xwmnan−ϖn.(4)
x is input vector dimension of the mth neuron in this layer, and ℓ is the Sigmoid function, which is divided into two categories:(2)ℓc=11+exp−λc,ℓc=1−exp−c1+exp−c,whereλ is used to control the slope of the curve.(5)
Calculate the error signal of each neuron in the hidden layer and the output layer:(3)ψm=sm−OmOm1−Om.(6)
Calculate the network output error:(4)Q=∑msm−Om22,where sm and Om, respectively, represent the expected output value and actual output value of the mth neuron in the output layer.Besides, BP neural network has been mature both in network theory and in performance. Its outstanding advantage is that it has strong nonlinear mapping ability and flexible network structure. The number of middle layers and the number of neurons in each layer of the network can be set arbitrarily according to the specific situation, and its performance varies with the difference of structure. However, BP neural network also has the following main defects: slow learning speed; ease to fall into local minimum; no corresponding theoretical guidance for the selection of the number of network layers and neurons; limited network promotion capacity.


## 2.1.1. BNN Principle

Artificial neural network is a machine designed to simulate the functions of the human brain. It can be implemented with electronic or optoelectronic components, or it can be simulated on a traditional computer with software. It has the ability to acquire knowledge and solve problems through learning [4, 5].BNN is a kind of multilayer anticipatory neural network using backpropagation learning algorithm. The BNN includes an input layer, an output layer, and an intermediate layer between the input layer and the output layer. The middle layer has one or more layers because they have no direct contact with the outside world and are also called hidden layers. Hidden layer neurons are also called hidden units [6, 7].


## 2.1.2. The Steps of the BNN Algorithm

(1)
Initialize the weights and neuron thresholds of each layer of the network to small random numbers.(2)
Provide training samples, namely, input vectora1,a2,…,ax and output vector b1,b2,…,by.(3)
Calculate the output of themth neuron in each layer of the neural network:(1)bm=ℓ∑n=1xwmnan−ϖn.(4)
x is input vector dimension of the mth neuron in this layer, and ℓ is the Sigmoid function, which is divided into two categories:(2)ℓc=11+exp−λc,ℓc=1−exp−c1+exp−c,whereλ is used to control the slope of the curve.(5)
Calculate the error signal of each neuron in the hidden layer and the output layer:(3)ψm=sm−OmOm1−Om.(6)
Calculate the network output error:(4)Q=∑msm−Om22,where sm and Om, respectively, represent the expected output value and actual output value of the mth neuron in the output layer.Besides, BP neural network has been mature both in network theory and in performance. Its outstanding advantage is that it has strong nonlinear mapping ability and flexible network structure. The number of middle layers and the number of neurons in each layer of the network can be set arbitrarily according to the specific situation, and its performance varies with the difference of structure. However, BP neural network also has the following main defects: slow learning speed; ease to fall into local minimum; no corresponding theoretical guidance for the selection of the number of network layers and neurons; limited network promotion capacity.


## 2.2. Related Technologies

### 2.2.1. Socket Communication Technology

Socket is a socket used to describe the port and IP address. It is a communication chain handle that sends a response or network request to the network.The whole process of Socket establishment, transmission, and closing is as follows: the client program obtains the server’s IP address and port from the server that is monitoring using the Listen() function through the Socket() function, creates a Socket, and then calls the Connect() function to communicate with the server. To establish a connection, you can choose the Bind() function to bind or configure the Socket, or you can skip this step and call it directly after the connection is successful.Besides, WebSocket is a protocol for full duplex communication over a single TCP connection. Its advantages include less control overhead. When data is exchanged between the server and the client after the connection is created, the header of the data packet used for protocol control is relatively small. It has stronger real-time performance. Compared with HTTP requests, it needs to wait for the client to initiate a request before the server can respond, and the delay is significantly less. WebSocket defines extensions. Users can extend the protocol and implement some custom subprotocols.


### 2.2.2. Web Service Interface Technology

From the perspective of program application, Web Service is an application that exposes to the outside world that it can call APIs through the use of the web; from the perspective of software development, Web Service is a set of specifications for implementing network service calls and releases [8, 9].


### 2.2.3. XML Technology

According to the rules of XML, various documents can be written, and data can be exchanged on the web or among many other data sources. In the rules of XML, the XML document is divided into three parts, including XML declaration, XML elements, and optional processing instructions [10, 11].LSP building ECMS is a relatively complex information system integrating software and hardware. Its establishment requires the use of various key technologies such as internet of things technology, communication technology, and system growth technology. These core technologies are discussed below.


### 2.2.4. B/S Architecture

This technology is a new network structure derived from the growth of the internet and web technologies. It is an improvement to the C/S architecture, and the B/S architecture has more advantages. LSP building ECMSs provide real-time BEC information access services to managers, operation and maintenance personnel, owners, and the public, requiring different management and access rights. The B/S architecture has the characteristics of centralized data processing, flexible access methods, simple development and maintenance, and cross-platform operation [12, 13].


### 2.2.5. Internet of Things Technology

(1)
The perception layer is the basis of the internet of things to identify objects and information collection and can also be called the sensing layer.(2)
The network layer is the bridge of the entire internet of things. It connects the perception layer and the communication network as a channel for information exchange and transmission to realize the communication system of the internet of things.(3)
As the interface between the internet of things and users, the application layer has a high degree of intelligence and can be well integrated with industry needs. It can complete the functions of information collection, transmission, and aggregation of items and realize the intelligent application of the internet of things [14].(4)
The building ECMS adopts the internet of things technology, which uses various smart meters on site to collect the energy consumption of various electrical equipment in the building.It should be noted that the internet of things refers to connecting any object with the network through information sensing equipment according to the agreed protocol, and the object exchanges and communicates information through the information media. The internet of things is the information transmission and control between things, people, and things. There are the following key technologies in the application of the internet of things: sensor technology, which is also the key technology in computer application. Most computers process digital signals. Since the advent of computers, sensors have been required to convert analog signals into digital signals for computer processing. Embedded system technology: it is a complex technology integrating computer software and hardware, sensor technology, integrated circuit technology, and electronic application technology.


### 2.2.6. ZigBee Technology

The purpose of ZigBee technology is to perfectly serve the establishment of wireless sensor networks in the industrial field and wireless communication networking in the control field. It has the advantages of strong self-organization, low complexity, low rate transmission, economy, reliability, efficiency, and large capacity. The ZigBee network has three topological structures.ZigBee is a wireless network protocol with low speed and short distance transmission. It mainly relies on wireless network for transmission. It can connect wirelessly in a short distance. Data transmission with large information capacity is the main feature of ZigBee technology. In addition, another advantage of ZigBee technology is its strong compatibility. When operating, it can connect the control network in the home without collision and can be well integrated with the network. The characteristics of ZigBee wireless communication technology are as follows: ZigBee’s energy consumption is significantly lower than that of other wireless communication technologies; the investment cost required for ZigBee R&D and use is low; ZigBee has high safety and reliability.


## 2.2.1. Socket Communication Technology

Socket is a socket used to describe the port and IP address. It is a communication chain handle that sends a response or network request to the network.The whole process of Socket establishment, transmission, and closing is as follows: the client program obtains the server’s IP address and port from the server that is monitoring using the Listen() function through the Socket() function, creates a Socket, and then calls the Connect() function to communicate with the server. To establish a connection, you can choose the Bind() function to bind or configure the Socket, or you can skip this step and call it directly after the connection is successful.Besides, WebSocket is a protocol for full duplex communication over a single TCP connection. Its advantages include less control overhead. When data is exchanged between the server and the client after the connection is created, the header of the data packet used for protocol control is relatively small. It has stronger real-time performance. Compared with HTTP requests, it needs to wait for the client to initiate a request before the server can respond, and the delay is significantly less. WebSocket defines extensions. Users can extend the protocol and implement some custom subprotocols.


## 2.2.2. Web Service Interface Technology

From the perspective of program application, Web Service is an application that exposes to the outside world that it can call APIs through the use of the web; from the perspective of software development, Web Service is a set of specifications for implementing network service calls and releases [8, 9].


## 2.2.3. XML Technology

According to the rules of XML, various documents can be written, and data can be exchanged on the web or among many other data sources. In the rules of XML, the XML document is divided into three parts, including XML declaration, XML elements, and optional processing instructions [10, 11].LSP building ECMS is a relatively complex information system integrating software and hardware. Its establishment requires the use of various key technologies such as internet of things technology, communication technology, and system growth technology. These core technologies are discussed below.


## 2.2.4. B/S Architecture

This technology is a new network structure derived from the growth of the internet and web technologies. It is an improvement to the C/S architecture, and the B/S architecture has more advantages. LSP building ECMSs provide real-time BEC information access services to managers, operation and maintenance personnel, owners, and the public, requiring different management and access rights. The B/S architecture has the characteristics of centralized data processing, flexible access methods, simple development and maintenance, and cross-platform operation [12, 13].


## 2.2.5. Internet of Things Technology

(1)
The perception layer is the basis of the internet of things to identify objects and information collection and can also be called the sensing layer.(2)
The network layer is the bridge of the entire internet of things. It connects the perception layer and the communication network as a channel for information exchange and transmission to realize the communication system of the internet of things.(3)
As the interface between the internet of things and users, the application layer has a high degree of intelligence and can be well integrated with industry needs. It can complete the functions of information collection, transmission, and aggregation of items and realize the intelligent application of the internet of things [14].(4)
The building ECMS adopts the internet of things technology, which uses various smart meters on site to collect the energy consumption of various electrical equipment in the building.It should be noted that the internet of things refers to connecting any object with the network through information sensing equipment according to the agreed protocol, and the object exchanges and communicates information through the information media. The internet of things is the information transmission and control between things, people, and things. There are the following key technologies in the application of the internet of things: sensor technology, which is also the key technology in computer application. Most computers process digital signals. Since the advent of computers, sensors have been required to convert analog signals into digital signals for computer processing. Embedded system technology: it is a complex technology integrating computer software and hardware, sensor technology, integrated circuit technology, and electronic application technology.


## 2.2.6. ZigBee Technology

The purpose of ZigBee technology is to perfectly serve the establishment of wireless sensor networks in the industrial field and wireless communication networking in the control field. It has the advantages of strong self-organization, low complexity, low rate transmission, economy, reliability, efficiency, and large capacity. The ZigBee network has three topological structures.ZigBee is a wireless network protocol with low speed and short distance transmission. It mainly relies on wireless network for transmission. It can connect wirelessly in a short distance. Data transmission with large information capacity is the main feature of ZigBee technology. In addition, another advantage of ZigBee technology is its strong compatibility. When operating, it can connect the control network in the home without collision and can be well integrated with the network. The characteristics of ZigBee wireless communication technology are as follows: ZigBee’s energy consumption is significantly lower than that of other wireless communication technologies; the investment cost required for ZigBee R&D and use is low; ZigBee has high safety and reliability.


## 2.3. Building Energy Consumption Analysis Model Based on BNN

### 2.3.1. Feasibility of Automated Analysis of BEC

(1)
The existing BEC evaluation indicators include:Building energy intensity index: building energy intensity indicators refer to the amount of building energy consumed per unit area of a building, such as lighting power consumption per square meter and air conditioning power consumption per square meter.Building energy efficiency indicators: building energy efficiency indicators refer to the ratio of services provided by energy-consuming equipment to the amount of energy consumed.The data basis of the model analysis in this paper is the green BEC index data. The calculation of the index value is calculated based on the building’s one-day energy consumption data and equipment operation data and is compared with the public building standard value.(2)
The selection of indicator data is mainly based on the following three aspects:Universality: the selected index must be universal and applicable to public buildings.Representativeness: the selected BEC index must meet the attributes that can directly or indirectly derive that the building has energy-saving potential.Hierarchical: the selected index must be able to be divided into levels or subitems, so that the weak links of energy consumption of the building can be specifically located, and the energy-saving potential item can be found.(3)
The energy consumption building analysis model chooses the BNN to process and analyze the BEC indicators for the following reasons:Realize automatic knowledge acquisition. After the BNN is trained and learned, it can realize the automatic acquisition of knowledge and can automatically store the relevant rule knowledge.The interference noise is eliminated. The BNN learned through training can automatically eliminate the noise interference in the BEC index data.Improved analysis speed: in the process of analysis, if simple methods such as rule matching, process recursion, and step backtracking are used to achieve the purpose of reasoning and analysis, the analysis speed is very slow.Note that there are two definitions of building energy consumption: generalized building energy consumption refers to the whole process energy consumption from building material manufacturing, building construction to building use. In a narrow sense, building energy consumption, that is, building operation energy consumption, is people’s daily energy consumption, such as heating, air conditioning, lighting, cooking, laundry and so on. Its main features include: large climate differences between the South and the north, large differences in energy consumption between urban and rural housing, and large differences in energy consumption per unit building area except heating of public buildings of different sizes.


## 2.3.1. Feasibility of Automated Analysis of BEC

(1)
The existing BEC evaluation indicators include:Building energy intensity index: building energy intensity indicators refer to the amount of building energy consumed per unit area of a building, such as lighting power consumption per square meter and air conditioning power consumption per square meter.Building energy efficiency indicators: building energy efficiency indicators refer to the ratio of services provided by energy-consuming equipment to the amount of energy consumed.The data basis of the model analysis in this paper is the green BEC index data. The calculation of the index value is calculated based on the building’s one-day energy consumption data and equipment operation data and is compared with the public building standard value.(2)
The selection of indicator data is mainly based on the following three aspects:Universality: the selected index must be universal and applicable to public buildings.Representativeness: the selected BEC index must meet the attributes that can directly or indirectly derive that the building has energy-saving potential.Hierarchical: the selected index must be able to be divided into levels or subitems, so that the weak links of energy consumption of the building can be specifically located, and the energy-saving potential item can be found.(3)
The energy consumption building analysis model chooses the BNN to process and analyze the BEC indicators for the following reasons:Realize automatic knowledge acquisition. After the BNN is trained and learned, it can realize the automatic acquisition of knowledge and can automatically store the relevant rule knowledge.The interference noise is eliminated. The BNN learned through training can automatically eliminate the noise interference in the BEC index data.Improved analysis speed: in the process of analysis, if simple methods such as rule matching, process recursion, and step backtracking are used to achieve the purpose of reasoning and analysis, the analysis speed is very slow.Note that there are two definitions of building energy consumption: generalized building energy consumption refers to the whole process energy consumption from building material manufacturing, building construction to building use. In a narrow sense, building energy consumption, that is, building operation energy consumption, is people’s daily energy consumption, such as heating, air conditioning, lighting, cooking, laundry and so on. Its main features include: large climate differences between the South and the north, large differences in energy consumption between urban and rural housing, and large differences in energy consumption per unit building area except heating of public buildings of different sizes.


## 2.4. The Overall Design of the Monitoring System

LSP building floors are mainly based on the monitored buildings, and the energy consumption information of these buildings is the main data processing object of this system. Therefore, the demand analysis of LSP building floors needs to be specific to the BEC. Process requirements and analyze the system requirements of the building owner.


### 2.4.1. Basic Functions of the System

(1)
According to the demand analysis of the real-time MS for BEC, this platform needs to implement the following basic functions in order to achieve the final energy consumption monitoring tasks and goals.(2)
Data collection of BEC: According to the current tasks and main objectives of BEC monitoring, only electric energy data will be collected for the time being, and water, coal, gas, etc. It can be planned in a timely manner according to the situation in the future.(3)
Real-time transmission of energy consumption data at the collecting end: The energy consumption data collector is also responsible for packaging the collected energy consumption data in a prescribed format and remotely transmitting it to the system energy consumption database of the data center. This transmission and control is through the hardware of the data collector and the built-in management and control software to fulfill.(4)
Server-side energy consumption data reception and data analysis and storage. After the server receives the energy consumption data packet uploaded by the collector, it needs to verify the correctness of the data packet, and then split and analyze the energy consumption data of the data packet according to the energy splitting rules of the building.(5)
Statistical analysis of energy consumption data: Data from energy consumption monitoring can be used for optimization calculations.(6)
Upload the data to the superior department in charge: The relevant data of the provincial building ECMS needs to be aggregated and uploaded to the National Data Center in accordance with regulations.


### 2.4.2. Performance Requirements

(1)
Timeliness requirements: The real-time ECMS emphasizes the real-time nature of data and has strong timeliness. The data required and the results after analysis and processing can reflect the real-time energy consumption in a timely manner.(2)
Security requirements: The security of the ECMS includes the security of system access and data security.(3)
System solution is also required.The specific scheme of this system is shown in Figure1.Figure 1
System solutions.


### 2.4.3. System Framework

Taking into account the maturity of BNN used in engineering and the real-time requirements in intrusion detection, the system uses BNN as the artificial intelligence part, which works in parallel with the traditional intrusion detection part.The system consists of 3 modules: sniffer module, intrusion detection module, and neural network module. The neural network module is composed of three submodules. The details are shown in Figure2.(1)
The sniffer module is responsible for obtaining data packets from the network.(2)
The intrusion detection module mainly completes the functions of protocol analysis and rule matching.The neural network module and the intrusion detection module work in parallel and complement each other. The neural network module is composed of three parts: preprocessing submodule, BNN submodule, and report submodule.The preprocessing submodule is responsible for the function of numerical conversion-converting network data packets of different protocol layers into corresponding mathematical vectors.(3)
The neural network module includes five neural networks.The report submodule only displays network data that is inconsistent with the intrusion detection module and the neural network module in determining whether it is an attack.Figure 2
BP neural network engineering system framework.Besides, before data analysis in the field of machine learning, it is usually necessary to standardize the data and use the standardized data for data analysis. Different evaluation indicators often have different dimensions and dimensional units, which will affect the results of data analysis. In order to eliminate the dimensional impact between indicators, data standardization is needed to solve the comparability between data indicators. After data standardization, all indicators are in the same order of magnitude, which is suitable for comprehensive comparative evaluation.


## 2.4.1. Basic Functions of the System

(1)
According to the demand analysis of the real-time MS for BEC, this platform needs to implement the following basic functions in order to achieve the final energy consumption monitoring tasks and goals.(2)
Data collection of BEC: According to the current tasks and main objectives of BEC monitoring, only electric energy data will be collected for the time being, and water, coal, gas, etc. It can be planned in a timely manner according to the situation in the future.(3)
Real-time transmission of energy consumption data at the collecting end: The energy consumption data collector is also responsible for packaging the collected energy consumption data in a prescribed format and remotely transmitting it to the system energy consumption database of the data center. This transmission and control is through the hardware of the data collector and the built-in management and control software to fulfill.(4)
Server-side energy consumption data reception and data analysis and storage. After the server receives the energy consumption data packet uploaded by the collector, it needs to verify the correctness of the data packet, and then split and analyze the energy consumption data of the data packet according to the energy splitting rules of the building.(5)
Statistical analysis of energy consumption data: Data from energy consumption monitoring can be used for optimization calculations.(6)
Upload the data to the superior department in charge: The relevant data of the provincial building ECMS needs to be aggregated and uploaded to the National Data Center in accordance with regulations.


## 2.4.2. Performance Requirements

(1)
Timeliness requirements: The real-time ECMS emphasizes the real-time nature of data and has strong timeliness. The data required and the results after analysis and processing can reflect the real-time energy consumption in a timely manner.(2)
Security requirements: The security of the ECMS includes the security of system access and data security.(3)
System solution is also required.The specific scheme of this system is shown in Figure1.Figure 1
System solutions.


## 2.4.3. System Framework

Taking into account the maturity of BNN used in engineering and the real-time requirements in intrusion detection, the system uses BNN as the artificial intelligence part, which works in parallel with the traditional intrusion detection part.The system consists of 3 modules: sniffer module, intrusion detection module, and neural network module. The neural network module is composed of three submodules. The details are shown in Figure2.(1)
The sniffer module is responsible for obtaining data packets from the network.(2)
The intrusion detection module mainly completes the functions of protocol analysis and rule matching.The neural network module and the intrusion detection module work in parallel and complement each other. The neural network module is composed of three parts: preprocessing submodule, BNN submodule, and report submodule.The preprocessing submodule is responsible for the function of numerical conversion-converting network data packets of different protocol layers into corresponding mathematical vectors.(3)
The neural network module includes five neural networks.The report submodule only displays network data that is inconsistent with the intrusion detection module and the neural network module in determining whether it is an attack.Figure 2
BP neural network engineering system framework.Besides, before data analysis in the field of machine learning, it is usually necessary to standardize the data and use the standardized data for data analysis. Different evaluation indicators often have different dimensions and dimensional units, which will affect the results of data analysis. In order to eliminate the dimensional impact between indicators, data standardization is needed to solve the comparability between data indicators. After data standardization, all indicators are in the same order of magnitude, which is suitable for comprehensive comparative evaluation.


## 2.5. Related Technologies for Building Energy Consumption Monitoring

### 2.5.1. Energy Consumption Data Collection Related Technologies

There are two ways to collect energy consumption data: manual collection and automatic collection. The energy consumption data collection in the building ECMS generally adopts the mode of indirect measurement.


### 2.5.2. Related Technologies for Energy Consumption Data Transmission

The energy consumption data collector shall remotely transmit the collected energy consumption data to the provincial data center system energy consumption database or public data transfer station. The National Collector Technical Guide has specific regulations on the XML format of data packets for data interaction between building energy collectors and data centers, but there are no technical details for specific implementation. The energy consumption data collector loads the data into the data center energy consumption database through a wired or wireless communication network. Using ADSL for long-distance data transmission, all units can easily realize the construction of long-distance data transmission networks by requesting broadband ADSL data transmission services.


### 2.5.3. Data Encryption Technology

The data packet sent by the data collector to the data center adopts XML format and is transmitted remotely in the form of text. The AES encryption algorithm is required during transmission to encrypt the XML data packet according to the corresponding document.


## 2.5.1. Energy Consumption Data Collection Related Technologies

There are two ways to collect energy consumption data: manual collection and automatic collection. The energy consumption data collection in the building ECMS generally adopts the mode of indirect measurement.


## 2.5.2. Related Technologies for Energy Consumption Data Transmission

The energy consumption data collector shall remotely transmit the collected energy consumption data to the provincial data center system energy consumption database or public data transfer station. The National Collector Technical Guide has specific regulations on the XML format of data packets for data interaction between building energy collectors and data centers, but there are no technical details for specific implementation. The energy consumption data collector loads the data into the data center energy consumption database through a wired or wireless communication network. Using ADSL for long-distance data transmission, all units can easily realize the construction of long-distance data transmission networks by requesting broadband ADSL data transmission services.


## 2.5.3. Data Encryption Technology

The data packet sent by the data collector to the data center adopts XML format and is transmitted remotely in the form of text. The AES encryption algorithm is required during transmission to encrypt the XML data packet according to the corresponding document.


## 2.6. Design of Energy Consumption Monitoring Center

### 2.6.1. Data Center Module

The data center receives the point data collected by the data collector and saves it in the ECMS database. The data center will back up the data collected by the data collector every hour and every day as a backup point and calculate the difference and energy consumption. Its logical structure is divided into three layers, as shown in Figure3.Figure 3
Data center logical structure.At the first layer, each data collector request will extract a thread from the thread pool of the data center for processing. The second layer defines all the functions used for monitoring. The third layer of real-time data storage area is used to save the data passed by the data collector in real time, and the backup data is to save hourly and daily real-time data backup, difference, and energy consumption value.(1)
Software design:The data center module can achieve the following:Authenticate the collector.Send configuration information.Monitor whether the data collector is working properly.Receive and store the data collected by the collector.Back up historical data.Request a data collector.(2)
Message boundary processing:The communication between the data center and the data collector adopts the TCP communication mode. TCP processes the data in a stream mode, and there is no message boundary.In addition, TCP is designed to adapt to the hierarchical protocol hierarchy supporting multinetwork applications. Paired processes in host computers connected to different but interconnected computer communication networks rely on TCP to provide reliable communication services. In order to ensure the reliability of message transmission, TCP gives each packet a sequence number. At the same time, the sequence number also ensures the sequential reception of packets transmitted to the receiving entity. Then, the receiving entity sends back a corresponding acknowledgement to the successfully received bytes. If the sending entity does not receive an acknowledgement within a reasonable round-trip delay, the corresponding data will be retransmitted.(3)
Implementation of database access:ADO.NET technology is used in the realization of database access.(4)
Central database design:The database includes a total of seven tables. The basic configuration table of point information includes fields such as point code, point name, device address, device type, data address, and data type.


### 2.6.2. Business display module

The application server of the platform software of the energy consumption monitoring center uses Windows Server 2018 as the server operating system.(1)
Functional design:The business display platform uses classified household measurement data for electricity, water, gas, heat, and cold as the basis of comprehensive statistical analysis, comprehensively counts various energy consumption data, and combines the energy use status and equipment operation status of various energy-consuming equipment. Analyze energy efficiency and monitor energy consumption in real time.(2)
Page design:Login page: The user logs in to the system through the access address, user name, and password.Real-time monitoring page: The real-time monitoring page refers to the real-time monitoring/alarm page. The page supports query operations, alarm confirmation operations, and alarm mask operations.Energy consumption information page: The energy consumption information overview page contains two subpages: energy billboards and indicator rankings.Building information page: Building information provides users with an overview of energy-consuming building information, including basic information and additional information.Energy statistics page: The module is divided into five parts: classified energy consumption statistics, itemized energy consumption statistics, time-sharing energy consumption statistics, component energy consumption statistics, and meter energy consumption statistics.


## 2.6.1. Data Center Module

The data center receives the point data collected by the data collector and saves it in the ECMS database. The data center will back up the data collected by the data collector every hour and every day as a backup point and calculate the difference and energy consumption. Its logical structure is divided into three layers, as shown in Figure3.Figure 3
Data center logical structure.At the first layer, each data collector request will extract a thread from the thread pool of the data center for processing. The second layer defines all the functions used for monitoring. The third layer of real-time data storage area is used to save the data passed by the data collector in real time, and the backup data is to save hourly and daily real-time data backup, difference, and energy consumption value.(1)
Software design:The data center module can achieve the following:Authenticate the collector.Send configuration information.Monitor whether the data collector is working properly.Receive and store the data collected by the collector.Back up historical data.Request a data collector.(2)
Message boundary processing:The communication between the data center and the data collector adopts the TCP communication mode. TCP processes the data in a stream mode, and there is no message boundary.In addition, TCP is designed to adapt to the hierarchical protocol hierarchy supporting multinetwork applications. Paired processes in host computers connected to different but interconnected computer communication networks rely on TCP to provide reliable communication services. In order to ensure the reliability of message transmission, TCP gives each packet a sequence number. At the same time, the sequence number also ensures the sequential reception of packets transmitted to the receiving entity. Then, the receiving entity sends back a corresponding acknowledgement to the successfully received bytes. If the sending entity does not receive an acknowledgement within a reasonable round-trip delay, the corresponding data will be retransmitted.(3)
Implementation of database access:ADO.NET technology is used in the realization of database access.(4)
Central database design:The database includes a total of seven tables. The basic configuration table of point information includes fields such as point code, point name, device address, device type, data address, and data type.


## 2.6.2. Business display module

The application server of the platform software of the energy consumption monitoring center uses Windows Server 2018 as the server operating system.(1)
Functional design:The business display platform uses classified household measurement data for electricity, water, gas, heat, and cold as the basis of comprehensive statistical analysis, comprehensively counts various energy consumption data, and combines the energy use status and equipment operation status of various energy-consuming equipment. Analyze energy efficiency and monitor energy consumption in real time.(2)
Page design:Login page: The user logs in to the system through the access address, user name, and password.Real-time monitoring page: The real-time monitoring page refers to the real-time monitoring/alarm page. The page supports query operations, alarm confirmation operations, and alarm mask operations.Energy consumption information page: The energy consumption information overview page contains two subpages: energy billboards and indicator rankings.Building information page: Building information provides users with an overview of energy-consuming building information, including basic information and additional information.Energy statistics page: The module is divided into five parts: classified energy consumption statistics, itemized energy consumption statistics, time-sharing energy consumption statistics, component energy consumption statistics, and meter energy consumption statistics.


## 3. System Test

### 3.1. System Test Content and Method

The test of BEC real-time MS mainly revolves around data collection, data processing, function realization, and other aspects to assess the overall ability of the system. For the testing of a software system, in addition to the conventional ease of use, security, compatibility, and other tests, the function realization of the software system is often the focus. System performance testing is to test changes through load testing and stress testing.


### 3.2. Function Test

Test environment deployment.Simulation server computer: install Windows Server 2018.Simulate a client computer: install Windows XP.Technical parameters are shown in Table1.Table 1
Server technical parameters.
ServerModelConfigurationWebLenovo X3950M7Chipset: IntelC610 chipsetProcessor: 2 IntelXeonE5-2630v3Memory: 4x16GB memory,Hard disk: 3 pieces of 300GB10K6Gbps SASNetwork card: standard 4 Gigabit Ethernet controllerHBA card: 1 6 GB single-port HBA cardPower supply: 2 redundant Waste heat plug-in power supplyDBLenovo X3550M4Chipset: IntelC602J chipsetProcessor: 2 IntelXeonE7-4820v3Memory: 128 GBHard disk: 3 300GB10K6Gbps SASNetwork cards: standard 4 Gigabit Ethernet controllerHBA cards: 2 6 GB single-port HBA cardsPower supply: 2 redundant Waste heat plug-in power supplyTest preparation: according to the black box test method, the test case is designed as the original data uploaded by the client, and the data upload by the data collector is simulated.


#### 3.2.1. Testing Process

The simulation client sends the test energy consumption data packet XML file through FTP and checks the files under the Ems Data folder of the simulation server to confirm whether the server can receive the data packet normally, so as to detect the correctness of the data receiving module in the data acquisition subsystem. Check the functional modules of the data analysis subsystem, and log in to the system through the owner user to detect whether the user can correctly access the energy consumption information of the relevant building and whether the user can correctly query and statistical data.


### 3.3. Performance Test

For building energy consumption monitoring systems, the main users of building owners and government energy-saving department managers do not often visit the system for business processing, so the system load and pressure caused by this are not large. Therefore, in this performance test, after the energy consumption data is sent from the data collector, it is transmitted to the system data server through the network. The server receives and stores the original data packet, and the process of verifying, analyzing, and storing the data packet is regarded as one time. The collection of energy consumption is time-consuming, and the performance test of the data processing capability of the system is carried out. The test is carried out by setting the number of monitoring collection points and the collection frequency, and the test ignores the processing delay caused by the instability of the network or hardware.


## 3.1. System Test Content and Method

The test of BEC real-time MS mainly revolves around data collection, data processing, function realization, and other aspects to assess the overall ability of the system. For the testing of a software system, in addition to the conventional ease of use, security, compatibility, and other tests, the function realization of the software system is often the focus. System performance testing is to test changes through load testing and stress testing.


## 3.2. Function Test

Test environment deployment.Simulation server computer: install Windows Server 2018.Simulate a client computer: install Windows XP.Technical parameters are shown in Table1.Table 1
Server technical parameters.
ServerModelConfigurationWebLenovo X3950M7Chipset: IntelC610 chipsetProcessor: 2 IntelXeonE5-2630v3Memory: 4x16GB memory,Hard disk: 3 pieces of 300GB10K6Gbps SASNetwork card: standard 4 Gigabit Ethernet controllerHBA card: 1 6 GB single-port HBA cardPower supply: 2 redundant Waste heat plug-in power supplyDBLenovo X3550M4Chipset: IntelC602J chipsetProcessor: 2 IntelXeonE7-4820v3Memory: 128 GBHard disk: 3 300GB10K6Gbps SASNetwork cards: standard 4 Gigabit Ethernet controllerHBA cards: 2 6 GB single-port HBA cardsPower supply: 2 redundant Waste heat plug-in power supplyTest preparation: according to the black box test method, the test case is designed as the original data uploaded by the client, and the data upload by the data collector is simulated.


### 3.2.1. Testing Process

The simulation client sends the test energy consumption data packet XML file through FTP and checks the files under the Ems Data folder of the simulation server to confirm whether the server can receive the data packet normally, so as to detect the correctness of the data receiving module in the data acquisition subsystem. Check the functional modules of the data analysis subsystem, and log in to the system through the owner user to detect whether the user can correctly access the energy consumption information of the relevant building and whether the user can correctly query and statistical data.


## 3.2.1. Testing Process

The simulation client sends the test energy consumption data packet XML file through FTP and checks the files under the Ems Data folder of the simulation server to confirm whether the server can receive the data packet normally, so as to detect the correctness of the data receiving module in the data acquisition subsystem. Check the functional modules of the data analysis subsystem, and log in to the system through the owner user to detect whether the user can correctly access the energy consumption information of the relevant building and whether the user can correctly query and statistical data.


## 3.3. Performance Test

For building energy consumption monitoring systems, the main users of building owners and government energy-saving department managers do not often visit the system for business processing, so the system load and pressure caused by this are not large. Therefore, in this performance test, after the energy consumption data is sent from the data collector, it is transmitted to the system data server through the network. The server receives and stores the original data packet, and the process of verifying, analyzing, and storing the data packet is regarded as one time. The collection of energy consumption is time-consuming, and the performance test of the data processing capability of the system is carried out. The test is carried out by setting the number of monitoring collection points and the collection frequency, and the test ignores the processing delay caused by the instability of the network or hardware.


## 4. Test Analysis

### 4.1. The Number of Collection Points and the Time-Consuming Performance Test of System Energy Consumption Collection

This test is to set that when the collection frequency is constant, the system will complete a test of the relationship between the data collection time and the number of collection points for all collection points. The specific situation is shown in Table2.Table 2
Number of collection points and energy consumption collection time-consuming test results.
Number of collection pointsTheoretical time consumptionActual time consumption1321532.13032.34532.56032.7It can be seen from Figure4 that the system can process the data uploaded from the energy consumption collector in a normal time. With the increase in the number of collection points, the time-consuming collection of energy consumption is more time-consuming than the theoretical time consumption.Figure 4
Number of collection points and energy consumption collection time-consuming test results.


### 4.2. Collection Frequency and System Energy Consumption Collection Time-Consuming Performance Test

Different users have different requirements for data accuracy. In this test, the collection points are set to 20 and 60, respectively, and the collection frequency is selected at 8 minutes, 16 minutes, 24 minutes, 32 minutes, and 40 minutes, respectively. The specific test results are shown in Table3.Table 3
Collection frequency and energy consumption collection time-consuming test results.
Acquisition frequency20, time consuming60, time consumingMultiple relationship82804301.536161502001.33324951301.36832751001.3334065901.384It can be seen from Figure5 that the shorter the sampling interval, the more the number of collection points, and the more time taken to collect energy consumption. In order to ensure the performance of system data processing, an appropriate collection frequency should be set to ensure the normal operation of the system.Figure 5
Collection frequency and energy consumption collection time-consuming test results.


## 4.1. The Number of Collection Points and the Time-Consuming Performance Test of System Energy Consumption Collection

This test is to set that when the collection frequency is constant, the system will complete a test of the relationship between the data collection time and the number of collection points for all collection points. The specific situation is shown in Table2.Table 2
Number of collection points and energy consumption collection time-consuming test results.
Number of collection pointsTheoretical time consumptionActual time consumption1321532.13032.34532.56032.7It can be seen from Figure4 that the system can process the data uploaded from the energy consumption collector in a normal time. With the increase in the number of collection points, the time-consuming collection of energy consumption is more time-consuming than the theoretical time consumption.Figure 4
Number of collection points and energy consumption collection time-consuming test results.


## 4.2. Collection Frequency and System Energy Consumption Collection Time-Consuming Performance Test

Different users have different requirements for data accuracy. In this test, the collection points are set to 20 and 60, respectively, and the collection frequency is selected at 8 minutes, 16 minutes, 24 minutes, 32 minutes, and 40 minutes, respectively. The specific test results are shown in Table3.Table 3
Collection frequency and energy consumption collection time-consuming test results.
Acquisition frequency20, time consuming60, time consumingMultiple relationship82804301.536161502001.33324951301.36832751001.3334065901.384It can be seen from Figure5 that the shorter the sampling interval, the more the number of collection points, and the more time taken to collect energy consumption. In order to ensure the performance of system data processing, an appropriate collection frequency should be set to ensure the normal operation of the system.Figure 5
Collection frequency and energy consumption collection time-consuming test results.


## 5. Conclusion

With the changes of the times, people’s demand for and consumption of energy are increasing. In this big data, high-speed, and intelligent society, for some LSP construction energy-consuming enterprises, using internet technology to calculate and predict people’s energy consumption is a way worth trying. The public building ECMS studied in this paper calculates the detection time of power consumption and energy consumption. Experimental results show that when the sampling interval is shorter and the number of collection points is high, the time-consuming collection of energy consumption will increase. Therefore, in this experiment, it is necessary to select an appropriate frequency to ensure the operation of the system and the accuracy of the results. With the advent of the cloud era, big data has also attracted more and more attention. Against the backdrop of technological innovation represented by cloud computing, these data that originally seemed difficult to collect and use began to be easily used. Through continuous innovation in all walks of life, big data will gradually create more value for mankind.



---

*Source: 6438909-2021-10-19.xml*