Long-distance pipeline natural gas daily designation prediction method, device, equipment and medium

By collecting and analyzing historical natural gas data, constructing user characteristics, and training prediction models, the error problem in daily natural gas forecasting has been solved, achieving efficient and accurate resource allocation and supply management.

CN121936639APending Publication Date: 2026-04-28RICHFIT INFORMATION TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
RICHFIT INFORMATION TECH
Filing Date
2024-10-25
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

The existing daily forecasting management system for natural gas suffers from problems such as large human error, inaccurate data, and inability to deeply analyze historical data, leading to inaccurate forecasts and unreasonable resource allocation.

Method used

By collecting historical natural gas data, user characteristics are constructed and a daily prediction model for users is trained. An adaptive genetic algorithm is used to optimize the model parameters, thereby achieving accurate prediction and optimal resource allocation for daily natural gas data.

Benefits of technology

It improved the accuracy and reliability of forecasts, optimized resource allocation, reduced transportation costs, and enhanced work efficiency and supply chain stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121936639A_ABST
    Figure CN121936639A_ABST
Patent Text Reader

Abstract

The invention provides a long-distance pipeline natural gas daily designation prediction method, device and equipment and a medium, and the method comprises the steps: collecting natural gas historical data, extracting and constructing user features from the natural gas historical data, and constructing a user daily designation prediction model based on the user features, and training the user daily specified prediction model through the natural gas historical data to obtain a trained user daily specified prediction model, and predicting the natural gas daily specified data based on the trained user daily specified prediction model. According to the method, reasonable distribution of natural gas resources in the long-distance pipeline system can be ensured, so that the gas use requirement of a user is met, and meanwhile, balance and stability of pipeline transportation are kept.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, equipment and medium for daily forecasting of natural gas for long-distance pipelines. Background Technology

[0002] The daily designated forecast management for long-distance pipeline natural gas refers to the daily natural gas extraction volume (8:00 AM to 8:00 AM the following day) agreed upon by the natural gas sales branch company, i.e., the daily sales (distribution) execution plan for natural gas. Applications for daily designated gas usage by long-distance pipeline users are submitted by users to the provincial company, outlining their gas demand for the following day. Based on the gas supply and consumption contract, online transaction volume, and prepayment agreements, the provincial company, building upon the monthly plan, summarizes the users' gas demands for the following day and compiles a daily sales recommendation. This daily recommendation should specify the distribution stations and users. After review by the provincial company, it is submitted to the control center (emergency center) through the CRM system. The control center (emergency center) balances the daily sales recommendation submitted by the provincial company based on resource conditions and pipeline capacity, and submits the daily distribution recommendation to the Beijing Oil and Gas Control Center by region. The Beijing Oil and Gas Control Center issues the daily distribution recommendation, and the control center (emergency center) approves and issues the daily sales recommendation.

[0003] With the separation of natural gas pipeline transportation, the existing natural gas business urgently needs transformation. Currently, the provincial company's daily reference data is determined by sales personnel through self-analysis and manual calculation, which is prone to human error, leading to inaccurate or incomplete data and affecting the accuracy and reliability of the daily data. Moreover, manual calculation makes it difficult to fully utilize historical data for in-depth analysis and modeling, failing to uncover potential data correlations and trends, thus hindering scientific prediction and planning. Summary of the Invention

[0004] In view of this, embodiments of this application provide a method, apparatus, equipment, and medium for predicting the daily allocation of natural gas in long-distance pipelines, which can ensure the rational allocation of natural gas resources in long-distance pipeline systems to meet users' gas demand, while maintaining the balance and stability of pipeline transportation.

[0005] The technical solution of this application embodiment is implemented as follows:

[0006] In a first aspect, embodiments of this application provide a method for daily forecasting of natural gas for long-distance pipelines, the method comprising:

[0007] Collect historical natural gas data;

[0008] User characteristics are extracted and constructed from the historical natural gas data, and a user-specific daily prediction model is constructed based on the user characteristics;

[0009] The user-specific prediction model is trained using the historical natural gas data to obtain the trained user-specific prediction model.

[0010] The trained user-specified daily prediction model is used to predict the daily specified data for natural gas.

[0011] Secondly, embodiments of this application also provide a long-distance pipeline natural gas daily designation forecasting device, the device comprising:

[0012] The data acquisition module is used to collect historical natural gas data.

[0013] A construction module is used to extract and construct user features from the historical natural gas data, and to construct a user-specific daily prediction model based on the user features;

[0014] The training module is used to train the user-specified prediction model using the historical natural gas data to obtain the trained user-specified prediction model.

[0015] The prediction module is used to predict daily specified data of natural gas based on the trained user-specified daily prediction model.

[0016] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the long-distance pipeline natural gas daily designated forecasting method as described in any of the first aspects.

[0017] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the long-distance pipeline natural gas daily forecasting method described in any one of the first aspects.

