A method, device and equipment for managing massive power generation data
By using preset data structures in the database system to dynamically manage the subset of power generation data, the problem of performance degradation in the processing of massive power generation data is solved, efficient storage and query are achieved, and data reliability is improved.
Patent Information
- Application Number
- CN202411458653.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-10-18
AI Technical Summary
When traditional database systems face massive power generation data, it is difficult to efficiently process, resulting in a decrease in data query speed and a longer system response time, which cannot meet the needs of modern fast data processing.
A preset data structure is adopted, including the first field as the ID information of the power generation equipment, the middle field as the power generation data corresponding to different periods, and the tail field as the update time of the current data. Through this data structure, massive power generation data are stored and updated, and subsets of power generation data are dynamically managed, and data storage and query are optimized.
The preset data structure greatly saves data storage space, achieves the purpose of efficient use of storage space, improves the reliability and query efficiency of data storage, and can dynamically update and store power generation data to prevent data loss.
Smart Images

Figure CN118964365B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data storage, and in particular to a method, device and equipment for managing massive power generation data. Background Art
[0002] From the early to mid-20th century, with the continuous advancement of power technology and the rapid growth of power demand, the power industry entered a stage of rapid development. From the late 20th century to the present, the power industry has gradually entered a mature stage, with power supply and demand tending to balance. At the same time, the power industry is also constantly innovating technology and transforming and upgrading. Due to the continued rapid development of my country's power industry, the total power generation is also rising, and the power generation data generated is also accumulating at an astonishing rate.
[0003] The storage and statistics of power generation require a data structure. The database is an integrated, sharable, and persistent data storage system. It allows users to efficiently store, retrieve, update, and delete data. In order to achieve these functions, the database requires a clear and reasonable structure.
[0004] As existing power equipment operates more and more frequently, the power generation data generated is accumulated at an alarming rate. For example, a grid-connected inverter that records power generation every 5 minutes will generate more than 2.6 million pieces of data within its design life of 25 years. In the storage mode that only contains the most basic data types to identify the time when the power generation is generated, the power generation data and the device number to which it belongs, assuming that the power generation equipment records a piece of data in a unit cycle, such as every 5 minutes, it can be calculated that 288 pieces of data need to be recorded in a day, and about 105120 pieces of data (288×365=105120) will be generated in a year. A single record requires about 45 bytes (33+4+8=45) to store a piece of power generation data, that is, a total of about 4.5MB (105120×45÷1024÷1024≈4.5) of space is consumed to store the power generation of an inverter device in a year. The design life of a conventional grid-connected inverter is 25 years, so a total of 112.5MB (4.5×25=112.5) is consumed to store the power generation data of one device. This is just the storage space occupied by a time period. It can be seen that if a power generation device records power generation for multiple different unit cycles, the space occupied by multiple power generation devices each year is very large. Faced with the huge data scale of hundreds or thousands of devices, traditional data storage solutions have shown unavoidable drawbacks. The storage and query of massive data will seriously oppress the performance of the database. Traditional database systems are difficult to process efficiently in the face of huge amounts of data, resulting in a decrease in data query speed and a longer system response time, which cannot meet the needs of modern fast data processing. Summary of the invention
[0005] In view of the above problems, the present application is proposed to provide a method, device and apparatus for managing massive power generation data that overcome the above problems or at least partially solve the above problems.
[0006] The management method involves a preset data structure, wherein the data structure includes a first field for ID information of the power generation equipment, a middle field for power generation data corresponding to different cycles, and a tail field for the update time of the current data; wherein the middle field includes a number of corresponding power generation data subsets recorded using different total detection cycles and their corresponding detection unit cycles, and the length of the power generation data subset is the quotient of the corresponding total detection cycle and the detection unit cycle;
[0007] The management method comprises:
[0008] In response to a data update request, obtaining the current time; wherein the data update request includes receiving ID information of the power generation equipment and the power generation of the minimum unit cycle;
[0009] When the power generation device is an existing device, determining the data update mode and data update position corresponding to each power generation data subset in the middle field according to the current time and the last update time;
[0010] The data structure is updated according to the power generation of the minimum unit period, the update method and the data update position.
[0011] The management method also includes:
[0012] When the power generation device is not an existing device, creating a new data structure according to the ID information of the power generation device;
[0013] Determine a data update position corresponding to each power generation data subset in the middle field according to the current time;
[0014] The data structure is updated according to the power generation of the minimum unit period and the data update position.
[0015] Further, the power generation data subset includes a first power generation data subset, the total detection period of the first power generation data subset is a preset number of years, and the detection unit period is 1 year; the data update position includes a year data update position;
[0016] The step of determining the data update mode and data update position corresponding to each of the power generation data subsets in the middle field according to the current time and the most recent update time includes:
[0017] Determining the year data update position in the first power generation data subset according to the year in the current time;
[0018] The updating method of the first power generation data subset is determined according to the year in the current time and the year data updating position.
[0019] Furthermore, the step of updating the data structure according to the power generation of the minimum unit period, the updating method and the data updating position includes:
[0020] Generate current annual updated power generation data based on the most recently updated annual power generation data and the power generation of the minimum unit period;
[0021] The power generation data updated in the most recent year at the year data update position in the first power generation data subset is cleared, and the current year updated power generation data is input into the year data update position.
[0022] Further, the power generation data subset also includes a second power generation data subset, the total detection period of the second power generation data subset is 1 year, and the detection unit period is 1 month; the data update position includes a monthly data update position;
[0023] The step of determining the data update mode and data update position corresponding to each of the power generation data subsets in the middle field according to the current time and the last update time also includes:
[0024] Determining the year data update position in the first power generation data subset according to the year in the current time;
[0025] Determining an update method of the first power generation data subset according to the year in the current time and the year data update position;
[0026] Determining the monthly data update position in the second power generation data subset according to the month in the current time;
[0027] The updating method of the second power generation data subset is determined according to the month in the current time and the monthly data updating position.
[0028] Furthermore, the step of updating the data structure according to the power generation of the minimum unit period, the updating method and the data updating position includes:
[0029] Generate current annual updated power generation data based on the most recently updated annual power generation data and the power generation of the minimum unit period;
[0030] Clear the most recently updated annual power generation data at the annual data update position in the first power generation data subset, and input the current annual updated power generation data into the annual data update position;
[0031] Generate the current month updated power generation data based on the most recently updated monthly power generation data and the power generation of the minimum unit period;
[0032] When the year of the current time is the same as the year of the last update time or the year difference is equal to 1 year, the last updated monthly power generation data at the monthly data update position in the second power generation data subset is cleared, and the current month updated power generation data is input into the monthly data update position.
[0033] Or when the year of the current time differs from the year of the most recent update time by more than one year, the monthly power generation data in the second power generation data subset is cleared, and the current monthly updated power generation data is input into the monthly data update position.
[0034] Further, the power generation data subset also includes a third power generation data subset, the total detection period of the third power generation data subset is 1 month, and the detection unit period is 1 day; the data update position includes a date data update position;
[0035] The step of determining the data update mode and data update position corresponding to each of the power generation data subsets in the middle field according to the current time and the last update time also includes:
[0036] Determining the year data update position in the first power generation data subset according to the year in the current time;
[0037] Determining an update method of the first power generation data subset according to the year in the current time and the year data update position;
[0038] Determining the monthly data update position in the second power generation data subset according to the month in the current time;
[0039] Determining an update method of the second power generation data subset according to the month in the current time and the data update position of the month;
[0040] Determining the date data update position in the third power generation data subset according to the date number in the current time;
[0041] The updating method of the third power generation data subset is determined according to the date number in the current time and the date data updating position.
[0042] Furthermore, the step of updating the data structure according to the power generation of the minimum unit period, the updating method and the data updating position includes:
[0043] Generate current annual updated power generation data based on the most recently updated annual power generation data and the power generation of the minimum unit period;
[0044] Clear the most recently updated annual power generation data at the annual data update position in the first power generation data subset, and input the current annual updated power generation data into the annual data update position;
[0045] Generate the current month updated power generation data based on the most recently updated monthly power generation data and the power generation of the minimum unit period;
[0046] When the year of the current time is the same as the year of the most recent update time or the year difference is equal to 1 year, the most recently updated monthly power generation data at the monthly data update position in the second power generation data subset is cleared, and the current monthly updated power generation data is input into the monthly data update position;
[0047] or when the year of the current time differs from the year of the most recent update time by more than one year, the monthly power generation data in the second power generation data subset is cleared, and the current monthly updated power generation data is input into the monthly data update position;
[0048] Generate updated power generation data for the current day based on the power generation data of the most recently updated date and the power generation of the minimum unit period;
[0049] When the year of the current time is the same as the year of the most recent update time and the month difference is no more than 1 month, or the year difference is equal to 1 year and it is a cross-year month, then the most recently updated daily power generation data at the date data update position in the third power generation data subset is cleared, and the current day updated power generation data is input into the date data update position;
[0050] Or when the year of the current time is the same as the year of the most recent update time and the month difference is greater than 1 month, or the year difference is equal to 1 year and it is not a cross-year month, the daily power generation data in the third power generation data subset is cleared, and the current day updated power generation data is input into the date data update position.
[0051] Further, the power generation data subset also includes a fourth power generation data subset, the fourth power generation data subset has a total detection period of 1 day, and a detection unit period is a preset number of minutes; the data update position includes a minute data update position;
[0052] The step of determining the data update mode and data update position corresponding to each of the power generation data subsets in the middle field according to the current time and the last update time also includes:
[0053] Determining the year data update position in the first power generation data subset according to the year in the current time;
[0054] Determining an update method of the first power generation data subset according to the year in the current time and the year data update position;
[0055] Determining the monthly data update position in the second power generation data subset according to the month in the current time;
[0056] Determining an update method of the second power generation data subset according to the month in the current time and the data update position of the month;
[0057] Determining the date data update position in the third power generation data subset according to the date number in the current time;
[0058] Determining an update method of the third power generation data subset according to the date number in the current time and the date data update position;
[0059] Determine the minute data update position in the fourth power generation data subset according to the minute in the current time;
[0060] The updating method of the fourth power generation data subset is determined according to the minute in the current time and the minute data updating position.
[0061] Furthermore, the step of updating the data structure according to the power generation of the minimum unit period, the updating method and the data updating position includes:
[0062] Generate current annual updated power generation data based on the most recently updated annual power generation data and the power generation of the minimum unit period;
[0063] Clear the most recently updated annual power generation data at the annual data update position in the first power generation data subset, and input the current annual updated power generation data into the annual data update position;
[0064] Generate the current month updated power generation data based on the most recently updated monthly power generation data and the power generation of the minimum unit period;
[0065] When the year of the current time is the same as the year of the most recent update time or the year difference is equal to 1 year, the most recently updated monthly power generation data at the monthly data update position in the second power generation data subset is cleared, and the current monthly updated power generation data is input into the monthly data update position;
[0066] or when the year of the current time differs from the year of the most recent update time by more than one year, the monthly power generation data in the second power generation data subset is cleared, and the current monthly updated power generation data is input into the monthly data update position;
[0067] Generate updated power generation data for the current day based on the power generation data of the most recently updated date and the power generation of the minimum unit period;
[0068] When the year of the current time is the same as the year of the most recent update time and the month difference is no more than 1 month, or the year difference is equal to 1 year and it is a cross-year month, then the most recently updated daily power generation data at the date data update position in the third power generation data subset is cleared, and the current day updated power generation data is input into the date data update position;
[0069] or when the year of the current time is the same as the year of the most recent update time and the month difference is greater than 1 month, or the year difference is equal to 1 year and is not a cross-year month, clear the daily power generation data in the third power generation data subset, and input the current day updated power generation data into the date data update position;
[0070] Generate the current minute updated power generation data according to the most recently updated minute power generation data and the power generation of the minimum unit period;
[0071] When the year of the current time is the same as the year of the last updated time, the month is the same, and the date number difference is no more than 1 day, or the year is the same, the month difference is equal to 1 month, and it is a day that crosses a month, or the year difference is equal to 1 year, and it is a month that crosses a year and a day that crosses a year, then clear the last updated power generation data of the minute data update position of the fourth power generation data subset, and input the current minute updated power generation data into the minute data update position;
[0072] Or when the year of the current time is the same as the year of the most recent update time, the month is the same, and the date number difference is greater than 1 day, or the year is the same, the month difference is equal to 1 month, and it is not a cross-month day, or the year difference is equal to 1 year, and it is not a cross-year month, or the year difference is equal to 1 year, and it is a cross-year month but not a cross-year day, then the minute power generation data of the fourth power generation data subset is cleared, and the current minute updated power generation data is input into the minute data update position.
[0073] The present application also discloses a management device for massive power generation data, the management device involves a preset data structure, the data structure includes a first field for ID information of a power generation device, a middle field for power generation data corresponding to different cycles, and a tail field for the update time of the current data; wherein the middle field includes a number of corresponding power generation data subsets recorded using different total detection cycles and their corresponding unit detection cycles, and the length of the power generation data subset is the quotient of the corresponding total detection cycle and the unit detection cycle;
[0074] The management device comprises:
[0075] A response unit, configured to obtain the current time in response to a data update request; wherein the data update request includes receiving ID information of the power generation equipment and the power generation of the minimum unit cycle;
[0076] a determining unit, configured to determine, when the power generation device is an existing device, a data updating mode and a data updating position corresponding to each of the power generation data subsets in the middle field according to the current time and the last updating time;
[0077] An updating unit is used to update the data structure according to the power generation of the minimum unit period, the updating method and the data updating position.
[0078] The present application also discloses a device, which includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, any of the methods for managing massive power generation data as described above is implemented.
[0079] The present application also discloses a computer storage medium, wherein the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for managing massive power generation data as described above is implemented.
[0080] This application has the following advantages:
[0081] In the embodiment of the present application, the data structure used in the prior art for storing massive data will not only increase the occupied storage space, but also reduce the access efficiency of data. The present application provides a management method, device and equipment for massive power generation data, the management method comprising: in response to a data update request, obtaining the current time; wherein the data update request comprises receiving the ID information of the power generation equipment and the power generation of the minimum unit cycle; when the power generation equipment is an existing equipment, determining the data update mode and data update position corresponding to each power generation data subset in the middle field according to the current time and the most recent update time; updating the data structure according to the power generation of the minimum unit cycle, the update mode and the data update position. wherein the preset data structure comprises a first field for the ID information of the power generation equipment, a middle field for the power generation data corresponding to different cycles, and a tail field for the update time of the current data; the middle field comprises a number of corresponding power generation data subsets recorded using different total detection cycles and their corresponding unit detection cycles, and the length of the power generation data subset is the quotient of the corresponding total detection cycle and the unit detection cycle. By storing massive amounts of power generation data through a preset data structure, data storage space is greatly saved, achieving the goal of efficient use of storage space. The data management method can realize dynamic updating and storage of power generation data, thereby effectively preventing the generation equipment from being unable to connect to the server due to abnormal power outages and other reasons, resulting in data loss and causing storage data confusion, thereby improving the reliability of data storage. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application 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 any creative labor.
[0083] Figure 1 It is a flowchart of a method for managing massive power generation data according to an embodiment of the present application;
[0084] Figure 2 It is a flowchart of a method for managing massive power generation data provided by an embodiment of the present application;
[0085] Figure 3 Schematic representation of a conventional power generation data storage structure;
[0086] Figure 4 A schematic representation of a data storage structure of a method for managing massive power generation data provided in one embodiment of the present application;
[0087] Figure 5 It is a structural schematic diagram of a device for managing massive power generation data provided by one embodiment of the present invention;
[0088] Figure 6 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0089] In order to make the objects, features and advantages of the present application more obvious and understandable, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0090] Reference Figure 1 , shows a flowchart of a method for managing massive power generation data provided by an embodiment of the present application; the management method involves a preset data structure, the data structure includes a first field for the ID information of the power generation equipment, a middle field for the power generation data corresponding to different cycles, and a tail field for the update time of the current data; wherein the middle field includes a number of corresponding power generation data subsets recorded using different total detection cycles and their corresponding detection unit cycles, and the length of the power generation data subset is the quotient of the corresponding total detection cycle and the detection unit cycle. Specifically, the following steps may be included:
[0091] S110, in response to a data update request, obtaining the current time; wherein the data update request includes receiving ID information of the power generation equipment and the power generation of the minimum unit cycle;
[0092] S120, when the power generation device is an existing device, determining the data update mode and data update position corresponding to each power generation data subset in the middle field according to the current time and the last update time;
[0093] S130, updating the data structure according to the power generation of the minimum unit period, the updating method and the data updating position.
[0094] In the embodiment of the present application, the data structure used in the prior art for storing massive data will not only increase the occupied storage space, but also reduce the access efficiency of data. The present application provides a management method, device and equipment for massive power generation data, the management method comprising: in response to a data update request, obtaining the current time; wherein the data update request comprises receiving the ID information of the power generation equipment and the power generation of the minimum unit cycle; when the power generation equipment is an existing equipment, determining the data update mode and data update position corresponding to each power generation data subset in the middle field according to the current time and the most recent update time; updating the data structure according to the power generation of the minimum unit cycle, the update mode and the data update position. wherein the preset data structure comprises a first field for the ID information of the power generation equipment, a middle field for the power generation data corresponding to different cycles, and a tail field for the update time of the current data; the middle field comprises a number of corresponding power generation data subsets recorded using different total detection cycles and their corresponding unit detection cycles, and the length of the power generation data subset is the quotient of the corresponding total detection cycle and the unit detection cycle. By storing massive amounts of power generation data through a preset data structure, a large amount of data storage space is saved, achieving the purpose of more efficient use of storage space. The data management method can realize dynamic updating and storage of power generation data, thereby effectively preventing the generation equipment from being unable to connect to the server due to abnormal power outages and other reasons, resulting in data loss and causing storage data confusion, thereby improving the reliability of data storage.
[0095] Next, a method for managing massive power generation data in this exemplary embodiment will be further described.
[0096] As described in step S110, in response to the data update request, the current time is acquired; wherein the data update request includes receiving the ID information of the power generation equipment and the power generation of the minimum unit period.
[0097] As described in step S120, when the power generation device is an existing device, the data update mode and data update position corresponding to each power generation data subset in the middle field are determined according to the current time and the last update time;
[0098] In one embodiment, the specific process of step S120 "when the power generation equipment is an existing equipment, determining the data update method and data update position corresponding to each power generation data subset in the middle field based on the current time and the most recent update time" can be further explained in combination with the following description.
[0099] As described in the following steps, the year data update position is determined in the first power generation data subset according to the year in the current time; and the update method of the first power generation data subset is determined according to the year in the current time and the year data update position.
[0100] It should be noted that the power generation data subset includes a first power generation data subset, the total detection period of the first power generation data subset is a preset number of years, and the detection unit period is 1 year; the data update position includes a year data update position.
[0101] It should be noted that the first power generation data subset represents the data subset yearkWh. The field name of the first power generation data subset in the middle field can be yearkWh. The power generation data subset represents the annual power generation of the power generation equipment in the past 100 years, with 2000 as the first year, that is, the database position 0 represents the year 2000. This field is stored in the database in the json data subset format, and the length of the data subset is 100. That is, the data subset position 24 stores the power generation of the equipment in 2024, the data subset position 25 stores the power generation of the equipment in 2025, and so on, the power generation from 2000 to 2099 can be recorded.
[0102] In this embodiment, the specific process of "updating the data structure according to the power generation of the minimum unit period, the update method and the data update position" in step S130 can be further explained in combination with the following description.
[0103] As described in the following steps, the current annual updated power generation data is generated based on the most recently updated annual power generation data and the power generation of the minimum unit cycle; the most recently updated annual power generation data at the year data update position in the first power generation data subset is cleared, and the current annual updated power generation data is input into the year data update position.
[0104] In one embodiment, the specific process of step S120 "when the power generation equipment is an existing equipment, determining the data update method and data update position corresponding to each power generation data subset in the middle field according to the current time and the most recent update time" can also be combined with the following description.
[0105] As described in the following steps, the year data update position is determined in the first power generation data subset according to the year in the current time; the update method of the first power generation data subset is determined according to the year in the current time and the year data update position; the month data update position is determined in the second power generation data subset according to the month in the current time; the update method of the second power generation data subset is determined according to the month in the current time and the month data update position.
[0106] It should be noted that the power generation data subset also includes a second power generation data subset, the total detection period of the second power generation data subset is 1 year, and the detection unit period is 1 month; the data update position includes a monthly data update position.
[0107] It should be noted that the second power generation data subset represents the data subset monthkWh. The field name of the second power generation data subset in the middle field can be monthkWh. The power generation data subset represents the monthly power generation of the equipment in the past year. For the convenience of calculation, the data subset position 0 does not record data, and the data subset positions 1 to 12 are used to represent the months from January to December. This field is stored in the database in json data subset format. The length of the data subset is 13, and the data subset position 0 is not stored for the convenience of calculation. If the current time is July, the data subset positions 1-7 represent the monthly cumulative power generation from January to July this year, and the data subset positions 8 to 12 represent the monthly cumulative power generation from August to December last year.
[0108] In this embodiment, the specific process of "updating the data structure according to the power generation of the minimum unit period, the update method and the data update position" in step S130 can be further explained in combination with the following description.
[0109] As described in the following steps, the current annual updated power generation data is generated based on the most recently updated annual power generation data and the power generation of the minimum unit cycle; the most recently updated annual power generation data at the year data update position in the first power generation data subset is cleared, and the current annual updated power generation data is input into the year data update position; the current monthly updated power generation data is generated based on the most recently updated monthly power generation data and the power generation of the minimum unit cycle.
[0110] When the year of the current time is the same as the year of the last update time or the year difference is equal to 1 year, the last updated monthly power generation data at the monthly data update position in the second power generation data subset is cleared, and the current month updated power generation data is input into the monthly data update position.
[0111] Or when the year of the current time differs from the year of the most recent update time by more than one year, the monthly power generation data in the second power generation data subset is cleared, and the current monthly updated power generation data is input into the monthly data update position.
[0112] In one embodiment, the specific process of step S120 "when the power generation equipment is an existing equipment, determining the data update method and data update position corresponding to each power generation data subset in the middle field according to the current time and the most recent update time" can also be combined with the following description.
[0113] As described in the following steps, the year data update position is determined in the first power generation data subset according to the year in the current time; and the update method of the first power generation data subset is determined according to the year in the current time and the year data update position.
[0114] The monthly data update position is determined in the second power generation data subset according to the month in the current time; and the update method of the second power generation data subset is determined according to the month in the current time and the monthly data update position.
[0115] The date data update position is determined in the third power generation data subset according to the date number in the current time; and the update method of the third power generation data subset is determined according to the date number in the current time and the date data update position.
[0116] It should be noted that the power generation data subset also includes a third power generation data subset, the total detection period of the third power generation data subset is 1 month, and the detection unit period is 1 day; the data update position includes a date data update position.
[0117] It should be noted that the third power generation data subset represents the data subset daykWh. The field name of the third power generation data subset in the middle field can be daykWh. The power generation data subset represents the daily power generation of the power generation equipment in the past month. For the convenience of calculation, the data subset position 0 does not record data, and the data subset positions 1 to 31 are used to represent dates from 1 to 31. This field is stored in the database in json data subset format. The length of the data subset is 32, and the data subset position 0 is not stored for the convenience of calculation. If the current time is August 5, the data subset positions 1-5 store the power generation from August 1 to August 5, and the data subset positions 6-31 store the power generation from July 6 to July 31.
[0118] In this embodiment, the specific process of "updating the data structure according to the power generation of the minimum unit period, the update method and the data update position" in step S130 can be further explained in combination with the following description.
[0119] As described in the following steps, the current annual updated power generation data is generated based on the most recently updated annual power generation data and the power generation of the minimum unit cycle; the most recently updated annual power generation data at the year data update position in the first power generation data subset is cleared, and the current annual updated power generation data is input into the year data update position; the current monthly updated power generation data is generated based on the most recently updated monthly power generation data and the power generation of the minimum unit cycle.
[0120] When the year of the current time is the same as the year of the last update time or the year difference is equal to 1 year, the last updated monthly power generation data at the monthly data update position in the second power generation data subset is cleared, and the current month updated power generation data is input into the monthly data update position.
[0121] Or when the year of the current time differs from the year of the most recent update time by more than one year, the monthly power generation data in the second power generation data subset is cleared, and the current monthly updated power generation data is input into the monthly data update position.
[0122] The updated power generation data for the current day is generated according to the power generation data of the most recently updated date and the power generation of the minimum unit period.
[0123] When the year of the current time is the same as the year of the most recent update time and the month difference is no more than 1 month, or the year difference is equal to 1 year and it is a cross-year month, the most recently updated daily power generation data at the date data update position in the third power generation data subset is cleared, and the current day's updated power generation data is input into the date data update position.
[0124] Or when the year of the current time is the same as the year of the most recent update time and the month difference is greater than 1 month, or the year difference is equal to 1 year and it is not a cross-year month, the daily power generation data in the third power generation data subset is cleared, and the current day updated power generation data is input into the date data update position.
[0125] In one embodiment, the specific process of "when the power generation device is an existing device, determining the data update method and data update position corresponding to each power generation data subset in the middle field according to the current time and the last update time" in step S120 can be further explained in combination with the following description. Figure 2The flowchart of the power generation data management method is shown in FIG.
[0126] It should be noted that the traditional data structure has a lot of data redundancy pressure (for example Figure 3 As shown), the present invention improves and proposes Figure 4 The data structure shown in the figure, in which the float data subset minutekWh with a length of 288, the float data subset daykWh with a length of 32, the float data subset monthkWh with a length of 13, and the float data subset yearkWh with a length of 100 are stored in the database in the format of json data, so that each device only needs to occupy one piece of data to store the recent power generation of the device.
[0127] It should be noted that Figure 2 The yearkWhArray represents the first power generation data subset, the monthkWhArray represents the second power generation data subset, the daykWhArray represents the third power generation data subset, and the minutekWhArray represents the fourth power generation data subset. MCUID represents the ID of the power generation device. In this embodiment, the power generation every five minutes is used as the power generation of the minimum detection unit cycle.
[0128] The first field is named McuId: the unique ID number of each device, used to identify the device. This field is stored in the database as a varchar string, and the maximum length can be 32.
[0129] The field name in the tail field can be lastSubmitDate: the date on which the equipment data is submitted / updated. This date is updated each time new power generation data is received. It can be used to calculate whether the equipment has abnormal power outages and so on, so as to update the equipment power generation status in time. This field is stored in the database in datetime format and can represent the date and time accurate to seconds, such as "2024-07-19 16:55:52".
[0130] As described in the following steps, the year data update position is determined in the first power generation data subset according to the year in the current time; and the update method of the first power generation data subset is determined according to the year in the current time and the year data update position.
[0131] It should be noted that the field name of the first power generation data subset in the middle field can be yearkWh: the annual power generation of the equipment in the past 100 years, with 2000 as the first year, that is, the database position 0 represents the year 2000. This field is stored in the database in json data subset format, and the length of the data subset is 100. That is, data subset position 24 stores the power generation of the equipment in 2024, data subset position 25 stores the power generation of the equipment in 2025, and so on, the power generation from 2000 to 2099 can be recorded.
[0132] The monthly data update position is determined in the second power generation data subset according to the month in the current time; and the update method of the second power generation data subset is determined according to the month in the current time and the monthly data update position.
[0133] It should be noted that the field name of the second power generation data subset in the middle field can be monthkWh: the monthly power generation of the equipment in the past year. For the convenience of calculation, the data subset position 0 does not record data, and the data subset positions 1 to 12 are used to represent the months from January to December. This field is stored in the database in json data subset format. The length of the data subset is 13, and the data subset position 0 is not stored for the convenience of calculation. If the current time is July, the data subset positions 1-7 represent the monthly cumulative power generation from January to July this year, and the data subset positions 8 to 12 represent the monthly cumulative power generation from August to December last year.
[0134] The date data update position is determined in the third power generation data subset according to the date number in the current time; and the update method of the third power generation data subset is determined according to the date number in the current time and the date data update position.
[0135] It should be noted that the field name of the third power generation data subset in the middle field can be daykWh: the daily power generation of the equipment in the past month. For the convenience of calculation, the data subset position 0 does not record data, and the data subset positions 1 to 31 are used to represent dates from 1 to 31. This field is stored in the database in json data subset format. The length of the data subset is 32, and the data subset position 0 is not stored for the convenience of calculation. If the current time is August 5, the data subset positions 1-5 store the power generation from August 1 to August 5, and the data subset positions 6-31 store the power generation from July 6 to July 31;
[0136] The minute data update position is determined in the fourth power generation data subset according to the minute in the current time; and the update method of the fourth power generation data subset is determined according to the minute in the current time and the minute data update position.
[0137] It should be noted that the power generation data subset also includes a fourth power generation data subset, the fourth power generation data subset has a total detection period of 1 day, and a detection unit period of a preset number of minutes; the data update position includes a minute data update position.
[0138] It should be noted that the field name of the fourth power generation data subset in the middle field can be minutekWh: the power generation of the device every 5 minutes in the last 24 hours, a total of 288 points are recorded, and the formula (HOUR×12+MINUTE / 5) can be used to calculate the current time position, so as to record the power generation information to the corresponding data subset position. This field is stored in the database in the format of a json data subset, and the length of the data subset is 288. If you want to access the power generation data at 8:30, you can use the formula to calculate (8×12+30 / 5)=102, that is, read the 102 position of the minutekWh data subset from the database to get the 5-minute power generation from 8:25 to 8:30. It should also be noted that the data subset includes today's power generation and yesterday's power generation. That is, if the current time is 9:00, the data subset position 0~108 stores the power generation from 0:05 to 9:00 today, and the data subset position 109~287 stores the power generation from 9:05 to 23:55 yesterday.
[0139] In this embodiment, the specific process of "updating the data structure according to the power generation of the minimum unit period, the update method and the data update position" in step S130 can be further explained in combination with the following description.
[0140] According to the steps described below, the current annual updated power generation data is generated based on the most recently updated annual power generation data and the power generation of the minimum unit period;
[0141] Clear the most recently updated annual power generation data at the annual data update position in the first power generation data subset, and input the current annual updated power generation data into the annual data update position;
[0142] Generate the current month updated power generation data based on the most recently updated monthly power generation data and the power generation of the minimum unit period;
[0143] When the year of the current time is the same as the year of the last update time or the year difference is equal to 1 year, the last updated monthly power generation data at the monthly data update position in the second power generation data subset is cleared, and the current month updated power generation data is input into the monthly data update position.
[0144] or when the year of the current time differs from the year of the most recent update time by more than one year, the monthly power generation data in the second power generation data subset is cleared, and the current monthly updated power generation data is input into the monthly data update position;
[0145] Generate updated power generation data for the current day based on the power generation data of the most recently updated date and the power generation of the minimum unit period;
[0146] When the year of the current time is the same as the year of the most recent update time and the month difference is no more than 1 month, or the year difference is equal to 1 year and it is a cross-year month, then the most recently updated daily power generation data at the date data update position in the third power generation data subset is cleared, and the current day updated power generation data is input into the date data update position;
[0147] or when the year of the current time is the same as the year of the most recent update time and the month difference is greater than 1 month, or the year difference is equal to 1 year and is not a cross-year month, clear the daily power generation data in the third power generation data subset, and input the current day updated power generation data into the date data update position;
[0148] Generate the current minute updated power generation data according to the most recently updated minute power generation data and the power generation of the minimum unit period;
[0149] When the year of the current time is the same as the year of the last updated time, the month is the same, and the date number difference is no more than 1 day, or the year is the same, the month difference is equal to 1 month, and it is a day that crosses a month, or the year difference is equal to 1 year, and it is a month that crosses a year and a day that crosses a year, then clear the last updated power generation data of the minute data update position of the fourth power generation data subset, and input the current minute updated power generation data into the minute data update position;
[0150] Or when the year of the current time is the same as the year of the most recent update time, the month is the same, and the date number difference is greater than 1 day, or the year is the same, the month difference is equal to 1 month, and it is not a cross-month day, or the year difference is equal to 1 year, and it is not a cross-year month, or the year difference is equal to 1 year, and it is a cross-year month but not a cross-year day, then the minute power generation data of the fourth power generation data subset is cleared, and the current minute updated power generation data is input into the minute data update position.
[0151] It should be noted that in this embodiment, each device only needs one record to store the recent power generation data of the device by minute / day / month / year, etc. Compared with the traditional solution that requires storing massive historical power generation data for each device separately, this solution greatly reduces data redundancy, greatly saves storage space, and can significantly reduce server storage costs.
[0152] Users only need to query a single record by device ID to directly obtain the recent power generation data of the corresponding device, without the time-consuming screening and cumulative calculations like traditional solutions. Taking monthly power generation as an example, each element in the data subset represents the power generation of one month. Users only need to simply calculate the data subset to quickly understand the power generation of the device in the recent year, which reduces server performance loss and improves the user data query speed.
[0153] It should be noted that the dynamic update process in this embodiment ensures the timeliness of the data. When users query, they obtain the latest power generation data of the equipment. Rendering the query results directly into the chart can provide users with an intuitive and vivid display of power generation change trends. At the same time, through the dynamic data update mechanism, it is ensured that even if the device is powered off and not connected to the server, the data can be quickly and accurately updated after reconnection, which improves the accuracy and effectiveness of the server data.
[0154] In the traditional data structure, in the storage method that only contains the most basic data types to identify the time when the power generation is generated, the power generation data and the device number to which it belongs, assuming that the power generation equipment records one piece of data in a unit period, such as every 5 minutes, it can be calculated that 288 pieces of data need to be recorded in a day, and about 105120 pieces of data (288×365=105120) will be generated in a year. A single record requires about 45 bytes (33+4+8=45) to store one piece of power generation data, that is, a total of about 4.5MB (105120×45÷1024÷1024≈4.5) of space is consumed to store the power generation of an inverter device in a year. The design life of a conventional grid-connected inverter is 25 years, so a total of 112.5MB (4.5×25=112.5) is consumed to store the power generation data of one device.
[0155] For the data structure in this embodiment, each device only needs to occupy about 3505 (33 + (288 + 32 +13+ 100) × 8 + 8 = 3505) bytes, about 0.0033 (3505÷1024÷1024≈0.0033) MB of storage space, which can represent the daily, monthly, annual and historical power generation of the device. Compared with the traditional storage solution, one device consumes about 4.5 MB of storage space per year, and a total of about 112.5 MB of storage space is consumed in lifetime. The high-efficiency power generation storage structure of the present invention only needs one piece of data to save the recent power generation. The annual space storage consumption of each device is only 0.073% of that of the traditional solution (0.0033÷4.5≈0.073%), and the lifetime space storage consumption of each device is only 0.00293% of that of the traditional solution (0.0033÷112.5≈0.00293%).
[0156] It should be noted that all descriptions in this article are not limiting, and the available data structures and algorithms are not limited to the contents in the diagrams. For ordinary technicians in this field, it can be understood that without departing from the creative principles and spirit of the present invention, the data structure, data update mechanism, and implementation method can be modified, changed, replaced, and transformed into data structures, data update mechanisms, and implementation methods that are similar to the technical solutions of the present invention, all of which fall within the scope of protection of the present invention.
[0157] It should be noted that when the power generation equipment is not an existing equipment, the management method includes the following steps.
[0158] When the power generation equipment is not an existing equipment, a new data structure is created based on the ID information of the power generation equipment; the data update position corresponding to each power generation data subset in the middle field is determined based on the current time; and the data structure is updated based on the power generation of the minimum unit period and the data update position.
[0159] Reference Figure 5 , shows a management device for massive power generation data provided by an embodiment of the present application, the management device involves a preset data structure, the data structure includes a first field for ID information of the power generation equipment, a middle field for power generation data corresponding to different periods, and a tail field for the update time of the current data; wherein the middle field includes a number of corresponding power generation data subsets recorded using different total detection periods and their corresponding detection unit periods, and the length of the power generation data subset is the quotient of the corresponding total detection period and the detection unit period;
[0160] The management device comprises:
[0161] In response to unit 510, it is used to obtain the current time in response to the data update request; wherein the data update request includes receiving the ID information of the power generation equipment and the power generation of the minimum unit cycle;
[0162] A determination unit 520, configured to determine, when the power generation device is an existing device, a data update mode and a data update position corresponding to each of the power generation data subsets in the middle field according to the current time and the last update time;
[0163] The updating unit 530 is used to update the data structure according to the power generation of the minimum unit period, the updating method and the data updating position.
[0164] It should be noted that, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0165] Reference Figure 6 , showing a computer device of a method for managing massive power generation data of the present invention, which may specifically include the following:
[0166] The computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include but are not limited to one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components.
[0167] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture bus, a Micro Channel Architecture bus, an Enhanced Bus, an Audio-Video Electronics Standards Association local bus, and a Peripheral Component Interconnect bus.
[0168] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0169] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media. Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk, and an optical drive for reading and writing to a removable non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory may include at least one program product having a set of program modules 42 configured to perform the functions of various embodiments of the present invention.
[0170] A program / utility 40 having a set of program modules 42 may be stored in, for example, a memory, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules 42, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0171] The computer device 12 may also communicate with one or more external devices 14, such as a keyboard, a pointing device, a display 24, a camera, etc., and may also communicate with one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices, such as a network card, a modem, etc. Such communication may be performed through the I / O interface 22. The computer device 12 may also communicate with one or more networks, such as a local area network, a wide area network, and / or a public network, through a network adapter 20. Figure 6 As shown, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be understood that although Figure 6 Not shown, other hardware and / or software modules may be used in conjunction with the computer device 12, including but not limited to microcode, device drivers, the processing unit 16, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0172] The processing unit 16 executes various functional applications and data processing by running the programs stored in the memory 28, such as implementing the method for managing massive power generation data provided in the embodiment of the present invention.
[0173] That is, when the processing unit 16 executes the above program, the following is achieved: in response to a data update request, the current time is obtained; the data update request includes receiving the ID information of the power generation equipment and the minimum unit cycle power generation; when the power generation equipment is an existing equipment, the data update method and data update position corresponding to each power generation data subset in the middle field are determined according to the current time and the last update time; the preset data structure is updated according to the minimum unit cycle power generation, the update method and the data update position. The massive power generation data is stored through the preset data structure, so as to achieve the purpose of more efficient use of storage space.
[0174] In an embodiment of the present invention, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for managing massive power generation data as provided in all embodiments of the present application.
[0175] That is, when the program is executed by the processor, it is implemented as follows: in response to a data update request, the current time is obtained; wherein the data update request includes receiving the ID information of the power generation equipment and the power generation of the minimum unit cycle; when the power generation equipment is an existing equipment, the data update method and data update position corresponding to each power generation data subset in the middle field are determined according to the current time and the most recent update time; the data structure is updated according to the power generation of the minimum unit cycle, the update method and the data update position. The management method involves a preset data structure, the data structure includes a first field for the ID information of the power generation equipment, a middle field for the power generation data corresponding to different cycles, and a tail field for the update time of the current data; wherein the middle field includes a number of corresponding power generation data subsets recorded using different total detection cycles and their corresponding unit detection cycles, and the length of the power generation data subset is the quotient of the corresponding total detection cycle and the unit detection cycle.
[0176] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical fiber, a portable compact disk read-only memory, an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0177] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0178] The computer program code for performing the operation of the present invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as C language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on the remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, such as a local area network or a wide area network, or can be connected to an external computer, such as through the Internet using an Internet service provider. The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other.
[0179] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional 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 that fall within the scope of the embodiments of the present application.
[0180] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, an element defined by the statement includes a... does not exclude the existence of other identical elements in the process, method, article or terminal device including the element.
[0181] The above is a detailed introduction to a method, device and equipment for managing massive power generation data provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for managing massive power generation data, characterized in that: The management method involves a preset data structure, wherein the data structure includes a first field for ID information of the power generation equipment, a middle field for power generation data corresponding to different cycles, and a tail field for the update time of the current data; wherein the middle field includes a number of corresponding power generation data subsets recorded using different total detection cycles and their corresponding detection unit cycles, and the length of the power generation data subset is the quotient of the corresponding total detection cycle and the detection unit cycle; The management method comprises: In response to a data update request, obtaining the current time; wherein the data update request includes receiving ID information of the power generation equipment and the power generation of the minimum unit cycle; When the power generation device is an existing device, determining the data update mode and data update position corresponding to each power generation data subset in the middle field according to the time difference between the current time and the most recent update time and the period values of the different periods; The data structure is updated according to the power generation of the minimum unit period, the update method and the data update position.
2. The management method according to claim 1, characterized in that: Also includes: When the power generation device is not an existing device, creating a new data structure according to the ID information of the power generation device; Determine a data update position corresponding to each power generation data subset in the middle field according to the current time; The data structure is updated according to the power generation of the minimum unit period and the data update position.
3. The management method according to claim 1, characterized in that: The power generation data subset includes a first power generation data subset, the total detection period of the first power generation data subset is a preset number of years, and the detection unit period is 1 year; the data update position includes a year data update position; The step of determining the data update mode and data update position corresponding to each of the power generation data subsets in the middle field according to the current time and the most recent update time includes: Determining the year data update position in the first power generation data subset according to the year in the current time; The updating method of the first power generation data subset is determined according to the year in the current time and the year data updating position.
4. The management method according to claim 3, characterized in that: The step of updating the data structure according to the power generation of the minimum unit period, the updating method and the data updating position comprises: Generate current annual updated power generation data based on the most recently updated annual power generation data and the power generation of the minimum unit period; The power generation data updated in the most recent year at the year data update position in the first power generation data subset is cleared, and the current year updated power generation data is input into the year data update position.
5. The management method according to claim 3, characterized in that: The power generation data subset also includes a second power generation data subset, the second power generation data subset has a total detection period of 1 year and a detection unit period of 1 month; the data update position includes a monthly data update position; The step of determining the data update mode and data update position corresponding to each of the power generation data subsets in the middle field according to the current time and the last update time also includes: Determining the year data update position in the first power generation data subset according to the year in the current time; Determining an update method of the first power generation data subset according to the year in the current time and the year data update position; Determining the monthly data update position in the second power generation data subset according to the month in the current time; The updating method of the second power generation data subset is determined according to the month in the current time and the monthly data updating position.
6. The management method according to claim 5, characterized in that: The step of updating the data structure according to the power generation of the minimum unit period, the updating method and the data updating position comprises: Generate current annual updated power generation data based on the most recently updated annual power generation data and the power generation of the minimum unit period; Clear the most recently updated annual power generation data at the annual data update position in the first power generation data subset, and input the current annual updated power generation data into the annual data update position; Generate the current month updated power generation data based on the most recently updated monthly power generation data and the power generation of the minimum unit period; When the year of the current time is the same as the year of the most recent update time or the year difference is equal to 1 year, the most recently updated monthly power generation data at the monthly data update position in the second power generation data subset is cleared, and the current monthly updated power generation data is input into the monthly data update position; Or when the year of the current time differs from the year of the most recent update time by more than one year, the monthly power generation data in the second power generation data subset is cleared, and the current monthly updated power generation data is input into the monthly data update position.
7. The management method according to claim 5, characterized in that: The power generation data subset also includes a third power generation data subset, the total detection period of the third power generation data subset is 1 month, and the detection unit period is 1 day; the data update position includes a date data update position; The step of determining the data update mode and data update position corresponding to each of the power generation data subsets in the middle field according to the current time and the last update time also includes: Determining the year data update position in the first power generation data subset according to the year in the current time; Determining an update method of the first power generation data subset according to the year in the current time and the year data update position; Determining the monthly data update position in the second power generation data subset according to the month in the current time; Determining an update method of the second power generation data subset according to the month in the current time and the data update position of the month; Determining the date data update position in the third power generation data subset according to the date number in the current time; The updating method of the third power generation data subset is determined according to the date number in the current time and the date data updating position.
8. The management method according to claim 7, characterized in that: The step of updating the data structure according to the power generation of the minimum unit period, the updating method and the data updating position comprises: Generate current annual updated power generation data based on the most recently updated annual power generation data and the power generation of the minimum unit period; Clear the most recently updated annual power generation data at the annual data update position in the first power generation data subset, and input the current annual updated power generation data into the annual data update position; Generate the current month updated power generation data based on the most recently updated monthly power generation data and the power generation of the minimum unit period; When the year of the current time is the same as the year of the most recent update time or the year difference is equal to 1 year, the most recently updated monthly power generation data at the monthly data update position in the second power generation data subset is cleared, and the current monthly updated power generation data is input into the monthly data update position; or when the year of the current time differs from the year of the most recent update time by more than one year, the monthly power generation data in the second power generation data subset is cleared, and the current monthly updated power generation data is input into the monthly data update position; Generate updated power generation data for the current day based on the power generation data of the most recently updated date and the power generation of the minimum unit period; When the year of the current time is the same as the year of the most recent update time and the month difference is no more than 1 month, or the year difference is equal to 1 year and it is a cross-year month, then the most recently updated daily power generation data at the date data update position in the third power generation data subset is cleared, and the current day updated power generation data is input into the date data update position; Or when the year of the current time is the same as the year of the most recent update time and the month difference is greater than 1 month, or the year difference is equal to 1 year and it is not a cross-year month, the daily power generation data in the third power generation data subset is cleared, and the current day updated power generation data is input into the date data update position.
9. The management method according to claim 7, characterized in that: The power generation data subset also includes a fourth power generation data subset, the fourth power generation data subset has a total detection period of 1 day, and a detection unit period is a preset number of minutes; the data update position includes a minute data update position; The step of determining the data update mode and data update position corresponding to each of the power generation data subsets in the middle field according to the current time and the last update time also includes: Determining the year data update position in the first power generation data subset according to the year in the current time; Determining an update method of the first power generation data subset according to the year in the current time and the year data update position; Determining the monthly data update position in the second power generation data subset according to the month in the current time; Determining an update method of the second power generation data subset according to the month in the current time and the data update position of the month; Determining the date data update position in the third power generation data subset according to the date number in the current time; Determining an update method of the third power generation data subset according to the date number in the current time and the date data update position; Determine the minute data update position in the fourth power generation data subset according to the minute in the current time; An updating method of the fourth power generation data subset is determined according to the minute in the current time and the minute data updating position.
10. The management method according to claim 9, characterized in that: The step of updating the data structure according to the power generation of the minimum unit period, the updating method and the data updating position comprises: Generate current annual updated power generation data based on the most recently updated annual power generation data and the power generation of the minimum unit period; Clear the most recently updated annual power generation data at the annual data update position in the first power generation data subset, and input the current annual updated power generation data into the annual data update position; Generate the current month updated power generation data based on the most recently updated monthly power generation data and the power generation of the minimum unit period; When the year of the current time is the same as the year of the most recent update time or the year difference is equal to 1 year, the most recently updated monthly power generation data at the monthly data update position in the second power generation data subset is cleared, and the current monthly updated power generation data is input into the monthly data update position; or when the year of the current time differs from the year of the most recent update time by more than one year, the monthly power generation data in the second power generation data subset is cleared, and the current monthly updated power generation data is input into the monthly data update position; Generate updated power generation data for the current day based on the power generation data of the most recently updated date and the power generation of the minimum unit period; When the year of the current time is the same as the year of the most recent update time and the month difference is no more than 1 month, or the year difference is equal to 1 year and it is a cross-year month, then the most recently updated daily power generation data at the date data update position in the third power generation data subset is cleared, and the current day updated power generation data is input into the date data update position; or when the year of the current time is the same as the year of the most recent update time and the month difference is greater than 1 month, or the year difference is equal to 1 year and is not a cross-year month, clear the daily power generation data in the third power generation data subset, and input the current day updated power generation data into the date data update position; Generate the current minute updated power generation data according to the most recently updated minute power generation data and the power generation of the minimum unit period; When the year of the current time is the same as the year of the last updated time, the month is the same, and the date number difference is no more than 1 day, or the year is the same, the month difference is equal to 1 month, and it is a day that crosses a month, or the year difference is equal to 1 year, and it is a month that crosses a year and a day that crosses a year, then clear the last updated power generation data of the minute data update position of the fourth power generation data subset, and input the current minute updated power generation data into the minute data update position; Or when the year of the current time is the same as the year of the most recent update time, the month is the same, and the date number difference is greater than 1 day, or the year is the same, the month difference is equal to 1 month, and it is not a cross-month day, or the year difference is equal to 1 year, and it is not a cross-year month, or the year difference is equal to 1 year, and it is a cross-year month but not a cross-year day, then the minute power generation data of the fourth power generation data subset is cleared, and the current minute updated power generation data is input into the minute data update position.
11. A management device for massive power generation data, characterized in that: The management device involves a preset data structure, wherein the data structure includes a first field for ID information of the power generation equipment, a middle field for power generation data corresponding to different cycles, and a tail field for the update time of the current data; wherein the middle field includes a number of corresponding power generation data subsets recorded using different total detection cycles and their corresponding detection unit cycles, and the length of the power generation data subset is the quotient of the corresponding total detection cycle and the detection unit cycle; The management device comprises: A response unit, configured to obtain the current time in response to a data update request; wherein the data update request includes receiving ID information of the power generation equipment and the power generation of the minimum unit cycle; a determination unit, configured to determine, when the power generation device is an existing device, a data update mode and a data update position corresponding to each of the power generation data subsets in the middle field according to a time difference between the current time and the most recent update time and a period value of the different periods; An updating unit is used to update the data structure according to the power generation of the minimum unit period, the updating method and the data updating position.
12. A device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for managing mass power generation data according to any one of claims 1 to 10 is implemented.
13. 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 for managing massive power generation data according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Generating capacity statistical method of power generation equipment and terminal
CN116737791A
Generating capacity recording method and device, electronic equipment and storage medium
CN117271520A