Clustering method, system and equipment based on sequential sequence and storage medium

Through the time series sequence clustering method based on multi-view learning, the hospital's energy consumption curve is analyzed and evaluated, and the timeliness, cost and subjectivity of energy consumption management in the prior art is solved, and more efficient and accurate energy consumption management is achieved.

CN119537989AInactive Publication Date: 2025-02-28NANJING TIANSU AUTOMATION CONTROL SYST CO LTD

Patent Information

Application Number
CN202510099934.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-02-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When analyzing and evaluating the hospital's energy consumption curve, the prior art has problems such as poor timeliness, high labor costs and strong subjectivity, making it difficult to effectively manage and optimize the energy use of hospitals.

Method used

The time series clustering method based on multi-view learning is adopted, and energy consumption data is collected and cleaned through the data middle platform module, the algorithm middle platform module performs cluster analysis, evaluation system module outputs evaluation indexes, and the factor library maintenance module automatically identifies and explains abnormalities and trend changes in the energy consumption curve.

Benefits of technology

The automatic analysis and evaluation of the energy consumption curve has been achieved, the efficiency and accuracy of energy consumption inspection have been improved, more reasonable energy-saving measures have been formulated, and labor costs have been reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537989A_ABST
    Figure CN119537989A_ABST
Patent Text Reader

Abstract

The invention discloses a clustering method, system and equipment based on a sequential sequence and a storage medium, and the method comprises the steps: carrying out the reasonable classification and analysis of tree nodes through modular operation by employing a sequential sequence clustering method based on multi-view learning according to an energy consumption curve; different energy consumption curves are clustered, the evaluation content of each cluster is automatically output, and possible reasons are pushed, so that the operation and maintenance personnel can conveniently check, and the energy consumption check efficiency and accuracy are improved; and therefore, corresponding more reasonable and appropriate energy-saving measures can be formulated. In view of prominent energy consumption problem and high energy cost ratio caused by medical service demand increase and hospital scale expansion, the invention aims to reasonably classify tree nodes according to an energy consumption curve so as to formulate energy-saving measures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a time series technology of hospital energy consumption curves, in particular to a clustering method, system, equipment and storage medium based on the time series. Background Art

[0002] In today's society, with the continuous increase in demand for medical services and the continuous expansion of hospital scale, the problem of energy consumption in hospitals has become increasingly prominent. Energy costs account for a large proportion of the total operating costs of hospitals, so effective management and optimization of energy use plays a vital role in the sustainable development of hospitals.

[0003] As a complex system, hospitals have a wide variety of energy-consuming equipment, including medical equipment, lighting systems, air conditioning systems, ventilation systems, etc. The operating hours and energy consumption patterns of these devices are different, making the energy consumption curve complex and changeable. At the same time, the operation of hospitals has its own particularities, such as the peak period of surgery and the peak period of outpatient services. During these periods, energy consumption will fluctuate significantly.

[0004] In the hospital energy management project, energy consumption anomalies and energy consumption development trends are the focus of attention. How to reasonably analyze the energy consumption curve and find out key energy events has become the focus of the task. Usually, the evaluation of energy consumption curves is mostly done by manual judgment. By displaying the energy consumption curve, manual judgment is made on its anomalies (energy consumption mutation) and energy consumption development trends (energy consumption continues to rise, energy consumption continues to fall). However, with the increase in data complexity and data volume, the manual method of judging and evaluating energy consumption curves has exposed more and more shortcomings and technical problems: First, the timeliness is poor. It takes a long time to manually collect, organize and analyze energy consumption data, which may cause the best time to make energy-saving adjustments to be missed.

[0005] Second, the labor cost is high. Not only does it require professionals to operate, but as the amount of data continues to increase, the cost will also increase.

[0006] Third, it is highly subjective. Different evaluators may come to different conclusions, which will affect the accuracy of the decision.

[0007] Therefore, in view of the prominent energy consumption problems and the high proportion of source costs caused by the growth in demand for medical services and the expansion of hospital scale, it is possible to consider formulating corresponding energy-saving measures on the premise of rationally classifying the tree nodes according to the energy consumption curve. Summary of the invention

[0008] In order to solve the above technical problems, the present invention proposes a clustering method, system, device and storage medium based on time series, aiming to use the time series clustering method based on multi-view learning to reasonably classify and analyze tree nodes according to energy consumption curves; cluster different energy consumption curves, automatically output the evaluation index of each cluster, and give possible reasons at the same time to guide operation and maintenance personnel to conduct inspections, thereby improving the efficiency and accuracy of energy consumption inspections; and then formulate corresponding more reasonable and appropriate energy-saving measures.

[0009] The technical solution of the present invention is as follows: The clustering system based on time series includes the following modules: The data middle platform module is used to establish connections with various energy consumption monitoring devices, collect hospital energy consumption data and perform anomaly cleaning, build a tree model of hospital energy consumption data, and extract hospital energy consumption time series data of tree nodes from the tree model.

[0010] The algorithm middle platform module is used to construct a clustering model for the extracted hospital energy consumption time series data, perform cluster analysis on the extracted hospital energy consumption time series data, obtain clustering results, and obtain clustering labels for all extracted hospital energy consumption time series data through the clustering results.

[0011] The evaluation system module is used to evaluate the clustering results and output the corresponding evaluation content through different evaluation methods so that operation and maintenance personnel can check and explore energy-saving points.

[0012] The factor library maintenance module is used to store energy consumption factors to form a factor library, and to match the energy consumption curve characteristics in the clustering results with the pre-set factor library to automatically identify and explain the anomalies and trend changes in the energy consumption curve, and output the most likely reasons for the occurrence of energy consumption problems.

[0013] The factor library formed in the factor library maintenance module includes a factor library of gradually increasing energy consumption curve, a factor library of gradually decreasing energy consumption curve, and a factor library of sudden energy consumption curve. The energy consumption factors in the preset energy consumption curve gradually rising factor library include: 1) The hospital has introduced new advanced medical equipment or expanded its diagnosis and treatment scale; 2) As the hospital's service scope expands, the number of patients visiting the hospital continues to increase, and the frequency of use of various types of equipment increases.

[0014] 3) Hospitals launch new medical technologies or treatment projects that may require more energy support.

[0015] 4) The hospital’s social security system is outdated and its operating efficiency is gradually declining.

[0016] 5) When summer or winter comes, the energy consumption of air conditioners will increase.

[0017] The energy consumption factors in the preset energy consumption curve gradually decreasing factor library include: 1) The hospital takes effective energy-saving measures, such as optimizing equipment operating time and improving energy utilization efficiency.

[0018] 2) The hospital has updated old equipment with newer, more energy-efficient equipment, thus reducing energy consumption.

[0019] 3) The hospital has strengthened energy management, provided energy-saving training to employees, and raised the energy-saving awareness of all employees.

[0020] The energy consumption factors in the preset energy consumption curve mutation factor library include: 1) The sudden arrangement of emergency surgery may cause specific medical equipment to operate at high load instantly.

[0021] 2) Sudden failure of medical equipment will consume a large amount of energy during the repair process, which will cause a sharp increase in energy consumption.

[0022] 3) Emergency events within the hospital, such as fire, earthquake and other emergencies, will cause the activation of the emergency system to cause an instantaneous surge in energy consumption.

[0023] 4) When the hospital holds a large-scale academic conference or event, the temporary increase of equipment and personnel will cause a sudden increase in energy consumption.

[0024] 5) The hospital's backup power system is activated when external factors such as power grid fluctuations or power restoration after a power outage.

[0025] The clustering method based on time series includes the following processing steps: S1, establishes connections with various energy consumption monitoring devices through the data middle platform module, collects hospital energy consumption data from various energy consumption monitoring devices at a set frequency, establishes a tree model of hospital energy consumption data, and extracts hospital energy consumption time series data of tree nodes from the tree model.

[0026] S2, cluster analysis is performed through the algorithm middle platform module using different weight calibration methods to obtain clustering results.

[0027] S3, for the clustering results, the evaluation system module selects different evaluation methods to output corresponding evaluation content, and the evaluation content includes trend evaluation and abnormality evaluation. Compared with the manual evaluation method, this method has more mathematical principles and theoretical explanations, and can greatly reduce labor costs.

[0028] S4, for the output evaluation content, the factor library maintenance module automatically extracts the characteristics of the energy consumption curve, matches and benchmarks with the existing factor library, identifies anomalies and trend problems, and outputs possible causes, which are output in descending order of possibility; after the on-site operation and maintenance personnel inspect the site, the real factors are entered and the factor library is updated, thus forming a closed loop. In this way, the factor library can be continuously improved during use.

[0029] Furthermore, in step S1, the collected hospital energy consumption data includes three characteristics: (1) Random burst peaks.

[0030] (2) To rise or fall gradually.

[0031] (3) No obvious trend.

[0032] Furthermore, in step S1, the data middle platform module performs anomaly cleaning on the collected hospital energy consumption data to ensure that the data has good availability and stability. The anomaly cleaning is performed in the data preprocessing stage using the IQR method for data cleaning. Specifically, the IQR is first calculated based on the quartiles of the data to define a reasonable range of the data and identify the outliers. Subsequently, the median of the group of data is used as the standard filling value, and all values ​​judged to be abnormal are replaced with the median, thereby effectively correcting the data deviation and ensuring that the data quality meets the requirements of subsequent analysis and modeling.

[0033] Furthermore, in step S1, the energy consumption monitoring equipment includes a smart meter, a sensor, etc.

[0034] Furthermore, in step S1, the energy consumption monitoring device is mounted under a tree node, and a tree model is designed in a top-down manner to facilitate users to search and focus on tree nodes of their interest.

[0035] Further, in step S1, when extracting hospital energy consumption time series data from the tree model based on tree_id, n Time series data, that is n tree nodes, and each time series data corresponds to an energy consumption curve. The length of the energy consumption curve is expressed as d , then we get a data matrix .

[0036] Furthermore, in step S2, the specific process of the cluster analysis is: S201, Z-standardize the extracted hospital energy consumption time series data.

[0037] S202, using a moving average method to perform trend seasonality decomposition on the extracted original hospital energy consumption time series data, thereby obtaining a trend series data matrix, a period series data matrix and a residual series data matrix.

[0038] S203, constructing a trend graph matrix, a period graph matrix and a residual graph matrix according to the obtained trend sequence data matrix, period graph matrix and residual sequence data matrix, fusing the trend graph matrix, the period graph matrix and the residual graph matrix to obtain a consistent graph, applying a spectral clustering algorithm on the consistent graph to obtain a final clustering result.

[0039] Common machine learning algorithms usually directly bring time series data into the learner to complete the specified task, but this may cause problems because the data is too complex to extract effective information, resulting in poor learning results. In order to better focus on the abnormal conditions and development trends of energy consumption time series, in step S2, the time series is first Z-standardized, and then the trend seasonality of the time series is decomposed using the moving average method for each time series, thereby obtaining the trend series data matrix X (1) , periodic sequence data matrix X (2) and the residual sequence data matrix X (3) .