[0018] The embodiments of this application have the following beneficial effects:

[0019] (1) Improve accuracy and reliability.

[0020] By introducing advanced data analysis and prediction models, this invention can deeply uncover hidden patterns and trends in historical data, providing strong data support for daily allocation management. This data-driven approach significantly improves the accuracy and reliability of predictions compared to traditional experience-based judgment. An adaptive genetic algorithm is used to solve the optimal solution of the daily allocation and distribution model. This algorithm effectively overcomes the problems of slow convergence, low accuracy, instability, and local convergence that traditional genetic algorithms often encounter in complex optimization processes by adaptively adjusting crossover and mutation probabilities. This improvement not only accelerates the convergence speed of global optimization but also significantly improves the solution accuracy, ensuring the scientific nature and effectiveness of the daily allocation management scheme. The intelligent management method reduces human intervention, avoiding errors caused by human judgment mistakes or improper operation. At the same time, the optimized data processing flow further reduces the error rate in the data processing process, making the daily allocation data more accurate and reliable, thereby improving the stability and reliability of natural gas supply.

[0021] (2) Improve work efficiency.

[0022] This application's embodiments automate data processing and decision-making processes, significantly reducing manual operations and time consumption. This not only lowers labor costs but also improves work efficiency, allowing managers to focus more on high-value tasks such as strategy formulation and anomaly handling. The intelligent management system can analyze market data and changes in user demand in real time, quickly adjusting daily management plans to adapt to market fluctuations. This rapid response capability helps maintain supply chain stability and flexibility, improving customer satisfaction and market competitiveness.

[0023] (3) Optimize resource allocation.

[0024] Based on in-depth analysis and modeling of historical data and trends, the embodiments of this application can accurately predict natural gas demand over a future period. This provides a scientific basis for the rational allocation of resources, helping to achieve supply and demand balance and maximize resource utilization. Through the embodiments of this application, multiple factors such as pipeline transportation capacity, user demand, and market prices can be comprehensively considered to formulate the optimal resource allocation plan. This not only reduces transportation costs and improves transportation efficiency but also maximizes economic benefits while ensuring stable supply. Attached Figure Description

[0025] To more clearly illustrate the technical solutions of the embodiments of this application, 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 this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 This is a flowchart illustrating steps S101-S104 provided in the embodiments of this application;

[0027] Figure 2 This is a flowchart illustrating steps S201-S203 provided in the embodiments of this application;

[0028] Figure 3 This is a schematic diagram of the structure of the long-distance pipeline natural gas daily designation forecasting device provided in the embodiments of this application;

[0029] Figure 4 This is a schematic diagram of the composition structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0031] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0032] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0033] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0034] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application and is not intended to limit the scope of this application.

[0036] See Figure 1 , Figure 1 This is a flowchart illustrating steps S101-S104 of the daily designated forecasting method for natural gas in long-distance pipelines provided in this application embodiment, which will be combined with... Figure 1 Steps S101-S104 are explained below.

[0037] In step S101, historical natural gas data is collected.

[0038] In some embodiments, the historical natural gas data includes natural gas supply and demand data and user behavior data; the user characteristics include time characteristics, historical gas consumption characteristics, and other external characteristics;

[0039] The natural gas supply and demand data includes historical natural gas distribution data, pipeline operation data, historical gas consumption scale, and historical daily designated data;

[0040] The user behavior data includes user-reported plans, daily natural gas extraction volume, user type, user ID, whether gas usage is continuous, purpose of natural gas use, whether gas usage is stable, and whether gas usage is regular.

[0041] Here, natural gas supply and demand data includes:

[0042] Historical natural gas distribution data: This data records the distribution and transmission of natural gas at different times and locations, and is an important basis for assessing the efficiency, stability and demand distribution of the natural gas supply network.

[0043] Pipeline operation data: including real-time or historical monitoring data such as pipeline pressure, flow rate, and temperature, used to monitor pipeline health, prevent leaks, and optimize transportation efficiency.

[0044] Historical gas consumption: This reflects the overall or regional / sectoral consumption of natural gas over a past period, helping to understand long-term demand trends and seasonal changes.

[0045] Historical date-specific data (which may refer to data on specific dates, such as holidays, extreme weather days, etc.): This data is particularly crucial for analyzing the impact of special events on natural gas demand and helps improve emergency response capabilities and the accuracy of demand forecasting.

[0046] User behavior data includes:

[0047] User-reported plans: Gas usage plans reported by users in advance based on their own needs are of great reference value for gas suppliers in resource allocation and supply arrangements.

[0048] The amount of natural gas a user extracts daily directly reflects the user's actual gas consumption and is the basis for assessing the stability of user demand and predicting future demand.

[0049] User types include industrial users, commercial users, and residential users. Different types of users often have different gas usage characteristics and demand patterns. Categorized management helps improve service quality and efficiency.

