A cloud platform-based photovoltaic power station power generation data storage method and system

CN121029761BActive Publication Date: 2026-09-18SHANDONG YOU INTERNET OF THINGS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511252777.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-03
Publication Date
2026-09-18
Estimated Expiration
2045-09-03

AI Technical Summary

Technical Problem

[0004]现有的光伏电站发电量采集和归档方法,一般是以日期进行归档,如按照日月年归档,各个国家每天的开始结束时间不一致,无法进行常规的定时统计

Benefits of technology

本发明可统计归档部署在不同国家的光伏电站发电量,解决平台存在多时区电站统计问题;本发明采用每小时定期归档方式,有效解决定时统计扫描大量数据问题,也避免实时统计对系统性能造成的不良影响,通过利用统计的最小统计时间单元以及高效的数据结构,使得统计工作可轻松承担海量数据,具体实施起来还简单。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121029761B_ABST
    Figure CN121029761B_ABST
Patent Text Reader

Abstract

The application belongs to the field of power generation statistics, and provides a photovoltaic power station power generation data storage method and system based on a cloud platform, which takes hours as a statistical frequency, takes a photovoltaic power station ID and a time string as indexes, obtains and statistically processes equipment power generation data of each photovoltaic power station, and sequentially stores the recorded data in a data structure taking an equipment ID as a key, a date type as a hash key, and obtained power generation and a time stamp as values. The application combines the advantages of real-time statistics and timing statistics, realizes efficient statistics, and avoids time zone problems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power generation statistics, specifically relating to a method and system for storing photovoltaic power generation data based on a cloud platform. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] With the development of technology, photovoltaic power generation is receiving increasing attention, and the statistics and storage of photovoltaic power generation are of great significance.

[0004] Existing methods for collecting and archiving photovoltaic power plant power generation data typically archive data by date, such as by day, month, or year. However, the start and end times of each day vary across countries, making regular, scheduled statistical analysis impossible. Furthermore, when archiving by day, month, and year, a scheduled task usually scans a large amount of historical data to obtain a single record. This not only results in a massive amount of data to query but also causes significant performance waste.

[0005] On the other hand, existing methods still rely on device reporting. When the amount of device data is too large and the reporting is frequent, data queries and comparison calculations will be performed frequently, putting great pressure on the system. Moreover, since it is an archived statistics, it usually does not need to be processed in real time. This statistical method will cause too much waste of resources and cannot solve the problem of archiving statistics for devices in multiple time zones. Summary of the Invention

[0006] To address the aforementioned problems, this invention proposes a method and system for storing photovoltaic power generation data based on a cloud platform. This invention combines the advantages of real-time and timed statistics to achieve efficient statistics and avoid time zone issues.

[0007] According to some embodiments, the present invention adopts the following technical solution: A method for storing photovoltaic power generation data based on a cloud platform includes the following steps: Using hours as the statistical frequency and photovoltaic power station ID and time string as the index, we can obtain and count the power generation data of each photovoltaic power station. The data is stored sequentially using a data structure with device ID as the key, date type as the hash key, and the obtained power generation and timestamp as the values.

[0008] As an alternative implementation, the time string is the local time string of the country where the photovoltaic power station is located.

[0009] As an alternative implementation method, in the process of obtaining and statistically analyzing the power generation data of each photovoltaic power station using the photovoltaic power station ID and time string as indexes, the photovoltaic power station ID and time string are used as indexes to insert the obtained power generation data of each photovoltaic power station. Before insertion, the uniqueness of the index is checked. If it is unique, it is inserted; otherwise, the previous data is deleted before inserting the obtained power generation data of each photovoltaic power station and storing it.

[0010] As an alternative implementation method, in the process of obtaining and statistically analyzing the power generation data of each photovoltaic power station using the photovoltaic power station ID and time string as indexes, the timestamp of the obtained data is converted into the user's local time according to the time zone of the user terminal.

[0011] As a further step, it is determined whether the user's current time spans different dates. If so, a new record is generated; otherwise, the record for the current date is overwritten.

