Gas quantity prediction method and device, electronic equipment and storage medium

By combining multimodal large-scale models that combine historical gas volume, weather information and text data, the problem of insufficient accuracy of gas volume prediction in the prior art is solved, and more accurate gas volume prediction is achieved.

CN119623737APending Publication Date: 2025-03-14新奥新智科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411707413.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The accuracy of gas volume prediction in the prior art is poor, mainly because the complexity and variability of gas usage rules of customers in multiple industries have not been fully considered.

Method used

By obtaining the gas quantity, weather information and related text data for each unit time period in the historical time period, combining the multimodal large model to feature extraction of the timing and text data, and fusing the feature vectors to predict the gas quantity after the preset time.

Benefits of technology

Improves the accuracy of gas volume forecasting, taking into account the impact of historically used gas volume, weather information and related text data on the forecast.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623737A_ABST
    Figure CN119623737A_ABST
Patent Text Reader

Abstract

The invention discloses a gas quantity prediction method and device, electronic equipment and a storage medium. The method comprises the steps that firstly, a time sequence moment is determined according to the gas quantity used in each first unit time period in a historical time period and corresponding weather information; determining text description data according to the first text data related to the used gas amount in the historical time period; and then inputting the time series data and the text description data into a pre-trained multi-modal large model, respectively carrying out feature extraction on the time series data and the text description data based on the multi-modal large model, and determining a predicted gas amount after a preset time. Specifically, feature extraction is performed on time series data based on a multi-modal large model to obtain a first feature vector; performing feature extraction on the text description data to obtain a second feature vector; determining a fusion feature vector according to the first feature vector and the second feature vector; and determining a predicted gas amount after a preset time based on the fused feature vector. Therefore, the accuracy of predicting the gas quantity is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of natural gas demand forecasting, and in particular to a gas quantity forecasting method, device, electronic equipment and storage medium. Background Art

[0002] Natural gas is an important clean energy source. The promotion and use of natural gas has irreplaceable strategic significance for ensuring the security of national energy supply and coping with climate issues. In the context of rapid development, how to ensure the effective supply of natural gas, how to formulate a natural gas import strategy in a rhythmic manner, and how to organize the exploration and development of natural gas resources in a tiered manner, the answers to these questions all rely on the scientific and effective prediction of natural gas demand. The effective prediction of natural gas demand can also provide a reference for the rational production scheduling and resource allocation from the micro supply side.

[0003] In the prior art, the natural gas demand in the future is generally predicted based on the natural gas consumption in the historical time period. However, in the field of natural gas demand forecasting, the complexity and variability of the gas consumption patterns of customers in multiple industries is one of the main challenges facing the forecasting model. The gas consumption patterns of different industries are affected by many factors. The solutions in the prior art take fewer factors into consideration, resulting in poor accuracy in gas volume forecasting. Summary of the invention

[0004] The present application provides a gas quantity prediction method, device, electronic device and storage medium to solve the problem of poor accuracy of gas quantity prediction in the prior art.

[0005] In a first aspect, the present application provides a method for predicting gas volume, the method comprising:

[0006] Obtaining the amount of gas used and the corresponding weather information for each first unit time period in the historical time period, as well as first text data related to the amount of gas used, and determining time series data according to the amount of gas used and the corresponding weather information for each first unit time period; determining text description data according to the first text data for each first unit time period; wherein the first text data includes at least one of business scope data, energy-consuming equipment data, environmental protection news data, and holiday data;

[0007] Inputting the time series data and the text description data into a pre-trained multimodal large model, and determining the predicted gas volume after a preset time based on the multimodal large model;

[0008] Among them, the multimodal large model is used to extract features from the time series data to obtain a first feature vector; extract features from the text description data to obtain a second feature vector; determine a fused feature vector based on the first feature vector and the second feature vector; and determine the predicted gas volume after the preset time based on the fused feature vector.

[0009] In a second aspect, the present application provides a gas volume prediction device, the device comprising:

[0010] A determination module, used to obtain the gas volume used in each first unit time period in the historical time period and the corresponding weather information, as well as first text data related to the gas volume used, and determine the time series data according to the gas volume used in each first unit time period and the corresponding weather information; determine the text description data according to the first text data of each first unit time period; wherein the first text data includes at least one of business scope data, energy-consuming equipment data, environmental protection news data and holiday data;

[0011] A prediction module is used to input the time series data and the text description data into a pre-trained multimodal large model, and determine the predicted gas volume after a preset time based on the multimodal large model; wherein the multimodal large model is used to perform feature extraction on the time series data to obtain a first feature vector; perform feature extraction on the text description data to obtain a second feature vector; determine a fused feature vector based on the first feature vector and the second feature vector; and determine the predicted gas volume after the preset time based on the fused feature vector.

[0012] In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0013] Memory, used to store computer programs;

[0014] The processor is used to implement the method when executing the program stored in the memory.

[0015] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the described method is implemented.

[0016] The present application provides a gas volume prediction method, device, electronic device and storage medium, the method comprising:

[0017] Obtaining the amount of gas used and the corresponding weather information for each first unit time period in the historical time period, as well as first text data related to the amount of gas used, and determining time series data according to the amount of gas used and the corresponding weather information for each first unit time period; determining text description data according to the first text data for each first unit time period; wherein the first text data includes at least one of business scope data, energy-consuming equipment data, environmental protection news data, and holiday data;

[0018] Inputting the time series data and the text description data into a pre-trained multimodal large model, and determining the predicted gas volume after a preset time based on the multimodal large model;

[0019] Among them, the multimodal large model is used to extract features from the time series data to obtain a first feature vector; extract features from the text description data to obtain a second feature vector; determine a fused feature vector based on the first feature vector and the second feature vector; and determine the predicted gas volume after the preset time based on the fused feature vector.

[0020] The above technical solution has the following advantages or beneficial effects:

[0021] In the present application, firstly, the time series moment is determined according to the gas volume used in each first unit time period in the historical time period and the corresponding weather information, and the text description data is determined according to the first text data related to the gas volume used in the historical time period; then the time series data and the text description data are input into the pre-trained multimodal large model, and the time series data and the text description data are respectively feature extracted based on the multimodal large model to determine the predicted gas volume after the preset time. Specifically, feature extraction is performed on the time series data based on the multimodal large model to obtain a first feature vector; feature extraction is performed on the text description data to obtain a second feature vector; a fusion feature vector is determined based on the first feature vector and the second feature vector; and the predicted gas volume after the preset time is determined based on the fusion feature vector. The present application combines the time series data including the gas volume used and the corresponding weather information, and the text description data including the first text data related to the gas volume used, to determine the predicted gas volume after the preset time. The present application takes into account the influence of the historical gas volume used, the historical weather information and the first text data related to the gas volume used on the predicted gas volume, thereby improving the accuracy of the predicted gas volume. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 A schematic diagram of the first gas volume prediction process provided for this application;

[0024] Figure 2 A schematic diagram of the second gas volume prediction process provided for this application;

[0025] Figure 3 A schematic diagram of the third gas volume prediction process provided for this application;

[0026] Figure 4 A schematic diagram of the process of determining the predicted gas volume after a preset time provided by this application;

[0027] Figure 5 Schematic diagram of the multi-modal large model structure provided for this application;

[0028] Figure 6 The training process of the timing base model provided for this application includes a schematic diagram;

[0029] Figure 7 A schematic diagram of the training process of the language layer network of the large language model provided in this application;

[0030] Figure 8 A schematic diagram of the training process of the fully connected layer network of the large language model provided in this application;

[0031] Fig. 9 The overall flow chart of gas volume prediction provided for this application;

[0032] Fig.10 Schematic diagram of the phases of aligning the timing data and text provided for this application;

[0033] Fig.11 Schematic diagram of the instruction fine-tuning stage provided for this application;

[0034] Fig.12 Schematic diagram of the task head tuning phase provided for this application;

[0035] Fig.13 A schematic diagram of the structure of the gas volume prediction device provided for this application;

[0036] Fig.14 This is a schematic diagram of the electronic device structure provided in this application. DETAILED DESCRIPTION

[0037] In order to make the purpose and implementation method of the present application clearer, the exemplary implementation method of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0038] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.

[0039] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.

[0040] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0041] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.

[0042] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0043] For the convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.

[0044] In order to facilitate understanding of the gas volume prediction solution provided in this application, the relevant background of gas volume prediction is first explained.

[0045] In the field of natural gas demand forecasting, the complexity and variability of gas usage patterns of customers in multiple industries is one of the main challenges facing forecasting models. Gas usage patterns in different industries are affected by many factors, such as seasonal changes, working days and non-working days, holidays, industry-specific production cycles, and macroeconomic conditions. These factors are often difficult to fully collect and quantify, making it difficult for forecasting models to accurately capture subtle changes and fluctuations in gas demand.

[0046] In addition, due to the limitations of data collection, some key influencing factors may not be included in the model, or the sparsity of the data makes it impossible for the model to effectively learn the relationship between these factors and gas demand. For example, sudden environmental protection policies, extreme weather events, equipment failures, etc. may have a significant impact on gas demand, but these data are often difficult to obtain or quantify. This requires the model to be able to not only process and analyze traditional time series data, but also to understand and utilize unstructured text information, such as news reports, policy announcements, social media dynamics, etc. These text information contain important clues that affect gas demand.

[0047] Time series forecasting is a hot topic that has long attracted attention in industry and academia. It involves extracting patterns and trends from historical data to predict future behaviors or events. With the development of deep learning technology, time series forecasting methods have shifted from traditional statistical methods such as ARIMA, seasonal decomposition, and exponential smoothing to deep learning-based methods. In particular, deep learning models such as recurrent neural networks (RNNs), long short-term memory networks (LSTMs), and convolutional neural networks (CNNs) have achieved remarkable forecasting performance in multiple fields. In recent years, the accuracy of time series forecasting has been further improved with the introduction of attention mechanisms and Transformer architectures. These models are able to capture long-range dependencies and complex patterns in time series data, resulting in excellent performance in applications such as energy consumption, stock price fluctuations, and weather forecasting.

[0048] Large Language Models (LLMs) are a type of deep learning model that has been pre-trained on a large amount of text data. They have made revolutionary progress in the field of natural language processing (NLP). These models have learned rich language knowledge and complex pattern recognition capabilities through pre-training on massive amounts of text, so that they can show excellent performance on a variety of language tasks. The core advantage of LLMs is that they can understand and generate natural language and handle a wide range of tasks from simple question answering to complex reasoning.

[0049] In the field of time series, traditional forecasting methods usually rely on statistical principles or machine learning techniques, such as autoregressive models, seasonal decomposition, long short-term memory networks (LSTM), etc. These methods are effective in specific scenarios, but they often require a lot of domain knowledge and data to train, and are difficult to generalize to other tasks. In recent years, with the development of deep learning technology, especially the rise of LLMs, researchers have begun to explore the application of these models to time series analysis and forecasting.

[0050] The application of LLMs in the field of time series is mainly based on its powerful sequence modeling capabilities. Time series data is essentially a collection of data points arranged in chronological order, which is similar to text data in terms of sequence characteristics. LLMs are able to capture long-term dependencies and complex patterns in sequences, which gives them potential advantages in processing time series data. For example, by converting time series data into a serialized representation that the model can understand, LLMs can learn the patterns in the data and make effective predictions.

[0051] However, time series data and text data are essentially different, for example, time series data is usually continuous, while text data is discrete. In addition, time series prediction often requires the model to have an understanding of temporal dynamics and seasonal changes. To address these challenges, researchers have proposed a variety of methods to adapt and optimize LLMs to better suit time series tasks. For example, by designing specific input and output formats, introducing time series-specific prompts, or fine-tuning the model to improve its performance on time series prediction tasks.

[0052] The related technologies have the following shortcomings or technical difficulties:

[0053] 1. Task-specific Learning:

[0054] Reason: Most time series forecasting models are tailored for specific tasks and domains, such as traffic flow forecasting.

[0055] Result: These models perform well on specific tasks, but lack generalization capabilities and have difficulty adapting to new tasks or data distributions.

[0056] 2. In-modality Adaptation:

[0057] Reason: Some models are pre-trained on time series data and then fine-tuned on the same domain.

[0058] Results: Although this approach can achieve good performance in specific domains, the pre-training and fine-tuning process may require a lot of time and computing resources, and the generalization ability of the model is still limited.

[0059] 3. Cross-modality Adaptation:

[0060] Reason: Some studies have tried to transfer the knowledge of pre-trained models in the fields of NLP and CV to time series modeling.

[0061] Results: These methods may face challenges in cross-domain application because the continuity and complexity of time series data are significantly different from text or image data, and direct transfer may not be able to effectively capture the dynamic characteristics of time series.

[0062] 4. Data sparsity problem:

[0063] Reason: Time series data is usually not as abundant as text or image data, which leads to the challenge of data sparsity when training large models in the time series domain.

[0064] Results: Data sparsity limits the model’s ability to learn sufficient time series-specific patterns and dynamics, potentially affecting forecast accuracy.

[0065] 5. Generalization and migration capabilities of the model:

[0066] Reason: Existing time series prediction models usually need to be trained for specific tasks and lack the ability to migrate and generalize between different tasks.

[0067] Result: This means that the model needs to be trained from scratch when faced with new tasks or changes in data distribution, which increases the difficulty of development and deployment.

[0068] This application solves the challenge of applying large language models (LLMs) to time series prediction through a multimodal large model framework that combines text and time series data. It innovatively combines time series data with text information and uses multimodal data input, including business scope, energy-consuming equipment, abnormal operations, environmental penalties, etc., as well as statistical results such as trends and cyclical fluctuations, to enhance the model's understanding and prediction capabilities for complex sequences. The framework integrates this data into pre-trained LLMs through adapters and attention mechanisms, while maintaining the integrity and efficiency of the model, enabling the model to achieve high performance in various time series intelligence tasks, such as prediction, classification, anomaly detection, etc., especially in scenarios where data is scarce, volatile, and has many influencing factors.

[0069] The gas volume prediction process provided by the present application is described in detail below with reference to the accompanying drawings.

[0070] Figure 1 A schematic diagram of the first gas volume prediction process provided in this application, the process includes the following steps:

[0071] S101: Obtain the gas volume used in each first unit time period in the historical time period and the corresponding weather information, as well as the first text data related to the gas volume used, determine the time series data according to the gas volume used in each first unit time period and the corresponding weather information; determine the text description data according to the first text data of each first unit time period; wherein the first text data includes at least one of business scope data, energy-consuming equipment data, environmental protection news data and holiday data;

[0072] S102: Input the time series data and the text description data into a pre-trained multimodal large model, and determine the predicted gas volume after a preset time based on the multimodal large model; wherein the multimodal large model is used to perform feature extraction on the time series data to obtain a first feature vector; perform feature extraction on the text description data to obtain a second feature vector; determine a fused feature vector based on the first feature vector and the second feature vector; and determine the predicted gas volume after the preset time based on the fused feature vector.

[0073] The gas volume prediction method provided in the present application is applied to electronic devices, which may be PCs, computers, servers and other devices.

[0074] The electronic device first obtains the amount of gas used in each first unit time period in a historical time period and the corresponding weather information, as well as the first text data related to the amount of gas used. The historical time period is, for example, a historical month, a historical two months, etc. The first unit time period is, for example, a day. For example, the amount of gas used every day in a historical month and the weather information of each day are obtained. And the first text data related to the amount of gas used every day in a historical month is obtained. The first text data includes at least one of business scope data, energy-consuming equipment data, environmental protection news data, and holiday data. Among them, the business scope data includes data such as business premises, business type, and abnormal business. The energy-consuming equipment data includes the type of energy-consuming equipment, the failure of the energy-consuming equipment, etc. The environmental protection news data includes environmental protection policy data, environmental protection penalty data, etc. The holiday data includes identification data that the current date is a holiday or identification data that the current date is not a holiday.

[0075] The time series data is determined according to the gas volume used in each first unit time period and the corresponding weather information. Optionally, the gas volume used in each first unit time period and the corresponding weather information are used as the time series data. The gas volume used and the weather information both correspond to the first unit time period. The text description data is determined according to the first text data of each first unit time period. Optionally, the first text data of each first unit time period can be used as the text description data.

[0076] After determining the time series data and text description data, input the time series data and text description data into a pre-trained multimodal large model, and determine the predicted gas volume after a preset time based on the multimodal large model. The preset time is, for example, the next day of the current time, or every day of the next week of the current time. If the gas volume of the next day is predicted when training the multimodal large model, the predicted gas volume one day later is determined based on the multimodal large model when it is applied. Specifically, the multimodal large model performs feature extraction on the time series data to obtain a first feature vector; performs feature extraction on the text description data to obtain a second feature vector; then determines a fused feature vector by splicing and fusing the first feature vector and the second feature vector; and finally determines the predicted gas volume after the preset time based on the fused feature vector.

[0077] In the present application, firstly, the time series moment is determined according to the gas volume used in each first unit time period in the historical time period and the corresponding weather information, and the text description data is determined according to the first text data related to the gas volume used in the historical time period; then the time series data and the text description data are input into the pre-trained multimodal large model, and the time series data and the text description data are respectively feature extracted based on the multimodal large model to determine the predicted gas volume after the preset time. Specifically, feature extraction is performed on the time series data based on the multimodal large model to obtain a first feature vector; feature extraction is performed on the text description data to obtain a second feature vector; a fusion feature vector is determined based on the first feature vector and the second feature vector; and the predicted gas volume after the preset time is determined based on the fusion feature vector. The present application combines the time series data including the gas volume used and the corresponding weather information, and the text description data including the first text data related to the gas volume used, to determine the predicted gas volume after the preset time. The present application takes into account the influence of the historical gas volume used, the historical weather information and the first text data related to the gas volume used on the predicted gas volume, thereby improving the accuracy of the predicted gas volume.

[0078] In the present application, determining text description data according to the first text data of each first unit time period includes:

[0079] Determine, based on the time series data of each first unit time period, data describing a change trend of the amount of gas used in the historical time period;

[0080] The text description data is determined according to the first text data of each first unit time period and the change trend description data.

[0081] Figure 2 The second gas volume prediction process schematic diagram provided for this application includes the following steps:

[0082] S201: Obtain the gas amount used and the corresponding weather information for each first unit time period in the historical time period, as well as first text data related to the gas amount used, and determine time series data according to the gas amount used in each first unit time period and the corresponding weather information; determine change trend description data of the gas amount used in the historical time period according to the time series data of each first unit time period; determine the text description data according to the first text data of each first unit time period and the change trend description data;

[0083] S202: Input the time series data and the text description data into a pre-trained multimodal large model, and determine the predicted gas volume after a preset time based on the multimodal large model; wherein the multimodal large model is used to perform feature extraction on the time series data to obtain a first feature vector; perform feature extraction on the text description data to obtain a second feature vector; determine a fused feature vector based on the first feature vector and the second feature vector; and determine the predicted gas volume after the preset time based on the fused feature vector.

[0084] In the present application, the change trend description data of the amount of gas used in the historical time period is determined according to the time series data of each first unit time period. Optionally, the change trend of the amount of gas used is manually described according to the time series data, thereby obtaining the change trend description data of the amount of gas used in the historical time period. Optionally, a neural network model for determining the change trend description data is pre-trained, and the time series data of each first unit time period is input into the neural network model to obtain the change trend description data. It should be noted that when the neural network model is trained, the sample time series data and the corresponding change trend description data label are input into the neural network model to be trained, and the predicted change trend description data is obtained based on the neural network model; the loss value is determined according to the predicted change trend description data and the change trend description data label, and the neural network model is trained according to the loss value. The change trend description data is, for example, stable upward, short-term fluctuation, stable decline, periodic fluctuation, etc.

[0085] The text description data is determined based on the first text data and the change trend description data of each first unit time period. Optionally, the first text data and the change trend description data of each first unit time period can be used as the text description data. Then, the time series data and the text description data are input into the pre-trained multimodal large model, and the predicted gas volume after a preset time is determined based on the multimodal large model. Since the present application combines the first text data and the change trend description data of each first unit time period to jointly determine the text description data, and then predicts the gas volume, it enriches the influencing factors and further improves the accuracy of the gas volume prediction.

[0086] In the present application, according to the first text data of each first unit time period and the change trend description data, determining the text description data includes:

[0087] Acquire second text data related to the amount of gas used in each second unit time period within the preset time;

[0088] The text description data is determined according to the first text data of each first unit time period, the change trend description data, and the second text data of each second unit time period.

[0089] It should be noted that, the present application may also use the first text data of each first unit time period and the second text data of each second unit time period as text description data.

[0090] Figure 3 The third gas volume prediction process schematic diagram provided for this application includes the following steps:

[0091] S301: Obtain the gas amount used and the corresponding weather information for each first unit time period in the historical time period, as well as the first text data related to the gas amount used, and determine the time series data according to the gas amount used in each first unit time period and the corresponding weather information; obtain the second text data related to the gas amount used in each second unit time period within the preset time; determine the text description data according to the first text data of each first unit time period, the change trend description data and the second text data of each second unit time period;

[0092] S302: Input the time series data and the text description data into a pre-trained multimodal large model, and determine the predicted gas volume after a preset time based on the multimodal large model; wherein the multimodal large model is used to perform feature extraction on the time series data to obtain a first feature vector; perform feature extraction on the text description data to obtain a second feature vector; determine a fused feature vector based on the first feature vector and the second feature vector; and determine the predicted gas volume after the preset time based on the fused feature vector.

[0093] In the present application, the second text data related to the amount of gas used is obtained for each second unit time period within the preset time. The second unit time period and the first unit time period may be the same or different. Optionally, the second unit time period and the first unit time period are both 1 day, or the first unit time period is 1 day, and the second unit time period is 2 days, etc. For example, if the preset time is 10 days, the second unit time period is 1 day, and the current time is October 1st, the second text data for each day from October 2nd to October 11th is obtained. The second text data includes at least one of business scope data, energy-consuming equipment data, environmental protection news data, and holiday data.

[0094] The text description data is determined based on the first text data of each first unit time period, the change trend description data, and the second text data of each second unit time period. Optionally, the first text data of each first unit time period, the change trend description data, and the second text data of each second unit time period are used as text description data. Then, the time series data and the text description data are input into a pre-trained multimodal large model, and the predicted gas volume after a preset time is determined based on the multimodal large model. Since the present application combines the first text data of each first unit time period, the change trend description data, and the second text data related to the gas usage of each second unit time period within the preset time, the text description data is jointly determined, and then the gas volume prediction is performed, which further enriches the influencing factors and further improves the accuracy of the gas volume prediction.

[0095] Figure 4 The process diagram for determining the predicted gas volume after a preset time provided in this application includes the following steps:

[0096] S401: inputting the time series data and the text description data into the multimodal large model, performing feature extraction on the time series data based on the time series basic model in the multimodal large model, and obtaining a first feature vector;

[0097] S402: extracting features from the text description data based on the embedding layer network of the large language model in the multimodal large model to obtain a second feature vector;

[0098] S403: Based on the language layer network of the large language model, the first feature vector and the second feature vector are fused to obtain the fused feature vector; based on the fully connected layer network of the large language model, feature extraction is performed on the fused feature vector to obtain the predicted gas volume after the preset time.

[0099] Figure 5 The schematic diagram of the multimodal large model structure provided in this application includes a temporal basic model 51 and a large language model 52. The large language model 52 includes an embedding layer network 521, a language layer network 522 and a fully connected layer network 523.

[0100] The time series data is input into the time series basic model in the multimodal large model, and the time series data is feature extracted based on the time series basic model to obtain the first feature vector. The first feature vector is input into the language layer network LargeLanguage Model in the large language model. The text description data is input into the embedding layer network wordembeding of the large language model in the multimodal large model, and the text description data is feature extracted based on the embedding layer network to obtain the second feature vector. The second feature vector is input into the language layer network in the large language model. Based on the language layer network of the large language model, the first feature vector and the second feature vector are fused to obtain a fused feature vector; finally, based on the fully connected layer network task head of the large language model, feature extraction is performed on the fused feature vector to obtain the predicted gas volume after the preset time.

[0101] Figure 6 The training process of the time series basic model provided for this application includes a schematic diagram, which includes the following steps:

[0102] S601: inputting the first sample time series data in the training set into the time series basic model to be trained, and determining the first sample feature vector based on the time series basic model;

[0103] S602: inputting first sample text description data corresponding to the first sample time series data into the embedding layer network, and determining a second sample feature vector based on the embedding layer network;

[0104] S603: Determine a first loss value according to the first sample feature vector and the second sample feature vector; and train the time series basic model according to the first loss value.

[0105] Figure 7 A schematic diagram of the training process of the language layer network of the large language model provided in this application, the process includes the following steps:

[0106] S701: inputting the second sample time series data in the training set into the trained time series basic model, and determining the third sample feature vector based on the time series basic model; inputting the second sample text description data corresponding to the second sample time series data into the embedding layer network, and determining the fourth sample feature vector based on the embedding layer network;

[0107] S702: Input the third sample feature vector and the fourth sample feature vector, and the corresponding label feature vector into the language layer network to be trained; based on the language layer network, fuse the third sample feature vector and the fourth sample feature vector to obtain a first sample fused feature vector;

[0108] S703: Determine a second loss value according to the first sample fusion feature vector and the label feature vector; and train the language layer network according to the second loss value.

[0109] Figure 8 The schematic diagram of the training process of the fully connected layer network of the large language model provided in this application includes the following steps:

[0110] S801: inputting the third sample time series data in the training set into the trained time series basic model, and determining the fifth sample feature vector based on the time series basic model; inputting the third sample text description data corresponding to the third sample time series data into the embedding layer network, and determining the sixth sample feature vector based on the embedding layer network;

[0111] S802: Inputting the fifth sample feature vector and the sixth sample feature vector into a trained language layer network; based on the language layer network, fusing the fifth sample feature vector and the sixth sample feature vector to obtain a second sample fused feature vector;

[0112] S803: inputting the second sample fusion feature vector and the corresponding label gas volume into the fully connected layer network to be trained, and performing feature extraction on the second sample fusion feature vector based on the fully connected layer network to obtain the sample predicted gas volume after the preset time;

[0113] S804: Determine a third loss value according to the sample predicted gas volume and the labeled gas volume; and train the fully connected layer network according to the third loss value.

[0114] It should be noted that the embedding layer network, language layer network and fully connected layer network in the time series basic model and the large language model can be trained separately. They can also be trained simultaneously. Optionally, the fourth sample time series data in the training set is input into the time series basic model, and the seventh sample feature vector is determined based on the time series basic model; the fourth sample text description data corresponding to the fourth sample time series data is input into the embedding layer network, and the eighth sample feature vector is determined based on the embedding layer network; the seventh sample feature vector and the eighth sample feature vector are input into the language layer network; based on the language layer network, the seventh sample feature vector and the eighth sample feature vector are fused to obtain the third sample fused feature vector; the third sample fused feature vector and the corresponding label gas volume are input into the fully connected layer network to be trained, and based on the fully connected layer network, the third sample fused feature vector is feature extracted to obtain the sample predicted gas volume after the preset time; the model loss value is determined according to the sample predicted gas volume and the label gas volume; the embedding layer network, language layer network and fully connected layer network in the time series basic model and the large language model are trained according to the model loss value.

[0115] Fig. 9 The overall flow chart of gas volume prediction provided for this application is as follows: Fig. 9 As shown, it includes three parts: multimodal data, multimodal large model and intelligent tasks. Multimodal data includes text description, time series data and statistical results. Text descriptions include business scope, energy-consuming equipment, abnormal operation, environmental protection penalties, emergencies, holidays, etc. Statistical results include stable upward, short-term fluctuations, stable decline, periodic fluctuations, cycles, trends, residuals, etc. The text description and statistical results are input into the large speech model in the multimodal large model, and the time series data is input into the time series basic model in the multimodal large model. The predicted gas volume is obtained after the decoder and the output layer. The pre-trained large speech model includes Text-FFN, TS-FFN, Adapter and Multi-Head Attention. Intelligent tasks include text intelligent tasks and time series intelligent tasks. Text intelligent tasks include customer cognition reports, demand management suggestions and value-added service recommendations. Time series intelligent tasks include prediction, classification, anomaly detection, missing filling, etc. This application involves gas volume prediction tasks, and other tasks can be expanded according to actual needs.

[0116] The implementation steps of the time series multimodal large model provided in this application can be divided into three stages: alignment of time series data with text, instruction fine-tuning, and task head tuning. The following are the specific steps of each stage:

[0117] Fig.10Schematic diagram of the time series data and text alignment stage provided for this application. The input of this stage is: time series data and corresponding text description. The model structure is: the pre-trained time series basic model generates a representation (feature vector) of the time series data through the adapter module. The text part generates a representation (feature vector) of the text description through the embedding layer network. The alignment of the time series data and the text description is achieved through contrastive loss. The training goal is to generate an aligned representation of the time series data and the text, maximize the similarity between the correctly matched time series data and the text description, and reduce the similarity of the incorrect matches.

[0118] Fig.11 Schematic diagram of the instruction fine-tuning stage provided for this application. The input of this stage is: time series data and text description. The model structure is: use generative loss (Generative Loss) for instruction fine-tuning. The text description is input to the language layer network through the embedding layer network, and the language layer network generates the target output based on the input text. The training goal is: through instruction fine-tuning, the language layer network can generate accurate text descriptions based on time series data, and maximize the similarity between the generated text and the actual text.

[0119] Fig.12 Schematic diagram of the task head tuning stage provided for this application. The input of this stage is: time series data and text description. The model structure is: adding a task head (fully connected layer network) on the basis of the large language model for specific tasks (such as prediction, classification, regression, etc.). The feature vectors of the text description and time series data are input into the language layer network, and finally the task head is used to complete the tuning of the specific task. Training goal: Optimize the task head to make the model perform best on a specific task, and minimize the task loss according to the requirements of the task head.

[0120] Fig.13 The schematic diagram of the structure of the gas volume prediction device provided for this application includes:

[0121] The determination module 121 is used to obtain the gas volume used in each first unit time period in the historical time period and the corresponding weather information, as well as the first text data related to the gas volume used, and determine the time series data according to the gas volume used in each first unit time period and the corresponding weather information; determine the text description data according to the first text data of each first unit time period; wherein the first text data includes at least one of business scope data, energy-consuming equipment data, environmental protection news data and holiday data;

[0122] The prediction module 122 is used to input the time series data and the text description data into a pre-trained multimodal large model, and determine the predicted gas volume after a preset time based on the multimodal large model; wherein the multimodal large model is used to perform feature extraction on the time series data to obtain a first feature vector; perform feature extraction on the text description data to obtain a second feature vector; determine a fused feature vector based on the first feature vector and the second feature vector; and determine the predicted gas volume after the preset time based on the fused feature vector.

[0123] The determination module 121 is specifically used to determine the change trend description data of the gas volume used in the historical time period according to the time series data of each first unit time period; and determine the text description data according to the first text data of each first unit time period and the change trend description data.

[0124] The determination module 121 is specifically used to obtain second text data related to the gas usage in each second unit time period within the preset time; and determine the text description data based on the first text data of each first unit time period, the change trend description data and the second text data of each second unit time period.

[0125] The prediction module 122 is specifically used to input the time series data and the text description data into the multimodal large model, perform feature extraction on the time series data based on the time series basic model in the multimodal large model to obtain a first feature vector; perform feature extraction on the text description data based on the embedding layer network of the large language model in the multimodal large model to obtain a second feature vector; perform fusion processing on the first feature vector and the second feature vector based on the language layer network of the large language model to obtain the fused feature vector; perform feature extraction on the fused feature vector based on the fully connected layer network of the large language model to obtain the predicted gas volume after the preset time.

[0126] The device also includes:

[0127] The training module 123 is used to input the first sample time series data in the training set into the time series basic model to be trained, and determine the first sample feature vector based on the time series basic model; input the first sample text description data corresponding to the first sample time series data into the embedding layer network, and determine the second sample feature vector based on the embedding layer network; determine the first loss value according to the first sample feature vector and the second sample feature vector; and train the time series basic model according to the first loss value.

[0128] The training module 123 is specifically used to input the second sample time series data in the training set into the trained time series basic model, and determine the third sample feature vector based on the time series basic model; input the second sample text description data corresponding to the second sample time series data into the embedding layer network, and determine the fourth sample feature vector based on the embedding layer network;

[0129] Inputting the third sample feature vector and the fourth sample feature vector, and the corresponding label feature vector into the language layer network to be trained; based on the language layer network, fusing the third sample feature vector and the fourth sample feature vector to obtain a first sample fused feature vector;

[0130] A second loss value is determined according to the first sample fusion feature vector and the label feature vector; and the language layer network is trained according to the second loss value.

[0131] The training module 123 is specifically used to input the third sample time series data in the training set into the trained time series basic model, and determine the fifth sample feature vector based on the time series basic model; input the third sample text description data corresponding to the third sample time series data into the embedding layer network, and determine the sixth sample feature vector based on the embedding layer network;

[0132] Inputting the fifth sample feature vector and the sixth sample feature vector into a trained language layer network; based on the language layer network, fusing the fifth sample feature vector and the sixth sample feature vector to obtain a second sample fused feature vector;

[0133] Inputting the second sample fusion feature vector and the corresponding label gas volume into the fully connected layer network to be trained, and performing feature extraction on the second sample fusion feature vector based on the fully connected layer network to obtain the sample predicted gas volume after the preset time;

[0134] A third loss value is determined according to the sample predicted gas volume and the labeled gas volume; and the fully connected layer network is trained according to the third loss value.

[0135] The present application also provides an electronic device, such as Fig.14 As shown, it includes: a processor 131, a communication interface 132, a memory 133 and a communication bus 134, wherein the processor 131, the communication interface 132, and the memory 133 communicate with each other through the communication bus 134;

[0136] The memory 133 stores a computer program, and when the program is executed by the processor 131, the processor 131 executes any one of the above method steps.

[0137] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0138] The communication interface 132 is used for communication between the above electronic device and other devices.

[0139] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0140] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0141] The present application also provides a computer storage readable storage medium, wherein the computer readable storage medium stores a computer program executable by an electronic device, and when the program runs on the electronic device, the electronic device implements any of the above method steps when executing.

[0142] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0143] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for predicting gas volume, characterized in that: The method comprises: Obtaining the amount of gas used and the corresponding weather information for each first unit time period in the historical time period, as well as first text data related to the amount of gas used, and determining time series data according to the amount of gas used and the corresponding weather information for each first unit time period; determining text description data according to the first text data for each first unit time period; wherein the first text data includes at least one of business scope data, energy-consuming equipment data, environmental protection news data, and holiday data; Inputting the time series data and the text description data into a pre-trained multimodal large model, and determining the predicted gas volume after a preset time based on the multimodal large model; Among them, the multimodal large model is used to extract features from the time series data to obtain a first feature vector; extract features from the text description data to obtain a second feature vector; determine a fused feature vector based on the first feature vector and the second feature vector; and determine the predicted gas volume after the preset time based on the fused feature vector.

2. The method according to claim 1, characterized in that Determining text description data according to the first text data of each first unit time period includes: Determine, based on the time series data of each first unit time period, data describing a change trend of the amount of gas used in the historical time period; The text description data is determined according to the first text data of each first unit time period and the change trend description data.

3. The method according to claim 2, characterized in that Determining the text description data according to the first text data of each first unit time period and the change trend description data includes: Acquire second text data related to the amount of gas used in each second unit time period within the preset time; The text description data is determined according to the first text data of each first unit time period, the change trend description data, and the second text data of each second unit time period.

4. The method according to claim 1, characterized in that The process of determining the predicted gas volume after a preset time includes: The time series data and the text description data are input into the multimodal large model, and features of the time series data are extracted based on the time series basic model in the multimodal large model to obtain a first feature vector; features of the text description data are extracted based on the embedding layer network of the large language model in the multimodal large model to obtain a second feature vector; based on the language layer network of the large language model, the first feature vector and the second feature vector are fused to obtain the fused feature vector; based on the fully connected layer network of the large language model, features of the fused feature vector are extracted to obtain the predicted gas volume after the preset time.

5. The method according to claim 4, characterized in that The training process of the time series basic model includes: Input the first sample time series data in the training set into the time series basic model to be trained, and determine the first sample feature vector based on the time series basic model; input the first sample text description data corresponding to the first sample time series data into the embedding layer network, and determine the second sample feature vector based on the embedding layer network; determine a first loss value based on the first sample feature vector and the second sample feature vector; and train the time series basic model based on the first loss value.

6. The method according to claim 4, characterized in that The training process of the language layer network of the large language model includes: Input the second sample time series data in the training set into the trained time series basic model, and determine the third sample feature vector based on the time series basic model; input the second sample text description data corresponding to the second sample time series data into the embedding layer network, and determine the fourth sample feature vector based on the embedding layer network; Inputting the third sample feature vector and the fourth sample feature vector, and the corresponding label feature vector into the language layer network to be trained; based on the language layer network, fusing the third sample feature vector and the fourth sample feature vector to obtain a first sample fused feature vector; A second loss value is determined according to the first sample fusion feature vector and the label feature vector; and the language layer network is trained according to the second loss value.

7. The method according to claim 4, characterized in that The training process of the fully connected layer network of the large language model includes: Input the third sample time series data in the training set into the trained time series basic model, and determine the fifth sample feature vector based on the time series basic model; input the third sample text description data corresponding to the third sample time series data into the embedding layer network, and determine the sixth sample feature vector based on the embedding layer network; Inputting the fifth sample feature vector and the sixth sample feature vector into a trained language layer network; based on the language layer network, fusing the fifth sample feature vector and the sixth sample feature vector to obtain a second sample fused feature vector; Inputting the second sample fusion feature vector and the corresponding label gas volume into the fully connected layer network to be trained, and performing feature extraction on the second sample fusion feature vector based on the fully connected layer network to obtain the sample predicted gas volume after the preset time; A third loss value is determined according to the sample predicted gas volume and the labeled gas volume; and the fully connected layer network is trained according to the third loss value.

8. A gas quantity prediction device, characterized in that: The device comprises: A determination module, used to obtain the gas volume used in each first unit time period in the historical time period and the corresponding weather information, as well as first text data related to the gas volume used, and determine the time series data according to the gas volume used in each first unit time period and the corresponding weather information; determine the text description data according to the first text data of each first unit time period; wherein the first text data includes at least one of business scope data, energy-consuming equipment data, environmental protection news data and holiday data; A prediction module is used to input the time series data and the text description data into a pre-trained multimodal large model, and determine the predicted gas volume after a preset time based on the multimodal large model; wherein the multimodal large model is used to perform feature extraction on the time series data to obtain a first feature vector; perform feature extraction on the text description data to obtain a second feature vector; determine a fused feature vector based on the first feature vector and the second feature vector; and determine the predicted gas volume after the preset time based on the fused feature vector.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method according to any one of claims 1 to 7 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.