[0050] User ID: Uniquely identifies each user and is the basis for tracking user behavior and providing personalized services.

[0051] Whether gas usage is continuous reflects the stability and continuity of the user's gas supply, which is helpful for predicting short-term demand and developing contingency plans.

[0052] Uses of natural gas: such as heating, power generation, chemical raw materials, etc. The demand characteristics and fluctuation patterns of natural gas differ depending on the use. Understanding the uses helps to predict demand more accurately.

[0053] Gas consumption stability: This describes the fluctuations in the user's gas consumption. Stable gas consumption helps reduce supply fluctuations and costs.

[0054] Whether gas consumption is regular: The presence of obvious seasonal or cyclical gas consumption patterns is of great significance for long-term demand forecasting and supply planning;

[0055] User characteristics include time characteristics, historical gas consumption characteristics, and other external characteristics. Time characteristics refer to user behavior or demand patterns related to time. Historical gas consumption characteristics refer to the features shown by the user's gas consumption data over a past period. Other external characteristics refer to external factors related to the user's gas consumption behavior but not directly controlled by the user, such as weather factors, economic factors, and policy factors.

[0056] In some embodiments, after collecting historical natural gas data, the method further includes:

[0057] The historical natural gas data is divided into a multidimensional dataset by using at least one of the following as target dimensions: user ID, whether gas consumption is continuous, natural gas usage, whether gas consumption is stable, whether gas consumption is regular, historical gas consumption scale, and historical daily specified data. The natural gas usage is divided according to compressed natural gas, liquefied natural gas, city gas, power generation, industrial fuel, pipeline company, fertilizer, and transportation. The historical gas consumption scale and the historical daily specified data are scaled based on the upper and lower limits of the collected data.

[0058] Here, after collecting historical natural gas data, the next step is to divide this data according to specific target dimensions to construct a multidimensional dataset. These target dimensions can reflect different user characteristics and gas usage behaviors, thereby helping the model to more accurately predict future daily specified data.

[0059] User ID: Uniquely identifies each user, used to distinguish different users' gas usage behavior and needs. Continuous Gas Use: Reflects whether a user uses natural gas continuously and stably, helping to identify seasonal or temporary gas usage.

[0060] Natural gas uses are categorized according to their applications, including compressed natural gas (CNG), liquefied natural gas (LNG), city gas, power generation, industrial fuel, pipeline companies, fertilizer production, and transportation. Natural gas consumption for different uses is influenced by various factors, such as seasonal demand, policy changes, and market prices.

[0061] Is gas usage stable? Assessing fluctuations in user gas consumption helps predict future demand.

[0062] Is the gas usage regular? Identify whether the user has a predictable periodic gas usage pattern, such as daily, weekly, monthly, or seasonal patterns.

[0063] Historical gas consumption: This reflects the user's total or average gas consumption in the past and can serve as an important reference for predicting future demand.

[0064] Historical daily quota data: The daily quotas that have been determined in the past directly reflect the actual demand and supply situation of users.

[0065] The scaling of historical gas consumption data and historical day-specific data is based on the upper and lower limits of the collected data. The purpose of this step is to standardize or normalize the data for easier handling during model training. Scaling methods can include linear scaling (such as min-max normalization), logarithmic scaling, or Z-score normalization, depending on the data distribution characteristics and model requirements.

[0066] Based on the selected target dimensions, historical natural gas data is divided into multiple subsets or levels to form a multidimensional dataset. This dataset will contain multiple dimensions (such as user ID, usage, and whether gas consumption is continuous) and metrics (such as historical gas consumption scale and historical day-specific data). The construction of the multidimensional dataset helps to deeply mine information and correlations in the data from different angles and levels during subsequent analysis and forecasting.

[0067] In step S102, user features are extracted and constructed from the historical natural gas data, and a user-specific daily prediction model is constructed based on the user features.

[0068] In some embodiments, see Figure 2 , Figure 2 This is a flowchart illustrating steps S201-S203 provided in the embodiments of this application. The construction of a user-specific prediction model based on the user characteristics can be achieved through steps S201-S203, which will be explained in conjunction with each step.

[0069] In step S201, at least one regression tree is generated based on the use of natural gas, whether the gas consumption is continuous, whether the gas consumption is stable, whether the gas consumption is regular, and the historical gas consumption scale. The leaf nodes of each regression tree in the at least one regression tree are the adjustment ratios of the daily specified data.

[0070] In step S202, the predicted value of the daily specified data is determined based on the sum of the products of the user-reported plan and each regression tree, as well as the adjustment ratio.

[0071] In step S203, the user-specified prediction model is constructed based on the predicted values ​​of the specified daily data.

[0072] Here, the user-defined daily prediction model is constructed based on user characteristics. It uses regression trees (such as single trees in random forests, gradient boosting trees, etc.) in ensemble learning methods to predict the adjustment ratio of the daily specified data. The final predicted value of the daily specified data is determined by the interaction between these regression trees and the user's reported plan.

[0073] First, factors that significantly influence daily specified data prediction are selected from user characteristics as input features for constructing the regression tree. These include natural gas usage, whether gas consumption is continuous, whether consumption is stable, whether consumption is regular, and historical consumption scale. Based on these features, at least one regression tree is generated. Each regression tree recursively divides the dataset into smaller subsets (i.e., tree nodes) and outputs a predicted value (in this scenario, the adjustment ratio of the daily specified data) at each leaf node. This adjustment ratio reflects the increase or decrease of the actual daily specified volume relative to a certain baseline value (such as user-reported plans) under given feature conditions. Historical data is used to train each regression tree so that it can accurately predict the adjustment ratio of the daily specified data based on the input features. During training, strategies such as feature selection and pruning may be involved to optimize the tree structure and performance.

[0074] Users submit their gas demand plan for the following day to the provincial company daily; this is known as the user-reported plan. The process involves interacting with regression trees: the user-reported plan is interacted with each regression tree individually. This typically means using the user-reported plan as input, obtaining the corresponding adjustment ratio from each regression tree. The user-reported plan is multiplied by the adjustment ratio output from each regression tree, and these products are summed (or weighted summed according to some weight) to obtain a comprehensive adjustment factor. Finally, the user-reported plan is multiplied by this comprehensive adjustment factor to obtain the predicted value for the specified daily data. This predicted value considers both the user's own gas demand plan and characteristics, as well as historical data and model predictions.

[0075] For example, the predicted value of the specified daily data.

[0076]

[0077] in, Specify data for the predicted day;

[0078] C represents the user-reported plan;

[0079] T represents the number of regression trees generated;

[0080] The adjustment ratio is as described above;

[0081] f k For regression trees;

[0082] f k (X)=w q(x) q represents the structural part of the regression tree, and w represents the leaf weight of the regression tree.

[0083] In step S103, the user-designated prediction model is trained using the historical natural gas data to obtain the trained user-designated prediction model.

[0084] In some embodiments, historical data is used to train a selected predictive model. By adjusting model parameters and optimizing algorithms, the model is made able to accurately capture patterns and trends in the data. The trained model is validated using independent test set data. The model's predictive accuracy, stability, robustness, and other metrics are evaluated to ensure that the model performs well in real-world applications.

[0085] For example, based on the historical natural gas data, a user-specified daily prediction model is trained using an objective function, which is:

[0086]

[0087] in, This represents the difference between the actual and predicted values.

[0088] This is the error function for the regression tree, used to control the complexity of the tree and reduce model overfitting; J represents the number of leaf nodes in each tree, and γ and θ are weighting coefficients.

[0089] In some embodiments, the method further includes:

[0090] An optimization function is established with the objective of maximizing the gas sales revenue of the natural gas sales company to optimize the distribution scheme. The mathematical model is as follows:

[0091]

[0092] S t =S lt +S mt +S kt

[0093] in

[0094] P l This is the gas company's natural gas sales price, in yuan / m³. 3 ;

[0095] S lt This represents the gas supply to the gas company in hour t, in m³. 3 ;

[0096] P m The price of natural gas for interruptible users is expressed in yuan / m³. 3 ;

[0097] S mt The gas supply to interruptible users in hour t, in m³. 3 ;

[0098] P kThe price of natural gas for uninterrupted users is expressed in yuan / m³. 3 ;

[0099] S kt This represents the uninterrupted gas supply to the user in hour t, in m³. 3 ;

[0100] S t The total gas supply in hour t, in m³. 3 ;

[0101] C1 represents the cost of purchasing natural gas, expressed in yuan / m³. 3 ;

[0102] C2 represents other expenses besides the cost of purchasing gas, expressed in yuan.

[0103] The model shows that natural gas sales revenue equals the sum of the products of the gas volume supplied to each different natural gas user and the corresponding gas price sold to each user, minus the gas purchase cost and other daily expenses. By applying constraints, more natural gas can be supplied to users with higher prices while meeting the gas needs of different users and ensuring safe gas use, thus maximizing sales revenue.

[0104] To improve the rationality and profitability of the natural gas distribution scheme, this application proposes a daily designated natural gas distribution optimization scheme. With the goal of maximizing natural gas sales revenue, and while meeting the basic gas needs of natural gas users and ensuring gas transmission safety, the scheme considers the different gas prices for different users and establishes an objective function. An adaptive genetic algorithm is then used to solve the model. Compared with existing distribution schemes such as the comprehensive weight method and the improved remaining hours method, this scheme effectively increases gas sales revenue.

[0105] In step S104, the daily specified data of natural gas is predicted based on the trained user daily specified prediction model.

[0106] After obtaining the forecast results, they also need to be approved to ensure the quality and compliance of the generated sales recommendation date data, providing a reliable basis for subsequent distribution recommendation date assignments and ensuring the normal operation of the entire system.

[0107] In summary, the embodiments of this application have the following beneficial effects:

[0108] (1) Improve accuracy and reliability.

[0109] By introducing advanced data analysis and prediction models, this invention can deeply uncover hidden patterns and trends in historical data, providing strong data support for daily allocation management. This data-driven approach significantly improves the accuracy and reliability of predictions compared to traditional experience-based judgment. An adaptive genetic algorithm is used to solve the optimal solution of the daily allocation and distribution model. This algorithm effectively overcomes the problems of slow convergence, low accuracy, instability, and local convergence that traditional genetic algorithms often encounter in complex optimization processes by adaptively adjusting crossover and mutation probabilities. This improvement not only accelerates the convergence speed of global optimization but also significantly improves the solution accuracy, ensuring the scientific nature and effectiveness of the daily allocation management scheme. The intelligent management method reduces human intervention, avoiding errors caused by human judgment mistakes or improper operation. At the same time, the optimized data processing flow further reduces the error rate in the data processing process, making the daily allocation data more accurate and reliable, thereby improving the stability and reliability of natural gas supply.

[0110] (2) Improve work efficiency.

[0111] This application's embodiments automate data processing and decision-making processes, significantly reducing manual operations and time consumption. This not only lowers labor costs but also improves work efficiency, allowing managers to focus more on high-value tasks such as strategy formulation and anomaly handling. The intelligent management system can analyze market data and changes in user demand in real time, quickly adjusting daily management plans to adapt to market fluctuations. This rapid response capability helps maintain supply chain stability and flexibility, improving customer satisfaction and market competitiveness.

[0112] (3) Optimize resource allocation.

[0113] Based on in-depth analysis and modeling of historical data and trends, the embodiments of this application can accurately predict natural gas demand over a future period. This provides a scientific basis for the rational allocation of resources, helping to achieve supply and demand balance and maximize resource utilization. Through the embodiments of this application, multiple factors such as pipeline transportation capacity, user demand, and market prices can be comprehensively considered to formulate the optimal resource allocation plan. This not only reduces transportation costs and improves transportation efficiency but also maximizes economic benefits while ensuring stable supply.

[0114] Based on the same inventive concept, this application also provides a long-distance pipeline natural gas daily designated forecasting device corresponding to the long-distance pipeline natural gas daily designated forecasting method in the first embodiment. Since the principle of the device in this application is similar to the above-mentioned long-distance pipeline natural gas daily designated forecasting method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0115] like Figure 3 As shown, Figure 3 This is a schematic diagram of the structure of the long-distance pipeline natural gas daily designated forecasting device 300 provided in an embodiment of this application. The long-distance pipeline natural gas daily designated forecasting device 300 includes:

[0116] Acquisition module 301 is used to collect historical natural gas data;

[0117] The construction module 302 is used to extract and construct user features from the historical natural gas data, and construct a user-specific daily prediction model based on the user features;

[0118] Training module 303 is used to train the user-specified prediction model using the historical natural gas data to obtain the trained user-specified prediction model.

[0119] The prediction module 304 is used to predict the daily specified data of natural gas based on the trained user-specified daily prediction model.

[0120] Those skilled in the art should understand that Figure 3 The functions of each unit in the long-distance pipeline natural gas daily designated forecasting device 300 shown can be understood with reference to the relevant description of the long-distance pipeline natural gas daily designated forecasting method. Figure 3 The functions of each unit in the long-distance pipeline natural gas daily forecasting device 300 shown can be implemented by a program running on a processor or by specific logic circuits.

[0121] In one possible implementation, the historical natural gas data includes historical natural gas distribution data, pipeline operation data, user-reported plans, daily natural gas extraction volume by users, user type, user ID, whether gas usage is continuous, natural gas purpose, whether gas usage is stable, whether gas usage is regular, historical gas usage scale, and historical daily specified data.

[0122] In one possible implementation, after the acquisition module 301 acquires historical natural gas data, it further includes:

[0123] The historical natural gas data is divided into a multidimensional dataset by using at least one of the following as target dimensions: user ID, whether gas consumption is continuous, natural gas usage, whether gas consumption is stable, whether gas consumption is regular, historical gas consumption scale, and historical daily specified data. The natural gas usage is divided according to compressed natural gas, liquefied natural gas, city gas, power generation, industrial fuel, pipeline company, fertilizer, and transportation. The historical gas consumption scale and the historical daily specified data are scaled based on the upper and lower limits of the collected data.

[0124] In one possible implementation, the construction module 302 constructs a user-specific prediction model based on the user characteristics, including:

[0125] At least one regression tree is generated based on the use of natural gas, whether the gas consumption is continuous, whether the gas consumption is stable, whether the gas consumption is regular, and the historical gas consumption scale. The leaf nodes of each regression tree in the at least one regression tree are the adjustment ratios of the daily specified data.

[0126] The predicted value of the specified daily data is determined based on the sum of the products of the user-reported plan and each regression tree, as well as the adjustment ratio.

[0127] The user-specified daily prediction model is constructed based on the predicted values ​​of the specified daily data.

[0128] In one possible implementation, the predicted value of the day-specified data

[0129]

[0130] in, Specify data for the predicted day;

[0131] C represents the user-reported plan;

[0132] T represents the number of regression trees generated;

[0133] The adjustment ratio is as described above;

[0134] f k For regression trees;

[0135] f k (X)=w q(x) q represents the structural part of the regression tree, and w represents the leaf weight of the regression tree.

[0136] In one possible implementation, the training module 303 trains the user-day designated prediction model using the historical natural gas data to obtain the trained user-day designated prediction model, including:

[0137] Based on the historical natural gas data, the user-specified daily prediction model is trained using an objective function, which is:

[0138]

[0139] in, This represents the difference between the actual and predicted values.

[0140] This is the error function for the regression tree, used to control the complexity of the tree and reduce model overfitting;

[0141] J represents the number of leaf nodes in each tree, and γ and θ are weighting coefficients.

[0142] In one possible implementation, the building module 303 further includes:

[0143] An optimization function is established with the objective of maximizing the gas sales revenue of the natural gas sales company to optimize the distribution scheme. The mathematical model is as follows:

[0144]

[0145] S t =S lt +S mt +S kt

[0146] in

[0147] P l This is the gas company's natural gas sales price, in yuan / m³. 3 ;

[0148] S lt This represents the gas supply to the gas company in hour t, in m³. 3 ;

[0149] P m The price of natural gas for interruptible users is expressed in yuan / m³. 3 ;

[0150] S mt The gas supply to interruptible users in hour t, in m³. 3 ;

[0151] P k The price of natural gas for uninterrupted users is expressed in yuan / m³. 3 ;

[0152] S kt This represents the uninterrupted gas supply to the user in hour t, in m³. 3 ;

[0153] S t The total gas supply in hour t, in m³. 3 ;

[0154] C1 represents the cost of purchasing natural gas, expressed in yuan / m³. 3 ;

[0155] C2 represents other expenses besides the cost of purchasing gas, expressed in yuan.

[0156] The aforementioned long-distance pipeline natural gas daily designated forecasting device has the following beneficial effects:

[0157] (1) Improve accuracy and reliability.

[0158] By introducing advanced data analysis and prediction models, this invention can deeply uncover hidden patterns and trends in historical data, providing strong data support for daily allocation management. This data-driven approach significantly improves the accuracy and reliability of predictions compared to traditional experience-based judgment. An adaptive genetic algorithm is used to solve the optimal solution of the daily allocation and distribution model. This algorithm effectively overcomes the problems of slow convergence, low accuracy, instability, and local convergence that traditional genetic algorithms often encounter in complex optimization processes by adaptively adjusting crossover and mutation probabilities. This improvement not only accelerates the convergence speed of global optimization but also significantly improves the solution accuracy, ensuring the scientific nature and effectiveness of the daily allocation management scheme. The intelligent management method reduces human intervention, avoiding errors caused by human judgment mistakes or improper operation. At the same time, the optimized data processing flow further reduces the error rate in the data processing process, making the daily allocation data more accurate and reliable, thereby improving the stability and reliability of natural gas supply.

[0159] (2) Improve work efficiency.

[0160] This application's embodiments automate data processing and decision-making processes, significantly reducing manual operations and time consumption. This not only lowers labor costs but also improves work efficiency, allowing managers to focus more on high-value tasks such as strategy formulation and anomaly handling. The intelligent management system can analyze market data and changes in user demand in real time, quickly adjusting daily management plans to adapt to market fluctuations. This rapid response capability helps maintain supply chain stability and flexibility, improving customer satisfaction and market competitiveness.

[0161] (3) Optimize resource allocation.

[0162] Based on in-depth analysis and modeling of historical data and trends, the embodiments of this application can accurately predict natural gas demand over a future period. This provides a scientific basis for the rational allocation of resources, helping to achieve supply and demand balance and maximize resource utilization. Through the embodiments of this application, multiple factors such as pipeline transportation capacity, user demand, and market prices can be comprehensively considered to formulate the optimal resource allocation plan. This not only reduces transportation costs and improves transportation efficiency but also maximizes economic benefits while ensuring stable supply.

[0163] like Figure 4 As shown, Figure 4 This is a schematic diagram of the composition structure of the electronic device 400 provided in the embodiments of this application. The electronic device 400 includes:

[0164] The device includes a processor 401, a storage medium 402, and a bus 403. The storage medium 402 stores machine-readable instructions that can be executed by the processor 401. When the electronic device 400 is running, the processor 401 communicates with the storage medium 402 via the bus 403. The processor 401 executes the machine-readable instructions to perform the steps of the long-distance pipeline natural gas daily forecasting method described in the embodiments of this application.

[0165] In practical applications, the various components in the electronic device 400 are coupled together via a bus 403. It is understood that the bus 403 is used to achieve communication between these components. In addition to a data bus, the bus 403 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 4 The general designated all buses as Bus 403.

[0166] The above-mentioned electronic devices have the following beneficial effects:

[0167] (1) Improve accuracy and reliability.

[0168] By introducing advanced data analysis and prediction models, this invention can deeply uncover hidden patterns and trends in historical data, providing strong data support for daily allocation management. This data-driven approach significantly improves the accuracy and reliability of predictions compared to traditional experience-based judgment. An adaptive genetic algorithm is used to solve the optimal solution of the daily allocation and distribution model. This algorithm effectively overcomes the problems of slow convergence, low accuracy, instability, and local convergence that traditional genetic algorithms often encounter in complex optimization processes by adaptively adjusting crossover and mutation probabilities. This improvement not only accelerates the convergence speed of global optimization but also significantly improves the solution accuracy, ensuring the scientific nature and effectiveness of the daily allocation management scheme. The intelligent management method reduces human intervention, avoiding errors caused by human judgment mistakes or improper operation. At the same time, the optimized data processing flow further reduces the error rate in the data processing process, making the daily allocation data more accurate and reliable, thereby improving the stability and reliability of natural gas supply.

[0169] (2) Improve work efficiency.

[0170] This application's embodiments automate data processing and decision-making processes, significantly reducing manual operations and time consumption. This not only lowers labor costs but also improves work efficiency, allowing managers to focus more on high-value tasks such as strategy formulation and anomaly handling. The intelligent management system can analyze market data and changes in user demand in real time, quickly adjusting daily management plans to adapt to market fluctuations. This rapid response capability helps maintain supply chain stability and flexibility, improving customer satisfaction and market competitiveness.

[0171] (3) Optimize resource allocation.

[0172] Based on in-depth analysis and modeling of historical data and trends, the embodiments of this application can accurately predict natural gas demand over a future period. This provides a scientific basis for the rational allocation of resources, helping to achieve supply and demand balance and maximize resource utilization. Through the embodiments of this application, multiple factors such as pipeline transportation capacity, user demand, and market prices can be comprehensively considered to formulate the optimal resource allocation plan. This not only reduces transportation costs and improves transportation efficiency but also maximizes economic benefits while ensuring stable supply.

[0173] This application also provides a computer-readable storage medium storing executable instructions that, when executed by at least one processor 401, implement the long-distance pipeline natural gas daily forecasting method described in this application.

[0174] In some embodiments, the storage medium may be a magnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CDROM), etc.; or it may be a device that includes one or any combination of the above-mentioned memories.

[0175] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0176] As an example, executable instructions may, but do not necessarily, correspond to files in the file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0177] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0178] The aforementioned computer-readable storage media have the following beneficial effects:

[0179] (1) Improve accuracy and reliability.

[0180] By introducing advanced data analysis and prediction models, this invention can deeply uncover hidden patterns and trends in historical data, providing strong data support for daily allocation management. This data-driven approach significantly improves the accuracy and reliability of predictions compared to traditional experience-based judgment. An adaptive genetic algorithm is used to solve the optimal solution of the daily allocation and distribution model. This algorithm effectively overcomes the problems of slow convergence, low accuracy, instability, and local convergence that traditional genetic algorithms often encounter in complex optimization processes by adaptively adjusting crossover and mutation probabilities. This improvement not only accelerates the convergence speed of global optimization but also significantly improves the solution accuracy, ensuring the scientific nature and effectiveness of the daily allocation management scheme. The intelligent management method reduces human intervention, avoiding errors caused by human judgment mistakes or improper operation. At the same time, the optimized data processing flow further reduces the error rate in the data processing process, making the daily allocation data more accurate and reliable, thereby improving the stability and reliability of natural gas supply.

[0181] (2) Improve work efficiency.

[0182] This application's embodiments automate data processing and decision-making processes, significantly reducing manual operations and time consumption. This not only lowers labor costs but also improves work efficiency, allowing managers to focus more on high-value tasks such as strategy formulation and anomaly handling. The intelligent management system can analyze market data and changes in user demand in real time, quickly adjusting daily management plans to adapt to market fluctuations. This rapid response capability helps maintain supply chain stability and flexibility, improving customer satisfaction and market competitiveness.

[0183] (3) Optimize resource allocation.

[0184] Based on in-depth analysis and modeling of historical data and trends, the embodiments of this application can accurately predict natural gas demand over a future period. This provides a scientific basis for the rational allocation of resources, helping to achieve supply and demand balance and maximize resource utilization. Through the embodiments of this application, multiple factors such as pipeline transportation capacity, user demand, and market prices can be comprehensively considered to formulate the optimal resource allocation plan. This not only reduces transportation costs and improves transportation efficiency but also maximizes economic benefits while ensuring stable supply.

[0185] In the several embodiments provided in this application, it should be understood that the disclosed methods and electronic devices can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components may be combined, or integrated into another system, or some features may be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0186] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0187] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0188] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a platform server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0189] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for daily forecasting of natural gas for long-distance pipelines, characterized in that, The method includes: Collect historical natural gas data; User characteristics are extracted and constructed from the historical natural gas data, and a user-specific daily prediction model is constructed based on the user characteristics; The user-specific prediction model is trained using the historical natural gas data to obtain the trained user-specific prediction model. The trained user-specified daily prediction model is used to predict the daily specified data for natural gas.

2. The method according to claim 1, characterized in that, The historical natural gas data includes natural gas supply and demand data and user behavior data; the user characteristics include time characteristics, historical gas consumption characteristics, and other external characteristics. The natural gas supply and demand data includes historical natural gas distribution data, pipeline operation data, historical gas consumption scale, and historical daily designated data; The user behavior data includes user-reported plans, daily natural gas extraction volume, user type, user ID, whether gas usage is continuous, purpose of natural gas use, whether gas usage is stable, and whether gas usage is regular.

3. The method according to claim 2, characterized in that, After collecting historical natural gas data, the method further includes: The historical natural gas data is divided into a multidimensional dataset by using at least one of the following as target dimensions: user ID, whether gas consumption is continuous, natural gas usage, whether gas consumption is stable, whether gas consumption is regular, historical gas consumption scale, and historical daily specified data. The natural gas usage is divided according to compressed natural gas, liquefied natural gas, city gas, power generation, industrial fuel, pipeline company, fertilizer, and transportation. The historical gas consumption scale and the historical daily specified data are scaled based on the upper and lower limits of the collected data.

4. The method according to claim 2, characterized in that, The step of constructing a user-specific daily prediction model based on the user characteristics includes: At least one regression tree is generated based on the use of natural gas, whether the gas consumption is continuous, whether the gas consumption is stable, whether the gas consumption is regular, and the historical gas consumption scale. The leaf nodes of each regression tree in the at least one regression tree are the adjustment ratios of the daily specified data. The predicted value of the specified daily data is determined based on the sum of the products of the user-reported plan and each regression tree, as well as the adjustment ratio. The user-specified daily prediction model is constructed based on the predicted values ​​of the specified daily data.

5. The method according to claim 4, characterized in that, The predicted value of the specified daily data in, Specify data for the predicted day; C represents the user-reported plan; T represents the number of regression trees generated; The adjustment ratio is as described above; f k For regression trees; f k (X)=w q(x) q represents the structural part of the regression tree, and w represents the leaf weight of the regression tree.

6. The method according to claim 5, characterized in that, The step of training the user-day designated prediction model using the historical natural gas data to obtain the trained user-day designated prediction model includes: Based on the historical natural gas data, the user-specified daily prediction model is trained using an objective function, wherein the objective function is: in, This represents the difference between the actual and predicted values. This is the error function for the regression tree, used to control the complexity of the tree and reduce model overfitting; J represents the number of leaf nodes in each tree, and γ and θ are weighting coefficients.

7. The method according to claim 1, characterized in that, The method further includes: An optimization function is established with the objective of maximizing the gas sales revenue of the natural gas sales company to optimize the distribution scheme. The mathematical model is as follows: S t =S lt +S mt +S kt in P l This is the gas company's natural gas sales price, in yuan / m³. 3 ; S lt This represents the gas supply to the gas company in hour t, in m³. 3 ; P m The price of natural gas for interruptible users is expressed in yuan / m³. 3 ; S mt The gas supply to interruptible users in hour t, in m³. 3 ; P k The price of natural gas for uninterrupted users is expressed in yuan / m³. 3 ; S kt This represents the uninterrupted gas supply to the user in hour t, in m³. 3 ; S t The total gas supply in hour t, in m³. 3 ; C1 represents the cost of purchasing natural gas, expressed in yuan / m³. 3 ; C1 represents other expenses besides the cost of purchasing gas, expressed in yuan.

8. A daily forecasting device for natural gas in long-distance pipelines, characterized in that, The device includes: The data acquisition module is used to collect historical natural gas data. A construction module is used to extract and construct user features from the historical natural gas data, and to construct a user-specific daily prediction model based on the user features; The training module is used to train the user-specified prediction model using the historical natural gas data to obtain the trained user-specified prediction model. The prediction module is used to predict daily specified data of natural gas based on the trained user-specified daily prediction model.

9. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is in operation, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the long-distance pipeline natural gas daily designation forecasting method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the long-distance pipeline natural gas daily assignment forecasting method as described in any one of claims 1 to 7.