Air load prediction method, device and equipment for end of air compression station and storage medium

By acquiring real-time data streams to identify operating conditions and calling adaptive prediction models, the problem of poor adaptability of air compressor station terminal gas load prediction models was solved, achieving high-precision load prediction.

CN122173846APending Publication Date: 2026-06-09QINGDAO HAIER ENERGY POWER CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGDAO HAIER ENERGY POWER CO LTD
Filing Date
2026-05-12
Publication Date
2026-06-09

Smart Images

  • Figure CN122173846A_ABST
    Figure CN122173846A_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, and storage medium for predicting gas load at the end of an air compressor station. The method includes: acquiring real-time collected gas load data stream at the end of the air compressor station; determining whether a sudden change in load has occurred at the current moment based on the data stream; extracting load data from the data stream for multiple consecutive moments, including the current moment, to obtain a recent load sequence, and identifying the current end-of-line operating condition based on the recent load sequence; determining a target end-of-line operating condition for prediction based on the determination result of whether a sudden change in load has occurred and the current end-of-line operating condition, and calling a gas load prediction model corresponding to the target end-of-line operating condition from an adaptive prediction model set; extracting load data from the data stream for multiple consecutive moments before the current moment to obtain historical load segments, and inputting the historical load segments into the gas load prediction model for gas load prediction to obtain a predicted sequence of end-of-line gas load for a specified future period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a method, apparatus, equipment and storage medium for predicting the gas load at the end of an air compressor station. Background Technology

[0002] Air compressor stations are core power supply systems for industrial production, with their core function being to provide stable-pressure compressed air to end-user points on the production side. The end-user air load of air compressor stations is the key basis for optimizing the start-up and shutdown of air compressor units, dynamically controlling pipeline pressure, and achieving energy conservation and consumption reduction. However, on the one hand, air compressor stations have a large number of end-user points, and the operating rhythms and load characteristics of different points vary significantly; on the other hand, end-user air conditions are flexible and changeable, including gradual changes such as stable operation of a single end and coordinated production of multiple ends, as well as sudden changes such as the sudden start-up of large end equipment, simultaneous switching of multiple production lines, and the introduction of emergency production tasks. These two aspects pose a significant challenge to the prediction of end-user air load of air compressor stations.

[0003] Existing methods for predicting gas load at the end of air compressor stations, such as prediction models based on traditional long short-term memory networks, can capture the temporal dependence of gas load at the end, but they are difficult to adapt to real-time changes in end operating conditions, resulting in poor model adaptability and low prediction accuracy. Summary of the Invention

[0004] The embodiments of the present invention provide a method, apparatus, equipment and storage medium for predicting the gas load at the end of an air compressor station, which can adapt to the dynamic changes of different end operating conditions of the air compressor station and improve the prediction accuracy of the gas load at the end.

[0005] In a first aspect, the air compressor station terminal gas load prediction method provided by the embodiments of the present invention includes: Acquire real-time data streams of air load at the terminal of the air compressor station; Load data from multiple consecutive moments, including the current moment, are extracted from the data stream to obtain a recent load sequence, and the current terminal condition is identified based on the recent load sequence. Based on the data stream, determine whether the load at the current moment has changed abruptly; Based on the judgment result of whether the load has changed abruptly and the current terminal condition, the target terminal condition for prediction is determined, and the gas load prediction model corresponding to the target terminal condition is called from the adaptive prediction model set. Load data from multiple consecutive moments prior to the current moment are extracted from the data stream to obtain historical load segments. These historical load segments are then input into the gas load prediction model to predict gas load and obtain a predicted sequence of end-of-life gas load for a specified future period.

[0006] Secondly, the air compressor station terminal gas load prediction device provided in the embodiments of the present invention includes: The acquisition module is used to acquire real-time data streams of air load at the end of the air compressor station. The identification module is used to extract load data from the data stream for multiple consecutive moments, including the current moment, to obtain a recent load sequence, and to identify the current terminal operating condition based on the recent load sequence. The judgment module is used to determine whether the load at the current moment has changed abruptly based on the data stream; The calling module is used to determine the target end condition for prediction based on the judgment result of whether the load has changed abruptly and the current end condition, and to call the gas load prediction model corresponding to the target end condition from the adaptive prediction model set. The prediction module is used to extract load data from the data stream for multiple consecutive moments prior to the current moment to obtain historical load segments, and input the historical load segments into the gas load prediction model to predict the gas load and obtain the end-of-life gas load prediction sequence for a specified future period.

[0007] Thirdly, the electronic device provided in the embodiments of the present invention includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the program, it implements the air compressor station terminal gas load prediction method as in any embodiment of the present invention.

[0008] Fourthly, the computer-readable storage medium provided in the embodiments of the present invention stores a computer program thereon, which, when executed by a processor, implements the air compressor station terminal gas load prediction method as described in any embodiment of the present invention.

[0009] In this embodiment of the invention, real-time data streams of gas load at the end of an air compressor station are acquired. Load data from multiple consecutive moments, including the current moment, are extracted from the data stream to obtain a recent load sequence. The current end-of-line operating condition is identified based on the recent load sequence, enabling the differentiation of different end-of-line operating conditions. This allows for the subsequent invocation of prediction models adapted to different operating conditions. Based on the data stream, it is determined whether a sudden change has occurred in the load at the current moment. Based on the determination result of whether a sudden change has occurred and the current end-of-line operating condition, a target end-of-line operating condition for prediction is determined. A gas load prediction model corresponding to the target end-of-line operating condition is invoked from the adaptive prediction model set. Load data from multiple consecutive moments prior to the current moment are extracted from the data stream to obtain historical load segments. These historical load segments are input into the gas load prediction model for gas load prediction, resulting in a predicted sequence of end-of-line gas load for a specified future period. This allows for timely tracking of changes in end-of-line gas load and real-time adjustment of the prediction model based on the end-of-line gas load conditions, ensuring a high degree of adaptability between the prediction model and the end-of-line operating conditions, thereby improving the accuracy of load prediction. Attached Figure Description

[0010] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a schematic flowchart of the air compressor station terminal gas load prediction method provided in an embodiment of the present invention; Figure 2 This is another schematic diagram of the air compressor station terminal gas load prediction method provided in this embodiment of the invention; Figure 3 This is a flowchart illustrating the adaptive prediction model set generation method provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of a gas load prediction device for the terminal of an air compressor station provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0012] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0013] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0014] Figure 1This is a flowchart illustrating a method for predicting the gas load at the end of an air compressor station according to an embodiment of the present invention. This method is applicable to scenarios involving real-time prediction of the gas load at the end of an air compressor station. The method can be executed by a device provided in this embodiment, which can be implemented using software and / or hardware. In one specific embodiment, the device can be integrated into an electronic device, such as a computer or server. The following embodiment illustrates this using the integration of the air compressor station's gas load prediction method into an electronic device as an example. (See also...) Figure 1 The air compressor station terminal gas load prediction method of this embodiment may include the following steps: Step 101: Obtain the real-time data stream of air load at the end of the air compressor station.

[0015] Air compressor station terminal air load refers to the amount of compressed air consumed per unit time at downstream air consumption points in the air compressor station's supply network. It is a core indicator that directly reflects the compressed air demand on the production side. The unit of air load can be cubic meters per minute. Terminal air consumption points can be production equipment, production lines, air-consuming units, etc.

[0016] Specifically, the instantaneous flow rate of compressed air can be collected at a certain frequency by flow meters deployed at various gas consumption points at the end of the pipeline network, and then the compressed air consumption per unit time can be calculated. For example, the collected end-point gas load data stream can be represented as... ,in This represents the terminal gas load value at time t.

[0017] Step 102: Extract load data from the data stream for multiple consecutive time periods, including the current time, to obtain the recent load sequence, and identify the current terminal operating condition based on the recent load sequence.

[0018] The recent load sequence includes the end-point gas load values ​​at multiple consecutive points in time within the most recent statistical time period, including the current time. For example, if the current time is t and the statistical time period is T, then the recent load sequence can be represented as follows: Recent load sequences serve as reference data for identifying end-point operating conditions. Specifically, after extracting recent load sequences from the end-point gas load data stream, preprocessing such as outlier removal, missing value imputation, and data normalization can be performed to further improve data quality.

