Next Article in Journal
Possibility of Marine Low-Speed Engine Piston Ring Wear Prediction during Real Operational Conditions
Previous Article in Journal
Influence of Supercritical CO2 Fluid on CH4 and CO2 Diffusion in Vitrinite-Rich Coals and Inertinite-Rich Coals
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Design of an Energy Supply and Demand Forecasting System Based on Web Crawler and a Grey Dynamic Model

1
School of Computer Science, Zhuhai College of Science and Technology, Zhuhai 519041, China
2
Department of Industrial Electronics, School of Engineering, University of Minho, 4800-058 Guimares, Portugal
*
Author to whom correspondence should be addressed.
Energies 2023, 16(3), 1431; https://doi.org/10.3390/en16031431
Submission received: 4 December 2022 / Revised: 13 January 2023 / Accepted: 23 January 2023 / Published: 1 February 2023

Abstract

:
An energy supply and demand forecasting system can help decision-makers grasp more comprehensive information, make accurate decisions and even plan a carbon-neutral future when adjusting energy structure, developing alternative energy resources and so on. This paper presents a hierarchical design of an energy supply and demand forecasting system based on web crawler and a grey dynamic model called GM(1,1) which covers all the process of data collection, data analysis and data prediction. It mainly consists of three services, namely Crawler Service (CS), Algorithm Service (AS), Data Service (DS). The architecture of multiple loose coupling services makes the system flexible in more data, and more advanced prediction algorithms for future energy forecasting works. In order to make higher prediction accuracy based on GM(1,1), this paper illustrates some basic enhanced methods and their combinations with adaptable variable weights. An implementation for testing the system was applied, where the model was set up for coal, oil and natural gas separately, and the enhanced GM was better with relative error about 9.18% than original GM on validation data between 2010 and 2020. All results are available for reference on adjusting of energy structure and developing alternative energy resources.

1. Introduction

An energy supply and demand forecasting system is often used to make energy demand forecasting, which is essential for initiating development plans, making operational and maintenance decision, and performing strategic energy planning [1]. An intact energy supply and demand forecasting system includes data collection, data handling, data presentation and so on. Therefore, the architecture, data sources and algorithms should be focused on during the system design. In fact, energy is so important that the National Bureau of Statistics releases the energy data at regular intervals on the internet. In addition, some enterprises also record energy data daily, weekly, monthly, or yearly on the LAN. Therefore, historical data about energy can be collected from the Internet or the Intranet. In order to obtain energy data dynamically, a model of web crawler is being considered. A web crawler crawls across the web, at its core is an element of recursion, and it retrieves page contents for a URL, examines that page for another URL, and retrieves that page [2]. The first-generation tool is a kind of general search engine which tries to search all the pages [3]. Topical crawler or Focused Crawler is different from a general search engine, and it only focuses on some pages associated with the topic set [4]. In order to collect and analyze topic-specific web information more efficiently without downloading many irrelevant pages, heuristic algorithm, context graph, machine learning, page features and others are studied [5,6,7,8,9].
The model of the web crawler is the basis of data acquisition to generate a report, especially for an enterprise where there is neither the API support from their existing website systems nor the granted database access rights approval [10]. In general, it is easier to obtain data from a stable API than from an unstable website since with the upgrade of the website, any style of data table, position of data, the tag name of HTML, data format or others may be changed on the same URL. Furthermore, the upgrade of a website on a server is always more frequent than that of an API as a part of business service. On the design of the model of the web crawler, it is necessary to consider the unstable feature of a website and dynamic parse rules configured. Designing a dynamic web crawler according to different environments is a key issue.
Grey system theory, abbreviated to GST or GS, was pioneered by Deng Julong in 1982 and it is suitable for solving uncertain problems with greyness such as less data, less samples, incomplete information and lack of experience [11]. GS has been successfully applied to many different fields [11,12,13,14,15,16,17,18,19,20,21,22] including energy forecasting such as coal and gas outburst prediction [14], gas well productivity [16], electricity consumption productivity [22] and so on. The basic Grey Model GM(1,1) hides the law of grey cause and white effect, and its expression is shown as Formula (1), where x(0)(k) is a certain quantity as a white output, b is a grey input equivalent, a is called the developing coefficient, and z(1) is MEAN series of Accumulated Generating Operation (AGO) series x(1), z(1)(k) can be identified by averaging adjoining data in AGO series, as shown in Formula (2).
x(0)(k) + a · z(1)(k) = b (k = 1, 2,…, n)
z(1)(k) = (x(1)(k − 1) + x(1)(k))/2 (k = 2, 3,…, n)
There are two stages in the development of grey modeling, namely smoothing stage and non-smoothing stage, Smo (Smooth) GM(1,1) in 1982 for the former, Steep GM(1,1) and Undulating GM(1,1) (UGM) in 2001 for the latter [11]. When using GM(1,1), the feature of raw data series is required to be distinguished before the form or stage is determined. The expression of Steep GM(1,1) and UGM are, respectively, shown in Formulas (3) and (4).
x(0)(k) + a · z(1)(k − t) = b2 (k = t + 1, t + 2,…, n)
x(0)(k) + atan((k − t) · p · z(1)(k − t)) = b sin((k − t) · p) (k = t + 1, t + 2,…, n)
If z(1)(k) is replaced with x(1)(k) in Formula (1), it is changed to a primitive form of GM(1,1), as shown in Formula (5).
x(0)(k) + a · x(1)(k) = b (k = 1, 2,…, n)
In 2014, Liu et al. defined four basic models of GM(1,1), namely Even Grey Model (EGM), Original Difference Grey Model (ODGM), Even Difference Grey Model (EDGM), and Discrete Grey Model (DGM) [23]. Both EGM and EDGM are inferred from the mean/even form Formula (1), ODGM is from the primitive form Formula (5), and DGM is the discrete form of GM(1,1), as shown in Formula (6).
x(1)(k + 1) = β1 · x(1)(k) + β2 (k = 1, 2,…, n−1)
In 2021, Xu et al. summarized some revised models of GM(1,1) to improve prediction accuracy, including the application of the segment modeling method, cubic spline function, Fourier series, particle swarm algorithm and so on [24].
When the system encounters GM(1,1), multiple challenges are faced, data stream for external data, internal storage data and data generated from multiple algorithms, and prediction accuracy. In this paper, we made two main works, one is the system design of three services with the ability to involve different data sources and algorithms, and the other is implementing two basic enhanced methods and their combination for GM(1,1) to improve the prediction accuracy. Firstly, the CS is introduced to collect the energy supply and demand data available online, which allows different URL sources to be configured, as well as data to be stored after validation into text files, a relational database or a NoSQL database through the DS. Secondly, this paper illustrates the application based on GM(1,1), including two basic enhanced methods and their combination with adaptable variable weights for higher accuracy. According to the loose coupling design between AS and others, other algorithms are open to add into the system once they implement specified interfaces. Finally, according to the design, the testing for the system was implemented, where the model was set up for coal, oil and natural gas in the form of values and percentages separately.

2. Design on Energy Supply and Demand Forecasting System

The final design of the proposed software stack is shown in Figure 1. There are five main parts: Client, Crawler Service (CS), Data Service (DS), Data Base, and Algorithm Service (AS). The CS obtains data about energy supply and demand from websites or services through the Internet or Intranet. The DS stores data into databases or files according to customized settings in advance. The AS generates associated prediction data series by different instances of GMs, such as smoothing GM(1,1) or non-smoothing ones. The Client can be a combination of both CS and AS, which offers API for other external applications such as websites, desktop applications, applications for smart phone, etc. In fact, the Client, CS, DS and AS can be merged into a unified service such as a Data Handling Service (DHS), which is simpler. However, it will lessen soft flexibility on the whole, e.g., within the design of five parts, the CS can be published as a schedule service task such as at twelve o’clock. All the raw data can be prepared in advance, on the calling of AS, these data can be fetched as an input to the selected algorithm. That is to say, both CS and AS share the data in the Data Base through the DS, where CS is to add raw data and AS is to generate prediction data based on raw data.

2.1. Crawler Service and Data Service

Primary data is crawled from the configured websites by the CS, and then the data is stored into different databases and files according to customized settings by the DS, such as a relational database DM8, or a NoSQL database HBase, or Json file, or XML files, etc. Firstly, users make some necessary data initialization, including target website URL and parsed rules and so on. Secondly, the CS generates the request info to access the target URL. Thirdly, the response info is parsed according to some configured parse rules by the CS as soon as the response is returned from the target website. The whole logic is shown as Figure 2. Both the CS and AS can be accessed by the Client, but no Client is allowed to access the database or data files directly without calling DS since the DS is the only legal access point for data files or data bases. The DS consists of two main functions, data storing, and data retrieval. As for the CS, it calls the data storing service within DS mainly.

2.2. Algorithm Service and Data Service

Energy supply and demand forecasting is the estimating of future energy consumption based on the various data and information available [1], with the existing energy data as the input, and the generated prediction data through the system as the output. In order to validate the model performance without waiting until the future time, the existing energy data can be split into training and validation data sets. Generally, the raw data may be outside, or part of an input beyond the system. When the data source URL and parsed rules are configured in advance, as described in Section 2.1, the input can also be considered as changing into the configured information from the whole system perspective.
Unlike CS, which obtains data from URL outside, DS is mainly up to internal data access. The DS offers a service on data, including data storing into database or files, and data retrieval from database or files. After the call of CS, the raw data is collected for coal, gas and oil and so on. In order to illustrate the value of these data, several different kinds of algorithms were implemented in AS. Although currently AS implementation is focused on the GM(1,1), its design is generic and open for other algorithms. Once any new algorithm is implemented, it will be embedded in the AS. The AS generates prediction results based on raw data from the CS. It calls both data retrieval service and data storing service within DS. On the one hand, the retrieval service is to pick up raw data from CS. On the other hand, the data storing service is to store the prediction results from AS. The whole logic is shown in Figure 3.
Firstly, the raw data is picked up as soon as a task starts. The task can be in periodic or random patterns. For example, a task can be scheduled every year, or some user triggers a task by clicking the button or link after basic configurations about tasks are set. Secondly, the raw data must be validated as only valid raw data goes to the next process. It makes sure that the type of data value is correct and the amount of data is up to the basic low threshold. Thirdly, the data is validated again before the actual execution per algorithm, namely validation of the matching rate between data and algorithm. Different from the first validation, the second validation is for a specific algorithm rather than a general validation for all algorithms. There are different validation rules for different algorithms, such as level ratio detection for GM(1,1). Fourthly, the AS builds the model by using raw data and generates the prediction results. Finally, these prediction results are stored through the call of DS. In fact, the result of level ratio detection is not always successful. When the result is tagged as a failure, the logic of 6.3 in Figure 3 will be detailed, as shown in Figure 4.

2.3. API and Application

The Client offers API for other external applications, every component of AS, CS, DS contains its own interface, the call relationship between them is shown in Figure 5.

3. Data Analysis and Enhanced Algorithm

Energy supply and demand data can be available online, e.g., global standardized data on the world’s energy markets can be found within the BP Statistical Review of World Energy from the official website of BP. The official website of National Bureau of Statistics of China provides more detailed energy data of China through the China Statistical Yearbook 2021. For instance, raw data is directly obtained from the China Statistical Yearbook without any changes, which covers period of 1978 and 2020. However, there are only 3 years of data in the first 11 years, respectively, in 1978, 1980 and 1985, between 1978 and 1989. Therefore, these 3 years of data are identified as invalid data after validation rules execution, and they will be ignored in the later process. In addition, in order to verify the performance model, the data between 1990 and 2009 is classified as the training set which is used to build the algorithm model, and the data after 2009 is classified as the test set which is employed to check the model. There are five kinds of energy consumption and component data for coal, oil, gas, power and amount crawled from the official website of National Bureau of Statistics of China. There is a slight difference in the fitted value, predicted value, residual error and absolute relative error between four kinds of GM(1,1), namely EGM, ODGM, EDGM and DGM no matter whether data is for coal, oil, gas or power. We take the data analysis of the proportion of coal consumption as an example, as shown in Table 1, where FV, MV, PV, RV, RE, and ARE are abbreviated forms of fitted value, mean value, predicted value, real value, residual error and absolute relative error separately. It can be seen that 1.77~1.79% is less than 13.01~13.06%, i.e., MV of absolute relative error during the period of 2010 and 2015 is less than that during 2016 and 2020, and the prediction accuracy of the first six years is higher than that of the second five years.
The enhanced method is designed after the analysis of the relation between the real value and predicted value. Although there is no distinct direct linear relation between RV and PV, the linear relation between the arithmetic means of different period is found for coal, oil and amount, and the quadratic relation between the residual error and the sequence number is found for gas and power. Two basic enhanced algorithms and a common combined one are proposed accordingly.
The first enhanced algorithm, namely e1, groups the data and fit a linear relation. Firstly, a constant value k is defined as the number of years in each group, where k is greater than or equal to one. When k is set to one, the group degenerates into one item in each group. Secondly, for each group i, there are two different calculation styles for e1. The first style is to calculate the arithmetic mean of values of RV or FV within each group, namely Intranet Mean Value Style, and the second style is to calculate the arithmetic mean of values with the index from one to the end of group i, namely Simple Mean Value Style, as shown in Formulas (7) and (8), where x can be RV or FV. It is proposed that k should be set to one of the factors of the number of data items n to avoid grouping unevenly, and then n/k is the number of groups.
u(i) = (x(i · k − k + 1) + x(i · k − k + 2) +… + x(i · k))/k (i = 1, 2,…, n/k)
u(i) = (x(1) + x(2) + … + x(i · k))/(i · k) (i = 1, 2,…, n/k)
Thirdly, the linear function is fitted between u for RV and FV, as shown in Formula (9). Finally, the fitted linear function with the max indicator of the degree of trend line fitting is used to adjust PV, as shown in Formula (10), and the delta expression is shown as Formula (11).
uRV(i) = a · uFV(i) + b
PVe1 = a · PV + b
e1 = (a − 1) · PV + b
Table 2 shows the linear relation between RV and FV of coal consumption percentage by two different styles, and only item with the max R2 is selected, which item is marked with “O” before the number value of year every group in the cell of “l”. Table 3 lists the final result of enhanced algorithm I, and it can be seen that the enhanced algorithm I has a better performance with mean absolute relative error of 5.38% than 7.90%.
The second enhanced algorithm, namely e2, is to fit a quadratic relation between the residual error and sequence number. Firstly, the first year to predict is defined at the sequence number of 0, the year before it is with the negative sequence number, and the year after it with the positive number, such as years from 1990 to 2020 with sequence numbers from −19 to 9. In the whole, the continuous sequence numbers are used. Secondly, the quadratic function is fitted between the residual error and sequence number, as shown in Formula (12), where REi is for residual error, i for sequence number, a, b, and c are parameters to be determined by fitting. Finally, the fitted parabola function is used to adjust PV, as shown in Formula (13), and the delta expression is shown in Formula (14).
REi = a · i2 + b · i + c
PVe2 = PV + ∆e2
e2 = a · i2 + b · i
In addition, there is a combined enhanced algorithm based on e1 and e2, namely, ea. Both e1 and e2 are combined with different weights to form ea, as shown in Formula (15), where WT is coefficient row vector, the weight amount of all items is equal to 1, Δ T is the delta expression row vector for different enhanced algorithms. The Formula (15) is common for multiple enhanced algorithms, e.g., if only two enhanced algorithms exist, WT contains only two weights such as [1,0] or [0,1], and Δ T is [ Δ e 1 ,   Δ e 2 ]. The algorithm e1 is used when WT is set to [1,0] and e2 is used when WT is set to [0,1]. Table 4 lists the relative report for enhanced algorithms.
PVea = PV + WT ∙ ∆T
The enhanced Grey Dynamic Model can support the prediction of coal, oil, gas, power and amount with average absolute relative error about 23.34%, the enhanced Grey Dynamic Model is better with relative error about 9.18%.

4. Discussions and Results

In this paper, we propose the hierarchical design of an energy supply and demand forecasting system including Client that offers API for other external applications, Crawler Service (CS), Algorithm Service (AS), Data Service (DS), and Data Base. The AS is open for other algorithms only if new algorithms are implemented and embedded into the AS according to the interface definition.
In order to improve the prediction accuracy of GM(1,1), we additionally come up with two basic enhanced algorithms and a combination of them. The enhanced algorithm reaches better prediction accuracy by up to more than ten percent. There are two main points that are focused on during the design of enhanced algorithm, both less absolute relative error values and being simple enough. The first basic enhanced algorithm e1 is based on grouping, and the sequence of series is the focus of the second one e2. Sometimes, it is difficult to find the global optimal weight values, which is one shortcoming. Here are two proposals, one is to generate a limited pool of weight values, the other is to stop the execution of enhanced algorithms once the prediction accuracy reached a threshold value configured in advance.
In the future, we would like to add more Grey Models and other algorithms for more situations, such as machine learning methods [25], seasonal grey model (SGM) [26] and so on [27,28]. Additionally, more features can be involved such as the energy consumer behavior which modelling will be one of the major aspects of future research [29], and the uncertainty of renewable sources, demands, energy market spot prices, etc., which modeling will be a promising line of future research in the modeling of Smart Energy Hub (SEH) [30].

Author Contributions

Conceptualization and methodology, G.L. and Y.L.; software, G.L.; validation, A.T.; data curation, G.L.; writing—original draft preparation, G.L.; writing—review and editing, Y.L. and A.T.; funding acquisition, Y.L. and G.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by NSFC grant number 61972174, Guangdong Science and Technology Planning Project grant number 2020A0505100018, Guangdong Universities’ Innovation Team Project grant number 2021KCXTD015, Guangdong Key Disciplines Project grant number 2021ZDJS138, and 2021 University-level Teaching Quality Project grant number ZLGC20210203.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
AREAbsolute Relative Error
ASAlgorithm Service
CSCrawler Service
DGMDiscrete Grey Model
DHSData Handling Service
DSData Service
EDGMEven Difference Grey Model
EGMEven Grey Model
FVFitted Value
GMGrey Model
MVMean Value
ODGMOriginal Difference Grey Model
PVPredicted Value
REResidual Error
RVReal Value
SEHSmart Energy Hub
SGMSeasonal Grey Model

References

  1. Islam, M.A.; Che, H.S.; Hasanuzzaman, M.; Rahim, N.A. Energy demand forecasting. In Energy for Sustainable Development; Hasanuzzaman, M., Rahim, N.A., Eds.; Academic Press: Cambridge, MA, USA, 2019; pp. 105–123. [Google Scholar]
  2. Mitchell, R. Web Scraping with Python, 2nd ed.; No Starch Press: Sebastopol, CA, USA, 2018; pp. 33–48. [Google Scholar]
  3. McBryan, O.A. GENVL and wwww: Tools for Taming the Web. In Proceedings of the First World-Wide Web Conference, Geneva, Switzerland, 25–27 May 1994. [Google Scholar]
  4. Chakrabarti, S. Focused Crawling: A New Approach for Topic-Specific Resource Discovery. In Proceedings of the 8th International World Wide Web Conference (www8), Toronto, ON, Canada, 11–14 May 1999. [Google Scholar]
  5. Mukherjea, S. WTMS: A System for Collecting and Analyzing Topic-specific Web Information. Comput. Netw. 2000, 33, 457–471. [Google Scholar] [CrossRef]
  6. Diligenti, M.; Coetzee, F.M.; Lawrence, S.; Giles, C.L.; Gori, M. Focused Crawling Using Context Graphs. In Proceedings of the 26th International Conference on Very Large Data Bases, Palo Alto, CA, USA, 10 September 2000; pp. 527–534. [Google Scholar]
  7. Mccallum, A.; Nigam, K.; Rennie, J.; Seymore, K. Building Domain Specific Search Engines with Machine Learning Techniques. In Proceedings of the AAAI Spring Symposium on Intelligent Agents in Cyberspace, Stanford, CA, USA, 22–24 March 1999; pp. 28–39. [Google Scholar]
  8. Menczer, F.; Belew, R.K. Adaptive Retrieval Agents: Internalizing Local Context and Scaling Up to the Web. Mach. Learn. 2000, 39, 203–242. [Google Scholar] [CrossRef]
  9. Uemura, Y.; Itokawa, T.; Kitasuka, T.; Aritsugi, M. An Effectively Focused Crawling System. In Innovations in Intelligent Machines—2: Intelligent Paradigms and Applications; Watanabe, T., Jain, C.L., Eds.; Springer: Berlin, Germany, 2012; Volume 376, pp. 61–76. [Google Scholar]
  10. Lin, G.; Liang, Y.; Fu, X.; Chen, G.; Cai, S. Design of a Daily Brief Business Report Generator Based on Web Scraping with KNN Algorithm. J. Phys. Conf. Ser. 2019, 1345, 052064. [Google Scholar] [CrossRef]
  11. Deng, J. The Primary Methods of Grey System Theory; Huazhong University of Science and Technology Press: Wuhan, China, 2005; pp. 1–4. [Google Scholar]
  12. Liu, S.; Yang, Y.; Xie, N.; Forrest, J. New progress of Grey System Theory in the New Millennium. Grey Syst. Theory Appl. 2016, 6, 2–31. [Google Scholar] [CrossRef]
  13. Qiao, G.; Zhang, W.; Xue, S. Speed Control Based on Fuzzy PID Control with Grey Prediction in the Deep Sea Stepping System. J. China Coal Soc. 2009, 34, 1550–1553. [Google Scholar]
  14. Fang, X.; Chen, Y.; Li, S. Application of Multidimensional Grey Evaluation Methods in Coal and Gas Outburst Prediction. Ind. Saf. Environ. Prot. 2012, 38, 81–83. [Google Scholar]
  15. Wu, Z.; Xu, B.; Gu, C.; Li, Z.C. Comprehensive Evaluation Methods for Dam Service Status. Sci. China Technol. Sci. 2012, 55, 2300–2312. [Google Scholar] [CrossRef]
  16. Tang, K.; Zhou, N.; Fan, X. Analysis on the Factors Influencing the Gas Well Productivity of S2 Gas Pool in Permian of Zizhou Gas Field. Comput. Technol. Geophys. Geochem. Explor. 2012, 34, 723–728. [Google Scholar]
  17. Liang, C.; Gu, D.; Bichindaritz, I. Integrating Gray System Theory and Logistic Regression into Case-based Reasoning for Safety Assessment of Thermal Power Plants. Expert Syst. Appl. 2012, 39, 5154–5167. [Google Scholar] [CrossRef]
  18. Sheng, B.; Li, J. Measurement and Analysis of the Level of Development of New Urbanization in Jinan City: Based on GM(1,1) Model. J. Xichang Univ. (Nat. Sci. Ed.) 2022, 36, 48–51+70. [Google Scholar] [CrossRef]
  19. Li, Z. Application of Kalman-GM(1,1) Combined Model in Settlement Prediction of the Top of the Enclosure Wall of the Foundation Pit. Urban Geotech. Investig. Surv. 2022, 205–208. [Google Scholar]
  20. Xiao, J.; He, T. Forecast of Railway Freight Volume Based on Improved Gray GM(1,1) Model. J. Lanzhou Jiaotong Univ. 2021, 40, 40–45. [Google Scholar]
  21. Kumar, T.S.; Rao, K.V.; Balaji, M.; Murthy, P.B.G.S.N.; Kumar, D.V. Online monitoring of crack depth in fiber reinforced composite beams using optimization Grey model GM(1,N). Eng. Fract. Mech. 2022, 271, 108666. [Google Scholar] [CrossRef]
  22. Du, X.; Wu, D.; Yan, Y. Prediction of electricity consumption based on GM(1,Nr) model in Jiangsu province, China. Energy 2023, 262, 125439. [Google Scholar] [CrossRef]
  23. Liu, S.F.; Zeng, B.; Liu, J.; Xie, N.M. Several Basic Models of GM(1,1) and Their Applicable Bound. Syst. Eng. Electron. 2014, 36, 501–508. [Google Scholar]
  24. Xu, N.; Ding, S.; Gong, Y. Advances in Grey GM(1,1) Forecasting Model and Its Extension. Math. Pract. Theory 2021, 51, 52–59. [Google Scholar]
  25. Es, H.A. Monthly natural gas demand forecasting by adjusted seasonal grey forecasting model. Energy Sources Part A Recovery Util. Environ. Eff. 2021, 43, 54–69. [Google Scholar] [CrossRef]
  26. Chou, J.-S.; Hsu, S.-M. Automated prediction system of household energy consumption in cities using web crawler and optimized artificial intelligence. Int. J. Energy Res. 2022, 46, 319–339. [Google Scholar] [CrossRef]
  27. Filippova, S.P.; Malakhova, V.A.; Veselov, F.V. Long-Term Energy Demand Forecasting Based on a Systems Analysis. Therm. Eng. 2021, 68, 881–894. [Google Scholar] [CrossRef]
  28. Salhein, K.; Kobus, C.J.; Zohdy, M. Forecasting Installation Capacity for the Top 10 Countries Utilizing Geothermal Energy by 2030. Thermo 2022, 2, 334–351. [Google Scholar] [CrossRef]
  29. Fodstad, M.; Granado, P.D.; Hellemo, L.; Knudsen, B.R.; Pisciella, P.; Silvast, A.; Bordin, C.; Schmidt, S.; Straus, J. Next frontiers in energy system modelling: A review on challenges and the state of the art. Renew. Sustain. Energy Rev. 2022, 160, 112246. [Google Scholar] [CrossRef]
  30. Lasemi, M.A.; Arabkoohsar, A.; Hajizadeh, A.; Mohammadi-Ivatloo, B. A comprehensive review on optimization challenges of smart energy hubs under uncertainty factors. Renew. Sustain. Energy Rev. 2022, 160, 112320. [Google Scholar] [CrossRef]
Figure 1. Components of Energy Supply and Demand Forecasting System.
Figure 1. Components of Energy Supply and Demand Forecasting System.
Energies 16 01431 g001
Figure 2. The final algorithmic design of the Crawler Service.
Figure 2. The final algorithmic design of the Crawler Service.
Energies 16 01431 g002
Figure 3. Final algorithm of the Algorithm Service.
Figure 3. Final algorithm of the Algorithm Service.
Energies 16 01431 g003
Figure 4. Flow Chart of Level Ratio Detection.
Figure 4. Flow Chart of Level Ratio Detection.
Energies 16 01431 g004
Figure 5. Call relationship between interfaces of AS, CS, DS.
Figure 5. Call relationship between interfaces of AS, CS, DS.
Energies 16 01431 g005
Table 1. Relative error report about coal consumption percentage based on GM(1,1).
Table 1. Relative error report about coal consumption percentage based on GM(1,1).
YearCoal
RV *
(%)
EGM
* FV *
EGM
RE *
EGM
ARE *
ODGM
* FV
ODGM
RE
ODGM
ARE
EDGM
* FV
EDGM
RE
EDGM
ARE
DGM
* FV
DGM
RE
DGM
ARE
199076.276.200.00%76.200.00%76.200.00%76.200.00%
199176.174.2961.8042.37%74.28811.81192.38%74.29621.80382.37%74.30431.79572.36%
199275.774.0381.6622.20%74.03061.66942.21%74.03771.66232.20%74.04491.65512.19%
199374.773.780.921.23%73.77390.92611.24%73.78020.91981.23%73.78640.91361.22%
19947573.5231.4771.97%73.51821.48181.98%73.52351.47651.97%73.52881.47121.96%
199574.673.2681.3321.79%73.26341.33661.79%73.26781.33221.79%73.27211.32791.78%
199673.573.0130.4870.66%73.00940.49060.67%73.01290.48710.66%73.01630.48370.66%
199771.472.759−1.3591.90%72.7563−1.35631.90%72.7589−1.35891.90%72.7614−1.36141.91%
199870.972.506−1.6062.27%72.5041−1.60412.26%72.5058−1.60582.26%72.5074−1.60742.27%
199970.672.253−1.6532.34%72.2528−1.65282.34%72.2535−1.65352.34%72.2542−1.65422.34%
200068.572.002−3.5025.11%72.0024−3.50245.11%72.0022−3.50225.11%72.002−3.5025.11%
20016871.752−3.7525.52%71.7528−3.75285.52%71.7517−3.75175.52%71.7506−3.75065.52%
200268.571.502−3.0024.38%71.5041−3.00414.39%71.5021−3.00214.38%71.5001−3.00014.38%
200370.271.253−1.0531.50%71.2562−1.05621.50%71.2534−1.05341.50%71.2505−1.05051.50%
200470.271.005−0.8051.15%71.0092−0.80921.15%71.0055−0.80551.15%71.0018−0.80181.14%
200572.470.7581.6422.27%70.76311.63692.26%70.75851.64152.27%70.75391.64612.27%
200672.470.5121.8882.61%70.51781.88222.60%70.51231.88772.61%70.50691.89312.61%
200772.570.2672.2333.08%70.27332.22673.07%70.2672.2333.08%70.26082.23923.09%
200871.570.0231.4772.07%70.02971.47032.06%70.02261.47742.07%70.01551.48452.08%
200971.669.7791.8212.54%69.7871.8132.53%69.7791.8212.54%69.7711.8292.55%
MV *
1991~2009
2.47% 2.47% 2.47% 2.47%
201069.269.536−0.3360.49%69.5451−0.34510.50%69.5363−0.33630.49%69.5275−0.32750.47%
201170.269.2940.9061.29%69.3040.8961.28%69.29440.90561.29%69.28470.91531.30%
201268.569.053−0.5530.81%69.0638−0.56380.82%69.0533−0.55330.81%69.0428−0.54280.79%
201367.468.813−1.4132.10%68.8244−1.42442.11%68.8131−1.41312.10%68.8018−1.40182.08%
201465.868.574−2.7744.22%68.5858−2.78584.23%68.5737−2.77374.22%68.5616−2.76164.20%
201563.868.335−4.5357.11%68.3481−4.54817.13%68.3351−4.53517.11%68.3223−4.52237.09%
201662.268.097−5.8979.48%68.1112−5.91129.50%68.0974−5.89749.48%68.0837−5.88379.46%
201760.667.86−7.2611.98%67.8751−7.275112.01%67.8605−7.260511.98%67.846−7.24611.96%
20185967.624−8.62414.62%67.6398−8.639814.64%67.6245−8.624514.62%67.6092−8.609214.59%
201957.767.389−9.68916.79%67.4053−9.705316.82%67.3892−9.689216.79%67.3732−9.673216.76%
202056.867.155−10.35518.23%67.1717−10.37218.26%67.1548−10.35518.23%67.1379−10.33818.20%
MV
2010~2015
1.78% 1.79% 1.78% 1.77%
MV
2016~2020
13.03% 13.06% 13.04% 13.01%
MV
2010~2020
7.92% 7.94% 7.92% 7.90%
* RV, FV, RE, ARE, MV, EGM, ODGM, EDGM and DGM are abbreviations for real value, fitted value, residual error, absolute relative error, mean value, Even Grey Model, Original Difference Grey Model, Even Difference Grey Model and Discrete Grey Model separately.
Table 2. Linear relation between RV and FV of coal consumption percentage.
Table 2. Linear relation between RV and FV of coal consumption percentage.
StylekEGM
* a
EGM
b
EGM
R2
ODGM
* a
ODGM
b
ODGM
R2
EDGM
* a
EDGM
b
EDGM
R2
DGM
* a
DGM
b
DGM
R2
Intranet
Mean Value Style
11.0939−6.89090.4481.0939−6.89090.44791.0939−6.89090.4481.0939−6.89090.4481
21.0321−2.31550.45891.0351−2.53290.45911.0321−2.3160.45891.0291−2.1040.4587
41.0254−1.83240.5021.0286−2.06560.50231.0254−1.83090.5021.0222−1.60190.5017
Simple
Mean Value Style
11.3838−27.99140.88161.3838−27.99140.88091.3838−27.99140.88161.3838−27.99140.8824
O 21.5679−41.4780.93331.5704−41.6590.93311.5679−41.4780.93331.5653−41.2940.9334
41.6066−44.2720.92831.6105−44.5530.92851.6066−44.2730.92831.6027−43.9890.9282
* EGM, ODGM, EDGM and DGM are abbreviations for Even Grey Model, Original Difference Grey Model, Even Difference Grey Model and Discrete Grey Model separately.
Table 3. Relative error report about coal consumption percentage for e1.
Table 3. Relative error report about coal consumption percentage for e1.
YearCoal
RV *
(%)
EGM
* FV *
EGM
RE *
EGM
ARE *
ODGM
* FV
ODGM
RE
ODGM
ARE
EDGM
* FV
EDGM
RE
EDGM
ARE
DGM
* FV
DGM
RE
DGM
ARE
201069.269.536−0.3360.49%69.5451−0.34510.50%69.5363−0.33630.49%69.5275−0.32750.47%
201170.269.2940.9061.29%69.3040.8961.28%69.29440.90561.29%69.28470.91531.30%
201268.569.053−0.5530.81%69.0638−0.56380.82%69.0533−0.55330.81%69.0428−0.54280.79%
201367.468.813−1.4132.10%68.8244−1.42442.11%68.8131−1.41312.10%68.8018−1.40182.08%
201465.868.574−2.7744.22%68.5858−2.78584.23%68.5737−2.77374.22%68.5616−2.76164.20%
201563.868.335−4.5357.11%68.3481−4.54817.13%68.3351−4.53517.11%68.3223−4.52237.09%
201662.268.097−5.8979.48%68.1112−5.91129.50%68.0974−5.89749.48%68.0837−5.88379.46%
201760.667.86−7.2611.98%67.8751−7.275112.01%67.8605−7.260511.98%67.846−7.24611.96%
20185967.624−8.62414.62%67.6398−8.639814.64%67.6245−8.624514.62%67.6092−8.609214.59%
201957.767.389−9.68916.79%67.4053−9.705316.82%67.3892−9.689216.79%67.3732−9.673216.76%
202056.867.155−10.35518.23%67.1717−10.37218.26%67.1548−10.35518.23%67.1379−10.33818.20%
MV *
2010~2015
1.78% 1.79% 1.78% 1.77%
MV
2016~2020
13.03% 13.06% 13.04% 13.01%
MV
2010~2020
7.92% 7.94% 7.92% 7.90%
* RV, FV, RE, ARE, MV, EGM, ODGM, EDGM and DGM are abbreviations for real value, fitted value, residual error, absolute relative error, mean value, Even Grey Model, Original Difference Grey Model, Even Difference Grey Model and Discrete Grey Model separately.
Table 4. Mean value of absolute relative error report about energy consumption data for enhanced algorithms during 2010~2020.
Table 4. Mean value of absolute relative error report about energy consumption data for enhanced algorithms during 2010~2020.
ItemAlgorithmEnhanced
EGM *
ARE *
Enhanced
ODGM *
ARE
Enhanced
EDGM *
ARE
Enhanced
DGM *
ARE
Original
EGM
ARE
Original
ODGM
ARE
Original
EDGM
ARE
Original
DGM
ARE
Coale111.80%11.82%11.80%11.78%18.21%18.36%18.23%18.10%
Oile22.39%2.39%2.39%2.39%8.61%8.59%8.60%8.61%
Gase215.65%15.64%15.65%15.67%42.99%42.85%42.97%43.11%
Powere28.40%8.40%8.40%8.41%23.57%23.49%23.54%23.59%
Amount0.9e1 + 0.1e27.67%6.80%6.79%6.77%8.62%8.69%8.63%8.57%
Mean Value 9.18%9.01%9.01%9.00%20.40%20.40%23.34%20.40%
* EGM, ODGM, EDGM and DGM are abbreviations for Even Grey Model, Original Difference Grey Model, Even Difference Grey Model and Discrete Grey Model separately.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Lin, G.; Liang, Y.; Tavares, A. Design of an Energy Supply and Demand Forecasting System Based on Web Crawler and a Grey Dynamic Model. Energies 2023, 16, 1431. https://doi.org/10.3390/en16031431

AMA Style

Lin G, Liang Y, Tavares A. Design of an Energy Supply and Demand Forecasting System Based on Web Crawler and a Grey Dynamic Model. Energies. 2023; 16(3):1431. https://doi.org/10.3390/en16031431

Chicago/Turabian Style

Lin, Gang, Yanchun Liang, and Adriano Tavares. 2023. "Design of an Energy Supply and Demand Forecasting System Based on Web Crawler and a Grey Dynamic Model" Energies 16, no. 3: 1431. https://doi.org/10.3390/en16031431

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop