Disclosure of Invention
Aiming at the defects of the prior art, the invention discloses a heat meter metering system and a heat meter metering method based on cloud computing, which lighten the computing work of a chip in a heat meter by adopting a mode of separating data acquisition from data computation and storage, and carry out the heat computing work and the data storage work executed by the heat meter computing chip in the prior art in a cloud server, thereby greatly lightening the computing load of the heat meter chip in the prior art and reducing the manufacturing cost of the heat meter.
In order to solve the technical problems, the invention adopts the following technical scheme:
the system comprises a detection unit, a communication unit, a cloud management system and an application terminal, wherein an information output end of the detection unit is connected with an input end of the communication unit, an output end of the communication unit is connected with an input end of the cloud management system, and an output end of the cloud management system is connected with an input end of the application terminal;
the detection unit is internally provided with a heat meter, the heat meter is connected with a fluid information collector and a power supply connected with the fluid information collector, the fluid information collector comprises a temperature sensor, a flow sensor, a pressure sensor, a residual chlorine sensor, a TOC sensor, a PH sensor, a conductivity sensor, an ORP sensor, a turbidity sensor or a dissolved oxygen sensor which are used for receiving fluid information in a transducer, the temperature sensor is arranged on an uplink pipe and a downlink pipe which pass through heat transfer fluid, and the flow sensor is arranged on a fluid inlet or a return pipe; the heat meter is also provided with a wireless communication interface;
The communication unit comprises a wireless communication module, wherein the wireless communication module comprises a Bluetooth module, a wireless broadband Wi-Fi module, an ultra-wideband UWB module, a near field communication NFC module, an RFID module, an infrared data organization IrDA module, a ZigBee module, a GPRS module, a CDMA module or a cloud communication module;
the cloud management system comprises a cloud server and a big data management platform arranged in the cloud server, wherein the big data management platform is provided with a data underlying structure, a storage unit, a calculation model and a cloud interface, and the data underlying structure at least comprises an information input module, an information extraction module, an information fusion module, a resource allocation module, an information interaction module, an information comparison module, an information description module, a resource storage module, an interaction execution module, an information screening module, an information output module and a system detection module; the storage module comprises a database, wherein the database at least comprises position data information, temperature data information, flow data information, date data information, fault data information, retrieval data information, space data information, water level data information and pressure data information of fluid detection; the calculation model comprises a formula calculation model and a big data calculation model, the big data calculation model comprises an improved ant colony algorithm model, a fault diagnosis algorithm model or an associated algorithm model, and the fault diagnosis algorithm model is a big data analysis early warning model of an RPROP hybrid algorithm based on a BP neural network; the cloud interface management module comprises an interface setting module, a ZigBee interface module, an Ethernet interface module, a Wi-Fi interface module, a Bluetooth interface module, a GPRS interface module, a CDMA module or a cloud communication module;
The application terminal comprises intelligent mobile equipment provided with a data application interface, a storage module and a visual application module, and the intelligent mobile equipment at least comprises a PC (personal computer), a tablet, an iphone mobile phone or an android mobile phone.
In the technical scheme of the invention, the fluid information collector comprises a singlechip chip with the model MK10DN512VLLH10, the core of the singlechip chip is ARM Cortex-M4, the working voltage range is 1.7V-3.6V, and the working frequency is 100MHz.
In the technical scheme of the invention, the singlechip chip is respectively connected with a power supply circuit, an interface circuit, a crystal oscillator circuit, a communication module, a storage module and a reset circuit, wherein the communication module is a wireless communication module.
In the technical scheme of the invention, the hardware configuration of the host of the cloud server is Intel Xeon E3-1220v53.0 GHz four cores, the memory is 16GDDR4, the hard disk is 1 x Intel enterprise SSD,1 x SATA 1T, and the network card is 2 x gigabit network port; in the hardware configuration of the working machine node, the CPU model is Intel Xeon E53.0GHZ, the memory is 640GB, and the hard disk capacity is 128TB.
In the technical scheme of the invention, the improved ant colony algorithm model, the fault diagnosis algorithm model or the association algorithm model are all provided with a calculation chip and a wireless communication interface connected with the calculation chip.
In order to solve the technical problems, the invention also adopts the following technical scheme:
a heat meter metering method based on cloud computing comprises the following steps:
(1) And (3) data acquisition: collecting fluid information in the energy converter through a fluid information collector arranged in the heat meter, wherein the fluid information is temperature information, flow information, pressure information, residual chlorine information, TOC information, PH value information, conductivity information, ORP information or turbidity information;
(2) Data transfer: the wireless communication module is used for transmitting the data information acquired by the acquisition device; the fusion of the data information of various sensors is realized through an information fusion module, and a data fusion algorithm applied by the information fusion module is as follows:
wherein the method comprises the steps of
For normalization formula +.>
For sensing fluid data information s at t-time for various different sensors
i The output weight coefficient, m is different fluid data information types, wherein the weight coefficient s
i Ranging from 0 to 4; s is S
i (t) various sensors at time tSensing a weight coefficient of fluid data information output;
(3) And (3) data calculation: carrying out data management through a cloud big data management platform, and calculating, analyzing and outputting various received data information through a calculation model; in the step, the formula calculation model is a heat calculation formula, and the heat calculation formula comprises an enthalpy difference method calculation formula and a thermal coefficient method calculation formula; the improved ant colony algorithm model is a mixed ant colony algorithm model integrated with a classification algorithm model, and the classification algorithm model is a decision tree classification model, a K-algorithm model or a Bayesian probability classification algorithm model; the fault diagnosis algorithm model is a big data analysis early warning model of an RPROP hybrid algorithm based on a BP neural network, the association algorithm model is a random association algorithm model, and calculation or processing of data information detected by a temperature sensor, a flow sensor, a pressure sensor, a residual chlorine sensor, a TOC sensor, a PH sensor, a conductivity sensor, an ORP sensor, a turbidity sensor or a dissolved oxygen sensor is completed through different algorithm models so as to meet different requirements of users;
(4) Data application: and realizing the application of various data information of the data through the application terminal. In the technical scheme of the invention, the enthalpy difference method has the following calculation formula:
wherein Q is the heat released by the transducer in KJ, wherein Q m For the mass flow of the heat transfer liquid flowing through the heat meter, the unit is kg/s, h f The unit of the specific enthalpy value of the heat transfer liquid corresponding to the inlet temperature in the heat exchange loop is kJ/kg, h r The specific enthalpy value of the heat transfer liquid corresponding to the outlet temperature in the heat exchange circuit is given in kJ/kg, and t is the time given in seconds.
In the technical scheme of the invention, the thermal coefficient method is calculated as follows:
wherein Q is the heat released by the transducer, in J or kW h, V is the volume through which the heat transfer fluid flows, in m 3 ,θ f The temperature at the heat transfer liquid inlet in the heat exchange circuit is expressed in degrees centigrade, theta r Represents the temperature at the outlet of the heat transfer liquid in the heat exchange circuit, in terms of C, and k represents the thermal coefficient, which is a function of the heat transfer liquid at the corresponding temperature, temperature difference and pressure, in terms of kJ/m 3 Or kW.times.h/m 3 ℃。
In the technical scheme of the invention, the construction method of the improved ant colony algorithm model comprises the following steps:
the method comprises the steps of inputting detected fluid signals into an information fusion module, respectively inputting the fused information into a decision tree classification model, a K-algorithm model or a Bayesian probability classification algorithm model after fusion by the information fusion module, or simultaneously using the three algorithm modules of the decision tree classification model, the K-algorithm model or the Bayesian probability classification algorithm model, outputting the data information after passing through different classification modules to an ant colony algorithm model, realizing the output of a hybrid algorithm, and outputting the data information of a target of a user.
In the technical scheme of the invention, an ant colony algorithm is integrated in a big data analysis early warning model of an RPROP (remote sensing response) hybrid algorithm based on a BP (back propagation) neural network so as to realize the optimal output of each sensor information transmission path and the optimal output of collected fluid information data, and the construction method of the big data analysis early warning model comprises the following steps:
(1) Initializing sensing values of temperature, flow, pressure, residual chlorine, TOC, PH value, conductivity, ORP information or turbidity information output by each sensor in a big data analysis early warning model, setting N different fluid metering data parameters in a set BP neural network, and setting a weight value range in a BP neural network algorithm model as (X) uυ ,Y ωu ) The adjustment value range is (H u ,I υ );
(2) Setting an optimal output fluid metering data communication according to the value set in said step (1)Parameters of the path, set the fluid metering data parameter set as P ω (ω=1, 2,., N), then non-zero data is randomly sought in the fluid metering data parameter set to form a path set D pω Wherein the maximum value of the parameter of the sensor data transmitted in different paths is set as D m The maximum ant element seeking the data output communication path of various sensors is Q, and the learning error value of the seeking path is L 0 The method comprises the steps of carrying out a first treatment on the surface of the The algorithm model of the selection of various ant elements in the ant colony according to the random communication path is shown as formula (3):
in formula (3), prob (D pω ) Indicating the result of selecting a random communication path, pi ω To adjust the constant of the optimal transfer path for sensor data output, Σ NW=1 π ω (D pω ) Selecting proper communication path parameters from all the search path sets;
(3) Starting an ant colony algorithm, searching an error data set after the classification of the detected fluid data set, adjusting a learning error value in the ant colony algorithm model after all ant elements in the ant colony algorithm model find an optimal transmission channel in the fluid data set detected by a sensor, and if the output error value L is smaller than or equal to a maximum value L set in the BP neural network algorithm model m When the optimal path search of the data transmitted by each sensor is finished, the ant colony algorithm stops inquiring;
(4) In the step (3), if the learning error value in the ant colony algorithm model is greater than the maximum value set in the BP neural network algorithm model, the optimal path of each sensor data output is queried again, the iteration number in the ant colony algorithm is set, and when the maximum iteration number in the ant colony algorithm model is T m When the ant colony algorithm model is used, the path set formed by random non-zero sensing data of various sensors received in the ant colony algorithm model is D pω The information formula of the traversing path searching and updating data in the process of transmitting data by various sensors is as follows:
in the formula (4) of the present invention,
in the continuous iterative calculation process of the ant colony algorithm, in searching various sensor transmission paths, the single ant element detects the optimal path parameter persistence information adjustment parameter of the optimal path parameter set of the optimal value, wherein T
m Expressed as information constants, (D
pω ) Element data expressed as search information of the ant colony algorithm in the repeated iterative calculation process;
(5) Through continuous iterative computation, when the ant element in the ant colony algorithm reaches the maximum value D of the data parameters of each sensor communication path m At this time, the sensor data information output at this time is the optimal result.
Has the positive beneficial effects that:
1. the invention is different from the traditional technical scheme, the heat calculation and the data storage in the conventional technology are transferred to the cloud, the cost of the terminal heat meter calculator chip and the whole power consumption of the heat meter are greatly reduced, meanwhile, the dependence on foreign import chips is reduced, and when the terminal needs to call and see the accumulated flow, the accumulated heat or the historical data, the cloud computing platform can also transmit the data back in real time, so that the sharing of the data is realized.
2. The method combines the advantages of 5G communication and the narrow-band Internet of things, can greatly enhance the reliability of a networking database and greatly reduce the cost of the calorimeter. The invention applies the existing internet of things technology and 5G communication, and forms ultra-dense networking by arranging a plurality of communication nodes in the area, thereby realizing mass connection and rapid data transmission and improving the data interaction capability.
3. The novel heat meter calculating chip is simple in structure and easy to realize, only meets the requirement of collecting flow information transmitted by the flow sensor, is responsible for collecting single-branch and paired temperature information transmitted by the temperature sensor, avoids various functions of water quantity information collection, calculation, storage and transmission in the conventional technology, and greatly reduces the chip design difficulty and the chip purchase cost, thereby reducing the manufacturing cost of the heat meter.
4. According to the invention, calculation under various conditions of the fluid is realized through algorithms such as a data fusion algorithm, a formula calculation model, a big data calculation model and the like, wherein the big data calculation model comprises an improved ant colony algorithm model, a fault diagnosis algorithm model or an associated algorithm model for big datamation and the like, various types of data in a data pool in the fluid are integrated, classified, associated or target data are optimally searched according to the requirements on fluid research, optimization arrangement of various types of data with different detection types in a sensor output data pool is realized, and analysis and processing capacities of various different sensor output data are greatly improved.
5. The invention flexibly adopts various data terminals of devices such as PC, tablet, iphone, android and the like, can flexibly view different types of data information, and improves the convenience of data access.
6. According to the study, by designing the cloud management system, a user can realize data analysis and early warning in a cloud computing center, trend prediction and energy-saving diagnosis and evaluation are provided, peak value adjustment digital support can be adjusted for a thermal company at the first time, the house empty rate can be initially evaluated through data analysis, and important references are provided for energy-saving and emission-reduction work and government decision-making through civil or commercial energy consumption conditions.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example (1) System
Referring to fig. 1-5, and specifically referring to fig. 1 and 2, a heat meter metering system based on cloud computing, where the system includes a detection unit, a communication unit, a cloud management system, and an application terminal, an information output end of the detection unit is connected with an input end of the communication unit, an output end of the communication unit is connected with an input end of the cloud management system, and an output end of the cloud management system is connected with an input end of the application terminal;
the detection unit is internally provided with a heat meter, the heat meter is connected with a fluid information collector and a power supply connected with the fluid information collector, the fluid information collector comprises a temperature sensor, a flow sensor, a pressure sensor, a residual chlorine sensor, a TOC sensor, a PH sensor, a conductivity sensor, an ORP sensor, a turbidity sensor or a dissolved oxygen sensor which are used for receiving fluid information in a transducer, the temperature sensor is arranged on an uplink pipe and a downlink pipe which pass through heat transfer fluid, and the flow sensor is arranged on a fluid inlet or a return pipe; the heat meter is also provided with a wireless communication interface;
The communication unit comprises a wireless communication module, wherein the wireless communication module comprises a Bluetooth module, a wireless broadband Wi-Fi module, an ultra-wideband UWB module, a near field communication NFC module, an RFID module, an infrared data organization IrDA module, a ZigBee module, a GPRS module, a CDMA module or a cloud communication module;
the cloud management system comprises a cloud server and a big data management platform (specifically referring to fig. 4) arranged in the cloud server, wherein the big data management platform is provided with a data underlying structure, a storage unit, a calculation model and a cloud interface, and the data underlying structure at least comprises an information input module, an information extraction module, an information fusion module, a resource allocation module, an information interaction module, an information comparison module, an information description module, a resource storage module, an interaction execution module, an information screening module, an information output module and a system detection module; the storage module comprises a database, wherein the database at least comprises position data information, temperature data information, flow data information, date data information, fault data information, retrieval data information, space data information, water level data information and pressure data information of fluid detection; the calculation model comprises a formula calculation model and a big data calculation model, the big data calculation model comprises an improved ant colony algorithm model, a fault diagnosis algorithm model or an associated algorithm model, and the cloud interface management module comprises an interface setting module, a ZigBee interface module, an Ethernet interface module, a Wi-Fi interface module, a Bluetooth interface module, a GPRS interface module, a CDMA module or a cloud communication module;
The application terminal comprises intelligent mobile equipment provided with a data application interface, a storage module and a visual application module, and the intelligent mobile equipment at least comprises a PC (personal computer), a tablet, an iphone mobile phone or an android mobile phone.
According to the embodiment, the existing internet of things technology and 5G communication are combined, various communication modes in different forms are arranged in the area, various data are communicated and transferred, ultra-dense networking is formed, mass connection and rapid data transmission are achieved, a cloud management system serves as the top layer of the whole system, the most heavy data processing task of the whole system is borne, and the heat value is calculated and stored in a database through collecting flow and pairing temperature data of a terminal heat meter. The large data management platform can intensively calculate and process mass data to realize higher resource integration rate, meanwhile, a distributed calculation mode can be adopted, various data in a data pool can be integrated and screened by combining with an ant colony algorithm which is continuously optimized, the large-scale data throughput rate and the data storage and access timeliness are improved, various results are presented in the most efficient and simple mode, and a user can access the platform through equipment such as a PC, a tablet, iphone, android and the like to check the related data of the terminal calorimeter. And an edge layer can be arranged between the object layer and the cloud computing center in some special environments, and is used for connecting terminal equipment and an upper cloud end and carrying out the tasks of partial terminal access, data collection, protocol adaptation, data cleaning and the like. Finally, novel fluid data detection and calculation functions of cloud communication and 5G Internet of things are realized.
As shown in fig. 3, the fluid information collector in the above embodiment includes a single chip microcomputer chip with a model MK10DN512VLLH10, the core of the single chip microcomputer chip is ARM Cortex-M4, the working voltage range is 1.7V-3.6V, and the working frequency is 100MHz. The singlechip chip is respectively connected with a power supply circuit, an interface circuit, a crystal oscillator circuit, a communication module, a storage module and a reset circuit, wherein the communication module is a wireless communication module.
In the embodiment, the fluid information collector can collect various data information such as pressure, residual chlorine, TOC, PH value, conductivity, ORP, turbidity, dissolved oxygen and the like in the fluid besides temperature and flow data information, fluid accumulated heat, accumulated cold, power, instantaneous flow, water inlet and outlet temperature and the like in the fluid, and has only functions of data collection and data communication, so that the load of a meter body is greatly reduced. When the terminal needs to call the accumulated flow, the accumulated heat or the historical data, the cloud platform can also transmit the data back in real time.
Based on the above requirements, referring to fig. 5 again, in an embodiment of the present invention, the hardware of the host of the cloud server is configured as Intel Xeon E3-1220v53.0 GHz quad core, the memory is 16GDDR4, the hard disk is 1 x Intel enterprise level SSD,1 x sata 1t, and the network card is 2 x gigabit portal; in the hardware configuration of the working machine node, the CPU model is Intel Xeon E53.0GHZ, the memory is 640GB, and the hard disk capacity is 128TB. This structural hardware is sufficient to satisfy the functions of cloud computing.
The hardware structure of the cloud server may further include:
the infrastructure is a service layer, and at least a resource allocation module, a data mining module, a fault detection module, an information integration module, a software development framework module, a task scheduling module and a test command module which are distributed are arranged in the infrastructure;
the software is a service layer, and at least a log processing module, a permission authentication module, a data exchange module, a space data module, an exception processing module, a content retrieval module, a storage module and a data browsing module which are distributed are arranged in the software;
the platform is a service layer, and at least an algorithm model module, an auxiliary index module, a data calculation module, a semantic index module, a statistical analysis module, a text index module, a test data mining module and a data index module which are distributed are arranged in the platform;
The terminal is a mobile terminal, and is at least provided with a network setting module, an information system interface module, a server and platform module, a security setting module, a storage module, a virtual environment information module, a service and application module and a mobile application module which are distributed; wherein:
the infrastructure, i.e. the service layer, the software, i.e. the service layer, the platform, i.e. the service layer and the terminal are sequentially arranged from bottom to top.
In the above embodiment, the main purpose of cloud computing is to reduce the burden of processing data by a terminal device, and the size of cloud storage capacity is decisive for it. Through improving cloud storage's ability, can realize terminal equipment function simplification, only need provide data input output function just can satisfy the user demand, realize data and cloud sharing. The cloud services which are relatively commonly used at present are IaaS, paaS, saaS and the like, and specific information is not described in detail.
In a further embodiment of the present invention, the improved ant colony algorithm model, the fault diagnosis algorithm model or the association algorithm model are all provided with a computing chip and a wireless communication interface connected with the computing chip. By these different data algorithms, various forms of application of various data information can be realized, and the following embodiments will be described in detail.
Example (2) method
As shown in fig. 6-8, a heat meter metering method based on cloud computing is shown in fig. 6:
(1) And (3) data acquisition: collecting fluid information in the energy converter through a fluid information collector arranged in the heat meter, wherein the fluid information is temperature information, flow information, pressure information, residual chlorine information, TOC information, PH value information, conductivity information, ORP information or turbidity information;
(2) Data transfer: the wireless communication module is used for transmitting the data information acquired by the acquisition device;
(3) And (3) data calculation: carrying out data management through a cloud big data management platform, and calculating, analyzing and outputting various received data information through a calculation model; in the step, the formula calculation model is a heat calculation formula, and the heat calculation formula comprises an enthalpy difference method calculation formula and a thermal coefficient method calculation formula; the improved ant colony algorithm model is a mixed ant colony algorithm model integrated with a classification algorithm model, and the classification algorithm model is a decision tree classification model, a K-algorithm model or a Bayesian probability classification algorithm model; the fault diagnosis algorithm model is a big data analysis early warning model of an RPROP hybrid algorithm based on a BP neural network, the association algorithm model is a random association algorithm model, and calculation or processing of data information detected by a temperature sensor, a flow sensor, a pressure sensor, a residual chlorine sensor, a TOC sensor, a PH sensor, a conductivity sensor, an ORP sensor, a turbidity sensor or a dissolved oxygen sensor is completed through different algorithm models so as to meet different requirements of users;
(4) Data application: and realizing the application of various data information of the data through the application terminal. In the above embodiment, the enthalpy difference method calculation formula is:
wherein Q is the heat released by the transducer in KJ, wherein Q m For the mass flow of the heat transfer liquid flowing through the heat meter, the unit is kg/s, h f The unit of the specific enthalpy value of the heat transfer liquid corresponding to the inlet temperature in the heat exchange loop is kJ/kg, h r The specific enthalpy value of the heat transfer liquid corresponding to the outlet temperature in the heat exchange circuit is given in kJ/kg, and t is the time given in seconds.
In the above embodiment, the thermal coefficient method is calculated as follows:
wherein Q is the heat released by the transducer, in J or kW h, V is the volume through which the heat transfer fluid flows, in m 3 ,θ f The temperature at the heat transfer liquid inlet in the heat exchange circuit is expressed in degrees centigrade, theta r Represents the temperature at the outlet of the heat transfer liquid in the heat exchange circuit, in terms of C, and k represents the thermal coefficient, which is a function of the heat transfer liquid at the corresponding temperature, temperature difference and pressure, in terms of kJ/m 3 Or kW.times.h/m 3 ℃。
In the above embodiment, the method for constructing the improved ant colony algorithm model includes:
the method comprises the steps of inputting detected fluid signals into an information fusion module, respectively inputting the fused information into a decision tree classification model, a K-algorithm model or a Bayesian probability classification algorithm model after fusion by the information fusion module, or simultaneously using the three algorithm modules of the decision tree classification model, the K-algorithm model or the Bayesian probability classification algorithm model, outputting the data information after passing through different classification modules to an ant colony algorithm model, realizing the output of a hybrid algorithm, and outputting the data information of a target of a user. Referring specifically to fig. 7.
Through the algorithm, the processing and analysis of various data information in the collected fluid information can be realized, the collected macroscopic data information is converted into microscopic analysis, and the grasping of the fluid information is facilitated for a user.
In the above embodiment, the information fusion module realizes data fusion by the following mathematical model:
wherein the method comprises the steps of
For normalization formula +.>
Weight coefficient s output for sensing fluid data information for various different sensors at t time instant
i M is different fluid data information types, wherein the weight coefficient s
i Ranging from 0 to 4. s is(s)
i (t) the weighting coefficients of the various sensor sensing fluid data information outputs at time t; in other embodiments, an adaptive weighted fusion algorithm model may also be employed. Different sensor data information is summarized together through mathematical fusion, so that learning and data mining are facilitated.
In the decision tree classification model, a user can separate various data information such as temperature, flow, fluid accumulated heat, accumulated cold, power, instantaneous flow, inlet and return water temperature, pressure, residual chlorine, TOC, PH value, conductivity, ORP, turbidity, dissolved oxygen and the like in collected fluid, when the temperature information in the fluid is researched, the data information in a temperature range is output through the decision tree classification model, when the pressure information in the fluid is researched, the data information in the pressure range is output through the decision tree classification model, and the like, in the recursion process of continuous splitting of the data, the data with the same category is split at one side of the tree as much as possible, and when the data of leaf nodes of the tree are all of one category, the splitting is stopped. And classifying different data information in the fluid information in a final tree form.
The K-algorithm model and the Bayesian probability classification algorithm model are also one of classification algorithms, wherein the principle of the K-algorithm model is as follows: there is a collection of various sample data of the fluid, also referred to as a training sample set, and each data in the sample set has a label, i.e., the correspondence of each data in the known fluid sample data set to the associated class (e.g., classified by different attributes such as temperature attribute, pressure attribute, PH attribute, etc.). After inputting new data without labels, each feature of the new fluid sample data is compared with the corresponding feature of the data in the sample set, and then the algorithm extracts the classification labels of the most similar data (nearest neighbors) of the sample. Generally we will only select the first k most similar data in the sample dataset, which is the provenance of k in the k-nearest neighbor algorithm, typically k is an integer no greater than 20. And finally, selecting the classification with the largest occurrence number in the k pieces of most similar data as the classification of the new data. The algorithm is further described in conjunction with the specific embodiments below:
(1) K objects are selected from fluid data information sensed by a plurality of fluid sensors to serve as initial clustering centers, the fluid data information is called environment interference data, and the interference data set affecting fluid measurement is assumed to be X= { X m M=1, 2,..m }, there are d different classification attributes in these data types, according to the complexity, the components are divided into A 1 ,A 2 ,...,A d A set of disturbance data x of different dimensions affecting the fluid measurement i =(x i1 ,x i2 ,...,x id )、x j =(x j1 ,x j2 ,...,x jd ) For sample x i 、x j Corresponding to d different classification attributes A 1 ,A 2 ,...,A d The specific value of (3);
(2) Calculating the distance from each clustering object to the clustering center to divide the classification attribute, then x i And x j The similarity between the two is calculated by a distance formula, and x i And x j The smaller the distance between them, the sample x i And x j The more similar, x i And x j The greater the distance between them, the greater the sample x i And x j The farther the phase difference is; the classified distance formula is:
(3) Calculating each cluster center again, repeatedly calculating, taking the sample mean value in each cluster as a new cluster center, and repeating the step (2);
(4) And (3) stopping calculation when the cluster center is not changed or the maximum iteration number is reached, otherwise, repeating the steps (2) and (3). According to this method, data classification can be achieved;
the above is only an example of a K-algorithm model, and the scope of the present invention is not limited thereto.
In the specific embodiment of the invention, an ant colony algorithm is integrated in a big data analysis and early warning model of an RPROP (remote sensing and control protocol) hybrid algorithm based on a BP (back propagation) neural network so as to realize the optimal output of each sensor information transmission path and the optimal output of collected fluid information data, and the construction method of the big data analysis and early warning model comprises the following steps:
(1) Initializing sensing values of temperature, flow, pressure, residual chlorine, TOC, PH value, conductivity, ORP information or turbidity information output by each sensor in a big data analysis early warning model, setting N different fluid metering data parameters in a set BP neural network, and setting a weight value range in a BP neural network algorithm model as (X) uυ ,Y ωu ) The adjustment value range is (H u ,I υ );
(2) Setting the parameters of the optimal output fluid metering data communication path according to the values set in the step (1), and setting the fluid metering data parameter set as P ω (ω=1, 2,., N), then non-zero data is randomly sought in the fluid metering data parameter set to form a path set D pω Wherein the maximum value of the parameter of the sensor data transmitted in different paths is set as D m The maximum ant element seeking the data output communication path of various sensors is Q, and the learning error value of the seeking path is L 0 The method comprises the steps of carrying out a first treatment on the surface of the The algorithm model of the selection of various ant elements in the ant colony according to the random communication path is shown as formula (6):
in formula (6), prob (D pω ) Indicating the result of selecting a random communication path, pi ω To adjust the constant of the optimal transfer path for sensor data output, Σ NW=1 π ω (D pω ) Selecting proper communication path parameters from all the search path sets;
(3) Starting an ant colony algorithm, searching an error data set after the classification of the detected fluid data set, adjusting a learning error value in the ant colony algorithm model after all ant elements in the ant colony algorithm model find an optimal transmission channel in the fluid data set detected by a sensor, and if the output error value L is smaller than or equal to a maximum value L set in the BP neural network algorithm model m When the optimal path search of the data transmitted by each sensor is finished, the ant colony algorithm stops inquiring;
(4) In the step (3), if the learning error value in the ant colony algorithm model is greater than the maximum value set in the BP neural network algorithm model, the optimal path of each sensor data output is queried again, the iteration number in the ant colony algorithm is set, and when the maximum iteration number in the ant colony algorithm model is T m When the ant colony algorithm model is used, the path set formed by random non-zero sensing data of various sensors received in the ant colony algorithm model is D pω Various sensors communicate dataThe information formula of the traversing path searching update data in the process is as follows:
in the formula (4) of the present invention,
in the continuous iterative calculation process of the ant colony algorithm, in searching various sensor transmission paths, the single ant element detects the optimal path parameter persistence information adjustment parameter of the optimal path parameter set of the optimal value, wherein T
m Expressed as information constants, (D
pω ) Element data expressed as search information of the ant colony algorithm in the repeated iterative calculation process;
(5) Through continuous iterative computation, when the ant element in the ant colony algorithm reaches the maximum value D of the data parameters of each sensor communication path m At this time, the sensor data information output at this time is the optimal result. In the above embodiments, in order to more clearly understand the application of the ant colony algorithm in the fluid data information processing, another embodiment of the present invention is provided to explain a method for constructing an ant colony algorithm model, which includes the following steps:
(1) Initializing; initializing the acquired fluid data information, wherein the selected initialization aggregate of different fluid data information is y (t), and y (t) =y max Enabling data information such as a function temperature data item, a pressure data item, a flow data item, a PH value data item and the like to serve as an ant element, initializing all elements of an ant element matrix to be 0 at initial time, and then randomly selecting the initial position of the ant element; in which information factors are found
Heuristic factor beta E [ beta ]
min ,β
max ]Searching for pheromone concentration volatilization factor rho epsilon [ rho ]
min ,ρ
max ];
(2) M antsThe elements are randomly arranged at N positions, and the number of cycles of the ant element searching path is set as N c According to N c The +1 order is cycled; in the data update, the following formula exists:
(3) Setting an index number k=1 of an ant element tabu list, and circulating through k+1;
(4) Calculating the probability of the ant selecting position j according to a state transition probability formula of the following formula; then there are:
wherein delta is a visibility factor, the visibility factor represents the reciprocal of the distance between different positions, alpha is a pheromone concentration relative important parameter, beta is a visibility factor relative important index, and Node is a set of positions which are directly connected with the position i and through which ant elements do not pass;
(5) Selecting a position with the maximum state transition probability, moving the ant element to the position with the maximum state transition probability, and recording the position into a tabu list;
(6) Judging that k is smaller than m after all positions in the ant element data set are accessed, wherein m is the number of the positions, performing a circulating operation through k+1, and if all the positions in the ant element data set are not accessed, updating information quantity on each path again;
(7) Checking a termination condition, namely checking whether the termination condition is met, wherein the probability of selecting the position j by ants is more than 69%, and if the termination condition is met, performing further operation;
(8) Judging whether a new population is formed, if the termination condition is: if the probability of selecting the position j by ants is less than 69%, forming a new group, and updating the pheromone matrix again by recalculating the minimum data matrix D;
(9) Judging whether a termination genetic condition is satisfied, and when the termination genetic condition is satisfied, judging that the termination genetic condition is: the probability of the ant selecting the position j is more than or equal to 69 percent,
the calculation result is output.
In the above embodiment, the number of times of updating the pheromone matrix by the ant colony algorithm is 6-12, and in a preferred technical scheme, the number of times is 8, which can show a better technical effect. In another embodiment of the present invention, a chaotic particle swarm algorithm model is further adopted to overcome the defects of the ant swarm algorithm, and the method for constructing the chaotic particle swarm algorithm model is described by an embodiment again:
assuming that the acquired fluid data set is D, the range of allowable fluctuation of the fluid data set is estimated to be [0,1], D is the variable number of all fluid data sets of the fluid, when the chaos generates initial particles, a Logistic chaotic mapping formula is started, and then:
P i,n =4P i-1,n (1-P i-1,n ); (12)
Where i=2, 3, G, then the fitness of each ion is obtained one by one, then the initial particles are screened out again, and then all particles are defined as [0,1 ]]Mapping chaotic interval on [ a ] n ,b n ]The variable interval of (2) has the formula:
p in =a n +(b n -a n )×P i,n (13)
then solving the fitness value and the average fitness value of each particle of the particle swarm, and in the calculation process, for the convenience of calculationThe current position and the optimal particle position of the particle swarm are respectively indicated by the letter p best 、g best Then judging whether the calculation process meets the convergence condition, if yes, finishing the calculation, if not, updating the particle speed again, and finally calculating the adaptability variance of the software test item group, wherein the adaptability variance is expressed as follows by a formula:
wherein for the fitness of the ith particle, the letter f is used
i Indicating the average fitness of the current particle group particles
Expressed, the normalization factor is expressed as f, calculated using the following formula:
when the calculated quantity ratio of formula (15) is set to be epsilon (epsilon > 0), then 0,1 is restored]Mapping chaotic interval on [ a ] n ,b n ]If the calculated amount of equation (15) is less than or equal to the set value ε, then re-calculating the fitness value and the average fitness value for each particle of the particle swarm, and finally normalizing the position of the particle to the interval [0,1 ] ]In the above case, the chaotic update is performed by using the formula (15).
Further, when the position of the particle is updated, the following formula is adopted:
x of 16 i For the vector representation of the ith particle in the D-dimensional vector, the set can be expressed as:
x i =(x i1 ,x i2 ,...,x iD ) T (17)
where i=1, 2,..m, the position of the ith particle in the D-dimensional vector space is x i To represent; when the adaptability of the new particles output by the calculation result is larger than p best When the adaptation of (a) is performed, p needs to be recalculated best When the adaptability of the new particles output by the calculation result is less than or equal to p best And outputting the individual with the best fitness, namely, the items to be measured, which are searched in all the acquired data sets of the fluid.
The particle swarm algorithm is integrated into the ant colony algorithm, so that the fitness value of each sub-population can be calculated relatively quickly; when a preset period is reached, the global position is optimally updated, and finally, a local optimal solution is searched, and the phenomena of early maturing and the like in an ant colony algorithm are avoided by dividing the sub-populations.
In summary, the method not only reduces the load of the expression in the prior art, but also expands the range of fluid calculation and greatly increases the degree of evaluating the fluid data information.
While specific embodiments of the present invention have been described above, it will be understood by those skilled in the art that these specific embodiments are by way of example only, and that various omissions, substitutions, and changes in the form and details of the methods and systems described above may be made by those skilled in the art without departing from the spirit and scope of the invention. For example, it is within the scope of the present invention to combine the above-described method steps to perform substantially the same function in substantially the same way to achieve substantially the same result. Accordingly, the scope of the invention is limited only by the following claims.