[0019] The current terminal operating condition is the terminal operating condition to which the recent load sequence belongs. Specifically, features can be extracted from the recent load sequence, and the extracted recent load sequence features are matched with the features of each terminal operating condition pre-stored in the terminal operating condition feature library to determine the current terminal operating condition.

[0020] Step 103: Determine whether the load at the current moment has changed abruptly based on the data stream.

[0021] Switching gas usage strategies at end-point gas consumption points, such as starting up large-scale end-point equipment or simultaneously switching multiple production lines, can lead to sudden changes in end-point operating conditions. Specifically, the cumulative deviation of end-point gas load data streams can be used to monitor changes in end-point gas load in real time. First, historical fluctuation characteristic parameters of the current end-point operating condition can be obtained from the end-point operating condition feature library, including the mean and standard deviation corresponding to the current end-point operating condition. Then, based on the mean and standard deviation corresponding to the current end-point operating condition, calculation formulas are constructed for the upper cumulative sum of positive load cumulative offset and the lower cumulative sum of negative load cumulative offset. The upper and lower cumulative sums are continuously updated according to the current end-point gas load value in the data stream. When the upper cumulative sum exceeds a preset upper cumulative sum threshold, a sudden increase in end-point load is determined; when the lower cumulative sum exceeds a preset lower cumulative sum threshold, a sudden decrease in end-point load is determined.

[0022] Step 104: Based on the judgment result of whether the load has changed abruptly and the current terminal condition, determine the target terminal condition for prediction, and call the gas load prediction model corresponding to the target terminal condition from the adaptive prediction model set.

[0023] The target end-of-pipe condition refers to the end-of-pipe condition currently used to select a prediction model from the adaptive prediction model set. Each prediction model in the adaptive prediction model set is a prediction model for a specific end-of-pipe condition, which can be trained using historical gas load data corresponding to that specific end-of-pipe condition.

[0024] Specifically, when a sudden change in load is determined, the new terminal condition identified in the first recent load sequence after the change can be used as the target terminal condition, and the gas load prediction model corresponding to the target terminal condition can be directly called from the adaptive prediction model set; if no sudden change in load is determined, the target terminal condition is the current terminal condition, and the gas load prediction model corresponding to the current terminal condition can be directly called from the adaptive prediction model set.

[0025] Step 105: Extract load data from multiple consecutive moments before the current moment from the data stream to obtain historical load segments, and input the historical load segments into the gas load prediction model to predict the gas load and obtain the end-of-life gas load prediction sequence for the specified future period.

[0026] Historical load segments refer to a sequence of load values ​​from multiple consecutive moments prior to the current moment, extracted from the end-point gas load data stream. Historical load segments serve as reference data for gas load forecasting.

[0027] Specifically, an autoregressive approach can be used to predict gas load using a gas load forecasting model. First, historical load segments are input into the gas load forecasting model so that the model can predict the gas load value at the next time step based on these segments. Then, the gas load value at the next time step is appended to the end of the historical load segment, while the end-of-period gas load value of the first time step in the historical load segment is removed, resulting in an updated historical load segment. This updated historical load segment is then input into the gas load forecasting model to predict the gas load value at the time step after next. This iterative process is repeated until the load forecast values ​​for each time step within a specified future period are generated, forming a final gas load forecast sequence.

[0028] In this embodiment, real-time data streams of gas load at the air compressor station's terminal are acquired. Load data from multiple consecutive moments, including the current moment, are extracted from the data stream to obtain a recent load sequence. The current terminal operating condition is identified based on the recent load sequence, enabling the differentiation of different terminal operating conditions. This allows for the subsequent invocation of prediction models adapted to different operating conditions. Based on the data stream, it is determined whether the load at the current moment has undergone a sudden change. According to the determination result of whether the load has undergone a sudden change and the current terminal operating condition, the target terminal operating condition for prediction is determined. The gas load prediction model corresponding to the target terminal operating condition is called from the adaptive prediction model set. Load data from multiple consecutive moments before the current moment are extracted from the data stream to obtain historical load segments. These historical load segments are input into the gas load prediction model for gas load prediction, resulting in a predicted sequence of terminal gas load for a specified future period. This allows for timely tracking of changes in terminal gas load and real-time adjustment of the prediction model based on the terminal gas operating conditions, ensuring a high degree of adaptability between the prediction model and the terminal operating conditions, thereby improving the accuracy of load prediction.

[0029] The following further explains the air compressor station terminal gas load prediction method provided by the embodiments of the present invention, such as... Figure 2 As shown, Figure 2 This is another schematic flowchart of the air compressor station terminal gas load prediction method provided in this embodiment of the invention. The air compressor station terminal gas load prediction method of this embodiment may include: Step 201: Obtain the real-time data stream of air load at the end of the air compressor station.

[0030] Step 202: Extract load data from the data stream for multiple consecutive time periods, including the current time, to obtain the recent load sequence.

[0031] Step 203: Construct recent load sequences as current operating condition identification samples.

[0032] The current operating condition identification sample is a sequence segment of end-point gas load used to identify the current operating condition.

[0033] Step 204: Obtain the core samples of each existing end condition and calculate the density connection relationship between the current condition identification sample and the core samples of each existing end condition.

[0034] Existing terminal operating conditions are the terminal operating conditions corresponding to the terminal operating condition clusters formed by clustering historical terminal gas load data. Specifically, historical terminal gas load data during the historical operation of air compressors can be collected, and a sample set containing multiple load sample segments can be constructed using a sliding window. Then, density-based clustering can be performed on the sample set to obtain multiple existing terminal operating condition clusters.

[0035] The core samples of existing end-point conditions refer to typical load samples of existing end-point conditions, which are usually the core points of the end-point condition clusters corresponding to existing end-point conditions. Specifically, the Euclidean distance between the current condition identification sample and the core samples of each existing end-point condition can be calculated. If the Euclidean distance is less than a preset neighborhood radius parameter, it can be determined that there is a density connection relationship between the current condition identification sample and the corresponding core sample.

[0036] Step 205: If the current working condition identification sample has a density connection relationship with the core sample of an existing end working condition, then the current working condition identification sample is assigned to the corresponding existing end working condition; if the current working condition identification sample has a density connection relationship with the core samples of multiple existing end working conditions, then the multiple existing end working conditions are merged to generate a new end working condition, and the current working condition identification sample is assigned to the new end working condition.

[0037] Specifically, if the Euclidean distance between the current working condition identification sample and the core sample of an existing end working condition is less than a preset neighborhood radius parameter, then the current working condition identification sample can be determined to belong to the corresponding existing end working condition cluster. If the current working condition identification sample is simultaneously less than the preset neighborhood radius parameter in distance to the core samples of multiple existing end working conditions, it indicates that the multiple existing end working conditions have similar characteristics. In this case, the multiple existing end working condition clusters can be merged, and the current working condition identification sample can be assigned to a new end working condition cluster.

[0038] Step 206: The current working condition identification sample is assigned to the end working condition as the current end working condition, and the feature data of the corresponding working condition in the end working condition feature library is updated.

[0039] Specifically, after classifying the current working condition sample into the end working condition as the current end working condition, if the current end working condition is an existing end working condition, the feature data of the current end working condition cluster is recalculated, and the feature data of the current end working condition cluster recorded in the working condition feature library is updated; if the current end working condition is a new end working condition obtained by merging multiple existing end working conditions, the merged existing end working conditions are deleted from the working condition feature library, and the feature data corresponding to the new end working condition is added to the end working condition feature library.

[0040] Step 207: Obtain the historical fluctuation characteristic parameters corresponding to the current terminal condition from the terminal condition characteristic library. Based on the real-time load data and historical fluctuation characteristic parameters under the current terminal condition, update the mean and standard deviation that characterize the normal fluctuation range of the current terminal condition.

[0041] Historical fluctuation parameters are statistical quantities that reflect the historical fluctuation characteristics of terminal operating conditions. Specifically, historical fluctuation parameters may include the mean, variance, and standard deviation of historical terminal gas load data corresponding to the terminal operating conditions. Real-time load data are the terminal gas load data collected in real time under the current terminal operating conditions.

[0042] Specifically, after updating the operating condition characteristic data corresponding to the current terminal operating condition in the terminal operating condition characteristic library, it is also necessary to update the historical fluctuation characteristic parameters corresponding to the current terminal operating condition accordingly, so as to ensure that the historical fluctuation characteristic parameters can be dynamically adjusted according to the current fluctuation characteristics of the terminal gas load.

[0043] First, the historical fluctuation characteristic parameters corresponding to the current end condition can be obtained from the end condition feature library. If the current end condition is an existing end condition, the historical fluctuation characteristic parameters are the historical fluctuation characteristic parameters of the samples in the existing end condition cluster. If the current end condition is a new end condition obtained by merging multiple existing end conditions, the historical fluctuation characteristic parameters can be the average of the historical fluctuation parameters corresponding to the existing end conditions before merging, or a weighted average obtained by weighting the sum of the sizes of each existing end condition cluster.

[0044] In one feasible implementation, the mean and standard deviation representing the normal fluctuation range of the current terminal load condition can be updated based on the real-time load data under the current terminal load condition, historical fluctuation characteristic parameters, and updated smoothing coefficient. This can balance the importance of historical data and current terminal load data, while ensuring that the mean and standard deviation representing the normal fluctuation range of the current terminal load condition can dynamically adapt to the real-time fluctuation characteristics of the terminal load.

[0045] The update smoothing coefficient is a parameter used to weigh the importance of real-time load data and historical fluctuation parameters. For example, if the historical average value corresponding to the current end-point operating condition is... The historical standard deviation is The average value of real-time load data is Then the updated mean It can be The updated standard deviation can be ,in It is the update smoothing coefficient, and its preferred value range is [0.9, 0.95].

[0046] Furthermore, the update smoothing coefficient can be periodically optimized based on historical accuracy statistics of mutation identification. For example, a dynamic update cycle can be set. At the end of each dynamic update cycle, the accuracy of end-point condition identification when the update smoothing coefficient takes different values ​​is calculated based on the historical end-point gas load data within that cycle. The update smoothing coefficient with the highest historical accuracy is selected as the update smoothing coefficient for the next cycle. For example, the dynamic update cycle can be 12 hours.

[0047] Step 208: Adjust the offset coefficient used to control the sensitivity of sudden change identification based on the severity of load fluctuations in the current terminal operating conditions.

[0048] The severity of load fluctuations in the terminal operating condition is a parameter that quantifies the degree of fluctuation in the current terminal operating condition. It can be represented by the maximum gas load change rate of each load sample segment in the current terminal operating condition.

[0049] The offset coefficient is a parameter used to control the sensitivity of mutation identification, determining the tolerable offset amount. Specifically, if the load fluctuation of the current end-point operating condition is large, the offset coefficient can be increased accordingly to reduce the false positive rate of mutation identification; if the load fluctuation of the current end-point operating condition is small, the offset coefficient can be decreased to improve the sensitivity of mutation identification. For example, the offset coefficient... The calculation formula can be ,in, This represents the maximum rate of change in gas load under the current terminal operating conditions. This represents the average of the maximum gas load change rate across all end-point operating conditions. The initial reference value for the offset coefficient can be 0.5. The load fluctuation gain parameter can be set to 0.5.

[0050] Step 209: Based on the updated mean, standard deviation and adjusted offset coefficient, construct an upper cumulative sum sequence for monitoring positive cumulative load offset and a lower cumulative sum sequence for monitoring negative cumulative load offset.

[0051] The upper cumulative sum is a statistic used to monitor the degree to which the mean of the terminal gas load sequence shifts in the direction of increasing value. Similarly, the lower cumulative sum is a statistic used to monitor the degree to which the mean of the terminal gas load sequence shifts in the direction of decreasing value. The cumulative sum sequence is a sequence composed of the cumulative sums corresponding to each terminal operating condition.

[0052] For example, the update formula for the upper cumulative sum of the positive cumulative load offset can be: The update formula for the lower cumulative sum of the negative cumulative load offset can be: ,in, and These represent the cumulative sums before and after the update, respectively. and These represent the lower cumulative sums before and after the update, respectively. This represents the real-time load data under the current terminal operating conditions. This represents the updated mean. This represents the updated standard deviation. This represents the adjusted offset coefficient, and max() indicates finding the maximum value to ensure that the upper and lower cumulative sums are greater than 0.

[0053] Step 210: Based on the updated standard deviation and the load fluctuation range of the current end condition, set a dynamic threshold for determining abrupt changes.

[0054] The dynamic threshold is the minimum sum of upper and lower values ​​used to determine if a sudden change has occurred in the current terminal operating condition. Specifically, the load fluctuation range of the current terminal operating condition can be determined based on the maximum and minimum values ​​of the gas load in the current terminal operating condition cluster. Then, the updated standard deviation and the fluctuation range of the current terminal operating condition are weighted and fused to calculate the dynamic threshold used to determine the sudden change.

[0055] In one feasible implementation, a dynamic threshold for determining abrupt changes can be set based on the updated standard deviation, the load fluctuation range of the current end condition, and the dynamic threshold coefficient.

[0056] The dynamic threshold coefficient is a parameter used to adjust the numerical value of the dynamic threshold. For example, the dynamic threshold... The calculation formula can be ,in, This represents the updated standard deviation. This indicates the load fluctuation range of the current terminal operating condition. S represents the current end-point condition cluster. This indicates the maximum gas load in the current terminal operating condition cluster. This represents the minimum gas load in the current terminal operating condition cluster. This represents the dynamic threshold coefficient, and its preferred value range is 0.8 to 1.2.

[0057] The dynamic threshold coefficient can also be periodically optimized based on historical accuracy statistics for mutation identification. For example, a dynamic update cycle can be set. At the end of each preset dynamic update cycle, the accuracy of mutation identification when the dynamic threshold coefficient takes different values ​​can be calculated based on the gas load data within that cycle. If the accuracy is higher than that of the previous preset dynamic update cycle, the dynamic threshold coefficient is lowered; if the accuracy is lower than that of the previous preset dynamic update cycle, the dynamic threshold coefficient is raised.

[0058] Step 211: When the value of the upper cumulative sum sequence or the lower cumulative sum sequence exceeds the dynamic threshold, it is determined that a load mutation has occurred in the corresponding direction.

[0059] Specifically, a sudden increase in terminal load can be determined when the value of the upper cumulative sum sequence exceeds the dynamic threshold; a sudden decrease in terminal load can be determined when the value of the lower cumulative sum sequence exceeds the dynamic threshold; and when the values ​​of both the upper and lower cumulative sum sequences are less than the dynamic threshold, the terminal operating condition is determined to have not changed.

[0060] Step 212: Determine if a sudden change in load has occurred. If not, proceed to step 213; if so, proceed to step 214.

[0061] Step 213: Directly use the current terminal condition as the target terminal condition.

[0062] Step 214: Take the new terminal condition identified in the first recent load sequence after the mutation as the target terminal condition.

[0063] Specifically, when no load change is detected, the current terminal operating condition remains unchanged. Therefore, the current terminal operating condition can be directly used as the target terminal operating condition, and the model matching the target terminal operating condition in the adaptive prediction model set can be called for load prediction. When a load change is detected, the prediction model needs to be switched, and the prediction model corresponding to the new terminal operating condition after the change needs to be called to perform terminal gas load prediction. In addition, the upper and lower cumulative sum sequences need to be reset to avoid the continuous accumulation of cumulative sum sequence values ​​after the change affecting the accuracy of subsequent operating condition change identification.

[0064] Step 215: Check if there is a model in the adaptive prediction model set that matches the target end condition. If it exists, proceed to step 216; otherwise, proceed to step 217.

[0065] Specifically, after determining the target end condition, the system can search the adaptive prediction model set for a matching prediction model based on the identifier of the target end condition; alternatively, it can search the end condition feature library to obtain the feature data of the target end condition and the feature data of the existing end conditions corresponding to each prediction model in the adaptive prediction model set. The system can then calculate the feature similarity between the feature data of the target end condition and the feature data of each existing end condition. If there is an existing end condition with a feature similarity higher than a preset similarity threshold, then it is determined that there is a model that matches the target end condition.

[0066] Step 216: Determine the matched model as the gas load prediction model.

[0067] Step 217: Construct a new model using real-time load data under the target terminal operating conditions, and determine the new model as the gas load prediction model.

[0068] Specifically, the target end-of-line condition may be a new end-of-line condition obtained by merging multiple existing end-of-line conditions. In this case, the adaptive prediction model set may not have a model matching the target end-of-line condition. A new model can be quickly built using real-time load data under the target end-of-line condition. The new model can be trained using incremental learning or online learning methods based on the prediction model corresponding to the end-of-line condition before merging. After the model is built, it is added to the adaptive prediction model set and a correspondence is established between it and the new end-of-line condition.

[0069] Step 218: Extract load data from the data stream for multiple consecutive times prior to the current time to obtain historical load segments.

[0070] Step 219: For each predicted load value, use the predicted value or the actual collected value at the corresponding time as new input to update the historical load segment, and call the gas load prediction model again to predict the next time.

[0071] Step 220: Repeat step 219 until all load forecast values ​​for the specified time are generated. The load forecast values ​​constitute the end-point gas load forecast sequence for the specified future time period.

[0072] Specifically, when calling the prediction model corresponding to the target terminal operating condition for load prediction, load data from multiple moments prior to the current moment can be extracted from the real-time collected terminal gas load data stream to obtain historical load segments. These historical load segments are then input into the prediction model. Subsequently, an iterative prediction method is used. Each time the load value for the next moment is predicted, this predicted value is added to the end of the historical load segment, while the load value of the first moment of the historical load segment is removed to keep the length of the input load segment constant. Finally, based on the updated historical load segments, the gas load prediction model is called again to predict the next moment. This process is repeated until load prediction values ​​for all moments within the specified future time period are generated. Ultimately, these prediction values ​​are arranged in chronological order to form the terminal gas load prediction sequence.

[0073] For example, if the current time is t, the length of the historical load sequence is 3, and the current historical load segment... It can be represented as Predictive model f (.) can be based on Output the load forecast value for the next time step. Then update the historical load fragments to Repeat the above process until a length of [length missing] is obtained. C Forecast sequence of gas load for a specified future period .

[0074] In this embodiment, the density connection relationship between the current working condition identification sample and the core samples of each existing end working condition is calculated. If the current working condition identification sample has a density connection relationship with the core sample of an existing end working condition, the current working condition identification sample is assigned to the corresponding existing end working condition. If the current working condition identification sample has a density connection relationship with the core samples of multiple existing end working conditions, the corresponding multiple existing end working conditions are merged to generate a new end working condition, and the current working condition identification sample is assigned to the new end working condition. This allows for updating existing end working conditions based on the current working condition identification sample, ensuring the accuracy and real-time performance of working condition identification. Simultaneously, it captures the latest evolution trend of end working conditions, making working condition segmentation more accurate and providing a basis for subsequent prediction. The selection and updating of the measurement model lays the foundation; updating the characteristic data of the corresponding operating conditions in the terminal operating condition characteristic library enables the operating condition characteristic data to dynamically reflect the latest terminal gas consumption trends, enhancing the timeliness of the operating condition characteristic library; obtaining historical fluctuation characteristic parameters corresponding to the current terminal operating condition from the terminal operating condition characteristic library, and updating the mean and standard deviation representing the normal fluctuation range of the current terminal operating condition based on the real-time load data and historical fluctuation characteristic parameters under the current terminal operating condition, can ensure that the mean and standard deviation can dynamically adapt to the fluctuation characteristics of the terminal load; adjusting the offset coefficient used to control the sensitivity of sudden change identification according to the severity of the load fluctuation of the current terminal operating condition can achieve adaptive matching between the sudden change detection sensitivity and the actual fluctuation characteristics of the operating condition. When operating conditions fluctuate drastically, the offset coefficient is appropriately increased to reduce the false alarm rate; when operating conditions are stable, the offset coefficient is appropriately decreased to improve sensitivity to minor drifts. Based on the updated mean, standard deviation, and adjusted offset coefficient, the values ​​in the upper cumulative sum sequence of the positive load cumulative offset and the lower cumulative sum sequence of the negative load cumulative offset are updated. This allows for timely recalculation of the cumulative sum sequence based on real-time load data, ensuring it always matches the real-time statistical characteristics of the current end-point operating conditions. This guarantees the sensitivity and accuracy of abrupt change identification and avoids false alarms. Based on the updated standard deviation and the load fluctuation range of the current end-point operating conditions, a dynamic threshold is set to determine abrupt changes. When the value of either the upper or lower cumulative sum sequence exceeds the dynamic threshold... When the value is set, it determines that a load change has occurred in the corresponding direction, which enables the dynamic threshold to be automatically adjusted according to the degree of fluctuation in the operating condition, thereby improving the accuracy of change identification; it determines whether a load change has occurred, and uses the new terminal operating condition identified by the first recent load sequence after the change as the target terminal operating condition, which can track changes in gas load in a timely manner, improve the accuracy of operating condition identification, and switch the corresponding gas load prediction model, thereby improving the accuracy of gas load prediction; when there is no model matching the target terminal operating condition in the adaptive prediction model set, a new model is constructed using the real-time load data under the target terminal operating condition, and the new model is determined as the gas load prediction model, which can ensure the adaptability of the prediction model to the new terminal operating condition scenario;For each predicted load value, the predicted value or the corresponding actual collected value is used as new input to update the historical load segment. The gas load prediction model is then called again to predict the next load value, until load prediction values ​​for all specified times are generated. This autoregressive prediction mode can meet the load prediction needs for multiple future times.

[0075] The following describes in detail the method for generating an adaptive prediction model set provided in the embodiments of the present invention. Figure 3 This is a flowchart illustrating the adaptive prediction model set generation method provided in this embodiment of the invention, as shown below. Figure 3 As shown, the adaptive prediction model set is generated using the following method: Step 301: Obtain historical terminal gas load data. After preprocessing the historical terminal gas load data, construct a sample set containing multiple load sample segments through a sliding window.

[0076] Historical terminal gas load data refers to the sequence of terminal gas loads collected from air compressor stations over a past period, reflecting the historical patterns and characteristics of terminal gas loads. A load sample segment is an independent sample in the sample set, reflecting the local temporal characteristics of the gas load sequence.

[0077] A sliding window is a fixed-length time window that slides across historical end-of-pipe gas load data in steps, capturing a segment of data within the window each time it slides, thus dividing the historical end-of-pipe gas load data into multiple consecutive load sample segments. The width of the sliding window can be determined based on both the periodic characteristics of the historical end-of-pipe gas load data and the required prediction accuracy.

[0078] For example, if historical terminal gas load data is represented as Where t is the index of time, and T is the total number of times included in the historical end-of-pipe gas load data; then a working condition identification sample It can be represented as Where w represents the width of the sliding window. The width w of the sliding window can range from... For end-point gas loads with strong regularity, such as when the gas point corresponding to the end point is a single production line operating continuously and stably, the sliding window width is set according to the average value of the gas load cycle. For end-point load sequences with weak regularity, such as when the gas point corresponding to the end point is multiple production lines operating intermittently, the lower limit of the window width is set to w=40 minutes to avoid the window width being too narrow, which would prevent the operating condition identification samples from fully reflecting the characteristics of the load sequence, or the window width being too wide, which would result in weak representativeness of the operating condition identification samples.

[0079] Specifically, sensor malfunctions, abnormal data transmission, and other factors can lead to outliers and missing values ​​in the acquired raw historical end-point gas load data. These outliers can cause deviations in the identification of current end-point operating conditions, thus affecting the accuracy of gas load prediction. Therefore, it is necessary to specifically process outliers and missing values ​​in the raw historical end-point gas load data. Furthermore, since differences in sensor range and accuracy can result in different scales of the collected end-point gas load data, data standardization can be performed to eliminate dimensional differences between different data sets.

[0080] Optionally, the historical end-user gas load data may be preprocessed, including: (1) Identify outliers in historical end-of-life gas load data and replace them with load data from adjacent time periods.

[0081] For example, if the historical end-point gas load data is ,in Y represents the terminal gas load value at time t, and T represents the total number of times included in the historical terminal gas load data. We can first calculate the average of the terminal gas load values ​​in Y. with standard deviation If for the end-user gas load value , Then it can be determined This is an outlier; in this case, the weighted average of the terminal gas load values ​​at adjacent times can be used as a replacement. For example, using replace .

[0082] (2) Fill in the missing values ​​in the historical terminal gas load data.

[0083] Specifically, when the number of consecutive missing values ​​is small, the linear interpolation method can be used to calculate the filling value of the missing value using the valid values ​​within a certain time range on both sides of the missing value.

[0084] For example, if there are no more than 5 consecutive missing values, suppose one of the missing values ​​is... Then it can be done through the formula Calculate the fill value Where k represents The time interval between the most recent valid value on the left, Indicates the most recent valid value on the left. express The time interval between the most recent valid value on the right, This indicates the most recent valid value on the right. When the number of consecutive missing values ​​exceeds 5, the missing values ​​can be filled by first identifying the terminal operating condition to which the historical terminal gas load data belongs, and then using the average of the historical terminal load data of the same period for that terminal operating condition.

[0085] (3) Normalize the load sequence after outlier replacement and missing value filling.

[0086] Specifically, the load sequence data after outlier replacement and missing value imputation can be standardized and mapped to the interval [0,1]. This can improve the efficiency and convergence speed of subsequent adaptive prediction model training.

[0087] For example, the loading sequence after outlier replacement and missing value imputation is as follows: For each of these gas load values Normalized gas load value It can be calculated using the following formula: ,in, express The value of the minimum gas load in the system. express The maximum gas load value in the system.

[0088] In this embodiment, outliers in historical end-point gas load data are identified and replaced with load data from adjacent time points; missing values ​​in historical end-point gas load data are filled in; and the load sequence after outlier replacement and missing value filling is normalized. This effectively filters out noise interference from end-point sensor data, improves the quality of training samples, thereby enhancing the robustness of the subsequent gas load prediction model and accelerating model convergence.

[0089] In one feasible implementation, the sliding window width for constructing historical load segments or load sample segments can be determined by analyzing the autocorrelation characteristics of the load sequence, and the sliding window width can be adjusted periodically based on the prediction error index.

[0090] The autocorrelation characteristic of a load series refers to the degree of correlation between the load series and its observed values ​​at different time delays. It can be used to measure the linear dependence between the current gas load value and the historical gas load value. It reflects the dynamic regularity and periodic pattern within the load data. Specifically, the autocorrelation characteristic of a load series can be quantitatively represented by the autocorrelation coefficient. When the autocorrelation coefficient of the series first reaches a local maximum (i.e., the first peak) as the lag order increases, the lag order corresponding to the first peak reflects the strongest and earliest recurring pattern or periodic component in the load series. Therefore, the lag order corresponding to the first peak of the autocorrelation coefficient can be taken as the initial sliding window width. For example, at the current time...t Gas load and phase separation h The formula for calculating the autocorrelation coefficient between the gas load values ​​at each moment can be: Where t represents the index at time t, h Indicates the step size of the time delay. express t Gas load value at any given time express th Gas load value at any given time express and The covariance between them, where This represents the average gas load in the load sequence. n Indicates the length of the load sequence; and express t Moment th The variance of gas load values ​​at any given time.

[0091] The prediction error metric reflects the magnitude of the prediction error of an adaptive prediction model. Specifically, a window update period can be set, such as 24 hours. At the beginning of the current window update period, the sliding window width is recalculated based on the load sequence in the previous window update period. A new sample set is then constructed using the new sliding window width to retrain each prediction model. The prediction error metrics of the prediction models before and after retraining are compared. The sliding window width corresponding to the prediction model with the smaller prediction error metric is used as the sliding window width for constructing historical load segments or load sample segments in the current period.

[0092] In this embodiment, by analyzing the autocorrelation characteristics of the load sequence, the sliding window width used to construct historical load segments or load sample segments is determined, and the sliding window width is periodically adjusted based on the prediction error index. This allows the sliding window width to be adaptively adjusted according to the real-time changes in the end-user gas load, so that the constructed load sample segments can effectively capture the dynamic change patterns of the gas load data cycle and improve the representativeness of the training samples.

[0093] Step 302: Based on the overall distribution characteristics of the sample set, adaptively determine the neighborhood radius parameter and density threshold parameter required for clustering.

[0094] The overall distribution characteristics of a sample set can be understood as the statistical characteristics of each load sample segment in the sample set.

[0095] The neighborhood radius parameter is the distance threshold at which two sample points are considered to be nearby. Specifically, if the neighborhood radius parameter is... For a load sample p in the sample set S, a sample q whose Euclidean distance from sample p is less than the neighborhood radius parameter belongs to sample p. Neighborhood. The neighborhood radius parameter can be determined based on the statistical properties (e.g., mean, standard deviation, etc.) of the Euclidean distances between all samples in the sample set. For example, the neighborhood radius parameter... The calculation formula can be ,in, It is the standard deviation of the Euclidean distance between the sample segments in the sample set.

[0096] The density threshold parameter is the minimum sample density within the neighborhood of a core point, required for cluster formation in clustering. Specifically, if sample p... If the number of samples within a neighborhood is greater than or equal to the density threshold parameter, then p is the core point of the cluster. This can be determined based on the size of the sample set and the individual sample points. The density threshold parameter is determined by the statistical characteristics of the sample size within the neighborhood (e.g., mean, median, etc.). For example, the density threshold parameter... The calculation formula can be ,in, Represents the sample set, This represents the total number of samples in the sample set.

[0097] Step 303: Based on the neighborhood radius parameter and density threshold parameter, the sample load segments that meet the density connectivity requirements are divided into the same cluster. Each cluster corresponds to a terminal operating condition, resulting in multiple initial terminal operating condition clusters.

[0098] Specifically, by traversing all load sample segments in the sample set, the core points of the clusters are determined from the load sample segments based on the neighborhood radius parameter and the density threshold parameter. The load sample segments that are density-linked with the core points are determined as boundary points, and the core points and the corresponding boundary points are divided into the same cluster, thereby obtaining multiple initial end condition clusters, each cluster corresponding to one end condition.

[0099] Step 304: Establish a corresponding end-condition feature library for each initial end-condition cluster.

[0100] The end-point load condition feature library is used to store the features of each end-point load condition. Specifically, for each initial end-point load condition cluster, the statistical characteristics of the load sample segments can be extracted, such as the sample mean, standard deviation, rate of change range, and periodic characteristics, and persistently stored along with the corresponding end-point load condition identifiers to establish the end-point load condition feature library, providing a reference for end-point load condition identification when the prediction model is used in practice.

[0101] Step 305: Based on the neighborhood radius parameter and density threshold parameter, mark the sample load fragments that do not meet any cluster density requirements as isolated noise points.

[0102] Density requirements are conditions that a load sample fragment must meet to be assigned to a cluster. These include either the number of samples within the neighborhood radius of the point being greater than a density threshold parameter (i.e., the point belongs to a core point), or the point being located within the neighborhood radius of a core point (i.e., the point belongs to a boundary point of a core point). Isolated noise points refer to load sample fragments that do not meet any cluster density requirements and cannot be assigned to any initial end-condition cluster.

[0103] Specifically, isolated noise points typically correspond to abnormal or rare end-of-life conditions. Isolated noise points are not included in any clusters at this time. If new load sample segments are added later, the density connectivity between isolated noise points and the new load sample segments can be calculated to determine whether isolated noise points can form new end-of-life clusters with the new load sample segments.

[0104] Step 306: Using the load sample segments within each initial terminal operating condition cluster, train the corresponding gas load prediction model to obtain the initial prediction model set.

[0105] The initial prediction model is a gas load prediction model trained using load sample segments from a single initial terminal load case cluster. It can be used to predict the terminal gas load sequence for a specified future period based on input historical load segments. The initial prediction model set is a collection of all gas load prediction models trained from various initial terminal load case clusters.

[0106] Specifically, the initial prediction model can be a deep learning model built on a Long Short-Term Memory (LSTM) neural network. When training the initial prediction model, the load sample segments can be divided into input sample segments and label sample segments. The input sample segments are fed into the initial prediction model so that the initial prediction model outputs predicted sample segments, which represent the load sequence within a certain period after the input sample segments. Then, a loss function is calculated based on the error between the predicted and label sample segments. The gradient is calculated based on the loss function value using the backpropagation algorithm to optimize the initial prediction model until the loss function converges, resulting in the trained initial prediction model. For example, the initial prediction model consists of an input layer, an LSTM layer, a fully connected layer, and an output layer. The LSTM layer has two layers, with the first layer having 128 hidden units and the second layer having 64. A dropout layer is used after the two LSTM layers to prevent overfitting, with a dropout probability of 0.2. The optimizer used during training is the Adam optimizer, with an initial learning rate of 0.001, and a learning rate decay strategy is adopted, decreasing to 0.9 times the current learning rate every 1000 iterations. The loss function, Loss, can be calculated by combining Mean Squared Error (MSE) and Mean Absolute Percentage Error (MAPE). The calculation formula is as follows: This balances the absolute and relative values ​​of prediction errors, thereby improving the robustness of the prediction model.

[0107] In one feasible implementation, the hyperparameters of the gas load prediction model are adaptively adjusted based on the sample size of each end-point operating condition and the fitting state during model training. The hyperparameters include the number of hidden layer units and the dropout probability value.

[0108] Specifically, the number of hidden layer units can be dynamically adjusted according to the size of the sample set. When the sample set size is greater than a first size, the first number of hidden layer units is used. When the sample set size is less than or equal to the first size but greater than a second size, the second number of hidden layer units is used. When the sample set size is less than or equal to the second size, the third number of hidden layer units is used. The first number is greater than the second number, and the second number is greater than the third number. For example, if the first size is 1000, the second size is 500, the first number of hidden layer units is 128, the second number is 96, and the third number is 64.

[0109] The dropout probability value can be dynamically adjusted based on the fit of the initial prediction model. Specifically, the sample set can be divided into a training set and a validation set. In each iteration or every few iterations, the error of predicting sample segments and labeled sample segments in the validation set and training set respectively is calculated. When this error is greater than a first error, the current dropout probability value is increased. For example, the MAPE of predicted sample segments and labeled sample segments in the training set and validation set can be calculated. When the MAPE value is greater than 5%, the dropout probability value is increased from 0.2 to 0.3. However, when increasing the value, it is necessary to ensure that the dropout probability value does not exceed the upper limit.

[0110] Step 307: When new terminal gas load data is obtained, construct the new terminal gas load data into a new load sample fragment, and after classifying the new load sample fragment into an existing terminal operating condition cluster or a new terminal operating condition cluster, update the corresponding terminal operating condition feature library.

[0111] The newly added terminal gas load data is the gas load data stream newly collected from the air compressor station after obtaining the initial prediction model set. The newly added terminal gas load data reflects the latest changes in the terminal gas load of the air compressor station. Specifically, the newly added terminal gas load data can be constructed into a new load sample segment using the same processing method as in step 301; by determining the density connection relationship between the new load sample and the core samples of the existing terminal operating condition cluster, the new load sample segment is assigned to the existing terminal operating condition cluster or a new terminal operating condition cluster; then, the terminal operating condition feature library of the corresponding existing terminal operating condition cluster or new terminal operating condition cluster is updated using the same processing method as in step 304.

[0112] Step 308: When the terminal operating condition cluster is updated, the model parameters of the gas load prediction model of the corresponding cluster are updated using the corresponding newly added load sample fragments to obtain an adaptive prediction model set.

[0113] The adaptive prediction model set is a collection of gas load prediction models obtained by incrementally training new load sample segments based on the initial prediction model. Specifically, a corresponding model update threshold can be set for each end-point operating condition cluster. When the number of new load sample segments in a certain end-point operating condition cluster reaches the model update threshold, incremental training is performed on the gas load prediction model of the corresponding cluster using only the new load sample segments to update the model parameters. This avoids retraining and reduces the time cost required for training. For example, the model update threshold for an end-point operating condition cluster can be set to 10% of the sample size in the cluster.

[0114] In this embodiment, the neighborhood radius and density threshold parameters required for clustering are adaptively determined based on the overall distribution characteristics of the sample set. This allows the parameter selection to better match the data distribution characteristics of the sample set, thereby improving the accuracy of clustering. Clustering the sample set yields multiple initial end-condition clusters, and a corresponding end-condition feature library is established for each cluster. This distinguishes significantly different conditions, avoiding interference from the mixing of multiple end-condition and multi-condition training samples in subsequent prediction model training, thus improving the model's adaptability and prediction accuracy for different conditions. Load segments that do not meet any cluster density requirements are marked as isolated noise points, eliminating interference from abnormal and rare conditions, thereby improving the stability and generalization ability of the prediction model. Using load sample segments within each initial end-condition cluster, the model is trained separately. The corresponding gas load prediction model obtains an initial prediction model set, which can accurately capture the characteristics of each condition using prediction models trained for different end-point operating conditions, further improving prediction accuracy. When new end-point gas load data is acquired, the new end-point gas load data is constructed into new load sample fragments, and after the new load sample fragments are included in the existing end-point operating condition clusters or new end-point operating condition clusters, the corresponding end-point operating condition feature library is updated. This allows the new operating conditions to be included in the training sample set in a timely manner, enabling the model to continuously update and iterate, and maintain high-precision prediction. When the end-point operating condition cluster is updated, the model parameters of the corresponding cluster's gas load prediction model are updated using the corresponding new load sample fragments, resulting in an adaptive prediction model set. This avoids retraining the model, reduces computational resource consumption, and reduces time costs.

[0115] Figure 4 This is a schematic diagram of a gas load prediction device for the terminal of an air compressor station provided in an embodiment of the present invention, as shown below. Figure 4 As shown, the device includes: The acquisition module 401 is used to acquire the real-time data stream of air load at the end of the air compressor station; The identification module 402 is used to extract load data from the data stream for multiple consecutive times, including the current time, to obtain a recent load sequence, and to identify the current terminal operating condition based on the recent load sequence. The judgment module 403 is used to determine whether the load has changed abruptly at the current moment based on the data stream; Module 404 is called to determine the target end condition for prediction based on the judgment result of whether the load has changed abruptly and the current end condition, and to call the gas load prediction model corresponding to the target end condition from the adaptive prediction model set. The prediction module 405 is used to extract load data from multiple consecutive moments before the current moment from the data stream to obtain historical load segments, and input the historical load segments into the gas load prediction model to predict the gas load and obtain the end-of-life gas load prediction sequence for a specified future period.

[0116] In one embodiment, the identification module 402 identifies the current terminal operating condition based on the recent load sequence, including: Construct recent load sequences as current operating condition identification samples; Obtain the core samples of each existing end-point working condition, and calculate the density connection relationship between the current working condition identification sample and the core samples of each existing end-point working condition; If the current working condition identification sample has a density connection relationship with the core sample of an existing end working condition, then the current working condition identification sample is assigned to the corresponding existing end working condition; if the current working condition identification sample has a density connection relationship with the core samples of multiple existing end working conditions, then the multiple existing end working conditions are merged to generate a new end working condition, and the current working condition identification sample is assigned to the new end working condition. The current working condition is identified as the end working condition into which the sample is classified, and the feature data of the corresponding working condition in the end working condition feature library is updated.

[0117] In one embodiment, the determination module 403 determines whether a sudden change has occurred in the load at the current moment based on the data stream, including: Obtain historical fluctuation characteristic parameters corresponding to the current terminal operating condition from the terminal operating condition characteristic library. Based on the real-time load data and historical fluctuation characteristic parameters under the current terminal operating condition, update the mean and standard deviation that characterize the normal fluctuation range of the current terminal operating condition. Adjust the offset coefficient used to control the sensitivity of sudden change identification based on the severity of load fluctuations in the current terminal operating conditions; Based on the updated mean, standard deviation, and adjusted offset coefficient, an upper cumulative sum sequence for monitoring positive cumulative load offset and a lower cumulative sum sequence for monitoring negative cumulative load offset are constructed. Based on the updated standard deviation and the load fluctuation range of the current end condition, a dynamic threshold for determining abrupt changes is set. When the value of the upper or lower cumulative sum sequence exceeds the dynamic threshold, a load mutation is determined to have occurred in the corresponding direction.

[0118] In one embodiment, the apparatus further includes a model generation module, which includes: The preprocessing unit is used to acquire historical end-point gas load data, and after preprocessing the historical end-point gas load data, it constructs a sample set containing multiple load sample segments through a sliding window. Clustering unit is used to perform initial clustering on the sample set, divide it into multiple initial end condition clusters, and establish a corresponding end condition feature library for each initial end condition cluster; The training unit is used to train the corresponding gas load prediction model using load sample segments within each initial end-condition cluster, thereby obtaining the initial prediction model set. The construction unit is used to construct the new terminal gas load data into a new load sample fragment when new terminal gas load data is acquired, and to update the corresponding terminal operating condition feature library after the new load sample fragment is assigned to an existing terminal operating condition cluster or a new terminal operating condition cluster. The update unit is used to update the model parameters of the gas load prediction model of the corresponding cluster when the terminal operating condition cluster is updated, using the corresponding newly added load sample fragments, to obtain an adaptive prediction model set.

[0119] In one embodiment, the preprocessing unit preprocesses historical end-point gas load data, including: Identify outliers in historical end-point gas load data and replace them with load data from adjacent time periods; Fill in the missing values ​​in the historical terminal gas load data; The load sequence after outlier replacement and missing value filling is normalized.

[0120] In one embodiment, the clustering unit performs initial clustering on the sample set, including: Based on the overall distribution characteristics of the sample set, the neighborhood radius parameter and density threshold parameter required for clustering are adaptively determined. Based on the neighborhood radius parameter and density threshold parameter, sample load segments that meet the density connectivity requirements are divided into the same cluster, and each cluster corresponds to a terminal operating condition. Based on the neighborhood radius parameter and density threshold parameter, sample load fragments that do not meet any cluster density requirements are marked as isolated noise points.

[0121] In one embodiment, the calling module 404 determines the target terminal condition for prediction based on the judgment result of whether a sudden change in load has occurred and the current terminal condition, including: If it is determined that the load has not changed abruptly, the current terminal condition will be directly used as the target terminal condition. If a sudden change in load is determined, the new end condition identified in the first recent load sequence after the change is taken as the target end condition.

[0122] In one embodiment, the calling module 404 calls a gas load prediction model corresponding to the target terminal condition from the adaptive prediction model set, including: Find the model that matches the target end condition from the set of adaptive prediction models; If a matching model exists, then the matching model will be determined as the gas load prediction model. If no matching model exists, a new model is constructed using real-time load data under the target end-point operating conditions, and this new model is designated as the gas load prediction model.

[0123] In one embodiment, the prediction module 405 inputs historical load segments into the gas load prediction model to predict the gas load, obtaining a predicted sequence of end-of-life gas load for a specified future period, including: For each predicted load value, the predicted value or the actual collected value at the corresponding time is used as new input to update the historical load segment, and the gas load prediction model is called again to predict the next time. Repeat the above process until load forecasts for all specified times are generated. These load forecasts constitute a sequence of end-point gas load forecasts for future specified time periods.

[0124] In one embodiment, the device further includes an adaptive adjustment module for: By analyzing the autocorrelation characteristics of the load sequence, the sliding window width used to construct historical load segments or load sample segments is determined, and the sliding window width is periodically adjusted based on the prediction error index. And / or, based on the historical accuracy statistics of mutation identification, the dynamic parameters used to judge mutations are periodically optimized, including the mean update smoothing coefficient and the dynamic threshold coefficient. And / or, based on the sample size of each end-point operating condition and the fitting status during model training, the hyperparameters of the gas load prediction model are adaptively adjusted, including the number of hidden layer units and the dropout probability value.

[0125] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is merely an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0126] The apparatus of this invention acquires real-time gas load data streams from the air compressor station terminals; extracts load data from multiple consecutive moments, including the current moment, from the data stream to obtain a recent load sequence; identifies the current terminal operating condition based on the recent load sequence, enabling the differentiation of different terminal operating conditions, thereby subsequently calling prediction models adapted to different operating conditions; determines whether the load at the current moment has undergone a sudden change based on the data stream; determines the target terminal operating condition for prediction based on the determination result of whether the load has undergone a sudden change and the current terminal operating condition; and calls the gas load prediction model corresponding to the target terminal operating condition from the adaptive prediction model set; extracts load data from multiple consecutive moments before the current moment from the data stream to obtain historical load segments, and inputs the historical load segments into the gas load prediction model for gas load prediction, obtaining a future terminal gas load prediction sequence for a specified period. This allows for timely tracking of changes in terminal gas load and real-time adjustment of the prediction model based on the terminal gas operating conditions, ensuring a high degree of adaptability between the prediction model and the terminal operating conditions, thereby improving the accuracy of load prediction.

[0127] The following is for reference. Figure 5 It shows a schematic diagram of the structure of a computer system 500 suitable for implementing an electronic device according to embodiments of the present invention. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0128] like Figure 5 As shown, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 502 or programs loaded from storage section 508 into Random Access Memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the computer system 500. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0129] The following components are connected to I / O interface 505: input section 506 including keyboard, mouse, etc.; output section 507 including cathode ray tube, liquid crystal display, etc., and speakers, etc.; storage section 508 including hard disk, etc.; and communication section 509 including network interface card, such as modem, etc. Communication section 509 performs communication processing via a network such as the Internet. Drive 510 is also connected to I / O interface 505 as needed. Removable media 511, such as disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 510 as needed so that computer programs read from them can be installed into storage section 508 as needed.

[0130] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs the functions defined above in the system of this invention.

[0131] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical fiber, a portable compact disk read-only memory, an optical storage device, a magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, etc., or any suitable combination thereof.

[0132] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0133] The modules and / or units described in the embodiments of the present invention can be implemented in software or hardware. The described modules and / or units can also be housed in a processor; for example, a processor can be described as including an acquisition module, an identification module, a judgment module, a calling module, and a prediction module. The names of these modules do not necessarily limit the module itself.

[0134] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: The system acquires real-time data streams of gas load at the air compressor station terminals; extracts load data from multiple consecutive moments, including the current moment, from the data stream to obtain a recent load sequence, and identifies the current terminal operating condition based on the recent load sequence; determines whether a sudden change has occurred in the load at the current moment based on the data stream; determines the target terminal operating condition for prediction based on the determination result of whether a sudden change has occurred in the load and the current terminal operating condition, and calls the gas load prediction model corresponding to the target terminal operating condition from the adaptive prediction model set; extracts load data from multiple consecutive moments before the current moment from the data stream to obtain historical load segments, and inputs the historical load segments into the gas load prediction model for gas load prediction to obtain a predicted sequence of terminal gas load for a specified future period.

[0135] The technical solution of this invention involves acquiring real-time gas load data streams from the air compressor station terminals; extracting load data from multiple consecutive moments, including the current moment, from the data stream to obtain a recent load sequence; identifying the current terminal operating condition based on the recent load sequence, thus distinguishing different terminal operating conditions and subsequently calling prediction models adapted to different operating conditions; determining whether the load at the current moment has undergone a sudden change based on the data stream; determining the target terminal operating condition for prediction based on the judgment result of whether the load has undergone a sudden change and the current terminal operating condition; calling the gas load prediction model corresponding to the target terminal operating condition from the adaptive prediction model set; extracting load data from multiple consecutive moments before the current moment from the data stream to obtain historical load segments; inputting the historical load segments into the gas load prediction model for gas load prediction to obtain a future terminal gas load prediction sequence for a specified period; timely tracking of changes in terminal gas load; and adjusting the prediction model in real time according to the terminal gas operating conditions, ensuring a high degree of adaptability between the prediction model and the terminal operating conditions, thereby improving the accuracy of load prediction.