[0012] As an alternative implementation method, in the process of acquiring and statistically analyzing the power generation data of each photovoltaic power station using the photovoltaic power station ID and time string as indexes, the acquired power generation data of each photovoltaic power station are accumulated to obtain the corresponding daily, monthly, and annual power generation.

[0013] As an alternative implementation, during the process of storing the recorded data in a data structure with device ID as the key, date type as the hash key, and the obtained power generation and timestamp as the values, the devices that have reported data are recorded, and the reporting time is used as an associated score characteristic to query the devices that have reported data within the current set time period.

[0014] As an alternative implementation, during the process of storing the recorded data in a data structure with device ID as the key, date type as the hash key, and the obtained power generation and timestamp as the values, the device ID that has reported data in the most recent set time period is extracted, and the daily power generation, monthly power generation or annual power generation is extracted from the data structure of the last record based on the device ID, and summarized into a new data structure to store the total power generation of the corresponding device.

[0015] As a further implementation, in the new data structure, the photovoltaic power station ID is the key, the date type is the hash key, the statistical data value is the value, and the data is stored in the corresponding daily table, monthly table or yearly table.

[0016] A cloud-based photovoltaic power plant power generation data storage system includes: The equipment data acquisition module is configured to acquire and statistically analyze the power generation data of each photovoltaic power station using hourly statistics and the photovoltaic power station ID and time string as indexes. The device data storage module is configured to store the recorded data sequentially using a data structure with device ID as the key, date type as the hash key, and the obtained power generation and timestamp as the values.

[0017] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the steps in the method described above.

[0018] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention can statistically archive the power generation of photovoltaic power plants deployed in different countries, solving the problem of statistical analysis of power plants in multiple time zones on the platform. This invention adopts an hourly periodic archiving method, which effectively solves the problem of scanning a large amount of data at regular intervals and avoids the adverse effects of real-time statistics on system performance. By utilizing the smallest statistical time unit and efficient data structure, the statistical work can easily handle massive amounts of data, and the implementation is also simple.

[0019] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0020] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0021] Figure 1 A schematic diagram illustrating the implementation process of one embodiment; Figure 2 This is a flowchart illustrating a method for storing power generation data in a photovoltaic power plant, according to one embodiment. Detailed Implementation

[0022] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0023] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0024] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0025] Where there is no conflict, the embodiments and features described in this application may be combined with each other.

[0026] Example 1 A method for storing photovoltaic power generation data based on a cloud platform, such as... Figure 2 As shown, it includes the following steps: Using hours as the statistical frequency and photovoltaic power station ID and time string as the index, we can obtain and count the power generation data of each photovoltaic power station. The data is stored sequentially using a data structure with device ID as the key, date type as the hash key, and the obtained power generation and timestamp as the values.

[0027] Photovoltaic power plants are distributed across multiple countries, and the start and end times of the day differ in each country, making it impossible to perform daily, timed statistics.

