CN116485026A - Building thermal comfort degree prediction method and device based on indoor people number - Google Patents

Building thermal comfort degree prediction method and device based on indoor people number Download PDF

Info

Publication number
CN116485026A
CN116485026A CN202310470511.9A CN202310470511A CN116485026A CN 116485026 A CN116485026 A CN 116485026A CN 202310470511 A CN202310470511 A CN 202310470511A CN 116485026 A CN116485026 A CN 116485026A
Authority
CN
China
Prior art keywords
target
indoor
data
neural network
thermal comfort
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310470511.9A
Other languages
Chinese (zh)
Inventor
马启孝
廖俊淇
魏昕
周亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Posts and Telecommunications
Original Assignee
Nanjing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Posts and Telecommunications filed Critical Nanjing University of Posts and Telecommunications
Priority to CN202310470511.9A priority Critical patent/CN116485026A/en
Publication of CN116485026A publication Critical patent/CN116485026A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/285Selection of pattern recognition techniques, e.g. of classifiers in a multi-classifier system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/096Transfer learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/08Construction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10048Infrared image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30241Trajectory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30242Counting objects in image

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Business, Economics & Management (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Operations Research (AREA)
  • Primary Health Care (AREA)
  • Quality & Reliability (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Development Economics (AREA)
  • Multimedia (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a building thermal comfort degree prediction method based on the number of indoor people, which comprises the following steps: collecting indoor environment data; and inputting the collected indoor environment data into a constructed building thermal comfort degree prediction model based on the number of indoor people, and outputting a prediction result of the building thermal comfort degree. According to the building thermal comfort level prediction model based on the indoor people number, the building thermal comfort level prediction model based on the indoor people number is built by adding the indoor people number attribute, and the prediction accuracy of the building thermal comfort level is effectively improved.

Description

Building thermal comfort degree prediction method and device based on indoor people number
Technical Field
The invention belongs to the technical field of Internet of things, and particularly relates to a building thermal comfort degree prediction method and device based on the number of indoor people.
Background
In the context of digital economy, the concept of intelligent architecture has been developed by combining the emerging technologies represented by the internet of things, artificial intelligence, cloud computing, big data, etc. with architecture, and has become an important paradigm for digital technology to enable the traditional architecture industry.
Comfort and energy conservation are two major goals of intelligent buildings, while grasping the thermal comfort of personnel in a building space is critical to achieving these two goals, which can help Heating Ventilation and Air Conditioning (HVAC) systems formulate a green and efficient intervention strategy. It is counted that buildings account for 40% of the world's energy usage, and more than half of this energy is used in HVAC systems to maintain indoor thermal comfort. Despite the huge energy consumption, up to 62% of occupants feel dissatisfied with the thermal environment of their workplace, and poor indoor thermal environment affects the health of people and the working efficiency, so accurate thermal comfort prediction is considered to be an outstanding and important topic. While current thermal comfort predictions still present the following difficulties and challenges.
First, human perception of the thermal environment has both a physical basis and a subjective difference, meaning that human comfort is affected by many factors. The current large number of thermal comfort prediction schemes only consider common thermal comfort factors such as temperature, humidity and the like, and are not comprehensive.
Secondly, there is a complex nonlinear relationship between thermal comfort and its influencing factors, which is difficult to model accurately. Most of the existing thermal comfort models currently design explicit thermal comfort expressions or directly link input attributes and thermal comfort by adopting a coarse-granularity fusion mechanism, and the prediction accuracy is not high.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides the building thermal comfort degree prediction method and the device based on the number of indoor people.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows:
in a first aspect, a method for predicting building thermal comfort based on the number of people in a room is provided, including: collecting indoor environment data; and inputting the collected indoor environment data into a constructed building thermal comfort degree prediction model based on the number of indoor people, and outputting a prediction result of the building thermal comfort degree.
Further, the indoor environment data comprises indoor environment attributes and indoor people number attributes determined based on a finite state machine; the indoor environmental attributes include indoor temperature, indoor relative humidity, garment thermal resistance, wind speed, age, metabolic rate, and gender attributes.
Further, the method for determining the indoor people number attribute comprises the following steps: collecting infrared array data of target personnel in a designated area; performing binarization operation on the collected infrared array data F (x, y, t) at the moment t, and filtering out pixel points in which the background is arranged in the infrared pixels; the binarized threshold value is used for taking the average value of infrared pixels in the local 3X 3 range of the pixel points to obtain an infrared array F without background 1 (x,y,t);
The threshold is the average value of infrared pixels in the range of 3×3 of the pixel point; enlarging the target area to match the actual target using the etching operation in the morphological treatment,
wherein F' (x, y, t) is infrared array data at time t after corrosion operation treatment, and B is a structural element in the corrosion operation; performing feature extraction on the infrared array data by using a position information extraction operator to obtain a feature matrix related to the target space position:
T(x,y,t)=(T(x,t),T(y,t)) (3)
T(x,t)=F v *var(x,t)+F m *(maxF(x,y,t)-minF(x,y,t)) (4)
T(y,t)=F v *var(y,t)+F m *(maxF(x,y,t)-minF(x,y,t)) (5)
wherein T (x, y, T) is the feature matrix of the infrared array data, the value of T (x, y, T) is positively correlated with the likelihood weight of the target existing at the point of time T (x, y), var (x, T) is the variance of the M infrared array data in the x-th column at time T, maxF (x, y, T) is the maximum infrared array data in the x-th column at time T, minF (x, y, T) is the minimum infrared array data in the x-th column at time T, F v 、F m Respectively two weighting coefficients, F v F is 2 times the size of m The method comprises the steps of carrying out a first treatment on the surface of the Calculating a left target position using the left M/2 column of the feature matrix T (x, y, T)The right M/2 column calculates the right target position +.>
By calculation ofThe space distance between the two targets A and B in two moments determines the mapping relation of the targets on continuous time, so that the number and the motion trail of the targets are obtained; suppose target A, B is at t 1 The time positions are respectivelyWherein->Target A, B at t respectively 1 The horizontal and vertical coordinate values of the moment in time, and detects that the target A, B is at t 1 Is the adjacent time t of (2) 2 (t 1 +Δt) two pieces of position information are +.>But it is not known to which position A, B corresponds specifically; wherein the method comprises the steps ofIs A, B at t 2 Coordinates of the moment; the spatial distance calculation formula is as follows:
wherein DIS is space (O 1 ,O 3 ) Is O in adjacent time 1 And O 3 Square of distance, DIS space (O 1 ,O 4 ) Is O in adjacent time 1 And O 4 Is compared with DIS by the square of the distance space (O 1 ,O 3 ) And DIS space (O 1 ,O 4 ) O corresponding to smaller one 3 Or O 4 I.e. at time t 2 The corresponding position, at the same time using the elimination method, also yields the target B at time t 2 A corresponding position; according to the number of targets and the motion trail, the method utilizes a limited wayAnd the state machine records the track, so as to obtain the information of the number of people.
Further, the building thermal comfort prediction model based on the number of indoor people comprises: the migrated neural network is used for extracting the characteristics of the indoor environment attribute to obtain first characteristic information; g 8 The neural network is used for carrying out feature extraction on the attributes of the number of indoor people to obtain second feature information; feature fusion network g fusion The method comprises the steps of fusing first characteristic information and second characteristic information to obtain fused characteristic information; and the AGBM classifier is used for carrying out iterative prediction on the fusion characteristic information to obtain a prediction result of the building thermal comfort level.
Further, the training method of the migrated neural network comprises the following steps: training a source domain by taking a global thermal comfort database as the source domain, and regarding a data set of the source domain:
wherein data set B is a global thermal comfort database, N 1 The amount of data representing the data set B,input data representing different attributes, i representing seven different attributes, and having {1,2,3,4,5,6,7}, corresponding to temperature, relative humidity, clothing level, wind speed, age, metabolic rate, sex, respectively; />The label value in the source domain data set is { -3, -2, -1,0,1,2,3}, which respectively represents cold, cool, slightly cool, moderate, slightly warm, warm and hot; will->Transferring to neural network to extract relevant features, and then using tag via full connection layer>Training is carried out; the loss function of the source domain is defined as:
wherein,,representing the loss function of the source domain, θ S Is a parameter of the source domain neural network, +.>As a loss function, it is defined as follows:
wherein,,to indicate the function, when->When the indication function is 1, otherwise 0 +.>Representing the output value of q in various outputs of the source domain neural network; outputting a trained source domain neural network after the source domain training is finished; the dataset of the target domain is:
wherein N is 2 The amount of data representing the data set a,representing inputs of different attributes, n representing 8 different attributes, the values being {1,2,3,4,5,6,7,8}, respectivelyCorresponding temperature, relative humidity, clothing level, wind speed, age, metabolic rate, sex, number of people in the room,/->Tag values in the target domain dataset; the difference between the target domain and the source domain is that the target domain has more indoor people, and the indoor people are trained separately from other attributes; using Deep CORAL method, an adaptive layer is added to solve the difference between the source domain and the target domain, and the domain difference loss measured by CORAL is defined as the distance between the second order covariance of the source domain feature and the target domain feature:
wherein,,is the square matrix Frobenius norm, d is the feature output dimension, C S And C T The characteristic covariance matrixes of the source domain and the target domain are respectively:
Wherein b is the training batch size, D s Input data being a source domainD T Is the target domain input data { Γ ] j Temperature, relative humidity, garment thermal resistance, wind speed, age, metabolic rate, and sex properties, 1 b Is a column vector of all 1's; when the source domain training is performed, the input of the source domain data and the label of the source domain data are used for performing supervision training to obtain the loss function of the source domain +.>Since only input data of the target domain is used in the target domain and tag data of the target domain is not used, L is calculated by training the input data of the target domain and the source domain data together CORAL Value, final purpose is to add source domain loss function->And L CORAL Co-optimizing to a minimum; pair L by random gradient descent algorithm CORAL And Source Domain loss->Simultaneously optimizing, minimizing migration loss and source domain supervision loss to obtain parameters theta of all hidden layers of the source domain neural network S The method comprises the steps of carrying out a first treatment on the surface of the And migrating p hidden layers in front of the source domain neural network to obtain a migrated neural network.
Further, g 8 A method of training a neural network, comprising: the method comprises the steps of performing feature extraction on an indoor population attribute part of a target domain by independently training a neural network, wherein input data are as follows:will input data +.>Inputting a neural network for training to obtain: / >Wherein U is 8 The characteristic output which represents the indoor people number attribute and is extracted after the neural network; the neural network of this part is called +.>Wherein T is 8 Input representing attribute part of the number of people in the room, +.>Neural network parameters representing the attributes of the number of people in a room.
Further, feature fusion network g fusion Comprises the following steps: first, the data set of the target domain is obtainedInputting the target domain network, and obtaining after the target domain network passes through the neural network migrated in the previous p layersWherein U is 1-7 The first seven attributes which do not include the attributes of the number of people in the room are represented, and the first characteristic information is output through the characteristics extracted after the migrated neural network; at the same time, the trained indoor population attribute part neural network of the target domain, namely g 8 Second characteristic information U extracted by neural network 8 Inputting the characteristics into a characteristic fusion network; the first characteristic information and the second characteristic information are input into the characteristic fusion network g together fusion After that, the corresponding output is obtained: />Wherein V is 1-8 The characteristic extracted by the neural network is fused with the characteristic extracted by the attribute representing the indoor number of people and other seven attributes; the expression of the complete feature fusion network is: g fusion (U 1-7 ,U 8 ;θ f ) Wherein θ is f Is a parameter of the feature fusion network.
Further, the training method of the AGBM classifier comprises the following steps: AGBM classifier g GBM (V 1-8 ) Wherein V is 1-8 The method is characterized by representing the overall characteristics of eight attributes extracted from the characteristic fusion network, wherein the specific expression is as follows: :
wherein x is j Representing a feature vector corresponding to the j-th data after feature extraction; will V 1-8 As characteristic informationInputting information into an AGBM classifier, and performing iterative training for a plurality of times; square loss was chosen as the loss function:
the total loss function is expressed as:
deriving a total loss function:
the residual is then represented by a negative gradient, the residual expression for each base learner being:
wherein,,for residuals to be fitted when the output class of each base learner is k, l represents different base learners, and l=1 represents a decision tree; l=2 represents logistic regression; l=3 represents DART, K is the number of heat comfort classes of the output, and total 7 classes are respectively cold, cool, slightly cool, moderate, slightly warm, warm and heat, namely K=7, x j For input features->For the base learner in the target domain data set A after the one-hot encoding is l, inputting x when the output class is k j The corresponding label value, p (x), is the probability value of the current class output after the softmax function; taking k=1 as an example of the first category, the parameter α of the base learner is optimized such that the current base learner outputs a residue closer to the previous step Difference value:
wherein m is the iteration number,alpha is the parameter of the current base learner l; optimizing the step size parameter ρ so that the total output of the current iteration is closer to the tag value:
wherein F is m-1 (x j ) Output value for the m-1 th iteration; calculating the total output value of the iteration, and multiplying the output value of the basic learner of the previous iteration by the step length by the output value of the basic learner of the current iteration:
after training, the loss functions of the three basic learners are compared:
the total loss function expression of the base learner is:
wherein,,for the tag value in the target domain data set A when the base learner is l, +.>Is the final output value of the base learner; training the base learners of other categories by the same method to finally obtain K optimal base learner groups consisting of M optimal base learners under K categories, and finally outputting the predicted thermal comfort category by the AGBM classifier consisting of the trained base learner groups.
In a second aspect, there is provided a building thermal comfort prediction apparatus based on the number of people in a room, comprising: the data acquisition module is used for acquiring indoor environment data; and the building thermal comfort level prediction module is used for inputting the collected indoor environment data into a built building thermal comfort level prediction model based on the number of indoor people and outputting a prediction result of the building thermal comfort level.
Compared with the prior art, the invention has the beneficial effects that:
(1) The invention collects indoor environment data; the collected indoor environment data is input into a constructed building thermal comfort degree prediction model based on the number of indoor people, and a prediction result of the building thermal comfort degree is output, so that the prediction accuracy of the building thermal comfort degree is effectively improved;
(2) The invention improves the people number acquisition accuracy of the infrared array sensor by means of the finite state machine, so that the acquired data of the people number is more accurate;
(3) According to the intelligent building intelligent prediction method, the characteristics affecting the thermal comfort attribute of the intelligent building are extracted from the big data set by means of transfer learning and neural network extraction, so that the problems of small scale and high difficulty of the data set with the number attribute acquired by the intelligent building intelligent prediction method are solved, and the model prediction accuracy is effectively improved;
(4) The invention increases the self-selection method of the base learner based on the traditional GBM algorithm, and further improves the accuracy of finally predicting the thermal comfort of the intelligent building.
Drawings
FIG. 1 is a frame diagram of a method for predicting the thermal comfort of a building based on the number of people in a room, provided by an embodiment of the invention;
FIG. 2 is a diagram of a track log state transition of a finite state machine according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a building thermal comfort predictive model based on the number of people in a room in an embodiment of the invention;
FIG. 4 is a graph comparing the prediction results of the method according to the embodiment of the present invention with the prediction method in the prior art.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for more clearly illustrating the technical aspects of the present invention, and are not intended to limit the scope of the present invention.
Embodiment one:
as shown in fig. 1 to 4, a method for predicting building thermal comfort based on the number of people in a room includes: collecting indoor environment data; and inputting the collected indoor environment data into a constructed building thermal comfort degree prediction model based on the number of indoor people, and outputting a prediction result of the building thermal comfort degree. The indoor environment data comprises indoor environment attributes and indoor people number attributes determined based on a finite state machine; the indoor environmental attributes include indoor temperature, indoor relative humidity, garment thermal resistance, wind speed, age, metabolic rate, and gender attributes.
The main process of collecting indoor environment data in this embodiment is as follows.
Step 1: the indoor temperature, humidity and other attributes affecting the thermal comfort level in the intelligent building are acquired by using the temperature, humidity and other sensors, the indoor effective number of people is acquired by using the infrared array sensor, the information of the indoor number of people is determined by combining a finite state machine, the indoor householder is gathered to feel the thermal comfort level, and a small data set containing the thermal comfort level of the indoor number of people is established.
(1-1) acquiring infrared array data of a target person passing through the area by an MLX90641 infrared array sensor, the acquired data being a matrix data comprising 16 x 12 temperature values; and meanwhile, the temperature, humidity and other sensors are used for acquiring the indoor temperature, humidity and other attributes affecting the thermal comfort in the intelligent building.
The number of people data acquired in the step (1-2) passes through a data processing module, a target positioning module, a mapping relation module and a track generating module. First, the data processing module, the bookThe invention carries out binarization operation on the collected infrared array data F (x, y, t) similar images, and filters out pixel points which are obviously background in 16 multiplied by 12 infrared pixels. The binarized threshold value is used for taking the average value of infrared pixels in the local 3X 3 range of the pixel points to obtain an infrared array F without obvious background 1 (x,y,t);
The threshold is the average value of infrared pixels in the range of 3×3 of the pixel point.
For reasons of the deployment angle of the infrared array sensor, in most cases the infrared intensity of the top part of the target will be much greater than the body part of the target that is wrapped by clothing. The infrared array data shows that the infrared intensity in the center of the target position has a larger variance from the periphery. This problem can be solved by using an etching operation in morphological processing, effectively enlarging the target area to match with the actual target. Wherein the corrosion template size (2 x 2);
Wherein F' (x, y, t) is infrared array data at time t after being processed by the etching operation, and B is a structural element in the etching operation.
(1-3) followed by a target positioning module. The invention utilizes a position information extraction operator to extract the characteristics of each frame of infrared array data, and obtains a characteristic matrix related to the spatial position of a target:
T(x,y,t)=(T(x,t),T(y,t)) (3)
T(x,t)=F v *var(x,t)+F m *(maxF(x,y,t)-minF(x,y,t)) (4)
T(y,t)=F v *var(y,t)+F m *(maxF(x,y,t)-minF(x,y,t)) (5)
wherein T (x, y, T) is the feature matrix of the infrared array data, the value of T (x, y, T) is positively correlated with the likelihood weight of the target existing at the point (x, y) at the time point of T, var (x, T) isVariance of M infrared array data in the x-th column at time t, maxF (x, y, t) is the maximum infrared array data in the x-th column at time t, minF (x, y, t) is the minimum infrared array data in the x-th column at time t, F v 、F m Respectively two weighting coefficients, F v F is 2 times the size of m The vertical direction is similar.
In an actual scenario, when multiple targets do not pass through an acquisition region of about 3m side by side, two valid targets are generally detected within the region. Even if more than 2 targets are present in the area, the present invention only concerns two targets near the edge, i.e. the left and right targets of the detection area.
The basis for ignoring the possible targets in the middle is that in the real-time observation process of the 16HZ refresh rate, assuming that the target movement direction is from left to right, all targets passing through the detection area are necessarily targets at the leftmost end of the detection area in a certain period of time, and are also necessarily targets at the rightmost end of the detection area in a certain period of time, so that even though the targets are ignored in the middle period, the final detection result is not affected.
Another basis is that the 3m detection space is limited, at most three targets are accommodated for movement, and the time that three targets are simultaneously present in the detection area is short. There are only two targets in the most time detection zone. Therefore, the invention only needs to calculate two target positions respectively close to the left edge and the right edge in the acquisition space, namelyAnd->
Calculating a left target position using the left M/2 column of the feature matrix T (x, y, T)The right M/2 column calculates the right target position +.>
It should be added that if there is only a single target in the region, the detection result only takes into accountAnd (3) obtaining the product.
(1-4) then a mapping relation module, wherein the module needs to establish the mapping relation between the position information and the corresponding target according to the position information at different moments, determine which position information at different moments belongs to the same target, and then recover the motion trail of the target according to the time information to obtain the motion trail information of the target.
According to the above detection process, taking two adjacent moments as an example, two targets A, B sequentially pass through the detection region, t 1 Detecting the position at the momentWherein-> Target A, B at t respectively 1 The horizontal and vertical coordinate values of the moment, the corresponding position O of the target A 1 B target corresponding position O 2 And detects the target A, B is at t 1 Is the adjacent time t of (2) 2 (t 1 When +Δt), there are two pieces of position information (but it is not known to which position A, B specifically corresponds) are +.> Wherein the method comprises the steps ofIs A, B at t 2 Coordinates of the time. It is necessary to determine the mapping relation of multiple targets on continuous time, i.e. to judge t 1 Time target A is at t 2 The position corresponding to the moment is O 3 Or O 4 Determine position O 3 、O 4 Mapping relation with the target A, B.
Analysis may determine the mapping by calculating the spatial distance of the target in both moments. Because the spatial distance between the same object is always smaller than the spatial distance of a different object at the moment deltat (1/16 s). This is due to the fact that the distance the target moves in Δt is less than the spatial distance between two targets at the same time.
The spatial distance calculation formula is as follows:
wherein DIS is space (O 1 ,O 3 ) Is O in adjacent time 1 And O 3 Square of distance, DIS space (O 1 ,O 4 ) Is O in adjacent time 1 And O 4 Is compared with DIS by the square of the distance space (O 1 ,O 3 ) And DIS space (O 1 ,O 4 ) O corresponding to smaller one 3 Or O 4 Namely, target A is inTime t 2 The corresponding position, at the same time using the elimination method, also yields the target B at time t 2 Corresponding positions. The number of the targets of the two adjacent frames and the motion trail of the targets can be obtained.
And (1-5) obtaining the number of the targets in two adjacent frames and the motion track of the targets, and finally obtaining a track generation module. The invention provides a finite state machine-based people number processing method, which is used for recording the change of the indoor people number through each state of the finite state machine.
A state tree is a collection of states within a finite state machine that describes the backbone portion of the finite state machine. The state tree definition is shown in table 1, and the description of the object is defined as five different states.
TABLE 1 State Tree definition
Status of Description of the invention
S 0 Initial state of system
S 1 Track start state
S 2 Track intermediate record state
S 3 New track entering state
S 4 Track end state
Events are input to the state machine and are the stimulus and driving sources for the normal operation of the state machine. The main content of the event set part of the state machine is shown in table 2.
Table 2 event collection
Event(s) Description of the invention
Σ 0 The last frame has no valid position point and the current frame has no valid position point
Σ 1 The previous frame has no valid position point and the current frame has a valid position point
Σ 2 The last frame has no valid position points and the current frame has two valid position points
Σ 3 The previous frame has a valid position point and the current frame has no valid position point
Σ 4 The previous frame has an effective position point and the current frame has an effective position point
Σ 5 The previous frame has one valid position point and the current frame has two valid position points
Σ 6 The previous frame has two valid position points and the current frame has no valid position points
Σ 7 The previous frame has two valid position points and the current frame has one valid position point
Σ 8 The previous frame has two valid position points and the current frame has two valid position points
The set of slot functions is the response of the finite state machine to the event, is the final embodiment of the finite state machine execution protocol process, and is also an important component of the finite state machine, and the slot functions of the finite state machine are shown in table 3.
TABLE 3 set of slot functions
Groove function Description of the invention
a 0 No operation, current information is reserved, and the next frame is entered
a 1 New track sequence
a 2 Adding the effective position of the current frame to the current track
a 3 Determining the track of the target according to the target mapping relation of the front frame and the rear frame
a 4 Verifying validity and direction of current track
After the system is initialized, the device is ready to record the track, and the state transition process of track data acquisition is shown in fig. 2. When the system is in different states, different events and corresponding slot functions are corresponding, and after corresponding actions are completed, the system also changes to different new states, for S 0 To S 4 The specific description of the five states is as follows:
1) Is in the system initial state S 0 At this time, since there is no valid position point in the previous frame, the device is considered to be in an idle state. At this time, according to whether the current frame has a valid position point, two cases are classified:
1.1 If the current frame still does not have the effective position point, other operations are not performed, the current information is reserved, the next frame is ready to be entered, and the self-circulation is continued to be kept in the initial state S of the system 0
1.2 If one or two effective position points exist in the current frame (at most two effective position points exist for space reasons), a track sequence is newly established, track information is prepared to be recorded, and the track is transferred to a track start state S 1
2) Is positioned at the track start state S 1 In this case, the number of valid position points in the previous frame and the current frame is divided into four cases:
2.1 If the previous frame has one or two effective position points, and the current frame does not have the effective position points, the target is considered to be separated, and the track is shifted to the track ending state S 4 Verifying the effectiveness and direction of a target track, and generating information of the number of people;
2.2 If the previous frame has one effective position point and the current frame has two effective position points, a new target is considered to enter and the new track enters state S 3
2.3 If the previous frame has one effective position point, the current frame has one effective position point, or the previous frame has two effective position points, the effective position of the current frame is added to the current track, and the current track is transferred to a track middle record state S 2
2.4 If the previous frame has two effective position points, the current frame has only one effective position point and still remains in the track middle record state S 2 In this case, it is considered that one target is away, but one target is still within the monitoring range, track information is first generated and recorded for the away target, and when all targets are away, the track validity and direction are verified together with all targets, so that the number of people information is generated.
3) Record state S in the middle of track 2 In this case, the number of valid position points in the previous frame and the current frame is divided into four cases:
3.1 If the previous frame has one or two effective position points, and the current frame does not have the effective position points, the target is considered to be separated, and the track is shifted to the track ending state S 4 Verifying the effectiveness and direction of a target track, and generating information of the number of people;
3.2 If the previous frame has one effective position point and the current frame has two effective position points, a new target is considered to exist, and the new track is transferred to the new track entering state S 3
3.3 If the previous frame has an effective position point, the current frame has an effective position point or the previous frame has two effective position points, the effective position of the current frame is added to the current track, and the self-circulation is continuously kept in the track middle record state S 2
3.4 If the previous frame has two effective position points, the current frame has only one effective position point and still remains in the track middle record state S 2 At this time consider oneWhen all targets leave, the track validity and direction are verified together with all targets to generate the information of the number of people.
4) Is positioned in a new track entering state S 3 In this case, since the previous frame has two valid position points, it is only required to divide the previous frame into three cases according to the number of valid position points of the current frame:
4.1 If the current frame does not have the effective position point, the target is considered to be separated, and the track ending state S is shifted 4 Verifying the effectiveness and direction of a target track, and generating information of the number of people;
4.2 If the current frame has two effective position points, adding the effective position of the current frame to the current track, and transferring to a track middle record state S 2
4.3 If the current frame has only one valid position point, still transferring to the track intermediate record state S 2 In this case, it is considered that one target is away, but one target is still within the monitoring range, track information is first generated and recorded for the away target, and when all targets are away, the track validity and direction are verified together with all targets, so that the number of people information is generated.
5) When the state transitions to the track end state S 4 When the method is used, track validity and direction verification is carried out on all previous targets, and the information of the number of people is generated. Then, an operation of increasing or decreasing the number of persons is performed according to the output, followed by a state transition. Since no valid position point exists in the previous frame, two situations are only needed according to the number of valid position points of the current frame:
5.1 If the current frame still does not have the effective position point, the equipment is considered to be in an idle state, other operations are not performed, the current information is reserved, the next frame is ready to be entered, and the system is transferred to the initial state S of the system 0
5.2 If one or two effective position points exist in the current frame, a track sequence is newly established, track information is prepared to be recorded, and a track starting state S is entered 1
The verification method of the target track effectiveness comprises the following steps: firstly, the starting point and the ending point of the track are ensured to be positioned at two side end points of the detection area, and secondly, the number of effective track points is more than the sampling times in one second, and no abnormal points exist. The invalid track does not perform direction verification; the verification method of the target track direction comprises the following steps: and according to the deployment direction of the sensor and the movement direction of the target, assuming that the coordinate overall increment is in the room, the overall decrement is out of the room, the calculated track point increment is positive and is larger than the abscissa span of the sampling area, and if the calculated track point increment is not larger than the abscissa span of the sampling area, the calculated track point increment is out of the room, otherwise, the calculated track point increment is out of the room. The number of people in the room is updated according to the number of valid departure tracks and entry tracks. After verification, the result is output in stages, for example: "track verification of 4 targets is detected, wherein track verification of 1 target is invalid, and the track verification is regarded as noise point. The remaining 3 targets pass the track validity verification, according to the direction verification, 2 targets enter the room and 1 target leaves the room. Then, an operation of increasing or decreasing the number of persons is performed according to the output, followed by a state transition.
After the verification is completed, outputting the result in stages, for example: "track verification of 4 targets is detected, wherein track verification of 1 target is invalid, and the track verification is regarded as noise point. The remaining 3 targets pass the track validity verification, according to the direction verification, 2 targets enter the room and 1 target leaves the room. "update of the information of the number of people is completed according to the output.
After all tracks are detected, a data set of attributes such as the number of people in the building, the temperature, the humidity and the like in the time period is established, and finally, the small-sized thermal comfort level containing the number of people is established.
The step (2) and the step (3) establish a thermal comfort prediction model (namely a building thermal comfort prediction model based on the number of indoor people) based on the transfer learning and AGBM algorithm, and the building thermal comfort prediction model based on the number of indoor people comprises the following steps: the migrated neural network is used for extracting the characteristics of the indoor environment attribute to obtain first characteristic information; g 8 The neural network is used for carrying out feature extraction on the attributes of the number of indoor people to obtain second feature information; feature fusion network g fusion The method comprises the steps of fusing first characteristic information and second characteristic information to obtain fused characteristic information; AGBM classificationAnd the device is used for iterating the fusion characteristic information to obtain a prediction result of the building thermal comfort level.
The overall structure schematic diagram of the building thermal comfort prediction model based on the number of indoor people is shown in fig. 3, and step 2 specifically comprises the following steps:
training the migrated neural network;
(2-1) training the Source Domain (dataset B) for the dataset of the Source Domain
Wherein data set B is a global thermal comfort database, N 1 The amount of data representing the data set B,input data representing different attributes, i representing seven different attributes, and having {1,2,3,4,5,6,7}, corresponding to temperature, relative humidity, clothing level, wind speed, age, metabolic rate, sex, respectively; />The label value in the source domain data set is { -3, -2, -1,0,1,2,3}, which respectively represents cold, cool, slightly cool, moderate, slightly warm, warm and hot;
will beTransferring to neural network to extract relevant features, and then using tag via full connection layer>Training is carried out; the neural network of the source domain is a seven-input neural network, seven outputs are generated after hidden layers are passed through, and the neural network has 6 layers, including 1 input layer, 4 hidden layers and 1 output layer; the loss function of the source domain is defined as:
wherein,,representing the loss function of the source domain, θ s Is a parameter of the source domain neural network, +.>As a loss function, it is defined as follows:
Wherein,,representing input data, y j Represents->Is->To indicate the function, when->When the indication function is 1, otherwise 0 +.>Representing the output value of q in various outputs of the source domain neural network; outputting a trained source domain neural network after the source domain training is finished; />
(2-2) migration of a source domain to a target domain, the data set of the target domain being:
wherein N is 2 The amount of data representing the data set a,input representing different attributes, i representing 8 different attributes, with values {1,2,3,4,5,6,7,8}, corresponding to temperature, relative humidity, clothing level, wind speed, age, metabolic rate, gender, number of people in the room, respectively>Tag values in the target domain dataset; the difference between the target domain and the source domain is that the target domain has more indoor people, and the indoor people are trained separately from other attributes;
by using the Deep CORAL method, an adaptive layer is added to solve the difference between the source domain and the target domain, and the adaptive layer can enable the data distribution of the source domain and the target domain to be more approximate, so that the migration effect is improved.
In particular, the present invention adds a new penalty function (CORAL penalty) to minimize the variance of the cross-domain learning feature covariance, allowing it to be seamlessly integrated into different layers or architectures. The domain difference loss measured by Coral is defined as the distance between the second order statistics (covariance) of the source domain features and the target domain features:
Wherein,,is the square matrix Frobenius norm, d is the feature output dimension, C S And C T The characteristic covariance matrixes of the source domain and the target domain are respectively:
wherein b is the training batch size, D s Input data being a source domainD T Is the target domain input data, { Γ j The temperature, relative humidity, garment thermal resistance, wind speed, age, metabolic rate and sex properties, 1 b Is a column vector of all 1's.
When the source domain training is carried out, the invention uses the input of the source domain data and the label of the source domain data to carry out the supervision training to obtain the loss function of the source domainUnlike the source domain training, since the present invention uses only the input data of the target domain and does not use the tag data of the target domain in the target domain, the present invention calculates L by training the input data of the target domain and the source domain data together CORAL The final objective is to add the source domain loss function>And L CORAL Co-optimization is minimal, i.e., classification of the source domain network is made more accurate and the output of the target domain network and the distribution of the source domain are more similar.
Pair L by random gradient descent algorithm CORAL And source domain lossSimultaneously optimizing, minimizing migration loss and source domain supervision loss, effectively reducing the distribution difference of environmental data between two domains, and finally obtaining the parameter theta of all hidden layers of the source domain neural network after the optimization is finished S . Migrating the source domain neural network to the target domain, wherein only the neural network with the first seven attributes of the target domain is migrated, and the specific migration process is as follows: first, continuously optimize source domain loss->And adaptive layer loss L CORAL Training a neural network of a source domain to obtain a trained parameter theta of a hidden layer of the source domain S And parameters of the first 4 hidden layers of the target domain +.>And then, for the feature output of the seven attributes before the target domain after passing through the migrated network, the method fuses the feature output by the migrated network with the trained feature output by the eighth attribute (the number of people in the room) neural network to obtain a feature fusion network, and then trains the feature fusion network with the AGBM classifier related later. />
For g 8 Training the neural network, namely training the target domain, and independently training the neural network for the indoor population attribute part of the target domain to extract the characteristics, wherein the input data are as follows:
will input dataInputting a neural network for training to obtain: />Wherein U is 8 The characteristic output which represents the indoor people number attribute and is extracted after the neural network; the neural network of this part is called +.>Wherein T is 8 Input representing attribute part of the number of people in the room, +.>Neural network parameters representing the attributes of the number of people in a room. The part outputs the neural network of the first seven attributes of the target domain and the neural network of the indoor people number attribute of the target domain.
Feature fusion network g fusion Training is performed.
(2-3) training feature fusion network g fusion The characteristic output of the neural network after transfer learning of the first seven attributes is integrated with the characteristic output of the indoor people attribute neural network. For this part, the training is considered as a whole, and the data set (the first seven attributes) of the target domain is firstly obtainedInputting the target domain network, and obtaining +.>Wherein U is 1-7 The first seven attributes which do not include the attributes of the number of people in the room are represented, and the first characteristic information is output through the characteristics extracted after the migrated neural network; the invention takes the first characteristic information as the characteristic fusion network to be trained after the characteristic information is input.
At the same time, the trained indoor population attribute part neural network of the target domain, namely g 8 And inputting the second characteristic information extracted by the neural network into a characteristic fusion network.
Then, the feature outputs extracted by the two neural networks are fused and input into the feature fusion neural network together, and then corresponding outputs are obtained:wherein V is 1-8 Representing the characteristics of the indoor people number attribute extracted after passing through the neural network. The present invention inputs it as feature information into the AGBM classifier. The neural network of this section is called: g fusion (U 1-7 ,U 8 ;θ f ) Wherein g 8 The output characteristics of the neural network are the characteristic fusion network g fusion Is denoted as U 8 The method comprises the steps of carrying out a first treatment on the surface of the The characteristic fusion network g is the characteristic output extracted by the other seven attributes which do not contain the indoor people number attribute after passing through the migrated neural network fusion Is input into another part of U 1-7 ,θ f Parameters representing a feature fusion network.
This section is co-trained with the AGBM classifier mentioned later, in particular, the present invention represents the AGBM classifier section as g GBM (. Cndot.) during training, neural network g, when people in training room are attributed 8 When first fixing the feature fusion network g fusion And AGBM classifier g GBM Then, according to the thermal comfort degree classification result output by the whole system, a random gradient descent algorithm is used for optimizing the parameters of the neural network; likewise training feature fusion network g fusion When the system is used, all parameters of the other two parts are fixed, and the parameters of the neural network are optimized by using a random gradient descent algorithm according to the thermal comfort degree classification result output by the whole system; the same is true of the training of AGBM classifiers.
The loss function that the target domain needs to be optimized and the process of optimizing (only two networks g of the target domain are discussed here fusion And g 8 ). For feature fusion network g fusion The characteristics of two parts of output are taken as input, and the first part is the characteristics U extracted from the first seven attributes through the migrated network 1-7 The second part is that the attribute of the number of people in the room passes through g 8 Network extracted feature U 8 The invention combines the two parts into one feature vector to be input into the network. g fusion The output of (a) is the feature V of the eight attributes after merging 1-8 The present invention inputs it to AGBM section g GBM (. Cndot.) the final predicted value y can be obtained predict . According to this procedure, g in the present invention fusion The loss function expression of (2) is:
wherein,,representing feature fusion network g fusion Output characteristic V of (2) 1-8 The final predicted value obtained after input to the AGBM classifier +.>f {.cndot } is a square loss function, expressed as:
neural network g for indoor people number attribute 8 The input is the original number of people data and the label, and the output is the characteristics extracted by the people number attribute neural networkThe invention inputs the characteristic fusion network g fusion Finally, g fusion The extracted features are input to g GBM (. Cndot.) the final predicted value y is obtained predict . According to this procedure, g in the present invention 8 The loss function expression of (2) is:
wherein,,neural network g representing attributes of the number of people in a room 8 Outputting the characteristics, inputting the characteristics into a characteristic fusion network g fusion Thereafter, the output characteristic V of the characteristic part is obtained 1-8 Then inputting the predicted value into an AGBM classifier to obtain a final predicted value +.>f {.cndot } is a square loss function, expressed as:
in summary, in the training of the target domain network, the invention needs to train two neural networks, one is the feature fusion network g fusion The other is a neural network of the indoor people count attribute. When each neural network is trained, the other two parts (including the AGBM classifier related later) can fix the parameters of the neural network, so that the parameters of the current neural network are only trained. It should be emphasized that the present invention treats the target domain network as a whole, i.e., when there is a piece of data and a tag input, both parts are trained, rather than a piece of data and a tag training only one part. The partial output feature fusion network g fusion
The AGBM classifier is trained.
Step (3) comprises the following steps:
(3-1) inputting the feature information in the step (2) into an AGBM classifier to obtain eight attribute features V 1-8
Wherein x is j Representing a feature vector corresponding to the j-th data after feature extraction; will V 1-8 And inputting the characteristic information into an AGBM classifier as characteristic information, and performing iterative training for a plurality of times.
The invention improves the traditional GBM method and provides an AGBM method. The traditional GBM algorithm uses a negative gradient to represent residual error, has the advantages of high accuracy, suitability for low-dimensional data and the like, but only uses a single base learner in the operation process, is not flexible enough, and in multi-classification training of thermal comfort prediction, different base learners can be selected for each class of output of each round of iteration of the classifier, each base learner has unique advantages, and the GBM effect can be improved by combining the advantages and flexibly using the same. Therefore, the invention exerts the respective capability of the base learner, realizes the self-adaptive selection mechanism of the base learner in GBM, namely, in each type of training of each iteration, the system can self-adaptively select the optimal base learner, thereby realizing the prediction with higher precision.
Specifically, the present invention selects three base learners, namely logistic regression, decision Tree (DT) and discard boost Tree (Dropouts meet Multiple Additive Regression Trees, DART), depending on the specific experimental environment, thermal comfort prediction in smart buildings. The thermal comfort degree prediction is a K classification process (K=7), and for a feature vector input into the AGBM, the prediction probability of each of K classifications is output before final prediction, and the class with the highest probability is taken as a prediction result. It is desirable that the higher the output probability of a class belonging to the feature vector label is, the better the output probability of a class not belonging to the feature vector label is, which means that in the training process, for the class belonging to the label, the base learner with the highest output probability needs to be found, and the other six classes not belonging to the label need to be found, and the base learner with the smallest output probability needs to be found. During this training, the effect of using logistic regression is better if there is some data distribution that is more linear, better if some data distribution is more complex, and better if some data distribution is easy to overfit, better if DART is used.
The specific training process is shown in the AGBM algorithm section of fig. 3, where the K classification problem is converted into K classification problems, i.e. the K groups of base learners need to be trained, and the effect of each base learner in each group is optimal among the three base learners. Therefore, each kind of training needs to be performed for 350 times of iterative training, and the following takes the mth iteration, the training of the first kind is taken as an example, and the training steps are described in detail:
step 311, selecting a square loss as a loss function:
the total loss function is expressed as:
deriving a total loss function:
the residual is then represented by a negative gradient, the residual expression for each base learner being:
wherein,,for residuals to be fitted when the output class of each base learner is k, l represents different base learners, and l=1 represents a decision tree; l=2 represents logistic regression; l=3 represents DART, K is the number of heat comfort classes of the output, and total 7 classes are respectively cold, cool, slightly cool, moderate, slightly warm, warm and heat, namely K=7, x j For input features->For the base learner in the target domain data set A after the one-hot encoding is l, inputting x when the output class is k j The corresponding tag value (0 or 1), p (x) is the probability value of the current class output after the softmax function.
Taking k=1 as an example, i.e. the first class (output thermal comfort is predicted as the first class: cold value, the final predicted probability value is the result of computing the output of all classes by softmax function).
Step 312, optimizing the parameter α of the base learner so that the current base learner outputs a residual value closer to the previous step:
wherein m is the iteration number,alpha is the parameter of the current base learner l;
step 313, optimizing the step size parameter ρ so that the total output of the current iteration is closer to the tag value:
wherein F is m-1 (x j ) Output value for the m-1 th iteration; it should be noted that when m=1, the present invention first initializes the 0 th iteration output of each category to 0, so that F 0 (x j )=0。
Step 314, calculating the total output value of the current iteration, and multiplying the output value of the base learner of the current iteration by the step length by the output value of the base learner of the last iteration:
step 315, comparing the loss functions of the three basic learners after training is finished:
specifically, the squared loss is taken as the loss function here to represent the total error of the base learner, which has the following expression:
wherein,, For the tag value in the target domain data set A when the base learner is l, +.>Is the final output value of the base learner l. The same method trains the base learners of other categories, finally obtains K optimal base learner groups composed of M optimal base learners under K categories, and finally outputs the predicted thermal comfort category by the AGBM classifier composed of the trained base learner groups.
For l=1 (the base learner is a decision tree), the output and the label value of each piece of data are substituted into the loss function during training, and the decision tree is calculated as the loss function of the base learnerThen for the other two basis learners, the +.>And->And comparing the three sizes, and selecting the base learner with the minimum loss function as an optimal base learner. Thus, the m-th iteration and training of the class I are completed, and the optimal base learner of the iteration and class I is selected.
For the subsequent process of the mth iteration, training is performed on the second category to the K category according to the step, and only K in the formula is changed into 2 to 7. After training all the classes once, the mth round of iteration is completed, and the output of all the classes of the mth iteration and the optimal base learner belonging to all the classes are obtained. And then carrying out the m+1th iteration, and obtaining the m+1th iteration output of all categories and the optimal base learner belonging to the m+1th iteration after the training of all categories is finished. And finally, after 350 iterations, 7 optimal base learner groups formed by 350 optimal base learners under the final 7 categories are obtained, and the AGBM classifier formed by the trained base learner groups finally outputs the predicted thermal comfort category. By the mode, the current optimal g can be obtained in an optimized way GBM (·) output, i.e. probability output for each thermal comfort level:
F K (x)={F 1 (x),F 2 (x),F 3 (x),F 4 (x),F 5 (x),F 6 (x),F 7 (x)} (32)
where k=7, representing seven thermal comfort levels, F 1 (x) To F 7 (x) And taking the thermal comfort level with the highest probability as the final output for the output probabilities of the first class to the seventh class of thermal comfort.
(3-2) obtaining the optimal g GBM After (-), the combination of the whole system is completed to form a complete prediction model, when new prediction data is entered, the data is firstly divided into the first seven attributes and the indoor people number attribute, and the migrated neural network and g are respectively input 8 The neural network performs feature extraction, and the extracted features are input into a feature fusion network g together fusion And obtaining the fused characteristic information, inputting the characteristic information into the AGBM classifier, and obtaining a prediction result of a base learner group consisting of 350 base learners after 350 iterations.
Compared with the prior art, the method has the advantages that the accuracy of acquiring the information of the number of people in the room based on the finite state machine is high, and the AGBM algorithm is used in combination with the information of the number of people, so that the higher accuracy of predicting the thermal comfort is realized.
This example uses a data set containing information about the number of people in a room (i.e., data set A) collected in the present invention, which contains seven choices of attributes including number of people, temperature, wind speed, relative humidity, garment thermal resistance (CLO), metabolic rate (MET), gender, age, and user thermal comfort feedback-7-point Thermal Sensation Vote including Cold (-3), cool (-2), slighly Cool (-1), neutral (0), slighly Warm (+1), warm (+2) and Hot (+3). For the intelligent building thermal comfort prediction method based on the number of indoor people, the following three experiments are made:
Experiment one: the method for detecting the number of people by the infrared array sensor based on the finite state machine is compared with the method for detecting the number of other people. The other people number detection method specifically comprises the following steps: document "Blind identification strategies for room occupancy estimation" (authors: A. Ebada)the Frequentist Maximum Likelihood (FML) algorithm in t, G.Bottegal, D.Varagnolo, B.Wahlberg, H.Hjal-marsson and k.h. johansson (using CO2 parameters), literature "Occupancy inference using pyroelectric infrared sensors through hidden markov models" (authors: the Hidden Markov model algorithm in p.liu, s. -k.nguang and a.partridge (using passive infrared sensors), "Sensing and Data Acquisition" (authors: dong, m.b.In the method for detecting the number of people by using a camera in m.de Simone, h.b.gunay, w.o' Brien, D.Mora, J.Dziedzic and j.zhao), two people detection methods using infrared array sensors are also selected, which are respectively referred to as "non-invasive people detection methods, devices and systems based on infrared array sensors" (Wei Xin, gu Zhihao, zhou Liang, fan Qianlan, patent No. ZL 202110668180.0), hereinafter referred to as "FIR1". And patent "a non-invasive person number detection method and system based on infrared array sensor" (Wang Hongfei, liao Junqi, tang Jiaomin, wei Xin, application number 202211361323.4), hereinafter referred to as "FIR2".
The accuracy of each algorithm, whether it can detect trajectories, costs, privacy attributes, and two different scenarios (office and classroom) are discussed in the experiments.
Table 4 Experimental results showing experiment one
/>
The total number of people is not large in an office scene, the frequency of people entering and exiting is low, the number of people is changed slowly, and the accuracy of each algorithm is not low. The number of people in a classroom scene is large, and the people flow walking is concentrated in the course of the lesson, so that the detection difficulty of each algorithm is increased, and the accuracy of each algorithm is reduced. It can be seen from table 4 that in two scenes, compared with the algorithm of CO2 and PIR sensors, the accuracy of the algorithm of the invention is improved greatly, the track of the target can be detected, and for the detection method of the two infrared array sensors, the invention combines a finite state machine, and orderly collects and effectively processes continuous and complex states, so that the accuracy of the two scenes is higher than that of the other two methods. Compared with a camera detection method, the algorithm provided by the invention has low calculation cost and does not violate the privacy of the target.
Experiment II: and a thermal comfort model is established by using a common machine learning method, and the prediction performance before and after the indoor people number factors are added is compared. The specific machine learning method comprises the following steps: deep Neural Network (DNN), decision Tree (DT), K nearest neighbor node (KNN), support Vector Machine (SVM), random Forest (RF).
Table 5 shows the results of experiment II
Deep neural network Decision tree K-nearest neighbor algorithm Support vector machine Random forest
Not including the number of people in the room 57.86% 52.71% 53.67% 45.92% 60.35%
Including the number of people in a room 65.12% 60.45% 61.23% 52.14% 67.35%
From table 5, it can be seen that after the factors of the number of people in the room are added, the accuracy of five thermal comfort prediction quasi-models such as DNN is improved, and the accuracy is increased by 7.09% on average, which indicates the necessity of adding the factors of the number of people in the room in the thermal comfort prediction model.
Experiment III: the building thermal comfort degree prediction method based on the indoor people number (using the people attribute, combining the migration learning, extracting and fusing the characteristics and the AGBM method) provided by the invention is compared with other algorithms in accuracy performance. The other algorithms are specifically: deep Neural Network (DNN), decision Tree (DT), K nearest neighbor node (KNN), support Vector Machine (SVM), random Forest (RF), gradient lifting decision tree (GBDT), natural gradient lifting (NGBoost), and selecting a detection method based on the number of people: an intelligent building thermal comfort assessment method and system based on the number of people in a room (Fan Qianlan, miao Zizhu, tang Jiaomin, wei Xin, application number: 202211360940.2), hereinafter referred to as "method 1".
Fig. 4 shows the experimental result of experiment three, and compared with other algorithms, it can be seen from fig. 4 that the algorithm of the invention has obvious advantages in prediction accuracy, excellent prediction performance, accuracy of 79.04%, and F1-fraction of 79.14%. And compared with the method 1 using the indoor people, the accuracy is high due to the use of the autonomous innovative AGBM algorithm.
Embodiment two:
based on the method for predicting the thermal comfort of a building based on the number of people in a room described in the first embodiment, the present embodiment provides a device for predicting the thermal comfort of a building based on the number of people in a room, including: the data acquisition module is used for acquiring indoor environment data; and the building thermal comfort level prediction module is used for inputting the collected indoor environment data into a built building thermal comfort level prediction model based on the number of indoor people and outputting a prediction result of the building thermal comfort level.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that modifications and variations could be made by those skilled in the art without departing from the technical principles of the present invention, and such modifications and variations should also be regarded as being within the scope of the invention.

Claims (9)

1. The building thermal comfort degree prediction method based on the number of indoor people is characterized by comprising the following steps of:
Collecting indoor environment data;
and inputting the collected indoor environment data into a constructed building thermal comfort degree prediction model based on the number of indoor people, and outputting a prediction result of the building thermal comfort degree.
2. The method for predicting the thermal comfort of an indoor population based building of claim 1, wherein the indoor environment data comprises an indoor environment attribute and an indoor population attribute determined based on a finite state machine; the indoor environmental attributes include indoor temperature, indoor relative humidity, garment thermal resistance, wind speed, age, metabolic rate, and gender attributes.
3. The method for predicting the thermal comfort of a building based on the number of persons in a room according to claim 2, wherein the method for determining the attribute of the number of persons in a room comprises:
collecting infrared array data of target personnel in a designated area;
performing binarization operation on the collected infrared array data F (x, y, t) at the moment t, and filtering out pixel points in which the background is arranged in the infrared pixels;the binarized threshold value is used for taking the average value of infrared pixels in the local 3X 3 range of the pixel points to obtain an infrared array F without background 1 (x,y,t);
The threshold is the average value of infrared pixels in the range of 3×3 of the pixel point;
Enlarging the target area to match the actual target using the etching operation in the morphological treatment,
wherein F' (x, y, t) is infrared array data at time t after corrosion operation treatment, and B is a structural element in the corrosion operation;
performing feature extraction on the infrared array data by using a position information extraction operator to obtain a feature matrix related to the target space position:
T(x,y,t)=(T(x,t),T(y,t)) (3)
T(x,t)=F v *var(x,t)+F m *(maxF(x,y,t)-minF(x,y,t)) (4)
T(y,t)=F v *var(y,t)+F m *(maxF(x,y,t)-minF(x,y,t)) (5)
wherein T (x, y, T) is the feature matrix of the infrared array data, the value of T (x, y, T) is positively correlated with the likelihood weight of the target existing at the point of time T (x, y), var (x, T) is the variance of the M infrared array data in the x-th column at time T, maxF (x, y, T) is the maximum infrared array data in the x-th column at time T, minF (x, y, T) is the minimum infrared array data in the x-th column at time T, F v 、F m Respectively two weighting coefficients, F v F is 2 times the size of m
Calculating a left target position using the left M/2 column of the feature matrix T (x, y, T)The right M/2 column calculates the right target position +.>
The mapping relation of the targets on continuous time is determined by calculating the space distance between the two targets A and B in two moments, so that the number and the motion trail of the targets are obtained; suppose target A, B is at t 1 The time positions are respectivelyWherein->Target A, B at t respectively 1 The horizontal and vertical coordinate values of the moment in time, and detects that the target A, B is at t 1 Is the adjacent time t of (2) 2 (t 1 +Δt) two pieces of position information are +.>But it is not known to which position A, B corresponds specifically; wherein the method comprises the steps ofIs A, B at t 2 Coordinates of the moment; the spatial distance calculation formula is as follows:
wherein DIS is space (O 1 ,O 3 ) Is O in adjacent time 1 And O 3 Square of distance, DIS space (O 1 ,O 4 ) Is O in adjacent time 1 And O 4 Is compared with DIS by the square of the distance space (O 1 ,O 3 ) And DIS space (O 1 ,O 4 ) O corresponding to smaller one 3 Or O 4 I.e. at time t 2 The corresponding position, at the same time using the elimination method, also yields the target B at time t 2 A corresponding position;
and recording the track by utilizing a finite state machine according to the number of the targets and the motion track, and further acquiring the information of the number of people.
4. The method for predicting the thermal comfort of an indoor unit based building of claim 3, wherein the indoor unit based thermal comfort prediction model for a building comprises:
the migrated neural network is used for extracting the characteristics of the indoor environment attribute to obtain first characteristic information;
g 8 the neural network is used for carrying out feature extraction on the attributes of the number of indoor people to obtain second feature information;
feature fusion network g fusion The method comprises the steps of fusing first characteristic information and second characteristic information to obtain fused characteristic information;
And the AGBM classifier is used for carrying out iterative prediction on the fusion characteristic information to obtain a prediction result of the building thermal comfort level.
5. The method for predicting thermal comfort of an indoor unit based building of claim 4, wherein the training method of the migrated neural network comprises:
training a source domain by taking a global thermal comfort database as the source domain, and regarding a data set of the source domain:
wherein data set B is a global thermal comfort database, N 1 The amount of data representing the data set B,input data representing different attributes, i representing seven different attributes, and having {1,2,3,4,5,6,7}, corresponding to temperature, relative humidity, clothing level, wind speed, age, metabolic rate, sex, respectively; />The label value in the source domain data set is { -3, -2, -1,0,1,2,3}, which respectively represents cold, cool, slightly cool, moderate, slightly warm, warm and hot;
will beTransferring to neural network to extract relevant features, and then using tag via full connection layer>Training is carried out; the loss function of the source domain is defined as:
wherein,,representing the loss function of the source domain, θ S Is a parameter of the source domain neural network, +.>As a loss function, it is defined as follows:
Wherein,,to indicate the function, when->When the indication function is 1, otherwise 0 +.>Representing the output value of q in various outputs of the source domain neural network; outputting a trained source domain neural network after the source domain training is finished;
the dataset of the target domain is:
wherein N is 2 The amount of data representing the data set a,representing inputs of different attributes, n represents 8 different attributes, and takes the values of {1,2,3,4,5,6,7,8}, corresponding to temperature and relative humidity respectivelyClothing level, wind speed, age, metabolic rate, sex, number of people in the room, < >>Tag values in the target domain dataset; the difference between the target domain and the source domain is that the target domain has more indoor people, and the indoor people are trained separately from other attributes;
using Deep CORAL method, an adaptive layer is added to solve the difference between the source domain and the target domain, and the domain difference loss measured by CORAL is defined as the distance between the second order covariance of the source domain feature and the target domain feature:
wherein,,is the square matrix Frobenius norm, d is the feature output dimension, C S And C T The characteristic covariance matrixes of the source domain and the target domain are respectively:
wherein b is the training batch size, D S Input data being a source domain D T Is the target domain input data { Γ ] j Temperature, relative humidity, garment thermal resistance, wind speed, age, metabolic rate, and sex properties, 1 b Is a column vector of all 1's;
when the source domain training is performed, the input of the source domain data and the label of the source domain data are used for performing supervision training to obtain a loss function of the source domainSince only input data of the target domain is used in the target domain and tag data of the target domain is not used, L is calculated by training the input data of the target domain and the source domain data together CORAL Value, final purpose is to loss function of source domainAnd L CORAL Co-optimizing to a minimum;
pair L by random gradient descent algorithm CORAL And source domain lossSimultaneously optimizing, minimizing migration loss and source domain supervision loss to obtain parameters theta of all hidden layers of the source domain neural network S The method comprises the steps of carrying out a first treatment on the surface of the And migrating p hidden layers in front of the source domain neural network to obtain a migrated neural network.
6. The method for predicting thermal comfort of a building based on the number of people in a room as recited in claim 5, wherein g 8 A method of training a neural network, comprising:
the method comprises the steps of performing feature extraction on an indoor population attribute part of a target domain by independently training a neural network, wherein input data are as follows:
will input data Inputting a neural network for training to obtain: />Wherein the method comprises the steps of,U 8 The characteristic output which represents the indoor people number attribute and is extracted after the neural network; the neural network of this part is called +.>Wherein T is 8 Input representing attribute part of the number of people in the room, +.>Neural network parameters representing the attributes of the number of people in a room.
7. The method for predicting thermal comfort of building based on number of people in room as claimed in claim 6, wherein the feature fusion network g fusion Comprises the following steps:
first, the data set of the target domain is obtainedInputting the target domain network, and obtaining +.>Wherein U is 1-7 The first seven attributes which do not include the attributes of the number of people in the room are represented, and the first characteristic information is output through the characteristics extracted after the migrated neural network;
at the same time, the trained indoor population attribute part neural network of the target domain, namely g 8 Second characteristic information U extracted by neural network 8 Inputting the characteristics into a characteristic fusion network; the first characteristic information and the second characteristic information are input into the characteristic fusion network g together fusion After that, the corresponding output is obtained:wherein V is 1-8 The characteristic extracted by the neural network is fused with the characteristic extracted by the attribute representing the indoor number of people and other seven attributes; the expression of the complete feature fusion network is: g fusion (U 1-7 ,U 8 ;θ f ) Wherein θ is f Is a parameter of the feature fusion network.
8. The method for predicting the thermal comfort of an indoor unit based building of claim 7, wherein the training method of the AGBM classifier comprises:
AGBM classifier g GBM (V 1-8 ) Wherein V is 1-8 The method is characterized by representing the overall characteristics of eight attributes extracted from the characteristic fusion network, wherein the specific expression is as follows: :
wherein x is j Representing a feature vector corresponding to the j-th data after feature extraction; will V 1-8 Inputting the characteristic information into an AGBM classifier as characteristic information, and performing iterative training for a plurality of times;
square loss was chosen as the loss function:
the total loss function is expressed as:
deriving a total loss function:
the residual is then represented by a negative gradient, the residual expression for each base learner being:
wherein,,for residuals to be fitted when the output class of each base learner is k, l represents different base learners, and l=1 represents a decision tree; l=2 represents logistic regression; l=3 represents DART, K is the number of heat comfort classes of the output, and total 7 classes are respectively cold, cool, slightly cool, moderate, slightly warm, warm and heat, namely K=7, x j For input features->For the base learner in the target domain data set A after the one-hot encoding is l, inputting x when the output class is k j The corresponding label value, p (x), is the probability value of the current class output after the softmax function;
the following operation takes k=1, i.e. the first class as an example,
the parameter α of the base learner is optimized such that the current base learner outputs a residual value closer to the previous step:
wherein m is the iteration number,alpha is the parameter of the current base learner l;
optimizing the step size parameter ρ so that the total output of the current iteration is closer to the tag value:
wherein F is m-1 (x j ) Output value for the m-1 th iteration;
calculating the total output value of the iteration, and multiplying the output value of the basic learner of the previous iteration by the step length by the output value of the basic learner of the current iteration:
after training, the loss functions of the three basic learners are compared:
the total loss function expression of the base learner is:
wherein,,for the tag value in the target domain data set A when the base learner is l, +.>Is the final output value of the base learner;
training the base learners of other categories by the same method to finally obtain K optimal base learner groups consisting of M optimal base learners under K categories, and finally outputting the predicted thermal comfort category by the AGBM classifier consisting of the trained base learner groups.
9. Building heat comfort level prediction device based on indoor number, characterized by, include:
the data acquisition module is used for acquiring indoor environment data;
and the building thermal comfort level prediction module is used for inputting the collected indoor environment data into a built building thermal comfort level prediction model based on the number of indoor people and outputting a prediction result of the building thermal comfort level.
CN202310470511.9A 2023-04-27 2023-04-27 Building thermal comfort degree prediction method and device based on indoor people number Pending CN116485026A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310470511.9A CN116485026A (en) 2023-04-27 2023-04-27 Building thermal comfort degree prediction method and device based on indoor people number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310470511.9A CN116485026A (en) 2023-04-27 2023-04-27 Building thermal comfort degree prediction method and device based on indoor people number

Publications (1)

Publication Number Publication Date
CN116485026A true CN116485026A (en) 2023-07-25

Family

ID=87226581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310470511.9A Pending CN116485026A (en) 2023-04-27 2023-04-27 Building thermal comfort degree prediction method and device based on indoor people number

Country Status (1)

Country Link
CN (1) CN116485026A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117760057A (en) * 2024-02-21 2024-03-26 中铁建设集团有限公司 Low-carbon refrigerating device for railway passenger station and use method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117760057A (en) * 2024-02-21 2024-03-26 中铁建设集团有限公司 Low-carbon refrigerating device for railway passenger station and use method
CN117760057B (en) * 2024-02-21 2024-04-30 中铁建设集团有限公司 Low-carbon refrigerating device for railway passenger station and use method

Similar Documents

Publication Publication Date Title
Liao et al. Deep facial spatiotemporal network for engagement prediction in online learning
CN111783576B (en) Pedestrian re-identification method based on improved YOLOv3 network and feature fusion
CN105095870B (en) Pedestrian based on transfer learning recognition methods again
Das et al. Where to focus on for human action recognition?
Park et al. Prediction of individual thermal comfort based on ensemble transfer learning method using wearable and environmental sensors
CN111191667B (en) Crowd counting method based on multiscale generation countermeasure network
Bruce et al. Multimodal fusion via teacher-student network for indoor action recognition
CN110575663B (en) Physical education auxiliary training method based on artificial intelligence
CN107767416B (en) Method for identifying pedestrian orientation in low-resolution image
CN112862145A (en) Occupant thermal comfort inference using body shape information
CN113065460A (en) Establishment method of pig face facial expression recognition framework based on multitask cascade
CN113297936A (en) Volleyball group behavior identification method based on local graph convolution network
CN116448019B (en) Intelligent detection device and method for quality flatness of building energy-saving engineering
CN113807176B (en) Small sample video behavior recognition method based on multi-knowledge fusion
CN110458022A (en) It is a kind of based on domain adapt to can autonomous learning object detection method
CN116485026A (en) Building thermal comfort degree prediction method and device based on indoor people number
CN112907554A (en) Automatic air conditioner adjusting method and device based on thermal infrared image recognition
CN114299279B (en) Mark-free group rhesus monkey motion quantity estimation method based on face detection and recognition
Sheeba et al. Hybrid features-enabled dragon deep belief neural network for activity recognition
Serpush et al. Complex human action recognition in live videos using hybrid FR-DL method
Ding et al. Machine learning model for feature recognition of sports competition based on improved TLD algorithm
Cao et al. QMEDNet: A quaternion-based multi-order differential encoder–decoder model for 3D human motion prediction
Rajappan et al. A composite framework of deep multiple view human joints feature extraction and selection strategy with hybrid adaptive sunflower optimization‐whale optimization algorithm for human action recognition in video sequences
Nikpour et al. Deep reinforcement learning in human activity recognition: A survey
CN109711232A (en) Deep learning pedestrian recognition methods again based on multiple objective function

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination