## 1 Introduction  
Real-time tariffs are generated in real time and are constantly accumulated and calculated at a fast rate, which means that large, complex time-series data are involved, requiring efficient algorithms and techniques to process and analyze them [1]. Big data presents a complex technical challenge due to datasets with large volumes, diverse categories, and intricate structures, requiring innovative frameworks and techniques to efficiently extract valuable insights [2]. Therefore, real-time electricity price forecasting is not only an important area of big data application but also a key aspect of electricity market analysis. Inrecent years, the focus on big data analysis with time attribution has become increasingly popular for analyzing and predicting electricity prices, especially for real-time electricity price forecasting [3] and energy trading for electric vehicles. As electricity price structures become more diverse, an increasing number of power utilities integrate demand charges into their tariffs. Households equipped with photovoltaic (PV) and energy storage systems can respond to this shift by implementing effective energy management strategies [4]. Accurate price forecasting not only brings stable benefits to market participants but also arranges data in making reasonable user demand-side planning decisions [5]. Renewable energy will undoubtedly have a huge impact on electricity price volatility as wind and solar resources are integrated into the electricity system at high penetration rates [6]. Therefore, forecasting data with time attribution is becoming an important part of the research on the power economy market [7]. With changes in climate, festivals, etc., time-series data have dynamic change characteristics with time lapses [8]. Time-series clustering is used to identify feature-driven clusters based on the similarity method [9]. In recent years, clustering methods have usually divided into three categories: Firstly, structural characteristics are mostly considered the shape-shifting of cluster datasets [10]. Secondly, structural characteristics can be constructed by clustering regulation using the basic statistical features, time or frequency feathers. Thirdly, model characteristics are based on the density function that reflects the spatial distribution of data points. Connectivity is a typical feature of the density clustering method; it is suitable for solving real-time processing problems, especially time-series parameters, and for classifying suitable timespan intervals. Furthermore, calculating a dynamic density radius to satisfy the real-time operation is still a big challenge. Real-time tariff forecasting is an important aspect of electricity market management, especially with the rapid development of new energy sources, home energy trading, and microgrid communities. The popularity of electric vehicles (EVs) brings new challenges and opportunities to the power system. On the one hand, the charging demand of EVs can lead to an increase in the volatility of electric load. On the other hand, EVs can also be used as distributed energy resources to balance the grid load by providing power back during peak grid load hours [11]. Home energy trading refers to the production and sale of electricity by residential customers through distributed energy resources (e.g., photovoltaic power systems). This type of trading not only improves the efficiency of energy utilization but also brings economic benefits to household users [12]. However, the popularity of home energy trading also places greater demands on real-time tariff forecasting in the electricity market, which needs to take into account the fluctuations in distributed energy production and the consumption habits of users [13]. Therefore, we propose a self-adaptive multi-density (SAMD) prediction model to support adaptive changes in the density radius over spatial distribution of time-series data.