[0136] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the air compressor station terminal gas load prediction method as provided in any embodiment of this invention.

[0137] In the implementation of a computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​as well as conventional procedural programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including local area networks (LANs) or wide area networks (WANs), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0138] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0139] It should be noted that the collection, use, storage, sharing, and transfer of user personal information involved in the technical solution of this invention all comply with the provisions of relevant laws and regulations, and require notification to the user and obtaining the user's consent or authorization. Where applicable, user personal information has undergone de-identification and / or anonymization and / or encryption technical processing. In addition, a corresponding operation entry is provided for the user to choose to agree to or reject the automated decision result; if the user chooses to reject, the process proceeds to the expert decision-making process.

[0140] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for predicting the gas load at the end of an air compressor station, characterized in that, The method includes: Acquire real-time data streams of air load at the terminal of the air compressor station; Load data from multiple consecutive moments, including the current moment, are extracted from the data stream to obtain a recent load sequence, and the current terminal condition is identified based on the recent load sequence. Based on the data stream, determine whether the load at the current moment has changed abruptly; Based on the judgment result of whether the load has changed abruptly and the current terminal condition, the target terminal condition for prediction is determined, and the gas load prediction model corresponding to the target terminal condition is called from the adaptive prediction model set. Load data from multiple consecutive moments prior to the current moment are extracted from the data stream to obtain historical load segments. These historical load segments are then input into the gas load prediction model to predict gas load and obtain a predicted sequence of end-of-life gas load for a specified future period.

2. The method according to claim 1, characterized in that, Identifying the current terminal operating condition based on the recent load sequence includes: The recent load sequence is used to construct a current operating condition identification sample; Obtain the core samples of each existing end-point working condition, and calculate the density connection relationship between the current working condition identification sample and the core samples of each existing end-point working condition; If the current working condition identification sample has a density connection relationship with the core sample of an existing end working condition, then the current working condition identification sample is assigned to the corresponding existing end working condition; if the current working condition identification sample has a density connection relationship with the core samples of multiple existing end working conditions, then the multiple existing end working conditions are merged to generate a new end working condition, and the current working condition identification sample is assigned to the new end working condition. The current working condition is identified as the end working condition into which the current working condition is identified, and the feature data of the corresponding working condition in the end working condition feature library is updated.

3. The method according to claim 2, characterized in that, Determining whether the load has changed abruptly at the current moment based on the data stream includes: The historical fluctuation characteristic parameters corresponding to the current terminal condition are obtained from the terminal condition characteristic library. Based on the real-time load data under the current terminal condition and the historical fluctuation characteristic parameters, the mean and standard deviation representing the normal fluctuation range of the current terminal condition are updated. Adjust the offset coefficient used to control the sensitivity of sudden change identification based on the severity of load fluctuations in the current terminal operating condition; Based on the updated mean, standard deviation, and adjusted offset coefficient, an upper cumulative sum sequence for monitoring positive cumulative load offset and a lower cumulative sum sequence for monitoring negative cumulative load offset are constructed. Based on the updated standard deviation and the load fluctuation range of the current end condition, a dynamic threshold for determining abrupt changes is set. When the value of the upper cumulative sum sequence or the lower cumulative sum sequence exceeds the dynamic threshold, a load mutation in the corresponding direction is determined to have occurred.

4. The method according to claim 3, characterized in that, The set of adaptive prediction models is generated using the following method: Historical end-point gas load data is acquired, and after preprocessing the historical end-point gas load data, a sample set containing multiple load sample segments is constructed through a sliding window; Initial clustering is performed on the sample set to divide it into multiple initial end-condition clusters, and a corresponding end-condition feature library is established for each initial end-condition cluster. Using load sample segments within each initial end-condition cluster, train the corresponding gas load prediction model to obtain the initial prediction model set; When new terminal gas load data is obtained, the new terminal gas load data is constructed into a new load sample fragment, and the new load sample fragment is assigned to an existing terminal operating condition cluster or a new terminal operating condition cluster, and the corresponding terminal operating condition feature library is updated. When the end-point operating condition cluster is updated, the model parameters of the gas load prediction model for the corresponding cluster are updated using the corresponding newly added load sample fragments to obtain the adaptive prediction model set.

5. The method according to claim 4, characterized in that, The historical end-point gas load data is preprocessed, including: Identify outliers in the historical end-point gas load data and replace the outliers with load data from adjacent time periods; Fill in the missing values ​​in the historical terminal gas load data; The load sequence after outlier replacement and missing value filling is normalized.

6. The method according to claim 4, characterized in that, Perform initial clustering on the sample set, including: Based on the overall distribution characteristics of the sample set, the neighborhood radius parameter and density threshold parameter required for clustering are adaptively determined. Based on the neighborhood radius parameter and the density threshold parameter, sample load segments that meet the density connectivity requirements are divided into the same cluster, and each cluster corresponds to a terminal operating condition. Based on the neighborhood radius parameter and the density threshold parameter, sample load fragments that do not meet any cluster density requirements are marked as isolated noise points.

7. The method according to claim 1, characterized in that, The step of determining the target end-of-line condition for prediction based on the judgment result of whether the load has changed abruptly and the current end-of-line condition specifically includes: If it is determined that the load has not changed abruptly, then the current terminal condition is directly used as the target terminal condition; If a sudden change in load is determined, the new end condition identified in the first recent load sequence after the change is taken as the target end condition.

8. The method according to claim 1, characterized in that, Retrieving the gas load prediction model corresponding to the target end-point operating condition from the adaptive prediction model set specifically includes: Find a model from the set of adaptive prediction models that matches the target end condition; If a matching model exists, the matching model will be determined as the gas load prediction model. If no matching model exists, a new model is constructed using the real-time load data under the target terminal operating conditions, and the new model is identified as the gas load prediction model.

9. The method according to claim 1, characterized in that, The historical load segments are input into the gas load prediction model to predict gas load, resulting in a predicted sequence of end-of-life gas load for a specified future period, including: For each predicted load value at a given moment, the predicted value or the actual collected value at the corresponding moment is used as new input to update the historical load segment, and the gas load prediction model is called again to predict the next moment. Repeat the above process until load forecast values ​​for all specified times are generated, and these load forecast values ​​constitute the end-point gas load forecast sequence for the specified future time period.

10. The method according to claim 1 or 4, characterized in that, The method further includes: By analyzing the autocorrelation characteristics of the load sequence, the sliding window width used to construct the historical load segment or the load sample segment is determined, and the sliding window width is periodically adjusted based on the prediction error index. And / or, based on the historical accuracy statistics of mutation identification, the dynamic parameters used to determine mutations are periodically optimized, the dynamic parameters including mean update smoothing coefficient and dynamic threshold coefficient; And / or, based on the sample size of each end-point operating condition and the fitting state during model training, the hyperparameters of the gas load prediction model are adaptively adjusted, the hyperparameters including the number of hidden layer units and the dropout probability value.

11. A device for predicting the gas load at the end of an air compressor station, characterized in that, The device includes: The acquisition module is used to acquire real-time data streams of air load at the end of the air compressor station. The identification module is used to extract load data from the data stream for multiple consecutive moments, including the current moment, to obtain a recent load sequence, and to identify the current terminal operating condition based on the recent load sequence. The judgment module is used to determine whether the load at the current moment has changed abruptly based on the data stream; The calling module is used to determine the target end condition for prediction based on the judgment result of whether the load has changed abruptly and the current end condition, and to call the gas load prediction model corresponding to the target end condition from the adaptive prediction model set. The prediction module is used to extract load data from the data stream for multiple consecutive moments prior to the current moment to obtain historical load segments, and input the historical load segments into the gas load prediction model to predict the gas load and obtain the end-of-life gas load prediction sequence for a specified future period.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the air compressor station terminal gas load prediction method as described in any one of claims 1 to 10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the air compressor station terminal gas load prediction method as described in any one of claims 1 to 10.