[0040] Traditional machine learning methods are mostly single-view learning methods, which can only transform the trend sequence data matrix X (1) , periodic sequence data matrix X (2) , residual sequence data matrix X (3) The three matrices are connected in series and combined into a large matrix X (sum) Each view has unique statistical properties, and the concatenation operation ignores these differences. In contrast, multi-view learning introduces functions that model specific views and then jointly optimizes all of these functions. This approach helps to fully utilize redundant views of the same input data and improve learning performance.

[0041] Furthermore, in step S203, a multi-view clustering algorithm based on graph learning is used to define the graph using a Gaussian kernel function. Given a data set ,Right now: (1) in, d is the characteristic dimension, i.e. the length of the energy consumption curve; n is the number of samples, that is, the number of tree nodes.

[0042] Given that using Euclidean distance as a measure of similarity between time series is insufficient because time series may be stretched and shifted, unlike methods such as Euclidean distance, the Dynamic Time Warping (DTW) distance algorithm is a method used to measure the distance between two time series, expressed as: (2) The DTW method takes into account the expansion and offset of the time series on the time axis, and replaces the Euclidean distance with the DTW distance, which is output to the Gaussian kernel function. Using the DTW distance as a similarity measure, a graph matrix is ​​constructed for the trend series, period series, and residual series. A graph is defined on each view to obtain a trend graph matrix. A (1) , periodogram matrix A (2) , residual graph matrix A (3) .

[0043] Furthermore, in step S203, the specific process of obtaining the clustering result based on the graph matrix is ​​as follows: S2031. Predefined weights The weight of each graph is predefined, so the public graph is obtained directly ,in: μ (1) , μ (2) , μ (3) is the weight. Finally, the public graph S Input to a graph clustering algorithm, such as spectral clustering.

[0044] S2032. No predefined weight If the weight of each graph is not defined, the following mathematical model is constructed to automatically select the appropriate weight and perform clustering.

[0045] (3) Among them, μ (v) Indicates v The weight of the view, A (v) Indicates v Similarity graph of views, S represents a public graph, L S express S The Laplace matrix of F express S Spectrum; v Indicates v Views, vThe value range is 1- m ; R n×c middle, c is the number of clusters set in advance, n is the number of tree nodes, and each tree node has an energy consumption curve.

[0046] The alternating minimization algorithm (AM algorithm) is used to solve the model shown in formula (3), and then K-means clustering is performed to obtain the final clustering result.

[0047] Further, in step S3, the trend evaluation is to obtain the number of different trends by analyzing the energy consumption trend curve, specifically: S301, for each cluster in the clustering result, analyzing its energy consumption trend curve, and using a linear regression method to model the trend portion of the curve.

[0048] S302, if the slope (i.e., regression coefficient) is significantly greater than 0, the trend is upward; if it is significantly less than 0, the trend is downward; if it is close to 0, the trend is not obvious.

[0049] S303, repeating steps S301-302, counting the number of different trends in the cluster, and automatically outputting evaluation content, for example: the number of no obvious trends, the number of downward trends, or the number of upward trends.

[0050] Furthermore, in step S3, the anomaly evaluation is to obtain anomaly score statistics by means of isolation forest, specifically: S311, for each cluster, analyze the energy consumption residual curve in the cluster. In most cases, if a residual is significantly different from other residuals, an anomaly may occur at this time. Use the isolation forest to detect abnormal energy consumption residuals and set an abnormal threshold; when the residual at a certain point in time is less than the abnormal threshold, it is determined that the energy consumption of the tree node may be abnormal.

[0051] S312, repeat step S311, count whether the energy consumption residual curve in the cluster is likely to be abnormal, and automatically output the evaluation content, for example, the output evaluation content can be: almost no abnormality or abnormality is likely to occur. In this step, the number of abnormalities in all tree nodes of the cluster can be counted. For example, if the cluster has 3 tree nodes and 2 are determined to be abnormal, it can be output that 2 tree nodes in the cluster are likely to be abnormal.

[0052] Furthermore, in step S4, by comparing the energy consumption characteristics, the factors with the highest probability are read from the factor library to display the top factors. In this way, we can better pay attention to the abnormal situation and development trend of energy consumption, and provide strong support for on-site operation and maintenance personnel to check the possible causes and find energy-saving opportunities.

[0053] Furthermore, in step S4, the DTW distance is used as a similarity measure to perform a similarity calculation between the energy consumption curve that needs to output the factor and the storage energy consumption curve, and the real factor corresponding to the storage energy consumption curve with the highest similarity ranking is calculated, and the same factors are accumulated and pushed to the factor library maintenance module. Based on the pushed matching results, the factor library maintenance module outputs the factors that are most likely to cause changes in the energy consumption curve in order from high to low probability. On-site operation and maintenance personnel can conduct inspections based on this information and modify and supplement the factor library according to actual conditions. For example, if a device is found to frequently fail, resulting in a sudden increase in energy consumption, the information and failure mode of the device will be added to the factor library so that similar events can be better predicted and explained in the future.

[0054] The factor library maintenance module is designed to achieve a closed-loop optimization process. By continuously comparing the feedback from on-site operation and maintenance personnel with the actual energy consumption data, the factor library can continuously learn and evolve, improving its accuracy in predicting and explaining changes in energy consumption curves. This closed-loop mechanism helps to improve the automation and intelligence level of hospital energy consumption management. It can automatically push out related possible causes based on the number of visits, hospital service scope, and cold storage station data that is strongly related to season and temperature, which can significantly reduce reliance on manual analysis.