[0028] Therefore, this embodiment adopts an hourly statistics scheme. Since the start and end times of each hour are consistent globally, the statistics are performed once per hour. The photovoltaic power station ID and time (local time string of the user's (i.e., the equipment end of the photovoltaic power station) country, day (e.g., 2025-06-27), month (e.g., 2025-06), year (e.g., 2025)) are used as unique indexes. Data can be directly processed using MySQL's REPLACE INTO function. First, the index uniqueness is checked. If it is not unique, it will be deleted before insertion.

[0029] If it is not unique, it proves that there is duplicate data, that is, the data already exists in the database. Delete the previous data. The purpose of the index is to determine whether it is unique to ensure that each power station has only one record per day, thereby reducing the amount of data stored. For example, the daily power generation is counted once per hour to ensure that there is only one record per day. The statistical logic of the monthly table, yearly table, and total power generation table is the same as that of the daily power generation table.

[0030] The purpose is to convert the timestamp into the user's local time based on the time zone where the user was created after the latest hourly data is collected. Then, it is determined whether the user's current time has crossed into a new day. If not, the records collected for that day are overwritten. If the time has crossed into a new day, a new record is generated.

[0031] The logic of recording monthly and annual power generation on the same day solves the problem that users in multiple time zones cannot perform scheduled archiving normally. By breaking it down into hourly statistics, time zone issues are avoided. The statistical results are the same as the daily statistics. Each day, the device only reports the last piece of data. The statistical data is also divided into 24 parts, making the statistical execution more efficient. At the same time, hourly statistics also avoid the performance burden on the system caused by performing statistics on real-time data as soon as it comes in. like Figure 1As shown, in the specific implementation process, the equipment of each photovoltaic power station (such as inverters) sends data to the cloud platform through the gateway. The cloud platform performs data statistics and archiving through the data processing module, and then hands it over to the storage module for storage.

[0032] For example, if a Beijing user's device reports power generation to the server at 1:00 AM, the statistical result will be 1:00 AM on June 20, 2025. This data spans past the 19th and is a newly generated record for the 20th. However, if a German user's device reports power generation to the server at the same time as Beijing time (1:00 AM), the actual local time is 7:00 PM on the 19th, and this data does not span past the 19th, thus overwriting the data before the 19th.

[0033] On the other hand, this embodiment can leverage the unique key value characteristic of Redis's hash structure to record the last data of daily, monthly, and yearly power generation reported by the device, ensuring that there is only one data record for each device. This not only obtains the final data for statistics but also avoids disk usage caused by data storage.

[0034] In this embodiment, the data structure is set as follows: key is device ID, hashkey is date type (day, month, year, total), and value is battery power + timestamp. The timestamp is used to convert the data to the user's local time when summarizing day, month, and year to determine whether it belongs to the current day, month, or year. When the device does not report for a long time, expired data is filtered out during the statistics.

[0035] This embodiment uses Redis's zset to record devices that have reported data. By leveraging the zset's associated score feature, the reporting time can be used as the score to efficiently query devices that have reported data in the past hour.

[0036] At the end of each hour, the device IDs of the most recent hour's reported data are first retrieved from the zset set based on the current time. Then, the daily, monthly, and annual power generation are extracted from the hash structure of the last work record based on these device IDs (there are multiple power generation modules and multiple power generation parameters in a device). These are then aggregated into a new Redis hash structure to record the total power generation of the device. Finally, these devices are aggregated under the power station to obtain the power station's hash record of the total power station's power generation.

[0037] The new structure is set as follows: the key is the power station ID, the hash key is the date type (day, month, year, total, representing the power generation information of the corresponding dimension, where total represents all generated electricity, day represents the current day, each day starts from 0, month represents the current month, each month starts from 0, and year represents the current year), and the value is the statistical value. Combined with the time zone calculation from the previous step, the user's current day, month, and year are stored in the corresponding day table (formatted as 2025-06-27), month table (formatted as 2025-06), and year table (formatted as 2025) in the database.

[0038] This approach avoids scanning and calculating large amounts of data after the reported data is entered into the database. When the power generation of the aggregation device reaches the power station, it only needs to retrieve the last cached data from Redis for summation calculation. Furthermore, when entering the data into the database, the timestamp is converted to the user's local time zone string time according to the user's time zone. During the query, the query can be performed directly based on the user's local time, avoiding the need for time zone conversion operations during the query and improving query efficiency.

[0039] Of course, in other embodiments, other software or systems can also be used to implement the above process.

[0040] Example 2 A cloud-based photovoltaic power plant power generation data storage system includes: The equipment data acquisition module is configured to acquire and statistically analyze the power generation data of each photovoltaic power station using hourly statistics and the photovoltaic power station ID and time string as indexes. The device data storage module is configured to store the recorded data sequentially using a data structure with device ID as the key, date type as the hash key, and the obtained power generation and timestamp as the values.

[0041] Example 3 An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the steps in the method described above.

[0042] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of one or more computer-usable storage media (including, but not limited to, disk storage, etc.) containing computer-usable program code. CD - ROM It takes the form of a computer program product implemented on (such as optical memory, etc.).

[0043] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0044] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0045] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0046] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made by those skilled in the art without creative effort within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A cloud platform-based photovoltaic power plant power generation data storage method, characterized in that, Includes the following steps: Using hours as the statistical frequency and photovoltaic power station ID and time string as the index, we can obtain and count the power generation data of each photovoltaic power station. The data is stored sequentially using a data structure with device ID as the key, date type as the hash key, and the obtained power generation and timestamp as the values; In the process of storing the recorded data in a data structure with device ID as the key, date type as the hash key, and obtained power generation and timestamp as the values, the device that has reported data is recorded, and the reporting time is used as the associated score characteristic to query the device that has reported data within the current set time period; In the process of storing the recorded data in a data structure with device ID as the key, date type as the hash key, and the obtained power generation and timestamp as the values, the device ID that has reported data in the most recent set time period is extracted. The daily power generation, monthly power generation or annual power generation is extracted from the data structure of the last record based on the device ID, and summarized into a new data structure to store the total power generation of the corresponding device. In the new data structure, the photovoltaic power station ID is the key, the date type is the hash key, the statistical data value is the value, and the data is stored in the corresponding daily table, monthly table or yearly table; The time string is the local time string of the country where the photovoltaic power station is located; In the process of obtaining and statistically analyzing the power generation data of each photovoltaic power station using the photovoltaic power station ID and time string as indexes, the photovoltaic power station ID and time string are used as indexes to insert the obtained power generation data of each photovoltaic power station. Before insertion, the uniqueness of the index is checked. If it is unique, it is inserted; otherwise, the previous data is deleted before inserting the obtained power generation data of each photovoltaic power station and storing it.

2. The cloud platform-based photovoltaic power plant power generation data storage method of claim 1, characterized in that, Using the photovoltaic power station ID and time string as indexes, in the process of obtaining and statistically analyzing the power generation data of each photovoltaic power station, the timestamp of the obtained data is converted into the user's local time according to the user's time zone.

3. The method for storing photovoltaic power generation data based on a cloud platform as described in claim 2, characterized in that, Determine if the user's current time spans different dates. If so, generate a new record; otherwise, overwrite the record for the current date.

4. The method for storing photovoltaic power generation data based on a cloud platform as described in claim 1, characterized in that, Using the photovoltaic power station ID and time string as indexes, the process of obtaining and statistically analyzing the power generation data of each photovoltaic power station involves accumulating the obtained power generation data of each photovoltaic power station to obtain the corresponding daily, monthly, and annual power generation.

5. A cloud-based photovoltaic power plant power generation data storage system, characterized in that, include: The equipment data acquisition module is configured to acquire and statistically analyze the power generation data of each photovoltaic power station using hourly statistics and the photovoltaic power station ID and time string as indexes. The device data storage module is configured to store the recorded data sequentially using a data structure with device ID as the key, date type as the hash key, and the obtained power generation and timestamp as the values; In the process of storing the recorded data in a data structure with device ID as the key, date type as the hash key, and obtained power generation and timestamp as the values, the device that has reported data is recorded, and the reporting time is used as the associated score characteristic to query the device that has reported data within the current set time period; In the process of storing the recorded data in a data structure with device ID as the key, date type as the hash key, and the obtained power generation and timestamp as the values, the device ID that has reported data in the most recent set time period is extracted. The daily power generation, monthly power generation or annual power generation is extracted from the data structure of the last record based on the device ID, and summarized into a new data structure to store the total power generation of the corresponding device. In the new data structure, the photovoltaic power station ID is the key, the date type is the hash key, the statistical data value is the value, and the data is stored in the corresponding daily table, monthly table or yearly table; The time string is the local time string of the country where the photovoltaic power station is located; In the process of obtaining and statistically analyzing the power generation data of each photovoltaic power station using the photovoltaic power station ID and time string as indexes, the photovoltaic power station ID and time string are used as indexes to insert the obtained power generation data of each photovoltaic power station. Before insertion, the uniqueness of the index is checked. If it is unique, it is inserted; otherwise, the previous data is deleted before inserting the obtained power generation data of each photovoltaic power station and storing it.

6. An electronic device, characterized in that, It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, which, when executed by the processor, perform the steps of the method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Massive dynamic data fast query method meeting different time granularity requirements

    CN103605664A

  • Cluster monitoring data collection method

    CN106951431A

  • Method and device for processing statistical data time zone problem

    CN117785955A

  • Mass generating capacity data management method, device and equipment

    CN118964365A