A business work cycle analysis method and device, electronic equipment and storage medium
By using CAADTW and K-means clustering, combined with adaptive dynamic time warping metric, the accuracy and multi-time dimension recognition problems of enterprise work pattern identification in existing technologies are solved, achieving more accurate enterprise work cycle analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTH CHINA NORMAL UNIV
- Filing Date
- 2022-07-22
- Publication Date
- 2026-07-24
AI Technical Summary
Existing methods for identifying enterprise work patterns cannot take into account both the amplitude and shape changes of enterprise electricity consumption data, and enterprise work cycle analysis usually only includes a single time dimension, which cannot reflect work cycle changes over a long period of time.
CAADTW is used as the distance metric between load curves. Typical daily working patterns are identified through K-means clustering and adaptive dynamic time warping metric. Multi-time-dimensional periodicity identification is achieved through working pattern sequence analysis.
It improves the clustering effect of daily load curves, enhances the representativeness of typical daily work patterns, and enables clear identification of enterprise production information and its changing patterns across multiple time dimensions.
Smart Images

Figure CN115345754B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power data analysis technology, and in particular to a method, apparatus, electronic device, and storage medium for analyzing enterprise work cycles. Background Technology
[0002] Understanding a company through its electricity data is a quick and convenient method that has long been used in bank risk control systems. For example, electricity consumption is used to determine a company's production scale, and electricity bills are used to assess cash flow. With the rapid development of the power and information industries, lower-cost, more accurate, and more timely methods have become possible. Among these, company work patterns and work cycles, as important characteristics that directly reflect a company's operating status, have attracted widespread research. In 2021, Wan Kai et al. proposed a method and system for identifying the status of company work stoppages and resumptions. This method uses electricity consumption trend data from holidays and periods before and after holidays to determine whether a company has experienced work stoppages or resumptions. Also in 2021, Huishi Liang et al. proposed a method for identifying user work cycles with a weekly time period by constructing a dictionary of daily electricity consumption patterns using a clustering method based on improved Dynamic Time Warping (DTW), and then analyzing these patterns.
[0003] However, existing unsupervised methods for identifying enterprise work patterns typically involve clustering processes. The effectiveness of clustering algorithms is directly affected by the selected similarity metric for electricity consumption data. Currently used similarity metrics such as Euclidean Distance (ED) or DTW and their variants can only focus on the amplitude or shape changes of enterprise electricity consumption data, and usually cannot take both into account. At the same time, existing enterprise work cycle analysis methods usually only include a single time dimension cycle, such as a daily cycle or a weekly cycle, and cannot reflect work cycle changes over a long time dimension. Summary of the Invention
[0004] Based on this, the purpose of this invention is to provide a method, apparatus, electronic device, and storage medium for analyzing enterprise work cycles. By using CAADTW as a distance metric between load curves, the clustering effect of daily load curves is improved, enhancing the representativeness of typical daily work patterns in enterprises. Subsequently, by analyzing the work pattern sequence, multi-time-dimensional cycle identification of enterprises is achieved, making the production information and its changing patterns in multiple time dimensions clearer.
[0005] In a first aspect, the present invention provides a method for analyzing enterprise work cycles, comprising the following steps:
[0006] Obtain the enterprise's power data to be analyzed; The enterprise's power data is preprocessed to obtain a daily load curve with a specific sampling frequency; K-means clustering is performed on the daily load curve to obtain k subclasses and the class label to which the daily load curve belongs; The cluster centers of k subclasses are extracted to obtain the typical daily working pattern. The class labels are arranged according to their corresponding daily load curves to obtain the working pattern sequence. The work status of the typical daily work patterns is determined, and the work cycle of the work pattern sequence is analyzed to obtain the enterprise work cycle under five time dimensions: year, quarter, month, week, and day.
[0007] Furthermore, K-means clustering is performed on the daily load curves to obtain k subclasses and the class labels to which the daily load curves belong, including: S31: Determine the optimal number of clusters K, which means that there are K typical daily work models for this company. K typical daily work models can be used to approximate the daily work patterns that have occurred in the company over D days. S32: Use the K-means++ method to initialize cluster centers, and find K relatively dispersed initial cluster centers based on random seeds; S33: Based on the adaptive dynamic time warping metric method that considers amplitude, calculate the distance between D daily load curves and K cluster centers, and then divide the D daily load curves into K classes according to the distance; S34: Calculate the cluster center for each class; S35: Calculate the change between the cluster center and the original cluster center. When the change is less than or equal to a specified threshold or the total number of iterations reaches a set number, output the clustering result and cluster center; otherwise, iteratively execute steps S33-S35 until the change is less than or equal to the specified threshold or the total number of iterations reaches a set number.
[0008] Furthermore, based on an adaptive dynamic time warping metric that considers amplitude, the distances between D daily load curves and K cluster centers are calculated, including: Calculate the daily load curve using the following formula. Daily load curve CAADTW distance between:
[0009]
[0010]
[0011] in, Represents the daily load curve Daily load curve The CAADTW distance between them; They represent and Length; Representing the daily load curves The Point and daily load curve The point; This represents the CAADTW distance between two points; express The basic distance between them; This represents the expansion function, used to control... The expansion; This indicates finding the minimum value; express Weighted ED between; and are hyperparameters, representing the weighted threshold and distance weight, respectively.
[0012] Furthermore, the work status is determined for the typical daily work pattern, including: The K typical daily work patterns are subjected to piecewise aggregation approximation and discretization processing to obtain interval-stationary typical daily work patterns; among them, the subclass with the lowest mean is almost entirely composed of non-working day load curves, and its corresponding PAA cluster center is denoted as . The remaining classes are almost all composed of weekday load curves, and their corresponding cluster centers after PAA are denoted as follows, in ascending order of their means: to , to All dimensions are Each value represents the average load of the enterprise at the corresponding time. Using cluster centers to Subtract respectively ,get to Then calculate in chronological order. to The first step point yields the corresponding time point. to Find to Corresponding time point to The minimum load value is denoted as the minimum operating load. ; by Using a threshold as a guideline, points greater than or equal to the threshold in a typical daily work pattern are recorded as working states, and points less than the threshold are recorded as non-working states, resulting in working states in 30-minute units. to , dimension Each value represents the company's working status at the corresponding time. A comprehensive analysis of K typical daily work patterns to and their respective working states. to This yields the company's daily work cycle, specifically including the company's daily production level, working hours, and work patterns.
[0013] Furthermore, the feature is that it performs work cycle analysis on the work mode sequence, including: The typical daily work patterns are sorted by average value, and the corresponding class labels are denoted as follows: to ,in, Consider it a non-working day work mode label. to The labels are considered as a range of production capacity working modes from low to high, thus yielding the class label of the daily load curve. This label represents the most typical daily working mode that best fits the current day. Arrange the class labels according to the dates of the daily load curve to obtain the working mode sequence. This sequence contains to There are K labels in total, representing the changes in the daily work patterns of the company over D days; The work pattern sequence is segmented and analyzed according to a preset cycle to obtain the enterprise cycle work pattern sequence; the enterprise cycle work pattern is analyzed to obtain the enterprise work cycle under five time dimensions: year, quarter, month, week, and day.
[0014] Furthermore, the enterprise's power data is preprocessed to obtain a daily load curve with a specific sampling frequency, including: The enterprise's power data is segmented to obtain daily load data; The daily load data was processed using 3 Outlier detection is performed using the interquartile range of the principle or box plot, and identified outliers are treated as missing values. Missing values are filled into the daily load curve by using the mean of the values before and after the missing values, resulting in a daily load curve with stable frequency.
[0015] Furthermore, the preprocessing of the enterprise's power data to obtain a daily load curve with a specific sampling frequency also includes: The frequency-stable daily load curve is downsampled to 2 times / hour to obtain a dimension of The data represents a certain enterprise The load data is sampled twice per hour, and each value represents the average load of the enterprise within half an hour.
[0016] Secondly, the present invention also provides an enterprise work cycle analysis device, comprising: The power data acquisition module is used to acquire the enterprise's power data to be analyzed. The preprocessing module is used to preprocess the enterprise's power data to obtain a daily load curve with a specific sampling frequency; The clustering module is used to perform K-means clustering on the daily load curve to obtain k subclasses and the class label to which the daily load curve belongs; The working mode sequence calculation module is used to extract the cluster centers of k subclasses to obtain typical daily working modes, and arrange the class labels according to their corresponding daily load curves to obtain the working mode sequence. The enterprise work cycle analysis module is used to determine the work status of the typical daily work patterns, perform work cycle analysis on the work pattern sequence, and obtain the enterprise work cycle under five time dimensions: year, quarter, month, week, and day.
[0017] Thirdly, the present invention also provides an electronic device, comprising: At least one memory and at least one processor; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the at least one processor performs the steps of an enterprise work cycle analysis method as described in any of the first aspects of the present invention.
[0018] Fourthly, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of an enterprise work cycle analysis method as described in any of the first aspects of the present invention.
[0019] This invention provides a method, apparatus, electronic device, and storage medium for analyzing enterprise work cycles. By using CAADTW as a distance metric between load curves, the clustering effect of daily load curves is improved, enhancing the representativeness of typical daily work patterns in enterprises. Subsequently, by analyzing the work pattern sequence, multi-time-dimensional cycle identification of enterprises is achieved, making the production information and its changing patterns in multiple time dimensions clearer.
[0020] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description
[0021] Figure 1 A schematic diagram illustrating the steps of an enterprise work cycle analysis method provided by the present invention; Figure 2 This is a schematic diagram of the clustering method used in one embodiment of the present invention; Figure 3 To cluster 210 days of electricity data from a company in Guangdong using four metrics—ED, DTW, CAADTW, and Soft-DTW—the experimental results of obtaining cluster centers using DBA are illustrated in the diagram. Figure 4 This is a flowchart of an enterprise work cycle identification method based on power data used in one embodiment of the present invention; Figure 5 The present invention provides a schematic diagram of the structure of an enterprise work cycle analysis device. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0023] It should be understood that the described embodiments are merely some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of the embodiments of this application.
[0024] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the embodiments of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0025] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims. In the description of this application, it should be understood that the terms "first," "second," "third," etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0026] Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0027] To address the problems in the background art, embodiments of this application provide a method for enterprise work cycle analysis, such as... Figure 1 As shown, the method includes the following steps: S01: Obtain the enterprise's power data to be analyzed.
[0028] The main power data used in this invention is the continuous load data of a single enterprise over a period of time, along with the start date of the corresponding time period. The load data is required to have a fixed collection frequency within a single natural day, with a sampling frequency of at least 2 times per hour. The data is automatically collected by smart meters and then uploaded to the database.
[0029] S02: Preprocess the enterprise's power data to obtain a daily load curve with a specific sampling frequency.
[0030] Since the sampling frequency of the input raw data is different, and there may be problems such as data anomalies and data missing due to damage to the acquisition hardware and transmission network delays, the raw data needs to be preprocessed, which includes four steps: data segmentation, outlier handling, missing value imputation, and downsampling.
[0031] Let the number of days covered by the original data be... , No. The sampling frequency of the day is If the data is processed per hour, then the dimensions of the original data are: Since the minimum working cycle involved in this invention is a single day, the original data needs to be segmented by single day, resulting in a data dimension of 1 / 2. .
[0032] After data segmentation, daily load data is obtained. The daily load data is then processed using a 3x3 algorithm. Outlier detection is performed using the interquartile range (IQR) of the box plot or the principle, and the identified outliers are treated as missing values.
[0033] After outlier handling, the missing values are filled into the daily load curve by averaging the values before and after the missing values, resulting in a daily load curve with stable frequency.
[0034] Since commuting times are typically half-hourly or hourly, the minimum time unit for judging work status should be 30 minutes, corresponding to a sampling frequency of 2 times / hour. After filling in missing values, the data is downsampled to 2 times / hour to complete data preprocessing. The preprocessed data dimensions become... , indicating a certain enterprise The load data is sampled twice per hour, and each value represents the average load of the enterprise within half an hour.
[0035] S03: Perform K-means clustering on the daily load curve to obtain k subclasses and the class label to which the daily load curve belongs.
[0036] This invention employs the K-means clustering method to automatically classify daily workload curves for enterprises. By calculating the cluster centers of each class, a typical daily work model is obtained. Then, the class labels of the daily workload curves are arranged by date to obtain a work pattern sequence. For example, Figure 2 As shown, the clustering process includes the following sub-steps: S31: Determine the optimal number of clusters K, which means that there are K typical daily work models for this company, and K typical daily work models can be used to approximate the daily work patterns that have occurred in the company over D days.
[0037] In a preferred embodiment, the Elbow Method is used to automatically find the optimal number of clusters K.
[0038] S32: Use the K-means++ method to initialize cluster centers, and find K relatively dispersed initial cluster centers based on random seeds.
[0039] In other embodiments, hierarchical clustering, fuzzy C-means clustering, deep clustering, and other methods can be used to replace K-means clustering.
[0040] S33: Based on the adaptive dynamic time warping metric method that takes into account the amplitude, calculate the distance between D daily load curves and K cluster centers, and then divide the D daily load curves into K classes according to the distance.
[0041] Specifically, the daily load curve is calculated using the following formula. Daily load curve CAADTW distance between:
[0042]
[0043]
[0044] in, Represents the daily load curve Daily load curve The CAADTW distance between them, CAADTW is a modified DTW used in this invention to quantify the differences between daily load curves. It is an improved distance measurement method of this invention—Adaptive Dynamic Time Warping Considering Amplitude (CAADTW)—to calculate the distance between D daily load curves and K cluster centers. They represent and Length; Representing the daily load curves The Point and daily load curve The point; This represents the CAADTW distance between two points; express The basic distance between them; This represents the expansion function, used to control... The expansion; This indicates finding the minimum value; express Weighted ED between; and are hyperparameters, representing the weighted threshold and distance weight, respectively.
[0045] Since DTW always tends to choose the shortest path, the inflation function It can and The amplification of distances during scaling causes CAADTW to always tend to choose paths with less scaling, thus effectively reducing ill-conditioned scaling in DTW; simultaneously, due to the expansion function and The adaptive limitation of the stretching length is within a certain range, so calculations can be performed within this range to obtain the result. and The CAADTW algorithm between these values significantly reduces computation time. To effectively identify non-working modes of enterprises, this invention uses weighted ED to increase the distance between low-load intervals, thereby increasing the distinction between low-load values and improving the clustering algorithm's ability to differentiate between low-load values.
[0046] In other embodiments, other variants of the DTW algorithm or methods such as kernel functions and autoencoders can be used to perform distance measurement after feature extraction, in order to replace CAADTW.
[0047] S34: Calculate the cluster center for each class.
[0048] Preferably, the DTW Barycenter Averaging (DBA) algorithm is used to calculate the cluster centers of each class. Since the shape of the cluster centers calculated by ED averaging is not sufficiently similar to the shape of the curves in the class, the representativeness of the cluster centers is not good enough; while calculating the cluster centers using CAADTW is highly complex. Therefore, the iterative approximation algorithm DBA is used to calculate the cluster centers, achieving a balance between computational complexity and the representativeness of the cluster centers.
[0049] S35: Calculate the change between the cluster center and the original cluster center. When the change is less than or equal to a specified threshold or the total number of iterations reaches a set number, output the clustering result and cluster center; otherwise, iteratively execute steps S33-S35 until the change is less than or equal to the specified threshold or the total number of iterations reaches a set number.
[0050] In a specific embodiment, such as Figure 3 As shown, after step S03, K classes and corresponding K cluster centers are obtained. Here, 210 days of electricity data of a company in Guangdong are clustered using four measurement methods: ED, DTW, CAADTW, and Soft-DTW. The cluster centers are obtained using DBA.
[0051] Depend on Figure 3 It is evident that ED, DTW, and Soft-DTW do not possess good low-load interval identification capabilities. These three metrics naturally focus on medium-to-high load intervals with larger amplitude differences. CAADTW, however, benefits from the weighted ED in low-load intervals, exhibiting stronger low-load interval discrimination capabilities. Furthermore, since CAADTW can effectively reduce ill-conditioned scaling in DTW, it can find more reasonable sequence alignment methods, improve clustering capabilities, effectively reduce intra-cluster distances, and make the cluster centers more representative.
[0052] S04: Extract the cluster centers of k subclasses to obtain typical daily working patterns, and arrange the class labels according to their corresponding daily load curves to obtain a working pattern sequence.
[0053] The K cluster centers obtained in step S03 are the K typical daily work patterns, which means that the daily work patterns of the company over the past D days can be approximately summarized into these K typical daily work patterns. By analyzing these patterns, the daily work regularity of the company over the past D days can be determined.
[0054] S05: Perform work status identification on the typical daily work patterns respectively, and perform work cycle analysis on the work pattern sequence to obtain the enterprise work cycle under five time dimensions: year, quarter, month, week, and day.
[0055] In a preferred embodiment, determining the working status of the typical daily work pattern includes the following sub-steps: S0511: The K typical daily work patterns are subjected to piecewise aggregation approximation and discretization processing respectively to obtain the typical daily work patterns with interval stability; among them, the subclass with the lowest mean is almost composed of non-working day load curves, and its corresponding PAA cluster center is denoted as . The remaining classes are almost all composed of weekday load curves, and their corresponding cluster centers after PAA are denoted as follows, in ascending order of their means: to , to All dimensions are Each value represents the average load of the enterprise at the corresponding time. S0512: Using cluster centers to Subtract respectively ,get to Then calculate in chronological order. to The first step point yields the corresponding time point. to Find to Corresponding time point to The minimum load value is denoted as the minimum operating load. ; S0513: with Using a threshold as a guideline, points greater than or equal to the threshold in a typical daily work pattern are recorded as working states, and points less than the threshold are recorded as non-working states, resulting in working states in 30-minute units. to , dimension Each value represents the company's working status at the corresponding time. S0514: Combining K typical daily work patterns to and their respective working states. to This yields the company's daily work cycle, specifically including the company's daily production level, working hours, and work patterns.
[0056] Preferably, the work cycle analysis of the work mode sequence includes the following sub-steps: S0521: Sort typical daily work patterns by average value, and label the corresponding classes as follows: to ,in, Consider it a non-working day work mode label. to The labels are arranged from low to high capacity working modes, thus obtaining the class label of the daily load curve. This label represents the most typical daily working mode that best fits the current day. S0522: Arrange the class tags according to the dates of the daily load curve to obtain the working mode sequence. This sequence contains... to There are K labels in total, representing the changes in the daily work patterns of the company over D days; S0523: The work pattern sequence is divided and analyzed according to a preset cycle to obtain the enterprise cycle work pattern sequence; the enterprise cycle work pattern is analyzed to obtain the enterprise work cycle under five time dimensions: year, quarter, month, week and day.
[0057] Specifically, such as Figure 4 As shown, by segmenting and analyzing the work pattern sequence by week / month, we can obtain the company's weekly / monthly work pattern sequence. Analyzing this sequence yields the company's weekly / monthly work cycle, which includes information on the company's weekly / monthly work patterns, such as single or double weekends, as well as weekly / monthly production information, such as the number of working days, working hours, daily production levels, and the percentage of high-capacity days. Aggregating the company's monthly work cycle by quarter yields the company's quarterly work cycle, which includes production information for the quarter, such as the total number of working days, total working hours, and the percentage of high-capacity days, as well as information on changes in the company's production cycle for the quarter, such as changes in average daily working hours, weekly work cycle, and monthly work cycle. Based on the company's quarterly work cycles within a year, we can obtain the company's annual work cycle, which includes production information such as average daily working hours, number of working days, and the percentage of days at each level of capacity, as well as information on changes in shorter production cycles, such as peak and off-peak seasons and capacity change curves.
[0058] This invention provides a method for analyzing enterprise work cycles, proposing an adaptive dynamic time warping (CAADTW) metric that considers amplitude and a method for multi-time-dimensional cycle identification based on work pattern sequences. By using CAADTW as a distance metric between load curves, the clustering effect of daily load curves is improved, enhancing the representativeness of typical daily work patterns in the enterprise. Subsequently, by analyzing the work pattern sequences, multi-time-dimensional cycle identification of the enterprise is achieved, making the enterprise's production information and its changing patterns clearer across multiple time dimensions.
[0059] This application also provides an enterprise work cycle analysis device, such as... Figure 5 As shown, the enterprise work cycle analysis device 400 includes: The power data acquisition module 401 is used to acquire the enterprise's power data to be analyzed. Preprocessing module 402 is used to preprocess the enterprise's power data to obtain a daily load curve with a specific sampling frequency; Clustering module 403 is used to perform K-means clustering on the daily load curve to obtain k subclasses and the class label to which the daily load curve belongs; The working mode sequence calculation module 404 is used to extract the cluster centers of k subclasses to obtain the typical daily working mode, and arrange the class labels according to their corresponding daily load curves to obtain the working mode sequence. The enterprise work cycle analysis module 405 is used to determine the work status of the typical daily work pattern, perform work cycle analysis on the work pattern sequence, and obtain the enterprise work cycle under five time dimensions: year, quarter, month, week, and day.
[0060] Preferably, the clustering module includes: The optimal cluster number determination unit is used to determine the optimal cluster number K, which means that there are K types of typical daily work models for this enterprise, and the daily work patterns that have occurred in the enterprise in D days can be approximated by K typical daily work models. The cluster center initialization unit is used to initialize cluster centers using the K-means++ method, finding K relatively dispersed initial cluster centers based on a random seed; The distance metric unit is used to calculate the distance between D daily load curves and K cluster centers according to the adaptive dynamic time warping metric method that takes into account the amplitude, and then divide the D daily load curves into K classes based on the distance; Cluster center calculation unit, used to calculate the cluster center of each class; The clustering result output unit is used to calculate the change between the cluster center and the original cluster center. When the change is less than or equal to a specified threshold or the total number of iterations reaches a set number, the clustering result and cluster center are output; otherwise, steps S33-S35 are executed iteratively until the change is less than or equal to the specified threshold or the total number of iterations reaches a set number.
[0061] Preferably, the distance measurement unit uses the following formula to calculate the daily load curve. Daily load curve CAADTW distance between:
[0062]
[0063]
[0064] in, Represents the daily load curve Daily load curve The CAADTW distance between them; They represent and Length; Representing the daily load curves The Point and daily load curve The point; This represents the CAADTW distance between two points; express The basic distance between them; This represents the expansion function, used to control... The expansion; This indicates finding the minimum value; express Weighted ED between; and are hyperparameters, representing the weighted threshold and distance weight, respectively.
[0065] Preferably, the enterprise work cycle analysis module includes: The typical daily work pattern acquisition unit is used to perform piecewise aggregation approximation and discretization processing on the K typical daily work patterns to obtain the interval-stationary typical daily work patterns; among them, the subclass with the lowest mean is almost entirely composed of non-working day load curves, and its corresponding cluster center after PAA is denoted as . The remaining classes are almost all composed of weekday load curves, and their corresponding cluster centers after PAA are denoted as follows, in ascending order of their means: to , to All dimensions are Each value represents the average load of the enterprise at the corresponding time. Minimum start-up load calculation unit, used with cluster centers to Subtract respectively ,get to Then calculate in chronological order. to The first step point yields the corresponding time point. to Find to Corresponding time point to The minimum load value is denoted as the minimum operating load. ; Working status calculation unit, used for... Using a threshold as a guideline, points greater than or equal to the threshold in a typical daily work pattern are recorded as working states, and points less than the threshold are recorded as non-working states, resulting in working states in 30-minute units. to , dimension Each value represents the company's working status at the corresponding time. The enterprise daily work cycle calculation unit is used to integrate K typical daily work patterns. to and their respective working states. to This yields the company's daily work cycle, specifically including the company's daily production level, working hours, and work patterns.
[0066] Preferably, the enterprise work cycle analysis module also includes: The class label acquisition unit is used to sort typical daily work patterns by average value, and the corresponding class labels are denoted as follows: to ,in, Consider it a non-working day work mode label. to The labels are arranged from low to high capacity working modes, thus obtaining the class label of the daily load curve. This label represents the most typical daily working mode that best fits the current day. The work mode sequence calculation unit is used to arrange the class labels according to the dates of the daily load curve to obtain the work mode sequence. This sequence contains... to There are K labels in total, representing the changes in the daily work patterns of the company over D days; The enterprise cycle work pattern sequence analysis unit is used to cut and analyze the work pattern sequence according to a preset cycle to obtain the enterprise cycle work pattern sequence; the enterprise cycle work pattern sequence is analyzed to obtain the enterprise work cycle under five time dimensions: year, quarter, month, week, and day.
[0067] Preferably, the preprocessing module includes: A data segmentation unit is used to perform data segmentation processing on the enterprise's power data to obtain daily load data; An outlier processing unit is used to process the daily load data using 3D methods. Outlier detection is performed using the interquartile range of the principle or box plot, and identified outliers are treated as missing values. The missing value filling unit is used to fill the missing value in the daily load curve by using the average of the values before and after the missing value, so as to obtain a daily load curve with stable frequency.
[0068] Preferably, the preprocessing module further includes: The downsampling unit is used to downsample the frequency-stable daily load curve to twice per hour, obtaining a dimension of The data represents a certain enterprise The load data is sampled twice per hour, and each value represents the average load of the enterprise within half an hour.
[0069] For the apparatus embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The apparatus embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0070] This application also provides an electronic device, including: At least one memory and at least one processor; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the at least one processor performs the steps of the enterprise work cycle analysis method as described above.
[0071] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0072] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the enterprise work cycle analysis method described above.
[0073] Computer storage media include permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0074] This invention provides a method, apparatus, electronic device, and storage medium for enterprise work cycle analysis, which solves the problem of insufficient accuracy in existing enterprise work mode identification based on unlabeled power data, achieving more accurate enterprise work mode identification, especially non-work mode identification. It also addresses the issue of the single-dimensionality of existing enterprise work cycle identification results based on power data, enabling multi-time-dimensional identification that considers both long and short cycles.
[0075] By using CAADTW as a distance metric between load curves, the clustering effect of daily load curves is improved, enhancing the representativeness of typical daily work patterns in enterprises. Subsequently, by analyzing the work pattern sequence, the enterprise's multi-time-dimensional periodic identification is achieved, making the enterprise's production information and its changing patterns clearer across multiple time dimensions.
[0076] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A method for analyzing enterprise work cycles, characterized in that, Includes the following steps: Obtain the enterprise's power data to be analyzed; The enterprise's power data is preprocessed to obtain a daily load curve with a specific sampling frequency; the daily load curve with a specific sampling frequency is a daily load curve with a sampling frequency of greater than or equal to 2 times / hour. K-means clustering is performed on the daily load curve to obtain k subclasses and the class label to which the daily load curve belongs; Based on the adaptive dynamic time warping metric that considers amplitude, the distances between the D daily load curves and the K cluster centers are calculated as follows: Calculate the daily load curve using the following formula. Daily load curve CAADTW distance between: in, Represents the daily load curve Daily load curve The CAADTW distance between them; They represent and Length; Representing the daily load curves The Point and daily load curve The point; This represents the CAADTW distance between two points; express The basic distance between them; This represents the expansion function, used to control... The expansion; This indicates finding the minimum value; express Weighted ED between; and These are hyperparameters, representing the weighted threshold and distance weight, respectively; The cluster centers of k subclasses are extracted to obtain the typical daily working pattern. The class labels are arranged according to their corresponding daily load curves to obtain the working pattern sequence. The work status of the typical daily work patterns is determined, and the work cycle of the work pattern sequence is analyzed to obtain the enterprise work cycle under five time dimensions: year, quarter, month, week, and day.
2. The enterprise work cycle analysis method according to claim 1, characterized in that, K-means clustering is performed on the daily load curves to obtain k subclasses and the class labels to which the daily load curves belong, including: S31: Determine the optimal number of clusters K, which means that there are K typical daily work models for this company. K typical daily work models can be used to approximate the daily work patterns that have occurred in the company over D days. S32: Use the K-means++ method to initialize cluster centers, and find K relatively dispersed initial cluster centers based on random seeds; S33: Based on the adaptive dynamic time warping metric method that considers amplitude, calculate the distance between D daily load curves and K cluster centers, and then divide the D daily load curves into K classes according to the distance; S34: Calculate the cluster center for each class; S35: Calculate the change between the cluster center and the original cluster center. When the change is less than or equal to a specified threshold or the total number of iterations reaches a set number, output the clustering result and cluster center; otherwise, iteratively execute steps S33-S35 until the change is less than or equal to the specified threshold or the total number of iterations reaches a set number.
3. The enterprise work cycle analysis method according to claim 1, characterized in that, The work status is determined for the typical daily work pattern, including: Piecewise aggregation approximation and discretization are performed on K typical daily work patterns to obtain interval-stationary typical daily work patterns. The subclass with the lowest mean is almost entirely composed of non-working day load curves, and its corresponding PAA cluster center is denoted as […]. The remaining classes are almost all composed of weekday load curves, and their corresponding cluster centers after PAA are denoted as follows, in ascending order of their means: to , to All dimensions are Each value represents the average load of the enterprise at the corresponding time. Using cluster centers to Subtract respectively ,get to Then calculate in chronological order. to The first step point yields the corresponding time point. to Find to Corresponding time point to The minimum load value is denoted as the minimum operating load. ; by Using a threshold as a guideline, points greater than or equal to the threshold in a typical daily work pattern are recorded as working states, and points less than the threshold are recorded as non-working states, resulting in working states in 30-minute units. to , dimension Each value represents the company's working status at the corresponding time. A comprehensive analysis of K typical daily work patterns to and their respective working states. to This yields the company's daily work cycle, specifically including the company's daily production level, working hours, and work patterns.
4. The enterprise work cycle analysis method according to claim 3, characterized in that... Work cycle analysis is performed on the work pattern sequence, including: The typical daily work patterns are sorted by average value, and the corresponding class labels are denoted as follows: to ,in, Consider it a non-working day work mode label. to The labels are considered as a range of production capacity working modes from low to high, thus yielding the class label of the daily load curve. This label represents the most typical daily working mode that best fits the current day. Arrange the class labels according to the dates of the daily load curve to obtain the working mode sequence. This sequence contains to There are K labels in total, representing the changes in the daily work patterns of the company over D days; The work pattern sequence is segmented and analyzed according to a preset cycle to obtain the enterprise cycle work pattern sequence; the enterprise cycle work pattern is analyzed to obtain the enterprise work cycle under five time dimensions: year, quarter, month, week, and day.
5. The enterprise work cycle analysis method according to claim 1, characterized in that, The enterprise's power data is preprocessed to obtain a daily load curve with a specific sampling frequency. This daily load curve has a sampling frequency of at least 2 times per hour and includes: The enterprise's power data is segmented to obtain daily load data; The daily load data was processed using 3 Outlier detection is performed using the interquartile range of the principle or box plot, and identified outliers are treated as missing values. Missing values are filled into the daily load curve by using the mean of the values before and after the missing values, resulting in a daily load curve with stable frequency.
6. The enterprise work cycle analysis method according to claim 5, characterized in that, The enterprise's power data is preprocessed to obtain a daily load curve with a specific sampling frequency. This daily load curve has a sampling frequency of at least 2 times per hour. The process also includes: The frequency-stable daily load curve was downsampled to 2 times / hour to obtain a dimension of The data represents a certain enterprise The load data is sampled twice per hour, and each value represents the average load of the enterprise within half an hour.
7. An enterprise work cycle analysis device, wherein the device refers to the enterprise work cycle analysis method according to any one of claims 1-6, characterized in that, include: The power data acquisition module is used to acquire the power data of the enterprise to be analyzed. The preprocessing module is used to preprocess the enterprise's power data to obtain a daily load curve with a specific sampling frequency; The clustering module is used to perform K-means clustering on the daily load curve to obtain k subclasses and the class label to which the daily load curve belongs; The working mode sequence calculation module is used to extract the cluster centers of k subclasses to obtain typical daily working modes, and arrange the class labels according to their corresponding daily load curves to obtain the working mode sequence. The enterprise work cycle analysis module is used to determine the work status of the typical daily work patterns, perform work cycle analysis on the work pattern sequence, and obtain the enterprise work cycle under five time dimensions: year, quarter, month, week, and day.
8. An electronic device, characterized in that, include: At least one memory and at least one processor; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the at least one processor implements the steps of an enterprise work cycle analysis method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of an enterprise work cycle analysis method as described in any one of claims 1-6.