[0055] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the temporal sequence clustering method based on multi-view learning when executing the computer program.

[0056] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the temporal sequence clustering method based on multi-view learning.

[0057] The technical effects of the present invention are as follows: The present invention adopts a time series clustering method based on multi-view learning to conduct in-depth analysis of energy consumption curves and automatically output evaluation indicators of clusters, including trend evaluation and abnormal evaluation, so as to better focus on abnormal situations and development trends of energy consumption. At the same time, combined with the factor library maintenance module system, it can fully explore the energy-saving space of the hospital and effectively improve the energy-saving rate of hospital energy management. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 It is a schematic diagram of the process of the present invention.

[0059] Figure 2 This is a schematic diagram of the energy consumption data collected in Example 1.

[0060] Figure 3 This is a schematic diagram of the result of decomposing the energy consumption time series of a certain point in a hospital in Example 2.

[0061] Figure 4 Schematic diagram of the multi-view clustering algorithm mode based on graph learning selected in Example 2.

[0062] Figure 5 This is a schematic diagram of selecting predefined weights in Example 2 and setting the cluster to 3 for giving a larger weight to the trend graph.

[0063] Figure 6 This is a schematic diagram of selecting predefined weights in Example 2 and setting the clustering cluster to 2 by giving a larger weight to the residual graph. DETAILED DESCRIPTION

[0064] Example 1 The clustering system based on time series designed in this embodiment includes the following modules: The data middle platform module is used to establish connections with various energy consumption monitoring devices, collect hospital energy consumption data and perform anomaly cleaning, build a tree model of hospital energy consumption data, and extract hospital energy consumption time series data of tree nodes from the tree model.

[0065] The algorithm middle platform module is used to construct a clustering model for the extracted hospital energy consumption time series data, perform cluster analysis on the extracted hospital energy consumption time series data, obtain clustering results, and obtain clustering labels for all extracted hospital energy consumption time series data through the clustering results.

[0066] The evaluation system module is used to evaluate the clustering results and output the corresponding evaluation content through different evaluation methods so that operation and maintenance personnel can check and explore energy-saving points.

[0067] The factor library maintenance module is used to store energy consumption factors to form a factor library, and to match the energy consumption curve characteristics in the clustering results with the pre-set factor library to automatically identify and explain the anomalies and trend changes in the energy consumption curve, and output the most likely reasons for the occurrence of energy consumption problems.

[0068] The factor library formed in the factor library maintenance module includes a factor library of gradually increasing energy consumption curve, a factor library of gradually decreasing energy consumption curve, and a factor library of sudden energy consumption curve. The energy consumption factors in the preset energy consumption curve gradually rising factor library include: 1) The hospital has introduced new advanced medical equipment or expanded its diagnosis and treatment scale; 2) As the hospital's service scope expands, the number of patients visiting the hospital continues to increase, and the frequency of use of various types of equipment increases.

[0069] 3) Hospitals launch new medical technologies or treatment projects that may require more energy support.

[0070] 4) The hospital’s social security system is outdated and its operating efficiency is gradually declining.

[0071] 5) When summer or winter comes, the energy consumption of air conditioners will increase.

[0072] The energy consumption factors in the preset energy consumption curve gradually decreasing factor library include: 1) The hospital takes effective energy-saving measures, such as optimizing equipment operating time and improving energy utilization efficiency.

[0073] 2) The hospital has updated old equipment with newer, more energy-efficient equipment, thus reducing energy consumption.

[0074] 3) The hospital has strengthened energy management, provided energy-saving training to employees, and raised the energy-saving awareness of all employees.

[0075] The energy consumption factors in the preset energy consumption curve mutation factor library include: 1) The sudden arrangement of emergency surgery may cause specific medical equipment to operate at high load instantly.

[0076] 2) Sudden failure of medical equipment will consume a large amount of energy during the repair process, which will cause a sharp increase in energy consumption.

[0077] 3) Emergency events within the hospital, such as fire, earthquake and other emergencies, will cause the activation of the emergency system to cause an instantaneous surge in energy consumption.

[0078] 4) When the hospital holds a large-scale academic conference or event, the temporary increase of equipment and personnel will cause a sudden increase in energy consumption.

[0079] 5) The hospital's backup power system is activated when external factors such as power grid fluctuations or power restoration after a power outage.

[0080] like Figure 1 As shown, the clustering method based on time series implemented by the above system includes the following processing steps: S1, establish connections with various energy consumption monitoring devices (e.g., smart meters, sensors, etc.) through the data middle platform module, collect hospital energy consumption data from various energy consumption monitoring devices at a set frequency (e.g., once every 5 minutes) and perform abnormal cleaning, establish a tree model of hospital energy consumption data, and extract hospital energy consumption time series data of tree nodes from the tree model. The energy consumption monitoring device is mounted under the tree node, and the tree model is designed in a top-down manner to facilitate users to search and pay attention to the tree nodes they are interested in.

[0081] S2, cluster analysis is performed by using different weight calibration methods through the algorithm platform module to obtain clustering results. The specific process of the cluster analysis is: S201, Z-standardize the extracted hospital energy consumption time series data.

[0082] S202, using a moving average method to perform trend seasonality decomposition on the extracted original hospital energy consumption time series data, thereby obtaining a trend series data matrix, a period series data matrix and a residual series data matrix.

[0083] S203, constructing a trend graph matrix, a period graph matrix and a residual graph matrix according to the obtained trend sequence data matrix, period graph matrix and residual sequence data matrix, fusing the trend graph matrix, the period graph matrix and the residual graph matrix to obtain a consistent graph, applying a spectral clustering algorithm on the consistent graph to obtain a final clustering result.

[0084] S3, for the clustering results, the evaluation system module selects different evaluation methods to output corresponding evaluation content, and the evaluation content includes trend evaluation and abnormality evaluation. Compared with the manual evaluation method, this method has more mathematical principles and theoretical explanations, and can greatly reduce labor costs.

[0085] S4, for the output evaluation content, the factor library maintenance module automatically extracts the characteristics of the energy consumption curve, matches and benchmarks with the existing factor library, identifies anomalies and trend problems, and outputs possible causes, which are output in descending order of possibility; after the on-site operation and maintenance personnel inspect the site, the real factors are entered and the factor library is updated, thus forming a closed loop. In this way, the factor library can be continuously improved during use.

[0086] Furthermore, the hospital energy consumption data collected in step S1 is as follows: Figure 2 As shown, it includes three features: (1) Random burst peaks.

[0087] As a complex operating system, hospitals often face some unforeseen situations. For example, the sudden arrangement of emergency surgery may cause specific medical equipment to run at high load instantly, thus forming an abrupt peak on the energy consumption curve; or a sudden failure of medical equipment may consume a lot of energy during the repair process, thus causing a sharp increase in energy consumption. These random sudden peaks have no rules to follow, which brings great challenges to the hospital's energy management.

[0088] (2) To rise or fall gradually.

[0089] In a specific period of time, the hospital energy consumption curve will show a gradual change trend. If the hospital introduces new advanced medical equipment or expands the scale of diagnosis and treatment, the energy demand may gradually increase, causing the energy consumption curve to rise; conversely, if the hospital takes effective energy-saving measures, such as optimizing equipment operation time and improving energy utilization efficiency, the energy consumption curve may gradually decrease. This gradually changing trend reflects the dynamic adjustment and development of the hospital during operation. In addition, climate factors will also have a significant impact on the hospital energy consumption curve. In the hot summer, the hospital needs to turn on refrigeration equipment such as air conditioners to maintain a comfortable indoor temperature, which will lead to a significant increase in energy consumption, thereby increasing the energy consumption curve. In the cold winter, the operation of the heating system also consumes a lot of energy.

[0090] (3) No obvious trend.

[0091] Sometimes the hospital energy consumption curve may be in a relatively stable state, without obvious upward or downward trends. This may be because the various activities in the hospital are in a relatively balanced state and no major changes have occurred. However, this seemingly stable state may hide potential problems, and some subtle changes may be concealed and difficult to be discovered in time. For example, some equipment may waste energy unknowingly, but since there is no obvious trend change in the overall energy consumption curve, these problems are easily overlooked. Therefore, even in the absence of obvious trends, it is necessary to continuously monitor and analyze hospital energy consumption to ensure the rational use of energy.

[0092] Further, in step S3, the trend evaluation is to obtain the number of different trends by analyzing the energy consumption trend curve, specifically: S301, for each cluster in the clustering result, analyzing its energy consumption trend curve, and using a linear regression method to model the trend portion of the curve.

[0093] S302, if the slope (i.e., regression coefficient) is significantly greater than 0, the trend is upward; if it is significantly less than 0, the trend is downward; if it is close to 0, the trend is not obvious.

[0094] S303, repeating steps S301-302, counting the number of different trends in the cluster, and automatically outputting evaluation content, for example: the number of no obvious trends, the number of downward trends, or the number of upward trends.

[0095] Furthermore, in step S3, the anomaly evaluation is to obtain anomaly score statistics by means of isolation forest, specifically: S311, for each cluster, analyze its energy consumption residual curve. In most cases, if a residual is significantly different from other residuals, an anomaly may occur at this time. Use the isolation forest to detect abnormal energy consumption residuals and set an anomaly score; when the residual at a certain point in time is less than the anomaly threshold, it is determined that the energy consumption of the tree node may be abnormal; S312, repeating step S311, counting whether the energy consumption residual curve in the cluster is abnormal, and automatically outputting evaluation content, for example, the output evaluation content may be: the number of abnormalities that are almost impossible to occur or the number of abnormalities that may occur.

[0096] Furthermore, in step S4, by comparing the energy consumption characteristics, the factors with the highest probability are read from the factor library to display the top factors. In this way, we can better pay attention to the abnormal situation and development trend of energy consumption, and provide strong support for on-site operation and maintenance personnel to check the possible causes and find energy-saving opportunities.

[0097] Furthermore, in step S4, the DTW distance is used as a similarity metric to perform a similarity calculation between the energy consumption curve of the required output factor and the storage energy consumption curve, and the real factors corresponding to the storage energy consumption curves with the highest similarity ranking (for example, the top three or the top five) are calculated, and the same factors are accumulated and pushed to the factor library maintenance module.

[0098] Example 2 Based on the clustering method and system designed in Example 1, the specific process of identifying energy consumption problems is as follows: Step 1, data acquisition: Get time series data from the database based on tree_id. Assume that n time series data, and the size of each time series is d , so we get a data matrix , go to step 2.

[0099] Step 2: Standardization + sequence decomposition: First, use Z-standardization to standardize the energy consumption data, and then use the moving average method to decompose the trend and seasonality of the time series to obtain the trend series, period series and residual series, and then obtain the trend series data matrix X (1) , periodic sequence data matrix X (2) and the residual sequence data matrix X (3) , go to step 3.

[0100] Common machine learning algorithms usually directly bring time series data into the learner to complete the specified task, but this may cause problems because the data is too complex to extract effective information, resulting in poor learning results. In order to better focus on the abnormal conditions and development trends of energy consumption time series, the time series are first Z-standardized, and then the trend seasonality of the time series is decomposed using the moving average method for each time series, thereby obtaining the trend series data matrix X (1) , periodic sequence data matrix X (2) and the residual sequence data matrix X (3) For example, after decomposing the energy consumption time series of a certain point in a hospital, we can get Figure 3 Results shown.

[0101] Step 3: Constructing a graph matrix: Traditional machine learning methods are mostly single-view learning methods, which can only transform the trend sequence data matrix X (1) , periodic sequence data matrix X (2) and the residual sequence data matrix X (3) The three matrices are connected in series and combined into a large matrix X (sum) . Each view has unique statistical properties, and the concatenation operation ignores these differences. In contrast, multi-view learning introduces functions that model specific views and then jointly optimizes all of these functions. This approach helps to make full use of redundant views of the same input data and improve learning performance. The present invention focuses on mining the relationship between time series sequences for clustering. For this purpose, a multi-view clustering algorithm based on graph learning is selected, and then go to step 4.

[0102] Step 4: Select a multi-view clustering algorithm based on graph learning, such as Figure 4 As shown. The definition of the graph uses a Gaussian kernel function to define the graph. Given a data set ,Right now: (1) in, d is the length of the energy consumption curve; n is the number of tree nodes.

[0103] Given that using Euclidean distance as a measure of similarity between time series is insufficient because time series may be stretched and shifted, unlike methods such as Euclidean distance, the DTW distance algorithm is a method for measuring the distance between two time series, expressed as: (2) The DTW method takes into account the expansion and offset of the time series on the time axis, and replaces the Euclidean distance with the DTW distance, which is output to the Gaussian kernel function. Using the DTW distance as a similarity measure, a graph matrix is ​​constructed for the trend series, period series, and residual series. A graph is defined on each view to obtain a trend graph matrix. A (1) , periodogram matrix A (2) , residual graph matrix A (3) .

[0104] Based on the graph matrix, the clustering results are obtained and it is determined whether weights are given in advance. If weights are given, go to step 5; if not, go to step 6.

[0105] The specific process of obtaining clustering results based on the graph matrix is ​​as follows: (1) Predefined weights The weight of each graph is predefined, so the public graph is obtained directly ,in: μ (1) , μ (2) , μ (3) is the weight. S Input to a graph clustering algorithm, such as spectral clustering.

[0106] (2) No predefined weights If the weight of each graph is not defined, the following mathematical model is constructed to automatically select the appropriate weight and perform clustering.

[0107] (3) in, μ (v) Indicates v The weight of the view, A (v) Indicates v Similarity graph of views, S represents a public graph, L S express S The Laplace matrix of F express S Spectrum; v Indicates v Views, v The value range is 1- m . R n×c middle, c is the number of clusters set in advance, n is the number of tree nodes.

[0108] Step 5: Get the public graph S , input into the clustering algorithm (spectral clustering) to obtain the clustering result, and go to step 7. The process of the spectral clustering algorithm is as follows: Given a dataset ,in, d is the length of the energy consumption curve, n is the number of tree nodes, c is the number of clusters, the process of spectral clustering algorithm is as follows: 1. Constructing similarity graphs by graph learning methods A .

[0109] 2. Constructing the degree matrix D (diagonal matrix), the diagonal i Elements .

[0110] 3. Calculate the Laplacian matrix L = DA .

[0111] 4. Solve the optimization problem (4) to obtain a low-dimensional representation F ,right F K-means clustering by row, tr( X ) represents the matrix X Trace of.

[0112] (4) Step 6: Establish a data model clustering algorithm, and then use the alternating minimization algorithm (AM algorithm) to solve the model, and then go to step 7.

[0113] Step 7: Select the required evaluation indicators on site, such as trend indicators or abnormal indicators, and then automatically combine the factor library to output possible factors, and go to step 8.

[0114] Step 8: Achieve a closed loop of the factor library. Continuously compare the feedback from on-site operation and maintenance personnel with the actual energy consumption data, and continuously learn and update the factor library to improve its accuracy in explaining changes in the energy consumption curve.

[0115] In step 3 of this embodiment, an experiment with predefined weights is selected, taking the random experiment of the Fuyang project as an example.

[0116] Randomly select 6 time series for algorithm experiments, give the trend chart a larger weight, focus on the trend, set the cluster number to 3, such as Figure 5 As shown, where: Cluster 0: Decrease*2. Possible reasons for the decrease: 1. The hospital replaces old equipment or the hospital's business volume decreases, reducing the use of equipment; 2. Improving energy-saving awareness.

[0117] Cluster 1: Rising*3 Possible reasons for the rise: 1. Increase in hospital business volume, gradually increasing equipment usage; 2. Sudden start-up of equipment.

[0118] Cluster 2: No obvious*1 Possible cause: General situation.

[0119] Give the residual graph a larger weight, focus on anomalies, and set the cluster number to 2, such as Figure 6 As shown, where: Cluster 0: There is little possibility of an exception*2 Possible cause: Common situation.

[0120] Cluster 1: Abnormality may occur*4 Possible reasons: 1. The hospital holds a large academic conference or event; 2. Startup and shutdown of large medical equipment.

[0121] Example 3 Based on the design of Example 2, the specific process of using the alternating minimization algorithm (AM algorithm) in step 7 to solve the model shown in equation (3) is as follows: 1. The steps to establish a data model are as follows: The key to graph-based multi-view clustering is to learn a common graph with consistency. S , which can be expressed as: (5) in, A (v) is a similarity graph. Given that the effective information contained in each view is different, it is more reasonable to assign different weights to each view, thus obtaining: (6) The present invention uses an inverse distance weighting strategy to define μ (v) : (7) Considering graph fusion and spectral clustering, the following clustering algorithm has the following objective function: (8) (II) The solution steps are as follows: Step 1: Fix μ (v) , F , solve S can be transformed into: (9) Remember the matrix U Elements , expanded as follows: (10) because S Each column of is independent and can be solved component by component. S (:,j) , which can be expressed as: (11) Then transform formula (11) as follows: (12) remember , formula (12) is: (13) The Lagrangian function of formula (13) is as follows: (14) in, and is the corresponding Lagrange multiplier, let is the optimal solution of equation (14) and the corresponding Lagrange multiplier is and , according to the KKT condition: (15) Combination , from formula (15) we can get (16) Substituting formula (16) into formula (15), we can obtain: (17) remember , , formula (17) can be transformed into , we can expand it to get: (18) From equations (15)-(18), we can get: ,in , substituting into formula (18), we can get (19) Combining equations (17)-(19), we can obtain: , , if you get , you can get . Let the function ,in , apply Newton's method to find the functionf ( x ) , thus obtaining the optimal solution of formula (13) .

[0122] Step 2: Fix F , S , solve μ (v) That is, using the inverse distance weighted strategy, we can get: (20) Step 3: Fix S , μ (i) , solve F Right now: (twenty one) This is an eigenvalue problem. F For the matrix L Before c The matrix composed of the eigenvectors corresponding to the minimum eigenvalues ​​is then used for K-means clustering, as follows: Input: Number of views m ; Initial graph of multi-view data A (v) ;Number of clusters c ;parameter λ ; Maximum number of iterations N =300; Initialize the weight of each view ; Public pictures are ;Threshold . For iter = 1 : N do Updated by formula (12) S ; Updated by formula (20) μ (v) ; Updated by formula (21) F ; Calculate the objective function value obj ( iter ) If iter ≥2 and abs ( obj 2- obj 1)≤ then Break. End if End for In the spectrumF Perform K-means clustering on the above. Output: Clustering results Thus, the final clustering result is obtained and the clustering process is completed.

Claims

1. A clustering method based on time series, characterized in that: The following steps are involved: S1, establish connections with various energy consumption monitoring devices through the data middle platform module, collect hospital energy consumption data from various energy consumption monitoring devices at a set frequency, establish a tree model of hospital energy consumption data, and extract hospital energy consumption time series data of tree nodes from the tree model; S2, cluster analysis is performed by using different weight calibration methods through the algorithm platform module to obtain clustering results; S3, for the clustering results, selecting different evaluation methods through the evaluation system module to output corresponding evaluation content, wherein the evaluation content includes trend evaluation and abnormality evaluation; S4, for the output evaluation content, the factor library maintenance module automatically extracts the characteristics of the energy consumption curve, performs matching and benchmarking analysis with the existing factor library, identifies anomalies and trend problems, and outputs possible causes, which are output in descending order of likelihood; After the on-site operation and maintenance personnel inspect the site, the real factors will be entered and the factor library will be updated.

2. The clustering method based on time series according to claim 1, characterized in that: In step S1, the collected hospital energy consumption data includes three characteristics: random sudden peaks, gradual increase or decrease, and no obvious trend.

3. The clustering method based on time series according to claim 1, characterized in that: In step S1, the data middle platform module performs anomaly cleaning on the collected hospital energy consumption data to ensure the availability and stability of the data; the anomaly cleaning is performed in the data preprocessing stage using the IQR method to perform data cleaning.

4. The clustering method based on time series according to claim 1, characterized in that: In step S1, the energy consumption monitoring equipment includes at least a smart meter and a sensor.

5. The clustering method based on time series according to claim 1, characterized in that: In step S1, the energy consumption monitoring device is mounted under a tree node, and a tree model is designed in a top-down manner to facilitate retrieval and focus on tree nodes of interest.

6. The clustering method based on time series according to claim 1, characterized in that: In step S1, when extracting hospital energy consumption time series data from the tree model based on tree_id, we get n Time series data, that is n tree nodes, each time series data corresponds to an energy consumption curve, and the length of the energy consumption curve is expressed as d , then we get a data matrix .

7. The clustering method based on time series according to claim 1, characterized in that: In step S2, the specific process of the cluster analysis is: S201, performing Z-standardization on the extracted hospital energy consumption time series data; S202, performing trend seasonality decomposition on the extracted original hospital energy consumption time series data by using a moving average method, thereby obtaining a trend series data matrix, a period series data matrix, and a residual series data matrix; S203, constructing a trend graph matrix, a period graph matrix and a residual graph matrix according to the obtained trend sequence data matrix, period graph matrix and residual sequence data matrix, fusing the trend graph matrix, the period graph matrix and the residual graph matrix to obtain a consistent graph, applying a spectral clustering algorithm on the consistent graph to obtain a final clustering result.

8. The clustering method based on time series according to claim 7, characterized in that: In step S203, a multi-view clustering algorithm based on graph learning is used to define the graph using a Gaussian kernel function. Given a data set ,Right now: (1) in, d is the length of the energy consumption curve; n is the number of tree nodes; Using DTW distance as the similarity metric, we construct a graph matrix for the trend sequence, period sequence, and residual sequence, and define a graph on each view to obtain the trend graph matrix. A (1) , periodogram matrix A (2) , residual graph matrix A (3) .

9. The clustering method based on time series according to claim 7, characterized in that: In step S203, the specific process of obtaining the clustering result based on the graph matrix is ​​as follows: S2031. Predefined weights: The weights of each graph have been predefined, so the public graph can be obtained directly ,in μ (1) , μ (2) , μ (3) As weight, the public graph S Input into the graph clustering algorithm; S2032. No predefined weights: If the weights of each graph are not defined, the following mathematical model is constructed to automatically select appropriate weights and perform clustering: (3) in, μ (v) Indicates v The weight of the view, A (v) Indicates v Similarity graph of views, S represents a public graph, L S express S The Laplace matrix of F express S Spectrum; v Indicates v Views, v The value range is 1- m ; c is the number of clusters set in advance, n is the number of tree nodes; Then the alternating minimization algorithm is used to solve equation (3), and then K-means clustering is performed to obtain the final clustering result.

10. The clustering method based on time series according to claim 1, characterized in that: In step S3, the trend evaluation is to obtain the number of different trends by analyzing the energy consumption trend curve, specifically: S301, for each cluster in the clustering result, analyzing its energy consumption trend curve, and using a linear regression method to model the trend portion of the curve; S302, if the slope is significantly greater than 0, the trend is rising; If it is significantly less than 0, the trend is downward; If it is close to 0, the trend is not obvious; S303, repeating steps S301-302, counting the number of different trends in the cluster, and automatically outputting the evaluation content.

11. The clustering method based on time series according to claim 1, characterized in that: In step S3, the anomaly evaluation is to obtain the anomaly score statistics by means of the isolation forest, specifically: S311, for each cluster, analyze the energy consumption residual curve in the cluster; use the isolation forest to detect abnormal energy consumption residuals, and set an abnormal threshold; when the residual at a certain time point is less than the abnormal threshold, it is determined that the energy consumption of the tree node may be abnormal; S312, repeating step S311, counting whether the energy consumption residual curve in the cluster is likely to be abnormal, and automatically outputting evaluation content, the output evaluation content at least including: almost no abnormality is likely to occur, and abnormality is likely to occur.

12. The clustering method based on time series according to claim 1, characterized in that: In step S4, the DTW distance is used as a similarity measure to perform a similarity calculation between the energy consumption curve that needs to output the factor and the storage energy consumption curve, and the real factor corresponding to the storage energy consumption curve with a higher similarity ranking is calculated. The same factors are accumulated and pushed to the factor library maintenance module; the factor library maintenance module outputs the factors that are most likely to cause changes in the energy consumption curve in order from high to low probability based on the pushed matching results.

13. A clustering system based on time series, based on the clustering method based on time series according to any one of claims 1 to 12, characterized in that: Includes the following modules: The data center module is used to establish connections with various energy consumption monitoring devices, collect hospital energy consumption data and perform abnormal cleaning, build a tree model of hospital energy consumption data, and extract hospital energy consumption time series data of tree nodes from the tree model; The algorithm platform module is used to construct a clustering model for the extracted hospital energy consumption time series data, perform clustering analysis on the extracted hospital energy consumption time series data, obtain clustering results, and obtain clustering labels for all extracted hospital energy consumption time series data through the clustering results; The evaluation system module is used to evaluate the clustering results and output the corresponding evaluation content through different evaluation methods so that the operation and maintenance personnel can check and explore energy-saving points; The factor library maintenance module is used to store energy consumption factors to form a factor library, and to match the energy consumption curve characteristics in the clustering results with the pre-set factor library to automatically identify and explain the anomalies and trend changes in the energy consumption curve, and output the most likely reasons for the occurrence of energy consumption problems.

14. The clustering system based on time series according to claim 13, characterized in that: The factor library formed in the factor library maintenance module includes a factor library of gradually increasing energy consumption curve, a factor library of gradually decreasing energy consumption curve, and a factor library of sudden energy consumption curve; wherein: The energy consumption factors in the preset energy consumption curve gradually rising factor library include: 1) The hospital has introduced new advanced medical equipment or expanded its diagnosis and treatment scale; 2) As the scope of hospital services expands, the number of patients continues to increase, and the frequency of use of various types of equipment increases; 3) Developing new medical technologies or treatment projects requires more energy support; 4) The hospital's social security system is outdated and its operating efficiency is gradually declining; 5) When summer or winter comes, the energy consumption of air conditioning increases; The energy consumption factors in the preset energy consumption curve gradually decreasing factor library include: 1) Energy-saving measures taken include at least: optimizing equipment operation time and improving energy efficiency; 2) Update old equipment and adopt new equipment to reduce energy consumption; 3) Strengthen energy management; The energy consumption factors in the preset energy consumption curve mutation factor library include: 1) The possibility of a sudden emergency surgery causing a specific medical device to be overloaded instantly; 2) Sudden failure of medical equipment will consume a lot of energy during the repair process, which will lead to a sharp increase in energy consumption; 3) In case of emergencies, the activation of emergency systems will cause energy consumption to surge instantly; 4) Temporary addition of equipment and personnel will cause a sudden increase in energy consumption; 5) The influence of external factors causes the hospital's backup power system to be activated.

15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the time series based clustering method described in any one of claims 1 to 12 are implemented.

16. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the time series based clustering method described in any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Electricity consumption analysis method and system based on machine learning, and electronic equipment

    CN116894687A

  • Hospital comprehensive energy boundary identification method and system based on online change point detection

    CN117668700A

  • Graph-based vehicle route optimization with vehicle capacity clustering

    US20230304806A1

Cited By

  • Hydrogen compressor state monitoring method based on vibration parameters

    CN120100706A

  • Sensor network monitoring method, system and equipment based on industrial Internet of Things

    CN121814634A